Linux vmi2545633.contaboserver.net 6.1.0-32-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.129-1 (2025-03-06) x86_64
Apache/2.4.62 (Debian)
Server IP : 127.0.0.1 & Your IP : 127.0.0.1
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
local /
lib /
python3.11 /
dist-packages /
namex /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxr-xr-x
2025-04-08 17:01
__init__.py
121
B
-rw-r--r--
2025-04-08 17:01
convert.py
2.97
KB
-rw-r--r--
2025-04-08 17:01
export.py
2.17
KB
-rw-r--r--
2025-04-08 17:01
generate.py
5.82
KB
-rw-r--r--
2025-04-08 17:01
Save
Rename
class export: """Decorator to export a public API in a given package. Example usage: ```python @export(package="keras_tuner", path="keras_tuner.applications.HyperResNet") class HyperResNet: ... ``` You can also pass a list of paths as `path`, to make the same symbol visible under various aliases: ```python @export( package="keras_tuner", path=[ "keras_tuner.applications.HyperResNet", "keras_tuner.applications.resnet.HyperResNet", ]) class HyperResNet: ... ``` **Note:** All export packages must start with the package name. Yes, that is redundant, but that is a helpful sanity check. The expectation is that each package will customize `export_api` to provide a default value for `package`, which will serve to validate all `path` values and avoid users inadvertendly ending up with non-exported symbols due to a bad path (e.g. `path="applications.HyperResNet"` instead of `path="keras_tuner.applications.HyperResNet"`). """ def __init__(self, package, path): if isinstance(path, str): export_paths = [path] elif isinstance(path, list): export_paths = path else: raise ValueError( f"Invalid type for `path` argument: " f"Received '{path}' " f"of type {type(path)}" ) for p in export_paths: if not p.startswith(package + "."): raise ValueError( f"All `export_path` values should start with '{package}.'. " f"Received: path={path}" ) self.package = package self.path = path def __call__(self, symbol): if hasattr(symbol, "_api_export_path") and symbol._api_export_symbol_id == id( symbol ): raise ValueError( f"Symbol {symbol} is already exported as '{symbol._api_export_path}'. " f"Cannot also export it to '{self.path}'." ) symbol._api_export_path = self.path symbol._api_export_symbol_id = id(symbol) return symbol