body_hash
stringlengths
64
64
body
stringlengths
23
109k
docstring
stringlengths
1
57k
path
stringlengths
4
198
name
stringlengths
1
115
repository_name
stringlengths
7
111
repository_stars
float64
0
191k
lang
stringclasses
1 value
body_without_docstring
stringlengths
14
108k
unified
stringlengths
45
133k
c40a8e83777a384fa7c09f7925ae43a6d8f0063a7499fe411dda86d6fc31b317
@external_stylesheets.setter def external_stylesheets(self, external_stylesheets: list) -> None: 'Set optional external stylesheets to be used in the Dash\n application. The input variable `external_stylesheets` should be\n a list.' self._external_stylesheets = external_stylesheets
Set optional external stylesheets to be used in the Dash application. The input variable `external_stylesheets` should be a list.
webviz_config/_theme_class.py
external_stylesheets
magnesj/webviz-config
44
python
@external_stylesheets.setter def external_stylesheets(self, external_stylesheets: list) -> None: 'Set optional external stylesheets to be used in the Dash\n application. The input variable `external_stylesheets` should be\n a list.' self._external_stylesheets = external_stylesheets
@external_stylesheets.setter def external_stylesheets(self, external_stylesheets: list) -> None: 'Set optional external stylesheets to be used in the Dash\n application. The input variable `external_stylesheets` should be\n a list.' self._external_stylesheets = external_stylesheets<|docstring|>Set...
81d403103576e081e793107e976a1efac24f52796b85df3f6d19d269f15e5c6d
@assets.setter def assets(self, assets: list) -> None: 'Set optional theme assets to be copied over to the `./assets` folder\n when the webviz dash application is created. The input variable\n `assets` should be a list of absolute file paths to the different\n assets.\n ' self._asset...
Set optional theme assets to be copied over to the `./assets` folder when the webviz dash application is created. The input variable `assets` should be a list of absolute file paths to the different assets.
webviz_config/_theme_class.py
assets
magnesj/webviz-config
44
python
@assets.setter def assets(self, assets: list) -> None: 'Set optional theme assets to be copied over to the `./assets` folder\n when the webviz dash application is created. The input variable\n `assets` should be a list of absolute file paths to the different\n assets.\n ' self._asset...
@assets.setter def assets(self, assets: list) -> None: 'Set optional theme assets to be copied over to the `./assets` folder\n when the webviz dash application is created. The input variable\n `assets` should be a list of absolute file paths to the different\n assets.\n ' self._asset...
bd166e5c32368c8916f4c0d7177fc7cff945f2101f0eebbfacb93779a235ae90
def __init__(self, content_caching_parent_capabilities_id=None, imports=None, namespaces=None, personal_content=None, query_parameters=None, shared_content=None, prioritization=None, local_vars_configuration=None): 'ComputerContentCachingParentCapabilities - a model defined in OpenAPI' if (local_vars_configurat...
ComputerContentCachingParentCapabilities - a model defined in OpenAPI
jamf/models/computer_content_caching_parent_capabilities.py
__init__
jensenbox/python-jamf
1
python
def __init__(self, content_caching_parent_capabilities_id=None, imports=None, namespaces=None, personal_content=None, query_parameters=None, shared_content=None, prioritization=None, local_vars_configuration=None): if (local_vars_configuration is None): local_vars_configuration = Configuration() se...
def __init__(self, content_caching_parent_capabilities_id=None, imports=None, namespaces=None, personal_content=None, query_parameters=None, shared_content=None, prioritization=None, local_vars_configuration=None): if (local_vars_configuration is None): local_vars_configuration = Configuration() se...
187776c2c4840567382766ca950f99c3f6f1f8ad71654cd737ad8cb2d7b30097
@property def content_caching_parent_capabilities_id(self): 'Gets the content_caching_parent_capabilities_id of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The content_caching_parent_capabilities_id of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtyp...
Gets the content_caching_parent_capabilities_id of this ComputerContentCachingParentCapabilities. # noqa: E501 :return: The content_caching_parent_capabilities_id of this ComputerContentCachingParentCapabilities. # noqa: E501 :rtype: str
jamf/models/computer_content_caching_parent_capabilities.py
content_caching_parent_capabilities_id
jensenbox/python-jamf
1
python
@property def content_caching_parent_capabilities_id(self): 'Gets the content_caching_parent_capabilities_id of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The content_caching_parent_capabilities_id of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtyp...
@property def content_caching_parent_capabilities_id(self): 'Gets the content_caching_parent_capabilities_id of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The content_caching_parent_capabilities_id of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtyp...
caf7db01989b53d8d85f1c5ab25a0d8b7f85a209985eb249b08dfe6972e06ba8
@content_caching_parent_capabilities_id.setter def content_caching_parent_capabilities_id(self, content_caching_parent_capabilities_id): 'Sets the content_caching_parent_capabilities_id of this ComputerContentCachingParentCapabilities.\n\n\n :param content_caching_parent_capabilities_id: The content_caching_...
Sets the content_caching_parent_capabilities_id of this ComputerContentCachingParentCapabilities. :param content_caching_parent_capabilities_id: The content_caching_parent_capabilities_id of this ComputerContentCachingParentCapabilities. # noqa: E501 :type content_caching_parent_capabilities_id: str
jamf/models/computer_content_caching_parent_capabilities.py
content_caching_parent_capabilities_id
jensenbox/python-jamf
1
python
@content_caching_parent_capabilities_id.setter def content_caching_parent_capabilities_id(self, content_caching_parent_capabilities_id): 'Sets the content_caching_parent_capabilities_id of this ComputerContentCachingParentCapabilities.\n\n\n :param content_caching_parent_capabilities_id: The content_caching_...
@content_caching_parent_capabilities_id.setter def content_caching_parent_capabilities_id(self, content_caching_parent_capabilities_id): 'Sets the content_caching_parent_capabilities_id of this ComputerContentCachingParentCapabilities.\n\n\n :param content_caching_parent_capabilities_id: The content_caching_...
1941cad6abea63f5282c6c557a154a92b3990f682756dce0c8c9f8e081976982
@property def imports(self): 'Gets the imports of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The imports of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._imports
Gets the imports of this ComputerContentCachingParentCapabilities. # noqa: E501 :return: The imports of this ComputerContentCachingParentCapabilities. # noqa: E501 :rtype: bool
jamf/models/computer_content_caching_parent_capabilities.py
imports
jensenbox/python-jamf
1
python
@property def imports(self): 'Gets the imports of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The imports of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._imports
@property def imports(self): 'Gets the imports of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The imports of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._imports<|docstring|>Gets the imports of this ComputerCont...
05aeaebef6d616922718b1f136a43885e661d7eab3f6252353b7e7db5f5e3c56
@imports.setter def imports(self, imports): 'Sets the imports of this ComputerContentCachingParentCapabilities.\n\n\n :param imports: The imports of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type imports: bool\n ' self._imports = imports
Sets the imports of this ComputerContentCachingParentCapabilities. :param imports: The imports of this ComputerContentCachingParentCapabilities. # noqa: E501 :type imports: bool
jamf/models/computer_content_caching_parent_capabilities.py
imports
jensenbox/python-jamf
1
python
@imports.setter def imports(self, imports): 'Sets the imports of this ComputerContentCachingParentCapabilities.\n\n\n :param imports: The imports of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type imports: bool\n ' self._imports = imports
@imports.setter def imports(self, imports): 'Sets the imports of this ComputerContentCachingParentCapabilities.\n\n\n :param imports: The imports of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type imports: bool\n ' self._imports = imports<|docstring|>Sets the imports of...
ed3c7ef8c8d9421691ae6cfea02a249a62aa59351c6a74e7eb7a81c9894b6eb4
@property def namespaces(self): 'Gets the namespaces of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The namespaces of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._namespaces
Gets the namespaces of this ComputerContentCachingParentCapabilities. # noqa: E501 :return: The namespaces of this ComputerContentCachingParentCapabilities. # noqa: E501 :rtype: bool
jamf/models/computer_content_caching_parent_capabilities.py
namespaces
jensenbox/python-jamf
1
python
@property def namespaces(self): 'Gets the namespaces of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The namespaces of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._namespaces
@property def namespaces(self): 'Gets the namespaces of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The namespaces of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._namespaces<|docstring|>Gets the namespaces of th...
ad212932ef017938c222d50cd5f5c5ddffedefe9aa8f9f8fadba8f40d2c43e48
@namespaces.setter def namespaces(self, namespaces): 'Sets the namespaces of this ComputerContentCachingParentCapabilities.\n\n\n :param namespaces: The namespaces of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type namespaces: bool\n ' self._namespaces = namespaces
Sets the namespaces of this ComputerContentCachingParentCapabilities. :param namespaces: The namespaces of this ComputerContentCachingParentCapabilities. # noqa: E501 :type namespaces: bool
jamf/models/computer_content_caching_parent_capabilities.py
namespaces
jensenbox/python-jamf
1
python
@namespaces.setter def namespaces(self, namespaces): 'Sets the namespaces of this ComputerContentCachingParentCapabilities.\n\n\n :param namespaces: The namespaces of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type namespaces: bool\n ' self._namespaces = namespaces
@namespaces.setter def namespaces(self, namespaces): 'Sets the namespaces of this ComputerContentCachingParentCapabilities.\n\n\n :param namespaces: The namespaces of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type namespaces: bool\n ' self._namespaces = namespaces<|doc...
0cebc95241ece33bb9aa8ab0dbcbc651df550ad4892ff026c7bc551b458024b1
@property def personal_content(self): 'Gets the personal_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The personal_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._personal_content
Gets the personal_content of this ComputerContentCachingParentCapabilities. # noqa: E501 :return: The personal_content of this ComputerContentCachingParentCapabilities. # noqa: E501 :rtype: bool
jamf/models/computer_content_caching_parent_capabilities.py
personal_content
jensenbox/python-jamf
1
python
@property def personal_content(self): 'Gets the personal_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The personal_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._personal_content
@property def personal_content(self): 'Gets the personal_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The personal_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._personal_content<|docstring|>G...
61a991855ede7dafdb5608e90b07f4eaaeca3b0c9315cbe648f82de813cd90a8
@personal_content.setter def personal_content(self, personal_content): 'Sets the personal_content of this ComputerContentCachingParentCapabilities.\n\n\n :param personal_content: The personal_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type personal_content: bool\n ...
Sets the personal_content of this ComputerContentCachingParentCapabilities. :param personal_content: The personal_content of this ComputerContentCachingParentCapabilities. # noqa: E501 :type personal_content: bool
jamf/models/computer_content_caching_parent_capabilities.py
personal_content
jensenbox/python-jamf
1
python
@personal_content.setter def personal_content(self, personal_content): 'Sets the personal_content of this ComputerContentCachingParentCapabilities.\n\n\n :param personal_content: The personal_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type personal_content: bool\n ...
@personal_content.setter def personal_content(self, personal_content): 'Sets the personal_content of this ComputerContentCachingParentCapabilities.\n\n\n :param personal_content: The personal_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type personal_content: bool\n ...
6b7affc48cf86b179451a96345d8ce94d69381707d56773f19b3b82166a10715
@property def query_parameters(self): 'Gets the query_parameters of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The query_parameters of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._query_parameters
Gets the query_parameters of this ComputerContentCachingParentCapabilities. # noqa: E501 :return: The query_parameters of this ComputerContentCachingParentCapabilities. # noqa: E501 :rtype: bool
jamf/models/computer_content_caching_parent_capabilities.py
query_parameters
jensenbox/python-jamf
1
python
@property def query_parameters(self): 'Gets the query_parameters of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The query_parameters of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._query_parameters
@property def query_parameters(self): 'Gets the query_parameters of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The query_parameters of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._query_parameters<|docstring|>G...
96a423acda405ceb3b1aeb4605e80bdb150beaef475bf05fb9156e64ef0ce7f7
@query_parameters.setter def query_parameters(self, query_parameters): 'Sets the query_parameters of this ComputerContentCachingParentCapabilities.\n\n\n :param query_parameters: The query_parameters of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type query_parameters: bool\n ...
Sets the query_parameters of this ComputerContentCachingParentCapabilities. :param query_parameters: The query_parameters of this ComputerContentCachingParentCapabilities. # noqa: E501 :type query_parameters: bool
jamf/models/computer_content_caching_parent_capabilities.py
query_parameters
jensenbox/python-jamf
1
python
@query_parameters.setter def query_parameters(self, query_parameters): 'Sets the query_parameters of this ComputerContentCachingParentCapabilities.\n\n\n :param query_parameters: The query_parameters of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type query_parameters: bool\n ...
@query_parameters.setter def query_parameters(self, query_parameters): 'Sets the query_parameters of this ComputerContentCachingParentCapabilities.\n\n\n :param query_parameters: The query_parameters of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type query_parameters: bool\n ...
8b6e5dbb69b09dd1b7b1ae7bb6c6244091ff5ba01038ad3b7d2505aaacea3c35
@property def shared_content(self): 'Gets the shared_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The shared_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._shared_content
Gets the shared_content of this ComputerContentCachingParentCapabilities. # noqa: E501 :return: The shared_content of this ComputerContentCachingParentCapabilities. # noqa: E501 :rtype: bool
jamf/models/computer_content_caching_parent_capabilities.py
shared_content
jensenbox/python-jamf
1
python
@property def shared_content(self): 'Gets the shared_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The shared_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._shared_content
@property def shared_content(self): 'Gets the shared_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The shared_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._shared_content<|docstring|>Gets the ...
48469b2b33844797435c4eae8bbec5a153842a24dd08dc509aed630f471136ae
@shared_content.setter def shared_content(self, shared_content): 'Sets the shared_content of this ComputerContentCachingParentCapabilities.\n\n\n :param shared_content: The shared_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type shared_content: bool\n ' self._...
Sets the shared_content of this ComputerContentCachingParentCapabilities. :param shared_content: The shared_content of this ComputerContentCachingParentCapabilities. # noqa: E501 :type shared_content: bool
jamf/models/computer_content_caching_parent_capabilities.py
shared_content
jensenbox/python-jamf
1
python
@shared_content.setter def shared_content(self, shared_content): 'Sets the shared_content of this ComputerContentCachingParentCapabilities.\n\n\n :param shared_content: The shared_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type shared_content: bool\n ' self._...
@shared_content.setter def shared_content(self, shared_content): 'Sets the shared_content of this ComputerContentCachingParentCapabilities.\n\n\n :param shared_content: The shared_content of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type shared_content: bool\n ' self._...
a6a6835c5dc884b6661fe3dda608a13f44486e46d72fc28d05d74cbb3191a978
@property def prioritization(self): 'Gets the prioritization of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The prioritization of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._prioritization
Gets the prioritization of this ComputerContentCachingParentCapabilities. # noqa: E501 :return: The prioritization of this ComputerContentCachingParentCapabilities. # noqa: E501 :rtype: bool
jamf/models/computer_content_caching_parent_capabilities.py
prioritization
jensenbox/python-jamf
1
python
@property def prioritization(self): 'Gets the prioritization of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The prioritization of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._prioritization
@property def prioritization(self): 'Gets the prioritization of this ComputerContentCachingParentCapabilities. # noqa: E501\n\n\n :return: The prioritization of this ComputerContentCachingParentCapabilities. # noqa: E501\n :rtype: bool\n ' return self._prioritization<|docstring|>Gets the ...
a8c3def180e674394d66d4e5a8a7102607133e7c3fa8aa6a928c17fe58ce51cd
@prioritization.setter def prioritization(self, prioritization): 'Sets the prioritization of this ComputerContentCachingParentCapabilities.\n\n\n :param prioritization: The prioritization of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type prioritization: bool\n ' self._...
Sets the prioritization of this ComputerContentCachingParentCapabilities. :param prioritization: The prioritization of this ComputerContentCachingParentCapabilities. # noqa: E501 :type prioritization: bool
jamf/models/computer_content_caching_parent_capabilities.py
prioritization
jensenbox/python-jamf
1
python
@prioritization.setter def prioritization(self, prioritization): 'Sets the prioritization of this ComputerContentCachingParentCapabilities.\n\n\n :param prioritization: The prioritization of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type prioritization: bool\n ' self._...
@prioritization.setter def prioritization(self, prioritization): 'Sets the prioritization of this ComputerContentCachingParentCapabilities.\n\n\n :param prioritization: The prioritization of this ComputerContentCachingParentCapabilities. # noqa: E501\n :type prioritization: bool\n ' self._...
5a4e41bb6a0def746593298cb605df98f1366e957c4ca89b12010ea7db707963
def to_dict(self): 'Returns the model properties as a dict' result = {} for (attr, _) in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value)) e...
Returns the model properties as a dict
jamf/models/computer_content_caching_parent_capabilities.py
to_dict
jensenbox/python-jamf
1
python
def to_dict(self): result = {} for (attr, _) in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value)) elif hasattr(value, 'to_dict'): ...
def to_dict(self): result = {} for (attr, _) in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value)) elif hasattr(value, 'to_dict'): ...
cbb19eaa2fc8a113d9e32f924ef280a7e97563f8915f94f65dab438997af2e99
def to_str(self): 'Returns the string representation of the model' return pprint.pformat(self.to_dict())
Returns the string representation of the model
jamf/models/computer_content_caching_parent_capabilities.py
to_str
jensenbox/python-jamf
1
python
def to_str(self): return pprint.pformat(self.to_dict())
def to_str(self): return pprint.pformat(self.to_dict())<|docstring|>Returns the string representation of the model<|endoftext|>
772243a2c2b3261a9b954d07aaf295e3c1242a579a495e2d6a5679c677861703
def __repr__(self): 'For `print` and `pprint`' return self.to_str()
For `print` and `pprint`
jamf/models/computer_content_caching_parent_capabilities.py
__repr__
jensenbox/python-jamf
1
python
def __repr__(self): return self.to_str()
def __repr__(self): return self.to_str()<|docstring|>For `print` and `pprint`<|endoftext|>
e1d3947da68403c4865fd043ca290ba466e045bad9d50292d5fb5b736ac2ab89
def __eq__(self, other): 'Returns true if both objects are equal' if (not isinstance(other, ComputerContentCachingParentCapabilities)): return False return (self.to_dict() == other.to_dict())
Returns true if both objects are equal
jamf/models/computer_content_caching_parent_capabilities.py
__eq__
jensenbox/python-jamf
1
python
def __eq__(self, other): if (not isinstance(other, ComputerContentCachingParentCapabilities)): return False return (self.to_dict() == other.to_dict())
def __eq__(self, other): if (not isinstance(other, ComputerContentCachingParentCapabilities)): return False return (self.to_dict() == other.to_dict())<|docstring|>Returns true if both objects are equal<|endoftext|>
7954d02bc09fedecd5a074434db76e84de652db96110887c518c32f76d37e919
def __ne__(self, other): 'Returns true if both objects are not equal' if (not isinstance(other, ComputerContentCachingParentCapabilities)): return True return (self.to_dict() != other.to_dict())
Returns true if both objects are not equal
jamf/models/computer_content_caching_parent_capabilities.py
__ne__
jensenbox/python-jamf
1
python
def __ne__(self, other): if (not isinstance(other, ComputerContentCachingParentCapabilities)): return True return (self.to_dict() != other.to_dict())
def __ne__(self, other): if (not isinstance(other, ComputerContentCachingParentCapabilities)): return True return (self.to_dict() != other.to_dict())<|docstring|>Returns true if both objects are not equal<|endoftext|>
c5ffa81203ba9877647ec6c2cf868f6756fc3faec515440123172d0b831dd612
def get_legislation_affecting_rcw_cite(biennium: str, rcw_cite: str) -> Dict[(str, Any)]: 'See: http://wslwebservices.leg.wa.gov/rcwciteaffectedservice.asmx?op=GetLegislationAffectingRcwCite' argdict: Dict[(str, Any)] = dict(biennium=biennium, rcwCite=rcw_cite) keydict: Dict[(str, Any)] = {'billnumber': int...
See: http://wslwebservices.leg.wa.gov/rcwciteaffectedservice.asmx?op=GetLegislationAffectingRcwCite
wa_leg_api/rcwciteaffected.py
get_legislation_affecting_rcw_cite
ryansloan/wa-leg-api
3
python
def get_legislation_affecting_rcw_cite(biennium: str, rcw_cite: str) -> Dict[(str, Any)]: argdict: Dict[(str, Any)] = dict(biennium=biennium, rcwCite=rcw_cite) keydict: Dict[(str, Any)] = {'billnumber': int, 'substituteversion': int, 'engrossedversion': int, 'active': (lambda boolstr: (boolstr.lower() == '...
def get_legislation_affecting_rcw_cite(biennium: str, rcw_cite: str) -> Dict[(str, Any)]: argdict: Dict[(str, Any)] = dict(biennium=biennium, rcwCite=rcw_cite) keydict: Dict[(str, Any)] = {'billnumber': int, 'substituteversion': int, 'engrossedversion': int, 'active': (lambda boolstr: (boolstr.lower() == '...
137686993c5c9cbef09dec2e26a9c6c25ce5ef7ff1fbd7dc0bc0495107f34bd1
def get_legislation_affecting_rcw(biennium: str, rcw_cite: str) -> Dict[(str, Any)]: 'See: http://wslwebservices.leg.wa.gov/rcwciteaffectedservice.asmx?op=GetLegislationAffectingRcw' argdict: Dict[(str, Any)] = dict(biennium=biennium, rcwCite=rcw_cite) keydict: Dict[(str, Any)] = {'billnumber': int, 'substi...
See: http://wslwebservices.leg.wa.gov/rcwciteaffectedservice.asmx?op=GetLegislationAffectingRcw
wa_leg_api/rcwciteaffected.py
get_legislation_affecting_rcw
ryansloan/wa-leg-api
3
python
def get_legislation_affecting_rcw(biennium: str, rcw_cite: str) -> Dict[(str, Any)]: argdict: Dict[(str, Any)] = dict(biennium=biennium, rcwCite=rcw_cite) keydict: Dict[(str, Any)] = {'billnumber': int, 'substituteversion': int, 'engrossedversion': int, 'active': (lambda boolstr: (boolstr.lower() == 'true'...
def get_legislation_affecting_rcw(biennium: str, rcw_cite: str) -> Dict[(str, Any)]: argdict: Dict[(str, Any)] = dict(biennium=biennium, rcwCite=rcw_cite) keydict: Dict[(str, Any)] = {'billnumber': int, 'substituteversion': int, 'engrossedversion': int, 'active': (lambda boolstr: (boolstr.lower() == 'true'...
55eb2c1c98644dc267061c06b5ed6b99311b545a8a14f8e238746bfd846d1ff3
def _match_query(query, attrs, attrs_checked): 'Match an ldap query to an attribute dictionary.\n\n The characters &, |, and ! are supported in the query. No syntax checking\n is performed, so malformed queries will not work correctly.\n ' inner = query[1:(- 1)] if inner.startswith(('&', '|')): ...
Match an ldap query to an attribute dictionary. The characters &, |, and ! are supported in the query. No syntax checking is performed, so malformed queries will not work correctly.
keystone/tests/unit/fakeldap.py
_match_query
knikolla/keystone
615
python
def _match_query(query, attrs, attrs_checked): 'Match an ldap query to an attribute dictionary.\n\n The characters &, |, and ! are supported in the query. No syntax checking\n is performed, so malformed queries will not work correctly.\n ' inner = query[1:(- 1)] if inner.startswith(('&', '|')): ...
def _match_query(query, attrs, attrs_checked): 'Match an ldap query to an attribute dictionary.\n\n The characters &, |, and ! are supported in the query. No syntax checking\n is performed, so malformed queries will not work correctly.\n ' inner = query[1:(- 1)] if inner.startswith(('&', '|')): ...
8b61af187d06195199301614d780516d2250d7e0869ef69ebd93e53f2d85c967
def _paren_groups(source): 'Split a string into parenthesized groups.' count = 0 start = 0 result = [] for pos in range(len(source)): if (source[pos] == '('): if (count == 0): start = pos count += 1 if (source[pos] == ')'): count -=...
Split a string into parenthesized groups.
keystone/tests/unit/fakeldap.py
_paren_groups
knikolla/keystone
615
python
def _paren_groups(source): count = 0 start = 0 result = [] for pos in range(len(source)): if (source[pos] == '('): if (count == 0): start = pos count += 1 if (source[pos] == ')'): count -= 1 if (count == 0): ...
def _paren_groups(source): count = 0 start = 0 result = [] for pos in range(len(source)): if (source[pos] == '('): if (count == 0): start = pos count += 1 if (source[pos] == ')'): count -= 1 if (count == 0): ...
d518857f8226c21cc53fe52a024ea9f75d18c2e163dc380593a49db64cf46c0c
def _match(key, value, attrs): 'Match a given key and value against an attribute list.' def match_with_wildcards(norm_val, val_list): if norm_val.startswith('*'): if norm_val.endswith('*'): for x in val_list: if (norm_val[1:(- 1)] in x): ...
Match a given key and value against an attribute list.
keystone/tests/unit/fakeldap.py
_match
knikolla/keystone
615
python
def _match(key, value, attrs): def match_with_wildcards(norm_val, val_list): if norm_val.startswith('*'): if norm_val.endswith('*'): for x in val_list: if (norm_val[1:(- 1)] in x): return True else: for...
def _match(key, value, attrs): def match_with_wildcards(norm_val, val_list): if norm_val.startswith('*'): if norm_val.endswith('*'): for x in val_list: if (norm_val[1:(- 1)] in x): return True else: for...
9e2115fc5dedfee6c62a25e1d46a50c38f91351dc9574abf0663ac05f730f3b0
def _subs(value): "Return a list of subclass strings.\n\n The strings represent the ldap objectclass plus any subclasses that\n inherit from it. Fakeldap doesn't know about the ldap object structure,\n so subclasses need to be defined manually in the dictionary below.\n\n " subs = {'groupOfNames': [...
Return a list of subclass strings. The strings represent the ldap objectclass plus any subclasses that inherit from it. Fakeldap doesn't know about the ldap object structure, so subclasses need to be defined manually in the dictionary below.
keystone/tests/unit/fakeldap.py
_subs
knikolla/keystone
615
python
def _subs(value): "Return a list of subclass strings.\n\n The strings represent the ldap objectclass plus any subclasses that\n inherit from it. Fakeldap doesn't know about the ldap object structure,\n so subclasses need to be defined manually in the dictionary below.\n\n " subs = {'groupOfNames': [...
def _subs(value): "Return a list of subclass strings.\n\n The strings represent the ldap objectclass plus any subclasses that\n inherit from it. Fakeldap doesn't know about the ldap object structure,\n so subclasses need to be defined manually in the dictionary below.\n\n " subs = {'groupOfNames': [...
082fac186e27aad6993833298ac5dc5cf983e0f8f9c65735d44b78aee9976bc0
def simple_bind_s(self, who='', cred='', serverctrls=None, clientctrls=None): 'Provide for compatibility but this method is ignored.' if server_fail: raise ldap.SERVER_DOWN whos = ['cn=Admin', CONF.ldap.user] if ((who in whos) and (cred in ['password', CONF.ldap.password])): return a...
Provide for compatibility but this method is ignored.
keystone/tests/unit/fakeldap.py
simple_bind_s
knikolla/keystone
615
python
def simple_bind_s(self, who=, cred=, serverctrls=None, clientctrls=None): if server_fail: raise ldap.SERVER_DOWN whos = ['cn=Admin', CONF.ldap.user] if ((who in whos) and (cred in ['password', CONF.ldap.password])): return attrs = self.db.get(self.key(who)) if (not attrs): ...
def simple_bind_s(self, who=, cred=, serverctrls=None, clientctrls=None): if server_fail: raise ldap.SERVER_DOWN whos = ['cn=Admin', CONF.ldap.user] if ((who in whos) and (cred in ['password', CONF.ldap.password])): return attrs = self.db.get(self.key(who)) if (not attrs): ...
e914d7e8c4478e113775474eb4d0be176564632471798d675f3331c1eeff7543
def unbind_s(self): 'Provide for compatibility but this method is ignored.' if server_fail: raise ldap.SERVER_DOWN
Provide for compatibility but this method is ignored.
keystone/tests/unit/fakeldap.py
unbind_s
knikolla/keystone
615
python
def unbind_s(self): if server_fail: raise ldap.SERVER_DOWN
def unbind_s(self): if server_fail: raise ldap.SERVER_DOWN<|docstring|>Provide for compatibility but this method is ignored.<|endoftext|>
276196af5ecf09ddde0e5b281783eb7683dd7fd18fa8b944965b19155af7e157
def add_s(self, dn, modlist): 'Add an object with the specified attributes at dn.' if server_fail: raise ldap.SERVER_DOWN id_attr_in_modlist = False id_attr = self._dn_to_id_attr(dn) id_value = self._dn_to_id_value(dn) for (k, dummy_v) in modlist: if (k is None): rais...
Add an object with the specified attributes at dn.
keystone/tests/unit/fakeldap.py
add_s
knikolla/keystone
615
python
def add_s(self, dn, modlist): if server_fail: raise ldap.SERVER_DOWN id_attr_in_modlist = False id_attr = self._dn_to_id_attr(dn) id_value = self._dn_to_id_value(dn) for (k, dummy_v) in modlist: if (k is None): raise TypeError(('must be string, not None. modlist=%s' ...
def add_s(self, dn, modlist): if server_fail: raise ldap.SERVER_DOWN id_attr_in_modlist = False id_attr = self._dn_to_id_attr(dn) id_value = self._dn_to_id_value(dn) for (k, dummy_v) in modlist: if (k is None): raise TypeError(('must be string, not None. modlist=%s' ...
b5594b951eb09f5fd6e32f4f034f745e115a410406a8687e3adb0905874eca2d
def delete_s(self, dn): 'Remove the ldap object at specified dn.' return self.delete_ext_s(dn, serverctrls=[])
Remove the ldap object at specified dn.
keystone/tests/unit/fakeldap.py
delete_s
knikolla/keystone
615
python
def delete_s(self, dn): return self.delete_ext_s(dn, serverctrls=[])
def delete_s(self, dn): return self.delete_ext_s(dn, serverctrls=[])<|docstring|>Remove the ldap object at specified dn.<|endoftext|>
b790a9c567ca29f2aea3ccfa570d7a65a102f6bc7a18de863d89ff19ee041534
def delete_ext_s(self, dn, serverctrls, clientctrls=None): 'Remove the ldap object at specified dn.' if server_fail: raise ldap.SERVER_DOWN try: key = self.key(dn) LOG.debug('FakeLdap delete item: dn=%s', dn) del self.db[key] except KeyError: LOG.debug('delete ite...
Remove the ldap object at specified dn.
keystone/tests/unit/fakeldap.py
delete_ext_s
knikolla/keystone
615
python
def delete_ext_s(self, dn, serverctrls, clientctrls=None): if server_fail: raise ldap.SERVER_DOWN try: key = self.key(dn) LOG.debug('FakeLdap delete item: dn=%s', dn) del self.db[key] except KeyError: LOG.debug('delete item failed: dn=%s not found.', dn) ...
def delete_ext_s(self, dn, serverctrls, clientctrls=None): if server_fail: raise ldap.SERVER_DOWN try: key = self.key(dn) LOG.debug('FakeLdap delete item: dn=%s', dn) del self.db[key] except KeyError: LOG.debug('delete item failed: dn=%s not found.', dn) ...
87d725372210094cae69c4775b9a7a0afb6d80754a9481bc8e20109e29b25eea
def modify_s(self, dn, modlist): 'Modify the object at dn using the attribute list.\n\n :param dn: an LDAP DN\n :param modlist: a list of tuples in the following form:\n ([MOD_ADD | MOD_DELETE | MOD_REPACE], attribute, value)\n ' if server_fail: raise ldap.SERVE...
Modify the object at dn using the attribute list. :param dn: an LDAP DN :param modlist: a list of tuples in the following form: ([MOD_ADD | MOD_DELETE | MOD_REPACE], attribute, value)
keystone/tests/unit/fakeldap.py
modify_s
knikolla/keystone
615
python
def modify_s(self, dn, modlist): 'Modify the object at dn using the attribute list.\n\n :param dn: an LDAP DN\n :param modlist: a list of tuples in the following form:\n ([MOD_ADD | MOD_DELETE | MOD_REPACE], attribute, value)\n ' if server_fail: raise ldap.SERVE...
def modify_s(self, dn, modlist): 'Modify the object at dn using the attribute list.\n\n :param dn: an LDAP DN\n :param modlist: a list of tuples in the following form:\n ([MOD_ADD | MOD_DELETE | MOD_REPACE], attribute, value)\n ' if server_fail: raise ldap.SERVE...
e3475d63f984d5dee66874e6bf72b261ac39e86db5482e181b152e00c9ee539c
def search_s(self, base, scope, filterstr='(objectClass=*)', attrlist=None, attrsonly=0): 'Search for all matching objects under base using the query.\n\n Args:\n base -- dn to search under\n scope -- search scope (base, subtree, onelevel)\n filterstr -- filter objects by\n attrli...
Search for all matching objects under base using the query. Args: base -- dn to search under scope -- search scope (base, subtree, onelevel) filterstr -- filter objects by attrlist -- attrs to return. Returns all attrs if not specified
keystone/tests/unit/fakeldap.py
search_s
knikolla/keystone
615
python
def search_s(self, base, scope, filterstr='(objectClass=*)', attrlist=None, attrsonly=0): 'Search for all matching objects under base using the query.\n\n Args:\n base -- dn to search under\n scope -- search scope (base, subtree, onelevel)\n filterstr -- filter objects by\n attrli...
def search_s(self, base, scope, filterstr='(objectClass=*)', attrlist=None, attrsonly=0): 'Search for all matching objects under base using the query.\n\n Args:\n base -- dn to search under\n scope -- search scope (base, subtree, onelevel)\n filterstr -- filter objects by\n attrli...
29de18e041d67b59ed05209281d87ca9010fe5b5279770a316e1614b933853c5
def result3(self, msgid=ldap.RES_ANY, all=1, timeout=None, resp_ctrl_classes=None): 'Execute async request.\n\n Only msgid param is supported. Request info is fetched from global\n variable `PendingRequests` by msgid, executed using search_s and\n limited if requested.\n ' if ((all !...
Execute async request. Only msgid param is supported. Request info is fetched from global variable `PendingRequests` by msgid, executed using search_s and limited if requested.
keystone/tests/unit/fakeldap.py
result3
knikolla/keystone
615
python
def result3(self, msgid=ldap.RES_ANY, all=1, timeout=None, resp_ctrl_classes=None): 'Execute async request.\n\n Only msgid param is supported. Request info is fetched from global\n variable `PendingRequests` by msgid, executed using search_s and\n limited if requested.\n ' if ((all !...
def result3(self, msgid=ldap.RES_ANY, all=1, timeout=None, resp_ctrl_classes=None): 'Execute async request.\n\n Only msgid param is supported. Request info is fetched from global\n variable `PendingRequests` by msgid, executed using search_s and\n limited if requested.\n ' if ((all !...
001ee0d8d503b4a07b747e04f3a75cdfe9a59fd6fea5821c72f7ebe99e1d7b0f
def unbind_ext_s(self): 'Added to extend FakeLdap as connector class.' pass
Added to extend FakeLdap as connector class.
keystone/tests/unit/fakeldap.py
unbind_ext_s
knikolla/keystone
615
python
def unbind_ext_s(self): pass
def unbind_ext_s(self): pass<|docstring|>Added to extend FakeLdap as connector class.<|endoftext|>
d973f384ff5e96b64056b94af40fdfc78c1d20632f7e5bcc06800445afada701
def delete_ext_s(self, dn, serverctrls, clientctrls=None): 'Remove the ldap object at specified dn.' if server_fail: raise ldap.SERVER_DOWN try: children = self._getChildren(dn) if children: raise ldap.NOT_ALLOWED_ON_NONLEAF except KeyError: LOG.debug('delete ...
Remove the ldap object at specified dn.
keystone/tests/unit/fakeldap.py
delete_ext_s
knikolla/keystone
615
python
def delete_ext_s(self, dn, serverctrls, clientctrls=None): if server_fail: raise ldap.SERVER_DOWN try: children = self._getChildren(dn) if children: raise ldap.NOT_ALLOWED_ON_NONLEAF except KeyError: LOG.debug('delete item failed: dn=%s not found.', dn) ...
def delete_ext_s(self, dn, serverctrls, clientctrls=None): if server_fail: raise ldap.SERVER_DOWN try: children = self._getChildren(dn) if children: raise ldap.NOT_ALLOWED_ON_NONLEAF except KeyError: LOG.debug('delete item failed: dn=%s not found.', dn) ...
b94c8ab9a7b63f87f37dfe0c85d28acb2c2904eb13a98ad15d02079d96fbe10c
@fill_doc def fetch_atlas_difumo(dimension=64, resolution_mm=2, data_dir=None, resume=True, verbose=1): "Fetch DiFuMo brain atlas\n\n Dictionaries of Functional Modes, or “DiFuMo”, can serve as atlases to extract\n functional signals with different dimensionalities (64, 128, 256, 512, and 1024).\n These mo...
Fetch DiFuMo brain atlas Dictionaries of Functional Modes, or “DiFuMo”, can serve as atlases to extract functional signals with different dimensionalities (64, 128, 256, 512, and 1024). These modes are optimized to represent well raw BOLD timeseries, over a with range of experimental conditions. See :footcite:`DADI202...
nilearn/datasets/atlas.py
fetch_atlas_difumo
lemiceterieux/nilearn
827
python
@fill_doc def fetch_atlas_difumo(dimension=64, resolution_mm=2, data_dir=None, resume=True, verbose=1): "Fetch DiFuMo brain atlas\n\n Dictionaries of Functional Modes, or “DiFuMo”, can serve as atlases to extract\n functional signals with different dimensionalities (64, 128, 256, 512, and 1024).\n These mo...
@fill_doc def fetch_atlas_difumo(dimension=64, resolution_mm=2, data_dir=None, resume=True, verbose=1): "Fetch DiFuMo brain atlas\n\n Dictionaries of Functional Modes, or “DiFuMo”, can serve as atlases to extract\n functional signals with different dimensionalities (64, 128, 256, 512, and 1024).\n These mo...
31a3e66515d0f75c7d01d9359c0a811861f8b348ffe15e3da424d22b1cc8b12c
@fill_doc def fetch_atlas_craddock_2012(data_dir=None, url=None, resume=True, verbose=1): 'Download and return file names for the Craddock 2012 parcellation\n\n The provided images are in MNI152 space.\n\n See :footcite:`CreativeCommons` for the licence.\n\n See :footcite:`craddock2012whole` and :footcite:...
Download and return file names for the Craddock 2012 parcellation The provided images are in MNI152 space. See :footcite:`CreativeCommons` for the licence. See :footcite:`craddock2012whole` and :footcite:`nitrcClusterROI` for more information on this parcellation. Parameters ---------- %(data_dir)s %(url)s %(resume...
nilearn/datasets/atlas.py
fetch_atlas_craddock_2012
lemiceterieux/nilearn
827
python
@fill_doc def fetch_atlas_craddock_2012(data_dir=None, url=None, resume=True, verbose=1): 'Download and return file names for the Craddock 2012 parcellation\n\n The provided images are in MNI152 space.\n\n See :footcite:`CreativeCommons` for the licence.\n\n See :footcite:`craddock2012whole` and :footcite:...
@fill_doc def fetch_atlas_craddock_2012(data_dir=None, url=None, resume=True, verbose=1): 'Download and return file names for the Craddock 2012 parcellation\n\n The provided images are in MNI152 space.\n\n See :footcite:`CreativeCommons` for the licence.\n\n See :footcite:`craddock2012whole` and :footcite:...
66ce3b008a8454f87820ab5d66c12c94dd3c8451dfb57fb4bce2f05fa3b70a5c
@fill_doc def fetch_atlas_destrieux_2009(lateralized=True, data_dir=None, url=None, resume=True, verbose=1): 'Download and load the Destrieux cortical atlas (dated 2009)\n\n see :footcite:`Fischl2004Automatically`,\n and :footcite:`Destrieux2009sulcal`.\n\n Parameters\n ----------\n lateralized : boo...
Download and load the Destrieux cortical atlas (dated 2009) see :footcite:`Fischl2004Automatically`, and :footcite:`Destrieux2009sulcal`. Parameters ---------- lateralized : boolean, optional If True, returns an atlas with distinct regions for right and left hemispheres. Default=True. %(data_dir)s %(url)s %(r...
nilearn/datasets/atlas.py
fetch_atlas_destrieux_2009
lemiceterieux/nilearn
827
python
@fill_doc def fetch_atlas_destrieux_2009(lateralized=True, data_dir=None, url=None, resume=True, verbose=1): 'Download and load the Destrieux cortical atlas (dated 2009)\n\n see :footcite:`Fischl2004Automatically`,\n and :footcite:`Destrieux2009sulcal`.\n\n Parameters\n ----------\n lateralized : boo...
@fill_doc def fetch_atlas_destrieux_2009(lateralized=True, data_dir=None, url=None, resume=True, verbose=1): 'Download and load the Destrieux cortical atlas (dated 2009)\n\n see :footcite:`Fischl2004Automatically`,\n and :footcite:`Destrieux2009sulcal`.\n\n Parameters\n ----------\n lateralized : boo...
2efbfa03423e28826cf3085f8ece7c148a69ddbc17ca26788005848d1bcce979
@fill_doc def fetch_atlas_harvard_oxford(atlas_name, data_dir=None, symmetric_split=False, resume=True, verbose=1): 'Load Harvard-Oxford parcellations from FSL.\n\n This function downloads Harvard Oxford atlas packaged from FSL 5.0\n and stores atlases in NILEARN_DATA folder in home directory.\n\n This fun...
Load Harvard-Oxford parcellations from FSL. This function downloads Harvard Oxford atlas packaged from FSL 5.0 and stores atlases in NILEARN_DATA folder in home directory. This function can also load Harvard Oxford atlas from your local directory specified by your FSL installed path given in `data_dir` argument. See ...
nilearn/datasets/atlas.py
fetch_atlas_harvard_oxford
lemiceterieux/nilearn
827
python
@fill_doc def fetch_atlas_harvard_oxford(atlas_name, data_dir=None, symmetric_split=False, resume=True, verbose=1): 'Load Harvard-Oxford parcellations from FSL.\n\n This function downloads Harvard Oxford atlas packaged from FSL 5.0\n and stores atlases in NILEARN_DATA folder in home directory.\n\n This fun...
@fill_doc def fetch_atlas_harvard_oxford(atlas_name, data_dir=None, symmetric_split=False, resume=True, verbose=1): 'Load Harvard-Oxford parcellations from FSL.\n\n This function downloads Harvard Oxford atlas packaged from FSL 5.0\n and stores atlases in NILEARN_DATA folder in home directory.\n\n This fun...
09b824a85018999f27dcdc57acd1ec384579ab40d38b8872a4659569402b080e
def fetch_atlas_juelich(atlas_name, data_dir=None, symmetric_split=False, resume=True, verbose=1): 'Load Juelich parcellations from FSL.\n\n This function downloads Juelich atlas packaged from FSL 5.0\n and stores atlases in NILEARN_DATA folder in home directory.\n\n This function can also load Juelich atl...
Load Juelich parcellations from FSL. This function downloads Juelich atlas packaged from FSL 5.0 and stores atlases in NILEARN_DATA folder in home directory. This function can also load Juelich atlas from your local directory specified by your FSL installed path given in `data_dir` argument. See documentation for det...
nilearn/datasets/atlas.py
fetch_atlas_juelich
lemiceterieux/nilearn
827
python
def fetch_atlas_juelich(atlas_name, data_dir=None, symmetric_split=False, resume=True, verbose=1): 'Load Juelich parcellations from FSL.\n\n This function downloads Juelich atlas packaged from FSL 5.0\n and stores atlases in NILEARN_DATA folder in home directory.\n\n This function can also load Juelich atl...
def fetch_atlas_juelich(atlas_name, data_dir=None, symmetric_split=False, resume=True, verbose=1): 'Load Juelich parcellations from FSL.\n\n This function downloads Juelich atlas packaged from FSL 5.0\n and stores atlases in NILEARN_DATA folder in home directory.\n\n This function can also load Juelich atl...
43a82baeb9d1a80cb7a2d1a8720eee0797d87d008b9d3c7e5a109c2f725069b0
def _get_atlas_data_and_labels(atlas_source, atlas_name, symmetric_split=False, data_dir=None, resume=True, verbose=1): 'Helper function for both fetch_atlas_juelich and fetch_atlas_harvard_oxford.\n This function downloads the atlas image and labels.\n ' if (atlas_source == 'Juelich'): url = 'htt...
Helper function for both fetch_atlas_juelich and fetch_atlas_harvard_oxford. This function downloads the atlas image and labels.
nilearn/datasets/atlas.py
_get_atlas_data_and_labels
lemiceterieux/nilearn
827
python
def _get_atlas_data_and_labels(atlas_source, atlas_name, symmetric_split=False, data_dir=None, resume=True, verbose=1): 'Helper function for both fetch_atlas_juelich and fetch_atlas_harvard_oxford.\n This function downloads the atlas image and labels.\n ' if (atlas_source == 'Juelich'): url = 'htt...
def _get_atlas_data_and_labels(atlas_source, atlas_name, symmetric_split=False, data_dir=None, resume=True, verbose=1): 'Helper function for both fetch_atlas_juelich and fetch_atlas_harvard_oxford.\n This function downloads the atlas image and labels.\n ' if (atlas_source == 'Juelich'): url = 'htt...
08aadcea0496acfa92dc6fe56bbc7501a689378da5fa7d259bdfd07331f3600b
def _merge_probabilistic_maps_juelich(atlas_data, names): 'Helper function for fetch_atlas_juelich.\n This function handles probabilistic juelich atlases\n when symmetric_split=False. In this situation, we need\n to merge labels and maps corresponding to left and right\n regions.\n ' new_names = ...
Helper function for fetch_atlas_juelich. This function handles probabilistic juelich atlases when symmetric_split=False. In this situation, we need to merge labels and maps corresponding to left and right regions.
nilearn/datasets/atlas.py
_merge_probabilistic_maps_juelich
lemiceterieux/nilearn
827
python
def _merge_probabilistic_maps_juelich(atlas_data, names): 'Helper function for fetch_atlas_juelich.\n This function handles probabilistic juelich atlases\n when symmetric_split=False. In this situation, we need\n to merge labels and maps corresponding to left and right\n regions.\n ' new_names = ...
def _merge_probabilistic_maps_juelich(atlas_data, names): 'Helper function for fetch_atlas_juelich.\n This function handles probabilistic juelich atlases\n when symmetric_split=False. In this situation, we need\n to merge labels and maps corresponding to left and right\n regions.\n ' new_names = ...
b8bb027eec29da56d64f270a34cab6f3242690a5db4c02cad7be0c8b61e4aa36
def _merge_labels_juelich(atlas_data, names): 'Helper function for fetch_atlas_juelich.\n This function handles 3D atlases when symmetric_split=False.\n In this case, we need to merge the labels corresponding to\n left and right regions.\n ' new_names = np.unique([re.sub(' (L|R)$', '', name) for nam...
Helper function for fetch_atlas_juelich. This function handles 3D atlases when symmetric_split=False. In this case, we need to merge the labels corresponding to left and right regions.
nilearn/datasets/atlas.py
_merge_labels_juelich
lemiceterieux/nilearn
827
python
def _merge_labels_juelich(atlas_data, names): 'Helper function for fetch_atlas_juelich.\n This function handles 3D atlases when symmetric_split=False.\n In this case, we need to merge the labels corresponding to\n left and right regions.\n ' new_names = np.unique([re.sub(' (L|R)$', , name) for name ...
def _merge_labels_juelich(atlas_data, names): 'Helper function for fetch_atlas_juelich.\n This function handles 3D atlases when symmetric_split=False.\n In this case, we need to merge the labels corresponding to\n left and right regions.\n ' new_names = np.unique([re.sub(' (L|R)$', , name) for name ...
168ee3e9c7e9aa73b5d6269da8ffb6e824f24f7364da21b7d15c6d56de49e27b
def _compute_symmetric_split(source, atlas_niimg, names): 'Helper function for both fetch_atlas_juelich and\n fetch_atlas_harvard_oxford.\n This function handles 3D atlases when symmetric_split=True.\n ' assert (atlas_niimg.affine[(0, 0)] > 0) atlas_data = get_data(atlas_niimg) labels = np.uniq...
Helper function for both fetch_atlas_juelich and fetch_atlas_harvard_oxford. This function handles 3D atlases when symmetric_split=True.
nilearn/datasets/atlas.py
_compute_symmetric_split
lemiceterieux/nilearn
827
python
def _compute_symmetric_split(source, atlas_niimg, names): 'Helper function for both fetch_atlas_juelich and\n fetch_atlas_harvard_oxford.\n This function handles 3D atlases when symmetric_split=True.\n ' assert (atlas_niimg.affine[(0, 0)] > 0) atlas_data = get_data(atlas_niimg) labels = np.uniq...
def _compute_symmetric_split(source, atlas_niimg, names): 'Helper function for both fetch_atlas_juelich and\n fetch_atlas_harvard_oxford.\n This function handles 3D atlases when symmetric_split=True.\n ' assert (atlas_niimg.affine[(0, 0)] > 0) atlas_data = get_data(atlas_niimg) labels = np.uniq...
7a7f41886ebc886e50f0a442fb7e00d2c6360ae2dc29874f2cb4b6e8428c1507
@fill_doc def fetch_atlas_msdl(data_dir=None, url=None, resume=True, verbose=1): "Download and load the MSDL brain atlas.\n\n It can be downloaded at :footcite:`atlas_msdl`, and cited\n using :footcite:`Varoquaux2011multisubject`.\n See also :footcite:`VAROQUAUX2013405` for more information.\n\n Paramet...
Download and load the MSDL brain atlas. It can be downloaded at :footcite:`atlas_msdl`, and cited using :footcite:`Varoquaux2011multisubject`. See also :footcite:`VAROQUAUX2013405` for more information. Parameters ---------- %(data_dir)s %(url)s %(resume)s %(verbose)s Returns ------- data : sklearn.datasets.base.Bun...
nilearn/datasets/atlas.py
fetch_atlas_msdl
lemiceterieux/nilearn
827
python
@fill_doc def fetch_atlas_msdl(data_dir=None, url=None, resume=True, verbose=1): "Download and load the MSDL brain atlas.\n\n It can be downloaded at :footcite:`atlas_msdl`, and cited\n using :footcite:`Varoquaux2011multisubject`.\n See also :footcite:`VAROQUAUX2013405` for more information.\n\n Paramet...
@fill_doc def fetch_atlas_msdl(data_dir=None, url=None, resume=True, verbose=1): "Download and load the MSDL brain atlas.\n\n It can be downloaded at :footcite:`atlas_msdl`, and cited\n using :footcite:`Varoquaux2011multisubject`.\n See also :footcite:`VAROQUAUX2013405` for more information.\n\n Paramet...
355453728e152ac614a3ebe124708e405d3dbb6abd74e758abf067fc9db02ad2
def fetch_coords_power_2011(): 'Download and load the Power et al. brain atlas composed of 264 ROIs\n\n See :footcite:`Power2011Functional`.\n\n Returns\n -------\n data : sklearn.datasets.base.Bunch\n Dictionary-like object, contains:\n - "rois": coordinates of 264 ROIs in MNI space\n\n\n...
Download and load the Power et al. brain atlas composed of 264 ROIs See :footcite:`Power2011Functional`. Returns ------- data : sklearn.datasets.base.Bunch Dictionary-like object, contains: - "rois": coordinates of 264 ROIs in MNI space References ---------- .. footbibliography::
nilearn/datasets/atlas.py
fetch_coords_power_2011
lemiceterieux/nilearn
827
python
def fetch_coords_power_2011(): 'Download and load the Power et al. brain atlas composed of 264 ROIs\n\n See :footcite:`Power2011Functional`.\n\n Returns\n -------\n data : sklearn.datasets.base.Bunch\n Dictionary-like object, contains:\n - "rois": coordinates of 264 ROIs in MNI space\n\n\n...
def fetch_coords_power_2011(): 'Download and load the Power et al. brain atlas composed of 264 ROIs\n\n See :footcite:`Power2011Functional`.\n\n Returns\n -------\n data : sklearn.datasets.base.Bunch\n Dictionary-like object, contains:\n - "rois": coordinates of 264 ROIs in MNI space\n\n\n...
7508b4b4a22cfd3d72b8a9a2209621e092e9206df4fd1ee4e049f1e94e1e10f5
@fill_doc def fetch_atlas_smith_2009(data_dir=None, mirror='origin', url=None, resume=True, verbose=1): 'Download and load the Smith ICA and BrainMap atlas (dated 2009).\n\n See :footcite:`Smith200913040` and :footcite:`Laird2011behavioral`.\n\n Parameters\n ----------\n %(data_dir)s\n mirror : strin...
Download and load the Smith ICA and BrainMap atlas (dated 2009). See :footcite:`Smith200913040` and :footcite:`Laird2011behavioral`. Parameters ---------- %(data_dir)s mirror : string, optional By default, the dataset is downloaded from the original website of the atlas. Specifying "nitrc" will force download...
nilearn/datasets/atlas.py
fetch_atlas_smith_2009
lemiceterieux/nilearn
827
python
@fill_doc def fetch_atlas_smith_2009(data_dir=None, mirror='origin', url=None, resume=True, verbose=1): 'Download and load the Smith ICA and BrainMap atlas (dated 2009).\n\n See :footcite:`Smith200913040` and :footcite:`Laird2011behavioral`.\n\n Parameters\n ----------\n %(data_dir)s\n mirror : strin...
@fill_doc def fetch_atlas_smith_2009(data_dir=None, mirror='origin', url=None, resume=True, verbose=1): 'Download and load the Smith ICA and BrainMap atlas (dated 2009).\n\n See :footcite:`Smith200913040` and :footcite:`Laird2011behavioral`.\n\n Parameters\n ----------\n %(data_dir)s\n mirror : strin...
99b1697915a249f7f1d52cfe9b992bd3f71a56a24579d4fa3a98cf7cc261a58e
@fill_doc def fetch_atlas_yeo_2011(data_dir=None, url=None, resume=True, verbose=1): 'Download and return file names for the Yeo 2011 parcellation.\n\n The provided images are in MNI152 space.\n\n For more information on this dataset\'s structure,\n see :footcite:`CorticalParcellation_Yeo2011`,\n and :f...
Download and return file names for the Yeo 2011 parcellation. The provided images are in MNI152 space. For more information on this dataset's structure, see :footcite:`CorticalParcellation_Yeo2011`, and :footcite:`Yeo2011organization`. Parameters ---------- %(data_dir)s %(url)s %(resume)s %(verbose)s Returns ------...
nilearn/datasets/atlas.py
fetch_atlas_yeo_2011
lemiceterieux/nilearn
827
python
@fill_doc def fetch_atlas_yeo_2011(data_dir=None, url=None, resume=True, verbose=1): 'Download and return file names for the Yeo 2011 parcellation.\n\n The provided images are in MNI152 space.\n\n For more information on this dataset\'s structure,\n see :footcite:`CorticalParcellation_Yeo2011`,\n and :f...
@fill_doc def fetch_atlas_yeo_2011(data_dir=None, url=None, resume=True, verbose=1): 'Download and return file names for the Yeo 2011 parcellation.\n\n The provided images are in MNI152 space.\n\n For more information on this dataset\'s structure,\n see :footcite:`CorticalParcellation_Yeo2011`,\n and :f...
f59e50cff7d43ef1b9d26d9c905c9a0de2881747ab9a46a5b06c106f3be3b905
@fill_doc def fetch_atlas_aal(version='SPM12', data_dir=None, url=None, resume=True, verbose=1): 'Downloads and returns the AAL template for SPM 12.\n\n This atlas is the result of an automated anatomical parcellation of the\n spatially normalized single-subject high-resolution T1 volume provided by\n the ...
Downloads and returns the AAL template for SPM 12. This atlas is the result of an automated anatomical parcellation of the spatially normalized single-subject high-resolution T1 volume provided by the Montreal Neurological Institute (MNI) (D. L. Collins et al., 1998, Trans. Med. Imag. 17, 463-468, PubMed). For more i...
nilearn/datasets/atlas.py
fetch_atlas_aal
lemiceterieux/nilearn
827
python
@fill_doc def fetch_atlas_aal(version='SPM12', data_dir=None, url=None, resume=True, verbose=1): 'Downloads and returns the AAL template for SPM 12.\n\n This atlas is the result of an automated anatomical parcellation of the\n spatially normalized single-subject high-resolution T1 volume provided by\n the ...
@fill_doc def fetch_atlas_aal(version='SPM12', data_dir=None, url=None, resume=True, verbose=1): 'Downloads and returns the AAL template for SPM 12.\n\n This atlas is the result of an automated anatomical parcellation of the\n spatially normalized single-subject high-resolution T1 volume provided by\n the ...
5de00f68135cafd60541d76a30308c0c29b11ee1cf85e479afbde181fcfd6741
@fill_doc def fetch_atlas_basc_multiscale_2015(version='sym', data_dir=None, url=None, resume=True, verbose=1): 'Downloads and loads multiscale functional brain parcellations\n\n This atlas includes group brain parcellations generated from\n resting-state functional magnetic resonance images from about\n 2...
Downloads and loads multiscale functional brain parcellations This atlas includes group brain parcellations generated from resting-state functional magnetic resonance images from about 200 young healthy subjects. Multiple scales (number of networks) are available, among 7, 12, 20, 36, 64, 122, 197, 325, 444. The brai...
nilearn/datasets/atlas.py
fetch_atlas_basc_multiscale_2015
lemiceterieux/nilearn
827
python
@fill_doc def fetch_atlas_basc_multiscale_2015(version='sym', data_dir=None, url=None, resume=True, verbose=1): 'Downloads and loads multiscale functional brain parcellations\n\n This atlas includes group brain parcellations generated from\n resting-state functional magnetic resonance images from about\n 2...
@fill_doc def fetch_atlas_basc_multiscale_2015(version='sym', data_dir=None, url=None, resume=True, verbose=1): 'Downloads and loads multiscale functional brain parcellations\n\n This atlas includes group brain parcellations generated from\n resting-state functional magnetic resonance images from about\n 2...
0f2ec23f8b881fd2246c4bda7b4fce133938d15606d5e4db56123d7b1069cda3
def fetch_coords_dosenbach_2010(ordered_regions=True): 'Load the Dosenbach et al. 160 ROIs. These ROIs cover\n much of the cerebral cortex and cerebellum and are assigned to 6\n networks.\n\n See :footcite:`Dosenbach20101358`.\n\n Parameters\n ----------\n ordered_regions : bool, optional\n ...
Load the Dosenbach et al. 160 ROIs. These ROIs cover much of the cerebral cortex and cerebellum and are assigned to 6 networks. See :footcite:`Dosenbach20101358`. Parameters ---------- ordered_regions : bool, optional ROIs from same networks are grouped together and ordered with respect to their names and the...
nilearn/datasets/atlas.py
fetch_coords_dosenbach_2010
lemiceterieux/nilearn
827
python
def fetch_coords_dosenbach_2010(ordered_regions=True): 'Load the Dosenbach et al. 160 ROIs. These ROIs cover\n much of the cerebral cortex and cerebellum and are assigned to 6\n networks.\n\n See :footcite:`Dosenbach20101358`.\n\n Parameters\n ----------\n ordered_regions : bool, optional\n ...
def fetch_coords_dosenbach_2010(ordered_regions=True): 'Load the Dosenbach et al. 160 ROIs. These ROIs cover\n much of the cerebral cortex and cerebellum and are assigned to 6\n networks.\n\n See :footcite:`Dosenbach20101358`.\n\n Parameters\n ----------\n ordered_regions : bool, optional\n ...
f0473783fe21f4c1ad8005129acdf7df688051df1ea43ecee1cf1b21f9124baf
def fetch_coords_seitzman_2018(ordered_regions=True): 'Load the Seitzman et al. 300 ROIs. These ROIs cover cortical,\n subcortical and cerebellar regions and are assigned to one of 13\n networks (Auditory, CinguloOpercular, DefaultMode, DorsalAttention,\n FrontoParietal, MedialTemporalLobe, ParietoMedial, ...
Load the Seitzman et al. 300 ROIs. These ROIs cover cortical, subcortical and cerebellar regions and are assigned to one of 13 networks (Auditory, CinguloOpercular, DefaultMode, DorsalAttention, FrontoParietal, MedialTemporalLobe, ParietoMedial, Reward, Salience, SomatomotorDorsal, SomatomotorLateral, VentralAttention,...
nilearn/datasets/atlas.py
fetch_coords_seitzman_2018
lemiceterieux/nilearn
827
python
def fetch_coords_seitzman_2018(ordered_regions=True): 'Load the Seitzman et al. 300 ROIs. These ROIs cover cortical,\n subcortical and cerebellar regions and are assigned to one of 13\n networks (Auditory, CinguloOpercular, DefaultMode, DorsalAttention,\n FrontoParietal, MedialTemporalLobe, ParietoMedial, ...
def fetch_coords_seitzman_2018(ordered_regions=True): 'Load the Seitzman et al. 300 ROIs. These ROIs cover cortical,\n subcortical and cerebellar regions and are assigned to one of 13\n networks (Auditory, CinguloOpercular, DefaultMode, DorsalAttention,\n FrontoParietal, MedialTemporalLobe, ParietoMedial, ...
f2186b3112fc21fac613bbcb01d4a3025800a649cdbbb656638f36bf3ef8bb29
@fill_doc def fetch_atlas_allen_2011(data_dir=None, url=None, resume=True, verbose=1): 'Download and return file names for the Allen and MIALAB ICA atlas\n (dated 2011).\n\n See :footcite:`Allen2011baseline`.\n\n The provided images are in MNI152 space.\n\n Parameters\n ----------\n %(data_dir)s\n...
Download and return file names for the Allen and MIALAB ICA atlas (dated 2011). See :footcite:`Allen2011baseline`. The provided images are in MNI152 space. Parameters ---------- %(data_dir)s %(url)s %(resume)s %(verbose)s Returns ------- data : sklearn.datasets.base.Bunch Dictionary-like object, keys are: ...
nilearn/datasets/atlas.py
fetch_atlas_allen_2011
lemiceterieux/nilearn
827
python
@fill_doc def fetch_atlas_allen_2011(data_dir=None, url=None, resume=True, verbose=1): 'Download and return file names for the Allen and MIALAB ICA atlas\n (dated 2011).\n\n See :footcite:`Allen2011baseline`.\n\n The provided images are in MNI152 space.\n\n Parameters\n ----------\n %(data_dir)s\n...
@fill_doc def fetch_atlas_allen_2011(data_dir=None, url=None, resume=True, verbose=1): 'Download and return file names for the Allen and MIALAB ICA atlas\n (dated 2011).\n\n See :footcite:`Allen2011baseline`.\n\n The provided images are in MNI152 space.\n\n Parameters\n ----------\n %(data_dir)s\n...
a136a23bc4919b98d7fa94ca5df01a3df1761d87c766867b8c728542f5ea9983
@fill_doc def fetch_atlas_surf_destrieux(data_dir=None, url=None, resume=True, verbose=1): 'Download and load Destrieux et al, 2010 cortical atlas\n\n See :footcite:`DESTRIEUX20101`.\n\n This atlas returns 76 labels per hemisphere based on sulco-gryal patterns\n as distributed with Freesurfer in fsaverage5...
Download and load Destrieux et al, 2010 cortical atlas See :footcite:`DESTRIEUX20101`. This atlas returns 76 labels per hemisphere based on sulco-gryal patterns as distributed with Freesurfer in fsaverage5 surface space. .. versionadded:: 0.3 Parameters ---------- %(data_dir)s %(url)s %(resume)s %(verbose)s Return...
nilearn/datasets/atlas.py
fetch_atlas_surf_destrieux
lemiceterieux/nilearn
827
python
@fill_doc def fetch_atlas_surf_destrieux(data_dir=None, url=None, resume=True, verbose=1): 'Download and load Destrieux et al, 2010 cortical atlas\n\n See :footcite:`DESTRIEUX20101`.\n\n This atlas returns 76 labels per hemisphere based on sulco-gryal patterns\n as distributed with Freesurfer in fsaverage5...
@fill_doc def fetch_atlas_surf_destrieux(data_dir=None, url=None, resume=True, verbose=1): 'Download and load Destrieux et al, 2010 cortical atlas\n\n See :footcite:`DESTRIEUX20101`.\n\n This atlas returns 76 labels per hemisphere based on sulco-gryal patterns\n as distributed with Freesurfer in fsaverage5...
ca0385ec311ee7449242ea85f26d181812baa4592b9b34fe28261c52dee88d3e
def _separate_talairach_levels(atlas_img, labels, verbose=1): "Separate the multiple annotation levels in talairach raw atlas.\n\n The Talairach atlas has five levels of annotation: hemisphere, lobe, gyrus,\n tissue, brodmann area. They are mixed up in the original atlas: each label\n in the atlas correspo...
Separate the multiple annotation levels in talairach raw atlas. The Talairach atlas has five levels of annotation: hemisphere, lobe, gyrus, tissue, brodmann area. They are mixed up in the original atlas: each label in the atlas corresponds to a 5-tuple containing, for each of these levels, a value or the string '*' (m...
nilearn/datasets/atlas.py
_separate_talairach_levels
lemiceterieux/nilearn
827
python
def _separate_talairach_levels(atlas_img, labels, verbose=1): "Separate the multiple annotation levels in talairach raw atlas.\n\n The Talairach atlas has five levels of annotation: hemisphere, lobe, gyrus,\n tissue, brodmann area. They are mixed up in the original atlas: each label\n in the atlas correspo...
def _separate_talairach_levels(atlas_img, labels, verbose=1): "Separate the multiple annotation levels in talairach raw atlas.\n\n The Talairach atlas has five levels of annotation: hemisphere, lobe, gyrus,\n tissue, brodmann area. They are mixed up in the original atlas: each label\n in the atlas correspo...
801ad79ec8bfc7e3e95817c12d4c34d2828917502a062ff0b7aefe7f5abf79ab
def _get_talairach_all_levels(data_dir=None, verbose=1): "Get the path to Talairach atlas and labels\n\n The atlas is downloaded and the files are created if necessary.\n\n The image contains all five levels of the atlas, each encoded on 8 bits\n (least significant octet contains the hemisphere, the next o...
Get the path to Talairach atlas and labels The atlas is downloaded and the files are created if necessary. The image contains all five levels of the atlas, each encoded on 8 bits (least significant octet contains the hemisphere, the next one the lobe, then gyrus, tissue, and ba). The labels json file contains [['lev...
nilearn/datasets/atlas.py
_get_talairach_all_levels
lemiceterieux/nilearn
827
python
def _get_talairach_all_levels(data_dir=None, verbose=1): "Get the path to Talairach atlas and labels\n\n The atlas is downloaded and the files are created if necessary.\n\n The image contains all five levels of the atlas, each encoded on 8 bits\n (least significant octet contains the hemisphere, the next o...
def _get_talairach_all_levels(data_dir=None, verbose=1): "Get the path to Talairach atlas and labels\n\n The atlas is downloaded and the files are created if necessary.\n\n The image contains all five levels of the atlas, each encoded on 8 bits\n (least significant octet contains the hemisphere, the next o...
4745d62f85f876f53706e3dc9720d7054dc39c7b71edf2c53b818df8c4909d2e
@fill_doc def fetch_atlas_talairach(level_name, data_dir=None, verbose=1): "Download the Talairach atlas.\n\n For more information, see :footcite:`talairach_atlas`,\n :footcite:`Lancaster2000Talairach`,\n and :footcite:`Lancaster1997labeling`.\n\n .. versionadded:: 0.4.0\n\n Parameters\n ---------...
Download the Talairach atlas. For more information, see :footcite:`talairach_atlas`, :footcite:`Lancaster2000Talairach`, and :footcite:`Lancaster1997labeling`. .. versionadded:: 0.4.0 Parameters ---------- level_name : string {'hemisphere', 'lobe', 'gyrus', 'tissue', 'ba'} Which level of the atlas to use: the he...
nilearn/datasets/atlas.py
fetch_atlas_talairach
lemiceterieux/nilearn
827
python
@fill_doc def fetch_atlas_talairach(level_name, data_dir=None, verbose=1): "Download the Talairach atlas.\n\n For more information, see :footcite:`talairach_atlas`,\n :footcite:`Lancaster2000Talairach`,\n and :footcite:`Lancaster1997labeling`.\n\n .. versionadded:: 0.4.0\n\n Parameters\n ---------...
@fill_doc def fetch_atlas_talairach(level_name, data_dir=None, verbose=1): "Download the Talairach atlas.\n\n For more information, see :footcite:`talairach_atlas`,\n :footcite:`Lancaster2000Talairach`,\n and :footcite:`Lancaster1997labeling`.\n\n .. versionadded:: 0.4.0\n\n Parameters\n ---------...
f0284b36c89f2a78c9902b51cad627f9646377ab95f73cee129335bc9566739b
@fill_doc def fetch_atlas_pauli_2017(version='prob', data_dir=None, verbose=1): "Download the Pauli et al. (2017) atlas with in total\n 12 subcortical nodes\n\n See :footcite:`pauli_atlas` and :footcite:`Pauli2018probabilistic`.\n\n Parameters\n ----------\n version : str {'prob', 'det'}, optional\n ...
Download the Pauli et al. (2017) atlas with in total 12 subcortical nodes See :footcite:`pauli_atlas` and :footcite:`Pauli2018probabilistic`. Parameters ---------- version : str {'prob', 'det'}, optional Which version of the atlas should be download. This can be 'prob' for the probabilistic atlas or 'det' for...
nilearn/datasets/atlas.py
fetch_atlas_pauli_2017
lemiceterieux/nilearn
827
python
@fill_doc def fetch_atlas_pauli_2017(version='prob', data_dir=None, verbose=1): "Download the Pauli et al. (2017) atlas with in total\n 12 subcortical nodes\n\n See :footcite:`pauli_atlas` and :footcite:`Pauli2018probabilistic`.\n\n Parameters\n ----------\n version : str {'prob', 'det'}, optional\n ...
@fill_doc def fetch_atlas_pauli_2017(version='prob', data_dir=None, verbose=1): "Download the Pauli et al. (2017) atlas with in total\n 12 subcortical nodes\n\n See :footcite:`pauli_atlas` and :footcite:`Pauli2018probabilistic`.\n\n Parameters\n ----------\n version : str {'prob', 'det'}, optional\n ...
2be651359f1f223cc8d2c916dd7bcac860d4be796dab772fa19aa07daf2d933a
@fill_doc def fetch_atlas_schaefer_2018(n_rois=400, yeo_networks=7, resolution_mm=1, data_dir=None, base_url=None, resume=True, verbose=1): 'Download and return file names for the Schaefer 2018 parcellation\n\n .. versionadded:: 0.5.1\n\n The provided images are in MNI152 space.\n\n For more information on...
Download and return file names for the Schaefer 2018 parcellation .. versionadded:: 0.5.1 The provided images are in MNI152 space. For more information on this dataset, see :footcite:`schaefer_atlas`, :footcite:`Schaefer2017parcellation`, and :footcite:`Yeo2011organization`. Parameters ---------- n_rois : int, opti...
nilearn/datasets/atlas.py
fetch_atlas_schaefer_2018
lemiceterieux/nilearn
827
python
@fill_doc def fetch_atlas_schaefer_2018(n_rois=400, yeo_networks=7, resolution_mm=1, data_dir=None, base_url=None, resume=True, verbose=1): 'Download and return file names for the Schaefer 2018 parcellation\n\n .. versionadded:: 0.5.1\n\n The provided images are in MNI152 space.\n\n For more information on...
@fill_doc def fetch_atlas_schaefer_2018(n_rois=400, yeo_networks=7, resolution_mm=1, data_dir=None, base_url=None, resume=True, verbose=1): 'Download and return file names for the Schaefer 2018 parcellation\n\n .. versionadded:: 0.5.1\n\n The provided images are in MNI152 space.\n\n For more information on...
c1ed429e46a53b0ee0c4e53b1cbfbb8da3596518bc0f664c8a25f81269c428cc
def constructMaximumBinaryTree(self, nums): '\n :type nums: List[int]\n :rtype: TreeNode\n ' self.SparseTable = [[(v, i) for (i, v) in enumerate(nums)]] l = len(nums) t = 1 while ((t * 2) < l): prevTable = self.SparseTable[(- 1)] self.SparseTable.append([max(prev...
:type nums: List[int] :rtype: TreeNode
py/maximum-binary-tree.py
constructMaximumBinaryTree
ckclark/leetcode
0
python
def constructMaximumBinaryTree(self, nums): '\n :type nums: List[int]\n :rtype: TreeNode\n ' self.SparseTable = [[(v, i) for (i, v) in enumerate(nums)]] l = len(nums) t = 1 while ((t * 2) < l): prevTable = self.SparseTable[(- 1)] self.SparseTable.append([max(prev...
def constructMaximumBinaryTree(self, nums): '\n :type nums: List[int]\n :rtype: TreeNode\n ' self.SparseTable = [[(v, i) for (i, v) in enumerate(nums)]] l = len(nums) t = 1 while ((t * 2) < l): prevTable = self.SparseTable[(- 1)] self.SparseTable.append([max(prev...
987f589f3ffca4b45b556dcd51e590b4e267ec6cc23eba75ccb391c3a7ce373a
def repr(self, **fields) -> str: '\n Helper for __repr__\n ' field_strings = [] at_least_one_attached_attribute = False for (key, field) in fields.items(): field_strings.append(f'{key}={field!r}') at_least_one_attached_attribute = True if at_least_one_attached_attribute...
Helper for __repr__
investing_algorithm_framework/core/context/algorithm_context_configuration.py
repr
investing-algorithms/investing-algorithm-framework
1
python
def repr(self, **fields) -> str: '\n \n ' field_strings = [] at_least_one_attached_attribute = False for (key, field) in fields.items(): field_strings.append(f'{key}={field!r}') at_least_one_attached_attribute = True if at_least_one_attached_attribute: return f"...
def repr(self, **fields) -> str: '\n \n ' field_strings = [] at_least_one_attached_attribute = False for (key, field) in fields.items(): field_strings.append(f'{key}={field!r}') at_least_one_attached_attribute = True if at_least_one_attached_attribute: return f"...
a2fa5f16927ea85d45c1b5326556580ce4b589e3aa75dd6e2fb322a1872c9ce5
def simple_test(self, imgs, img_metas, imgs_2, img_metas_2, proposals=None, rescale=False, test_cfg2=None): 'Test without augmentation.' assert self.with_bbox, 'Bbox head must be implemented.' if (test_cfg2 is not None): test_cfg = test_cfg2 else: test_cfg = self.test_cfg img_metas =...
Test without augmentation.
mmdet/models/detectors/two_stage_3d_2scales.py
simple_test
arthur801031/3d-multi-resolution-rcnn
16
python
def simple_test(self, imgs, img_metas, imgs_2, img_metas_2, proposals=None, rescale=False, test_cfg2=None): assert self.with_bbox, 'Bbox head must be implemented.' if (test_cfg2 is not None): test_cfg = test_cfg2 else: test_cfg = self.test_cfg img_metas = img_metas[0] img_metas_...
def simple_test(self, imgs, img_metas, imgs_2, img_metas_2, proposals=None, rescale=False, test_cfg2=None): assert self.with_bbox, 'Bbox head must be implemented.' if (test_cfg2 is not None): test_cfg = test_cfg2 else: test_cfg = self.test_cfg img_metas = img_metas[0] img_metas_...
bd931965fa1741213b5d57bca320564a05b74b58665ddcaaa5d9d0c681967bad
def doInitialization(self): ' actually do the initialization and look up the models ' if (not self.initialized): parentModel = getModelByName(self.parentModelName) super(ModelCollectionManager, self).__init__(parentModel) for childName in self.childModelNames: childModel = ge...
actually do the initialization and look up the models
geocamUtil/models/managers.py
doInitialization
geocam/geocamUtilWeb
4
python
def doInitialization(self): ' ' if (not self.initialized): parentModel = getModelByName(self.parentModelName) super(ModelCollectionManager, self).__init__(parentModel) for childName in self.childModelNames: childModel = getModelByName(childName) self.registerChil...
def doInitialization(self): ' ' if (not self.initialized): parentModel = getModelByName(self.parentModelName) super(ModelCollectionManager, self).__init__(parentModel) for childName in self.childModelNames: childModel = getModelByName(childName) self.registerChil...
4c5bac090d976791b29dc1c1f35f2ce17326bac77eba6522d321a81cdcab27a1
def __init__(self, model_name_variable=None, query=None, using=None, hints=None, model=None): "\n Initialize with either the model or the model name variable.\n :param model_name_variable: the name of the variable holding the model name, ie 'settings.bla'\n :param query:\n :param using:\...
Initialize with either the model or the model name variable. :param model_name_variable: the name of the variable holding the model name, ie 'settings.bla' :param query: :param using: :param hints: :param model: This is just used when cloning or other internal uses, or if you already have the model.
geocamUtil/models/managers.py
__init__
geocam/geocamUtilWeb
4
python
def __init__(self, model_name_variable=None, query=None, using=None, hints=None, model=None): "\n Initialize with either the model or the model name variable.\n :param model_name_variable: the name of the variable holding the model name, ie 'settings.bla'\n :param query:\n :param using:\...
def __init__(self, model_name_variable=None, query=None, using=None, hints=None, model=None): "\n Initialize with either the model or the model name variable.\n :param model_name_variable: the name of the variable holding the model name, ie 'settings.bla'\n :param query:\n :param using:\...
18ddc6a71377b509fad258d828be6a58924fc51f20c10c262239d267f75f6227
def do_initialization(self): ' actually do the initialization and look up the models ' if (not self.initialized): model_name = eval(self.model_name_variable) self.model = getModelByName(model_name) super(LazyQuerySet, self).__init__(self.model, self.initial_query, self.initial_using, sel...
actually do the initialization and look up the models
geocamUtil/models/managers.py
do_initialization
geocam/geocamUtilWeb
4
python
def do_initialization(self): ' ' if (not self.initialized): model_name = eval(self.model_name_variable) self.model = getModelByName(model_name) super(LazyQuerySet, self).__init__(self.model, self.initial_query, self.initial_using, self.initial_hints) self.initialized = True
def do_initialization(self): ' ' if (not self.initialized): model_name = eval(self.model_name_variable) self.model = getModelByName(model_name) super(LazyQuerySet, self).__init__(self.model, self.initial_query, self.initial_using, self.initial_hints) self.initialized = True<|doc...
05ceebc322b03bd34b689699e07d963d73a95a8fec43b4bfc710998a49370e11
def do_initialization(self): ' actually do the initialization and look up the models ' if (not self.initialized): model_name = eval(self.model_name_variable) self.model = getModelByName(model_name) super(LazyModelManager, self).__init__() self.initialized = True
actually do the initialization and look up the models
geocamUtil/models/managers.py
do_initialization
geocam/geocamUtilWeb
4
python
def do_initialization(self): ' ' if (not self.initialized): model_name = eval(self.model_name_variable) self.model = getModelByName(model_name) super(LazyModelManager, self).__init__() self.initialized = True
def do_initialization(self): ' ' if (not self.initialized): model_name = eval(self.model_name_variable) self.model = getModelByName(model_name) super(LazyModelManager, self).__init__() self.initialized = True<|docstring|>actually do the initialization and look up the models<|end...
d878b8ba448f3f2c1b85ff2c3cade83248de8ef99c93cd6f0d515ab3d5f66108
@staticmethod def is_scalar(value): "Return True iff 'value' should be represented by a leaf node." return (not isinstance(value, (dict, list, tuple, set)))
Return True iff 'value' should be represented by a leaf node.
browson/node.py
is_scalar
jherland/browson
0
python
@staticmethod def is_scalar(value): return (not isinstance(value, (dict, list, tuple, set)))
@staticmethod def is_scalar(value): return (not isinstance(value, (dict, list, tuple, set)))<|docstring|>Return True iff 'value' should be represented by a leaf node.<|endoftext|>
62b22ff8cdeb336aa2cbab24a17e596c819ca1ad3fda33b0a31d8133ad4767d7
@property def is_leaf(self): 'Return True iff this is a leaf node (i.e. cannot have any children).\n\n This is different from an empty container, i.e. an "internal" node\n whose list of children is empty.' return (self._children is None)
Return True iff this is a leaf node (i.e. cannot have any children). This is different from an empty container, i.e. an "internal" node whose list of children is empty.
browson/node.py
is_leaf
jherland/browson
0
python
@property def is_leaf(self): 'Return True iff this is a leaf node (i.e. cannot have any children).\n\n This is different from an empty container, i.e. an "internal" node\n whose list of children is empty.' return (self._children is None)
@property def is_leaf(self): 'Return True iff this is a leaf node (i.e. cannot have any children).\n\n This is different from an empty container, i.e. an "internal" node\n whose list of children is empty.' return (self._children is None)<|docstring|>Return True iff this is a leaf node (i.e. cannot...
52fbb0e9746a7edf64dad98af2546bead4348dce45a66dc15085d82e298870d0
@property def children(self): "Return this node's children.\n\n Return an empty list for leaf nodes, as a convenience for callers that\n typically iterated over this methods return value." return ([] if (self._children is None) else self._children)
Return this node's children. Return an empty list for leaf nodes, as a convenience for callers that typically iterated over this methods return value.
browson/node.py
children
jherland/browson
0
python
@property def children(self): "Return this node's children.\n\n Return an empty list for leaf nodes, as a convenience for callers that\n typically iterated over this methods return value." return ([] if (self._children is None) else self._children)
@property def children(self): "Return this node's children.\n\n Return an empty list for leaf nodes, as a convenience for callers that\n typically iterated over this methods return value." return ([] if (self._children is None) else self._children)<|docstring|>Return this node's children. Return ...
cf2a0d2c5a5dc197203f83a7b9678d2dc45767fd5adfd73bdf4ba31a6682f790
def ancestors(self, include_self=False): 'Yield transitive parents of this node.' if include_self: (yield self) if (self.parent is not None): (yield from self.parent.ancestors(include_self=True))
Yield transitive parents of this node.
browson/node.py
ancestors
jherland/browson
0
python
def ancestors(self, include_self=False): if include_self: (yield self) if (self.parent is not None): (yield from self.parent.ancestors(include_self=True))
def ancestors(self, include_self=False): if include_self: (yield self) if (self.parent is not None): (yield from self.parent.ancestors(include_self=True))<|docstring|>Yield transitive parents of this node.<|endoftext|>
dafcfb61590b8d4dabc9d61c14ee4bc9cf52ed76d0364ad87721ed13547bdb23
def dfwalk(self, preorder=yield_node, postorder=None): 'Depth-first walk, yields values yielded from visitor function.' if (preorder is not None): (yield from preorder(self)) for child in self.children: (yield from child.dfwalk(preorder, postorder)) if (postorder is not None): (y...
Depth-first walk, yields values yielded from visitor function.
browson/node.py
dfwalk
jherland/browson
0
python
def dfwalk(self, preorder=yield_node, postorder=None): if (preorder is not None): (yield from preorder(self)) for child in self.children: (yield from child.dfwalk(preorder, postorder)) if (postorder is not None): (yield from postorder(self))
def dfwalk(self, preorder=yield_node, postorder=None): if (preorder is not None): (yield from preorder(self)) for child in self.children: (yield from child.dfwalk(preorder, postorder)) if (postorder is not None): (yield from postorder(self))<|docstring|>Depth-first walk, yields ...
b0ef35c3b3efadd90a98d5d781623fea8755adcb0cd7c8dc9eb040cad21f8ee7
def hit(self): '\n Decrease 1 HP and change the color of image and return the remaining HP\n\n @return The remaining HP\n ' self.hp -= 1 self.image = self._create_surface((244, 158, 66)) return self.hp
Decrease 1 HP and change the color of image and return the remaining HP @return The remaining HP
MLGame/games/arkanoid/game/gameobject.py
hit
Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING
0
python
def hit(self): '\n Decrease 1 HP and change the color of image and return the remaining HP\n\n @return The remaining HP\n ' self.hp -= 1 self.image = self._create_surface((244, 158, 66)) return self.hp
def hit(self): '\n Decrease 1 HP and change the color of image and return the remaining HP\n\n @return The remaining HP\n ' self.hp -= 1 self.image = self._create_surface((244, 158, 66)) return self.hp<|docstring|>Decrease 1 HP and change the color of image and return the remaining ...
80b1fa89cc995477d32f5429ab1ee04e078e451a3c6048abab55b9e4d98dd606
def _platform_additional_check(self, platform: Platform): '\n The additional checking for the condition that the ball passes the corner of the platform\n ' if (self.rect.bottom > platform.rect.top): routine_a = (Vector2(self._last_pos.bottomleft), Vector2(self.rect.bottomleft)) rou...
The additional checking for the condition that the ball passes the corner of the platform
MLGame/games/arkanoid/game/gameobject.py
_platform_additional_check
Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING
0
python
def _platform_additional_check(self, platform: Platform): '\n \n ' if (self.rect.bottom > platform.rect.top): routine_a = (Vector2(self._last_pos.bottomleft), Vector2(self.rect.bottomleft)) routine_b = (Vector2(self._last_pos.bottomright), Vector2(self.rect.bottomright)) re...
def _platform_additional_check(self, platform: Platform): '\n \n ' if (self.rect.bottom > platform.rect.top): routine_a = (Vector2(self._last_pos.bottomleft), Vector2(self.rect.bottomleft)) routine_b = (Vector2(self._last_pos.bottomright), Vector2(self.rect.bottomright)) re...
321351843763018d208f18ddd518983be415e0ed9925d9ef4130629a412b953d
def _slice_ball(self, ball_speed_x, platform_speed_x): '\n Check if the platform slices the ball, and modify the ball speed.\n\n @return The new x speed of the ball after slicing\n ' if (platform_speed_x == 0): return (7 if (ball_speed_x > 0) else (- 7)) elif ((ball_speed_x * pl...
Check if the platform slices the ball, and modify the ball speed. @return The new x speed of the ball after slicing
MLGame/games/arkanoid/game/gameobject.py
_slice_ball
Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING
0
python
def _slice_ball(self, ball_speed_x, platform_speed_x): '\n Check if the platform slices the ball, and modify the ball speed.\n\n @return The new x speed of the ball after slicing\n ' if (platform_speed_x == 0): return (7 if (ball_speed_x > 0) else (- 7)) elif ((ball_speed_x * pl...
def _slice_ball(self, ball_speed_x, platform_speed_x): '\n Check if the platform slices the ball, and modify the ball speed.\n\n @return The new x speed of the ball after slicing\n ' if (platform_speed_x == 0): return (7 if (ball_speed_x > 0) else (- 7)) elif ((ball_speed_x * pl...
49d3b78919ff711e3eab976eb9ffe4f88653608f987fb23f4de16a4e52e09f3c
def check_hit_brick(self, group_brick: pygame.sprite.RenderPlain) -> int: '\n Check if the ball hits bricks in the `group_brick`.\n The hit bricks will be removed from `group_brick`, but the alive hard brick will not.\n However, if the ball speed is high, the hard brick will be removed with onl...
Check if the ball hits bricks in the `group_brick`. The hit bricks will be removed from `group_brick`, but the alive hard brick will not. However, if the ball speed is high, the hard brick will be removed with only one hit. @param group_brick The sprite group containing bricks @return The number of destroyed bricks
MLGame/games/arkanoid/game/gameobject.py
check_hit_brick
Liuian/1092_INTRODUCTION-TO-MACHINE-LEARNING-AND-ITS-APPLICATION-TO-GAMING
0
python
def check_hit_brick(self, group_brick: pygame.sprite.RenderPlain) -> int: '\n Check if the ball hits bricks in the `group_brick`.\n The hit bricks will be removed from `group_brick`, but the alive hard brick will not.\n However, if the ball speed is high, the hard brick will be removed with onl...
def check_hit_brick(self, group_brick: pygame.sprite.RenderPlain) -> int: '\n Check if the ball hits bricks in the `group_brick`.\n The hit bricks will be removed from `group_brick`, but the alive hard brick will not.\n However, if the ball speed is high, the hard brick will be removed with onl...
02525ddedbfcc39d8788c2663778e039a75e08f874d60aeac9b2e5dec25367d5
def create_optimizer(loss, learning_rate, num_train_steps, weight_decay_rate=0.0, warmup_steps=0, warmup_proportion=0, lr_decay_power=1.0, layerwise_lr_decay_power=(- 1), n_transformer_layers=None, hvd=None, use_fp16=False, num_accumulation_steps=1, allreduce_post_accumulation=False): '\n Creates an optimizer an...
Creates an optimizer and training op.
model/optimization.py
create_optimizer
ololo123321/electra
0
python
def create_optimizer(loss, learning_rate, num_train_steps, weight_decay_rate=0.0, warmup_steps=0, warmup_proportion=0, lr_decay_power=1.0, layerwise_lr_decay_power=(- 1), n_transformer_layers=None, hvd=None, use_fp16=False, num_accumulation_steps=1, allreduce_post_accumulation=False): '\n \n ' compression...
def create_optimizer(loss, learning_rate, num_train_steps, weight_decay_rate=0.0, warmup_steps=0, warmup_proportion=0, lr_decay_power=1.0, layerwise_lr_decay_power=(- 1), n_transformer_layers=None, hvd=None, use_fp16=False, num_accumulation_steps=1, allreduce_post_accumulation=False): '\n \n ' compression...
355f36dbfd98170c5e518f5a4bba67bad63a658ab2faf69f5cb07010722ba74c
def _get_layer_lrs(learning_rate, layer_decay, n_layers): 'Have lower learning rates for layers closer to the input.' key_to_depths = collections.OrderedDict({'/embeddings/': 0, '/embeddings_project/': 0, 'task_specific/': (n_layers + 2)}) for layer in range(n_layers): key_to_depths[(('encoder/layer...
Have lower learning rates for layers closer to the input.
model/optimization.py
_get_layer_lrs
ololo123321/electra
0
python
def _get_layer_lrs(learning_rate, layer_decay, n_layers): key_to_depths = collections.OrderedDict({'/embeddings/': 0, '/embeddings_project/': 0, 'task_specific/': (n_layers + 2)}) for layer in range(n_layers): key_to_depths[(('encoder/layer_' + str(layer)) + '/')] = (layer + 1) return {key: (le...
def _get_layer_lrs(learning_rate, layer_decay, n_layers): key_to_depths = collections.OrderedDict({'/embeddings/': 0, '/embeddings_project/': 0, 'task_specific/': (n_layers + 2)}) for layer in range(n_layers): key_to_depths[(('encoder/layer_' + str(layer)) + '/')] = (layer + 1) return {key: (le...
24adf298c22794b47c56f2cad97d96d0fe9bd10752682c591a28b0dbca159649
def __init__(self, learning_rate, weight_decay_rate=0.0, beta_1=0.9, beta_2=0.999, epsilon=1e-06, exclude_from_weight_decay=None, name='AdamWeightDecayOptimizer'): 'Constructs a AdamWeightDecayOptimizer.' super(AdamWeightDecayOptimizer, self).__init__(False, name) self.learning_rate = learning_rate self...
Constructs a AdamWeightDecayOptimizer.
model/optimization.py
__init__
ololo123321/electra
0
python
def __init__(self, learning_rate, weight_decay_rate=0.0, beta_1=0.9, beta_2=0.999, epsilon=1e-06, exclude_from_weight_decay=None, name='AdamWeightDecayOptimizer'): super(AdamWeightDecayOptimizer, self).__init__(False, name) self.learning_rate = learning_rate self.weight_decay_rate = weight_decay_rate ...
def __init__(self, learning_rate, weight_decay_rate=0.0, beta_1=0.9, beta_2=0.999, epsilon=1e-06, exclude_from_weight_decay=None, name='AdamWeightDecayOptimizer'): super(AdamWeightDecayOptimizer, self).__init__(False, name) self.learning_rate = learning_rate self.weight_decay_rate = weight_decay_rate ...
d7327d149d782103e88635073d69baa53030a35cf75348614ceefcd08b72441d
def _apply_gradients(self, grads_and_vars, learning_rate): 'See base class.' assignments = [] for (grad, param) in grads_and_vars: if ((grad is None) or (param is None)): continue param_name = self._get_variable_name(param.name) m = tf.get_variable(name=(param_name + '/ad...
See base class.
model/optimization.py
_apply_gradients
ololo123321/electra
0
python
def _apply_gradients(self, grads_and_vars, learning_rate): assignments = [] for (grad, param) in grads_and_vars: if ((grad is None) or (param is None)): continue param_name = self._get_variable_name(param.name) m = tf.get_variable(name=(param_name + '/adam_m'), shape=par...
def _apply_gradients(self, grads_and_vars, learning_rate): assignments = [] for (grad, param) in grads_and_vars: if ((grad is None) or (param is None)): continue param_name = self._get_variable_name(param.name) m = tf.get_variable(name=(param_name + '/adam_m'), shape=par...
da0acc64040e539fa03f8439eac3eb576613720c4bd7b4eea35feb7371ae9ea6
def _do_use_weight_decay(self, param_name): 'Whether to use L2 weight decay for `param_name`.' if (not self.weight_decay_rate): return False if self.exclude_from_weight_decay: for r in self.exclude_from_weight_decay: if (re.search(r, param_name) is not None): retu...
Whether to use L2 weight decay for `param_name`.
model/optimization.py
_do_use_weight_decay
ololo123321/electra
0
python
def _do_use_weight_decay(self, param_name): if (not self.weight_decay_rate): return False if self.exclude_from_weight_decay: for r in self.exclude_from_weight_decay: if (re.search(r, param_name) is not None): return False return True
def _do_use_weight_decay(self, param_name): if (not self.weight_decay_rate): return False if self.exclude_from_weight_decay: for r in self.exclude_from_weight_decay: if (re.search(r, param_name) is not None): return False return True<|docstring|>Whether to us...
9bd4d7a00c67683b92306e6f63516a48c730f5e6f02201323d156c1c60096274
def _get_variable_name(self, param_name): 'Get the variable name from the tensor name.' m = re.match('^(.*):\\d+$', param_name) if (m is not None): param_name = m.group(1) return param_name
Get the variable name from the tensor name.
model/optimization.py
_get_variable_name
ololo123321/electra
0
python
def _get_variable_name(self, param_name): m = re.match('^(.*):\\d+$', param_name) if (m is not None): param_name = m.group(1) return param_name
def _get_variable_name(self, param_name): m = re.match('^(.*):\\d+$', param_name) if (m is not None): param_name = m.group(1) return param_name<|docstring|>Get the variable name from the tensor name.<|endoftext|>
78174c503a36c91b6dcfe505831b062f5ce01da2d47ed74cc4023f1b9cad3aba
def main_cron(no_confirm=True): 'set no_confirm to True for running this script automatically\n without intervention.' src_dump = get_src_dump() mart_version = chk_latest_mart_version() logging.info(('Checking latest mart_version:\t%s' % mart_version)) doc = src_dump.find_one({'_id': 'ensembl'...
set no_confirm to True for running this script automatically without intervention.
src/dataload/data_dump/dl_ensembl_mart.py
main_cron
karawallace/mygene
0
python
def main_cron(no_confirm=True): 'set no_confirm to True for running this script automatically\n without intervention.' src_dump = get_src_dump() mart_version = chk_latest_mart_version() logging.info(('Checking latest mart_version:\t%s' % mart_version)) doc = src_dump.find_one({'_id': 'ensembl'...
def main_cron(no_confirm=True): 'set no_confirm to True for running this script automatically\n without intervention.' src_dump = get_src_dump() mart_version = chk_latest_mart_version() logging.info(('Checking latest mart_version:\t%s' % mart_version)) doc = src_dump.find_one({'_id': 'ensembl'...
0a02cb030fe1194a48c18c592b889af2423edbd64b23cb83025e813675ca88f8
@router.get('', response_model=projects.schemas.template.TemplateList) async def handle_list_templates(session: Session=Depends(session_scope)): '\n Handles GET requests to /.\n\n Parameters\n ----------\n session : sqlalchemy.orm.session.Session\n\n Returns\n -------\n projects.schemas.templat...
Handles GET requests to /. Parameters ---------- session : sqlalchemy.orm.session.Session Returns ------- projects.schemas.template.TemplateList
projects/api/templates.py
handle_list_templates
dnlcesilva/projects
0
python
@router.get(, response_model=projects.schemas.template.TemplateList) async def handle_list_templates(session: Session=Depends(session_scope)): '\n Handles GET requests to /.\n\n Parameters\n ----------\n session : sqlalchemy.orm.session.Session\n\n Returns\n -------\n projects.schemas.template....
@router.get(, response_model=projects.schemas.template.TemplateList) async def handle_list_templates(session: Session=Depends(session_scope)): '\n Handles GET requests to /.\n\n Parameters\n ----------\n session : sqlalchemy.orm.session.Session\n\n Returns\n -------\n projects.schemas.template....
33970662e9238be37ee1034084554e7c91dacd265ac4cbc7bb0526253fea74d2
@router.post('', response_model=projects.schemas.template.Template) async def handle_post_templates(template: projects.schemas.template.TemplateCreate, session: Session=Depends(session_scope)): '\n Handles POST requests to /.\n\n Parameters\n ----------\n session : sqlalchemy.orm.session.Session\n te...
Handles POST requests to /. Parameters ---------- session : sqlalchemy.orm.session.Session template : projects.schemas.template.TemplateCreate Returns ------- projects.schemas.template.Template
projects/api/templates.py
handle_post_templates
dnlcesilva/projects
0
python
@router.post(, response_model=projects.schemas.template.Template) async def handle_post_templates(template: projects.schemas.template.TemplateCreate, session: Session=Depends(session_scope)): '\n Handles POST requests to /.\n\n Parameters\n ----------\n session : sqlalchemy.orm.session.Session\n temp...
@router.post(, response_model=projects.schemas.template.Template) async def handle_post_templates(template: projects.schemas.template.TemplateCreate, session: Session=Depends(session_scope)): '\n Handles POST requests to /.\n\n Parameters\n ----------\n session : sqlalchemy.orm.session.Session\n temp...
6851dd80601a6984ddeda54275bfb4f7892cc1468c94ea53da887e0568ce6ce4
@router.get('/{template_id}', response_model=projects.schemas.template.Template) async def handle_get_template(template_id: str, session: Session=Depends(session_scope)): '\n Handles GET requests to /<template_id>.\n\n Parameters\n ----------\n template_id : str\n session : sqlalchemy.orm.session.Ses...
Handles GET requests to /<template_id>. Parameters ---------- template_id : str session : sqlalchemy.orm.session.Session Returns ------- projects.schemas.template.Template
projects/api/templates.py
handle_get_template
dnlcesilva/projects
0
python
@router.get('/{template_id}', response_model=projects.schemas.template.Template) async def handle_get_template(template_id: str, session: Session=Depends(session_scope)): '\n Handles GET requests to /<template_id>.\n\n Parameters\n ----------\n template_id : str\n session : sqlalchemy.orm.session.Ses...
@router.get('/{template_id}', response_model=projects.schemas.template.Template) async def handle_get_template(template_id: str, session: Session=Depends(session_scope)): '\n Handles GET requests to /<template_id>.\n\n Parameters\n ----------\n template_id : str\n session : sqlalchemy.orm.session.Ses...
417ed3ac46968bf7b017d3b69ef199f5a917d4db3a6caf9894a98d0c4bbc48d8
@router.patch('/{template_id}', response_model=projects.schemas.template.Template) async def handle_patch_template(template_id: str, template: projects.schemas.template.TemplateUpdate, session: Session=Depends(session_scope)): '\n Handles PATCH requests to /<template_id>.\n\n Parameters\n ----------\n t...
Handles PATCH requests to /<template_id>. Parameters ---------- template_id : str template : projects.schemas.template.TemplateUpdate session : sqlalchemy.orm.session.Session Returns ------- projects.schemas.template.Template
projects/api/templates.py
handle_patch_template
dnlcesilva/projects
0
python
@router.patch('/{template_id}', response_model=projects.schemas.template.Template) async def handle_patch_template(template_id: str, template: projects.schemas.template.TemplateUpdate, session: Session=Depends(session_scope)): '\n Handles PATCH requests to /<template_id>.\n\n Parameters\n ----------\n t...
@router.patch('/{template_id}', response_model=projects.schemas.template.Template) async def handle_patch_template(template_id: str, template: projects.schemas.template.TemplateUpdate, session: Session=Depends(session_scope)): '\n Handles PATCH requests to /<template_id>.\n\n Parameters\n ----------\n t...
821f5820c08fe2fcb3746e72b11a790f8d30500a1b09d10f434e2b94257d6b77
@router.delete('/{template_id}') async def handle_delete_template(template_id: str, session: Session=Depends(session_scope)): '\n Handles DELETE requests to /<template_id>.\n\n Parameters\n ----------\n template_id : str\n session : sqlalchemy.orm.session.Session\n\n Returns\n -------\n proj...
Handles DELETE requests to /<template_id>. Parameters ---------- template_id : str session : sqlalchemy.orm.session.Session Returns ------- projects.schemas.message.Message
projects/api/templates.py
handle_delete_template
dnlcesilva/projects
0
python
@router.delete('/{template_id}') async def handle_delete_template(template_id: str, session: Session=Depends(session_scope)): '\n Handles DELETE requests to /<template_id>.\n\n Parameters\n ----------\n template_id : str\n session : sqlalchemy.orm.session.Session\n\n Returns\n -------\n proj...
@router.delete('/{template_id}') async def handle_delete_template(template_id: str, session: Session=Depends(session_scope)): '\n Handles DELETE requests to /<template_id>.\n\n Parameters\n ----------\n template_id : str\n session : sqlalchemy.orm.session.Session\n\n Returns\n -------\n proj...
d11619b5a0d46b298de29c133ef56d59f58d6314891b229ce5af2a34a350a4fc
def limit_speed(self, velocity): '\n Returns a velocity that is no faster than self.speed_limit.\n ' speed = la.norm(velocity) if (speed < self.speed_limit): return velocity else: return ((self.speed_limit * velocity) / speed)
Returns a velocity that is no faster than self.speed_limit.
src/ball.py
limit_speed
dnagarkar/bubble-deflector
2
python
def limit_speed(self, velocity): '\n \n ' speed = la.norm(velocity) if (speed < self.speed_limit): return velocity else: return ((self.speed_limit * velocity) / speed)
def limit_speed(self, velocity): '\n \n ' speed = la.norm(velocity) if (speed < self.speed_limit): return velocity else: return ((self.speed_limit * velocity) / speed)<|docstring|>Returns a velocity that is no faster than self.speed_limit.<|endoftext|>
8caec319c35ccb7961a3d028d71211be971da85fe08288c565b53e7d1b251ae6
def apply_force(self, force): '\n Compute and update the acceleration on this ball.\n Hint: Force = Mass * Acceleration\n ' pass
Compute and update the acceleration on this ball. Hint: Force = Mass * Acceleration
src/ball.py
apply_force
dnagarkar/bubble-deflector
2
python
def apply_force(self, force): '\n Compute and update the acceleration on this ball.\n Hint: Force = Mass * Acceleration\n ' pass
def apply_force(self, force): '\n Compute and update the acceleration on this ball.\n Hint: Force = Mass * Acceleration\n ' pass<|docstring|>Compute and update the acceleration on this ball. Hint: Force = Mass * Acceleration<|endoftext|>
b5acf983b070c671765ed0bfbcd92d05bc47322dbd4c4e76df836bf5bfc7b6de
def update(self, dt): '\n Update the velocity and position.\n Hint: new_velocity = dt * acceleration + old_velocity\n Hint: new_position = dt * velocity + old_position\n ' self.acceleration = np.array([0, 0], dtype=np.float)
Update the velocity and position. Hint: new_velocity = dt * acceleration + old_velocity Hint: new_position = dt * velocity + old_position
src/ball.py
update
dnagarkar/bubble-deflector
2
python
def update(self, dt): '\n Update the velocity and position.\n Hint: new_velocity = dt * acceleration + old_velocity\n Hint: new_position = dt * velocity + old_position\n ' self.acceleration = np.array([0, 0], dtype=np.float)
def update(self, dt): '\n Update the velocity and position.\n Hint: new_velocity = dt * acceleration + old_velocity\n Hint: new_position = dt * velocity + old_position\n ' self.acceleration = np.array([0, 0], dtype=np.float)<|docstring|>Update the velocity and position. Hint: new_vel...
bc9d7566fec526d8e9bfd77f8955c3e9742ef12a9666a603d67e9c2cd1f113a4
def wall_collision(self, wall, dt): '\n We first want to check if this ball is colliding with `wall`.\n If so, we want to compute the force on the ball.\n Hint: Take a look at `self.compute_wall_collision_point`\n ' pass
We first want to check if this ball is colliding with `wall`. If so, we want to compute the force on the ball. Hint: Take a look at `self.compute_wall_collision_point`
src/ball.py
wall_collision
dnagarkar/bubble-deflector
2
python
def wall_collision(self, wall, dt): '\n We first want to check if this ball is colliding with `wall`.\n If so, we want to compute the force on the ball.\n Hint: Take a look at `self.compute_wall_collision_point`\n ' pass
def wall_collision(self, wall, dt): '\n We first want to check if this ball is colliding with `wall`.\n If so, we want to compute the force on the ball.\n Hint: Take a look at `self.compute_wall_collision_point`\n ' pass<|docstring|>We first want to check if this ball is colliding wi...
87d6a63096548fb14b116ae934be8836b2409d7033874192f1c685a896578913
def ball_ball_collision(ball_a, ball_b, dt): '\n We first want to check if `ball_a` and `ball_b` are colliding.\n If so, we need to apply a force to each ball.\n Hint: Take a look at `Ball.reset_ball_collision_positions`\n and `Ball.compute_ball_collision_forces`\n ' p...
We first want to check if `ball_a` and `ball_b` are colliding. If so, we need to apply a force to each ball. Hint: Take a look at `Ball.reset_ball_collision_positions` and `Ball.compute_ball_collision_forces`
src/ball.py
ball_ball_collision
dnagarkar/bubble-deflector
2
python
def ball_ball_collision(ball_a, ball_b, dt): '\n We first want to check if `ball_a` and `ball_b` are colliding.\n If so, we need to apply a force to each ball.\n Hint: Take a look at `Ball.reset_ball_collision_positions`\n and `Ball.compute_ball_collision_forces`\n ' p...
def ball_ball_collision(ball_a, ball_b, dt): '\n We first want to check if `ball_a` and `ball_b` are colliding.\n If so, we need to apply a force to each ball.\n Hint: Take a look at `Ball.reset_ball_collision_positions`\n and `Ball.compute_ball_collision_forces`\n ' p...
fb70efea6b791203e60943d86c014d8b5f32aa3b18bc45da78ba4cb14836389a
def draw(self, screen): '\n Draw this ball to the screen.\n ' position = self.position.astype(np.int) screen_bounds = np.array([[0, 0], [screen.get_width(), screen.get_height()]], dtype=np.int) if (np.all((screen_bounds[0] < position)) and np.all((position < screen_bounds[1]))): py...
Draw this ball to the screen.
src/ball.py
draw
dnagarkar/bubble-deflector
2
python
def draw(self, screen): '\n \n ' position = self.position.astype(np.int) screen_bounds = np.array([[0, 0], [screen.get_width(), screen.get_height()]], dtype=np.int) if (np.all((screen_bounds[0] < position)) and np.all((position < screen_bounds[1]))): pygame.draw.circle(screen, self...
def draw(self, screen): '\n \n ' position = self.position.astype(np.int) screen_bounds = np.array([[0, 0], [screen.get_width(), screen.get_height()]], dtype=np.int) if (np.all((screen_bounds[0] < position)) and np.all((position < screen_bounds[1]))): pygame.draw.circle(screen, self...
b3760ffbc4f3b0db07b1980c4829e4bb70cbd059d99ae442f787ce212ef51629
def compute_wall_collision_point(self, wall): '\n Returns the point where ball and wall intersect or False if they do not\n intersect.\n ' if (la.norm((wall.a - wall.b)) == 0): return False d_norm = np.dot(((wall.b - wall.a) / la.norm((wall.b - wall.a))), (self.position - wall.a...
Returns the point where ball and wall intersect or False if they do not intersect.
src/ball.py
compute_wall_collision_point
dnagarkar/bubble-deflector
2
python
def compute_wall_collision_point(self, wall): '\n Returns the point where ball and wall intersect or False if they do not\n intersect.\n ' if (la.norm((wall.a - wall.b)) == 0): return False d_norm = np.dot(((wall.b - wall.a) / la.norm((wall.b - wall.a))), (self.position - wall.a...
def compute_wall_collision_point(self, wall): '\n Returns the point where ball and wall intersect or False if they do not\n intersect.\n ' if (la.norm((wall.a - wall.b)) == 0): return False d_norm = np.dot(((wall.b - wall.a) / la.norm((wall.b - wall.a))), (self.position - wall.a...
109e53e69285198f43f4299d5a7963e021b55bef63a7b36e5eb9d7f8710b9628
def compute_ball_collision_forces(ball_a, ball_b, dt): '\n Returns the two forces acting on `ball_a` and `ball_b` when\n they collide.\n ' force_a = ((((((((- 2.0) / dt) * ball_a.mass) * ball_b.mass) / (ball_a.mass + ball_b.mass)) * np.dot((ball_a.velocity - ball_b.velocity), (ball_a.positi...
Returns the two forces acting on `ball_a` and `ball_b` when they collide.
src/ball.py
compute_ball_collision_forces
dnagarkar/bubble-deflector
2
python
def compute_ball_collision_forces(ball_a, ball_b, dt): '\n Returns the two forces acting on `ball_a` and `ball_b` when\n they collide.\n ' force_a = ((((((((- 2.0) / dt) * ball_a.mass) * ball_b.mass) / (ball_a.mass + ball_b.mass)) * np.dot((ball_a.velocity - ball_b.velocity), (ball_a.positi...
def compute_ball_collision_forces(ball_a, ball_b, dt): '\n Returns the two forces acting on `ball_a` and `ball_b` when\n they collide.\n ' force_a = ((((((((- 2.0) / dt) * ball_a.mass) * ball_b.mass) / (ball_a.mass + ball_b.mass)) * np.dot((ball_a.velocity - ball_b.velocity), (ball_a.positi...
60ebb56e820fcf30fc5a013e8b95328286905a0176f0d6c5817a96d4d137eed5
def reset_ball_collision_positions(ball_a, ball_b): '\n Set the positions of `ball_a` and `ball_b` so that they intersect at\n exactly one point.\n ' distance = la.norm((ball_a.position - ball_b.position)) error = (((((ball_a.radius + ball_b.radius) - distance) / 2.0) * (ball_a.position...
Set the positions of `ball_a` and `ball_b` so that they intersect at exactly one point.
src/ball.py
reset_ball_collision_positions
dnagarkar/bubble-deflector
2
python
def reset_ball_collision_positions(ball_a, ball_b): '\n Set the positions of `ball_a` and `ball_b` so that they intersect at\n exactly one point.\n ' distance = la.norm((ball_a.position - ball_b.position)) error = (((((ball_a.radius + ball_b.radius) - distance) / 2.0) * (ball_a.position...
def reset_ball_collision_positions(ball_a, ball_b): '\n Set the positions of `ball_a` and `ball_b` so that they intersect at\n exactly one point.\n ' distance = la.norm((ball_a.position - ball_b.position)) error = (((((ball_a.radius + ball_b.radius) - distance) / 2.0) * (ball_a.position...
398bdb3cd8c34c6bd455c9fa918abdb9b2501cf5d02b423e4bdd5e78df6a6c57
def _parse(s, handler): 'Simple configuration parser.' def stmts(obj, next, token): 'Process statements until EOF.' while (token is not EOF): token = assignlist(obj, next, token) def assign(obj, next, token): if (not isinstance(token, six.string_types)): rai...
Simple configuration parser.
structprop/__init__.py
_parse
edgeware/structprop
1
python
def _parse(s, handler): def stmts(obj, next, token): 'Process statements until EOF.' while (token is not EOF): token = assignlist(obj, next, token) def assign(obj, next, token): if (not isinstance(token, six.string_types)): raise ParserError(("term expected...
def _parse(s, handler): def stmts(obj, next, token): 'Process statements until EOF.' while (token is not EOF): token = assignlist(obj, next, token) def assign(obj, next, token): if (not isinstance(token, six.string_types)): raise ParserError(("term expected...