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 |
|---|---|---|---|---|---|---|---|---|---|
7b70cfd0c9b396754d61871a4794969f9c8d480d403307187938f64cc449f90a | def migrate_actor(self):
'\n Migrate to the latest schema version.\n '
migrate_1_to_2(self) | Migrate to the latest schema version. | crits/actors/migrate.py | migrate_actor | qzapata/crits | 738 | python | def migrate_actor(self):
'\n \n '
migrate_1_to_2(self) | def migrate_actor(self):
'\n \n '
migrate_1_to_2(self)<|docstring|>Migrate to the latest schema version.<|endoftext|> |
b72e27c8850b4a66e2e37e1b3ab4894e647cc50eecac09e871a8e2732d9a25b9 | def migrate_1_to_2(self):
'\n Migrate from schema 1 to 2.\n '
if (self.schema_version < 1):
migrate_0_to_1(self)
if (self.schema_version == 1):
from crits.core.core_migrate import migrate_analysis_results
migrate_analysis_results(self)
self.schema_version = 2
se... | Migrate from schema 1 to 2. | crits/actors/migrate.py | migrate_1_to_2 | qzapata/crits | 738 | python | def migrate_1_to_2(self):
'\n \n '
if (self.schema_version < 1):
migrate_0_to_1(self)
if (self.schema_version == 1):
from crits.core.core_migrate import migrate_analysis_results
migrate_analysis_results(self)
self.schema_version = 2
self.save()
self.relo... | def migrate_1_to_2(self):
'\n \n '
if (self.schema_version < 1):
migrate_0_to_1(self)
if (self.schema_version == 1):
from crits.core.core_migrate import migrate_analysis_results
migrate_analysis_results(self)
self.schema_version = 2
self.save()
self.relo... |
67ad9bfbcf392f135d275a0360dc93e71f63d6ac70a6b7cb0ebb39f686dd2316 | def migrate_0_to_1(self):
'\n Migrate from schema 0 to 1.\n '
if (self.schema_version < 1):
self.schema_version = 1 | Migrate from schema 0 to 1. | crits/actors/migrate.py | migrate_0_to_1 | qzapata/crits | 738 | python | def migrate_0_to_1(self):
'\n \n '
if (self.schema_version < 1):
self.schema_version = 1 | def migrate_0_to_1(self):
'\n \n '
if (self.schema_version < 1):
self.schema_version = 1<|docstring|>Migrate from schema 0 to 1.<|endoftext|> |
843089504d8557a1c3110600fb38d91db90cc9d8161e5dada8facc135f4d2b6f | def extendMarkdown(self, md, md_globals):
' Insert MacroPreprocessor before ReferencePreprocessor. '
md.preprocessors.add('dw-macros', MacroPreprocessor(md), '>html_block') | Insert MacroPreprocessor before ReferencePreprocessor. | wiki/plugins/macros/mdx/macro.py | extendMarkdown | Si-elegans/Web-based_GUI_Tools | 3 | python | def extendMarkdown(self, md, md_globals):
' '
md.preprocessors.add('dw-macros', MacroPreprocessor(md), '>html_block') | def extendMarkdown(self, md, md_globals):
' '
md.preprocessors.add('dw-macros', MacroPreprocessor(md), '>html_block')<|docstring|>Insert MacroPreprocessor before ReferencePreprocessor.<|endoftext|> |
8d6b700dbe90c4875f298f1a3cb7218a3786b7c7a737d1c1fe5717233e7dacfe | def _combine(params: Array, marginals: MarginalsType) -> Array:
'Combine parameters according to parameter list. Supports one batch dimension.'
shape = params.shape
device = params.device
z_shape = _get_z_shape(marginals)
if (len(shape) == 0):
z = torch.zeros(z_shape).to(device)
for ... | Combine parameters according to parameter list. Supports one batch dimension. | swyft/networks/tail.py | _combine | NLeSC-GO-common-infrastructure/swyft | 0 | python | def _combine(params: Array, marginals: MarginalsType) -> Array:
shape = params.shape
device = params.device
z_shape = _get_z_shape(marginals)
if (len(shape) == 0):
z = torch.zeros(z_shape).to(device)
for (i, c) in enumerate(marginals):
pars = torch.stack([params[k] for k... | def _combine(params: Array, marginals: MarginalsType) -> Array:
shape = params.shape
device = params.device
z_shape = _get_z_shape(marginals)
if (len(shape) == 0):
z = torch.zeros(z_shape).to(device)
for (i, c) in enumerate(marginals):
pars = torch.stack([params[k] for k... |
516907c2fe02dfc59c11cb5ec7b42c64810f90e0815dc04a0659b1cad39d1629 | def __init__(self, n_features: int, marginals, hidden_layers: Sequence[int]=[256, 256, 256], p: float=0.0, online_norm: bool=True, param_transform=None, tail_features: bool=False, n_tail_features: int=2):
'Default tail network.\n\n Args:\n n_features: Length of feature vector.\n margina... | Default tail network.
Args:
n_features: Length of feature vector.
marginals: List of marginals to learn.
hidden_layers: Hidden layer size
p: Dropout
online_norm: Online normalization of parameters.
param_transform: Perform optional parameter transform.
tail_features: Use tail features.
... | swyft/networks/tail.py | __init__ | NLeSC-GO-common-infrastructure/swyft | 0 | python | def __init__(self, n_features: int, marginals, hidden_layers: Sequence[int]=[256, 256, 256], p: float=0.0, online_norm: bool=True, param_transform=None, tail_features: bool=False, n_tail_features: int=2):
'Default tail network.\n\n Args:\n n_features: Length of feature vector.\n margina... | def __init__(self, n_features: int, marginals, hidden_layers: Sequence[int]=[256, 256, 256], p: float=0.0, online_norm: bool=True, param_transform=None, tail_features: bool=False, n_tail_features: int=2):
'Default tail network.\n\n Args:\n n_features: Length of feature vector.\n margina... |
4ce0f3b674bb95041bd7e926d7d5315bfd2a8edbbd13e7df3614f4fe78a719b7 | def forward(self, f: torch.Tensor, params) -> torch.Tensor:
'Forward pass tail network. Can handle one batch dimension.\n\n Args:\n f (tensor): feature vectors with shape (n_batch, n_features)\n params (dict): parameter dictionary, with parameter shape (n_batch,)\n\n Returns:\n ... | Forward pass tail network. Can handle one batch dimension.
Args:
f (tensor): feature vectors with shape (n_batch, n_features)
params (dict): parameter dictionary, with parameter shape (n_batch,)
Returns:
lnL (tensor): lnL ratio with shape (n_batch, len(marginals)) | swyft/networks/tail.py | forward | NLeSC-GO-common-infrastructure/swyft | 0 | python | def forward(self, f: torch.Tensor, params) -> torch.Tensor:
'Forward pass tail network. Can handle one batch dimension.\n\n Args:\n f (tensor): feature vectors with shape (n_batch, n_features)\n params (dict): parameter dictionary, with parameter shape (n_batch,)\n\n Returns:\n ... | def forward(self, f: torch.Tensor, params) -> torch.Tensor:
'Forward pass tail network. Can handle one batch dimension.\n\n Args:\n f (tensor): feature vectors with shape (n_batch, n_features)\n params (dict): parameter dictionary, with parameter shape (n_batch,)\n\n Returns:\n ... |
1f8f742d3e3fc4dce62559cdcaeb7913a754cd07f79692121ee9f31057902d5f | def __init__(self, num_observation_features: int, parameter_list: list, get_ratio_estimator: Callable[([int, int], nn.Module)], get_observation_embedding: Optional[Callable[([int, int], nn.Module)]]=None, get_parameter_embedding: Optional[Callable[([int, int], nn.Module)]]=None, online_z_score_obs: bool=True, online_z_... | Returns an object suitable for use as a tail in NestedRatios.
For the various get_* callables, we recommend use of the functools.partial function.
Args:
num_observation_features (int): dimensionality of observation
parameter_list (list): list of parameter names
get_ratio_estimator (Callable[[int, int], nn... | swyft/networks/tail.py | __init__ | NLeSC-GO-common-infrastructure/swyft | 0 | python | def __init__(self, num_observation_features: int, parameter_list: list, get_ratio_estimator: Callable[([int, int], nn.Module)], get_observation_embedding: Optional[Callable[([int, int], nn.Module)]]=None, get_parameter_embedding: Optional[Callable[([int, int], nn.Module)]]=None, online_z_score_obs: bool=True, online_z_... | def __init__(self, num_observation_features: int, parameter_list: list, get_ratio_estimator: Callable[([int, int], nn.Module)], get_observation_embedding: Optional[Callable[([int, int], nn.Module)]]=None, get_parameter_embedding: Optional[Callable[([int, int], nn.Module)]]=None, online_z_score_obs: bool=True, online_z_... |
10cc669f782a03411ff6ae3eca368b43693ce9d47db41749acd5d99c6df6a883 | def dragLeaveEvent(self, event):
'ใใฉใใฐใๆใใๆใฎๅฆ็\n '
if (self.drop_node is not None):
self.remove_item(self.drop_node) | ใใฉใใฐใๆใใๆใฎๅฆ็ | Contents/scripts/dice/view.py | dragLeaveEvent | mochio326/DICE | 1 | python | def dragLeaveEvent(self, event):
'\n '
if (self.drop_node is not None):
self.remove_item(self.drop_node) | def dragLeaveEvent(self, event):
'\n '
if (self.drop_node is not None):
self.remove_item(self.drop_node)<|docstring|>ใใฉใใฐใๆใใๆใฎๅฆ็<|endoftext|> |
ab816d6afe000194d4a6eac459fcff3b75480555300a8ad4e52a8dbdb26ea3ab | def __init__(self, hdf5_group_or_filename, file_mode=None):
"\n :param hdf5_group_or_filename: a group in an open HDF5 file,\n or a string interpreted as a file name\n :type hdf5_group_or_filename: str or ``h5py.Group``\n :param file_mode: ``'r'`` or ``'w'`... | :param hdf5_group_or_filename: a group in an open HDF5 file,
or a string interpreted as a file name
:type hdf5_group_or_filename: str or ``h5py.Group``
:param file_mode: ``'r'`` or ``'w'``, used only with a filename argument
:type file_mode: str | lib/mosaic/hdf5.py | __init__ | mosaic-data-model/mosaic-python | 3 | python | def __init__(self, hdf5_group_or_filename, file_mode=None):
"\n :param hdf5_group_or_filename: a group in an open HDF5 file,\n or a string interpreted as a file name\n :type hdf5_group_or_filename: str or ``h5py.Group``\n :param file_mode: ``'r'`` or ``'w'`... | def __init__(self, hdf5_group_or_filename, file_mode=None):
"\n :param hdf5_group_or_filename: a group in an open HDF5 file,\n or a string interpreted as a file name\n :type hdf5_group_or_filename: str or ``h5py.Group``\n :param file_mode: ``'r'`` or ``'w'`... |
cb21b684be9cfd0e266506073709409b9cc7d2bc310a4bee70f899f346f28302 | def store(self, path, data):
'\n :param path: a HDF5 path, relative to the group used by the HDF5Store\n :type path: str\n :param data: a Mosaic data item\n :type data: :class:`mosaic.api.MosaicDataItem`\n '
api.validate_type(path, str, 'path')
if (path[0] == '/'):
... | :param path: a HDF5 path, relative to the group used by the HDF5Store
:type path: str
:param data: a Mosaic data item
:type data: :class:`mosaic.api.MosaicDataItem` | lib/mosaic/hdf5.py | store | mosaic-data-model/mosaic-python | 3 | python | def store(self, path, data):
'\n :param path: a HDF5 path, relative to the group used by the HDF5Store\n :type path: str\n :param data: a Mosaic data item\n :type data: :class:`mosaic.api.MosaicDataItem`\n '
api.validate_type(path, str, 'path')
if (path[0] == '/'):
... | def store(self, path, data):
'\n :param path: a HDF5 path, relative to the group used by the HDF5Store\n :type path: str\n :param data: a Mosaic data item\n :type data: :class:`mosaic.api.MosaicDataItem`\n '
api.validate_type(path, str, 'path')
if (path[0] == '/'):
... |
7ac0d1f72355a607d74d533c2fc0678e20e0d0879f54761508a974ba17ab54a3 | def retrieve(self, path_or_node):
'\n :param path_or_node: a HDF5 path, relative to the group used by\n the HDF5Store, or an HDF5 node\n :type path_or_node: str or h5py.Node\n :returns: a Mosaic data item\n :rtype: :class:`mosaic.api.MosaicDataItem`\n ... | :param path_or_node: a HDF5 path, relative to the group used by
the HDF5Store, or an HDF5 node
:type path_or_node: str or h5py.Node
:returns: a Mosaic data item
:rtype: :class:`mosaic.api.MosaicDataItem` | lib/mosaic/hdf5.py | retrieve | mosaic-data-model/mosaic-python | 3 | python | def retrieve(self, path_or_node):
'\n :param path_or_node: a HDF5 path, relative to the group used by\n the HDF5Store, or an HDF5 node\n :type path_or_node: str or h5py.Node\n :returns: a Mosaic data item\n :rtype: :class:`mosaic.api.MosaicDataItem`\n ... | def retrieve(self, path_or_node):
'\n :param path_or_node: a HDF5 path, relative to the group used by\n the HDF5Store, or an HDF5 node\n :type path_or_node: str or h5py.Node\n :returns: a Mosaic data item\n :rtype: :class:`mosaic.api.MosaicDataItem`\n ... |
2195b441a1e925818d9a9a124e0629b9b597208c90c36b5bace9c5d4604be947 | def generate_request_id(self):
'Generate uniq request id\n '
if (self.request_id is None):
self.request_id = str(uuid.uuid4())
return self.request_id | Generate uniq request id | paypalrestsdk/resource.py | generate_request_id | selectom/PayPal-Python-SDK | 653 | python | def generate_request_id(self):
'\n '
if (self.request_id is None):
self.request_id = str(uuid.uuid4())
return self.request_id | def generate_request_id(self):
'\n '
if (self.request_id is None):
self.request_id = str(uuid.uuid4())
return self.request_id<|docstring|>Generate uniq request id<|endoftext|> |
f19033b4a84f45bea0390f62f1c1ebc01fa3dfa3675c9e758aa205f708c8e09c | def http_headers(self):
'Generate HTTP header\n '
return util.merge_dict(self.header, self.headers, {'PayPal-Request-Id': self.generate_request_id()}) | Generate HTTP header | paypalrestsdk/resource.py | http_headers | selectom/PayPal-Python-SDK | 653 | python | def http_headers(self):
'\n '
return util.merge_dict(self.header, self.headers, {'PayPal-Request-Id': self.generate_request_id()}) | def http_headers(self):
'\n '
return util.merge_dict(self.header, self.headers, {'PayPal-Request-Id': self.generate_request_id()})<|docstring|>Generate HTTP header<|endoftext|> |
5130cf3e14cc6597d153576c626792d274425fd6031c9a9bcaf6b50f44fcff18 | def merge(self, new_attributes):
'Merge new attributes e.g. response from a post to Resource\n '
for (k, v) in new_attributes.items():
setattr(self, k, v) | Merge new attributes e.g. response from a post to Resource | paypalrestsdk/resource.py | merge | selectom/PayPal-Python-SDK | 653 | python | def merge(self, new_attributes):
'\n '
for (k, v) in new_attributes.items():
setattr(self, k, v) | def merge(self, new_attributes):
'\n '
for (k, v) in new_attributes.items():
setattr(self, k, v)<|docstring|>Merge new attributes e.g. response from a post to Resource<|endoftext|> |
2d1a39610eff2517cd3f5ffc7564b750dafcf0b9c093736a716914532783e083 | def convert(self, name, value):
'Convert the attribute values to configured class\n '
if isinstance(value, dict):
cls = self.convert_resources.get(name, Resource)
return cls(value, api=self.api)
elif isinstance(value, list):
new_list = []
for obj in value:
... | Convert the attribute values to configured class | paypalrestsdk/resource.py | convert | selectom/PayPal-Python-SDK | 653 | python | def convert(self, name, value):
'\n '
if isinstance(value, dict):
cls = self.convert_resources.get(name, Resource)
return cls(value, api=self.api)
elif isinstance(value, list):
new_list = []
for obj in value:
new_list.append(self.convert(name, obj))
... | def convert(self, name, value):
'\n '
if isinstance(value, dict):
cls = self.convert_resources.get(name, Resource)
return cls(value, api=self.api)
elif isinstance(value, list):
new_list = []
for obj in value:
new_list.append(self.convert(name, obj))
... |
2d0bd6817b67375748cdf7782eef8186dfa7fffd0a49e749f1b173e41a8fd5b9 | @classmethod
def find(cls, resource_id, api=None, refresh_token=None):
'Locate resource e.g. payment with given id\n\n Usage::\n >>> payment = Payment.find("PAY-1234")\n '
api = (api or default_api())
url = util.join_url(cls.path, str(resource_id))
return cls(api.get(url, refres... | Locate resource e.g. payment with given id
Usage::
>>> payment = Payment.find("PAY-1234") | paypalrestsdk/resource.py | find | selectom/PayPal-Python-SDK | 653 | python | @classmethod
def find(cls, resource_id, api=None, refresh_token=None):
'Locate resource e.g. payment with given id\n\n Usage::\n >>> payment = Payment.find("PAY-1234")\n '
api = (api or default_api())
url = util.join_url(cls.path, str(resource_id))
return cls(api.get(url, refres... | @classmethod
def find(cls, resource_id, api=None, refresh_token=None):
'Locate resource e.g. payment with given id\n\n Usage::\n >>> payment = Payment.find("PAY-1234")\n '
api = (api or default_api())
url = util.join_url(cls.path, str(resource_id))
return cls(api.get(url, refres... |
bd74e890792fa624675f56fafa55532c7242438cb286b9a5a2e529713e80fe93 | @classmethod
def all(cls, params=None, api=None):
"Get list of payments as on\n https://developer.paypal.com/docs/api/#list-payment-resources\n\n Usage::\n\n >>> payment_history = Payment.all({'count': 2})\n "
api = (api or default_api())
if (params is None):
url = cl... | Get list of payments as on
https://developer.paypal.com/docs/api/#list-payment-resources
Usage::
>>> payment_history = Payment.all({'count': 2}) | paypalrestsdk/resource.py | all | selectom/PayPal-Python-SDK | 653 | python | @classmethod
def all(cls, params=None, api=None):
"Get list of payments as on\n https://developer.paypal.com/docs/api/#list-payment-resources\n\n Usage::\n\n >>> payment_history = Payment.all({'count': 2})\n "
api = (api or default_api())
if (params is None):
url = cl... | @classmethod
def all(cls, params=None, api=None):
"Get list of payments as on\n https://developer.paypal.com/docs/api/#list-payment-resources\n\n Usage::\n\n >>> payment_history = Payment.all({'count': 2})\n "
api = (api or default_api())
if (params is None):
url = cl... |
8aa877847cdadf883f198649106ad67299714c626bb019b5a580703d687c1c34 | def create(self, refresh_token=None, correlation_id=None):
'Creates a resource e.g. payment\n\n Usage::\n\n >>> payment = Payment({})\n >>> payment.create() # return True or False\n '
headers = {}
if (correlation_id is not None):
headers = util.merge_dict(self.htt... | Creates a resource e.g. payment
Usage::
>>> payment = Payment({})
>>> payment.create() # return True or False | paypalrestsdk/resource.py | create | selectom/PayPal-Python-SDK | 653 | python | def create(self, refresh_token=None, correlation_id=None):
'Creates a resource e.g. payment\n\n Usage::\n\n >>> payment = Payment({})\n >>> payment.create() # return True or False\n '
headers = {}
if (correlation_id is not None):
headers = util.merge_dict(self.htt... | def create(self, refresh_token=None, correlation_id=None):
'Creates a resource e.g. payment\n\n Usage::\n\n >>> payment = Payment({})\n >>> payment.create() # return True or False\n '
headers = {}
if (correlation_id is not None):
headers = util.merge_dict(self.htt... |
b858757afaa9b61f05792b96c90891e51186507820d71298ac88cd7e9cb8ebda | def delete(self):
'Deletes a resource e.g. credit_card\n\n Usage::\n\n >>> credit_card.delete()\n '
url = util.join_url(self.path, str(self['id']))
new_attributes = self.api.delete(url)
self.error = None
self.merge(new_attributes)
return self.success() | Deletes a resource e.g. credit_card
Usage::
>>> credit_card.delete() | paypalrestsdk/resource.py | delete | selectom/PayPal-Python-SDK | 653 | python | def delete(self):
'Deletes a resource e.g. credit_card\n\n Usage::\n\n >>> credit_card.delete()\n '
url = util.join_url(self.path, str(self['id']))
new_attributes = self.api.delete(url)
self.error = None
self.merge(new_attributes)
return self.success() | def delete(self):
'Deletes a resource e.g. credit_card\n\n Usage::\n\n >>> credit_card.delete()\n '
url = util.join_url(self.path, str(self['id']))
new_attributes = self.api.delete(url)
self.error = None
self.merge(new_attributes)
return self.success()<|docstring|>Delete... |
02187bb06e930b7185c3614eced5265929e8dbf763ad6545e42520e7a2d15916 | def post(self, name, attributes=None, cls=Resource, fieldname='id', refresh_token=None):
'Constructs url with passed in headers and makes post request via\n post method in api class.\n\n Usage::\n\n >>> payment.post("execute", {\'payer_id\': \'1234\'}, payment) # return True or False\n ... | Constructs url with passed in headers and makes post request via
post method in api class.
Usage::
>>> payment.post("execute", {'payer_id': '1234'}, payment) # return True or False
>>> sale.post("refund", {'payer_id': '1234'}) # return Refund object | paypalrestsdk/resource.py | post | selectom/PayPal-Python-SDK | 653 | python | def post(self, name, attributes=None, cls=Resource, fieldname='id', refresh_token=None):
'Constructs url with passed in headers and makes post request via\n post method in api class.\n\n Usage::\n\n >>> payment.post("execute", {\'payer_id\': \'1234\'}, payment) # return True or False\n ... | def post(self, name, attributes=None, cls=Resource, fieldname='id', refresh_token=None):
'Constructs url with passed in headers and makes post request via\n post method in api class.\n\n Usage::\n\n >>> payment.post("execute", {\'payer_id\': \'1234\'}, payment) # return True or False\n ... |
ae3f978e774da98ed800a4d672f4be3e4ac723d4719e25b2e06d134bf7452d4d | def get(self, resource_group_name, account_name, share_name, synchronization_setting_name, custom_headers=None, raw=False, **operation_config):
'Get synchronizationSetting in a share.\n\n Get a synchronizationSetting in a share.\n\n :param resource_group_name: The resource group name.\n :type r... | Get synchronizationSetting in a share.
Get a synchronizationSetting in a share.
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param account_name: The name of the share account.
:type account_name: str
:param share_name: The name of the share.
:type share_name: str
:param synchro... | sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py | get | huamichaelchen/azure-sdk-for-python | 8 | python | def get(self, resource_group_name, account_name, share_name, synchronization_setting_name, custom_headers=None, raw=False, **operation_config):
'Get synchronizationSetting in a share.\n\n Get a synchronizationSetting in a share.\n\n :param resource_group_name: The resource group name.\n :type r... | def get(self, resource_group_name, account_name, share_name, synchronization_setting_name, custom_headers=None, raw=False, **operation_config):
'Get synchronizationSetting in a share.\n\n Get a synchronizationSetting in a share.\n\n :param resource_group_name: The resource group name.\n :type r... |
20d3e6807e4a581d453246be55ba09470fb7186c68b8a5042078dd9630c17577 | def create(self, resource_group_name, account_name, share_name, synchronization_setting_name, synchronization_setting, custom_headers=None, raw=False, **operation_config):
'Adds a new synchronization setting to an existing share.\n\n Create or update a synchronizationSetting .\n\n :param resource_grou... | Adds a new synchronization setting to an existing share.
Create or update a synchronizationSetting .
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param account_name: The name of the share account.
:type account_name: str
:param share_name: The name of the share to add the synch... | sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py | create | huamichaelchen/azure-sdk-for-python | 8 | python | def create(self, resource_group_name, account_name, share_name, synchronization_setting_name, synchronization_setting, custom_headers=None, raw=False, **operation_config):
'Adds a new synchronization setting to an existing share.\n\n Create or update a synchronizationSetting .\n\n :param resource_grou... | def create(self, resource_group_name, account_name, share_name, synchronization_setting_name, synchronization_setting, custom_headers=None, raw=False, **operation_config):
'Adds a new synchronization setting to an existing share.\n\n Create or update a synchronizationSetting .\n\n :param resource_grou... |
9996d15b4f3ff2a06ce33fa58b93558ac1bc34b6103d49bc89e3af0905d0fe39 | def delete(self, resource_group_name, account_name, share_name, synchronization_setting_name, custom_headers=None, raw=False, polling=True, **operation_config):
'Delete synchronizationSetting in a share.\n\n Delete a synchronizationSetting in a share.\n\n :param resource_group_name: The resource group... | Delete synchronizationSetting in a share.
Delete a synchronizationSetting in a share.
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param account_name: The name of the share account.
:type account_name: str
:param share_name: The name of the share.
:type share_name: str
:param s... | sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py | delete | huamichaelchen/azure-sdk-for-python | 8 | python | def delete(self, resource_group_name, account_name, share_name, synchronization_setting_name, custom_headers=None, raw=False, polling=True, **operation_config):
'Delete synchronizationSetting in a share.\n\n Delete a synchronizationSetting in a share.\n\n :param resource_group_name: The resource group... | def delete(self, resource_group_name, account_name, share_name, synchronization_setting_name, custom_headers=None, raw=False, polling=True, **operation_config):
'Delete synchronizationSetting in a share.\n\n Delete a synchronizationSetting in a share.\n\n :param resource_group_name: The resource group... |
b19201e99c5a384366fa5416385882859d57bc5fd4e0dbd99a99fe45c3efb971 | def list_by_share(self, resource_group_name, account_name, share_name, skip_token=None, custom_headers=None, raw=False, **operation_config):
'List synchronizationSettings in a share.\n\n List synchronizationSettings in a share.\n\n :param resource_group_name: The resource group name.\n :type re... | List synchronizationSettings in a share.
List synchronizationSettings in a share.
:param resource_group_name: The resource group name.
:type resource_group_name: str
:param account_name: The name of the share account.
:type account_name: str
:param share_name: The name of the share.
:type share_name: str
:param skip_... | sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_synchronization_settings_operations.py | list_by_share | huamichaelchen/azure-sdk-for-python | 8 | python | def list_by_share(self, resource_group_name, account_name, share_name, skip_token=None, custom_headers=None, raw=False, **operation_config):
'List synchronizationSettings in a share.\n\n List synchronizationSettings in a share.\n\n :param resource_group_name: The resource group name.\n :type re... | def list_by_share(self, resource_group_name, account_name, share_name, skip_token=None, custom_headers=None, raw=False, **operation_config):
'List synchronizationSettings in a share.\n\n List synchronizationSettings in a share.\n\n :param resource_group_name: The resource group name.\n :type re... |
4d1877e90fb17dd6c9d7bb4ff5610acccbdbce8d9c7291c6e910e0706bb7147c | def test_multicompartment_reactions_aligment(neuron_instance):
'A test for multicompartment reactions where one regions has more\n sections than the other.\n '
(h, rxd, data, save_path) = neuron_instance
dend = h.Section(name='dend')
dend.nseg = 101
dend.pt3dclear()
dend.pt3dadd((- 10), 0,... | A test for multicompartment reactions where one regions has more
sections than the other. | test/rxd/test_multicompartment_reactions_aligment.py | test_multicompartment_reactions_aligment | ishandutta2007/nrn | 203 | python | def test_multicompartment_reactions_aligment(neuron_instance):
'A test for multicompartment reactions where one regions has more\n sections than the other.\n '
(h, rxd, data, save_path) = neuron_instance
dend = h.Section(name='dend')
dend.nseg = 101
dend.pt3dclear()
dend.pt3dadd((- 10), 0,... | def test_multicompartment_reactions_aligment(neuron_instance):
'A test for multicompartment reactions where one regions has more\n sections than the other.\n '
(h, rxd, data, save_path) = neuron_instance
dend = h.Section(name='dend')
dend.nseg = 101
dend.pt3dclear()
dend.pt3dadd((- 10), 0,... |
c0c66af93359f2402d3bd4c81916cfa689b8c4e487323f3a1341dbe2702d7e6f | def plusOne(self, digits):
'\n :type digits: List[int]\n :rtype: List[int]\n '
number = (int(''.join((str(x) for x in digits))) + 1)
res = [int(x) for x in str(number)]
return res | :type digits: List[int]
:rtype: List[int] | string/plusone.py | plusOne | mengyangbai/leetcode | 0 | python | def plusOne(self, digits):
'\n :type digits: List[int]\n :rtype: List[int]\n '
number = (int(.join((str(x) for x in digits))) + 1)
res = [int(x) for x in str(number)]
return res | def plusOne(self, digits):
'\n :type digits: List[int]\n :rtype: List[int]\n '
number = (int(.join((str(x) for x in digits))) + 1)
res = [int(x) for x in str(number)]
return res<|docstring|>:type digits: List[int]
:rtype: List[int]<|endoftext|> |
a099cf3f58bd1e87b1907e27b66c53c8d11e6b316a0489cfb4c79d1b70478388 | def add_details(error, details, condensed):
'Adds a details entry to an error'
found = False
for errors in condensed:
if (errors['err'] == error):
errors['dtls'].append(details)
found = True
break
if (not found):
group = {}
group['err'] = error... | Adds a details entry to an error | condense_policy.py | add_details | openbmc/ibm-logging | 4 | python | def add_details(error, details, condensed):
found = False
for errors in condensed:
if (errors['err'] == error):
errors['dtls'].append(details)
found = True
break
if (not found):
group = {}
group['err'] = error
group['dtls'] = []
... | def add_details(error, details, condensed):
found = False
for errors in condensed:
if (errors['err'] == error):
errors['dtls'].append(details)
found = True
break
if (not found):
group = {}
group['err'] = error
group['dtls'] = []
... |
a5693a44fd0bd3759a7dc9902c92e14b0f3375adb5a5c24ed7ca67859614017b | def setup(bot):
'\n Set up the bot.\n\n Args:\n bot (Bot): discord.py provided object that is used to assist with various discord interfacing\n '
bot.add_cog(Typing(bot)) | Set up the bot.
Args:
bot (Bot): discord.py provided object that is used to assist with various discord interfacing | typing.py | setup | scubot/scubot-typing | 0 | python | def setup(bot):
'\n Set up the bot.\n\n Args:\n bot (Bot): discord.py provided object that is used to assist with various discord interfacing\n '
bot.add_cog(Typing(bot)) | def setup(bot):
'\n Set up the bot.\n\n Args:\n bot (Bot): discord.py provided object that is used to assist with various discord interfacing\n '
bot.add_cog(Typing(bot))<|docstring|>Set up the bot.
Args:
bot (Bot): discord.py provided object that is used to assist with various discord inte... |
c3f8900817ec6e4a639d4f6c29887b2b7a4c2a8b21f9c1e38ea85846df35dacb | def __init__(self, bot):
'\n Initialise the Typing module\n\n Set all of the various properties of the module and its required operating variables, open the database, start\n the background loop, and initialise the database if needed.\n\n Args:\n bot (Bot): discord.py provided... | Initialise the Typing module
Set all of the various properties of the module and its required operating variables, open the database, start
the background loop, and initialise the database if needed.
Args:
bot (Bot): discord.py provided object that is used to assist with various discord interfacing | typing.py | __init__ | scubot/scubot-typing | 0 | python | def __init__(self, bot):
'\n Initialise the Typing module\n\n Set all of the various properties of the module and its required operating variables, open the database, start\n the background loop, and initialise the database if needed.\n\n Args:\n bot (Bot): discord.py provided... | def __init__(self, bot):
'\n Initialise the Typing module\n\n Set all of the various properties of the module and its required operating variables, open the database, start\n the background loop, and initialise the database if needed.\n\n Args:\n bot (Bot): discord.py provided... |
f7ccfce0ce9e1ea6126be4afd4a41b6a322a9e9c2d9485d0e6922a101c2afb11 | @tasks.loop(seconds=5.0)
async def background_loop(self):
'\n Background loop for triggering typing\n\n When typing is triggered by discord.py it only lasts for ~8 seconds, therefore a loop is necessary to keep it\n going over an extended period, the loop runs constantly over a 5 second interva... | Background loop for triggering typing
When typing is triggered by discord.py it only lasts for ~8 seconds, therefore a loop is necessary to keep it
going over an extended period, the loop runs constantly over a 5 second interval to ensure that the typing
appears continuous. The loop runs constantly but only triggers t... | typing.py | background_loop | scubot/scubot-typing | 0 | python | @tasks.loop(seconds=5.0)
async def background_loop(self):
'\n Background loop for triggering typing\n\n When typing is triggered by discord.py it only lasts for ~8 seconds, therefore a loop is necessary to keep it\n going over an extended period, the loop runs constantly over a 5 second interva... | @tasks.loop(seconds=5.0)
async def background_loop(self):
'\n Background loop for triggering typing\n\n When typing is triggered by discord.py it only lasts for ~8 seconds, therefore a loop is necessary to keep it\n going over an extended period, the loop runs constantly over a 5 second interva... |
b2908ce73730fb9b4d1263f518c49bd88e586364683ba9b7ece7b713dd2a14ed | @background_loop.before_loop
async def before_loop(self):
'\n Wait until the bot is ready before starting the loop.\n '
(await self.bot.wait_until_ready()) | Wait until the bot is ready before starting the loop. | typing.py | before_loop | scubot/scubot-typing | 0 | python | @background_loop.before_loop
async def before_loop(self):
'\n \n '
(await self.bot.wait_until_ready()) | @background_loop.before_loop
async def before_loop(self):
'\n \n '
(await self.bot.wait_until_ready())<|docstring|>Wait until the bot is ready before starting the loop.<|endoftext|> |
6ef33945829271163cd4197c5f7db387a1ef683804fe99d901d77c3e6c93c541 | def cog_unload(self):
'\n Stop the loop when the module is unloaded.\n '
self.background_loop.cancel() | Stop the loop when the module is unloaded. | typing.py | cog_unload | scubot/scubot-typing | 0 | python | def cog_unload(self):
'\n \n '
self.background_loop.cancel() | def cog_unload(self):
'\n \n '
self.background_loop.cancel()<|docstring|>Stop the loop when the module is unloaded.<|endoftext|> |
32efb709f816c11e131408a21b506b2c7118118f71bde5243adc52062dea9926 | @commands.has_any_role('Moderators', 'Admin', 'devs')
@commands.group(invoke_without_command=True)
async def typing(self, ctx):
'\n Function called by discord.py when the user invokes the typing command, which toggles typing.\n\n This function sets the channel object used by the background loop as wel... | Function called by discord.py when the user invokes the typing command, which toggles typing.
This function sets the channel object used by the background loop as well as sets the typing boolean in the
database.
Args:
ctx (Context): Object provided by discord.py to allow for the context of the command to be inter... | typing.py | typing | scubot/scubot-typing | 0 | python | @commands.has_any_role('Moderators', 'Admin', 'devs')
@commands.group(invoke_without_command=True)
async def typing(self, ctx):
'\n Function called by discord.py when the user invokes the typing command, which toggles typing.\n\n This function sets the channel object used by the background loop as wel... | @commands.has_any_role('Moderators', 'Admin', 'devs')
@commands.group(invoke_without_command=True)
async def typing(self, ctx):
'\n Function called by discord.py when the user invokes the typing command, which toggles typing.\n\n This function sets the channel object used by the background loop as wel... |
863220ce053b642c4630b613c216dd8a5722ec65b6772d238936e0f3049118a0 | @commands.has_any_role('Moderators', 'Admin', 'devs')
@typing.command(name='channel')
async def set_channel(self, ctx, *, channel: discord.TextChannel):
'\n Function called by discord.py allowing the user to set a channel ID for the typing to occur in.\n\n This function validates (so far as int conver... | Function called by discord.py allowing the user to set a channel ID for the typing to occur in.
This function validates (so far as int conversion) an ID and writes it to the database.
Args:
ctx (Context): Object provided by discord.py to allow for the context of the command to be interpreted.
channel (discord... | typing.py | set_channel | scubot/scubot-typing | 0 | python | @commands.has_any_role('Moderators', 'Admin', 'devs')
@typing.command(name='channel')
async def set_channel(self, ctx, *, channel: discord.TextChannel):
'\n Function called by discord.py allowing the user to set a channel ID for the typing to occur in.\n\n This function validates (so far as int conver... | @commands.has_any_role('Moderators', 'Admin', 'devs')
@typing.command(name='channel')
async def set_channel(self, ctx, *, channel: discord.TextChannel):
'\n Function called by discord.py allowing the user to set a channel ID for the typing to occur in.\n\n This function validates (so far as int conver... |
abe8bc6d491e808752e8e0dc64463b348bd3c2777daf35c841677dbfc0449ac3 | def prepare_roidb(imdb):
"Enrich the imdb's roidb by adding some derived quantities that\n are useful for training. This function precomputes the maximum\n overlap, taken over ground-truth boxes, between each ROI and\n each ground-truth box. The class with maximum overlap is also\n recorded.\n "
roidb = im... | Enrich the imdb's roidb by adding some derived quantities that
are useful for training. This function precomputes the maximum
overlap, taken over ground-truth boxes, between each ROI and
each ground-truth box. The class with maximum overlap is also
recorded. | lib/roi_data_layer/roidb.py | prepare_roidb | sumiya-NJU/da-faster-rcnn-PyTorch | 122 | python | def prepare_roidb(imdb):
"Enrich the imdb's roidb by adding some derived quantities that\n are useful for training. This function precomputes the maximum\n overlap, taken over ground-truth boxes, between each ROI and\n each ground-truth box. The class with maximum overlap is also\n recorded.\n "
roidb = im... | def prepare_roidb(imdb):
"Enrich the imdb's roidb by adding some derived quantities that\n are useful for training. This function precomputes the maximum\n overlap, taken over ground-truth boxes, between each ROI and\n each ground-truth box. The class with maximum overlap is also\n recorded.\n "
roidb = im... |
151e0005f2a49fcddb1b3c9d5852a30125cd13d713c1c7e0341bcc9dc53a2b46 | def combined_roidb(imdb_names, training=True):
'\n Combine multiple roidbs\n '
def get_training_roidb(imdb):
'Returns a roidb (Region of Interest database) for use in training.'
if cfg.TRAIN.USE_FLIPPED:
print('Appending horizontally-flipped training examples...')
imdb... | Combine multiple roidbs | lib/roi_data_layer/roidb.py | combined_roidb | sumiya-NJU/da-faster-rcnn-PyTorch | 122 | python | def combined_roidb(imdb_names, training=True):
'\n \n '
def get_training_roidb(imdb):
'Returns a roidb (Region of Interest database) for use in training.'
if cfg.TRAIN.USE_FLIPPED:
print('Appending horizontally-flipped training examples...')
imdb.append_flipped_images(... | def combined_roidb(imdb_names, training=True):
'\n \n '
def get_training_roidb(imdb):
'Returns a roidb (Region of Interest database) for use in training.'
if cfg.TRAIN.USE_FLIPPED:
print('Appending horizontally-flipped training examples...')
imdb.append_flipped_images(... |
24ef3bcabd8832b22c249c763c5c13e6de4846d5693a53e617c68e4030e15d04 | def get_training_roidb(imdb):
'Returns a roidb (Region of Interest database) for use in training.'
if cfg.TRAIN.USE_FLIPPED:
print('Appending horizontally-flipped training examples...')
imdb.append_flipped_images()
print('done')
print('Preparing training data...')
prepare_roidb(i... | Returns a roidb (Region of Interest database) for use in training. | lib/roi_data_layer/roidb.py | get_training_roidb | sumiya-NJU/da-faster-rcnn-PyTorch | 122 | python | def get_training_roidb(imdb):
if cfg.TRAIN.USE_FLIPPED:
print('Appending horizontally-flipped training examples...')
imdb.append_flipped_images()
print('done')
print('Preparing training data...')
prepare_roidb(imdb)
print('done')
return imdb.roidb | def get_training_roidb(imdb):
if cfg.TRAIN.USE_FLIPPED:
print('Appending horizontally-flipped training examples...')
imdb.append_flipped_images()
print('done')
print('Preparing training data...')
prepare_roidb(imdb)
print('done')
return imdb.roidb<|docstring|>Returns a r... |
8f6f381cc8e451fc9ec739c3769a6b4ad6b4dfebea6e2a6df0c1076f9b23a9ff | def __init__(self, schema):
'\n @param schema: A schema object.\n @type schema: L{xsd.schema.Schema}\n '
self.resolver = NodeResolver(schema) | @param schema: A schema object.
@type schema: L{xsd.schema.Schema} | suds/umx/typed.py | __init__ | ChristianTreo/interactive-tutorials | 2,750 | python | def __init__(self, schema):
'\n @param schema: A schema object.\n @type schema: L{xsd.schema.Schema}\n '
self.resolver = NodeResolver(schema) | def __init__(self, schema):
'\n @param schema: A schema object.\n @type schema: L{xsd.schema.Schema}\n '
self.resolver = NodeResolver(schema)<|docstring|>@param schema: A schema object.
@type schema: L{xsd.schema.Schema}<|endoftext|> |
9a1bd705819b600345aed864f5f357fc957eb37627f3ef630b6a83c11042cf9e | def process(self, node, type):
'\n Process an object graph representation of the xml L{node}.\n @param node: An XML tree.\n @type node: L{sax.element.Element}\n @param type: The I{optional} schema type.\n @type type: L{xsd.sxbase.SchemaObject}\n @return: A suds object.\n ... | Process an object graph representation of the xml L{node}.
@param node: An XML tree.
@type node: L{sax.element.Element}
@param type: The I{optional} schema type.
@type type: L{xsd.sxbase.SchemaObject}
@return: A suds object.
@rtype: L{Object} | suds/umx/typed.py | process | ChristianTreo/interactive-tutorials | 2,750 | python | def process(self, node, type):
'\n Process an object graph representation of the xml L{node}.\n @param node: An XML tree.\n @type node: L{sax.element.Element}\n @param type: The I{optional} schema type.\n @type type: L{xsd.sxbase.SchemaObject}\n @return: A suds object.\n ... | def process(self, node, type):
'\n Process an object graph representation of the xml L{node}.\n @param node: An XML tree.\n @type node: L{sax.element.Element}\n @param type: The I{optional} schema type.\n @type type: L{xsd.sxbase.SchemaObject}\n @return: A suds object.\n ... |
2378d394b47edebc600ff23ce38cf8f849a804a669ec5623d0a9f4b4e8f1ecf2 | def append_attribute(self, name, value, content):
"\n Append an attribute name/value into L{Content.data}.\n @param name: The attribute name\n @type name: basestring\n @param value: The attribute's value\n @type value: basestring\n @param content: The current content being ... | Append an attribute name/value into L{Content.data}.
@param name: The attribute name
@type name: basestring
@param value: The attribute's value
@type value: basestring
@param content: The current content being unmarshalled.
@type content: L{Content} | suds/umx/typed.py | append_attribute | ChristianTreo/interactive-tutorials | 2,750 | python | def append_attribute(self, name, value, content):
"\n Append an attribute name/value into L{Content.data}.\n @param name: The attribute name\n @type name: basestring\n @param value: The attribute's value\n @type value: basestring\n @param content: The current content being ... | def append_attribute(self, name, value, content):
"\n Append an attribute name/value into L{Content.data}.\n @param name: The attribute name\n @type name: basestring\n @param value: The attribute's value\n @type value: basestring\n @param content: The current content being ... |
d3d6d9a7c8eb4589a14e1a84c0432512f3b0800f220b554d4cc3c77eb64df2d5 | def append_text(self, content):
'\n Append text nodes into L{Content.data}\n Here is where the I{true} type is used to translate the value\n into the proper python type.\n @param content: The current content being unmarshalled.\n @type content: L{Content}\n '
Core.appen... | Append text nodes into L{Content.data}
Here is where the I{true} type is used to translate the value
into the proper python type.
@param content: The current content being unmarshalled.
@type content: L{Content} | suds/umx/typed.py | append_text | ChristianTreo/interactive-tutorials | 2,750 | python | def append_text(self, content):
'\n Append text nodes into L{Content.data}\n Here is where the I{true} type is used to translate the value\n into the proper python type.\n @param content: The current content being unmarshalled.\n @type content: L{Content}\n '
Core.appen... | def append_text(self, content):
'\n Append text nodes into L{Content.data}\n Here is where the I{true} type is used to translate the value\n into the proper python type.\n @param content: The current content being unmarshalled.\n @type content: L{Content}\n '
Core.appen... |
fa9a06ff36af72baa85f6eecf99645653585df4d3d9665559014fd9222fbbb7e | def translated(self, value, type):
' translate using the schema type '
if (value is not None):
resolved = type.resolve()
return resolved.translate(value)
else:
return value | translate using the schema type | suds/umx/typed.py | translated | ChristianTreo/interactive-tutorials | 2,750 | python | def translated(self, value, type):
' '
if (value is not None):
resolved = type.resolve()
return resolved.translate(value)
else:
return value | def translated(self, value, type):
' '
if (value is not None):
resolved = type.resolve()
return resolved.translate(value)
else:
return value<|docstring|>translate using the schema type<|endoftext|> |
7665666e669904cc0d4079a30160a89af49ca833e1c337a63d5e1004ddb98abf | def _get_image(self):
'Query for images and return set by class var'
images = self.driver.list_images()
for image in images:
if (image.id == self.__class__.IMAGE_NAME):
return image
self.fail(('No %r image found in list of images available: %r' % (self.__class__.IMAGE_NAME, images))) | Query for images and return set by class var | functional/cloudclient/azure/test_azure_client.py | _get_image | cedadev/cloudhands-ops | 0 | python | def _get_image(self):
images = self.driver.list_images()
for image in images:
if (image.id == self.__class__.IMAGE_NAME):
return image
self.fail(('No %r image found in list of images available: %r' % (self.__class__.IMAGE_NAME, images))) | def _get_image(self):
images = self.driver.list_images()
for image in images:
if (image.id == self.__class__.IMAGE_NAME):
return image
self.fail(('No %r image found in list of images available: %r' % (self.__class__.IMAGE_NAME, images)))<|docstring|>Query for images and return set b... |
bf7da4cfba75ed4fb5d89b9fcfbb788201a123f75dd86015e9ae9d48716cd585 | def _bulk_insert(self, table, data):
"Note that this method is implemented in a way recommended in\n sqlalchemy's official documentation.\n (source: https://docs.sqlalchemy.org/en/13/faq/performance.html#i-m-inserting-400-000-rows-with-the-orm-and-it-s-really-slow).\n "
self.engine.execute(... | Note that this method is implemented in a way recommended in
sqlalchemy's official documentation.
(source: https://docs.sqlalchemy.org/en/13/faq/performance.html#i-m-inserting-400-000-rows-with-the-orm-and-it-s-really-slow). | quesadiya/db/interface.py | _bulk_insert | SiameseLab/quesadiya | 2 | python | def _bulk_insert(self, table, data):
"Note that this method is implemented in a way recommended in\n sqlalchemy's official documentation.\n (source: https://docs.sqlalchemy.org/en/13/faq/performance.html#i-m-inserting-400-000-rows-with-the-orm-and-it-s-really-slow).\n "
self.engine.execute(... | def _bulk_insert(self, table, data):
"Note that this method is implemented in a way recommended in\n sqlalchemy's official documentation.\n (source: https://docs.sqlalchemy.org/en/13/faq/performance.html#i-m-inserting-400-000-rows-with-the-orm-and-it-s-really-slow).\n "
self.engine.execute(... |
82ff024d949b47cc8d22e2d8125f0180ba8a50ce6cc80fdb41487c850913da19 | def on_post(self, req, resp):
'\n Specifikace POST pozadavku:\n {\n "Subject": String,\n "Body": String,\n "Reply-To": String,\n "To": [year_id_1, year_id_2, ...] (resitelum v danych rocnicich),\n "Bcc": [String],\n "Gender": (both|male... | Specifikace POST pozadavku:
{
"Subject": String,
"Body": String,
"Reply-To": String,
"To": [year_id_1, year_id_2, ...] (resitelum v danych rocnicich),
"Bcc": [String],
"Gender": (both|male|female) - pokud neni vyplneno, je automaticky
povazovano za "both",
"KarlikSign": (true|false),... | endpoint/admin/email.py | on_post | fi-ksi/web-backend | 4 | python | def on_post(self, req, resp):
'\n Specifikace POST pozadavku:\n {\n "Subject": String,\n "Body": String,\n "Reply-To": String,\n "To": [year_id_1, year_id_2, ...] (resitelum v danych rocnicich),\n "Bcc": [String],\n "Gender": (both|male... | def on_post(self, req, resp):
'\n Specifikace POST pozadavku:\n {\n "Subject": String,\n "Body": String,\n "Reply-To": String,\n "To": [year_id_1, year_id_2, ...] (resitelum v danych rocnicich),\n "Bcc": [String],\n "Gender": (both|male... |
4939d345a0baeb3662065ca6232212d44ec4bb4be6a3f8256f6b67e9f6f0e06a | def trim_data(indir, outdir, clobber=False):
'\n Trim a $LVMMODEL/data directory into a lightweight version for testing\n\n Args:\n indir : a $LVMMODEL/data directory from svn\n outdir : output data directory location\n\n Optional:\n clobber : if True, remove outdir if it already exist... | Trim a $LVMMODEL/data directory into a lightweight version for testing
Args:
indir : a $LVMMODEL/data directory from svn
outdir : output data directory location
Optional:
clobber : if True, remove outdir if it already exists | py/lvmmodel/trim.py | trim_data | sdss/desimodel | 0 | python | def trim_data(indir, outdir, clobber=False):
'\n Trim a $LVMMODEL/data directory into a lightweight version for testing\n\n Args:\n indir : a $LVMMODEL/data directory from svn\n outdir : output data directory location\n\n Optional:\n clobber : if True, remove outdir if it already exist... | def trim_data(indir, outdir, clobber=False):
'\n Trim a $LVMMODEL/data directory into a lightweight version for testing\n\n Args:\n indir : a $LVMMODEL/data directory from svn\n outdir : output data directory location\n\n Optional:\n clobber : if True, remove outdir if it already exist... |
355bb973892b4317fe62df2909e9465c9ee4db77ac2207bfa75cd66c0f594ce8 | def inout(indir, outdir, filename):
'returns os.path.join(indir, filename) and .join(outdir, filename)'
infile = os.path.join(indir, filename)
outfile = os.path.join(outdir, filename)
return (infile, outfile) | returns os.path.join(indir, filename) and .join(outdir, filename) | py/lvmmodel/trim.py | inout | sdss/desimodel | 0 | python | def inout(indir, outdir, filename):
infile = os.path.join(indir, filename)
outfile = os.path.join(outdir, filename)
return (infile, outfile) | def inout(indir, outdir, filename):
infile = os.path.join(indir, filename)
outfile = os.path.join(outdir, filename)
return (infile, outfile)<|docstring|>returns os.path.join(indir, filename) and .join(outdir, filename)<|endoftext|> |
4fbfd3a612a38e249dddaaef31bdc5d1832fa98fcfc793327416ae52e4fa4934 | def trim_focalplane(indir, outdir):
'copy everything in focalplane'
assert (os.path.basename(indir) == 'focalplane')
shutil.copytree(indir, outdir) | copy everything in focalplane | py/lvmmodel/trim.py | trim_focalplane | sdss/desimodel | 0 | python | def trim_focalplane(indir, outdir):
assert (os.path.basename(indir) == 'focalplane')
shutil.copytree(indir, outdir) | def trim_focalplane(indir, outdir):
assert (os.path.basename(indir) == 'focalplane')
shutil.copytree(indir, outdir)<|docstring|>copy everything in focalplane<|endoftext|> |
8673109e2cfdcf46ad84c730650b1e46c19178f9076858cc45a490d2d7b068d9 | def trim_footprint(indir, outdir):
'Copies subset of desi-tiles.fits and .ecsv but not .par'
assert (os.path.basename(indir) == 'footprint')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
(infile, outfile) = inout(indir, outdir, 'desi-tiles.fits')
with fits.open(infile) as hdulist:
... | Copies subset of desi-tiles.fits and .ecsv but not .par | py/lvmmodel/trim.py | trim_footprint | sdss/desimodel | 0 | python | def trim_footprint(indir, outdir):
assert (os.path.basename(indir) == 'footprint')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
(infile, outfile) = inout(indir, outdir, 'desi-tiles.fits')
with fits.open(infile) as hdulist:
t = Table(hdulist[1].data)
ii = ((((35 < t['RA']... | def trim_footprint(indir, outdir):
assert (os.path.basename(indir) == 'footprint')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
(infile, outfile) = inout(indir, outdir, 'desi-tiles.fits')
with fits.open(infile) as hdulist:
t = Table(hdulist[1].data)
ii = ((((35 < t['RA']... |
49869d6ac5820e4438abe237a12a6278b6a3cfccbfcf52fbb5b3263d83e81d83 | def trim_inputs(indir, outdir):
"Don't copy any inputs"
pass | Don't copy any inputs | py/lvmmodel/trim.py | trim_inputs | sdss/desimodel | 0 | python | def trim_inputs(indir, outdir):
pass | def trim_inputs(indir, outdir):
pass<|docstring|>Don't copy any inputs<|endoftext|> |
35eeee2fba1cac288cb261cf58c837ea53f6cfd7e4f09941e22cccd461bd4a43 | def trim_sky(indir, outdir):
'copy solarspec file as-is'
assert (os.path.basename(indir) == 'sky')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
infile = os.path.join(indir, 'solarspec.txt')
outfile = os.path.join(outdir, 'solarspec.txt')
shutil.copy(infile, outfile) | copy solarspec file as-is | py/lvmmodel/trim.py | trim_sky | sdss/desimodel | 0 | python | def trim_sky(indir, outdir):
assert (os.path.basename(indir) == 'sky')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
infile = os.path.join(indir, 'solarspec.txt')
outfile = os.path.join(outdir, 'solarspec.txt')
shutil.copy(infile, outfile) | def trim_sky(indir, outdir):
assert (os.path.basename(indir) == 'sky')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
infile = os.path.join(indir, 'solarspec.txt')
outfile = os.path.join(outdir, 'solarspec.txt')
shutil.copy(infile, outfile)<|docstring|>copy solarspec file as-is<|e... |
188291b952071057d29a367732c7df4074cf31047aacc271839f1d0cd7f307ef | def trim_specpsf(indir, outdir):
'trim specpsf files to be much smaller'
assert (os.path.basename(indir) == 'specpsf')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
trim_quickpsf(indir, outdir, 'psf-quicksim.fits')
trim_psf(indir, outdir, 'psf-b.fits')
trim_psf(indir, outdir, 'psf... | trim specpsf files to be much smaller | py/lvmmodel/trim.py | trim_specpsf | sdss/desimodel | 0 | python | def trim_specpsf(indir, outdir):
assert (os.path.basename(indir) == 'specpsf')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
trim_quickpsf(indir, outdir, 'psf-quicksim.fits')
trim_psf(indir, outdir, 'psf-b.fits')
trim_psf(indir, outdir, 'psf-r.fits')
trim_psf(indir, outdir, '... | def trim_specpsf(indir, outdir):
assert (os.path.basename(indir) == 'specpsf')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
trim_quickpsf(indir, outdir, 'psf-quicksim.fits')
trim_psf(indir, outdir, 'psf-b.fits')
trim_psf(indir, outdir, 'psf-r.fits')
trim_psf(indir, outdir, '... |
b684f16031a61d58a95f1e907c7d2d6da52e71537c710959b3d109419d8680d3 | def trim_spectra(indir, outdir):
'downsample spectra, and only a few of them'
assert (os.path.basename(indir) == 'spectra')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
for filename in ('spec-ABmag22.0.dat', 'spec-elg-o2flux-8e-17-average-line-ratios.dat', 'spec-lrg-z0.8-zmag20.38.dat', ... | downsample spectra, and only a few of them | py/lvmmodel/trim.py | trim_spectra | sdss/desimodel | 0 | python | def trim_spectra(indir, outdir):
assert (os.path.basename(indir) == 'spectra')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
for filename in ('spec-ABmag22.0.dat', 'spec-elg-o2flux-8e-17-average-line-ratios.dat', 'spec-lrg-z0.8-zmag20.38.dat', 'spec-qso-z1.5-rmag22.81.dat', 'spec-sky.dat... | def trim_spectra(indir, outdir):
assert (os.path.basename(indir) == 'spectra')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
for filename in ('spec-ABmag22.0.dat', 'spec-elg-o2flux-8e-17-average-line-ratios.dat', 'spec-lrg-z0.8-zmag20.38.dat', 'spec-qso-z1.5-rmag22.81.dat', 'spec-sky.dat... |
212f7e13b8280408be1c36be0fb531328e0bc92ff935cec9f2f43776f099ffca | def trim_targets(indir, outdir):
'copy everything in targets/'
assert (os.path.basename(indir) == 'targets')
shutil.copytree(indir, outdir) | copy everything in targets/ | py/lvmmodel/trim.py | trim_targets | sdss/desimodel | 0 | python | def trim_targets(indir, outdir):
assert (os.path.basename(indir) == 'targets')
shutil.copytree(indir, outdir) | def trim_targets(indir, outdir):
assert (os.path.basename(indir) == 'targets')
shutil.copytree(indir, outdir)<|docstring|>copy everything in targets/<|endoftext|> |
742223f64a6394a771c1716b8ea75170238f57d48d568ef0e662a64dd8f89b11 | def trim_throughput(indir, outdir):
'downsample throughput files'
assert (os.path.basename(indir) == 'throughput')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
for targettype in ('elg', 'lrg', 'perfect', 'qso', 'sky', 'star'):
filename = 'fiberloss-{}.dat'.format(targettype)
... | downsample throughput files | py/lvmmodel/trim.py | trim_throughput | sdss/desimodel | 0 | python | def trim_throughput(indir, outdir):
assert (os.path.basename(indir) == 'throughput')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
for targettype in ('elg', 'lrg', 'perfect', 'qso', 'sky', 'star'):
filename = 'fiberloss-{}.dat'.format(targettype)
shutil.copy(os.path.join(... | def trim_throughput(indir, outdir):
assert (os.path.basename(indir) == 'throughput')
if (not os.path.exists(outdir)):
os.makedirs(outdir)
for targettype in ('elg', 'lrg', 'perfect', 'qso', 'sky', 'star'):
filename = 'fiberloss-{}.dat'.format(targettype)
shutil.copy(os.path.join(... |
544baac999eb195b835710c0c0cb11ba3a49b5ad299ea13e147848f0d6e5eff1 | def rebin_image(image, n):
'\n rebin 2D array pix into bins of size n x n\n\n New binsize must be evenly divisible into original pix image\n '
assert ((image.shape[0] % n) == 0)
assert ((image.shape[1] % n) == 0)
s = ((image.shape[0] // n), n, (image.shape[1] // n), n)
return image.reshape(... | rebin 2D array pix into bins of size n x n
New binsize must be evenly divisible into original pix image | py/lvmmodel/trim.py | rebin_image | sdss/desimodel | 0 | python | def rebin_image(image, n):
'\n rebin 2D array pix into bins of size n x n\n\n New binsize must be evenly divisible into original pix image\n '
assert ((image.shape[0] % n) == 0)
assert ((image.shape[1] % n) == 0)
s = ((image.shape[0] // n), n, (image.shape[1] // n), n)
return image.reshape(... | def rebin_image(image, n):
'\n rebin 2D array pix into bins of size n x n\n\n New binsize must be evenly divisible into original pix image\n '
assert ((image.shape[0] % n) == 0)
assert ((image.shape[1] % n) == 0)
s = ((image.shape[0] // n), n, (image.shape[1] // n), n)
return image.reshape(... |
34826905ea0a01380185ea747d6bd5b4569700cdd08f2e5ff0ff885e73e85ac0 | def find_pkgutil_namespaces(directory):
'\n Find the pkgutil-style `namespace packages`_ in an unpacked Python distribution archive.\n\n :param directory:\n\n The pathname of a directory containing an unpacked Python distribution\n archive (a string).\n\n :returns:\n\n A generator of diction... | Find the pkgutil-style `namespace packages`_ in an unpacked Python distribution archive.
:param directory:
The pathname of a directory containing an unpacked Python distribution
archive (a string).
:returns:
A generator of dictionaries similar to those returned by
:func:`find_python_modules()`.
This functi... | py2deb/namespaces.py | find_pkgutil_namespaces | ddboline/py2deb | 309 | python | def find_pkgutil_namespaces(directory):
'\n Find the pkgutil-style `namespace packages`_ in an unpacked Python distribution archive.\n\n :param directory:\n\n The pathname of a directory containing an unpacked Python distribution\n archive (a string).\n\n :returns:\n\n A generator of diction... | def find_pkgutil_namespaces(directory):
'\n Find the pkgutil-style `namespace packages`_ in an unpacked Python distribution archive.\n\n :param directory:\n\n The pathname of a directory containing an unpacked Python distribution\n archive (a string).\n\n :returns:\n\n A generator of diction... |
232703c3bd3803466637b07d3e6d966080cddf495f8ef191b69baf0e4ccd0f78 | def find_pkgutil_ns_hints(tree):
"\n Analyze an AST for hints that we're dealing with a Python module that defines a pkgutil-style namespace package.\n\n :param tree:\n\n The result of :func:`ast.parse()` when run on a Python module (which is\n assumed to be an ``__init__.py`` file).\n\n :returns... | Analyze an AST for hints that we're dealing with a Python module that defines a pkgutil-style namespace package.
:param tree:
The result of :func:`ast.parse()` when run on a Python module (which is
assumed to be an ``__init__.py`` file).
:returns:
A :class:`set` of strings where each string represents a hint ... | py2deb/namespaces.py | find_pkgutil_ns_hints | ddboline/py2deb | 309 | python | def find_pkgutil_ns_hints(tree):
"\n Analyze an AST for hints that we're dealing with a Python module that defines a pkgutil-style namespace package.\n\n :param tree:\n\n The result of :func:`ast.parse()` when run on a Python module (which is\n assumed to be an ``__init__.py`` file).\n\n :returns... | def find_pkgutil_ns_hints(tree):
"\n Analyze an AST for hints that we're dealing with a Python module that defines a pkgutil-style namespace package.\n\n :param tree:\n\n The result of :func:`ast.parse()` when run on a Python module (which is\n assumed to be an ``__init__.py`` file).\n\n :returns... |
c9dbad0f16de056904c804c6ce3037d79cc7222470e7b7feb4611b4b67e8c23c | def find_python_modules(directory):
'\n Find the Python modules in an unpacked Python distribution archive.\n\n :param directory:\n\n The pathname of a directory containing an unpacked Python distribution\n archive (a string).\n\n :returns: A list of dictionaries with the following key/value pair... | Find the Python modules in an unpacked Python distribution archive.
:param directory:
The pathname of a directory containing an unpacked Python distribution
archive (a string).
:returns: A list of dictionaries with the following key/value pairs:
- ``abspath`` gives the absolute pathname of a Python mo... | py2deb/namespaces.py | find_python_modules | ddboline/py2deb | 309 | python | def find_python_modules(directory):
'\n Find the Python modules in an unpacked Python distribution archive.\n\n :param directory:\n\n The pathname of a directory containing an unpacked Python distribution\n archive (a string).\n\n :returns: A list of dictionaries with the following key/value pair... | def find_python_modules(directory):
'\n Find the Python modules in an unpacked Python distribution archive.\n\n :param directory:\n\n The pathname of a directory containing an unpacked Python distribution\n archive (a string).\n\n :returns: A list of dictionaries with the following key/value pair... |
ff0825f456c14776e67d7361772be9cae9ca738abac5acd6f16c6d221a520279 | def GetOutput(self, port=0):
'A conveience method to get the output data object of this ``PVGeo``\n algorithm.\n '
return self.GetOutputDataObject(port) | A conveience method to get the output data object of this ``PVGeo``
algorithm. | PVGeo/base.py | GetOutput | jkulesza/PVGeo | 1 | python | def GetOutput(self, port=0):
'A conveience method to get the output data object of this ``PVGeo``\n algorithm.\n '
return self.GetOutputDataObject(port) | def GetOutput(self, port=0):
'A conveience method to get the output data object of this ``PVGeo``\n algorithm.\n '
return self.GetOutputDataObject(port)<|docstring|>A conveience method to get the output data object of this ``PVGeo``
algorithm.<|endoftext|> |
613f1882cce5353c2d2940af5a661ef1e663d8327dfc53ed94b24579e0cc7a59 | def ErrorOccurred(self):
'A conveience method for handling errors on the VTK pipeline\n\n Return:\n bool: true if an error has ovvured since last checked\n '
return self.__errorObserver.ErrorOccurred() | A conveience method for handling errors on the VTK pipeline
Return:
bool: true if an error has ovvured since last checked | PVGeo/base.py | ErrorOccurred | jkulesza/PVGeo | 1 | python | def ErrorOccurred(self):
'A conveience method for handling errors on the VTK pipeline\n\n Return:\n bool: true if an error has ovvured since last checked\n '
return self.__errorObserver.ErrorOccurred() | def ErrorOccurred(self):
'A conveience method for handling errors on the VTK pipeline\n\n Return:\n bool: true if an error has ovvured since last checked\n '
return self.__errorObserver.ErrorOccurred()<|docstring|>A conveience method for handling errors on the VTK pipeline
Return:
... |
53a538158e2e14733b347fb854b24ce16695314a84c8cf6873fdf67a7664d714 | def ErrorMessage(self):
'A conveience method to print the error message.\n '
return self.__errorObserver.ErrorMessage() | A conveience method to print the error message. | PVGeo/base.py | ErrorMessage | jkulesza/PVGeo | 1 | python | def ErrorMessage(self):
'\n '
return self.__errorObserver.ErrorMessage() | def ErrorMessage(self):
'\n '
return self.__errorObserver.ErrorMessage()<|docstring|>A conveience method to print the error message.<|endoftext|> |
d018d5dfeb8a974e54d7cc0008fce594efb86fa370edbad771ddf982161e637a | def Apply(self):
'Update the algorithm and get the output data object'
self.Update()
return self.GetOutput() | Update the algorithm and get the output data object | PVGeo/base.py | Apply | jkulesza/PVGeo | 1 | python | def Apply(self):
self.Update()
return self.GetOutput() | def Apply(self):
self.Update()
return self.GetOutput()<|docstring|>Update the algorithm and get the output data object<|endoftext|> |
d4c6b0edde51802b5f2db4f9dafd549f8161cbc0d35c42cd091a3a118e915913 | def NeedToRead(self, flag=None):
'Ask self if the reader needs to read the files again.\n\n Args:\n flag (bool): Set the read status\n\n Return:\n bool: the status of the reader.\n '
if ((flag is not None) and isinstance(flag, (bool, int))):
self.__needToRead =... | Ask self if the reader needs to read the files again.
Args:
flag (bool): Set the read status
Return:
bool: the status of the reader. | PVGeo/base.py | NeedToRead | jkulesza/PVGeo | 1 | python | def NeedToRead(self, flag=None):
'Ask self if the reader needs to read the files again.\n\n Args:\n flag (bool): Set the read status\n\n Return:\n bool: the status of the reader.\n '
if ((flag is not None) and isinstance(flag, (bool, int))):
self.__needToRead =... | def NeedToRead(self, flag=None):
'Ask self if the reader needs to read the files again.\n\n Args:\n flag (bool): Set the read status\n\n Return:\n bool: the status of the reader.\n '
if ((flag is not None) and isinstance(flag, (bool, int))):
self.__needToRead =... |
111943c006d9652709677ad329716dce10036d5c07ed0d379a999df1af682eaa | def Modified(self, readAgain=True):
'Call modified if the files needs to be read again again\n '
if readAgain:
self.__needToRead = readAgain
AlgorithmBase.Modified(self) | Call modified if the files needs to be read again again | PVGeo/base.py | Modified | jkulesza/PVGeo | 1 | python | def Modified(self, readAgain=True):
'\n '
if readAgain:
self.__needToRead = readAgain
AlgorithmBase.Modified(self) | def Modified(self, readAgain=True):
'\n '
if readAgain:
self.__needToRead = readAgain
AlgorithmBase.Modified(self)<|docstring|>Call modified if the files needs to be read again again<|endoftext|> |
f1d7a346f5b074737c498f613e181baca2c3f80494fca6dc0289cb01c064b242 | def ClearFileNames(self):
'Use to clear file names of the reader.\n\n Note:\n This does not set the reader to need to read again as there are\n no files to read.\n '
self.__fileNames = [] | Use to clear file names of the reader.
Note:
This does not set the reader to need to read again as there are
no files to read. | PVGeo/base.py | ClearFileNames | jkulesza/PVGeo | 1 | python | def ClearFileNames(self):
'Use to clear file names of the reader.\n\n Note:\n This does not set the reader to need to read again as there are\n no files to read.\n '
self.__fileNames = [] | def ClearFileNames(self):
'Use to clear file names of the reader.\n\n Note:\n This does not set the reader to need to read again as there are\n no files to read.\n '
self.__fileNames = []<|docstring|>Use to clear file names of the reader.
Note:
This does not set the read... |
0f90f4906fa273b62a220bab4d57643fd96b3166dbab67ca51a21302df604bde | def AddFileName(self, fname):
'Use to set the file names for the reader. Handles singlt string or\n list of strings.\n\n Args:\n fname (str): The absolute file name with path to read.\n '
if (fname is None):
return
if isinstance(fname, list):
for f in fname:
... | Use to set the file names for the reader. Handles singlt string or
list of strings.
Args:
fname (str): The absolute file name with path to read. | PVGeo/base.py | AddFileName | jkulesza/PVGeo | 1 | python | def AddFileName(self, fname):
'Use to set the file names for the reader. Handles singlt string or\n list of strings.\n\n Args:\n fname (str): The absolute file name with path to read.\n '
if (fname is None):
return
if isinstance(fname, list):
for f in fname:
... | def AddFileName(self, fname):
'Use to set the file names for the reader. Handles singlt string or\n list of strings.\n\n Args:\n fname (str): The absolute file name with path to read.\n '
if (fname is None):
return
if isinstance(fname, list):
for f in fname:
... |
94f41251fa34719ca32a99a6d445bed5bf466eabfe6630d88ae4ca4382b52b52 | def GetFileNames(self, idx=None):
"Returns the list of file names or given and index returns a specified\n timestep's filename.\n "
if ((self.__fileNames is None) or (len(self.__fileNames) < 1)):
raise _helpers.PVGeoError('File names are not set.')
if (idx is None):
return self... | Returns the list of file names or given and index returns a specified
timestep's filename. | PVGeo/base.py | GetFileNames | jkulesza/PVGeo | 1 | python | def GetFileNames(self, idx=None):
"Returns the list of file names or given and index returns a specified\n timestep's filename.\n "
if ((self.__fileNames is None) or (len(self.__fileNames) < 1)):
raise _helpers.PVGeoError('File names are not set.')
if (idx is None):
return self... | def GetFileNames(self, idx=None):
"Returns the list of file names or given and index returns a specified\n timestep's filename.\n "
if ((self.__fileNames is None) or (len(self.__fileNames) < 1)):
raise _helpers.PVGeoError('File names are not set.')
if (idx is None):
return self... |
8dbc5aa68141b5c828d8acfff2c4a7582c5b70d4be40150fe9a571a3bcb1d803 | def Apply(self, fname):
'Given a file name (or list of file names), perfrom the read'
self.AddFileName(fname)
self.Update()
return self.GetOutput() | Given a file name (or list of file names), perfrom the read | PVGeo/base.py | Apply | jkulesza/PVGeo | 1 | python | def Apply(self, fname):
self.AddFileName(fname)
self.Update()
return self.GetOutput() | def Apply(self, fname):
self.AddFileName(fname)
self.Update()
return self.GetOutput()<|docstring|>Given a file name (or list of file names), perfrom the read<|endoftext|> |
7f0392433f8df80de7b1d95b5e8f4d88b386e39c6b85e993cc35160c198c5420 | def _UpdateTimeSteps(self):
'For internal use only: appropriately sets the timesteps.\n '
if (len(self.GetFileNames()) > 1):
self.__timesteps = _helpers.updateTimeSteps(self, self.GetFileNames(), self.__dt)
return 1 | For internal use only: appropriately sets the timesteps. | PVGeo/base.py | _UpdateTimeSteps | jkulesza/PVGeo | 1 | python | def _UpdateTimeSteps(self):
'\n '
if (len(self.GetFileNames()) > 1):
self.__timesteps = _helpers.updateTimeSteps(self, self.GetFileNames(), self.__dt)
return 1 | def _UpdateTimeSteps(self):
'\n '
if (len(self.GetFileNames()) > 1):
self.__timesteps = _helpers.updateTimeSteps(self, self.GetFileNames(), self.__dt)
return 1<|docstring|>For internal use only: appropriately sets the timesteps.<|endoftext|> |
428acf735ffd3f68023fd8f59eff33cf7f2b9fe279bab7aaf387e9dc4fa8fbce | def RequestInformation(self, request, inInfo, outInfo):
'This is a conveience method that should be overwritten when needed.\n This will handle setting the timesteps appropriately based on the number\n of file names when the pipeline needs to know the time information.\n '
self._UpdateTimeS... | This is a conveience method that should be overwritten when needed.
This will handle setting the timesteps appropriately based on the number
of file names when the pipeline needs to know the time information. | PVGeo/base.py | RequestInformation | jkulesza/PVGeo | 1 | python | def RequestInformation(self, request, inInfo, outInfo):
'This is a conveience method that should be overwritten when needed.\n This will handle setting the timesteps appropriately based on the number\n of file names when the pipeline needs to know the time information.\n '
self._UpdateTimeS... | def RequestInformation(self, request, inInfo, outInfo):
'This is a conveience method that should be overwritten when needed.\n This will handle setting the timesteps appropriately based on the number\n of file names when the pipeline needs to know the time information.\n '
self._UpdateTimeS... |
24f34db46a32310dcfa72a9a31990fcd0cc3c0201049783843e0cd1659365d46 | def GetTimestepValues(self):
'Use this in ParaView decorator to register timesteps on the pipeline.\n '
return (self.__timesteps.tolist() if (self.__timesteps is not None) else None) | Use this in ParaView decorator to register timesteps on the pipeline. | PVGeo/base.py | GetTimestepValues | jkulesza/PVGeo | 1 | python | def GetTimestepValues(self):
'\n '
return (self.__timesteps.tolist() if (self.__timesteps is not None) else None) | def GetTimestepValues(self):
'\n '
return (self.__timesteps.tolist() if (self.__timesteps is not None) else None)<|docstring|>Use this in ParaView decorator to register timesteps on the pipeline.<|endoftext|> |
d80eaa18b37a14daea5fda617661057d0754267ee05df4390843b76e8f651b97 | def SetTimeDelta(self, dt):
'An advanced property to set the time step in seconds.\n '
if (dt != self.__dt):
self.__dt = dt
self.Modified() | An advanced property to set the time step in seconds. | PVGeo/base.py | SetTimeDelta | jkulesza/PVGeo | 1 | python | def SetTimeDelta(self, dt):
'\n '
if (dt != self.__dt):
self.__dt = dt
self.Modified() | def SetTimeDelta(self, dt):
'\n '
if (dt != self.__dt):
self.__dt = dt
self.Modified()<|docstring|>An advanced property to set the time step in seconds.<|endoftext|> |
2f94c40a90395f50e90997b3f33c558a2b226d1b1d5cdb69497e725461d2eeab | def RequestDataObject(self, request, inInfo, outInfo):
'There is no need to overwrite this. This method lets the pipeline\n know that the algorithm will dynamically decide the output data type\n based in the input data type.\n '
self.OutputType = self.GetInputData(inInfo, 0, 0).GetClassName... | There is no need to overwrite this. This method lets the pipeline
know that the algorithm will dynamically decide the output data type
based in the input data type. | PVGeo/base.py | RequestDataObject | jkulesza/PVGeo | 1 | python | def RequestDataObject(self, request, inInfo, outInfo):
'There is no need to overwrite this. This method lets the pipeline\n know that the algorithm will dynamically decide the output data type\n based in the input data type.\n '
self.OutputType = self.GetInputData(inInfo, 0, 0).GetClassName... | def RequestDataObject(self, request, inInfo, outInfo):
'There is no need to overwrite this. This method lets the pipeline\n know that the algorithm will dynamically decide the output data type\n based in the input data type.\n '
self.OutputType = self.GetInputData(inInfo, 0, 0).GetClassName... |
725b76cc435bf1d72354565338d626ad439bbc2b46f20c3648d23e2b6ae9e45a | def __UpdateTimeSteps(self):
'For internal use only\n '
if (len(self.__modelFileNames) > 0):
self.__timesteps = _helpers.updateTimeSteps(self, self.__modelFileNames, self.__dt)
return 1 | For internal use only | PVGeo/base.py | __UpdateTimeSteps | jkulesza/PVGeo | 1 | python | def __UpdateTimeSteps(self):
'\n '
if (len(self.__modelFileNames) > 0):
self.__timesteps = _helpers.updateTimeSteps(self, self.__modelFileNames, self.__dt)
return 1 | def __UpdateTimeSteps(self):
'\n '
if (len(self.__modelFileNames) > 0):
self.__timesteps = _helpers.updateTimeSteps(self, self.__modelFileNames, self.__dt)
return 1<|docstring|>For internal use only<|endoftext|> |
5c8d39fe9ef4bea9fbb9653e908a85c0227edc4de7b603bf9a0f5218c8d970b8 | def NeedToReadMesh(self, flag=None):
'Ask self if the reader needs to read the mesh file again.\n\n Args:\n flag (bool): set the status of the reader for mesh files.\n '
if ((flag is not None) and isinstance(flag, (bool, int))):
self.__needToReadMesh = flag
return self.__nee... | Ask self if the reader needs to read the mesh file again.
Args:
flag (bool): set the status of the reader for mesh files. | PVGeo/base.py | NeedToReadMesh | jkulesza/PVGeo | 1 | python | def NeedToReadMesh(self, flag=None):
'Ask self if the reader needs to read the mesh file again.\n\n Args:\n flag (bool): set the status of the reader for mesh files.\n '
if ((flag is not None) and isinstance(flag, (bool, int))):
self.__needToReadMesh = flag
return self.__nee... | def NeedToReadMesh(self, flag=None):
'Ask self if the reader needs to read the mesh file again.\n\n Args:\n flag (bool): set the status of the reader for mesh files.\n '
if ((flag is not None) and isinstance(flag, (bool, int))):
self.__needToReadMesh = flag
return self.__nee... |
56a75f3dc4a36ebd394d8edba24cb7f594639cc46e431e1d98cc6fa218fc8ec4 | def NeedToReadModels(self, flag=None):
'Ask self if the reader needs to read the model files again.\n\n Args:\n flag (bool): set the status of the reader for model files.\n '
if ((flag is not None) and isinstance(flag, (bool, int))):
self.__needToReadModels = flag
return sel... | Ask self if the reader needs to read the model files again.
Args:
flag (bool): set the status of the reader for model files. | PVGeo/base.py | NeedToReadModels | jkulesza/PVGeo | 1 | python | def NeedToReadModels(self, flag=None):
'Ask self if the reader needs to read the model files again.\n\n Args:\n flag (bool): set the status of the reader for model files.\n '
if ((flag is not None) and isinstance(flag, (bool, int))):
self.__needToReadModels = flag
return sel... | def NeedToReadModels(self, flag=None):
'Ask self if the reader needs to read the model files again.\n\n Args:\n flag (bool): set the status of the reader for model files.\n '
if ((flag is not None) and isinstance(flag, (bool, int))):
self.__needToReadModels = flag
return sel... |
a5ab411b63df11d658a1997767522688d2d7d02a76ae47398269b79d296c5e56 | def Modified(self, readAgainMesh=True, readAgainModels=True):
'Call modified if the files needs to be read again again\n\n Args:\n readAgainMesh (bool): set the status of the reader for mesh files.\n readAgainModels (bool): set the status of the reader for model files.\n '
if... | Call modified if the files needs to be read again again
Args:
readAgainMesh (bool): set the status of the reader for mesh files.
readAgainModels (bool): set the status of the reader for model files. | PVGeo/base.py | Modified | jkulesza/PVGeo | 1 | python | def Modified(self, readAgainMesh=True, readAgainModels=True):
'Call modified if the files needs to be read again again\n\n Args:\n readAgainMesh (bool): set the status of the reader for mesh files.\n readAgainModels (bool): set the status of the reader for model files.\n '
if... | def Modified(self, readAgainMesh=True, readAgainModels=True):
'Call modified if the files needs to be read again again\n\n Args:\n readAgainMesh (bool): set the status of the reader for mesh files.\n readAgainModels (bool): set the status of the reader for model files.\n '
if... |
0e827dbfb6bf183abbcdcaa8c2a61013d43b1dbba6dabdaad74ccadd3ece5be5 | @staticmethod
def HasModels(modelfiles):
'A convienance method to see if a list contatins models filenames.\n '
if isinstance(modelfiles, list):
return (len(modelfiles) > 0)
return (modelfiles is not None) | A convienance method to see if a list contatins models filenames. | PVGeo/base.py | HasModels | jkulesza/PVGeo | 1 | python | @staticmethod
def HasModels(modelfiles):
'\n '
if isinstance(modelfiles, list):
return (len(modelfiles) > 0)
return (modelfiles is not None) | @staticmethod
def HasModels(modelfiles):
'\n '
if isinstance(modelfiles, list):
return (len(modelfiles) > 0)
return (modelfiles is not None)<|docstring|>A convienance method to see if a list contatins models filenames.<|endoftext|> |
ab67396263bd0f449c3a1efe8b96d435f4681e76a6a80c93038dc21023aaf298 | def ThisHasModels(self):
'Ask self if the reader has model filenames set.\n '
return TwoFileReaderBase.HasModels(self.__modelFileNames) | Ask self if the reader has model filenames set. | PVGeo/base.py | ThisHasModels | jkulesza/PVGeo | 1 | python | def ThisHasModels(self):
'\n '
return TwoFileReaderBase.HasModels(self.__modelFileNames) | def ThisHasModels(self):
'\n '
return TwoFileReaderBase.HasModels(self.__modelFileNames)<|docstring|>Ask self if the reader has model filenames set.<|endoftext|> |
83dedd929721465475267fe333e49164eb21fe2cd0e73bab9c956e1d8231410d | def GetTimestepValues(self):
'Use this in ParaView decorator to register timesteps\n '
return (self.__timesteps.tolist() if (self.__timesteps is not None) else None) | Use this in ParaView decorator to register timesteps | PVGeo/base.py | GetTimestepValues | jkulesza/PVGeo | 1 | python | def GetTimestepValues(self):
'\n '
return (self.__timesteps.tolist() if (self.__timesteps is not None) else None) | def GetTimestepValues(self):
'\n '
return (self.__timesteps.tolist() if (self.__timesteps is not None) else None)<|docstring|>Use this in ParaView decorator to register timesteps<|endoftext|> |
55e89cae43550b6e003f82305287947bf429f98bbe1d447b2f886a709cd95385 | def SetTimeDelta(self, dt):
'An advanced property for the time step in seconds.\n '
if (dt != self.__dt):
self.__dt = dt
self.Modified(readAgainMesh=False, readAgainModels=False) | An advanced property for the time step in seconds. | PVGeo/base.py | SetTimeDelta | jkulesza/PVGeo | 1 | python | def SetTimeDelta(self, dt):
'\n '
if (dt != self.__dt):
self.__dt = dt
self.Modified(readAgainMesh=False, readAgainModels=False) | def SetTimeDelta(self, dt):
'\n '
if (dt != self.__dt):
self.__dt = dt
self.Modified(readAgainMesh=False, readAgainModels=False)<|docstring|>An advanced property for the time step in seconds.<|endoftext|> |
f1208e9ece2255fc79437bcd76adceb89dcd22b57af04174d51aef399264b237 | def ClearMesh(self):
'Use to clear mesh file name\n '
self.__meshFileName = None
self.Modified(readAgainMesh=True, readAgainModels=False) | Use to clear mesh file name | PVGeo/base.py | ClearMesh | jkulesza/PVGeo | 1 | python | def ClearMesh(self):
'\n '
self.__meshFileName = None
self.Modified(readAgainMesh=True, readAgainModels=False) | def ClearMesh(self):
'\n '
self.__meshFileName = None
self.Modified(readAgainMesh=True, readAgainModels=False)<|docstring|>Use to clear mesh file name<|endoftext|> |
535d1dfb8c1e02305bae2bddcdc97e8089815e32f40304300f28688e96321bf2 | def ClearModels(self):
'Use to clear data file names\n '
self.__modelFileNames = []
self.Modified(readAgainMesh=False, readAgainModels=True) | Use to clear data file names | PVGeo/base.py | ClearModels | jkulesza/PVGeo | 1 | python | def ClearModels(self):
'\n '
self.__modelFileNames = []
self.Modified(readAgainMesh=False, readAgainModels=True) | def ClearModels(self):
'\n '
self.__modelFileNames = []
self.Modified(readAgainMesh=False, readAgainModels=True)<|docstring|>Use to clear data file names<|endoftext|> |
d68b2bd185dade12085ac81fd03718fa5ac833d4d407a9a4b6a02b82a67dcbec | def SetMeshFileName(self, fname):
'Set the mesh file name.\n '
if (self.__meshFileName != fname):
self.__meshFileName = fname
self.Modified(readAgainMesh=True, readAgainModels=False) | Set the mesh file name. | PVGeo/base.py | SetMeshFileName | jkulesza/PVGeo | 1 | python | def SetMeshFileName(self, fname):
'\n '
if (self.__meshFileName != fname):
self.__meshFileName = fname
self.Modified(readAgainMesh=True, readAgainModels=False) | def SetMeshFileName(self, fname):
'\n '
if (self.__meshFileName != fname):
self.__meshFileName = fname
self.Modified(readAgainMesh=True, readAgainModels=False)<|docstring|>Set the mesh file name.<|endoftext|> |
5642462bb0cf76f0c25d2076a6482b0659ad36f1f97a97d35d4e3466e195bd30 | def AddModelFileName(self, fname):
'Use to set the file names for the reader. Handles single string or\n list of strings.\n\n Args:\n fname (str or list(str)): the file name(s) to use for the model data.\n '
if (fname is None):
return
if isinstance(fname, list):
... | Use to set the file names for the reader. Handles single string or
list of strings.
Args:
fname (str or list(str)): the file name(s) to use for the model data. | PVGeo/base.py | AddModelFileName | jkulesza/PVGeo | 1 | python | def AddModelFileName(self, fname):
'Use to set the file names for the reader. Handles single string or\n list of strings.\n\n Args:\n fname (str or list(str)): the file name(s) to use for the model data.\n '
if (fname is None):
return
if isinstance(fname, list):
... | def AddModelFileName(self, fname):
'Use to set the file names for the reader. Handles single string or\n list of strings.\n\n Args:\n fname (str or list(str)): the file name(s) to use for the model data.\n '
if (fname is None):
return
if isinstance(fname, list):
... |
8a0e49245f5e9e4b962a94695dc1f64e510175d0c8e978e324e82371819bb311 | def GetModelFileNames(self, idx=None):
"Returns the list of file names or given and index returns a specified\n timestep's filename.\n "
if ((idx is None) or (not self.ThisHasModels())):
return self.__modelFileNames
return self.__modelFileNames[idx] | Returns the list of file names or given and index returns a specified
timestep's filename. | PVGeo/base.py | GetModelFileNames | jkulesza/PVGeo | 1 | python | def GetModelFileNames(self, idx=None):
"Returns the list of file names or given and index returns a specified\n timestep's filename.\n "
if ((idx is None) or (not self.ThisHasModels())):
return self.__modelFileNames
return self.__modelFileNames[idx] | def GetModelFileNames(self, idx=None):
"Returns the list of file names or given and index returns a specified\n timestep's filename.\n "
if ((idx is None) or (not self.ThisHasModels())):
return self.__modelFileNames
return self.__modelFileNames[idx]<|docstring|>Returns the list of file... |
deb8443917bff7faa8abbb92d0e06b01637bfe09502c9a982a25792411ea5e72 | def Apply(self):
'Perfrom the read with parameters/file names set during init or by\n setters'
self.Update()
return self.GetOutput() | Perfrom the read with parameters/file names set during init or by
setters | PVGeo/base.py | Apply | jkulesza/PVGeo | 1 | python | def Apply(self):
'Perfrom the read with parameters/file names set during init or by\n setters'
self.Update()
return self.GetOutput() | def Apply(self):
'Perfrom the read with parameters/file names set during init or by\n setters'
self.Update()
return self.GetOutput()<|docstring|>Perfrom the read with parameters/file names set during init or by
setters<|endoftext|> |
3d9ac8bd82b0eeaa7ef83697fa584b11c18a03e65fbd102f97ccbebb338e6c83 | def FillInputPortInformation(self, port, info):
'Allows us to save composite datasets as well.\n\n Note:\n I only care about ``vtkMultiBlockDataSet``\n '
info.Set(self.INPUT_REQUIRED_DATA_TYPE(), self.InputType)
info.Append(self.INPUT_REQUIRED_DATA_TYPE(), 'vtkMultiBlockDataSet')
... | Allows us to save composite datasets as well.
Note:
I only care about ``vtkMultiBlockDataSet`` | PVGeo/base.py | FillInputPortInformation | jkulesza/PVGeo | 1 | python | def FillInputPortInformation(self, port, info):
'Allows us to save composite datasets as well.\n\n Note:\n I only care about ``vtkMultiBlockDataSet``\n '
info.Set(self.INPUT_REQUIRED_DATA_TYPE(), self.InputType)
info.Append(self.INPUT_REQUIRED_DATA_TYPE(), 'vtkMultiBlockDataSet')
... | def FillInputPortInformation(self, port, info):
'Allows us to save composite datasets as well.\n\n Note:\n I only care about ``vtkMultiBlockDataSet``\n '
info.Set(self.INPUT_REQUIRED_DATA_TYPE(), self.InputType)
info.Append(self.INPUT_REQUIRED_DATA_TYPE(), 'vtkMultiBlockDataSet')
... |
da7298ec8deef0649d8b931799c3db5e78b7e8aac42084c47750c5b2d99d1404 | def SetFileName(self, fname):
'Specify the filename for the output. Writer can only handle a single\n output data object/time step.'
if (not isinstance(fname, str)):
raise RuntimeError('File name must be string. Only single file is supported.')
if (self.__filename != fname):
self.__fi... | Specify the filename for the output. Writer can only handle a single
output data object/time step. | PVGeo/base.py | SetFileName | jkulesza/PVGeo | 1 | python | def SetFileName(self, fname):
'Specify the filename for the output. Writer can only handle a single\n output data object/time step.'
if (not isinstance(fname, str)):
raise RuntimeError('File name must be string. Only single file is supported.')
if (self.__filename != fname):
self.__fi... | def SetFileName(self, fname):
'Specify the filename for the output. Writer can only handle a single\n output data object/time step.'
if (not isinstance(fname, str)):
raise RuntimeError('File name must be string. Only single file is supported.')
if (self.__filename != fname):
self.__fi... |
58e83ea4ff960e21e87e921d99ad0c5fbd8b60e3eb1d21c373949f4f0f66bdad | def GetFileName(self):
'Get the set filename.'
return self.__filename | Get the set filename. | PVGeo/base.py | GetFileName | jkulesza/PVGeo | 1 | python | def GetFileName(self):
return self.__filename | def GetFileName(self):
return self.__filename<|docstring|>Get the set filename.<|endoftext|> |
78bc8bdc86ca1efcfef73312c677629aee29223c6959f7218c24feb62f30e2c0 | def RequestData(self, request, inInfoVec, outInfoVec):
'OVERWRITE: This is executed by the pipeline and handles the write\n out'
raise NotImplementedError()
return 1 | OVERWRITE: This is executed by the pipeline and handles the write
out | PVGeo/base.py | RequestData | jkulesza/PVGeo | 1 | python | def RequestData(self, request, inInfoVec, outInfoVec):
'OVERWRITE: This is executed by the pipeline and handles the write\n out'
raise NotImplementedError()
return 1 | def RequestData(self, request, inInfoVec, outInfoVec):
'OVERWRITE: This is executed by the pipeline and handles the write\n out'
raise NotImplementedError()
return 1<|docstring|>OVERWRITE: This is executed by the pipeline and handles the write
out<|endoftext|> |
65d03c8b1835ebff701883518a6d94b7c4337b1e2a3082c737ebe4020d65cb87 | def Write(self, inputDataObject=None):
'Perfrom the write out.'
if inputDataObject:
self.SetInputDataObject(inputDataObject)
self.Modified()
self.Update() | Perfrom the write out. | PVGeo/base.py | Write | jkulesza/PVGeo | 1 | python | def Write(self, inputDataObject=None):
if inputDataObject:
self.SetInputDataObject(inputDataObject)
self.Modified()
self.Update() | def Write(self, inputDataObject=None):
if inputDataObject:
self.SetInputDataObject(inputDataObject)
self.Modified()
self.Update()<|docstring|>Perfrom the write out.<|endoftext|> |
02eabce8f0af24560156f54841d7f8c4ccd266ba12f60f111225148f2c61efb9 | def PerformWriteOut(self, inputDataObject, filename, objectName):
'This method must be implemented. This is automatically called by\n ``RequestData`` for single inputs or composite inputs.'
raise NotImplementedError('PerformWriteOut must be implemented!') | This method must be implemented. This is automatically called by
``RequestData`` for single inputs or composite inputs. | PVGeo/base.py | PerformWriteOut | jkulesza/PVGeo | 1 | python | def PerformWriteOut(self, inputDataObject, filename, objectName):
'This method must be implemented. This is automatically called by\n ``RequestData`` for single inputs or composite inputs.'
raise NotImplementedError('PerformWriteOut must be implemented!') | def PerformWriteOut(self, inputDataObject, filename, objectName):
'This method must be implemented. This is automatically called by\n ``RequestData`` for single inputs or composite inputs.'
raise NotImplementedError('PerformWriteOut must be implemented!')<|docstring|>This method must be implemented. This... |
1169457256332615384257df95cf54da87ddd11a551f33614840d2cc94b67ed3 | def SetFormat(self, fmt):
"Use to set the ASCII format for the writer default is ``'%.9e'``"
if ((self.__fmt != fmt) and isinstance(fmt, str)):
self.__fmt = fmt
self.Modified() | Use to set the ASCII format for the writer default is ``'%.9e'`` | PVGeo/base.py | SetFormat | jkulesza/PVGeo | 1 | python | def SetFormat(self, fmt):
if ((self.__fmt != fmt) and isinstance(fmt, str)):
self.__fmt = fmt
self.Modified() | def SetFormat(self, fmt):
if ((self.__fmt != fmt) and isinstance(fmt, str)):
self.__fmt = fmt
self.Modified()<|docstring|>Use to set the ASCII format for the writer default is ``'%.9e'``<|endoftext|> |
49bbd8fd6b6fc14a44a9f33b40d880c02f5b0a6362dc8eeae5ed41185aa78609 | def UseComposite(self):
'True if input dataset is a composite dataset'
return self.__composite | True if input dataset is a composite dataset | PVGeo/base.py | UseComposite | jkulesza/PVGeo | 1 | python | def UseComposite(self):
return self.__composite | def UseComposite(self):
return self.__composite<|docstring|>True if input dataset is a composite dataset<|endoftext|> |
3dc0b080c3d3976cb779abdf6fd29d1eeac9e8696741084def569a734f642c84 | def SetBlockFileNames(self, n):
'Gets a list of filenames based on user input filename and creates a\n numbered list of filenames for the reader to save out. Assumes the\n filename has an extension set already.\n '
number = n
count = 0
while (number > 0):
number = (number //... | Gets a list of filenames based on user input filename and creates a
numbered list of filenames for the reader to save out. Assumes the
filename has an extension set already. | PVGeo/base.py | SetBlockFileNames | jkulesza/PVGeo | 1 | python | def SetBlockFileNames(self, n):
'Gets a list of filenames based on user input filename and creates a\n numbered list of filenames for the reader to save out. Assumes the\n filename has an extension set already.\n '
number = n
count = 0
while (number > 0):
number = (number //... | def SetBlockFileNames(self, n):
'Gets a list of filenames based on user input filename and creates a\n numbered list of filenames for the reader to save out. Assumes the\n filename has an extension set already.\n '
number = n
count = 0
while (number > 0):
number = (number //... |
6d9df36064ff9715c7aadaa311e937d7d02943f7428418d67652b8fba30d364e | def RequestData(self, request, inInfoVec, outInfoVec):
'Subclasses must implement a ``PerformWriteOut`` method that takes an\n input data object and a filename. This method will automatically handle\n composite data sets.\n '
inp = self.GetInputData(inInfoVec, 0, 0)
if isinstance(inp, v... | Subclasses must implement a ``PerformWriteOut`` method that takes an
input data object and a filename. This method will automatically handle
composite data sets. | PVGeo/base.py | RequestData | jkulesza/PVGeo | 1 | python | def RequestData(self, request, inInfoVec, outInfoVec):
'Subclasses must implement a ``PerformWriteOut`` method that takes an\n input data object and a filename. This method will automatically handle\n composite data sets.\n '
inp = self.GetInputData(inInfoVec, 0, 0)
if isinstance(inp, v... | def RequestData(self, request, inInfoVec, outInfoVec):
'Subclasses must implement a ``PerformWriteOut`` method that takes an\n input data object and a filename. This method will automatically handle\n composite data sets.\n '
inp = self.GetInputData(inInfoVec, 0, 0)
if isinstance(inp, v... |
55e76fb3d97e790d4ebde757c8b457a2d4ca83d2fd46f514c21eff8b5b71539a | def __init__(self, x_min, x_max):
'Constructor for rectangle class\n params:\n x_min: (2, 1) matrix of floats - positive deviation from central pt xc\n x_max: (2, 1) matrix of floats - negative deviation from central pt xc\n '
self._x_min = x_min
self._x_max = x_max | Constructor for rectangle class
params:
x_min: (2, 1) matrix of floats - positive deviation from central pt xc
x_max: (2, 1) matrix of floats - negative deviation from central pt xc | src/rectangle.py | __init__ | arobey1/RobustNN | 0 | python | def __init__(self, x_min, x_max):
'Constructor for rectangle class\n params:\n x_min: (2, 1) matrix of floats - positive deviation from central pt xc\n x_max: (2, 1) matrix of floats - negative deviation from central pt xc\n '
self._x_min = x_min
self._x_max = x_max | def __init__(self, x_min, x_max):
'Constructor for rectangle class\n params:\n x_min: (2, 1) matrix of floats - positive deviation from central pt xc\n x_max: (2, 1) matrix of floats - negative deviation from central pt xc\n '
self._x_min = x_min
self._x_max = x_max<|docs... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.