Linux ip-148-66-134-25.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
Apache
: 148.66.134.25 | : 3.142.255.23
66 Domain
8.0.30
amvm
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
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
opt /
alt /
python311 /
lib64 /
python3.11 /
[ HOME SHELL ]
Name
Size
Permission
Action
__phello__
[ DIR ]
drwxr-xr-x
__pycache__
[ DIR ]
drwxr-xr-x
asyncio
[ DIR ]
drwxr-xr-x
collections
[ DIR ]
drwxr-xr-x
concurrent
[ DIR ]
drwxr-xr-x
config-3.11-x86_64-linux-gnu
[ DIR ]
drwxr-xr-x
ctypes
[ DIR ]
drwxr-xr-x
curses
[ DIR ]
drwxr-xr-x
dbm
[ DIR ]
drwxr-xr-x
distutils
[ DIR ]
drwxr-xr-x
email
[ DIR ]
drwxr-xr-x
encodings
[ DIR ]
drwxr-xr-x
ensurepip
[ DIR ]
drwxr-xr-x
html
[ DIR ]
drwxr-xr-x
http
[ DIR ]
drwxr-xr-x
importlib
[ DIR ]
drwxr-xr-x
json
[ DIR ]
drwxr-xr-x
lib-dynload
[ DIR ]
drwxr-xr-x
lib2to3
[ DIR ]
drwxr-xr-x
logging
[ DIR ]
drwxr-xr-x
multiprocessing
[ DIR ]
drwxr-xr-x
pydoc_data
[ DIR ]
drwxr-xr-x
re
[ DIR ]
drwxr-xr-x
site-packages
[ DIR ]
drwxr-xr-x
sqlite3
[ DIR ]
drwxr-xr-x
tomllib
[ DIR ]
drwxr-xr-x
unittest
[ DIR ]
drwxr-xr-x
urllib
[ DIR ]
drwxr-xr-x
venv
[ DIR ]
drwxr-xr-x
wsgiref
[ DIR ]
drwxr-xr-x
xml
[ DIR ]
drwxr-xr-x
xmlrpc
[ DIR ]
drwxr-xr-x
zoneinfo
[ DIR ]
drwxr-xr-x
LICENSE.txt
13.61
KB
-rw-r--r--
__future__.py
5.1
KB
-rw-r--r--
__hello__.py
227
B
-rw-r--r--
_aix_support.py
3.31
KB
-rw-r--r--
_bootsubprocess.py
2.61
KB
-rw-r--r--
_collections_abc.py
29.49
KB
-rw-r--r--
_compat_pickle.py
8.56
KB
-rw-r--r--
_compression.py
5.55
KB
-rw-r--r--
_markupbase.py
14.31
KB
-rw-r--r--
_osx_support.py
21.51
KB
-rw-r--r--
_py_abc.py
6.04
KB
-rw-r--r--
_pydecimal.py
223.83
KB
-rw-r--r--
_pyio.py
91.99
KB
-rw-r--r--
_sitebuiltins.py
3.05
KB
-rw-r--r--
_strptime.py
24.58
KB
-rw-r--r--
_sysconfigdata__linux_x86_64-l...
57.51
KB
-rw-r--r--
_sysconfigdata_d_linux_x86_64-...
56.76
KB
-rw-r--r--
_threading_local.py
7.05
KB
-rw-r--r--
_weakrefset.py
5.75
KB
-rw-r--r--
abc.py
6.38
KB
-rw-r--r--
aifc.py
33.41
KB
-rw-r--r--
antigravity.py
500
B
-rw-r--r--
argparse.py
97.93
KB
-rw-r--r--
ast.py
60
KB
-rw-r--r--
asynchat.py
11.3
KB
-rw-r--r--
asyncore.py
19.83
KB
-rw-r--r--
base64.py
20.55
KB
-rwxr-xr-x
bdb.py
31.7
KB
-rw-r--r--
bisect.py
3.06
KB
-rw-r--r--
bz2.py
11.57
KB
-rw-r--r--
cProfile.py
6.21
KB
-rwxr-xr-x
calendar.py
24.15
KB
-rw-r--r--
cgi.py
33.63
KB
-rwxr-xr-x
cgitb.py
12.13
KB
-rw-r--r--
chunk.py
5.37
KB
-rw-r--r--
cmd.py
14.52
KB
-rw-r--r--
code.py
10.37
KB
-rw-r--r--
codecs.py
36.28
KB
-rw-r--r--
codeop.py
5.77
KB
-rw-r--r--
colorsys.py
3.97
KB
-rw-r--r--
compileall.py
19.78
KB
-rw-r--r--
configparser.py
54.36
KB
-rw-r--r--
contextlib.py
26.77
KB
-rw-r--r--
contextvars.py
129
B
-rw-r--r--
copy.py
8.48
KB
-rw-r--r--
copyreg.py
7.5
KB
-rw-r--r--
crypt.py
3.82
KB
-rw-r--r--
csv.py
15.65
KB
-rw-r--r--
dataclasses.py
57.1
KB
-rw-r--r--
datetime.py
89.68
KB
-rw-r--r--
decimal.py
320
B
-rw-r--r--
difflib.py
81.36
KB
-rw-r--r--
dis.py
28.23
KB
-rw-r--r--
doctest.py
103.81
KB
-rw-r--r--
enum.py
77.72
KB
-rw-r--r--
filecmp.py
9.94
KB
-rw-r--r--
fileinput.py
15.35
KB
-rw-r--r--
fnmatch.py
5.86
KB
-rw-r--r--
fractions.py
28
KB
-rw-r--r--
ftplib.py
34.98
KB
-rw-r--r--
functools.py
37.51
KB
-rw-r--r--
genericpath.py
4.86
KB
-rw-r--r--
getopt.py
7.31
KB
-rw-r--r--
getpass.py
5.85
KB
-rw-r--r--
gettext.py
20.82
KB
-rw-r--r--
glob.py
8.53
KB
-rw-r--r--
graphlib.py
9.43
KB
-rw-r--r--
gzip.py
23.51
KB
-rw-r--r--
hashlib.py
11.49
KB
-rw-r--r--
heapq.py
22.48
KB
-rw-r--r--
hmac.py
7.54
KB
-rw-r--r--
imaplib.py
53.58
KB
-rw-r--r--
imghdr.py
3.86
KB
-rw-r--r--
imp.py
10.36
KB
-rw-r--r--
inspect.py
120.53
KB
-rw-r--r--
io.py
4.22
KB
-rw-r--r--
ipaddress.py
73.32
KB
-rw-r--r--
keyword.py
1.04
KB
-rw-r--r--
linecache.py
5.52
KB
-rw-r--r--
locale.py
77.24
KB
-rw-r--r--
lzma.py
12.97
KB
-rw-r--r--
mailbox.py
76.98
KB
-rw-r--r--
mailcap.py
9.15
KB
-rw-r--r--
mimetypes.py
22.42
KB
-rw-r--r--
modulefinder.py
23.14
KB
-rw-r--r--
netrc.py
6.77
KB
-rw-r--r--
nntplib.py
40.12
KB
-rw-r--r--
ntpath.py
29.51
KB
-rw-r--r--
nturl2path.py
2.82
KB
-rw-r--r--
numbers.py
10.11
KB
-rw-r--r--
opcode.py
10.2
KB
-rw-r--r--
operator.py
10.71
KB
-rw-r--r--
optparse.py
58.95
KB
-rw-r--r--
os.py
38.6
KB
-rw-r--r--
pathlib.py
47.43
KB
-rw-r--r--
pdb.py
62.68
KB
-rwxr-xr-x
pickle.py
63.61
KB
-rw-r--r--
pickletools.py
91.66
KB
-rw-r--r--
pipes.py
8.77
KB
-rw-r--r--
pkgutil.py
24.06
KB
-rw-r--r--
platform.py
41.3
KB
-rwxr-xr-x
plistlib.py
27.69
KB
-rw-r--r--
poplib.py
14.84
KB
-rw-r--r--
posixpath.py
16.61
KB
-rw-r--r--
pprint.py
24.01
KB
-rw-r--r--
profile.py
22.36
KB
-rwxr-xr-x
pstats.py
28.67
KB
-rw-r--r--
pty.py
6.17
KB
-rw-r--r--
py_compile.py
7.65
KB
-rw-r--r--
pyclbr.py
11.13
KB
-rw-r--r--
pydoc.py
110.02
KB
-rwxr-xr-x
queue.py
11.23
KB
-rw-r--r--
quopri.py
7.11
KB
-rwxr-xr-x
random.py
31.41
KB
-rw-r--r--
reprlib.py
5.31
KB
-rw-r--r--
rlcompleter.py
7.64
KB
-rw-r--r--
runpy.py
12.85
KB
-rw-r--r--
sched.py
6.2
KB
-rw-r--r--
secrets.py
1.98
KB
-rw-r--r--
selectors.py
19.21
KB
-rw-r--r--
shelve.py
8.36
KB
-rw-r--r--
shlex.py
13.18
KB
-rw-r--r--
shutil.py
55.19
KB
-rw-r--r--
signal.py
2.44
KB
-rw-r--r--
site.py
22.45
KB
-rw-r--r--
smtpd.py
30.44
KB
-rwxr-xr-x
smtplib.py
44.37
KB
-rwxr-xr-x
sndhdr.py
7.27
KB
-rw-r--r--
socket.py
36.46
KB
-rw-r--r--
socketserver.py
26.94
KB
-rw-r--r--
sre_compile.py
231
B
-rw-r--r--
sre_constants.py
232
B
-rw-r--r--
sre_parse.py
229
B
-rw-r--r--
ssl.py
53.03
KB
-rw-r--r--
stat.py
5.36
KB
-rw-r--r--
statistics.py
46.59
KB
-rw-r--r--
string.py
11.51
KB
-rw-r--r--
stringprep.py
12.61
KB
-rw-r--r--
struct.py
257
B
-rw-r--r--
subprocess.py
86.65
KB
-rw-r--r--
sunau.py
18.05
KB
-rw-r--r--
symtable.py
10.13
KB
-rw-r--r--
sysconfig.py
29.6
KB
-rw-r--r--
tabnanny.py
11.05
KB
-rwxr-xr-x
tarfile.py
103.86
KB
-rwxr-xr-x
telnetlib.py
22.75
KB
-rw-r--r--
tempfile.py
31.13
KB
-rw-r--r--
textwrap.py
19.26
KB
-rw-r--r--
this.py
1003
B
-rw-r--r--
threading.py
56.87
KB
-rw-r--r--
timeit.py
13.21
KB
-rwxr-xr-x
token.py
2.33
KB
-rw-r--r--
tokenize.py
25.72
KB
-rw-r--r--
trace.py
28.51
KB
-rwxr-xr-x
traceback.py
39.6
KB
-rw-r--r--
tracemalloc.py
17.62
KB
-rw-r--r--
tty.py
879
B
-rw-r--r--
types.py
9.83
KB
-rw-r--r--
typing.py
118.12
KB
-rw-r--r--
uu.py
7.17
KB
-rw-r--r--
uuid.py
26.95
KB
-rw-r--r--
warnings.py
20.62
KB
-rw-r--r--
wave.py
21.31
KB
-rw-r--r--
weakref.py
21.01
KB
-rw-r--r--
webbrowser.py
24.56
KB
-rwxr-xr-x
xdrlib.py
5.84
KB
-rw-r--r--
zipapp.py
7.36
KB
-rw-r--r--
zipfile.py
91.46
KB
-rw-r--r--
zipimport.py
30.17
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : graphlib.py
from types import GenericAlias __all__ = ["TopologicalSorter", "CycleError"] _NODE_OUT = -1 _NODE_DONE = -2 class _NodeInfo: __slots__ = "node", "npredecessors", "successors" def __init__(self, node): # The node this class is augmenting. self.node = node # Number of predecessors, generally >= 0. When this value falls to 0, # and is returned by get_ready(), this is set to _NODE_OUT and when the # node is marked done by a call to done(), set to _NODE_DONE. self.npredecessors = 0 # List of successor nodes. The list can contain duplicated elements as # long as they're all reflected in the successor's npredecessors attribute. self.successors = [] class CycleError(ValueError): """Subclass of ValueError raised by TopologicalSorter.prepare if cycles exist in the working graph. If multiple cycles exist, only one undefined choice among them will be reported and included in the exception. The detected cycle can be accessed via the second element in the *args* attribute of the exception instance and consists in a list of nodes, such that each node is, in the graph, an immediate predecessor of the next node in the list. In the reported list, the first and the last node will be the same, to make it clear that it is cyclic. """ pass class TopologicalSorter: """Provides functionality to topologically sort a graph of hashable nodes""" def __init__(self, graph=None): self._node2info = {} self._ready_nodes = None self._npassedout = 0 self._nfinished = 0 if graph is not None: for node, predecessors in graph.items(): self.add(node, *predecessors) def _get_nodeinfo(self, node): if (result := self._node2info.get(node)) is None: self._node2info[node] = result = _NodeInfo(node) return result def add(self, node, *predecessors): """Add a new node and its predecessors to the graph. Both the *node* and all elements in *predecessors* must be hashable. If called multiple times with the same node argument, the set of dependencies will be the union of all dependencies passed in. It is possible to add a node with no dependencies (*predecessors* is not provided) as well as provide a dependency twice. If a node that has not been provided before is included among *predecessors* it will be automatically added to the graph with no predecessors of its own. Raises ValueError if called after "prepare". """ if self._ready_nodes is not None: raise ValueError("Nodes cannot be added after a call to prepare()") # Create the node -> predecessor edges nodeinfo = self._get_nodeinfo(node) nodeinfo.npredecessors += len(predecessors) # Create the predecessor -> node edges for pred in predecessors: pred_info = self._get_nodeinfo(pred) pred_info.successors.append(node) def prepare(self): """Mark the graph as finished and check for cycles in the graph. If any cycle is detected, "CycleError" will be raised, but "get_ready" can still be used to obtain as many nodes as possible until cycles block more progress. After a call to this function, the graph cannot be modified and therefore no more nodes can be added using "add". """ if self._ready_nodes is not None: raise ValueError("cannot prepare() more than once") self._ready_nodes = [ i.node for i in self._node2info.values() if i.npredecessors == 0 ] # ready_nodes is set before we look for cycles on purpose: # if the user wants to catch the CycleError, that's fine, # they can continue using the instance to grab as many # nodes as possible before cycles block more progress cycle = self._find_cycle() if cycle: raise CycleError(f"nodes are in a cycle", cycle) def get_ready(self): """Return a tuple of all the nodes that are ready. Initially it returns all nodes with no predecessors; once those are marked as processed by calling "done", further calls will return all new nodes that have all their predecessors already processed. Once no more progress can be made, empty tuples are returned. Raises ValueError if called without calling "prepare" previously. """ if self._ready_nodes is None: raise ValueError("prepare() must be called first") # Get the nodes that are ready and mark them result = tuple(self._ready_nodes) n2i = self._node2info for node in result: n2i[node].npredecessors = _NODE_OUT # Clean the list of nodes that are ready and update # the counter of nodes that we have returned. self._ready_nodes.clear() self._npassedout += len(result) return result def is_active(self): """Return ``True`` if more progress can be made and ``False`` otherwise. Progress can be made if cycles do not block the resolution and either there are still nodes ready that haven't yet been returned by "get_ready" or the number of nodes marked "done" is less than the number that have been returned by "get_ready". Raises ValueError if called without calling "prepare" previously. """ if self._ready_nodes is None: raise ValueError("prepare() must be called first") return self._nfinished < self._npassedout or bool(self._ready_nodes) def __bool__(self): return self.is_active() def done(self, *nodes): """Marks a set of nodes returned by "get_ready" as processed. This method unblocks any successor of each node in *nodes* for being returned in the future by a call to "get_ready". Raises :exec:`ValueError` if any node in *nodes* has already been marked as processed by a previous call to this method, if a node was not added to the graph by using "add" or if called without calling "prepare" previously or if node has not yet been returned by "get_ready". """ if self._ready_nodes is None: raise ValueError("prepare() must be called first") n2i = self._node2info for node in nodes: # Check if we know about this node (it was added previously using add() if (nodeinfo := n2i.get(node)) is None: raise ValueError(f"node {node!r} was not added using add()") # If the node has not being returned (marked as ready) previously, inform the user. stat = nodeinfo.npredecessors if stat != _NODE_OUT: if stat >= 0: raise ValueError( f"node {node!r} was not passed out (still not ready)" ) elif stat == _NODE_DONE: raise ValueError(f"node {node!r} was already marked done") else: assert False, f"node {node!r}: unknown status {stat}" # Mark the node as processed nodeinfo.npredecessors = _NODE_DONE # Go to all the successors and reduce the number of predecessors, collecting all the ones # that are ready to be returned in the next get_ready() call. for successor in nodeinfo.successors: successor_info = n2i[successor] successor_info.npredecessors -= 1 if successor_info.npredecessors == 0: self._ready_nodes.append(successor) self._nfinished += 1 def _find_cycle(self): n2i = self._node2info stack = [] itstack = [] seen = set() node2stacki = {} for node in n2i: if node in seen: continue while True: if node in seen: # If we have seen already the node and is in the # current stack we have found a cycle. if node in node2stacki: return stack[node2stacki[node] :] + [node] # else go on to get next successor else: seen.add(node) itstack.append(iter(n2i[node].successors).__next__) node2stacki[node] = len(stack) stack.append(node) # Backtrack to the topmost stack entry with # at least another successor. while stack: try: node = itstack[-1]() break except StopIteration: del node2stacki[stack.pop()] itstack.pop() else: break return None def static_order(self): """Returns an iterable of nodes in a topological order. The particular order that is returned may depend on the specific order in which the items were inserted in the graph. Using this method does not require to call "prepare" or "done". If any cycle is detected, :exc:`CycleError` will be raised. """ self.prepare() while self.is_active(): node_group = self.get_ready() yield from node_group self.done(*node_group) __class_getitem__ = classmethod(GenericAlias)
Close