body
stringlengths
26
98.2k
body_hash
int64
-9,222,864,604,528,158,000
9,221,803,474B
docstring
stringlengths
1
16.8k
path
stringlengths
5
230
name
stringlengths
1
96
repository_name
stringlengths
7
89
lang
stringclasses
1 value
body_without_docstring
stringlengths
20
98.2k
def make_catalog_db(catalogitems): 'Takes an array of catalog items and builds some indexes so we can\n get our common data faster. Returns a dict we can use like a database' name_table = {} pkgid_table = {} itemindex = (- 1) for item in catalogitems: itemindex = (itemindex + 1) n...
4,497,944,335,075,595,300
Takes an array of catalog items and builds some indexes so we can get our common data faster. Returns a dict we can use like a database
code/client/munkilib/updatecheck/catalogs.py
make_catalog_db
Artoria2e5/munki
python
def make_catalog_db(catalogitems): 'Takes an array of catalog items and builds some indexes so we can\n get our common data faster. Returns a dict we can use like a database' name_table = {} pkgid_table = {} itemindex = (- 1) for item in catalogitems: itemindex = (itemindex + 1) n...
def add_package_ids(catalogitems, itemname_to_pkgid, pkgid_to_itemname): 'Adds packageids from each catalogitem to two dictionaries.\n One maps itemnames to receipt pkgids, the other maps receipt pkgids\n to itemnames' for item in catalogitems: name = item.get('name') if (not name): ...
-4,838,195,185,309,404,000
Adds packageids from each catalogitem to two dictionaries. One maps itemnames to receipt pkgids, the other maps receipt pkgids to itemnames
code/client/munkilib/updatecheck/catalogs.py
add_package_ids
Artoria2e5/munki
python
def add_package_ids(catalogitems, itemname_to_pkgid, pkgid_to_itemname): 'Adds packageids from each catalogitem to two dictionaries.\n One maps itemnames to receipt pkgids, the other maps receipt pkgids\n to itemnames' for item in catalogitems: name = item.get('name') if (not name): ...
def split_name_and_version(some_string): "Splits a string into the name and version number.\n\n Name and version must be separated with a hyphen ('-')\n or double hyphen ('--').\n 'TextWrangler-2.3b1' becomes ('TextWrangler', '2.3b1')\n 'AdobePhotoshopCS3--11.2.1' becomes ('AdobePhotoshopCS3', '11.2.1')...
-8,237,331,361,948,013,000
Splits a string into the name and version number. Name and version must be separated with a hyphen ('-') or double hyphen ('--'). 'TextWrangler-2.3b1' becomes ('TextWrangler', '2.3b1') 'AdobePhotoshopCS3--11.2.1' becomes ('AdobePhotoshopCS3', '11.2.1') 'MicrosoftOffice2008-12.2.1' becomes ('MicrosoftOffice2008', '12.2...
code/client/munkilib/updatecheck/catalogs.py
split_name_and_version
Artoria2e5/munki
python
def split_name_and_version(some_string): "Splits a string into the name and version number.\n\n Name and version must be separated with a hyphen ('-')\n or double hyphen ('--').\n 'TextWrangler-2.3b1' becomes ('TextWrangler', '2.3b1')\n 'AdobePhotoshopCS3--11.2.1' becomes ('AdobePhotoshopCS3', '11.2.1')...
def get_all_items_with_name(name, cataloglist): 'Searches the catalogs in a list for all items matching a given name.\n\n Returns:\n list of pkginfo items; sorted with newest version first. No precedence\n is given to catalog order.\n ' def item_version(item): 'Returns a MunkiLooseVersi...
6,239,491,405,437,279,000
Searches the catalogs in a list for all items matching a given name. Returns: list of pkginfo items; sorted with newest version first. No precedence is given to catalog order.
code/client/munkilib/updatecheck/catalogs.py
get_all_items_with_name
Artoria2e5/munki
python
def get_all_items_with_name(name, cataloglist): 'Searches the catalogs in a list for all items matching a given name.\n\n Returns:\n list of pkginfo items; sorted with newest version first. No precedence\n is given to catalog order.\n ' def item_version(item): 'Returns a MunkiLooseVersi...
def get_auto_removal_items(installinfo, cataloglist): 'Gets a list of items marked for automatic removal from the catalogs\n in cataloglist. Filters those against items in the processed_installs\n list, which should contain everything that is supposed to be installed.\n Then filters against the removals li...
4,459,911,686,786,282,500
Gets a list of items marked for automatic removal from the catalogs in cataloglist. Filters those against items in the processed_installs list, which should contain everything that is supposed to be installed. Then filters against the removals list, which contains all the removals that have already been processed.
code/client/munkilib/updatecheck/catalogs.py
get_auto_removal_items
Artoria2e5/munki
python
def get_auto_removal_items(installinfo, cataloglist): 'Gets a list of items marked for automatic removal from the catalogs\n in cataloglist. Filters those against items in the processed_installs\n list, which should contain everything that is supposed to be installed.\n Then filters against the removals li...
def look_for_updates(itemname, cataloglist): "Looks for updates for a given manifest item that is either\n installed or scheduled to be installed or removed. This handles not only\n specific application updates, but also updates that aren't simply\n later versions of the manifest item.\n For example, Ad...
6,435,376,517,397,081,000
Looks for updates for a given manifest item that is either installed or scheduled to be installed or removed. This handles not only specific application updates, but also updates that aren't simply later versions of the manifest item. For example, AdobeCameraRaw is an update for Adobe Photoshop, but doesn't update the ...
code/client/munkilib/updatecheck/catalogs.py
look_for_updates
Artoria2e5/munki
python
def look_for_updates(itemname, cataloglist): "Looks for updates for a given manifest item that is either\n installed or scheduled to be installed or removed. This handles not only\n specific application updates, but also updates that aren't simply\n later versions of the manifest item.\n For example, Ad...
def look_for_updates_for_version(itemname, itemversion, cataloglist): 'Looks for updates for a specific version of an item. Since these\n can appear in manifests and pkginfo as item-version or item--version\n we have to search twice.' name_and_version = ('%s-%s' % (itemname, itemversion)) alt_name_and...
7,019,348,813,548,713,000
Looks for updates for a specific version of an item. Since these can appear in manifests and pkginfo as item-version or item--version we have to search twice.
code/client/munkilib/updatecheck/catalogs.py
look_for_updates_for_version
Artoria2e5/munki
python
def look_for_updates_for_version(itemname, itemversion, cataloglist): 'Looks for updates for a specific version of an item. Since these\n can appear in manifests and pkginfo as item-version or item--version\n we have to search twice.' name_and_version = ('%s-%s' % (itemname, itemversion)) alt_name_and...
def best_version_match(vers_num, item_dict): 'Attempts to find the best match in item_dict for vers_num' vers_tuple = vers_num.split('.') precision = 1 while (precision <= len(vers_tuple)): test_vers = '.'.join(vers_tuple[0:precision]) match_names = [] for item in item_dict.keys(...
-552,078,823,119,619,400
Attempts to find the best match in item_dict for vers_num
code/client/munkilib/updatecheck/catalogs.py
best_version_match
Artoria2e5/munki
python
def best_version_match(vers_num, item_dict): vers_tuple = vers_num.split('.') precision = 1 while (precision <= len(vers_tuple)): test_vers = '.'.join(vers_tuple[0:precision]) match_names = [] for item in item_dict.keys(): for item_version in item_dict[item]: ...
@utils.Memoize def analyze_installed_pkgs(): 'Analyze catalog data and installed packages in an attempt to determine\n what is installed.' pkgdata = {} itemname_to_pkgid = {} pkgid_to_itemname = {} for catalogname in _CATALOG: catalogitems = _CATALOG[catalogname]['items'] add_pack...
-5,312,295,383,452,086,000
Analyze catalog data and installed packages in an attempt to determine what is installed.
code/client/munkilib/updatecheck/catalogs.py
analyze_installed_pkgs
Artoria2e5/munki
python
@utils.Memoize def analyze_installed_pkgs(): 'Analyze catalog data and installed packages in an attempt to determine\n what is installed.' pkgdata = {} itemname_to_pkgid = {} pkgid_to_itemname = {} for catalogname in _CATALOG: catalogitems = _CATALOG[catalogname]['items'] add_pack...
def get_item_detail(name, cataloglist, vers='', skip_min_os_check=False, suppress_warnings=False): "Searches the catalogs in list for an item matching the given name that\n can be installed on the current hardware/OS (optionally skipping the\n minimum OS check so we can return an item that requires a higher O...
-1,328,711,189,519,149,000
Searches the catalogs in list for an item matching the given name that can be installed on the current hardware/OS (optionally skipping the minimum OS check so we can return an item that requires a higher OS) If no version is supplied, but the version is appended to the name ('TextWrangler--2.3.0.0.0') that version is...
code/client/munkilib/updatecheck/catalogs.py
get_item_detail
Artoria2e5/munki
python
def get_item_detail(name, cataloglist, vers=, skip_min_os_check=False, suppress_warnings=False): "Searches the catalogs in list for an item matching the given name that\n can be installed on the current hardware/OS (optionally skipping the\n minimum OS check so we can return an item that requires a higher OS)...
def get_catalogs(cataloglist): 'Retrieves the catalogs from the server and populates our catalogs\n dictionary.\n ' for catalogname in cataloglist: if (not (catalogname in _CATALOG)): catalogpath = download.download_catalog(catalogname) if catalogpath: try: ...
2,477,234,418,475,394,600
Retrieves the catalogs from the server and populates our catalogs dictionary.
code/client/munkilib/updatecheck/catalogs.py
get_catalogs
Artoria2e5/munki
python
def get_catalogs(cataloglist): 'Retrieves the catalogs from the server and populates our catalogs\n dictionary.\n ' for catalogname in cataloglist: if (not (catalogname in _CATALOG)): catalogpath = download.download_catalog(catalogname) if catalogpath: try: ...
def clean_up(): 'Removes any catalog files that are no longer in use by this client' catalog_dir = os.path.join(prefs.pref('ManagedInstallDir'), 'catalogs') for item in os.listdir(catalog_dir): if (item not in _CATALOG): os.unlink(os.path.join(catalog_dir, item))
-2,612,927,915,147,749,400
Removes any catalog files that are no longer in use by this client
code/client/munkilib/updatecheck/catalogs.py
clean_up
Artoria2e5/munki
python
def clean_up(): catalog_dir = os.path.join(prefs.pref('ManagedInstallDir'), 'catalogs') for item in os.listdir(catalog_dir): if (item not in _CATALOG): os.unlink(os.path.join(catalog_dir, item))
def catalogs(): 'Returns our internal _CATALOG dict' return _CATALOG
-1,107,014,203,898,371,800
Returns our internal _CATALOG dict
code/client/munkilib/updatecheck/catalogs.py
catalogs
Artoria2e5/munki
python
def catalogs(): return _CATALOG
def item_version(item): 'Returns a MunkiLooseVersion for pkginfo item' return pkgutils.MunkiLooseVersion(item['version'])
5,069,734,528,680,948
Returns a MunkiLooseVersion for pkginfo item
code/client/munkilib/updatecheck/catalogs.py
item_version
Artoria2e5/munki
python
def item_version(item): return pkgutils.MunkiLooseVersion(item['version'])
def munki_version_ok(item): 'Returns a boolean to indicate if the current Munki version is high\n enough to install this item. If not, also adds the failure reason to\n the rejected_items list.' if item.get('minimum_munki_version'): min_munki_vers = item['minimum_munki_version'] di...
-1,973,357,087,770,327,300
Returns a boolean to indicate if the current Munki version is high enough to install this item. If not, also adds the failure reason to the rejected_items list.
code/client/munkilib/updatecheck/catalogs.py
munki_version_ok
Artoria2e5/munki
python
def munki_version_ok(item): 'Returns a boolean to indicate if the current Munki version is high\n enough to install this item. If not, also adds the failure reason to\n the rejected_items list.' if item.get('minimum_munki_version'): min_munki_vers = item['minimum_munki_version'] di...
def os_version_ok(item, skip_min_os_check=False): 'Returns a boolean to indicate if the item is ok to install under\n the current OS. If not, also adds the failure reason to the\n rejected_items list. If skip_min_os_check is True, skips the minimum os\n version check.' if (item.get('minimum...
6,567,157,521,926,049,000
Returns a boolean to indicate if the item is ok to install under the current OS. If not, also adds the failure reason to the rejected_items list. If skip_min_os_check is True, skips the minimum os version check.
code/client/munkilib/updatecheck/catalogs.py
os_version_ok
Artoria2e5/munki
python
def os_version_ok(item, skip_min_os_check=False): 'Returns a boolean to indicate if the item is ok to install under\n the current OS. If not, also adds the failure reason to the\n rejected_items list. If skip_min_os_check is True, skips the minimum os\n version check.' if (item.get('minimum...
def cpu_arch_ok(item): 'Returns a boolean to indicate if the item is ok to install under\n the current CPU architecture. If not, also adds the failure reason to\n the rejected_items list.' if item.get('supported_architectures'): display.display_debug1('Considering item %s, version %s with ...
-7,022,270,190,569,582,000
Returns a boolean to indicate if the item is ok to install under the current CPU architecture. If not, also adds the failure reason to the rejected_items list.
code/client/munkilib/updatecheck/catalogs.py
cpu_arch_ok
Artoria2e5/munki
python
def cpu_arch_ok(item): 'Returns a boolean to indicate if the item is ok to install under\n the current CPU architecture. If not, also adds the failure reason to\n the rejected_items list.' if item.get('supported_architectures'): display.display_debug1('Considering item %s, version %s with ...
def installable_condition_ok(item): 'Returns a boolean to indicate if an installable_condition predicate\n in the current item passes. If not, also adds the failure reason to\n the rejected_items list.' if item.get('installable_condition'): if (not info.predicate_evaluates_as_true(item['in...
-2,771,831,491,757,247,000
Returns a boolean to indicate if an installable_condition predicate in the current item passes. If not, also adds the failure reason to the rejected_items list.
code/client/munkilib/updatecheck/catalogs.py
installable_condition_ok
Artoria2e5/munki
python
def installable_condition_ok(item): 'Returns a boolean to indicate if an installable_condition predicate\n in the current item passes. If not, also adds the failure reason to\n the rejected_items list.' if item.get('installable_condition'): if (not info.predicate_evaluates_as_true(item['in...
@registry.register('A000073') def tribonacci() -> Iterable[int]: 'Tribonacci numbers.' (yield 0) (yield 0) (yield 1) p3: int = 0 p2: int = 0 p1: int = 1 while True: curr: int = ((p1 + p2) + p3) (yield curr) (p1, p2, p3) = (curr, p1, p2)
300,005,145,968,154,100
Tribonacci numbers.
oeis/tribonacci.py
tribonacci
reidhoch/oeis-seq
python
@registry.register('A000073') def tribonacci() -> Iterable[int]: (yield 0) (yield 0) (yield 1) p3: int = 0 p2: int = 0 p1: int = 1 while True: curr: int = ((p1 + p2) + p3) (yield curr) (p1, p2, p3) = (curr, p1, p2)
def set_line(self, line, membership): 'Set whether a given line is a member of the set.' self._lines[line] = membership
-6,751,681,664,870,876,000
Set whether a given line is a member of the set.
pytype/directors.py
set_line
Flameeyes/pytype
python
def set_line(self, line, membership): self._lines[line] = membership
def start_range(self, line, membership): 'Start a range of lines that are either included/excluded from the set.\n\n Args:\n line: A line number.\n membership: If True, lines >= line are included in the set (starting\n a range), otherwise they are excluded (ending a range).\n\n Raises:\n ...
2,535,163,513,588,088,000
Start a range of lines that are either included/excluded from the set. Args: line: A line number. membership: If True, lines >= line are included in the set (starting a range), otherwise they are excluded (ending a range). Raises: ValueError: if line is less than that of a previous call to start_range().
pytype/directors.py
start_range
Flameeyes/pytype
python
def start_range(self, line, membership): 'Start a range of lines that are either included/excluded from the set.\n\n Args:\n line: A line number.\n membership: If True, lines >= line are included in the set (starting\n a range), otherwise they are excluded (ending a range).\n\n Raises:\n ...
def __contains__(self, line): 'Return if a line is a member of the set.' specific = self._lines.get(line) if (specific is not None): return specific pos = bisect.bisect(self._transitions, line) return ((pos % 2) == 1)
-5,524,570,454,118,664,000
Return if a line is a member of the set.
pytype/directors.py
__contains__
Flameeyes/pytype
python
def __contains__(self, line): specific = self._lines.get(line) if (specific is not None): return specific pos = bisect.bisect(self._transitions, line) return ((pos % 2) == 1)
def get_disable_after(self, lineno): 'Get an unclosed disable, if any, that starts after lineno.' if (((len(self._transitions) % 2) == 1) and (self._transitions[(- 1)] >= lineno)): return self._transitions[(- 1)] return None
-8,653,321,035,775,793,000
Get an unclosed disable, if any, that starts after lineno.
pytype/directors.py
get_disable_after
Flameeyes/pytype
python
def get_disable_after(self, lineno): if (((len(self._transitions) % 2) == 1) and (self._transitions[(- 1)] >= lineno)): return self._transitions[(- 1)] return None
def __init__(self, src, errorlog, filename, disable): 'Create a Director for a source file.\n\n Args:\n src: The source text as a string.\n errorlog: An ErrorLog object. Directive errors will be logged to the\n errorlog.\n filename: The name of the source file.\n disable: List of e...
-7,014,119,069,833,995,000
Create a Director for a source file. Args: src: The source text as a string. errorlog: An ErrorLog object. Directive errors will be logged to the errorlog. filename: The name of the source file. disable: List of error messages to always ignore.
pytype/directors.py
__init__
Flameeyes/pytype
python
def __init__(self, src, errorlog, filename, disable): 'Create a Director for a source file.\n\n Args:\n src: The source text as a string.\n errorlog: An ErrorLog object. Directive errors will be logged to the\n errorlog.\n filename: The name of the source file.\n disable: List of e...
def _adjust_type_comments(self, closing_bracket_lines, whitespace_lines): 'Adjust any type comments affected by closing bracket lines.\n\n Lines that contain nothing but closing brackets don\'t appear in the\n bytecode, so for, e.g.,\n v = [\n "hello",\n "world",\n ] # line 4\n lin...
-3,983,367,050,733,600,300
Adjust any type comments affected by closing bracket lines. Lines that contain nothing but closing brackets don't appear in the bytecode, so for, e.g., v = [ "hello", "world", ] # line 4 line 4 is where any type comment for 'v' should be put, but the STORE_NAME opcode for 'v' is at line 3. If we find a ty...
pytype/directors.py
_adjust_type_comments
Flameeyes/pytype
python
def _adjust_type_comments(self, closing_bracket_lines, whitespace_lines): 'Adjust any type comments affected by closing bracket lines.\n\n Lines that contain nothing but closing brackets don\'t appear in the\n bytecode, so for, e.g.,\n v = [\n "hello",\n "world",\n ] # line 4\n lin...
def _parse_source(self, src): 'Parse a source file, extracting directives from comments.' f = moves.StringIO(src) defs_start = None closing_bracket_lines = set() whitespace_lines = set() for (tok, _, start, _, line) in tokenize.generate_tokens(f.readline): (lineno, col) = start i...
-4,893,756,587,152,604,000
Parse a source file, extracting directives from comments.
pytype/directors.py
_parse_source
Flameeyes/pytype
python
def _parse_source(self, src): f = moves.StringIO(src) defs_start = None closing_bracket_lines = set() whitespace_lines = set() for (tok, _, start, _, line) in tokenize.generate_tokens(f.readline): (lineno, col) = start if ((defs_start is None) and _CLASS_OR_FUNC_RE.match(line)):...
def _process_type(self, lineno, code, data, is_nested): 'Process a type: comment.' if ((not code) and is_nested): return if (lineno in self._type_comments): self._errorlog.invalid_directive(self._filename, lineno, 'Multiple type comments on the same line.') if (data == 'ignore'): ...
2,161,644,576,464,778,500
Process a type: comment.
pytype/directors.py
_process_type
Flameeyes/pytype
python
def _process_type(self, lineno, code, data, is_nested): if ((not code) and is_nested): return if (lineno in self._type_comments): self._errorlog.invalid_directive(self._filename, lineno, 'Multiple type comments on the same line.') if (data == 'ignore'): if (not code): ...
def _process_pytype(self, lineno, data, open_ended): 'Process a pytype: comment.' if (not data): raise _DirectiveError('Invalid directive syntax.') for option in data.split(): if (option == 'skip-file'): raise SkipFile() try: (command, values) = option.split('...
821,426,886,601,486,200
Process a pytype: comment.
pytype/directors.py
_process_pytype
Flameeyes/pytype
python
def _process_pytype(self, lineno, data, open_ended): if (not data): raise _DirectiveError('Invalid directive syntax.') for option in data.split(): if (option == 'skip-file'): raise SkipFile() try: (command, values) = option.split('=', 1) values = ...
def should_report_error(self, error): 'Return whether the error should be logged.\n\n This method is suitable for use as an error filter.\n\n Args:\n error: An error._Error object.\n\n Returns:\n True iff the error should be included in the log.\n ' if ((error.filename != self._filename) o...
-4,967,645,690,361,252,000
Return whether the error should be logged. This method is suitable for use as an error filter. Args: error: An error._Error object. Returns: True iff the error should be included in the log.
pytype/directors.py
should_report_error
Flameeyes/pytype
python
def should_report_error(self, error): 'Return whether the error should be logged.\n\n This method is suitable for use as an error filter.\n\n Args:\n error: An error._Error object.\n\n Returns:\n True iff the error should be included in the log.\n ' if ((error.filename != self._filename) o...
def _create_label(self, kg: KG, vertex: Vertex, n: int) -> str: 'Creates a label according to a vertex and its neighbors.\n\n kg: The Knowledge Graph.\n\n The graph from which the neighborhoods are extracted for the\n provided entities.\n vertex: The vertex to get its neighbors t...
-926,188,340,973,383,600
Creates a label according to a vertex and its neighbors. kg: The Knowledge Graph. The graph from which the neighborhoods are extracted for the provided entities. vertex: The vertex to get its neighbors to create the suffix. n: The index of the neighbor Returns: the label created for the vertex.
pyrdf2vec/walkers/weisfeiler_lehman.py
_create_label
vishalbelsare/pyRDF2Vec
python
def _create_label(self, kg: KG, vertex: Vertex, n: int) -> str: 'Creates a label according to a vertex and its neighbors.\n\n kg: The Knowledge Graph.\n\n The graph from which the neighborhoods are extracted for the\n provided entities.\n vertex: The vertex to get its neighbors t...
def _weisfeiler_lehman(self, kg: KG) -> None: 'Performs Weisfeiler-Lehman relabeling of the vertices.\n\n Args:\n kg: The Knowledge Graph.\n\n The graph from which the neighborhoods are extracted for the\n provided entities.\n\n ' for vertex in kg._vertices...
3,049,563,729,577,228,000
Performs Weisfeiler-Lehman relabeling of the vertices. Args: kg: The Knowledge Graph. The graph from which the neighborhoods are extracted for the provided entities.
pyrdf2vec/walkers/weisfeiler_lehman.py
_weisfeiler_lehman
vishalbelsare/pyRDF2Vec
python
def _weisfeiler_lehman(self, kg: KG) -> None: 'Performs Weisfeiler-Lehman relabeling of the vertices.\n\n Args:\n kg: The Knowledge Graph.\n\n The graph from which the neighborhoods are extracted for the\n provided entities.\n\n ' for vertex in kg._vertices...
def extract(self, kg: KG, entities: Entities, verbose: int=0) -> List[List[SWalk]]: 'Fits the provided sampling strategy and then calls the\n private _extract method that is implemented for each of the\n walking strategies.\n\n Args:\n kg: The Knowledge Graph.\n entities: ...
8,135,408,716,254,422,000
Fits the provided sampling strategy and then calls the private _extract method that is implemented for each of the walking strategies. Args: kg: The Knowledge Graph. entities: The entities to be extracted from the Knowledge Graph. verbose: The verbosity level. 0: does not display anything; ...
pyrdf2vec/walkers/weisfeiler_lehman.py
extract
vishalbelsare/pyRDF2Vec
python
def extract(self, kg: KG, entities: Entities, verbose: int=0) -> List[List[SWalk]]: 'Fits the provided sampling strategy and then calls the\n private _extract method that is implemented for each of the\n walking strategies.\n\n Args:\n kg: The Knowledge Graph.\n entities: ...
def _map_wl(self, entity: Vertex, pos: int, n: int) -> str: 'Maps certain vertices to MD5 hashes to save memory. For entities of\n interest (provided by the user to the extract function) and predicates,\n the string representation is kept.\n\n Args:\n entity: The entity to be mapped....
2,031,195,953,491,032,300
Maps certain vertices to MD5 hashes to save memory. For entities of interest (provided by the user to the extract function) and predicates, the string representation is kept. Args: entity: The entity to be mapped. pos: The position of the entity in the walk. n: The iteration number of the WL algorithm. Re...
pyrdf2vec/walkers/weisfeiler_lehman.py
_map_wl
vishalbelsare/pyRDF2Vec
python
def _map_wl(self, entity: Vertex, pos: int, n: int) -> str: 'Maps certain vertices to MD5 hashes to save memory. For entities of\n interest (provided by the user to the extract function) and predicates,\n the string representation is kept.\n\n Args:\n entity: The entity to be mapped....
def _extract(self, kg: KG, entity: Vertex) -> EntityWalks: 'Extracts random walks for an entity based on a Knowledge Graph.\n\n Args:\n kg: The Knowledge Graph.\n entity: The root node to extract walks.\n\n Returns:\n A dictionary having the entity as key and a list of...
-9,107,139,105,087,989,000
Extracts random walks for an entity based on a Knowledge Graph. Args: kg: The Knowledge Graph. entity: The root node to extract walks. Returns: A dictionary having the entity as key and a list of tuples as value corresponding to the extracted walks.
pyrdf2vec/walkers/weisfeiler_lehman.py
_extract
vishalbelsare/pyRDF2Vec
python
def _extract(self, kg: KG, entity: Vertex) -> EntityWalks: 'Extracts random walks for an entity based on a Knowledge Graph.\n\n Args:\n kg: The Knowledge Graph.\n entity: The root node to extract walks.\n\n Returns:\n A dictionary having the entity as key and a list of...
def csbal_process(): '\n This method is run when the `csbal` script is called.\n can be used to check a single file (check balance state after adjusting)\n args are file stem, freq (Hz [rpm/60] float), samp_rate (data collector)\n ' args = sys.argv[1:] stem = args[0] freq = float(args[1]) ...
4,217,561,701,050,841,000
This method is run when the `csbal` script is called. can be used to check a single file (check balance state after adjusting) args are file stem, freq (Hz [rpm/60] float), samp_rate (data collector)
cheapskate_bal/cheapskate_bal/cli.py
csbal_process
kevinpowell/balancer
python
def csbal_process(): '\n This method is run when the `csbal` script is called.\n can be used to check a single file (check balance state after adjusting)\n args are file stem, freq (Hz [rpm/60] float), samp_rate (data collector)\n ' args = sys.argv[1:] stem = args[0] freq = float(args[1]) ...
def csbal_single(): '\n This method performs the whole process for a single plane balance\n Four data files are captured, and the results are emitted\n args are file stem, freq(Hz), shift angle of test mass (deg), test mass ' args = sys.argv[1:] if (len(args) < 4): print('args are stem, fre...
-2,981,180,016,032,641,000
This method performs the whole process for a single plane balance Four data files are captured, and the results are emitted args are file stem, freq(Hz), shift angle of test mass (deg), test mass
cheapskate_bal/cheapskate_bal/cli.py
csbal_single
kevinpowell/balancer
python
def csbal_single(): '\n This method performs the whole process for a single plane balance\n Four data files are captured, and the results are emitted\n args are file stem, freq(Hz), shift angle of test mass (deg), test mass ' args = sys.argv[1:] if (len(args) < 4): print('args are stem, fre...
def csbal_dual_init(): '\n THis method performs the whole process for a dual plane balance\n Three files are captured and the results are emitted\n args are file stem, freq(Hz), shift angle of test mass (deg), test mass ' args = sys.argv[1:] if (len(args) < 4): print('args are stem, freq, s...
4,723,339,305,924,539,000
THis method performs the whole process for a dual plane balance Three files are captured and the results are emitted args are file stem, freq(Hz), shift angle of test mass (deg), test mass
cheapskate_bal/cheapskate_bal/cli.py
csbal_dual_init
kevinpowell/balancer
python
def csbal_dual_init(): '\n THis method performs the whole process for a dual plane balance\n Three files are captured and the results are emitted\n args are file stem, freq(Hz), shift angle of test mass (deg), test mass ' args = sys.argv[1:] if (len(args) < 4): print('args are stem, freq, s...
def csbal_dual_iter(): '\n This method performs an iteration of dual plane balance, once the\n influence params are known. One file is captured and the results\n are emitted\n args are file stem, tag, freq\n ' args = sys.argv[1:] if (len(args) < 3): print('args are: filestem, tag, fr...
8,211,429,376,707,480,000
This method performs an iteration of dual plane balance, once the influence params are known. One file is captured and the results are emitted args are file stem, tag, freq
cheapskate_bal/cheapskate_bal/cli.py
csbal_dual_iter
kevinpowell/balancer
python
def csbal_dual_iter(): '\n This method performs an iteration of dual plane balance, once the\n influence params are known. One file is captured and the results\n are emitted\n args are file stem, tag, freq\n ' args = sys.argv[1:] if (len(args) < 3): print('args are: filestem, tag, fr...
def prepare_package(err, path, expectation=0, for_appversions=None, timeout=(- 1)): 'Prepares a file-based package for validation.\n\n timeout is the number of seconds before validation is aborted.\n If timeout is -1 then no timeout checking code will run.\n ' package = None try: if (not os...
4,124,246,953,156,577,000
Prepares a file-based package for validation. timeout is the number of seconds before validation is aborted. If timeout is -1 then no timeout checking code will run.
validator/submain.py
prepare_package
kumar303/amo-validator
python
def prepare_package(err, path, expectation=0, for_appversions=None, timeout=(- 1)): 'Prepares a file-based package for validation.\n\n timeout is the number of seconds before validation is aborted.\n If timeout is -1 then no timeout checking code will run.\n ' package = None try: if (not os...
def test_search(err, package, expectation=0): 'Tests the package to see if it is a search provider.' expected_search_provider = (expectation in (PACKAGE_ANY, PACKAGE_SEARCHPROV)) if (not expected_search_provider): return err.warning(('main', 'test_search', 'extension'), 'Unexpected file extension.')...
3,807,156,908,103,187,000
Tests the package to see if it is a search provider.
validator/submain.py
test_search
kumar303/amo-validator
python
def test_search(err, package, expectation=0): expected_search_provider = (expectation in (PACKAGE_ANY, PACKAGE_SEARCHPROV)) if (not expected_search_provider): return err.warning(('main', 'test_search', 'extension'), 'Unexpected file extension.') detect_opensearch(err, package, listed=err.get_re...
def test_package(err, file_, name, expectation=PACKAGE_ANY, for_appversions=None): 'Begins tests for the package.' try: package = XPIManager(file_, mode='r', name=name) has_package_json = ('package.json' in package) has_manifest_json = ('manifest.json' in package) has_install_rdf...
-6,450,757,682,280,588,000
Begins tests for the package.
validator/submain.py
test_package
kumar303/amo-validator
python
def test_package(err, file_, name, expectation=PACKAGE_ANY, for_appversions=None): try: package = XPIManager(file_, mode='r', name=name) has_package_json = ('package.json' in package) has_manifest_json = ('manifest.json' in package) has_install_rdf = ('install.rdf' in package) ...
def populate_chrome_manifest(err, xpi_package): "Loads the chrome.manifest if it's present" if ('chrome.manifest' in xpi_package): chrome_data = xpi_package.read('chrome.manifest') chrome = ChromeManifest(chrome_data, 'chrome.manifest') chrome_recursion_buster = set() def get_li...
3,416,004,744,526,102,000
Loads the chrome.manifest if it's present
validator/submain.py
populate_chrome_manifest
kumar303/amo-validator
python
def populate_chrome_manifest(err, xpi_package): if ('chrome.manifest' in xpi_package): chrome_data = xpi_package.read('chrome.manifest') chrome = ChromeManifest(chrome_data, 'chrome.manifest') chrome_recursion_buster = set() def get_linked_manifest(path, from_path, from_chrome,...
def test_inner_package(err, xpi_package, for_appversions=None): "Tests a package's inner content." populate_chrome_manifest(err, xpi_package) for tier in sorted(decorator.get_tiers()): err.set_tier(tier) for test in decorator.get_tests(tier, err.detected_type): if (test['versions...
3,624,565,051,179,548,000
Tests a package's inner content.
validator/submain.py
test_inner_package
kumar303/amo-validator
python
def test_inner_package(err, xpi_package, for_appversions=None): populate_chrome_manifest(err, xpi_package) for tier in sorted(decorator.get_tiers()): err.set_tier(tier) for test in decorator.get_tests(tier, err.detected_type): if (test['versions'] is not None): i...
def Main(): 'The main program function.\n\n Returns:\n bool: True if successful or False if not.\n ' argument_parser = argparse.ArgumentParser(description='Extracts information from BSM event auditing files.') argument_parser.add_argument('-d', '--debug', dest='debug', action='store_true', default=Fals...
-7,459,887,251,937,730,000
The main program function. Returns: bool: True if successful or False if not.
scripts/bsm.py
Main
jleaniz/dtformats
python
def Main(): 'The main program function.\n\n Returns:\n bool: True if successful or False if not.\n ' argument_parser = argparse.ArgumentParser(description='Extracts information from BSM event auditing files.') argument_parser.add_argument('-d', '--debug', dest='debug', action='store_true', default=Fals...
def annuli_around(region, inner_factor, outer_factor, header, x_size, y_size): '\n This function ...\n :param region:\n :param inner_factor:\n :param outer_factor:\n :param header:\n :param x_size:\n :param y_size:\n :return:\n ' inner_region = regions.expand(region, inner_factor) ...
-1,261,848,470,547,287,000
This function ... :param region: :param inner_factor: :param outer_factor: :param header: :param x_size: :param y_size: :return:
CAAPR/CAAPR_AstroMagic/PTS/pts/magic/tools/masks.py
annuli_around
Stargrazer82301/CAAPR
python
def annuli_around(region, inner_factor, outer_factor, header, x_size, y_size): '\n This function ...\n :param region:\n :param inner_factor:\n :param outer_factor:\n :param header:\n :param x_size:\n :param y_size:\n :return:\n ' inner_region = regions.expand(region, inner_factor) ...
def masked_outside(region, header, x_size, y_size, expand_factor=1.0): '\n This function ...\n :param region:\n :param header:\n :param x_size:\n :param y_size:\n :param expand_factor:\n :return:\n ' region = regions.expand(region, factor=expand_factor) mask = np.logical_not(regions....
1,645,701,534,307,375,000
This function ... :param region: :param header: :param x_size: :param y_size: :param expand_factor: :return:
CAAPR/CAAPR_AstroMagic/PTS/pts/magic/tools/masks.py
masked_outside
Stargrazer82301/CAAPR
python
def masked_outside(region, header, x_size, y_size, expand_factor=1.0): '\n This function ...\n :param region:\n :param header:\n :param x_size:\n :param y_size:\n :param expand_factor:\n :return:\n ' region = regions.expand(region, factor=expand_factor) mask = np.logical_not(regions....
def create_disk_mask(x_size, y_size, x_center, y_center, radius): '\n This function ...\n :param x_size:\n :param y_size:\n :param x_center:\n :param y_center:\n :param radius:\n :return:\n ' (y, x) = np.ogrid[(- y_center):(y_size - y_center), (- x_center):(x_size - x_center)] mask =...
-2,308,099,002,475,903,500
This function ... :param x_size: :param y_size: :param x_center: :param y_center: :param radius: :return:
CAAPR/CAAPR_AstroMagic/PTS/pts/magic/tools/masks.py
create_disk_mask
Stargrazer82301/CAAPR
python
def create_disk_mask(x_size, y_size, x_center, y_center, radius): '\n This function ...\n :param x_size:\n :param y_size:\n :param x_center:\n :param y_center:\n :param radius:\n :return:\n ' (y, x) = np.ogrid[(- y_center):(y_size - y_center), (- x_center):(x_size - x_center)] mask =...
def union(mask_a, mask_b): '\n This function ...\n :param args:\n :return:\n ' return (mask_a + mask_b)
-4,128,617,534,399,295,500
This function ... :param args: :return:
CAAPR/CAAPR_AstroMagic/PTS/pts/magic/tools/masks.py
union
Stargrazer82301/CAAPR
python
def union(mask_a, mask_b): '\n This function ...\n :param args:\n :return:\n ' return (mask_a + mask_b)
def intersection(mask_a, mask_b): '\n This function ...\n :param args:\n :return:\n ' return (mask_a * mask_b)
-3,610,174,022,581,261,300
This function ... :param args: :return:
CAAPR/CAAPR_AstroMagic/PTS/pts/magic/tools/masks.py
intersection
Stargrazer82301/CAAPR
python
def intersection(mask_a, mask_b): '\n This function ...\n :param args:\n :return:\n ' return (mask_a * mask_b)
def overlap(mask_a, mask_b): '\n This function ...\n :param mask_a:\n :param mask_b:\n :return:\n ' return np.any(intersection(mask_a, mask_b))
-6,524,343,050,101,109,000
This function ... :param mask_a: :param mask_b: :return:
CAAPR/CAAPR_AstroMagic/PTS/pts/magic/tools/masks.py
overlap
Stargrazer82301/CAAPR
python
def overlap(mask_a, mask_b): '\n This function ...\n :param mask_a:\n :param mask_b:\n :return:\n ' return np.any(intersection(mask_a, mask_b))
def split_overlap(base_mask, test_mask, return_segments=False): '\n This function takes all blobs in the base_mask and checks whether they overlap with the test_mask.\n The function returns two new masks, one mask with all the blobs that overlapped, and another with the blobs\n that did not overlap.\n :...
8,212,150,702,368,379,000
This function takes all blobs in the base_mask and checks whether they overlap with the test_mask. The function returns two new masks, one mask with all the blobs that overlapped, and another with the blobs that did not overlap. :param base_mask: :param test_mask: :return:
CAAPR/CAAPR_AstroMagic/PTS/pts/magic/tools/masks.py
split_overlap
Stargrazer82301/CAAPR
python
def split_overlap(base_mask, test_mask, return_segments=False): '\n This function takes all blobs in the base_mask and checks whether they overlap with the test_mask.\n The function returns two new masks, one mask with all the blobs that overlapped, and another with the blobs\n that did not overlap.\n :...
def wrap_check_policy(func): 'Check policy corresponding to the wrapped methods prior to execution\n\n This decorator requires the first 3 args of the wrapped function\n to be (self, context, volume)\n ' @functools.wraps(func) def wrapped(self, context, target_obj, *args, **kwargs): check_...
2,356,297,874,592,871,000
Check policy corresponding to the wrapped methods prior to execution This decorator requires the first 3 args of the wrapped function to be (self, context, volume)
cinder/volume/api.py
wrap_check_policy
CiscoSystems/cinder-old
python
def wrap_check_policy(func): 'Check policy corresponding to the wrapped methods prior to execution\n\n This decorator requires the first 3 args of the wrapped function\n to be (self, context, volume)\n ' @functools.wraps(func) def wrapped(self, context, target_obj, *args, **kwargs): check_...
def remove_from_compute(self, context, volume, instance_id, host): 'Remove volume from specified compute host.' rpc.call(context, rpc.queue_get_for(context, FLAGS.compute_topic, host), {'method': 'remove_volume_connection', 'args': {'instance_id': instance_id, 'volume_id': volume['id']}})
-6,526,975,400,008,303,000
Remove volume from specified compute host.
cinder/volume/api.py
remove_from_compute
CiscoSystems/cinder-old
python
def remove_from_compute(self, context, volume, instance_id, host): rpc.call(context, rpc.queue_get_for(context, FLAGS.compute_topic, host), {'method': 'remove_volume_connection', 'args': {'instance_id': instance_id, 'volume_id': volume['id']}})
@wrap_check_policy def get_volume_metadata(self, context, volume): 'Get all metadata associated with a volume.' rv = self.db.volume_metadata_get(context, volume['id']) return dict(rv.iteritems())
5,805,609,976,959,036,000
Get all metadata associated with a volume.
cinder/volume/api.py
get_volume_metadata
CiscoSystems/cinder-old
python
@wrap_check_policy def get_volume_metadata(self, context, volume): rv = self.db.volume_metadata_get(context, volume['id']) return dict(rv.iteritems())
@wrap_check_policy def delete_volume_metadata(self, context, volume, key): 'Delete the given metadata item from an volume.' self.db.volume_metadata_delete(context, volume['id'], key)
-1,655,074,085,884,326,100
Delete the given metadata item from an volume.
cinder/volume/api.py
delete_volume_metadata
CiscoSystems/cinder-old
python
@wrap_check_policy def delete_volume_metadata(self, context, volume, key): self.db.volume_metadata_delete(context, volume['id'], key)
@wrap_check_policy def update_volume_metadata(self, context, volume, metadata, delete=False): 'Updates or creates volume metadata.\n\n If delete is True, metadata items that are not specified in the\n `metadata` argument will be deleted.\n\n ' if delete: _metadata = metadata els...
-3,966,998,166,392,626,000
Updates or creates volume metadata. If delete is True, metadata items that are not specified in the `metadata` argument will be deleted.
cinder/volume/api.py
update_volume_metadata
CiscoSystems/cinder-old
python
@wrap_check_policy def update_volume_metadata(self, context, volume, metadata, delete=False): 'Updates or creates volume metadata.\n\n If delete is True, metadata items that are not specified in the\n `metadata` argument will be deleted.\n\n ' if delete: _metadata = metadata els...
def get_volume_metadata_value(self, volume, key): 'Get value of particular metadata key.' metadata = volume.get('volume_metadata') if metadata: for i in volume['volume_metadata']: if (i['key'] == key): return i['value'] return None
-8,077,658,148,052,221,000
Get value of particular metadata key.
cinder/volume/api.py
get_volume_metadata_value
CiscoSystems/cinder-old
python
def get_volume_metadata_value(self, volume, key): metadata = volume.get('volume_metadata') if metadata: for i in volume['volume_metadata']: if (i['key'] == key): return i['value'] return None
def _check_volume_availability(self, context, volume, force): 'Check if the volume can be used.' if (volume['status'] not in ['available', 'in-use']): msg = _('Volume status must be available/in-use.') raise exception.InvalidVolume(reason=msg) if ((not force) and ('in-use' == volume['status'...
5,035,103,438,389,566,000
Check if the volume can be used.
cinder/volume/api.py
_check_volume_availability
CiscoSystems/cinder-old
python
def _check_volume_availability(self, context, volume, force): if (volume['status'] not in ['available', 'in-use']): msg = _('Volume status must be available/in-use.') raise exception.InvalidVolume(reason=msg) if ((not force) and ('in-use' == volume['status'])): msg = _('Volume statu...
@wrap_check_policy def copy_volume_to_image(self, context, volume, metadata, force): 'Create a new image from the specified volume.' self._check_volume_availability(context, volume, force) recv_metadata = self.image_service.create(context, metadata) self.update(context, volume, {'status': 'uploading'}) ...
-7,635,538,943,194,196,000
Create a new image from the specified volume.
cinder/volume/api.py
copy_volume_to_image
CiscoSystems/cinder-old
python
@wrap_check_policy def copy_volume_to_image(self, context, volume, metadata, force): self._check_volume_availability(context, volume, force) recv_metadata = self.image_service.create(context, metadata) self.update(context, volume, {'status': 'uploading'}) rpc.cast(context, rpc.queue_get_for(context...
def show_mri_sample(sample, pred_mask=None, pred_lbl=None, seg_downsample=None, save_fn=None): ' Plot sample in three projections ' plt.close('all') alpha = 0.5 image_alpha = 1.0 ims = sample['image'].numpy() means = sample['mean'].numpy() stds = sample['std'].numpy() segs = (sample['seg...
4,095,470,176,055,205,000
Plot sample in three projections
src/seg_model_utils/visualization.py
show_mri_sample
jpjuvo/RSNA-MICCAI-Brain-Tumor-Classification
python
def show_mri_sample(sample, pred_mask=None, pred_lbl=None, seg_downsample=None, save_fn=None): ' ' plt.close('all') alpha = 0.5 image_alpha = 1.0 ims = sample['image'].numpy() means = sample['mean'].numpy() stds = sample['std'].numpy() segs = (sample['segmentation'].numpy() if ('segment...
def date_to_int(self, dates): "\n calculates number of days between 01/01/0001 and each date in dates\n date has format '%m/%d/%Y'\n\n :param dates: Pandas Series\n :return: list\n " ret = [] for date in dates: date0 = datetime.datetime(year=1, month=1, day=1) ...
-6,971,423,626,463,422,000
calculates number of days between 01/01/0001 and each date in dates date has format '%m/%d/%Y' :param dates: Pandas Series :return: list
backend/data_merge.py
date_to_int
repeating/stock-analyzer
python
def date_to_int(self, dates): "\n calculates number of days between 01/01/0001 and each date in dates\n date has format '%m/%d/%Y'\n\n :param dates: Pandas Series\n :return: list\n " ret = [] for date in dates: date0 = datetime.datetime(year=1, month=1, day=1) ...
def _get_args(info): 'Return the list of args & kwds for building the __init__ function' required = set() kwds = set() invalid_kwds = set() if info.is_allOf(): arginfo = [_get_args(child) for child in info.allOf] nonkeyword = all((args[0] for args in arginfo)) required = set....
962,504,644,605,657,200
Return the list of args & kwds for building the __init__ function
tools/schemapi/codegen.py
_get_args
aladdingsw/altair
python
def _get_args(info): required = set() kwds = set() invalid_kwds = set() if info.is_allOf(): arginfo = [_get_args(child) for child in info.allOf] nonkeyword = all((args[0] for args in arginfo)) required = set.union(set(), *(args[1] for args in arginfo)) kwds = set.uni...
def schema_class(self): 'Generate code for a schema class' rootschema = (self.rootschema if (self.rootschema is not None) else self.schema) schemarepr = (self.schemarepr if (self.schemarepr is not None) else self.schema) rootschemarepr = self.rootschemarepr if (rootschemarepr is None): if (r...
2,319,359,880,158,826,000
Generate code for a schema class
tools/schemapi/codegen.py
schema_class
aladdingsw/altair
python
def schema_class(self): rootschema = (self.rootschema if (self.rootschema is not None) else self.schema) schemarepr = (self.schemarepr if (self.schemarepr is not None) else self.schema) rootschemarepr = self.rootschemarepr if (rootschemarepr is None): if (rootschema is self.schema): ...
def init_code(self, indent=0): 'Return code suitablde for the __init__ function of a Schema class' info = SchemaInfo(self.schema, rootschema=self.rootschema) (nonkeyword, required, kwds, invalid_kwds, additional) = _get_args(info) nodefault = set(self.nodefault) required -= nodefault kwds -= nod...
7,375,621,453,165,764,000
Return code suitablde for the __init__ function of a Schema class
tools/schemapi/codegen.py
init_code
aladdingsw/altair
python
def init_code(self, indent=0): info = SchemaInfo(self.schema, rootschema=self.rootschema) (nonkeyword, required, kwds, invalid_kwds, additional) = _get_args(info) nodefault = set(self.nodefault) required -= nodefault kwds -= nodefault args = ['self'] super_args = [] if nodefault: ...
@cached_property def openapi_types(): '\n This must be a method because a model may have properties that are\n of type self, this must run after the class is loaded\n\n Returns\n openapi_types (dict): The key is attribute name\n and the value is attribute type.\n ...
3,202,055,015,200,675,300
This must be a method because a model may have properties that are of type self, this must run after the class is loaded Returns openapi_types (dict): The key is attribute name and the value is attribute type.
datameta_client_lib/model/staged_meta_data_sets.py
openapi_types
ghga-de/datameta-client-lib
python
@cached_property def openapi_types(): '\n This must be a method because a model may have properties that are\n of type self, this must run after the class is loaded\n\n Returns\n openapi_types (dict): The key is attribute name\n and the value is attribute type.\n ...
@convert_js_args_to_python_args def __init__(self, metadataset_ids, *args, **kwargs): 'StagedMetaDataSets - a model defined in OpenAPI\n\n Args:\n metadataset_ids ([str]):\n\n Keyword Args:\n _check_type (bool): if True, values for parameters in openapi_types\n ...
-4,712,968,294,148,478,000
StagedMetaDataSets - a model defined in OpenAPI Args: metadataset_ids ([str]): Keyword Args: _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. ...
datameta_client_lib/model/staged_meta_data_sets.py
__init__
ghga-de/datameta-client-lib
python
@convert_js_args_to_python_args def __init__(self, metadataset_ids, *args, **kwargs): 'StagedMetaDataSets - a model defined in OpenAPI\n\n Args:\n metadataset_ids ([str]):\n\n Keyword Args:\n _check_type (bool): if True, values for parameters in openapi_types\n ...
def __init__(self, alpha, beta, validate_args=True, allow_nan_stats=False, name='Gamma'): 'Construct Gamma distributions with parameters `alpha` and `beta`.\n\n The parameters `alpha` and `beta` must be shaped in a way that supports\n broadcasting (e.g. `alpha + beta` is a valid operation).\n\n Args:\n ...
8,342,424,512,551,853,000
Construct Gamma distributions with parameters `alpha` and `beta`. The parameters `alpha` and `beta` must be shaped in a way that supports broadcasting (e.g. `alpha + beta` is a valid operation). Args: alpha: Floating point tensor, the shape params of the distribution(s). alpha must contain only positive val...
tensorflow/contrib/distributions/python/ops/gamma.py
__init__
enrewen1/tf
python
def __init__(self, alpha, beta, validate_args=True, allow_nan_stats=False, name='Gamma'): 'Construct Gamma distributions with parameters `alpha` and `beta`.\n\n The parameters `alpha` and `beta` must be shaped in a way that supports\n broadcasting (e.g. `alpha + beta` is a valid operation).\n\n Args:\n ...
@property def allow_nan_stats(self): 'Boolean describing behavior when a stat is undefined for batch member.' return self._allow_nan_stats
-6,998,151,567,754,223,000
Boolean describing behavior when a stat is undefined for batch member.
tensorflow/contrib/distributions/python/ops/gamma.py
allow_nan_stats
enrewen1/tf
python
@property def allow_nan_stats(self): return self._allow_nan_stats
@property def validate_args(self): 'Boolean describing behavior on invalid input.' return self._validate_args
-1,579,648,302,353,013,800
Boolean describing behavior on invalid input.
tensorflow/contrib/distributions/python/ops/gamma.py
validate_args
enrewen1/tf
python
@property def validate_args(self): return self._validate_args
@property def name(self): 'Name to prepend to all ops.' return self._name
-1,989,245,888,842,757,000
Name to prepend to all ops.
tensorflow/contrib/distributions/python/ops/gamma.py
name
enrewen1/tf
python
@property def name(self): return self._name
@property def dtype(self): 'dtype of samples from this distribution.' return self._alpha.dtype
-6,171,087,007,865,193,000
dtype of samples from this distribution.
tensorflow/contrib/distributions/python/ops/gamma.py
dtype
enrewen1/tf
python
@property def dtype(self): return self._alpha.dtype
@property def alpha(self): 'Shape parameter.' return self._alpha
-6,876,081,743,250,618,000
Shape parameter.
tensorflow/contrib/distributions/python/ops/gamma.py
alpha
enrewen1/tf
python
@property def alpha(self): return self._alpha
@property def beta(self): 'Inverse scale parameter.' return self._beta
-8,770,863,598,163,808,000
Inverse scale parameter.
tensorflow/contrib/distributions/python/ops/gamma.py
beta
enrewen1/tf
python
@property def beta(self): return self._beta
def batch_shape(self, name='batch_shape'): 'Batch dimensions of this instance as a 1-D int32 `Tensor`.\n\n The product of the dimensions of the `batch_shape` is the number of\n independent distributions of this kind the instance represents.\n\n Args:\n name: name to give to the op\n\n Returns:\n ...
-794,722,025,407,041,500
Batch dimensions of this instance as a 1-D int32 `Tensor`. The product of the dimensions of the `batch_shape` is the number of independent distributions of this kind the instance represents. Args: name: name to give to the op Returns: `Tensor` `batch_shape`
tensorflow/contrib/distributions/python/ops/gamma.py
batch_shape
enrewen1/tf
python
def batch_shape(self, name='batch_shape'): 'Batch dimensions of this instance as a 1-D int32 `Tensor`.\n\n The product of the dimensions of the `batch_shape` is the number of\n independent distributions of this kind the instance represents.\n\n Args:\n name: name to give to the op\n\n Returns:\n ...
def get_batch_shape(self): '`TensorShape` available at graph construction time.\n\n Same meaning as `batch_shape`. May be only partially defined.\n\n Returns:\n `TensorShape` object.\n ' return self._get_batch_shape
-6,757,097,947,968,199,000
`TensorShape` available at graph construction time. Same meaning as `batch_shape`. May be only partially defined. Returns: `TensorShape` object.
tensorflow/contrib/distributions/python/ops/gamma.py
get_batch_shape
enrewen1/tf
python
def get_batch_shape(self): '`TensorShape` available at graph construction time.\n\n Same meaning as `batch_shape`. May be only partially defined.\n\n Returns:\n `TensorShape` object.\n ' return self._get_batch_shape
def event_shape(self, name='event_shape'): 'Shape of a sample from a single distribution as a 1-D int32 `Tensor`.\n\n Args:\n name: name to give to the op\n\n Returns:\n `Tensor` `event_shape`\n ' with ops.name_scope(self.name): with ops.name_scope(name): return constant_o...
8,889,442,052,272,346,000
Shape of a sample from a single distribution as a 1-D int32 `Tensor`. Args: name: name to give to the op Returns: `Tensor` `event_shape`
tensorflow/contrib/distributions/python/ops/gamma.py
event_shape
enrewen1/tf
python
def event_shape(self, name='event_shape'): 'Shape of a sample from a single distribution as a 1-D int32 `Tensor`.\n\n Args:\n name: name to give to the op\n\n Returns:\n `Tensor` `event_shape`\n ' with ops.name_scope(self.name): with ops.name_scope(name): return constant_o...
def get_event_shape(self): '`TensorShape` available at graph construction time.\n\n Same meaning as `event_shape`. May be only partially defined.\n\n Returns:\n `TensorShape` object.\n ' return self._get_event_shape
-1,408,605,194,796,173,800
`TensorShape` available at graph construction time. Same meaning as `event_shape`. May be only partially defined. Returns: `TensorShape` object.
tensorflow/contrib/distributions/python/ops/gamma.py
get_event_shape
enrewen1/tf
python
def get_event_shape(self): '`TensorShape` available at graph construction time.\n\n Same meaning as `event_shape`. May be only partially defined.\n\n Returns:\n `TensorShape` object.\n ' return self._get_event_shape
def mean(self, name='mean'): 'Mean of each batch member.' with ops.name_scope(self.name): with ops.name_scope(name, values=[self._alpha, self._beta]): return (self._alpha / self._beta)
2,590,676,959,716,852,000
Mean of each batch member.
tensorflow/contrib/distributions/python/ops/gamma.py
mean
enrewen1/tf
python
def mean(self, name='mean'): with ops.name_scope(self.name): with ops.name_scope(name, values=[self._alpha, self._beta]): return (self._alpha / self._beta)
def mode(self, name='mode'): 'Mode of each batch member.\n\n The mode of a gamma distribution is `(alpha - 1) / beta` when `alpha > 1`,\n and `NaN` otherwise. If `self.allow_nan_stats` is `False`, an exception\n will be raised rather than returning `NaN`.\n\n Args:\n name: A name to give this op....
-3,134,000,186,075,014,700
Mode of each batch member. The mode of a gamma distribution is `(alpha - 1) / beta` when `alpha > 1`, and `NaN` otherwise. If `self.allow_nan_stats` is `False`, an exception will be raised rather than returning `NaN`. Args: name: A name to give this op. Returns: The mode for every batch member, a `Tensor` with...
tensorflow/contrib/distributions/python/ops/gamma.py
mode
enrewen1/tf
python
def mode(self, name='mode'): 'Mode of each batch member.\n\n The mode of a gamma distribution is `(alpha - 1) / beta` when `alpha > 1`,\n and `NaN` otherwise. If `self.allow_nan_stats` is `False`, an exception\n will be raised rather than returning `NaN`.\n\n Args:\n name: A name to give this op....
def variance(self, name='variance'): 'Variance of each batch member.' with ops.name_scope(self.name): with ops.name_scope(name, values=[self._alpha, self._beta]): return (self._alpha / math_ops.square(self._beta))
3,112,165,319,384,282,600
Variance of each batch member.
tensorflow/contrib/distributions/python/ops/gamma.py
variance
enrewen1/tf
python
def variance(self, name='variance'): with ops.name_scope(self.name): with ops.name_scope(name, values=[self._alpha, self._beta]): return (self._alpha / math_ops.square(self._beta))
def std(self, name='std'): 'Standard deviation of this distribution.' with ops.name_scope(self.name): with ops.name_scope(name, values=[self._alpha, self._beta]): return (math_ops.sqrt(self._alpha) / self._beta)
-6,884,819,005,825,626,000
Standard deviation of this distribution.
tensorflow/contrib/distributions/python/ops/gamma.py
std
enrewen1/tf
python
def std(self, name='std'): with ops.name_scope(self.name): with ops.name_scope(name, values=[self._alpha, self._beta]): return (math_ops.sqrt(self._alpha) / self._beta)
def log_prob(self, x, name='log_prob'): 'Log prob of observations in `x` under these Gamma distribution(s).\n\n Args:\n x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`.\n name: The name to give this op.\n\n Returns:\n log_prob: tensor of dtype `dtype`, the log-PDFs of ...
-2,444,142,182,391,518,700
Log prob of observations in `x` under these Gamma distribution(s). Args: x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`. name: The name to give this op. Returns: log_prob: tensor of dtype `dtype`, the log-PDFs of `x`. Raises: TypeError: if `x` and `alpha` are different dtypes.
tensorflow/contrib/distributions/python/ops/gamma.py
log_prob
enrewen1/tf
python
def log_prob(self, x, name='log_prob'): 'Log prob of observations in `x` under these Gamma distribution(s).\n\n Args:\n x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`.\n name: The name to give this op.\n\n Returns:\n log_prob: tensor of dtype `dtype`, the log-PDFs of ...
def prob(self, x, name='prob'): 'Pdf of observations in `x` under these Gamma distribution(s).\n\n Args:\n x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`.\n name: The name to give this op.\n\n Returns:\n prob: tensor of dtype `dtype`, the PDFs of `x`\n\n Raises:\n ...
3,286,626,708,954,102,000
Pdf of observations in `x` under these Gamma distribution(s). Args: x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`. name: The name to give this op. Returns: prob: tensor of dtype `dtype`, the PDFs of `x` Raises: TypeError: if `x` and `alpha` are different dtypes.
tensorflow/contrib/distributions/python/ops/gamma.py
prob
enrewen1/tf
python
def prob(self, x, name='prob'): 'Pdf of observations in `x` under these Gamma distribution(s).\n\n Args:\n x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`.\n name: The name to give this op.\n\n Returns:\n prob: tensor of dtype `dtype`, the PDFs of `x`\n\n Raises:\n ...
def log_cdf(self, x, name='log_cdf'): 'Log CDF of observations `x` under these Gamma distribution(s).\n\n Args:\n x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`.\n name: The name to give this op.\n\n Returns:\n log_cdf: tensor of dtype `dtype`, the log-CDFs of `x`.\n ...
-2,546,260,761,848,574,000
Log CDF of observations `x` under these Gamma distribution(s). Args: x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`. name: The name to give this op. Returns: log_cdf: tensor of dtype `dtype`, the log-CDFs of `x`.
tensorflow/contrib/distributions/python/ops/gamma.py
log_cdf
enrewen1/tf
python
def log_cdf(self, x, name='log_cdf'): 'Log CDF of observations `x` under these Gamma distribution(s).\n\n Args:\n x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`.\n name: The name to give this op.\n\n Returns:\n log_cdf: tensor of dtype `dtype`, the log-CDFs of `x`.\n ...
def cdf(self, x, name='cdf'): 'CDF of observations `x` under these Gamma distribution(s).\n\n Args:\n x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`.\n name: The name to give this op.\n\n Returns:\n cdf: tensor of dtype `dtype`, the CDFs of `x`.\n ' with ops.na...
-6,876,127,372,610,292,000
CDF of observations `x` under these Gamma distribution(s). Args: x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`. name: The name to give this op. Returns: cdf: tensor of dtype `dtype`, the CDFs of `x`.
tensorflow/contrib/distributions/python/ops/gamma.py
cdf
enrewen1/tf
python
def cdf(self, x, name='cdf'): 'CDF of observations `x` under these Gamma distribution(s).\n\n Args:\n x: tensor of dtype `dtype`, must be broadcastable with `alpha` and `beta`.\n name: The name to give this op.\n\n Returns:\n cdf: tensor of dtype `dtype`, the CDFs of `x`.\n ' with ops.na...
def entropy(self, name='entropy'): 'The entropy of Gamma distribution(s).\n\n This is defined to be\n\n ```\n entropy = alpha - log(beta) + log(Gamma(alpha))\n + (1-alpha)digamma(alpha)\n ```\n\n where digamma(alpha) is the digamma function.\n\n Args:\n name: The name to give ...
9,167,662,546,117,315,000
The entropy of Gamma distribution(s). This is defined to be ``` entropy = alpha - log(beta) + log(Gamma(alpha)) + (1-alpha)digamma(alpha) ``` where digamma(alpha) is the digamma function. Args: name: The name to give this op. Returns: entropy: tensor of dtype `dtype`, the entropy.
tensorflow/contrib/distributions/python/ops/gamma.py
entropy
enrewen1/tf
python
def entropy(self, name='entropy'): 'The entropy of Gamma distribution(s).\n\n This is defined to be\n\n ```\n entropy = alpha - log(beta) + log(Gamma(alpha))\n + (1-alpha)digamma(alpha)\n ```\n\n where digamma(alpha) is the digamma function.\n\n Args:\n name: The name to give ...
def sample_n(self, n, seed=None, name='sample_n'): 'Draws `n` samples from the Gamma distribution(s).\n\n See the doc for tf.random_gamma for further detail.\n\n Args:\n n: Python integer, the number of observations to sample from each\n distribution.\n seed: Python integer, the random seed f...
6,028,801,741,464,078,000
Draws `n` samples from the Gamma distribution(s). See the doc for tf.random_gamma for further detail. Args: n: Python integer, the number of observations to sample from each distribution. seed: Python integer, the random seed for this operation. name: Optional name for the operation. Returns: samples: a ...
tensorflow/contrib/distributions/python/ops/gamma.py
sample_n
enrewen1/tf
python
def sample_n(self, n, seed=None, name='sample_n'): 'Draws `n` samples from the Gamma distribution(s).\n\n See the doc for tf.random_gamma for further detail.\n\n Args:\n n: Python integer, the number of observations to sample from each\n distribution.\n seed: Python integer, the random seed f...
@abstractmethod def has_valid_padding(self, ciphertext: bytes) -> bool: '\n Override this method and send off the ciphertext to check for valid padding.\n\n :param bytes ciphertext: The ciphertext to check, send this to your padding oracle.\n :rtype: True for valid padding, False otherwise.\n ...
-3,526,876,157,925,465,000
Override this method and send off the ciphertext to check for valid padding. :param bytes ciphertext: The ciphertext to check, send this to your padding oracle. :rtype: True for valid padding, False otherwise.
paddown.py
has_valid_padding
MarvinKweyu/PadDown
python
@abstractmethod def has_valid_padding(self, ciphertext: bytes) -> bool: '\n Override this method and send off the ciphertext to check for valid padding.\n\n :param bytes ciphertext: The ciphertext to check, send this to your padding oracle.\n :rtype: True for valid padding, False otherwise.\n ...
def boosted_trees_calculate_best_gains_per_feature(node_id_range, stats_summary_list, l1, l2, tree_complexity, min_node_weight, max_splits, name=None): 'Calculates gains for each feature and returns the best possible split information for the feature.\n\n The split information is the best threshold (bucket id), ga...
-1,721,589,663,908,158,700
Calculates gains for each feature and returns the best possible split information for the feature. The split information is the best threshold (bucket id), gains and left/right node contributions per node for each feature. It is possible that not all nodes can be split on each feature. Hence, the list of possible nod...
Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py
boosted_trees_calculate_best_gains_per_feature
Con-Mi/lambda-packs
python
def boosted_trees_calculate_best_gains_per_feature(node_id_range, stats_summary_list, l1, l2, tree_complexity, min_node_weight, max_splits, name=None): 'Calculates gains for each feature and returns the best possible split information for the feature.\n\n The split information is the best threshold (bucket id), ga...
def boosted_trees_calculate_best_gains_per_feature_eager_fallback(node_id_range, stats_summary_list, l1, l2, tree_complexity, min_node_weight, max_splits, name=None, ctx=None): 'This is the slowpath function for Eager mode.\n This is for function boosted_trees_calculate_best_gains_per_feature\n ' _ctx = (ctx ...
-7,513,891,186,051,138,000
This is the slowpath function for Eager mode. This is for function boosted_trees_calculate_best_gains_per_feature
Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py
boosted_trees_calculate_best_gains_per_feature_eager_fallback
Con-Mi/lambda-packs
python
def boosted_trees_calculate_best_gains_per_feature_eager_fallback(node_id_range, stats_summary_list, l1, l2, tree_complexity, min_node_weight, max_splits, name=None, ctx=None): 'This is the slowpath function for Eager mode.\n This is for function boosted_trees_calculate_best_gains_per_feature\n ' _ctx = (ctx ...
def boosted_trees_create_ensemble(tree_ensemble_handle, stamp_token, tree_ensemble_serialized, name=None): 'Creates a tree ensemble model and returns a handle to it.\n\n Args:\n tree_ensemble_handle: A `Tensor` of type `resource`.\n Handle to the tree ensemble resource to be created.\n stamp_token: A `T...
2,120,951,892,225,411,000
Creates a tree ensemble model and returns a handle to it. Args: tree_ensemble_handle: A `Tensor` of type `resource`. Handle to the tree ensemble resource to be created. stamp_token: A `Tensor` of type `int64`. Token to use as the initial value of the resource stamp. tree_ensemble_serialized: A `Tensor` o...
Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py
boosted_trees_create_ensemble
Con-Mi/lambda-packs
python
def boosted_trees_create_ensemble(tree_ensemble_handle, stamp_token, tree_ensemble_serialized, name=None): 'Creates a tree ensemble model and returns a handle to it.\n\n Args:\n tree_ensemble_handle: A `Tensor` of type `resource`.\n Handle to the tree ensemble resource to be created.\n stamp_token: A `T...
def boosted_trees_create_ensemble_eager_fallback(tree_ensemble_handle, stamp_token, tree_ensemble_serialized, name=None, ctx=None): 'This is the slowpath function for Eager mode.\n This is for function boosted_trees_create_ensemble\n ' _ctx = (ctx if ctx else _context.context()) tree_ensemble_handle = _op...
-7,537,204,663,431,566,000
This is the slowpath function for Eager mode. This is for function boosted_trees_create_ensemble
Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py
boosted_trees_create_ensemble_eager_fallback
Con-Mi/lambda-packs
python
def boosted_trees_create_ensemble_eager_fallback(tree_ensemble_handle, stamp_token, tree_ensemble_serialized, name=None, ctx=None): 'This is the slowpath function for Eager mode.\n This is for function boosted_trees_create_ensemble\n ' _ctx = (ctx if ctx else _context.context()) tree_ensemble_handle = _op...
def boosted_trees_deserialize_ensemble(tree_ensemble_handle, stamp_token, tree_ensemble_serialized, name=None): 'Deserializes a serialized tree ensemble config and replaces current tree\n\n ensemble.\n\n Args:\n tree_ensemble_handle: A `Tensor` of type `resource`.\n Handle to the tree ensemble.\n stamp...
-8,351,597,545,228,423,000
Deserializes a serialized tree ensemble config and replaces current tree ensemble. Args: tree_ensemble_handle: A `Tensor` of type `resource`. Handle to the tree ensemble. stamp_token: A `Tensor` of type `int64`. Token to use as the new value of the resource stamp. tree_ensemble_serialized: A `Tensor` of...
Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py
boosted_trees_deserialize_ensemble
Con-Mi/lambda-packs
python
def boosted_trees_deserialize_ensemble(tree_ensemble_handle, stamp_token, tree_ensemble_serialized, name=None): 'Deserializes a serialized tree ensemble config and replaces current tree\n\n ensemble.\n\n Args:\n tree_ensemble_handle: A `Tensor` of type `resource`.\n Handle to the tree ensemble.\n stamp...
def boosted_trees_deserialize_ensemble_eager_fallback(tree_ensemble_handle, stamp_token, tree_ensemble_serialized, name=None, ctx=None): 'This is the slowpath function for Eager mode.\n This is for function boosted_trees_deserialize_ensemble\n ' _ctx = (ctx if ctx else _context.context()) tree_ensemble_ha...
-7,604,356,604,721,799,000
This is the slowpath function for Eager mode. This is for function boosted_trees_deserialize_ensemble
Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py
boosted_trees_deserialize_ensemble_eager_fallback
Con-Mi/lambda-packs
python
def boosted_trees_deserialize_ensemble_eager_fallback(tree_ensemble_handle, stamp_token, tree_ensemble_serialized, name=None, ctx=None): 'This is the slowpath function for Eager mode.\n This is for function boosted_trees_deserialize_ensemble\n ' _ctx = (ctx if ctx else _context.context()) tree_ensemble_ha...
def boosted_trees_ensemble_resource_handle_op(container='', shared_name='', name=None): 'Creates a handle to a BoostedTreesEnsembleResource\n\n Args:\n container: An optional `string`. Defaults to `""`.\n shared_name: An optional `string`. Defaults to `""`.\n name: A name for the operation (optional).\n\n...
-1,176,348,563,963,926,300
Creates a handle to a BoostedTreesEnsembleResource Args: container: An optional `string`. Defaults to `""`. shared_name: An optional `string`. Defaults to `""`. name: A name for the operation (optional). Returns: A `Tensor` of type `resource`.
Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py
boosted_trees_ensemble_resource_handle_op
Con-Mi/lambda-packs
python
def boosted_trees_ensemble_resource_handle_op(container=, shared_name=, name=None): 'Creates a handle to a BoostedTreesEnsembleResource\n\n Args:\n container: An optional `string`. Defaults to ``.\n shared_name: An optional `string`. Defaults to ``.\n name: A name for the operation (optional).\n\n Return...
def boosted_trees_ensemble_resource_handle_op_eager_fallback(container='', shared_name='', name=None, ctx=None): 'This is the slowpath function for Eager mode.\n This is for function boosted_trees_ensemble_resource_handle_op\n ' _ctx = (ctx if ctx else _context.context()) if (container is None): c...
-9,014,903,550,404,713,000
This is the slowpath function for Eager mode. This is for function boosted_trees_ensemble_resource_handle_op
Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py
boosted_trees_ensemble_resource_handle_op_eager_fallback
Con-Mi/lambda-packs
python
def boosted_trees_ensemble_resource_handle_op_eager_fallback(container=, shared_name=, name=None, ctx=None): 'This is the slowpath function for Eager mode.\n This is for function boosted_trees_ensemble_resource_handle_op\n ' _ctx = (ctx if ctx else _context.context()) if (container is None): conta...
def boosted_trees_get_ensemble_states(tree_ensemble_handle, name=None): 'Retrieves the tree ensemble resource stamp token, number of trees and growing statistics.\n\n Args:\n tree_ensemble_handle: A `Tensor` of type `resource`.\n Handle to the tree ensemble.\n name: A name for the operation (optional).\...
7,128,226,942,901,964,000
Retrieves the tree ensemble resource stamp token, number of trees and growing statistics. Args: tree_ensemble_handle: A `Tensor` of type `resource`. Handle to the tree ensemble. name: A name for the operation (optional). Returns: A tuple of `Tensor` objects (stamp_token, num_trees, num_finalized_trees, num_...
Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py
boosted_trees_get_ensemble_states
Con-Mi/lambda-packs
python
def boosted_trees_get_ensemble_states(tree_ensemble_handle, name=None): 'Retrieves the tree ensemble resource stamp token, number of trees and growing statistics.\n\n Args:\n tree_ensemble_handle: A `Tensor` of type `resource`.\n Handle to the tree ensemble.\n name: A name for the operation (optional).\...
def boosted_trees_get_ensemble_states_eager_fallback(tree_ensemble_handle, name=None, ctx=None): 'This is the slowpath function for Eager mode.\n This is for function boosted_trees_get_ensemble_states\n ' _ctx = (ctx if ctx else _context.context()) tree_ensemble_handle = _ops.convert_to_tensor(tree_ensemb...
5,859,933,895,684,794,000
This is the slowpath function for Eager mode. This is for function boosted_trees_get_ensemble_states
Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py
boosted_trees_get_ensemble_states_eager_fallback
Con-Mi/lambda-packs
python
def boosted_trees_get_ensemble_states_eager_fallback(tree_ensemble_handle, name=None, ctx=None): 'This is the slowpath function for Eager mode.\n This is for function boosted_trees_get_ensemble_states\n ' _ctx = (ctx if ctx else _context.context()) tree_ensemble_handle = _ops.convert_to_tensor(tree_ensemb...
def boosted_trees_make_stats_summary(node_ids, gradients, hessians, bucketized_features_list, max_splits, num_buckets, name=None): 'Makes the summary of accumulated stats for the batch.\n\n The summary stats contains gradients and hessians accumulated into the corresponding node and bucket for each example.\n\n A...
-8,921,132,410,623,024,000
Makes the summary of accumulated stats for the batch. The summary stats contains gradients and hessians accumulated into the corresponding node and bucket for each example. Args: node_ids: A `Tensor` of type `int32`. int32 Rank 1 Tensor containing node ids, which each example falls into for the requested layer....
Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py
boosted_trees_make_stats_summary
Con-Mi/lambda-packs
python
def boosted_trees_make_stats_summary(node_ids, gradients, hessians, bucketized_features_list, max_splits, num_buckets, name=None): 'Makes the summary of accumulated stats for the batch.\n\n The summary stats contains gradients and hessians accumulated into the corresponding node and bucket for each example.\n\n A...
def boosted_trees_make_stats_summary_eager_fallback(node_ids, gradients, hessians, bucketized_features_list, max_splits, num_buckets, name=None, ctx=None): 'This is the slowpath function for Eager mode.\n This is for function boosted_trees_make_stats_summary\n ' _ctx = (ctx if ctx else _context.context()) ...
-6,318,355,599,477,688,000
This is the slowpath function for Eager mode. This is for function boosted_trees_make_stats_summary
Keras_tensorflow_nightly/source2.7/tensorflow/python/ops/gen_boosted_trees_ops.py
boosted_trees_make_stats_summary_eager_fallback
Con-Mi/lambda-packs
python
def boosted_trees_make_stats_summary_eager_fallback(node_ids, gradients, hessians, bucketized_features_list, max_splits, num_buckets, name=None, ctx=None): 'This is the slowpath function for Eager mode.\n This is for function boosted_trees_make_stats_summary\n ' _ctx = (ctx if ctx else _context.context()) ...