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
@Metadata.property(cache=False, write=False) def trusted(self): '\n Returns:\n str: package trusted\n ' return self.__trusted
-5,860,853,983,412,719,000
Returns: str: package trusted
frictionless/package.py
trusted
augusto-herrmann/frictionless-py
python
@Metadata.property(cache=False, write=False) def trusted(self): '\n Returns:\n str: package trusted\n ' return self.__trusted
@Metadata.property def resources(self): '\n Returns:\n Resources[]: package resource\n ' resources = self.get('resources', []) return self.metadata_attach('resources', resources)
6,241,615,724,240,368,000
Returns: Resources[]: package resource
frictionless/package.py
resources
augusto-herrmann/frictionless-py
python
@Metadata.property def resources(self): '\n Returns:\n Resources[]: package resource\n ' resources = self.get('resources', []) return self.metadata_attach('resources', resources)
@Metadata.property(cache=False, write=False) def resource_names(self): '\n Returns:\n str[]: package resource names\n ' return [resource.name for resource in self.resources]
5,593,440,850,178,711,000
Returns: str[]: package resource names
frictionless/package.py
resource_names
augusto-herrmann/frictionless-py
python
@Metadata.property(cache=False, write=False) def resource_names(self): '\n Returns:\n str[]: package resource names\n ' return [resource.name for resource in self.resources]
def add_resource(self, descriptor): 'Add new resource to package.\n\n Parameters:\n descriptor (dict): resource descriptor\n\n Returns:\n Resource/None: added `Resource` instance or `None` if not added\n ' self.setdefault('resources', []) self['resources'].append(d...
-4,785,949,136,129,564,000
Add new resource to package. Parameters: descriptor (dict): resource descriptor Returns: Resource/None: added `Resource` instance or `None` if not added
frictionless/package.py
add_resource
augusto-herrmann/frictionless-py
python
def add_resource(self, descriptor): 'Add new resource to package.\n\n Parameters:\n descriptor (dict): resource descriptor\n\n Returns:\n Resource/None: added `Resource` instance or `None` if not added\n ' self.setdefault('resources', []) self['resources'].append(d...
def get_resource(self, name): 'Get resource by name.\n\n Parameters:\n name (str): resource name\n\n Raises:\n FrictionlessException: if resource is not found\n\n Returns:\n Resource/None: `Resource` instance or `None` if not found\n ' for resource in ...
-5,838,373,931,812,160,000
Get resource by name. Parameters: name (str): resource name Raises: FrictionlessException: if resource is not found Returns: Resource/None: `Resource` instance or `None` if not found
frictionless/package.py
get_resource
augusto-herrmann/frictionless-py
python
def get_resource(self, name): 'Get resource by name.\n\n Parameters:\n name (str): resource name\n\n Raises:\n FrictionlessException: if resource is not found\n\n Returns:\n Resource/None: `Resource` instance or `None` if not found\n ' for resource in ...
def has_resource(self, name): 'Check if a resource is present\n\n Parameters:\n name (str): schema resource name\n\n Returns:\n bool: whether there is the resource\n ' for resource in self.resources: if (resource.name == name): return True return...
1,565,123,588,314,115,600
Check if a resource is present Parameters: name (str): schema resource name Returns: bool: whether there is the resource
frictionless/package.py
has_resource
augusto-herrmann/frictionless-py
python
def has_resource(self, name): 'Check if a resource is present\n\n Parameters:\n name (str): schema resource name\n\n Returns:\n bool: whether there is the resource\n ' for resource in self.resources: if (resource.name == name): return True return...
def remove_resource(self, name): 'Remove resource by name.\n\n Parameters:\n name (str): resource name\n\n Raises:\n FrictionlessException: if resource is not found\n\n Returns:\n Resource/None: removed `Resource` instances or `None` if not found\n ' ...
-8,696,772,322,796,107,000
Remove resource by name. Parameters: name (str): resource name Raises: FrictionlessException: if resource is not found Returns: Resource/None: removed `Resource` instances or `None` if not found
frictionless/package.py
remove_resource
augusto-herrmann/frictionless-py
python
def remove_resource(self, name): 'Remove resource by name.\n\n Parameters:\n name (str): resource name\n\n Raises:\n FrictionlessException: if resource is not found\n\n Returns:\n Resource/None: removed `Resource` instances or `None` if not found\n ' ...
def expand(self): 'Expand metadata\n\n It will add default values to the package.\n ' self.setdefault('resources', self.resources) self.setdefault('profile', self.profile) for resource in self.resources: resource.expand()
5,861,811,078,127,915,000
Expand metadata It will add default values to the package.
frictionless/package.py
expand
augusto-herrmann/frictionless-py
python
def expand(self): 'Expand metadata\n\n It will add default values to the package.\n ' self.setdefault('resources', self.resources) self.setdefault('profile', self.profile) for resource in self.resources: resource.expand()
def infer(self, *, stats=False): "Infer package's attributes\n\n Parameters:\n stats? (bool): stream files completely and infer stats\n " self.setdefault('profile', config.DEFAULT_PACKAGE_PROFILE) for resource in self.resources: resource.infer(stats=stats) if (len(self.r...
4,752,128,565,801,970,000
Infer package's attributes Parameters: stats? (bool): stream files completely and infer stats
frictionless/package.py
infer
augusto-herrmann/frictionless-py
python
def infer(self, *, stats=False): "Infer package's attributes\n\n Parameters:\n stats? (bool): stream files completely and infer stats\n " self.setdefault('profile', config.DEFAULT_PACKAGE_PROFILE) for resource in self.resources: resource.infer(stats=stats) if (len(self.r...
def to_copy(self): 'Create a copy of the package' descriptor = self.to_dict() descriptor.pop('resources', None) resources = [] for resource in self.resources: resources.append(resource.to_copy()) return Package(descriptor, resources=resources, basepath=self.__basepath, onerror=self.__one...
4,082,379,780,980,601,000
Create a copy of the package
frictionless/package.py
to_copy
augusto-herrmann/frictionless-py
python
def to_copy(self): descriptor = self.to_dict() descriptor.pop('resources', None) resources = [] for resource in self.resources: resources.append(resource.to_copy()) return Package(descriptor, resources=resources, basepath=self.__basepath, onerror=self.__onerror, trusted=self.__trusted)
@staticmethod def from_bigquery(source, *, dialect=None): 'Import package from Bigquery\n\n Parameters:\n source (string): BigQuery `Service` object\n dialect (dict): BigQuery dialect\n\n Returns:\n Package: package\n ' storage = system.create_storage('bigqu...
6,416,628,453,939,661,000
Import package from Bigquery Parameters: source (string): BigQuery `Service` object dialect (dict): BigQuery dialect Returns: Package: package
frictionless/package.py
from_bigquery
augusto-herrmann/frictionless-py
python
@staticmethod def from_bigquery(source, *, dialect=None): 'Import package from Bigquery\n\n Parameters:\n source (string): BigQuery `Service` object\n dialect (dict): BigQuery dialect\n\n Returns:\n Package: package\n ' storage = system.create_storage('bigqu...
def to_bigquery(self, target, *, dialect=None): 'Export package to Bigquery\n\n Parameters:\n target (string): BigQuery `Service` object\n dialect (dict): BigQuery dialect\n\n Returns:\n BigqueryStorage: storage\n ' storage = system.create_storage('bigquery'...
-3,979,124,997,178,724,400
Export package to Bigquery Parameters: target (string): BigQuery `Service` object dialect (dict): BigQuery dialect Returns: BigqueryStorage: storage
frictionless/package.py
to_bigquery
augusto-herrmann/frictionless-py
python
def to_bigquery(self, target, *, dialect=None): 'Export package to Bigquery\n\n Parameters:\n target (string): BigQuery `Service` object\n dialect (dict): BigQuery dialect\n\n Returns:\n BigqueryStorage: storage\n ' storage = system.create_storage('bigquery'...
@staticmethod def from_ckan(source, *, dialect=None): 'Import package from CKAN\n\n Parameters:\n source (string): CKAN instance url e.g. "https://demo.ckan.org"\n dialect (dict): CKAN dialect\n\n Returns:\n Package: package\n ' storage = system.create_stora...
-507,925,738,641,212,350
Import package from CKAN Parameters: source (string): CKAN instance url e.g. "https://demo.ckan.org" dialect (dict): CKAN dialect Returns: Package: package
frictionless/package.py
from_ckan
augusto-herrmann/frictionless-py
python
@staticmethod def from_ckan(source, *, dialect=None): 'Import package from CKAN\n\n Parameters:\n source (string): CKAN instance url e.g. "https://demo.ckan.org"\n dialect (dict): CKAN dialect\n\n Returns:\n Package: package\n ' storage = system.create_stora...
def to_ckan(self, target, *, dialect=None): 'Export package to CKAN\n\n Parameters:\n target (string): CKAN instance url e.g. "https://demo.ckan.org"\n dialect (dict): CKAN dialect\n\n Returns:\n CkanStorage: storage\n ' storage = system.create_storage('ckan...
208,811,089,386,863,700
Export package to CKAN Parameters: target (string): CKAN instance url e.g. "https://demo.ckan.org" dialect (dict): CKAN dialect Returns: CkanStorage: storage
frictionless/package.py
to_ckan
augusto-herrmann/frictionless-py
python
def to_ckan(self, target, *, dialect=None): 'Export package to CKAN\n\n Parameters:\n target (string): CKAN instance url e.g. "https://demo.ckan.org"\n dialect (dict): CKAN dialect\n\n Returns:\n CkanStorage: storage\n ' storage = system.create_storage('ckan...
@staticmethod def from_sql(source, *, dialect=None): 'Import package from SQL\n\n Parameters:\n source (any): SQL connection string of engine\n dialect (dict): SQL dialect\n\n Returns:\n Package: package\n ' storage = system.create_storage('sql', source, dia...
4,723,093,938,729,500,000
Import package from SQL Parameters: source (any): SQL connection string of engine dialect (dict): SQL dialect Returns: Package: package
frictionless/package.py
from_sql
augusto-herrmann/frictionless-py
python
@staticmethod def from_sql(source, *, dialect=None): 'Import package from SQL\n\n Parameters:\n source (any): SQL connection string of engine\n dialect (dict): SQL dialect\n\n Returns:\n Package: package\n ' storage = system.create_storage('sql', source, dia...
def to_sql(self, target, *, dialect=None): 'Export package to SQL\n\n Parameters:\n target (any): SQL connection string of engine\n dialect (dict): SQL dialect\n\n Returns:\n SqlStorage: storage\n ' storage = system.create_storage('sql', target, dialect=dial...
-6,703,690,496,253,987,000
Export package to SQL Parameters: target (any): SQL connection string of engine dialect (dict): SQL dialect Returns: SqlStorage: storage
frictionless/package.py
to_sql
augusto-herrmann/frictionless-py
python
def to_sql(self, target, *, dialect=None): 'Export package to SQL\n\n Parameters:\n target (any): SQL connection string of engine\n dialect (dict): SQL dialect\n\n Returns:\n SqlStorage: storage\n ' storage = system.create_storage('sql', target, dialect=dial...
@staticmethod def from_zip(path, **options): 'Create a package from ZIP\n\n Parameters:\n path(str): file path\n **options(dict): resouce options\n ' return Package(descriptor=path, **options)
6,982,609,240,657,718,000
Create a package from ZIP Parameters: path(str): file path **options(dict): resouce options
frictionless/package.py
from_zip
augusto-herrmann/frictionless-py
python
@staticmethod def from_zip(path, **options): 'Create a package from ZIP\n\n Parameters:\n path(str): file path\n **options(dict): resouce options\n ' return Package(descriptor=path, **options)
def to_zip(self, path, *, encoder_class=None): 'Save package to a zip\n\n Parameters:\n path (str): target path\n encoder_class (object): json encoder class\n\n Raises:\n FrictionlessException: on any error\n ' try: with zipfile.ZipFile(path, 'w') as...
-2,265,819,970,152,377,600
Save package to a zip Parameters: path (str): target path encoder_class (object): json encoder class Raises: FrictionlessException: on any error
frictionless/package.py
to_zip
augusto-herrmann/frictionless-py
python
def to_zip(self, path, *, encoder_class=None): 'Save package to a zip\n\n Parameters:\n path (str): target path\n encoder_class (object): json encoder class\n\n Raises:\n FrictionlessException: on any error\n ' try: with zipfile.ZipFile(path, 'w') as...
def params(self, **kwargs): "\n Specify query params to be used when executing the search. All the\n keyword arguments will override the current values. See\n https://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch.Elasticsearch.search\n for all available parameters.\n\n...
984,118,992,187,226,400
Specify query params to be used when executing the search. All the keyword arguments will override the current values. See https://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch.Elasticsearch.search for all available parameters. Example:: s = Search() s = s.params(routing='user-1', preferenc...
elasticsearch_dsl/search.py
params
cfpb/elasticsearch-dsl-py
python
def params(self, **kwargs): "\n Specify query params to be used when executing the search. All the\n keyword arguments will override the current values. See\n https://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch.Elasticsearch.search\n for all available parameters.\n\n...
def index(self, *index): "\n Set the index for the search. If called empty it will remove all information.\n\n Example:\n\n s = Search()\n s = s.index('twitter-2015.01.01', 'twitter-2015.01.02')\n s = s.index(['twitter-2015.01.01', 'twitter-2015.01.02'])\n " ...
27,993,767,929,939,330
Set the index for the search. If called empty it will remove all information. Example: s = Search() s = s.index('twitter-2015.01.01', 'twitter-2015.01.02') s = s.index(['twitter-2015.01.01', 'twitter-2015.01.02'])
elasticsearch_dsl/search.py
index
cfpb/elasticsearch-dsl-py
python
def index(self, *index): "\n Set the index for the search. If called empty it will remove all information.\n\n Example:\n\n s = Search()\n s = s.index('twitter-2015.01.01', 'twitter-2015.01.02')\n s = s.index(['twitter-2015.01.01', 'twitter-2015.01.02'])\n " ...
def doc_type(self, *doc_type, **kwargs): "\n Set the type to search through. You can supply a single value or\n multiple. Values can be strings or subclasses of ``Document``.\n\n You can also pass in any keyword arguments, mapping a doc_type to a\n callback that should be used instead of...
-2,262,673,354,933,794,300
Set the type to search through. You can supply a single value or multiple. Values can be strings or subclasses of ``Document``. You can also pass in any keyword arguments, mapping a doc_type to a callback that should be used instead of the Hit class. If no doc_type is supplied any information stored on the instance w...
elasticsearch_dsl/search.py
doc_type
cfpb/elasticsearch-dsl-py
python
def doc_type(self, *doc_type, **kwargs): "\n Set the type to search through. You can supply a single value or\n multiple. Values can be strings or subclasses of ``Document``.\n\n You can also pass in any keyword arguments, mapping a doc_type to a\n callback that should be used instead of...
def using(self, client): '\n Associate the search request with an elasticsearch client. A fresh copy\n will be returned with current instance remaining unchanged.\n\n :arg client: an instance of ``elasticsearch.Elasticsearch`` to use or\n an alias to look up in ``elasticsearch_dsl.co...
-2,617,029,962,027,293,700
Associate the search request with an elasticsearch client. A fresh copy will be returned with current instance remaining unchanged. :arg client: an instance of ``elasticsearch.Elasticsearch`` to use or an alias to look up in ``elasticsearch_dsl.connections``
elasticsearch_dsl/search.py
using
cfpb/elasticsearch-dsl-py
python
def using(self, client): '\n Associate the search request with an elasticsearch client. A fresh copy\n will be returned with current instance remaining unchanged.\n\n :arg client: an instance of ``elasticsearch.Elasticsearch`` to use or\n an alias to look up in ``elasticsearch_dsl.co...
def extra(self, **kwargs): '\n Add extra keys to the request body. Mostly here for backwards\n compatibility.\n ' s = self._clone() if ('from_' in kwargs): kwargs['from'] = kwargs.pop('from_') s._extra.update(kwargs) return s
2,489,825,865,943,227,000
Add extra keys to the request body. Mostly here for backwards compatibility.
elasticsearch_dsl/search.py
extra
cfpb/elasticsearch-dsl-py
python
def extra(self, **kwargs): '\n Add extra keys to the request body. Mostly here for backwards\n compatibility.\n ' s = self._clone() if ('from_' in kwargs): kwargs['from'] = kwargs.pop('from_') s._extra.update(kwargs) return s
def __init__(self, **kwargs): '\n Search request to elasticsearch.\n\n :arg using: `Elasticsearch` instance to use\n :arg index: limit the search to index\n :arg doc_type: only query this type.\n\n All the parameters supplied (or omitted) at creation type can be later\n ove...
5,466,510,326,525,728,000
Search request to elasticsearch. :arg using: `Elasticsearch` instance to use :arg index: limit the search to index :arg doc_type: only query this type. All the parameters supplied (or omitted) at creation type can be later overridden by methods (`using`, `index` and `doc_type` respectively).
elasticsearch_dsl/search.py
__init__
cfpb/elasticsearch-dsl-py
python
def __init__(self, **kwargs): '\n Search request to elasticsearch.\n\n :arg using: `Elasticsearch` instance to use\n :arg index: limit the search to index\n :arg doc_type: only query this type.\n\n All the parameters supplied (or omitted) at creation type can be later\n ove...
def __iter__(self): '\n Iterate over the hits.\n ' return iter(self.execute())
8,854,762,045,459,427,000
Iterate over the hits.
elasticsearch_dsl/search.py
__iter__
cfpb/elasticsearch-dsl-py
python
def __iter__(self): '\n \n ' return iter(self.execute())
def __getitem__(self, n): '\n Support slicing the `Search` instance for pagination.\n\n Slicing equates to the from/size parameters. E.g.::\n\n s = Search().query(...)[0:25]\n\n is equivalent to::\n\n s = Search().query(...).extra(from_=0, size=25)\n\n ' s = sel...
5,948,883,159,155,191,000
Support slicing the `Search` instance for pagination. Slicing equates to the from/size parameters. E.g.:: s = Search().query(...)[0:25] is equivalent to:: s = Search().query(...).extra(from_=0, size=25)
elasticsearch_dsl/search.py
__getitem__
cfpb/elasticsearch-dsl-py
python
def __getitem__(self, n): '\n Support slicing the `Search` instance for pagination.\n\n Slicing equates to the from/size parameters. E.g.::\n\n s = Search().query(...)[0:25]\n\n is equivalent to::\n\n s = Search().query(...).extra(from_=0, size=25)\n\n ' s = sel...
@classmethod def from_dict(cls, d): '\n Construct a new `Search` instance from a raw dict containing the search\n body. Useful when migrating from raw dictionaries.\n\n Example::\n\n s = Search.from_dict({\n "query": {\n "bool": {\n ...
-7,138,592,016,995,946,000
Construct a new `Search` instance from a raw dict containing the search body. Useful when migrating from raw dictionaries. Example:: s = Search.from_dict({ "query": { "bool": { "must": [...] } }, "aggs": {...} }) s = s.filter('term', publishe...
elasticsearch_dsl/search.py
from_dict
cfpb/elasticsearch-dsl-py
python
@classmethod def from_dict(cls, d): '\n Construct a new `Search` instance from a raw dict containing the search\n body. Useful when migrating from raw dictionaries.\n\n Example::\n\n s = Search.from_dict({\n "query": {\n "bool": {\n ...
def _clone(self): '\n Return a clone of the current search request. Performs a shallow copy\n of all the underlying objects. Used internally by most state modifying\n APIs.\n ' s = super(Search, self)._clone() s._response_class = self._response_class s._sort = self._sort[:] ...
-6,639,115,294,444,079,000
Return a clone of the current search request. Performs a shallow copy of all the underlying objects. Used internally by most state modifying APIs.
elasticsearch_dsl/search.py
_clone
cfpb/elasticsearch-dsl-py
python
def _clone(self): '\n Return a clone of the current search request. Performs a shallow copy\n of all the underlying objects. Used internally by most state modifying\n APIs.\n ' s = super(Search, self)._clone() s._response_class = self._response_class s._sort = self._sort[:] ...
def response_class(self, cls): '\n Override the default wrapper used for the response.\n ' s = self._clone() s._response_class = cls return s
-3,916,456,081,902,850,000
Override the default wrapper used for the response.
elasticsearch_dsl/search.py
response_class
cfpb/elasticsearch-dsl-py
python
def response_class(self, cls): '\n \n ' s = self._clone() s._response_class = cls return s
def update_from_dict(self, d): '\n Apply options from a serialized body to the current instance. Modifies\n the object in-place. Used mostly by ``from_dict``.\n ' d = d.copy() if ('query' in d): self.query._proxied = Q(d.pop('query')) if ('post_filter' in d): self.po...
-3,957,944,877,918,818,000
Apply options from a serialized body to the current instance. Modifies the object in-place. Used mostly by ``from_dict``.
elasticsearch_dsl/search.py
update_from_dict
cfpb/elasticsearch-dsl-py
python
def update_from_dict(self, d): '\n Apply options from a serialized body to the current instance. Modifies\n the object in-place. Used mostly by ``from_dict``.\n ' d = d.copy() if ('query' in d): self.query._proxied = Q(d.pop('query')) if ('post_filter' in d): self.po...
def script_fields(self, **kwargs): '\n Define script fields to be calculated on hits. See\n https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-script-fields.html\n for more details.\n\n Example::\n\n s = Search()\n s = s.script_fields(tim...
2,069,877,232,227,935,000
Define script fields to be calculated on hits. See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-script-fields.html for more details. Example:: s = Search() s = s.script_fields(times_two="doc['field'].value * 2") s = s.script_fields( times_three={ 'scri...
elasticsearch_dsl/search.py
script_fields
cfpb/elasticsearch-dsl-py
python
def script_fields(self, **kwargs): '\n Define script fields to be calculated on hits. See\n https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-script-fields.html\n for more details.\n\n Example::\n\n s = Search()\n s = s.script_fields(tim...
def source(self, fields=None, **kwargs): '\n Selectively control how the _source field is returned.\n\n :arg fields: wildcard string, array of wildcards, or dictionary of includes and excludes\n\n If ``fields`` is None, the entire document will be returned for\n each hit. If fields is a...
-8,599,830,302,626,372,000
Selectively control how the _source field is returned. :arg fields: wildcard string, array of wildcards, or dictionary of includes and excludes If ``fields`` is None, the entire document will be returned for each hit. If fields is a dictionary with keys of 'includes' and/or 'excludes' the fields will be either inclu...
elasticsearch_dsl/search.py
source
cfpb/elasticsearch-dsl-py
python
def source(self, fields=None, **kwargs): '\n Selectively control how the _source field is returned.\n\n :arg fields: wildcard string, array of wildcards, or dictionary of includes and excludes\n\n If ``fields`` is None, the entire document will be returned for\n each hit. If fields is a...
def sort(self, *keys): '\n Add sorting information to the search request. If called without\n arguments it will remove all sort requirements. Otherwise it will\n replace them. Acceptable arguments are::\n\n \'some.field\'\n \'-some.other.field\'\n {\'different.f...
-5,992,966,046,639,226,000
Add sorting information to the search request. If called without arguments it will remove all sort requirements. Otherwise it will replace them. Acceptable arguments are:: 'some.field' '-some.other.field' {'different.field': {'any': 'dict'}} so for example:: s = Search().sort( 'category', ...
elasticsearch_dsl/search.py
sort
cfpb/elasticsearch-dsl-py
python
def sort(self, *keys): '\n Add sorting information to the search request. If called without\n arguments it will remove all sort requirements. Otherwise it will\n replace them. Acceptable arguments are::\n\n \'some.field\'\n \'-some.other.field\'\n {\'different.f...
def highlight_options(self, **kwargs): "\n Update the global highlighting options used for this request. For\n example::\n\n s = Search()\n s = s.highlight_options(order='score')\n " s = self._clone() s._highlight_opts.update(kwargs) return s
6,445,549,317,436,081,000
Update the global highlighting options used for this request. For example:: s = Search() s = s.highlight_options(order='score')
elasticsearch_dsl/search.py
highlight_options
cfpb/elasticsearch-dsl-py
python
def highlight_options(self, **kwargs): "\n Update the global highlighting options used for this request. For\n example::\n\n s = Search()\n s = s.highlight_options(order='score')\n " s = self._clone() s._highlight_opts.update(kwargs) return s
def highlight(self, *fields, **kwargs): '\n Request highlighting of some fields. All keyword arguments passed in will be\n used as parameters for all the fields in the ``fields`` parameter. Example::\n\n Search().highlight(\'title\', \'body\', fragment_size=50)\n\n will produce the e...
7,883,578,960,692,520,000
Request highlighting of some fields. All keyword arguments passed in will be used as parameters for all the fields in the ``fields`` parameter. Example:: Search().highlight('title', 'body', fragment_size=50) will produce the equivalent of:: { "highlight": { "fields": { "bo...
elasticsearch_dsl/search.py
highlight
cfpb/elasticsearch-dsl-py
python
def highlight(self, *fields, **kwargs): '\n Request highlighting of some fields. All keyword arguments passed in will be\n used as parameters for all the fields in the ``fields`` parameter. Example::\n\n Search().highlight(\'title\', \'body\', fragment_size=50)\n\n will produce the e...
def suggest(self, name, text, **kwargs): "\n Add a suggestions request to the search.\n\n :arg name: name of the suggestion\n :arg text: text to suggest on\n\n All keyword arguments will be added to the suggestions body. For example::\n\n s = Search()\n s = s.sugges...
3,912,557,051,867,161,000
Add a suggestions request to the search. :arg name: name of the suggestion :arg text: text to suggest on All keyword arguments will be added to the suggestions body. For example:: s = Search() s = s.suggest('suggestion-1', 'Elasticsearch', term={'field': 'body'})
elasticsearch_dsl/search.py
suggest
cfpb/elasticsearch-dsl-py
python
def suggest(self, name, text, **kwargs): "\n Add a suggestions request to the search.\n\n :arg name: name of the suggestion\n :arg text: text to suggest on\n\n All keyword arguments will be added to the suggestions body. For example::\n\n s = Search()\n s = s.sugges...
def to_dict(self, count=False, **kwargs): "\n Serialize the search into the dictionary that will be sent over as the\n request's body.\n\n :arg count: a flag to specify if we are interested in a body for count -\n no aggregations, no pagination bounds etc.\n\n All additional k...
-5,094,944,635,325,877,000
Serialize the search into the dictionary that will be sent over as the request's body. :arg count: a flag to specify if we are interested in a body for count - no aggregations, no pagination bounds etc. All additional keyword arguments will be included into the dictionary.
elasticsearch_dsl/search.py
to_dict
cfpb/elasticsearch-dsl-py
python
def to_dict(self, count=False, **kwargs): "\n Serialize the search into the dictionary that will be sent over as the\n request's body.\n\n :arg count: a flag to specify if we are interested in a body for count -\n no aggregations, no pagination bounds etc.\n\n All additional k...
def count(self): '\n Return the number of hits matching the query and filters. Note that\n only the actual number is returned.\n ' if (hasattr(self, '_response') and (self._response.hits.total.relation == 'eq')): return self._response.hits.total.value es = get_connection(self._u...
4,067,295,734,994,645,500
Return the number of hits matching the query and filters. Note that only the actual number is returned.
elasticsearch_dsl/search.py
count
cfpb/elasticsearch-dsl-py
python
def count(self): '\n Return the number of hits matching the query and filters. Note that\n only the actual number is returned.\n ' if (hasattr(self, '_response') and (self._response.hits.total.relation == 'eq')): return self._response.hits.total.value es = get_connection(self._u...
def execute(self, ignore_cache=False): '\n Execute the search and return an instance of ``Response`` wrapping all\n the data.\n\n :arg ignore_cache: if set to ``True``, consecutive calls will hit\n ES, while cached result will be ignored. Defaults to `False`\n ' if (ignore...
-769,132,555,925,094,400
Execute the search and return an instance of ``Response`` wrapping all the data. :arg ignore_cache: if set to ``True``, consecutive calls will hit ES, while cached result will be ignored. Defaults to `False`
elasticsearch_dsl/search.py
execute
cfpb/elasticsearch-dsl-py
python
def execute(self, ignore_cache=False): '\n Execute the search and return an instance of ``Response`` wrapping all\n the data.\n\n :arg ignore_cache: if set to ``True``, consecutive calls will hit\n ES, while cached result will be ignored. Defaults to `False`\n ' if (ignore...
def scan(self): '\n Turn the search into a scan search and return a generator that will\n iterate over all the documents matching the query.\n\n Use ``params`` method to specify any additional arguments you with to\n pass to the underlying ``scan`` helper from ``elasticsearch-py`` -\n ...
8,946,906,841,084,514,000
Turn the search into a scan search and return a generator that will iterate over all the documents matching the query. Use ``params`` method to specify any additional arguments you with to pass to the underlying ``scan`` helper from ``elasticsearch-py`` - https://elasticsearch-py.readthedocs.io/en/master/helpers.html#...
elasticsearch_dsl/search.py
scan
cfpb/elasticsearch-dsl-py
python
def scan(self): '\n Turn the search into a scan search and return a generator that will\n iterate over all the documents matching the query.\n\n Use ``params`` method to specify any additional arguments you with to\n pass to the underlying ``scan`` helper from ``elasticsearch-py`` -\n ...
def delete(self): '\n delete() executes the query by delegating to delete_by_query()\n ' es = get_connection(self._using) return AttrDict(es.delete_by_query(index=self._index, body=self.to_dict(), **self._params))
1,368,681,962,290,731,800
delete() executes the query by delegating to delete_by_query()
elasticsearch_dsl/search.py
delete
cfpb/elasticsearch-dsl-py
python
def delete(self): '\n \n ' es = get_connection(self._using) return AttrDict(es.delete_by_query(index=self._index, body=self.to_dict(), **self._params))
def add(self, search): "\n Adds a new :class:`~elasticsearch_dsl.Search` object to the request::\n\n ms = MultiSearch(index='my-index')\n ms = ms.add(Search(doc_type=Category).filter('term', category='python'))\n ms = ms.add(Search(doc_type=Blog))\n " ms = self._cl...
6,799,146,122,245,675,000
Adds a new :class:`~elasticsearch_dsl.Search` object to the request:: ms = MultiSearch(index='my-index') ms = ms.add(Search(doc_type=Category).filter('term', category='python')) ms = ms.add(Search(doc_type=Blog))
elasticsearch_dsl/search.py
add
cfpb/elasticsearch-dsl-py
python
def add(self, search): "\n Adds a new :class:`~elasticsearch_dsl.Search` object to the request::\n\n ms = MultiSearch(index='my-index')\n ms = ms.add(Search(doc_type=Category).filter('term', category='python'))\n ms = ms.add(Search(doc_type=Blog))\n " ms = self._cl...
def execute(self, ignore_cache=False, raise_on_error=True): '\n Execute the multi search request and return a list of search results.\n ' if (ignore_cache or (not hasattr(self, '_response'))): es = get_connection(self._using) responses = es.msearch(index=self._index, body=self.to_d...
-7,734,126,237,782,678,000
Execute the multi search request and return a list of search results.
elasticsearch_dsl/search.py
execute
cfpb/elasticsearch-dsl-py
python
def execute(self, ignore_cache=False, raise_on_error=True): '\n \n ' if (ignore_cache or (not hasattr(self, '_response'))): es = get_connection(self._using) responses = es.msearch(index=self._index, body=self.to_dict(), **self._params) out = [] for (s, r) in zip(sel...
@pytest.fixture def good_predict_at(): 'A `predict_at` within `START`-`END` and ...\n\n ... a long enough history so that either `SHORT_TRAIN_HORIZON`\n or `LONG_TRAIN_HORIZON` works.\n ' return datetime.datetime(test_config.END.year, test_config.END.month, test_config.END.day, test_config.NOON, 0)
845,732,126,145,894,300
A `predict_at` within `START`-`END` and ... ... a long enough history so that either `SHORT_TRAIN_HORIZON` or `LONG_TRAIN_HORIZON` works.
tests/forecasts/timify/test_make_time_series.py
good_predict_at
webartifex/urban-meal-delivery
python
@pytest.fixture def good_predict_at(): 'A `predict_at` within `START`-`END` and ...\n\n ... a long enough history so that either `SHORT_TRAIN_HORIZON`\n or `LONG_TRAIN_HORIZON` works.\n ' return datetime.datetime(test_config.END.year, test_config.END.month, test_config.END.day, test_config.NOON, 0)
@pytest.fixture def bad_predict_at(): 'A `predict_at` within `START`-`END` but ...\n\n ... not a long enough history so that both `SHORT_TRAIN_HORIZON`\n and `LONG_TRAIN_HORIZON` do not work.\n ' predict_day = (test_config.END - datetime.timedelta(weeks=6, days=1)) return datetime.datetime(predict_...
9,116,327,730,989,172,000
A `predict_at` within `START`-`END` but ... ... not a long enough history so that both `SHORT_TRAIN_HORIZON` and `LONG_TRAIN_HORIZON` do not work.
tests/forecasts/timify/test_make_time_series.py
bad_predict_at
webartifex/urban-meal-delivery
python
@pytest.fixture def bad_predict_at(): 'A `predict_at` within `START`-`END` but ...\n\n ... not a long enough history so that both `SHORT_TRAIN_HORIZON`\n and `LONG_TRAIN_HORIZON` do not work.\n ' predict_day = (test_config.END - datetime.timedelta(weeks=6, days=1)) return datetime.datetime(predict_...
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_wrong_pixel(self, order_history, good_predict_at, train_horizon): 'A `pixel_id` that is not in the `grid`.' with pytest.raises(LookupError): order_history.make_horizontal_ts(pixel_id=999999, predict_at=good_predict_at, train_...
4,505,417,187,260,774,000
A `pixel_id` that is not in the `grid`.
tests/forecasts/timify/test_make_time_series.py
test_wrong_pixel
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_wrong_pixel(self, order_history, good_predict_at, train_horizon): with pytest.raises(LookupError): order_history.make_horizontal_ts(pixel_id=999999, predict_at=good_predict_at, train_horizon=train_horizon)
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_time_series_are_series(self, order_history, good_pixel_id, good_predict_at, train_horizon): 'The time series come as a `pd.Series`.' result = order_history.make_horizontal_ts(pixel_id=good_pixel_id, predict_at=good_predict_at, train_...
-460,741,185,384,608,830
The time series come as a `pd.Series`.
tests/forecasts/timify/test_make_time_series.py
test_time_series_are_series
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_time_series_are_series(self, order_history, good_pixel_id, good_predict_at, train_horizon): result = order_history.make_horizontal_ts(pixel_id=good_pixel_id, predict_at=good_predict_at, train_horizon=train_horizon) (training_ts,...
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_time_series_have_correct_length(self, order_history, good_pixel_id, good_predict_at, train_horizon): 'The length of a training time series must be a multiple of `7` ...\n\n ... whereas the time series with the actual order counts ...
3,063,075,932,768,489,000
The length of a training time series must be a multiple of `7` ... ... whereas the time series with the actual order counts has only `1` value.
tests/forecasts/timify/test_make_time_series.py
test_time_series_have_correct_length
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_time_series_have_correct_length(self, order_history, good_pixel_id, good_predict_at, train_horizon): 'The length of a training time series must be a multiple of `7` ...\n\n ... whereas the time series with the actual order counts ...
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_frequency_is_number_of_weekdays(self, order_history, good_pixel_id, good_predict_at, train_horizon): 'The `frequency` must be `7`.' result = order_history.make_horizontal_ts(pixel_id=good_pixel_id, predict_at=good_predict_at, train_h...
7,620,836,816,034,598,000
The `frequency` must be `7`.
tests/forecasts/timify/test_make_time_series.py
test_frequency_is_number_of_weekdays
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_frequency_is_number_of_weekdays(self, order_history, good_pixel_id, good_predict_at, train_horizon): result = order_history.make_horizontal_ts(pixel_id=good_pixel_id, predict_at=good_predict_at, train_horizon=train_horizon) (_, ...
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_no_long_enough_history1(self, order_history, good_pixel_id, bad_predict_at, train_horizon): 'If the `predict_at` day is too early in the `START`-`END` horizon ...\n\n ... the history of order totals is not long enough.\n ' ...
-133,165,761,900,441,440
If the `predict_at` day is too early in the `START`-`END` horizon ... ... the history of order totals is not long enough.
tests/forecasts/timify/test_make_time_series.py
test_no_long_enough_history1
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_no_long_enough_history1(self, order_history, good_pixel_id, bad_predict_at, train_horizon): 'If the `predict_at` day is too early in the `START`-`END` horizon ...\n\n ... the history of order totals is not long enough.\n ' ...
def test_no_long_enough_history2(self, order_history, good_pixel_id, good_predict_at): 'If the `train_horizon` is longer than the `START`-`END` horizon ...\n\n ... the history of order totals can never be long enough.\n ' with pytest.raises(RuntimeError): order_history.make_horizontal_ts(p...
985,862,545,747,328,000
If the `train_horizon` is longer than the `START`-`END` horizon ... ... the history of order totals can never be long enough.
tests/forecasts/timify/test_make_time_series.py
test_no_long_enough_history2
webartifex/urban-meal-delivery
python
def test_no_long_enough_history2(self, order_history, good_pixel_id, good_predict_at): 'If the `train_horizon` is longer than the `START`-`END` horizon ...\n\n ... the history of order totals can never be long enough.\n ' with pytest.raises(RuntimeError): order_history.make_horizontal_ts(p...
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_wrong_pixel(self, order_history, good_predict_at, train_horizon): 'A `pixel_id` that is not in the `grid`.' with pytest.raises(LookupError): order_history.make_vertical_ts(pixel_id=999999, predict_day=good_predict_at.date(), ...
1,357,936,782,452,300,000
A `pixel_id` that is not in the `grid`.
tests/forecasts/timify/test_make_time_series.py
test_wrong_pixel
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_wrong_pixel(self, order_history, good_predict_at, train_horizon): with pytest.raises(LookupError): order_history.make_vertical_ts(pixel_id=999999, predict_day=good_predict_at.date(), train_horizon=train_horizon)
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_time_series_are_series(self, order_history, good_pixel_id, good_predict_at, train_horizon): 'The time series come as `pd.Series`.' result = order_history.make_vertical_ts(pixel_id=good_pixel_id, predict_day=good_predict_at.date(), tr...
-6,274,435,031,828,883,000
The time series come as `pd.Series`.
tests/forecasts/timify/test_make_time_series.py
test_time_series_are_series
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_time_series_are_series(self, order_history, good_pixel_id, good_predict_at, train_horizon): result = order_history.make_vertical_ts(pixel_id=good_pixel_id, predict_day=good_predict_at.date(), train_horizon=train_horizon) (traini...
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_time_series_have_correct_length(self, order_history, good_pixel_id, good_predict_at, train_horizon): 'The length of a training time series is the product of the ...\n\n ... weekly time steps (i.e., product of `7` and the number of...
-1,977,358,239,434,876,000
The length of a training time series is the product of the ... ... weekly time steps (i.e., product of `7` and the number of daily time steps) and the `train_horizon` in weeks. The time series with the actual order counts always holds one observation per time step of a day.
tests/forecasts/timify/test_make_time_series.py
test_time_series_have_correct_length
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_time_series_have_correct_length(self, order_history, good_pixel_id, good_predict_at, train_horizon): 'The length of a training time series is the product of the ...\n\n ... weekly time steps (i.e., product of `7` and the number of...
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_frequency_is_number_number_of_weekly_time_steps(self, order_history, good_pixel_id, good_predict_at, train_horizon): 'The `frequency` is the number of weekly time steps.' result = order_history.make_vertical_ts(pixel_id=good_pixel_id...
4,505,564,102,296,897,500
The `frequency` is the number of weekly time steps.
tests/forecasts/timify/test_make_time_series.py
test_frequency_is_number_number_of_weekly_time_steps
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_frequency_is_number_number_of_weekly_time_steps(self, order_history, good_pixel_id, good_predict_at, train_horizon): result = order_history.make_vertical_ts(pixel_id=good_pixel_id, predict_day=good_predict_at.date(), train_horizon=t...
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_no_long_enough_history1(self, order_history, good_pixel_id, bad_predict_at, train_horizon): 'If the `predict_at` day is too early in the `START`-`END` horizon ...\n\n ... the history of order totals is not long enough.\n ' ...
-168,511,720,616,015,650
If the `predict_at` day is too early in the `START`-`END` horizon ... ... the history of order totals is not long enough.
tests/forecasts/timify/test_make_time_series.py
test_no_long_enough_history1
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_no_long_enough_history1(self, order_history, good_pixel_id, bad_predict_at, train_horizon): 'If the `predict_at` day is too early in the `START`-`END` horizon ...\n\n ... the history of order totals is not long enough.\n ' ...
def test_no_long_enough_history2(self, order_history, good_pixel_id, good_predict_at): 'If the `train_horizon` is longer than the `START`-`END` horizon ...\n\n ... the history of order totals can never be long enough.\n ' with pytest.raises(RuntimeError): order_history.make_vertical_ts(pix...
-159,212,202,509,557,200
If the `train_horizon` is longer than the `START`-`END` horizon ... ... the history of order totals can never be long enough.
tests/forecasts/timify/test_make_time_series.py
test_no_long_enough_history2
webartifex/urban-meal-delivery
python
def test_no_long_enough_history2(self, order_history, good_pixel_id, good_predict_at): 'If the `train_horizon` is longer than the `START`-`END` horizon ...\n\n ... the history of order totals can never be long enough.\n ' with pytest.raises(RuntimeError): order_history.make_vertical_ts(pix...
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_wrong_pixel(self, order_history, good_predict_at, train_horizon): 'A `pixel_id` that is not in the `grid`.' with pytest.raises(LookupError): order_history.make_realtime_ts(pixel_id=999999, predict_at=good_predict_at, train_ho...
8,099,444,227,379,590,000
A `pixel_id` that is not in the `grid`.
tests/forecasts/timify/test_make_time_series.py
test_wrong_pixel
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_wrong_pixel(self, order_history, good_predict_at, train_horizon): with pytest.raises(LookupError): order_history.make_realtime_ts(pixel_id=999999, predict_at=good_predict_at, train_horizon=train_horizon)
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_time_series_are_series(self, order_history, good_pixel_id, good_predict_at, train_horizon): 'The time series come as `pd.Series`.' result = order_history.make_realtime_ts(pixel_id=good_pixel_id, predict_at=good_predict_at, train_hori...
-5,622,506,090,569,481,000
The time series come as `pd.Series`.
tests/forecasts/timify/test_make_time_series.py
test_time_series_are_series
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_time_series_are_series(self, order_history, good_pixel_id, good_predict_at, train_horizon): result = order_history.make_realtime_ts(pixel_id=good_pixel_id, predict_at=good_predict_at, train_horizon=train_horizon) (training_ts, _...
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_time_series_have_correct_length1(self, order_history, good_pixel_id, good_predict_at, train_horizon): 'The length of a training time series is the product of the ...\n\n ... weekly time steps (i.e., product of `7` and the number o...
7,418,191,010,827,245,000
The length of a training time series is the product of the ... ... weekly time steps (i.e., product of `7` and the number of daily time steps) and the `train_horizon` in weeks; however, this assertion only holds if we predict the first `time_step` of the day. The time series with the actual order counts always holds ...
tests/forecasts/timify/test_make_time_series.py
test_time_series_have_correct_length1
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_time_series_have_correct_length1(self, order_history, good_pixel_id, good_predict_at, train_horizon): 'The length of a training time series is the product of the ...\n\n ... weekly time steps (i.e., product of `7` and the number o...
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_time_series_have_correct_length2(self, order_history, good_pixel_id, good_predict_at, train_horizon): 'The length of a training time series is the product of the ...\n\n ... weekly time steps (i.e., product of `7` and the number o...
-5,741,354,582,931,707,000
The length of a training time series is the product of the ... ... weekly time steps (i.e., product of `7` and the number of daily time steps) and the `train_horizon` in weeks; however, this assertion only holds if we predict the first `time_step` of the day. Predicting any other `time_step` means that the training ti...
tests/forecasts/timify/test_make_time_series.py
test_time_series_have_correct_length2
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_time_series_have_correct_length2(self, order_history, good_pixel_id, good_predict_at, train_horizon): 'The length of a training time series is the product of the ...\n\n ... weekly time steps (i.e., product of `7` and the number o...
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_frequency_is_number_number_of_weekly_time_steps(self, order_history, good_pixel_id, good_predict_at, train_horizon): 'The `frequency` is the number of weekly time steps.' result = order_history.make_realtime_ts(pixel_id=good_pixel_id...
7,710,180,793,476,809,000
The `frequency` is the number of weekly time steps.
tests/forecasts/timify/test_make_time_series.py
test_frequency_is_number_number_of_weekly_time_steps
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_frequency_is_number_number_of_weekly_time_steps(self, order_history, good_pixel_id, good_predict_at, train_horizon): result = order_history.make_realtime_ts(pixel_id=good_pixel_id, predict_at=good_predict_at, train_horizon=train_hor...
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_no_long_enough_history1(self, order_history, good_pixel_id, bad_predict_at, train_horizon): 'If the `predict_at` day is too early in the `START`-`END` horizon ...\n\n ... the history of order totals is not long enough.\n ' ...
-9,063,957,476,974,908,000
If the `predict_at` day is too early in the `START`-`END` horizon ... ... the history of order totals is not long enough.
tests/forecasts/timify/test_make_time_series.py
test_no_long_enough_history1
webartifex/urban-meal-delivery
python
@pytest.mark.parametrize('train_horizon', test_config.TRAIN_HORIZONS) def test_no_long_enough_history1(self, order_history, good_pixel_id, bad_predict_at, train_horizon): 'If the `predict_at` day is too early in the `START`-`END` horizon ...\n\n ... the history of order totals is not long enough.\n ' ...
def test_no_long_enough_history2(self, order_history, good_pixel_id, good_predict_at): 'If the `train_horizon` is longer than the `START`-`END` horizon ...\n\n ... the history of order totals can never be long enough.\n ' with pytest.raises(RuntimeError): order_history.make_realtime_ts(pix...
-6,738,553,165,639,628,000
If the `train_horizon` is longer than the `START`-`END` horizon ... ... the history of order totals can never be long enough.
tests/forecasts/timify/test_make_time_series.py
test_no_long_enough_history2
webartifex/urban-meal-delivery
python
def test_no_long_enough_history2(self, order_history, good_pixel_id, good_predict_at): 'If the `train_horizon` is longer than the `START`-`END` horizon ...\n\n ... the history of order totals can never be long enough.\n ' with pytest.raises(RuntimeError): order_history.make_realtime_ts(pix...
def __init__(self, master=None, session=None): '\n Constructor of the class\n ' super().__init__(master) self.master = master self.grid(row=0, column=0) self.session = session self.mealname = tk.StringVar() self.create_widgets()
-2,930,560,312,995,248,600
Constructor of the class
gui/addmealpopup.py
__init__
Penaz91/fjournal
python
def __init__(self, master=None, session=None): '\n \n ' super().__init__(master) self.master = master self.grid(row=0, column=0) self.session = session self.mealname = tk.StringVar() self.create_widgets()
def create_widgets(self): '\n Creates the widgets for the popup\n ' self.meallbl = ttk.Label(self, text='Meal Name') self.meallbl.grid(row=0, column=0) self.mealinput = ttk.Entry(self, textvariable=self.mealname) self.mealinput.grid(row=0, column=1) self.addbtn = ttk.Button(self, t...
5,257,788,785,566,407,000
Creates the widgets for the popup
gui/addmealpopup.py
create_widgets
Penaz91/fjournal
python
def create_widgets(self): '\n \n ' self.meallbl = ttk.Label(self, text='Meal Name') self.meallbl.grid(row=0, column=0) self.mealinput = ttk.Entry(self, textvariable=self.mealname) self.mealinput.grid(row=0, column=1) self.addbtn = ttk.Button(self, text='Confirm', command=self.add_m...
def add_meal(self): '\n Opens the Add Meal popup\n ' meal = Meal(name=self.mealname.get()) self.session.add(meal) self.session.commit() self.master.destroy()
-7,492,770,554,143,263,000
Opens the Add Meal popup
gui/addmealpopup.py
add_meal
Penaz91/fjournal
python
def add_meal(self): '\n \n ' meal = Meal(name=self.mealname.get()) self.session.add(meal) self.session.commit() self.master.destroy()
def create_or_update_storage_password(self, props, logger): '\n unencrypted password in inputs.conf, encrypt it and store as storagePassword\n ' try: locale = 'reference' storage_passwords = self.service.storage_passwords if (props['username'] in storage_passwords): ...
5,640,986,405,998,167,000
unencrypted password in inputs.conf, encrypt it and store as storagePassword
bin/azure_monitor_metrics_main.py
create_or_update_storage_password
sebastus/AzureMonitorAddonForSplunk
python
def create_or_update_storage_password(self, props, logger): '\n \n ' try: locale = 'reference' storage_passwords = self.service.storage_passwords if (props['username'] in storage_passwords): locale = 'delete' storage_passwords.delete(props['username']) ...
def mask_id_and_key(self, name, logger): '\n masks the app_id and app_key in inputs.conf\n ' (kind, input_name) = name.split('://') item = self.service.inputs.__getitem__((input_name, kind)) try: new_input = {'vaultName': item.content.vaultName, 'SPNTenantID': item.content.SPNTenantID,...
5,995,213,074,449,839,000
masks the app_id and app_key in inputs.conf
bin/azure_monitor_metrics_main.py
mask_id_and_key
sebastus/AzureMonitorAddonForSplunk
python
def mask_id_and_key(self, name, logger): '\n \n ' (kind, input_name) = name.split('://') item = self.service.inputs.__getitem__((input_name, kind)) try: new_input = {'vaultName': item.content.vaultName, 'SPNTenantID': item.content.SPNTenantID, 'SPNApplicationId': MASK, 'SPNApplicationK...
def get_or_store_secrets(self, inputs, logger): '\n Either read existing encyrpted password or encrypt clear text password and store it\n Either way, return a set of clear text credentials\n ' input_items = inputs.inputs.itervalues().next() input_name = inputs.inputs.iterkeys().next() c...
977,659,677,259,260,400
Either read existing encyrpted password or encrypt clear text password and store it Either way, return a set of clear text credentials
bin/azure_monitor_metrics_main.py
get_or_store_secrets
sebastus/AzureMonitorAddonForSplunk
python
def get_or_store_secrets(self, inputs, logger): '\n Either read existing encyrpted password or encrypt clear text password and store it\n Either way, return a set of clear text credentials\n ' input_items = inputs.inputs.itervalues().next() input_name = inputs.inputs.iterkeys().next() c...
def get_app_id_and_key(self, props_app_id, props_app_key, logger): '\n get the encrypted app_id and app_key from storage_passwords\n ' storage_passwords = self.service.storage_passwords if (props_app_id['username'] not in storage_passwords): raise KeyError('Did not find app_id {} in storag...
3,914,703,477,364,691,500
get the encrypted app_id and app_key from storage_passwords
bin/azure_monitor_metrics_main.py
get_app_id_and_key
sebastus/AzureMonitorAddonForSplunk
python
def get_app_id_and_key(self, props_app_id, props_app_key, logger): '\n \n ' storage_passwords = self.service.storage_passwords if (props_app_id['username'] not in storage_passwords): raise KeyError('Did not find app_id {} in storage_passwords.'.format(props_app_id['username'])) if (pro...
def get_resources_for_rgs(ew, bearer_token, sub_url, resource_groups, input_sourcetype, checkpoint_dict): '\n map the resource groups to a function that gets resources\n ' resource_group_names = [] for resource_group in resource_groups: resource_group_names.append(resource_group['name']) ...
-5,780,757,164,133,059,000
map the resource groups to a function that gets resources
bin/azure_monitor_metrics_main.py
get_resources_for_rgs
sebastus/AzureMonitorAddonForSplunk
python
def get_resources_for_rgs(ew, bearer_token, sub_url, resource_groups, input_sourcetype, checkpoint_dict): '\n \n ' resource_group_names = [] for resource_group in resource_groups: resource_group_names.append(resource_group['name']) with futures.ThreadPoolExecutor(max_workers=5) as exec...
def get_metrics_for_subscription(inputs, credentials, ew): '\n top level function\n given subscription id and credentials, get metrics for all resources with the right tags\n splunk sends an array of inputs, but only one element, hence the [0]\n ' metadata = inputs.metadata (input_na...
-3,657,075,620,885,416,400
top level function given subscription id and credentials, get metrics for all resources with the right tags splunk sends an array of inputs, but only one element, hence the [0]
bin/azure_monitor_metrics_main.py
get_metrics_for_subscription
sebastus/AzureMonitorAddonForSplunk
python
def get_metrics_for_subscription(inputs, credentials, ew): '\n top level function\n given subscription id and credentials, get metrics for all resources with the right tags\n splunk sends an array of inputs, but only one element, hence the [0]\n ' metadata = inputs.metadata (input_na...
def get_edge_bin(array): 'Detect the edge indcies of a binary 1-D array.\n\n Args:\n array (:class:`numpy.ndarray`): A list or Numpy 1d array, with binary\n (0/1) or boolean (True/False) values.\n\n Returns:\n list: A list containing starting and ending indices of the non-zero\n ...
8,507,008,367,016,243,000
Detect the edge indcies of a binary 1-D array. Args: array (:class:`numpy.ndarray`): A list or Numpy 1d array, with binary (0/1) or boolean (True/False) values. Returns: list: A list containing starting and ending indices of the non-zero blocks. Examples: .. code-block:: python ...
gamse/utils/onedarray.py
get_edge_bin
wangleon/gamse
python
def get_edge_bin(array): 'Detect the edge indcies of a binary 1-D array.\n\n Args:\n array (:class:`numpy.ndarray`): A list or Numpy 1d array, with binary\n (0/1) or boolean (True/False) values.\n\n Returns:\n list: A list containing starting and ending indices of the non-zero\n ...
def get_local_minima(x, window=None): 'Get the local minima of a 1d array in a window.\n\n Args:\n x (:class:`numpy.ndarray`): A list or Numpy 1d array.\n window (*int* or :class:`numpy.ndarray`): An odd integer or a list of\n odd integers as the lengthes of searching window.\n Return...
-3,854,103,118,873,968,000
Get the local minima of a 1d array in a window. Args: x (:class:`numpy.ndarray`): A list or Numpy 1d array. window (*int* or :class:`numpy.ndarray`): An odd integer or a list of odd integers as the lengthes of searching window. Returns: tuple: A tuple containing: * **index** (:class:`numpy...
gamse/utils/onedarray.py
get_local_minima
wangleon/gamse
python
def get_local_minima(x, window=None): 'Get the local minima of a 1d array in a window.\n\n Args:\n x (:class:`numpy.ndarray`): A list or Numpy 1d array.\n window (*int* or :class:`numpy.ndarray`): An odd integer or a list of\n odd integers as the lengthes of searching window.\n Return...
def implete_none(lst): 'Replace the None elemnets at the beginning and the end of list by auto\n increment integers.\n \n Convert the first and last few `None` elements to auto increment integers.\n These integers are determined by the first and last integers in the input\n array.\n While the `Non...
-2,926,428,472,532,981,000
Replace the None elemnets at the beginning and the end of list by auto increment integers. Convert the first and last few `None` elements to auto increment integers. These integers are determined by the first and last integers in the input array. While the `None` elements between two integers in the input list will re...
gamse/utils/onedarray.py
implete_none
wangleon/gamse
python
def implete_none(lst): 'Replace the None elemnets at the beginning and the end of list by auto\n increment integers.\n \n Convert the first and last few `None` elements to auto increment integers.\n These integers are determined by the first and last integers in the input\n array.\n While the `Non...
def derivative(*args, **kwargs): 'Get the first derivative of data arrays (*x*, *y*).\n\n If **y** is not given, the first argument will be taken as **y**, and the\n differential of the input array will be returned.\n\n Args:\n x (list or :class:`numpy.ndarray`): X-values of the input array (optiona...
-1,023,508,425,012,736,900
Get the first derivative of data arrays (*x*, *y*). If **y** is not given, the first argument will be taken as **y**, and the differential of the input array will be returned. Args: x (list or :class:`numpy.ndarray`): X-values of the input array (optional). y (list or :class:`numpy.ndarray`): Y-values of the ...
gamse/utils/onedarray.py
derivative
wangleon/gamse
python
def derivative(*args, **kwargs): 'Get the first derivative of data arrays (*x*, *y*).\n\n If **y** is not given, the first argument will be taken as **y**, and the\n differential of the input array will be returned.\n\n Args:\n x (list or :class:`numpy.ndarray`): X-values of the input array (optiona...
def pairwise(array): 'Return pairwises of an iterable arrary.\n\n Args:\n array (list or :class:`numpy.ndarray`): The input iterable array.\n Returns:\n :class:`zip`: zip objects.\n ' (a, b) = tee(array) next(b, None) return zip(a, b)
7,734,158,313,875,277,000
Return pairwises of an iterable arrary. Args: array (list or :class:`numpy.ndarray`): The input iterable array. Returns: :class:`zip`: zip objects.
gamse/utils/onedarray.py
pairwise
wangleon/gamse
python
def pairwise(array): 'Return pairwises of an iterable arrary.\n\n Args:\n array (list or :class:`numpy.ndarray`): The input iterable array.\n Returns:\n :class:`zip`: zip objects.\n ' (a, b) = tee(array) next(b, None) return zip(a, b)
def smooth(array, points, deg): 'Smooth an array.\n\n Args:\n array (:class:`numpy.ndarray`): Input array.\n points (int): Points of smoothing.\n deg (int): Degree of smoothing.\n\n Returns:\n :class:`numpy.ndarray`: smoothed array\n\n ' n = array.size if (points == 5): ...
627,949,520,329,858,600
Smooth an array. Args: array (:class:`numpy.ndarray`): Input array. points (int): Points of smoothing. deg (int): Degree of smoothing. Returns: :class:`numpy.ndarray`: smoothed array
gamse/utils/onedarray.py
smooth
wangleon/gamse
python
def smooth(array, points, deg): 'Smooth an array.\n\n Args:\n array (:class:`numpy.ndarray`): Input array.\n points (int): Points of smoothing.\n deg (int): Degree of smoothing.\n\n Returns:\n :class:`numpy.ndarray`: smoothed array\n\n ' n = array.size if (points == 5): ...
def iterative_savgol_filter(y, winlen=5, order=3, maxiter=10, upper_clip=None, lower_clip=None): 'Smooth the input array with Savitzky-Golay filter with lower and/or\n upper clippings.\n\n Args:\n y (:class:`numpy.ndarray`): Input array.\n winlen (int): Window length of Savitzky-Golay filter.\n ...
8,435,448,282,620,777,000
Smooth the input array with Savitzky-Golay filter with lower and/or upper clippings. Args: y (:class:`numpy.ndarray`): Input array. winlen (int): Window length of Savitzky-Golay filter. order (int): Order of Savitzky-Gaoly filter. maxiter (int): Maximum number of iterations. lower_clip (float): Low...
gamse/utils/onedarray.py
iterative_savgol_filter
wangleon/gamse
python
def iterative_savgol_filter(y, winlen=5, order=3, maxiter=10, upper_clip=None, lower_clip=None): 'Smooth the input array with Savitzky-Golay filter with lower and/or\n upper clippings.\n\n Args:\n y (:class:`numpy.ndarray`): Input array.\n winlen (int): Window length of Savitzky-Golay filter.\n ...
def process_file(filepath): '\n Rewrite links in `filepath` as follows: /some/path/index.html --> /some/path/\n ' if filepath.endswith('.html'): with open(filepath, 'r') as htmlfile: page = bs4.BeautifulSoup(htmlfile.read(), 'html.parser') links = page.find_all('a') for...
-6,710,581,133,354,374,000
Rewrite links in `filepath` as follows: /some/path/index.html --> /some/path/
scripts/deindexify.py
process_file
learningequality/channel2site
python
def process_file(filepath): '\n \n ' if filepath.endswith('.html'): with open(filepath, 'r') as htmlfile: page = bs4.BeautifulSoup(htmlfile.read(), 'html.parser') links = page.find_all('a') for link in links: href = link['href'] if href.endswith(...
def deindexify(webroot): '\n Walks directory stucutre starting at `webroot` and rewrites all folder links.\n ' content_folders = list(os.walk(webroot)) for (rel_path, _subfolders, filenames) in content_folders: for filename in filenames: filepath = os.path.join(rel_path, filename) ...
-8,528,974,312,587,828,000
Walks directory stucutre starting at `webroot` and rewrites all folder links.
scripts/deindexify.py
deindexify
learningequality/channel2site
python
def deindexify(webroot): '\n \n ' content_folders = list(os.walk(webroot)) for (rel_path, _subfolders, filenames) in content_folders: for filename in filenames: filepath = os.path.join(rel_path, filename) if filepath.endswith('_Subtitle.vtt'): video_matc...
def parse(self, stream, media_type=None, parser_context=None): '\n Given a stream to read from, return the parsed representation.\n Should return parsed data, or a `DataAndFiles` object consisting of the\n parsed data and files.\n ' raise NotImplementedError('.parse() must be overrid...
-8,064,463,045,055,576,000
Given a stream to read from, return the parsed representation. Should return parsed data, or a `DataAndFiles` object consisting of the parsed data and files.
mparser.py
parse
marco-aziz/mPulse
python
def parse(self, stream, media_type=None, parser_context=None): '\n Given a stream to read from, return the parsed representation.\n Should return parsed data, or a `DataAndFiles` object consisting of the\n parsed data and files.\n ' raise NotImplementedError('.parse() must be overrid...
def parse(self, stream, media_type=None, parser_context=None): "\n Treats the incoming bytestream as a raw file upload and returns\n a `DataAndFiles` object.\n\n `.data` will be None (we expect request body to be a file content).\n `.files` will be a `QueryDict` containing one 'file' ele...
-881,799,613,844,011,000
Treats the incoming bytestream as a raw file upload and returns a `DataAndFiles` object. `.data` will be None (we expect request body to be a file content). `.files` will be a `QueryDict` containing one 'file' element.
mparser.py
parse
marco-aziz/mPulse
python
def parse(self, stream, media_type=None, parser_context=None): "\n Treats the incoming bytestream as a raw file upload and returns\n a `DataAndFiles` object.\n\n `.data` will be None (we expect request body to be a file content).\n `.files` will be a `QueryDict` containing one 'file' ele...
def get_filename(self, stream, media_type, parser_context): "\n Detects the uploaded file name. First searches a 'filename' url kwarg.\n Then tries to parse Content-Disposition header.\n " try: return parser_context['kwargs']['filename'] except KeyError: pass try: ...
7,388,234,637,951,297,000
Detects the uploaded file name. First searches a 'filename' url kwarg. Then tries to parse Content-Disposition header.
mparser.py
get_filename
marco-aziz/mPulse
python
def get_filename(self, stream, media_type, parser_context): "\n Detects the uploaded file name. First searches a 'filename' url kwarg.\n Then tries to parse Content-Disposition header.\n " try: return parser_context['kwargs']['filename'] except KeyError: pass try: ...
def get_encoded_filename(self, filename_parm): '\n Handle encoded filenames per RFC6266. See also:\n https://tools.ietf.org/html/rfc2231#section-4\n ' encoded_filename = force_str(filename_parm['filename*']) try: (charset, lang, filename) = encoded_filename.split("'", 2) ...
3,080,074,238,029,017,600
Handle encoded filenames per RFC6266. See also: https://tools.ietf.org/html/rfc2231#section-4
mparser.py
get_encoded_filename
marco-aziz/mPulse
python
def get_encoded_filename(self, filename_parm): '\n Handle encoded filenames per RFC6266. See also:\n https://tools.ietf.org/html/rfc2231#section-4\n ' encoded_filename = force_str(filename_parm['filename*']) try: (charset, lang, filename) = encoded_filename.split("'", 2) ...
def Dispose(self): ' Dispose(self: Element,A_0: bool) ' pass
-1,686,048,740,131,138,300
Dispose(self: Element,A_0: bool)
release/stubs.min/Autodesk/Revit/DB/__init___parts/CurveByPoints.py
Dispose
BCSharp/ironpython-stubs
python
def Dispose(self): ' ' pass
def getBoundingBox(self, *args): ' getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ ' pass
5,691,465,885,205,531,000
getBoundingBox(self: Element,view: View) -> BoundingBoxXYZ
release/stubs.min/Autodesk/Revit/DB/__init___parts/CurveByPoints.py
getBoundingBox
BCSharp/ironpython-stubs
python
def getBoundingBox(self, *args): ' ' pass
def GetPoints(self): '\n GetPoints(self: CurveByPoints) -> ReferencePointArray\n\n \n\n Get the sequence of points interpolated by this curve.\n ' pass
-1,463,154,680,210,113,500
GetPoints(self: CurveByPoints) -> ReferencePointArray Get the sequence of points interpolated by this curve.
release/stubs.min/Autodesk/Revit/DB/__init___parts/CurveByPoints.py
GetPoints
BCSharp/ironpython-stubs
python
def GetPoints(self): '\n GetPoints(self: CurveByPoints) -> ReferencePointArray\n\n \n\n Get the sequence of points interpolated by this curve.\n ' pass
def GetVisibility(self): '\n GetVisibility(self: CurveByPoints) -> FamilyElementVisibility\n\n \n\n Gets the visibility.\n\n Returns: A copy of visibility settings for the curve.\n ' pass
-7,174,960,410,123,180,000
GetVisibility(self: CurveByPoints) -> FamilyElementVisibility Gets the visibility. Returns: A copy of visibility settings for the curve.
release/stubs.min/Autodesk/Revit/DB/__init___parts/CurveByPoints.py
GetVisibility
BCSharp/ironpython-stubs
python
def GetVisibility(self): '\n GetVisibility(self: CurveByPoints) -> FamilyElementVisibility\n\n \n\n Gets the visibility.\n\n Returns: A copy of visibility settings for the curve.\n ' pass
def ReleaseUnmanagedResources(self, *args): ' ReleaseUnmanagedResources(self: Element,disposing: bool) ' pass
-5,457,876,814,946,568,000
ReleaseUnmanagedResources(self: Element,disposing: bool)
release/stubs.min/Autodesk/Revit/DB/__init___parts/CurveByPoints.py
ReleaseUnmanagedResources
BCSharp/ironpython-stubs
python
def ReleaseUnmanagedResources(self, *args): ' ' pass
def setElementType(self, *args): ' setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str) ' pass
2,544,228,957,635,987,500
setElementType(self: Element,type: ElementType,incompatibleExceptionMessage: str)
release/stubs.min/Autodesk/Revit/DB/__init___parts/CurveByPoints.py
setElementType
BCSharp/ironpython-stubs
python
def setElementType(self, *args): ' ' pass
def SetPoints(self, points): '\n SetPoints(self: CurveByPoints,points: ReferencePointArray)\n\n Change the sequence of points interpolated by this curve.\n\n \n\n points: An array of 2 or more ReferencePoints.\n ' pass
-4,495,061,781,904,432,000
SetPoints(self: CurveByPoints,points: ReferencePointArray) Change the sequence of points interpolated by this curve. points: An array of 2 or more ReferencePoints.
release/stubs.min/Autodesk/Revit/DB/__init___parts/CurveByPoints.py
SetPoints
BCSharp/ironpython-stubs
python
def SetPoints(self, points): '\n SetPoints(self: CurveByPoints,points: ReferencePointArray)\n\n Change the sequence of points interpolated by this curve.\n\n \n\n points: An array of 2 or more ReferencePoints.\n ' pass
def SetVisibility(self, visibility): '\n SetVisibility(self: CurveByPoints,visibility: FamilyElementVisibility)\n\n Sets the visibility.\n ' pass
-2,096,814,541,229,781,000
SetVisibility(self: CurveByPoints,visibility: FamilyElementVisibility) Sets the visibility.
release/stubs.min/Autodesk/Revit/DB/__init___parts/CurveByPoints.py
SetVisibility
BCSharp/ironpython-stubs
python
def SetVisibility(self, visibility): '\n SetVisibility(self: CurveByPoints,visibility: FamilyElementVisibility)\n\n Sets the visibility.\n ' pass
@staticmethod def SortPoints(arr): '\n SortPoints(arr: ReferencePointArray) -> bool\n\n \n\n Order a set of ReferencePoints in the same way Revit does\n\n when creating a \n\n curve from points.\n\n \n\n \n\n arr: An array of ReferencePoints. The array is reordered\n\n if sortPoints returns \n\n tru...
5,999,849,956,802,627,000
SortPoints(arr: ReferencePointArray) -> bool Order a set of ReferencePoints in the same way Revit does when creating a curve from points. arr: An array of ReferencePoints. The array is reordered if sortPoints returns true,and is unchanged if sortPoints returns false. Returns: False if the least...
release/stubs.min/Autodesk/Revit/DB/__init___parts/CurveByPoints.py
SortPoints
BCSharp/ironpython-stubs
python
@staticmethod def SortPoints(arr): '\n SortPoints(arr: ReferencePointArray) -> bool\n\n \n\n Order a set of ReferencePoints in the same way Revit does\n\n when creating a \n\n curve from points.\n\n \n\n \n\n arr: An array of ReferencePoints. The array is reordered\n\n if sortPoints returns \n\n tru...
def __enter__(self, *args): ' __enter__(self: IDisposable) -> object ' pass
-4,485,805,406,909,797,400
__enter__(self: IDisposable) -> object
release/stubs.min/Autodesk/Revit/DB/__init___parts/CurveByPoints.py
__enter__
BCSharp/ironpython-stubs
python
def __enter__(self, *args): ' ' pass
def __exit__(self, *args): ' __exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object) ' pass
-8,148,954,987,636,554,000
__exit__(self: IDisposable,exc_type: object,exc_value: object,exc_back: object)
release/stubs.min/Autodesk/Revit/DB/__init___parts/CurveByPoints.py
__exit__
BCSharp/ironpython-stubs
python
def __exit__(self, *args): ' ' pass
def __init__(self, *args): ' x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature ' pass
-90,002,593,062,007,400
x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature
release/stubs.min/Autodesk/Revit/DB/__init___parts/CurveByPoints.py
__init__
BCSharp/ironpython-stubs
python
def __init__(self, *args): ' ' pass
@staticmethod def _get_original_labels(val_path): 'Returns labels for validation.\n\n Args:\n val_path: path to TAR file containing validation images. It is used to\n retrieve the name of pictures and associate them to labels.\n\n Returns:\n dict, mapping from image name (str) to label (str).\n...
-8,557,001,365,274,106,000
Returns labels for validation. Args: val_path: path to TAR file containing validation images. It is used to retrieve the name of pictures and associate them to labels. Returns: dict, mapping from image name (str) to label (str).
tensorflow_datasets/image_classification/imagenet2012_real.py
_get_original_labels
Abduttayyeb/datasets
python
@staticmethod def _get_original_labels(val_path): 'Returns labels for validation.\n\n Args:\n val_path: path to TAR file containing validation images. It is used to\n retrieve the name of pictures and associate them to labels.\n\n Returns:\n dict, mapping from image name (str) to label (str).\n...
def test_vifport(self): 'create and stringify vif port, confirm no exceptions' self.mox.ReplayAll() pname = 'vif1.0' ofport = 5 vif_id = uuidutils.generate_uuid() mac = 'ca:fe:de:ad:be:ef' port = ovs_lib.VifPort(pname, ofport, vif_id, mac, self.br) self.assertEqual(port.port_name, pname)...
-6,393,318,519,462,724,000
create and stringify vif port, confirm no exceptions
quantum/tests/unit/openvswitch/test_ovs_lib.py
test_vifport
ericwanghp/quantum
python
def test_vifport(self): self.mox.ReplayAll() pname = 'vif1.0' ofport = 5 vif_id = uuidutils.generate_uuid() mac = 'ca:fe:de:ad:be:ef' port = ovs_lib.VifPort(pname, ofport, vif_id, mac, self.br) self.assertEqual(port.port_name, pname) self.assertEqual(port.ofport, ofport) self.as...