Linux lorencats.com 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l
Apache/2.4.59 (Raspbian)
: 10.0.0.29 | : 216.73.216.130
Cant Read [ /etc/named.conf ]
7.3.31-1~deb10u7
root
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 /
jedi /
evaluate /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
compiled
[ DIR ]
drwxr-xr-x
context
[ DIR ]
drwxr-xr-x
__init__.py
17.11
KB
-rw-r--r--
analysis.py
7.81
KB
-rw-r--r--
arguments.py
11.23
KB
-rw-r--r--
base_context.py
9.42
KB
-rw-r--r--
cache.py
2.43
KB
-rw-r--r--
docstrings.py
10.46
KB
-rw-r--r--
dynamic.py
8.43
KB
-rw-r--r--
filters.py
15.69
KB
-rw-r--r--
finder.py
11.59
KB
-rw-r--r--
flow_analysis.py
4.21
KB
-rw-r--r--
helpers.py
6.88
KB
-rw-r--r--
imports.py
21.75
KB
-rw-r--r--
jedi_typing.py
2.6
KB
-rw-r--r--
lazy_context.py
1.63
KB
-rw-r--r--
param.py
7.74
KB
-rw-r--r--
parser_cache.py
172
B
-rw-r--r--
pep0484.py
11.4
KB
-rw-r--r--
recursion.py
4.17
KB
-rw-r--r--
stdlib.py
11.01
KB
-rw-r--r--
syntax_tree.py
25.63
KB
-rw-r--r--
sys_path.py
8
KB
-rw-r--r--
usages.py
2.33
KB
-rw-r--r--
utils.py
3.48
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : cache.py
""" - the popular ``_memoize_default`` works like a typical memoize and returns the default otherwise. - ``CachedMetaClass`` uses ``_memoize_default`` to do the same with classes. """ _NO_DEFAULT = object() def _memoize_default(default=_NO_DEFAULT, evaluator_is_first_arg=False, second_arg_is_evaluator=False): """ This is a typical memoization decorator, BUT there is one difference: To prevent recursion it sets defaults. Preventing recursion is in this case the much bigger use than speed. I don't think, that there is a big speed difference, but there are many cases where recursion could happen (think about a = b; b = a). """ def func(function): def wrapper(obj, *args, **kwargs): # TODO These checks are kind of ugly and slow. if evaluator_is_first_arg: cache = obj.memoize_cache elif second_arg_is_evaluator: cache = args[0].memoize_cache # needed for meta classes else: cache = obj.evaluator.memoize_cache try: memo = cache[function] except KeyError: memo = {} cache[function] = memo key = (obj, args, frozenset(kwargs.items())) if key in memo: return memo[key] else: if default is not _NO_DEFAULT: memo[key] = default rv = function(obj, *args, **kwargs) memo[key] = rv return rv return wrapper return func def evaluator_function_cache(default=_NO_DEFAULT): def decorator(func): return _memoize_default(default=default, evaluator_is_first_arg=True)(func) return decorator def evaluator_method_cache(default=_NO_DEFAULT): def decorator(func): return _memoize_default(default=default)(func) return decorator def evaluator_as_method_param_cache(): def decorator(call): return _memoize_default(second_arg_is_evaluator=True)(call) return decorator class CachedMetaClass(type): """ This is basically almost the same than the decorator above, it just caches class initializations. Either you do it this way or with decorators, but with decorators you lose class access (isinstance, etc). """ @evaluator_as_method_param_cache() def __call__(self, *args, **kwargs): return super(CachedMetaClass, self).__call__(*args, **kwargs)
Close