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 : nx_yaml.py
""" **** YAML **** Read and write NetworkX graphs in YAML format. "YAML is a data serialization format designed for human readability and interaction with scripting languages." See http://www.yaml.org for documentation. Format ------ http://pyyaml.org/wiki/PyYAML """ __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_yaml', 'write_yaml'] import networkx as nx from networkx.utils import open_file @open_file(1, mode='w') def write_yaml(G_to_be_yaml, path_for_yaml_output, **kwds): """Write graph G in YAML format to path. YAML is a data serialization format designed for human readability and interaction with scripting languages [1]_. Parameters ---------- G : graph A NetworkX graph path : file or string File or filename to write. Filenames ending in .gz or .bz2 will be compressed. Notes ----- To use encoding on the output file include e.g. `encoding='utf-8'` in the keyword arguments. Examples -------- >>> G=nx.path_graph(4) >>> nx.write_yaml(G,'test.yaml') References ---------- .. [1] http://www.yaml.org """ try: import yaml except ImportError: raise ImportError("write_yaml() requires PyYAML: http://pyyaml.org/") yaml.dump(G_to_be_yaml, path_for_yaml_output, **kwds) @open_file(0, mode='r') def read_yaml(path): """Read graph in YAML format from path. YAML is a data serialization format designed for human readability and interaction with scripting languages [1]_. 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.path_graph(4) >>> nx.write_yaml(G,'test.yaml') >>> G=nx.read_yaml('test.yaml') References ---------- .. [1] http://www.yaml.org """ try: import yaml except ImportError: raise ImportError("read_yaml() requires PyYAML: http://pyyaml.org/") G = yaml.load(path, Loader=yaml.FullLoader) return G # fixture for pytest def setup_module(module): try: import yaml except: from pytest import skip skip("PyYAML not available", allow_module_level=True) # fixture for pytest def teardown_module(module): import os os.unlink('test.yaml')
Close