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 |
|---|---|---|---|---|---|---|---|---|---|
0c53dcb4fce790067d0810c95eeb7f09f1e7aa5e49eb689b51a75d3733b684c3 | def can_be_corrected(self, p0: Perception, p1: Perception) -> bool:
'\n If all components of C and E for which p0 != p1 are wildcards then\n classifier can be corrected.\n\n Parameters\n ----------\n p0: Perception\n previous perception\n p1: Perception\n ... | If all components of C and E for which p0 != p1 are wildcards then
classifier can be corrected.
Parameters
----------
p0: Perception
previous perception
p1: Perception
perception
Returns
-------
bool
True if classifier can be corrected, False otherwise | lcs/agents/acs/Classifier.py | can_be_corrected | khozzy/ACS2 | 11 | python | def can_be_corrected(self, p0: Perception, p1: Perception) -> bool:
'\n If all components of C and E for which p0 != p1 are wildcards then\n classifier can be corrected.\n\n Parameters\n ----------\n p0: Perception\n previous perception\n p1: Perception\n ... | def can_be_corrected(self, p0: Perception, p1: Perception) -> bool:
'\n If all components of C and E for which p0 != p1 are wildcards then\n classifier can be corrected.\n\n Parameters\n ----------\n p0: Perception\n previous perception\n p1: Perception\n ... |
c4a5846395698984f4f407eeb60494237f4b9f94eeb09b9371ade2c0468155af | def specialize(self, p0: Perception, p1: Perception, leave_specialized=False) -> None:
'\n Specializes the effect part where necessary to correctly anticipate\n the changes from p0 to p1.\n\n Parameters\n ----------\n p0: Perception\n previous_situation\n p1: Per... | Specializes the effect part where necessary to correctly anticipate
the changes from p0 to p1.
Parameters
----------
p0: Perception
previous_situation
p1: Perception
situation
leave_specialized: bool
Requires the effect attribute to be a wildcard to specialize it.
By default false | lcs/agents/acs/Classifier.py | specialize | khozzy/ACS2 | 11 | python | def specialize(self, p0: Perception, p1: Perception, leave_specialized=False) -> None:
'\n Specializes the effect part where necessary to correctly anticipate\n the changes from p0 to p1.\n\n Parameters\n ----------\n p0: Perception\n previous_situation\n p1: Per... | def specialize(self, p0: Perception, p1: Perception, leave_specialized=False) -> None:
'\n Specializes the effect part where necessary to correctly anticipate\n the changes from p0 to p1.\n\n Parameters\n ----------\n p0: Perception\n previous_situation\n p1: Per... |
16a4b3fcd60645e8e60aedd5f742fafb88d8ba3671ca69656b84e99bcb4b2eee | def predicts_successfully(self, p0: Perception, action: int, p1: Perception) -> bool:
'\n Check if classifier matches previous situation `p0`,\n has action `action` and predicts the effect `p1`\n\n Parameters\n ----------\n p0: Perception\n previous situation\n a... | Check if classifier matches previous situation `p0`,
has action `action` and predicts the effect `p1`
Parameters
----------
p0: Perception
previous situation
action: int
action
p1: Perception
anticipated situation after execution action
Returns
-------
bool
True if classifier makes successful predicti... | lcs/agents/acs/Classifier.py | predicts_successfully | khozzy/ACS2 | 11 | python | def predicts_successfully(self, p0: Perception, action: int, p1: Perception) -> bool:
'\n Check if classifier matches previous situation `p0`,\n has action `action` and predicts the effect `p1`\n\n Parameters\n ----------\n p0: Perception\n previous situation\n a... | def predicts_successfully(self, p0: Perception, action: int, p1: Perception) -> bool:
'\n Check if classifier matches previous situation `p0`,\n has action `action` and predicts the effect `p1`\n\n Parameters\n ----------\n p0: Perception\n previous situation\n a... |
866914e1dfefc77f6bea85e83be1effdce5e8a54e30a8aa648f310761c615905 | def does_anticipate_correctly(self, p0: Perception, p1: Perception) -> bool:
"\n Checks anticipation. While the pass-through symbols in the effect part\n of a classifier directly anticipate that these attributes stay the same\n after the execution of an action, the specified attributes anticipa... | Checks anticipation. While the pass-through symbols in the effect part
of a classifier directly anticipate that these attributes stay the same
after the execution of an action, the specified attributes anticipate
a change to the specified value. Thus, if the perceived value did not
change to the anticipated but actuall... | lcs/agents/acs/Classifier.py | does_anticipate_correctly | khozzy/ACS2 | 11 | python | def does_anticipate_correctly(self, p0: Perception, p1: Perception) -> bool:
"\n Checks anticipation. While the pass-through symbols in the effect part\n of a classifier directly anticipate that these attributes stay the same\n after the execution of an action, the specified attributes anticipa... | def does_anticipate_correctly(self, p0: Perception, p1: Perception) -> bool:
"\n Checks anticipation. While the pass-through symbols in the effect part\n of a classifier directly anticipate that these attributes stay the same\n after the execution of an action, the specified attributes anticipa... |
c09bae770d3ce5a8a0d2e2e63c9d001e32ca04495e49a24fdcb8ec53bfd12190 | def set_mark(self, perception: Perception) -> None:
'\n Marks classifier with given perception taking into consideration its\n condition.\n\n Specializes the mark in all attributes which are not specified\n in the conditions, yet\n\n Parameters\n ----------\n percept... | Marks classifier with given perception taking into consideration its
condition.
Specializes the mark in all attributes which are not specified
in the conditions, yet
Parameters
----------
perception: Perception
current situation | lcs/agents/acs/Classifier.py | set_mark | khozzy/ACS2 | 11 | python | def set_mark(self, perception: Perception) -> None:
'\n Marks classifier with given perception taking into consideration its\n condition.\n\n Specializes the mark in all attributes which are not specified\n in the conditions, yet\n\n Parameters\n ----------\n percept... | def set_mark(self, perception: Perception) -> None:
'\n Marks classifier with given perception taking into consideration its\n condition.\n\n Specializes the mark in all attributes which are not specified\n in the conditions, yet\n\n Parameters\n ----------\n percept... |
94130ceda9363419e7d84c2022cc2913277565c32ee2e3ac2b4a8508cbe6312a | def is_more_general(self, other: Classifier) -> bool:
'\n Checks if the classifiers condition is formally\n more general than `other`s.\n\n Parameters\n ----------\n other: Classifier\n other classifier to compare\n\n Returns\n -------\n bool\n ... | Checks if the classifiers condition is formally
more general than `other`s.
Parameters
----------
other: Classifier
other classifier to compare
Returns
-------
bool
True if `other` classifier is more general | lcs/agents/acs/Classifier.py | is_more_general | khozzy/ACS2 | 11 | python | def is_more_general(self, other: Classifier) -> bool:
'\n Checks if the classifiers condition is formally\n more general than `other`s.\n\n Parameters\n ----------\n other: Classifier\n other classifier to compare\n\n Returns\n -------\n bool\n ... | def is_more_general(self, other: Classifier) -> bool:
'\n Checks if the classifiers condition is formally\n more general than `other`s.\n\n Parameters\n ----------\n other: Classifier\n other classifier to compare\n\n Returns\n -------\n bool\n ... |
aa29023f697a7bcf0209b2c7e2e5cc0b815560c84c2ea80af80a1a3b7cd64b65 | def does_match(self, situation: Perception) -> bool:
'\n Returns if the classifier matches the situation.\n :param situation:\n :return:\n '
return self.condition.does_match(situation) | Returns if the classifier matches the situation.
:param situation:
:return: | lcs/agents/acs/Classifier.py | does_match | khozzy/ACS2 | 11 | python | def does_match(self, situation: Perception) -> bool:
'\n Returns if the classifier matches the situation.\n :param situation:\n :return:\n '
return self.condition.does_match(situation) | def does_match(self, situation: Perception) -> bool:
'\n Returns if the classifier matches the situation.\n :param situation:\n :return:\n '
return self.condition.does_match(situation)<|docstring|>Returns if the classifier matches the situation.
:param situation:
:return:<|endoftext|... |
7b513b428e2e139faeecf474ac78b38ae491e2dd5bb3da330fda3f339ec447dd | def modelresource_factory(model, resource_class=ModelResource):
'\n Factory for creating ``ModelResource`` class for given Django model.\n '
attrs = {'model': model}
Meta = type(str('Meta'), (object,), attrs)
class_name = (model.__name__ + str('Resource'))
class_attrs = {'Meta': Meta}
meta... | Factory for creating ``ModelResource`` class for given Django model. | venv/Lib/site-packages/import_export/resources.py | modelresource_factory | lsmiley/esstools-adminlte-3 | 2,020 | python | def modelresource_factory(model, resource_class=ModelResource):
'\n \n '
attrs = {'model': model}
Meta = type(str('Meta'), (object,), attrs)
class_name = (model.__name__ + str('Resource'))
class_attrs = {'Meta': Meta}
metaclass = ModelDeclarativeMetaclass
return metaclass(class_name, (... | def modelresource_factory(model, resource_class=ModelResource):
'\n \n '
attrs = {'model': model}
Meta = type(str('Meta'), (object,), attrs)
class_name = (model.__name__ + str('Resource'))
class_attrs = {'Meta': Meta}
metaclass = ModelDeclarativeMetaclass
return metaclass(class_name, (... |
3f497cee0bc1fb1791323c92ecd0d4f20bcec616341f52404094373907c50b5b | @classmethod
def get_result_class(self):
'\n Returns the class used to store the result of an import.\n '
return Result | Returns the class used to store the result of an import. | venv/Lib/site-packages/import_export/resources.py | get_result_class | lsmiley/esstools-adminlte-3 | 2,020 | python | @classmethod
def get_result_class(self):
'\n \n '
return Result | @classmethod
def get_result_class(self):
'\n \n '
return Result<|docstring|>Returns the class used to store the result of an import.<|endoftext|> |
c24f8819c573bd6707d26af6c0efffad36fadad889b786b638b44b0b96d6867e | @classmethod
def get_row_result_class(self):
'\n Returns the class used to store the result of a row import.\n '
return RowResult | Returns the class used to store the result of a row import. | venv/Lib/site-packages/import_export/resources.py | get_row_result_class | lsmiley/esstools-adminlte-3 | 2,020 | python | @classmethod
def get_row_result_class(self):
'\n \n '
return RowResult | @classmethod
def get_row_result_class(self):
'\n \n '
return RowResult<|docstring|>Returns the class used to store the result of a row import.<|endoftext|> |
71c1b032dd26fe80b0cc276ba426e655a1a41de24153e78d9250c5fdab7ed1ef | @classmethod
def get_error_result_class(self):
'\n Returns the class used to store an error resulting from an import.\n '
return Error | Returns the class used to store an error resulting from an import. | venv/Lib/site-packages/import_export/resources.py | get_error_result_class | lsmiley/esstools-adminlte-3 | 2,020 | python | @classmethod
def get_error_result_class(self):
'\n \n '
return Error | @classmethod
def get_error_result_class(self):
'\n \n '
return Error<|docstring|>Returns the class used to store an error resulting from an import.<|endoftext|> |
be28180495694e6cc2bde1ff5c9bb60a4ccc601cc543d44a0d19d94cb759c1b5 | @classmethod
def get_diff_class(self):
'\n Returns the class used to display the diff for an imported instance.\n '
return Diff | Returns the class used to display the diff for an imported instance. | venv/Lib/site-packages/import_export/resources.py | get_diff_class | lsmiley/esstools-adminlte-3 | 2,020 | python | @classmethod
def get_diff_class(self):
'\n \n '
return Diff | @classmethod
def get_diff_class(self):
'\n \n '
return Diff<|docstring|>Returns the class used to display the diff for an imported instance.<|endoftext|> |
35c51dd2996f6f83507ce3d3cedf8b86eb1820488f1d0cc801eda998d5725142 | def get_fields(self, **kwargs):
'\n Returns fields sorted according to\n :attr:`~import_export.resources.ResourceOptions.export_order`.\n '
return [self.fields[f] for f in self.get_export_order()] | Returns fields sorted according to
:attr:`~import_export.resources.ResourceOptions.export_order`. | venv/Lib/site-packages/import_export/resources.py | get_fields | lsmiley/esstools-adminlte-3 | 2,020 | python | def get_fields(self, **kwargs):
'\n Returns fields sorted according to\n :attr:`~import_export.resources.ResourceOptions.export_order`.\n '
return [self.fields[f] for f in self.get_export_order()] | def get_fields(self, **kwargs):
'\n Returns fields sorted according to\n :attr:`~import_export.resources.ResourceOptions.export_order`.\n '
return [self.fields[f] for f in self.get_export_order()]<|docstring|>Returns fields sorted according to
:attr:`~import_export.resources.ResourceOptions... |
15574ce3a5098c5a367725a1af890695ff008f25b308a36d3fd3ec55ef01fed7 | def get_field_name(self, field):
'\n Returns the field name for a given field.\n '
for (field_name, f) in self.fields.items():
if (f == field):
return field_name
raise AttributeError(('Field %s does not exists in %s resource' % (field, self.__class__))) | Returns the field name for a given field. | venv/Lib/site-packages/import_export/resources.py | get_field_name | lsmiley/esstools-adminlte-3 | 2,020 | python | def get_field_name(self, field):
'\n \n '
for (field_name, f) in self.fields.items():
if (f == field):
return field_name
raise AttributeError(('Field %s does not exists in %s resource' % (field, self.__class__))) | def get_field_name(self, field):
'\n \n '
for (field_name, f) in self.fields.items():
if (f == field):
return field_name
raise AttributeError(('Field %s does not exists in %s resource' % (field, self.__class__)))<|docstring|>Returns the field name for a given field.<|endoft... |
87e9241dd65a40424c7ab123fdc39c6899dd54a33862de0b82fe8ffc29c32036 | def init_instance(self, row=None):
'\n Initializes an object. Implemented in\n :meth:`import_export.resources.ModelResource.init_instance`.\n '
raise NotImplementedError() | Initializes an object. Implemented in
:meth:`import_export.resources.ModelResource.init_instance`. | venv/Lib/site-packages/import_export/resources.py | init_instance | lsmiley/esstools-adminlte-3 | 2,020 | python | def init_instance(self, row=None):
'\n Initializes an object. Implemented in\n :meth:`import_export.resources.ModelResource.init_instance`.\n '
raise NotImplementedError() | def init_instance(self, row=None):
'\n Initializes an object. Implemented in\n :meth:`import_export.resources.ModelResource.init_instance`.\n '
raise NotImplementedError()<|docstring|>Initializes an object. Implemented in
:meth:`import_export.resources.ModelResource.init_instance`.<|endofte... |
15126a5f9327d6460fc6a920e407048d070224e53ffa43b0ba22cdf9c4ec8344 | def get_instance(self, instance_loader, row):
"\n If all 'import_id_fields' are present in the dataset, calls\n the :doc:`InstanceLoader <api_instance_loaders>`. Otherwise,\n returns `None`.\n "
import_id_fields = [self.fields[f] for f in self.get_import_id_fields()]
for field in... | If all 'import_id_fields' are present in the dataset, calls
the :doc:`InstanceLoader <api_instance_loaders>`. Otherwise,
returns `None`. | venv/Lib/site-packages/import_export/resources.py | get_instance | lsmiley/esstools-adminlte-3 | 2,020 | python | def get_instance(self, instance_loader, row):
"\n If all 'import_id_fields' are present in the dataset, calls\n the :doc:`InstanceLoader <api_instance_loaders>`. Otherwise,\n returns `None`.\n "
import_id_fields = [self.fields[f] for f in self.get_import_id_fields()]
for field in... | def get_instance(self, instance_loader, row):
"\n If all 'import_id_fields' are present in the dataset, calls\n the :doc:`InstanceLoader <api_instance_loaders>`. Otherwise,\n returns `None`.\n "
import_id_fields = [self.fields[f] for f in self.get_import_id_fields()]
for field in... |
7663035555cd1538f884d3c0712e8aa4292f0579501dac43379e0981f9d2a0ba | def get_or_init_instance(self, instance_loader, row):
'\n Either fetches an already existing instance or initializes a new one.\n '
if (not self._meta.force_init_instance):
instance = self.get_instance(instance_loader, row)
if instance:
return (instance, False)
retu... | Either fetches an already existing instance or initializes a new one. | venv/Lib/site-packages/import_export/resources.py | get_or_init_instance | lsmiley/esstools-adminlte-3 | 2,020 | python | def get_or_init_instance(self, instance_loader, row):
'\n \n '
if (not self._meta.force_init_instance):
instance = self.get_instance(instance_loader, row)
if instance:
return (instance, False)
return (self.init_instance(row), True) | def get_or_init_instance(self, instance_loader, row):
'\n \n '
if (not self._meta.force_init_instance):
instance = self.get_instance(instance_loader, row)
if instance:
return (instance, False)
return (self.init_instance(row), True)<|docstring|>Either fetches an alre... |
1867c346ee9524b91cd9bb88e4a4b2b90c140ab0d8dd504e1a83214e26e3d7d4 | def get_bulk_update_fields(self):
'\n Returns the fields to be included in calls to bulk_update().\n ``import_id_fields`` are removed because `id` fields cannot be supplied to bulk_update().\n '
return [f for f in self.fields if (f not in self._meta.import_id_fields)] | Returns the fields to be included in calls to bulk_update().
``import_id_fields`` are removed because `id` fields cannot be supplied to bulk_update(). | venv/Lib/site-packages/import_export/resources.py | get_bulk_update_fields | lsmiley/esstools-adminlte-3 | 2,020 | python | def get_bulk_update_fields(self):
'\n Returns the fields to be included in calls to bulk_update().\n ``import_id_fields`` are removed because `id` fields cannot be supplied to bulk_update().\n '
return [f for f in self.fields if (f not in self._meta.import_id_fields)] | def get_bulk_update_fields(self):
'\n Returns the fields to be included in calls to bulk_update().\n ``import_id_fields`` are removed because `id` fields cannot be supplied to bulk_update().\n '
return [f for f in self.fields if (f not in self._meta.import_id_fields)]<|docstring|>Returns th... |
8d9b6cc82a2f07ce1d9e0989083d456db05091fa201ae276de6e21f28f0a8fd3 | def bulk_create(self, using_transactions, dry_run, raise_errors, batch_size=None):
'\n Creates objects by calling ``bulk_create``.\n '
try:
if (len(self.create_instances) > 0):
if ((not using_transactions) and dry_run):
pass
else:
sel... | Creates objects by calling ``bulk_create``. | venv/Lib/site-packages/import_export/resources.py | bulk_create | lsmiley/esstools-adminlte-3 | 2,020 | python | def bulk_create(self, using_transactions, dry_run, raise_errors, batch_size=None):
'\n \n '
try:
if (len(self.create_instances) > 0):
if ((not using_transactions) and dry_run):
pass
else:
self._meta.model.objects.bulk_create(self.crea... | def bulk_create(self, using_transactions, dry_run, raise_errors, batch_size=None):
'\n \n '
try:
if (len(self.create_instances) > 0):
if ((not using_transactions) and dry_run):
pass
else:
self._meta.model.objects.bulk_create(self.crea... |
7caa4245e6c33673e9118e2d683f447291388c523c1ef2633a9a9851598f945f | def bulk_update(self, using_transactions, dry_run, raise_errors, batch_size=None):
'\n Updates objects by calling ``bulk_update``.\n '
try:
if (len(self.update_instances) > 0):
if ((not using_transactions) and dry_run):
pass
else:
sel... | Updates objects by calling ``bulk_update``. | venv/Lib/site-packages/import_export/resources.py | bulk_update | lsmiley/esstools-adminlte-3 | 2,020 | python | def bulk_update(self, using_transactions, dry_run, raise_errors, batch_size=None):
'\n \n '
try:
if (len(self.update_instances) > 0):
if ((not using_transactions) and dry_run):
pass
else:
self._meta.model.objects.bulk_update(self.upda... | def bulk_update(self, using_transactions, dry_run, raise_errors, batch_size=None):
'\n \n '
try:
if (len(self.update_instances) > 0):
if ((not using_transactions) and dry_run):
pass
else:
self._meta.model.objects.bulk_update(self.upda... |
638c22a9ce9ae672667b620a51da54c797155b41eedb26eda36ab040f8238a86 | def bulk_delete(self, using_transactions, dry_run, raise_errors):
'\n Deletes objects by filtering on a list of instances to be deleted,\n then calling ``delete()`` on the entire queryset.\n '
try:
if (len(self.delete_instances) > 0):
if ((not using_transactions) and dry... | Deletes objects by filtering on a list of instances to be deleted,
then calling ``delete()`` on the entire queryset. | venv/Lib/site-packages/import_export/resources.py | bulk_delete | lsmiley/esstools-adminlte-3 | 2,020 | python | def bulk_delete(self, using_transactions, dry_run, raise_errors):
'\n Deletes objects by filtering on a list of instances to be deleted,\n then calling ``delete()`` on the entire queryset.\n '
try:
if (len(self.delete_instances) > 0):
if ((not using_transactions) and dry... | def bulk_delete(self, using_transactions, dry_run, raise_errors):
'\n Deletes objects by filtering on a list of instances to be deleted,\n then calling ``delete()`` on the entire queryset.\n '
try:
if (len(self.delete_instances) > 0):
if ((not using_transactions) and dry... |
5ff0957e48a23ef066c90a2416f836ccd35550db936f90a80d03677f55e01eec | def validate_instance(self, instance, import_validation_errors=None, validate_unique=True):
"\n Takes any validation errors that were raised by\n :meth:`~import_export.resources.Resource.import_obj`, and combines them\n with validation errors raised by the instance's ``full_clean()``\n m... | Takes any validation errors that were raised by
:meth:`~import_export.resources.Resource.import_obj`, and combines them
with validation errors raised by the instance's ``full_clean()``
method. The combined errors are then re-raised as single, multi-field
ValidationError.
If the ``clean_model_instances`` option is Fals... | venv/Lib/site-packages/import_export/resources.py | validate_instance | lsmiley/esstools-adminlte-3 | 2,020 | python | def validate_instance(self, instance, import_validation_errors=None, validate_unique=True):
"\n Takes any validation errors that were raised by\n :meth:`~import_export.resources.Resource.import_obj`, and combines them\n with validation errors raised by the instance's ``full_clean()``\n m... | def validate_instance(self, instance, import_validation_errors=None, validate_unique=True):
"\n Takes any validation errors that were raised by\n :meth:`~import_export.resources.Resource.import_obj`, and combines them\n with validation errors raised by the instance's ``full_clean()``\n m... |
f4966cc13972acd6a8e8c9d046fa1f010ddb63321589771ae602ad8ec1c729ce | def save_instance(self, instance, using_transactions=True, dry_run=False):
'\n Takes care of saving the object to the database.\n\n Objects can be created in bulk if ``use_bulk`` is enabled.\n '
self.before_save_instance(instance, using_transactions, dry_run)
if self._meta.use_bulk:
... | Takes care of saving the object to the database.
Objects can be created in bulk if ``use_bulk`` is enabled. | venv/Lib/site-packages/import_export/resources.py | save_instance | lsmiley/esstools-adminlte-3 | 2,020 | python | def save_instance(self, instance, using_transactions=True, dry_run=False):
'\n Takes care of saving the object to the database.\n\n Objects can be created in bulk if ``use_bulk`` is enabled.\n '
self.before_save_instance(instance, using_transactions, dry_run)
if self._meta.use_bulk:
... | def save_instance(self, instance, using_transactions=True, dry_run=False):
'\n Takes care of saving the object to the database.\n\n Objects can be created in bulk if ``use_bulk`` is enabled.\n '
self.before_save_instance(instance, using_transactions, dry_run)
if self._meta.use_bulk:
... |
fa6f6abad8b07d8ced24a4dd74a9c507fb0366bf0a88ed12a681226a3dfe2206 | def before_save_instance(self, instance, using_transactions, dry_run):
'\n Override to add additional logic. Does nothing by default.\n '
pass | Override to add additional logic. Does nothing by default. | venv/Lib/site-packages/import_export/resources.py | before_save_instance | lsmiley/esstools-adminlte-3 | 2,020 | python | def before_save_instance(self, instance, using_transactions, dry_run):
'\n \n '
pass | def before_save_instance(self, instance, using_transactions, dry_run):
'\n \n '
pass<|docstring|>Override to add additional logic. Does nothing by default.<|endoftext|> |
ad3620418450591382a89645d95a47da2341f9bacfc3bd889974fe8b234cc0bf | def after_save_instance(self, instance, using_transactions, dry_run):
'\n Override to add additional logic. Does nothing by default.\n '
pass | Override to add additional logic. Does nothing by default. | venv/Lib/site-packages/import_export/resources.py | after_save_instance | lsmiley/esstools-adminlte-3 | 2,020 | python | def after_save_instance(self, instance, using_transactions, dry_run):
'\n \n '
pass | def after_save_instance(self, instance, using_transactions, dry_run):
'\n \n '
pass<|docstring|>Override to add additional logic. Does nothing by default.<|endoftext|> |
6de8e6cfc8ad25711b15fa6f1347c671864c49ae4aabd19232eb1757dfc55e9d | def delete_instance(self, instance, using_transactions=True, dry_run=False):
'\n Calls :meth:`instance.delete` as long as ``dry_run`` is not set.\n If ``use_bulk`` then instances are appended to a list for bulk import.\n '
self.before_delete_instance(instance, dry_run)
if self._meta.use... | Calls :meth:`instance.delete` as long as ``dry_run`` is not set.
If ``use_bulk`` then instances are appended to a list for bulk import. | venv/Lib/site-packages/import_export/resources.py | delete_instance | lsmiley/esstools-adminlte-3 | 2,020 | python | def delete_instance(self, instance, using_transactions=True, dry_run=False):
'\n Calls :meth:`instance.delete` as long as ``dry_run`` is not set.\n If ``use_bulk`` then instances are appended to a list for bulk import.\n '
self.before_delete_instance(instance, dry_run)
if self._meta.use... | def delete_instance(self, instance, using_transactions=True, dry_run=False):
'\n Calls :meth:`instance.delete` as long as ``dry_run`` is not set.\n If ``use_bulk`` then instances are appended to a list for bulk import.\n '
self.before_delete_instance(instance, dry_run)
if self._meta.use... |
e6ec12ee928643bc0fb28aa050148966cb3980e5b7b3fb700435134cee7b4684 | def before_delete_instance(self, instance, dry_run):
'\n Override to add additional logic. Does nothing by default.\n '
pass | Override to add additional logic. Does nothing by default. | venv/Lib/site-packages/import_export/resources.py | before_delete_instance | lsmiley/esstools-adminlte-3 | 2,020 | python | def before_delete_instance(self, instance, dry_run):
'\n \n '
pass | def before_delete_instance(self, instance, dry_run):
'\n \n '
pass<|docstring|>Override to add additional logic. Does nothing by default.<|endoftext|> |
4febdf06b86944f6e6ede36892d555bfa1f987223f854ae72a12f102500d1f44 | def after_delete_instance(self, instance, dry_run):
'\n Override to add additional logic. Does nothing by default.\n '
pass | Override to add additional logic. Does nothing by default. | venv/Lib/site-packages/import_export/resources.py | after_delete_instance | lsmiley/esstools-adminlte-3 | 2,020 | python | def after_delete_instance(self, instance, dry_run):
'\n \n '
pass | def after_delete_instance(self, instance, dry_run):
'\n \n '
pass<|docstring|>Override to add additional logic. Does nothing by default.<|endoftext|> |
24cf0ea0dca765ee513f66998c6ec18fbdc49b92aed1509d26ead13d2e96e05b | def import_field(self, field, obj, data, is_m2m=False, **kwargs):
'\n Calls :meth:`import_export.fields.Field.save` if ``Field.attribute``\n is specified, and ``Field.column_name`` is found in ``data``.\n '
if (field.attribute and (field.column_name in data)):
field.save(obj, data, ... | Calls :meth:`import_export.fields.Field.save` if ``Field.attribute``
is specified, and ``Field.column_name`` is found in ``data``. | venv/Lib/site-packages/import_export/resources.py | import_field | lsmiley/esstools-adminlte-3 | 2,020 | python | def import_field(self, field, obj, data, is_m2m=False, **kwargs):
'\n Calls :meth:`import_export.fields.Field.save` if ``Field.attribute``\n is specified, and ``Field.column_name`` is found in ``data``.\n '
if (field.attribute and (field.column_name in data)):
field.save(obj, data, ... | def import_field(self, field, obj, data, is_m2m=False, **kwargs):
'\n Calls :meth:`import_export.fields.Field.save` if ``Field.attribute``\n is specified, and ``Field.column_name`` is found in ``data``.\n '
if (field.attribute and (field.column_name in data)):
field.save(obj, data, ... |
6711c88222fb4ae46a30808d2a961b1836e2f34313af30b9a7b299317ba593b7 | def import_obj(self, obj, data, dry_run, **kwargs):
'\n Traverses every field in this Resource and calls\n :meth:`~import_export.resources.Resource.import_field`. If\n ``import_field()`` results in a ``ValueError`` being raised for\n one of more fields, those errors are captured and rera... | Traverses every field in this Resource and calls
:meth:`~import_export.resources.Resource.import_field`. If
``import_field()`` results in a ``ValueError`` being raised for
one of more fields, those errors are captured and reraised as a single,
multi-field ValidationError. | venv/Lib/site-packages/import_export/resources.py | import_obj | lsmiley/esstools-adminlte-3 | 2,020 | python | def import_obj(self, obj, data, dry_run, **kwargs):
'\n Traverses every field in this Resource and calls\n :meth:`~import_export.resources.Resource.import_field`. If\n ``import_field()`` results in a ``ValueError`` being raised for\n one of more fields, those errors are captured and rera... | def import_obj(self, obj, data, dry_run, **kwargs):
'\n Traverses every field in this Resource and calls\n :meth:`~import_export.resources.Resource.import_field`. If\n ``import_field()`` results in a ``ValueError`` being raised for\n one of more fields, those errors are captured and rera... |
cbfb09a0e3998b655edadd0a57d139e418702c947baf6a0a45e134a3333b2de7 | def save_m2m(self, obj, data, using_transactions, dry_run):
'\n Saves m2m fields.\n\n Model instance need to have a primary key value before\n a many-to-many relationship can be used.\n '
if (((not using_transactions) and dry_run) or self._meta.use_bulk):
pass
else:
... | Saves m2m fields.
Model instance need to have a primary key value before
a many-to-many relationship can be used. | venv/Lib/site-packages/import_export/resources.py | save_m2m | lsmiley/esstools-adminlte-3 | 2,020 | python | def save_m2m(self, obj, data, using_transactions, dry_run):
'\n Saves m2m fields.\n\n Model instance need to have a primary key value before\n a many-to-many relationship can be used.\n '
if (((not using_transactions) and dry_run) or self._meta.use_bulk):
pass
else:
... | def save_m2m(self, obj, data, using_transactions, dry_run):
'\n Saves m2m fields.\n\n Model instance need to have a primary key value before\n a many-to-many relationship can be used.\n '
if (((not using_transactions) and dry_run) or self._meta.use_bulk):
pass
else:
... |
b1f50569f5b1f76dbd5a9acdd964aca0d6a15613e983206d217f29ae66f287fc | def for_delete(self, row, instance):
'\n Returns ``True`` if ``row`` importing should delete instance.\n\n Default implementation returns ``False``.\n Override this method to handle deletion.\n '
return False | Returns ``True`` if ``row`` importing should delete instance.
Default implementation returns ``False``.
Override this method to handle deletion. | venv/Lib/site-packages/import_export/resources.py | for_delete | lsmiley/esstools-adminlte-3 | 2,020 | python | def for_delete(self, row, instance):
'\n Returns ``True`` if ``row`` importing should delete instance.\n\n Default implementation returns ``False``.\n Override this method to handle deletion.\n '
return False | def for_delete(self, row, instance):
'\n Returns ``True`` if ``row`` importing should delete instance.\n\n Default implementation returns ``False``.\n Override this method to handle deletion.\n '
return False<|docstring|>Returns ``True`` if ``row`` importing should delete instance.
... |
6a0093d9c8c33919e7a143ea60b1f340ca0daa96507a2196c7d68090b4b9ac0c | def skip_row(self, instance, original):
'\n Returns ``True`` if ``row`` importing should be skipped.\n\n Default implementation returns ``False`` unless skip_unchanged == True\n and skip_diff == False.\n\n If skip_diff is True, then no comparisons can be made because ``original``\n ... | Returns ``True`` if ``row`` importing should be skipped.
Default implementation returns ``False`` unless skip_unchanged == True
and skip_diff == False.
If skip_diff is True, then no comparisons can be made because ``original``
will be None.
When left unspecified, skip_diff and skip_unchanged both default to ``False`... | venv/Lib/site-packages/import_export/resources.py | skip_row | lsmiley/esstools-adminlte-3 | 2,020 | python | def skip_row(self, instance, original):
'\n Returns ``True`` if ``row`` importing should be skipped.\n\n Default implementation returns ``False`` unless skip_unchanged == True\n and skip_diff == False.\n\n If skip_diff is True, then no comparisons can be made because ``original``\n ... | def skip_row(self, instance, original):
'\n Returns ``True`` if ``row`` importing should be skipped.\n\n Default implementation returns ``False`` unless skip_unchanged == True\n and skip_diff == False.\n\n If skip_diff is True, then no comparisons can be made because ``original``\n ... |
242f0e32b16a53d30896140aa3c913de8908c8b675f8b47e50ef80438ab5cda8 | def get_diff_headers(self):
'\n Diff representation headers.\n '
return self.get_user_visible_headers() | Diff representation headers. | venv/Lib/site-packages/import_export/resources.py | get_diff_headers | lsmiley/esstools-adminlte-3 | 2,020 | python | def get_diff_headers(self):
'\n \n '
return self.get_user_visible_headers() | def get_diff_headers(self):
'\n \n '
return self.get_user_visible_headers()<|docstring|>Diff representation headers.<|endoftext|> |
091015618c64306b4facc84aa4e1e13951015dcdce73f6ea6bbe0293655fdd0d | def before_import(self, dataset, using_transactions, dry_run, **kwargs):
'\n Override to add additional logic. Does nothing by default.\n '
pass | Override to add additional logic. Does nothing by default. | venv/Lib/site-packages/import_export/resources.py | before_import | lsmiley/esstools-adminlte-3 | 2,020 | python | def before_import(self, dataset, using_transactions, dry_run, **kwargs):
'\n \n '
pass | def before_import(self, dataset, using_transactions, dry_run, **kwargs):
'\n \n '
pass<|docstring|>Override to add additional logic. Does nothing by default.<|endoftext|> |
be55d2b2ef7942395fb0cff4153fe2a2550d4b0130a1d6e8978ff6ecd00867bc | def after_import(self, dataset, result, using_transactions, dry_run, **kwargs):
'\n Override to add additional logic. Does nothing by default.\n '
pass | Override to add additional logic. Does nothing by default. | venv/Lib/site-packages/import_export/resources.py | after_import | lsmiley/esstools-adminlte-3 | 2,020 | python | def after_import(self, dataset, result, using_transactions, dry_run, **kwargs):
'\n \n '
pass | def after_import(self, dataset, result, using_transactions, dry_run, **kwargs):
'\n \n '
pass<|docstring|>Override to add additional logic. Does nothing by default.<|endoftext|> |
49031512302eeebd74b195cf0646a6a8ba7cb1648efec856704cc41c0341bc23 | def before_import_row(self, row, row_number=None, **kwargs):
'\n Override to add additional logic. Does nothing by default.\n '
pass | Override to add additional logic. Does nothing by default. | venv/Lib/site-packages/import_export/resources.py | before_import_row | lsmiley/esstools-adminlte-3 | 2,020 | python | def before_import_row(self, row, row_number=None, **kwargs):
'\n \n '
pass | def before_import_row(self, row, row_number=None, **kwargs):
'\n \n '
pass<|docstring|>Override to add additional logic. Does nothing by default.<|endoftext|> |
b354614cc7995b96cc07d60df83ba89a50600859f82f93af92737b90d757aad2 | def after_import_row(self, row, row_result, row_number=None, **kwargs):
'\n Override to add additional logic. Does nothing by default.\n '
pass | Override to add additional logic. Does nothing by default. | venv/Lib/site-packages/import_export/resources.py | after_import_row | lsmiley/esstools-adminlte-3 | 2,020 | python | def after_import_row(self, row, row_result, row_number=None, **kwargs):
'\n \n '
pass | def after_import_row(self, row, row_result, row_number=None, **kwargs):
'\n \n '
pass<|docstring|>Override to add additional logic. Does nothing by default.<|endoftext|> |
e8fe1ffe303f0f7dea181520a588d1a4b88e0ded5a2e4336be78db3242217cbd | def after_import_instance(self, instance, new, row_number=None, **kwargs):
'\n Override to add additional logic. Does nothing by default.\n '
pass | Override to add additional logic. Does nothing by default. | venv/Lib/site-packages/import_export/resources.py | after_import_instance | lsmiley/esstools-adminlte-3 | 2,020 | python | def after_import_instance(self, instance, new, row_number=None, **kwargs):
'\n \n '
pass | def after_import_instance(self, instance, new, row_number=None, **kwargs):
'\n \n '
pass<|docstring|>Override to add additional logic. Does nothing by default.<|endoftext|> |
1508c80c9e2b5af44f95f2cac89b416c6b8c8193d7e16b7b76eb7e81782589d0 | def import_row(self, row, instance_loader, using_transactions=True, dry_run=False, raise_errors=False, **kwargs):
'\n Imports data from ``tablib.Dataset``. Refer to :doc:`import_workflow`\n for a more complete description of the whole import process.\n\n :param row: A ``dict`` of the row to imp... | Imports data from ``tablib.Dataset``. Refer to :doc:`import_workflow`
for a more complete description of the whole import process.
:param row: A ``dict`` of the row to import
:param instance_loader: The instance loader to be used to load the row
:param using_transactions: If ``using_transactions`` is set, a transact... | venv/Lib/site-packages/import_export/resources.py | import_row | lsmiley/esstools-adminlte-3 | 2,020 | python | def import_row(self, row, instance_loader, using_transactions=True, dry_run=False, raise_errors=False, **kwargs):
'\n Imports data from ``tablib.Dataset``. Refer to :doc:`import_workflow`\n for a more complete description of the whole import process.\n\n :param row: A ``dict`` of the row to imp... | def import_row(self, row, instance_loader, using_transactions=True, dry_run=False, raise_errors=False, **kwargs):
'\n Imports data from ``tablib.Dataset``. Refer to :doc:`import_workflow`\n for a more complete description of the whole import process.\n\n :param row: A ``dict`` of the row to imp... |
2cff108e9869a3fefd16a4cb21fcd9d5669fc4c661e9c290d68f3a9f0edae7cb | def import_data(self, dataset, dry_run=False, raise_errors=False, use_transactions=None, collect_failed_rows=False, rollback_on_validation_errors=False, **kwargs):
'\n Imports data from ``tablib.Dataset``. Refer to :doc:`import_workflow`\n for a more complete description of the whole import process.\n... | Imports data from ``tablib.Dataset``. Refer to :doc:`import_workflow`
for a more complete description of the whole import process.
:param dataset: A ``tablib.Dataset``
:param raise_errors: Whether errors should be printed to the end user
or raised regularly.
:param use_transactions: If ``True`` the import proces... | venv/Lib/site-packages/import_export/resources.py | import_data | lsmiley/esstools-adminlte-3 | 2,020 | python | def import_data(self, dataset, dry_run=False, raise_errors=False, use_transactions=None, collect_failed_rows=False, rollback_on_validation_errors=False, **kwargs):
'\n Imports data from ``tablib.Dataset``. Refer to :doc:`import_workflow`\n for a more complete description of the whole import process.\n... | def import_data(self, dataset, dry_run=False, raise_errors=False, use_transactions=None, collect_failed_rows=False, rollback_on_validation_errors=False, **kwargs):
'\n Imports data from ``tablib.Dataset``. Refer to :doc:`import_workflow`\n for a more complete description of the whole import process.\n... |
3dc2732944a74edefcc719a02b4d8f2edd23c697524ebf384eba43bace02ae7e | def before_export(self, queryset, *args, **kwargs):
'\n Override to add additional logic. Does nothing by default.\n '
pass | Override to add additional logic. Does nothing by default. | venv/Lib/site-packages/import_export/resources.py | before_export | lsmiley/esstools-adminlte-3 | 2,020 | python | def before_export(self, queryset, *args, **kwargs):
'\n \n '
pass | def before_export(self, queryset, *args, **kwargs):
'\n \n '
pass<|docstring|>Override to add additional logic. Does nothing by default.<|endoftext|> |
26f1a3f4ecf5e73a0393fda82f8473940de20a690e759e519625aa3a49af4b84 | def after_export(self, queryset, data, *args, **kwargs):
'\n Override to add additional logic. Does nothing by default.\n '
pass | Override to add additional logic. Does nothing by default. | venv/Lib/site-packages/import_export/resources.py | after_export | lsmiley/esstools-adminlte-3 | 2,020 | python | def after_export(self, queryset, data, *args, **kwargs):
'\n \n '
pass | def after_export(self, queryset, data, *args, **kwargs):
'\n \n '
pass<|docstring|>Override to add additional logic. Does nothing by default.<|endoftext|> |
5f3a3b8d415e99e39b86628146727e6f1bc0ac00f6622e2905e53e6b5ccf6ef3 | def export(self, queryset=None, *args, **kwargs):
'\n Exports a resource.\n '
self.before_export(queryset, *args, **kwargs)
if (queryset is None):
queryset = self.get_queryset()
headers = self.get_export_headers()
data = tablib.Dataset(headers=headers)
for obj in self.iter_... | Exports a resource. | venv/Lib/site-packages/import_export/resources.py | export | lsmiley/esstools-adminlte-3 | 2,020 | python | def export(self, queryset=None, *args, **kwargs):
'\n \n '
self.before_export(queryset, *args, **kwargs)
if (queryset is None):
queryset = self.get_queryset()
headers = self.get_export_headers()
data = tablib.Dataset(headers=headers)
for obj in self.iter_queryset(queryset):... | def export(self, queryset=None, *args, **kwargs):
'\n \n '
self.before_export(queryset, *args, **kwargs)
if (queryset is None):
queryset = self.get_queryset()
headers = self.get_export_headers()
data = tablib.Dataset(headers=headers)
for obj in self.iter_queryset(queryset):... |
112642f8d82bf3bab7397ef23cf2f5c136b703b6f2cf66e930e9a3b492418e99 | @classmethod
def get_m2m_widget(cls, field):
'\n Prepare widget for m2m field\n '
return functools.partial(widgets.ManyToManyWidget, model=get_related_model(field)) | Prepare widget for m2m field | venv/Lib/site-packages/import_export/resources.py | get_m2m_widget | lsmiley/esstools-adminlte-3 | 2,020 | python | @classmethod
def get_m2m_widget(cls, field):
'\n \n '
return functools.partial(widgets.ManyToManyWidget, model=get_related_model(field)) | @classmethod
def get_m2m_widget(cls, field):
'\n \n '
return functools.partial(widgets.ManyToManyWidget, model=get_related_model(field))<|docstring|>Prepare widget for m2m field<|endoftext|> |
0aa609698324eb20799bbd5ddaed8889ab7e001b8ab3cbc6c14962f8af26b22c | @classmethod
def get_fk_widget(cls, field):
'\n Prepare widget for fk and o2o fields\n '
return functools.partial(widgets.ForeignKeyWidget, model=get_related_model(field)) | Prepare widget for fk and o2o fields | venv/Lib/site-packages/import_export/resources.py | get_fk_widget | lsmiley/esstools-adminlte-3 | 2,020 | python | @classmethod
def get_fk_widget(cls, field):
'\n \n '
return functools.partial(widgets.ForeignKeyWidget, model=get_related_model(field)) | @classmethod
def get_fk_widget(cls, field):
'\n \n '
return functools.partial(widgets.ForeignKeyWidget, model=get_related_model(field))<|docstring|>Prepare widget for fk and o2o fields<|endoftext|> |
d7af0ac0c3c9ca86e05e06d0db316c3b6476681f5ddfe1ce605d46e137141a90 | @classmethod
def widget_from_django_field(cls, f, default=widgets.Widget):
'\n Returns the widget that would likely be associated with each\n Django type.\n\n Includes mapping of Postgres Array and JSON fields. In the case that\n psycopg2 is not installed, we consume the error and proces... | Returns the widget that would likely be associated with each
Django type.
Includes mapping of Postgres Array and JSON fields. In the case that
psycopg2 is not installed, we consume the error and process the field
regardless. | venv/Lib/site-packages/import_export/resources.py | widget_from_django_field | lsmiley/esstools-adminlte-3 | 2,020 | python | @classmethod
def widget_from_django_field(cls, f, default=widgets.Widget):
'\n Returns the widget that would likely be associated with each\n Django type.\n\n Includes mapping of Postgres Array and JSON fields. In the case that\n psycopg2 is not installed, we consume the error and proces... | @classmethod
def widget_from_django_field(cls, f, default=widgets.Widget):
'\n Returns the widget that would likely be associated with each\n Django type.\n\n Includes mapping of Postgres Array and JSON fields. In the case that\n psycopg2 is not installed, we consume the error and proces... |
28f3f83e108d18d7bea66f299c7da6ef9cdca90006ff9ed2c77137d3a93a1a66 | @classmethod
def widget_kwargs_for_field(self, field_name):
'\n Returns widget kwargs for given field_name.\n '
if self._meta.widgets:
return self._meta.widgets.get(field_name, {})
return {} | Returns widget kwargs for given field_name. | venv/Lib/site-packages/import_export/resources.py | widget_kwargs_for_field | lsmiley/esstools-adminlte-3 | 2,020 | python | @classmethod
def widget_kwargs_for_field(self, field_name):
'\n \n '
if self._meta.widgets:
return self._meta.widgets.get(field_name, {})
return {} | @classmethod
def widget_kwargs_for_field(self, field_name):
'\n \n '
if self._meta.widgets:
return self._meta.widgets.get(field_name, {})
return {}<|docstring|>Returns widget kwargs for given field_name.<|endoftext|> |
1908e904dcbfa5dcfa04cf44eb784a3f4de4e7388dc96cdf61a5bcec4ce58a81 | @classmethod
def field_from_django_field(cls, field_name, django_field, readonly):
'\n Returns a Resource Field instance for the given Django model field.\n '
FieldWidget = cls.widget_from_django_field(django_field)
widget_kwargs = cls.widget_kwargs_for_field(field_name)
field = cls.DEFAUL... | Returns a Resource Field instance for the given Django model field. | venv/Lib/site-packages/import_export/resources.py | field_from_django_field | lsmiley/esstools-adminlte-3 | 2,020 | python | @classmethod
def field_from_django_field(cls, field_name, django_field, readonly):
'\n \n '
FieldWidget = cls.widget_from_django_field(django_field)
widget_kwargs = cls.widget_kwargs_for_field(field_name)
field = cls.DEFAULT_RESOURCE_FIELD(attribute=field_name, column_name=field_name, widg... | @classmethod
def field_from_django_field(cls, field_name, django_field, readonly):
'\n \n '
FieldWidget = cls.widget_from_django_field(django_field)
widget_kwargs = cls.widget_kwargs_for_field(field_name)
field = cls.DEFAULT_RESOURCE_FIELD(attribute=field_name, column_name=field_name, widg... |
dfb406434574d1dfe442a74e5f54a2742161adc0e66bfe75b492c0ab74007fe1 | def get_queryset(self):
'\n Returns a queryset of all objects for this model. Override this if you\n want to limit the returned queryset.\n '
return self._meta.model.objects.all() | Returns a queryset of all objects for this model. Override this if you
want to limit the returned queryset. | venv/Lib/site-packages/import_export/resources.py | get_queryset | lsmiley/esstools-adminlte-3 | 2,020 | python | def get_queryset(self):
'\n Returns a queryset of all objects for this model. Override this if you\n want to limit the returned queryset.\n '
return self._meta.model.objects.all() | def get_queryset(self):
'\n Returns a queryset of all objects for this model. Override this if you\n want to limit the returned queryset.\n '
return self._meta.model.objects.all()<|docstring|>Returns a queryset of all objects for this model. Override this if you
want to limit the returned q... |
7aa11049dfbced592f2aafefe81ad756516b33316a7a80ba1cd54ab6a930750b | def init_instance(self, row=None):
'\n Initializes a new Django model.\n '
return self._meta.model() | Initializes a new Django model. | venv/Lib/site-packages/import_export/resources.py | init_instance | lsmiley/esstools-adminlte-3 | 2,020 | python | def init_instance(self, row=None):
'\n \n '
return self._meta.model() | def init_instance(self, row=None):
'\n \n '
return self._meta.model()<|docstring|>Initializes a new Django model.<|endoftext|> |
f133bcd6b570fb71bc77f8009f3c0f4b4d0ffa74255fd2c6b65a3d951ca2927b | def after_import(self, dataset, result, using_transactions, dry_run, **kwargs):
'\n Reset the SQL sequences after new objects are imported\n '
if ((not dry_run) and any(((r.import_type == RowResult.IMPORT_TYPE_NEW) for r in result.rows))):
db_connection = self.get_db_connection_name()
... | Reset the SQL sequences after new objects are imported | venv/Lib/site-packages/import_export/resources.py | after_import | lsmiley/esstools-adminlte-3 | 2,020 | python | def after_import(self, dataset, result, using_transactions, dry_run, **kwargs):
'\n \n '
if ((not dry_run) and any(((r.import_type == RowResult.IMPORT_TYPE_NEW) for r in result.rows))):
db_connection = self.get_db_connection_name()
connection = connections[db_connection]
se... | def after_import(self, dataset, result, using_transactions, dry_run, **kwargs):
'\n \n '
if ((not dry_run) and any(((r.import_type == RowResult.IMPORT_TYPE_NEW) for r in result.rows))):
db_connection = self.get_db_connection_name()
connection = connections[db_connection]
se... |
38d8f6d3cdb722fa2366f44171f6e47f1b6348a3b99703505ed2749f8b33e45c | def get_model(name, **kwargs):
'\n Get supported model.\n\n Parameters:\n ----------\n name : str\n Name of model.\n\n Returns\n -------\n Chain\n Resulted model.\n '
name = name.lower()
if (name not in _models):
raise ValueError('Unsupported model: {}'.format(n... | Get supported model.
Parameters:
----------
name : str
Name of model.
Returns
-------
Chain
Resulted model. | chainer_/chainercv2/model_provider.py | get_model | tucan9389/imgclsmob | 1 | python | def get_model(name, **kwargs):
'\n Get supported model.\n\n Parameters:\n ----------\n name : str\n Name of model.\n\n Returns\n -------\n Chain\n Resulted model.\n '
name = name.lower()
if (name not in _models):
raise ValueError('Unsupported model: {}'.format(n... | def get_model(name, **kwargs):
'\n Get supported model.\n\n Parameters:\n ----------\n name : str\n Name of model.\n\n Returns\n -------\n Chain\n Resulted model.\n '
name = name.lower()
if (name not in _models):
raise ValueError('Unsupported model: {}'.format(n... |
ff197849af9bff3e77c539c1f80606050ead9766383940ebdbe723b8713de354 | def mean_normalization(x):
'\n This script is to do mean normalization for DataFrame\n \n Parameter:\n x: format: DataFrame\n rows:feature \n columns:samples\n \n Returns:\n output:DataFrame; after mean normalization.\n rows:feature \n columns:samples\n '
... | This script is to do mean normalization for DataFrame
Parameter:
x: format: DataFrame
rows:feature
columns:samples
Returns:
output:DataFrame; after mean normalization.
rows:feature
columns:samples | static/Normalization.py | mean_normalization | yujijun/Higlass | 0 | python | def mean_normalization(x):
'\n This script is to do mean normalization for DataFrame\n \n Parameter:\n x: format: DataFrame\n rows:feature \n columns:samples\n \n Returns:\n output:DataFrame; after mean normalization.\n rows:feature \n columns:samples\n '
... | def mean_normalization(x):
'\n This script is to do mean normalization for DataFrame\n \n Parameter:\n x: format: DataFrame\n rows:feature \n columns:samples\n \n Returns:\n output:DataFrame; after mean normalization.\n rows:feature \n columns:samples\n '
... |
f969ac121c4906fa4a7421baecf068151e0c63d950269b3cfccc7276dcb998a9 | def quantilenormalize(df_input):
'\n This script is to do quantile normalization for DataFrame.\n \n Parameter:\n x: format: DataFrame\n rows:feature \n columns:samples\n \n Returns:\n output:DataFrame; after quantile normalization.\n rows:feature \n columns:... | This script is to do quantile normalization for DataFrame.
Parameter:
x: format: DataFrame
rows:feature
columns:samples
Returns:
output:DataFrame; after quantile normalization.
rows:feature
columns:samples | static/Normalization.py | quantilenormalize | yujijun/Higlass | 0 | python | def quantilenormalize(df_input):
'\n This script is to do quantile normalization for DataFrame.\n \n Parameter:\n x: format: DataFrame\n rows:feature \n columns:samples\n \n Returns:\n output:DataFrame; after quantile normalization.\n rows:feature \n columns:... | def quantilenormalize(df_input):
'\n This script is to do quantile normalization for DataFrame.\n \n Parameter:\n x: format: DataFrame\n rows:feature \n columns:samples\n \n Returns:\n output:DataFrame; after quantile normalization.\n rows:feature \n columns:... |
470c704f63a561da990d087ce8f26e4bb1bdf956ee1b4d713ea3704e8292429c | def get_queryset(self):
'\n Filter by user\n '
return self.queryset.filter(user=self.request.user) | Filter by user | app/bookmarks/views.py | get_queryset | DOSSIER-dev/DOSSIER-Sources | 7 | python | def get_queryset(self):
'\n \n '
return self.queryset.filter(user=self.request.user) | def get_queryset(self):
'\n \n '
return self.queryset.filter(user=self.request.user)<|docstring|>Filter by user<|endoftext|> |
c3a3c2f3c203fe186128eb7bd4b31b2062c6db6a21a3155b3e787b379f944139 | def destroy(self, request, *args, **kwargs):
' Override destroy. Key is actually the Source ID, *not* the\n bookmark id '
pk = kwargs['pk']
instance = self.get_queryset().get(source_id=pk)
self.perform_destroy(instance)
return Response(status=status.HTTP_204_NO_CONTENT) | Override destroy. Key is actually the Source ID, *not* the
bookmark id | app/bookmarks/views.py | destroy | DOSSIER-dev/DOSSIER-Sources | 7 | python | def destroy(self, request, *args, **kwargs):
' Override destroy. Key is actually the Source ID, *not* the\n bookmark id '
pk = kwargs['pk']
instance = self.get_queryset().get(source_id=pk)
self.perform_destroy(instance)
return Response(status=status.HTTP_204_NO_CONTENT) | def destroy(self, request, *args, **kwargs):
' Override destroy. Key is actually the Source ID, *not* the\n bookmark id '
pk = kwargs['pk']
instance = self.get_queryset().get(source_id=pk)
self.perform_destroy(instance)
return Response(status=status.HTTP_204_NO_CONTENT)<|docstring|>Override d... |
99204685332ef16d9eabfb8ea39a820a5837802d4ad41d03f2bd1ea6b4cc08b2 | def perform_create(self, serializer):
'\n Set current user.\n '
serializer.validated_data['user'] = self.request.user
try:
source = Source.objects.get(id=serializer.validated_data['source_id'], organisation=self.request.organisation)
except Source.DoesNotExist:
raise Http40... | Set current user. | app/bookmarks/views.py | perform_create | DOSSIER-dev/DOSSIER-Sources | 7 | python | def perform_create(self, serializer):
'\n \n '
serializer.validated_data['user'] = self.request.user
try:
source = Source.objects.get(id=serializer.validated_data['source_id'], organisation=self.request.organisation)
except Source.DoesNotExist:
raise Http404
serializer.... | def perform_create(self, serializer):
'\n \n '
serializer.validated_data['user'] = self.request.user
try:
source = Source.objects.get(id=serializer.validated_data['source_id'], organisation=self.request.organisation)
except Source.DoesNotExist:
raise Http404
serializer.... |
3652599c58eaea3ebe302b36c6005ee49ad93909f8db9f1b78d3db6b0f0b2e01 | def create_connection_pool(self, postgres_config: PostgresConfig) -> SimpleConnectionPool:
'Create Simple Postgres Connection Pool\n https://pynative.com/psycopg2-python-postgresql-connection-pooling/#h-simpleconnectionpool\n\n Args:\n postgres_config (PostgresConfig): Postgres configuratio... | Create Simple Postgres Connection Pool
https://pynative.com/psycopg2-python-postgresql-connection-pooling/#h-simpleconnectionpool
Args:
postgres_config (PostgresConfig): Postgres configurations
Returns:
SimpleConnectionPool: Postgres connection pool | site_checker/clients/postgres_client.py | create_connection_pool | rodrigodelmonte/site_checker | 0 | python | def create_connection_pool(self, postgres_config: PostgresConfig) -> SimpleConnectionPool:
'Create Simple Postgres Connection Pool\n https://pynative.com/psycopg2-python-postgresql-connection-pooling/#h-simpleconnectionpool\n\n Args:\n postgres_config (PostgresConfig): Postgres configuratio... | def create_connection_pool(self, postgres_config: PostgresConfig) -> SimpleConnectionPool:
'Create Simple Postgres Connection Pool\n https://pynative.com/psycopg2-python-postgresql-connection-pooling/#h-simpleconnectionpool\n\n Args:\n postgres_config (PostgresConfig): Postgres configuratio... |
1eb8d1138f75a4008b73f4e6b7a55b6f08809be325aca88e24b4a80de547ac9f | def _execute_query(self, connection, query) -> None:
'Execute query provided using the database connection provided'
connection.autocommit = True
cursor = connection.cursor()
try:
cursor.execute(query)
self.logger.debug(f'Query executed: {query}')
except (Exception, DatabaseError) as... | Execute query provided using the database connection provided | site_checker/clients/postgres_client.py | _execute_query | rodrigodelmonte/site_checker | 0 | python | def _execute_query(self, connection, query) -> None:
connection.autocommit = True
cursor = connection.cursor()
try:
cursor.execute(query)
self.logger.debug(f'Query executed: {query}')
except (Exception, DatabaseError) as e:
self.logger.exception(f'Error running the query: {q... | def _execute_query(self, connection, query) -> None:
connection.autocommit = True
cursor = connection.cursor()
try:
cursor.execute(query)
self.logger.debug(f'Query executed: {query}')
except (Exception, DatabaseError) as e:
self.logger.exception(f'Error running the query: {q... |
bd90adb2dd53952f634155f3dab9dde0c26c5563cfaaf5d65c4c647cdac1f4ca | def insert(self, connection, website_metrics: WebsiteMetrics) -> None:
'Insert template statement for website metrics'
insert_statement = f'''
INSERT INTO
site_checker.{website_metrics.name}
(url, regex, has_regex, status_code, response_time, ocurred_at)
VALUES (
... | Insert template statement for website metrics | site_checker/clients/postgres_client.py | insert | rodrigodelmonte/site_checker | 0 | python | def insert(self, connection, website_metrics: WebsiteMetrics) -> None:
insert_statement = f'
INSERT INTO
site_checker.{website_metrics.name}
(url, regex, has_regex, status_code, response_time, ocurred_at)
VALUES (
'{website_metrics.url}',
'{websit... | def insert(self, connection, website_metrics: WebsiteMetrics) -> None:
insert_statement = f'
INSERT INTO
site_checker.{website_metrics.name}
(url, regex, has_regex, status_code, response_time, ocurred_at)
VALUES (
'{website_metrics.url}',
'{websit... |
1fa4852654c86402243da00b08a41c36aa9af97cd6b5ae2f5479a9622285b63a | def create_table(self, connection, topic_name: str) -> None:
'Create database table for the topic_name provided'
create_schema = f'CREATE SCHEMA IF NOT EXISTS site_checker'
create_table = f'''
CREATE TABLE IF NOT EXISTS site_checker.{topic_name} (
id SERIAL PRIMARY KEY,
... | Create database table for the topic_name provided | site_checker/clients/postgres_client.py | create_table | rodrigodelmonte/site_checker | 0 | python | def create_table(self, connection, topic_name: str) -> None:
create_schema = f'CREATE SCHEMA IF NOT EXISTS site_checker'
create_table = f'
CREATE TABLE IF NOT EXISTS site_checker.{topic_name} (
id SERIAL PRIMARY KEY,
url VARCHAR(1024),
regex VARCH... | def create_table(self, connection, topic_name: str) -> None:
create_schema = f'CREATE SCHEMA IF NOT EXISTS site_checker'
create_table = f'
CREATE TABLE IF NOT EXISTS site_checker.{topic_name} (
id SERIAL PRIMARY KEY,
url VARCHAR(1024),
regex VARCH... |
b79b6c77c80bf88add2e2a889778497ccb91e279fac137257846376147012f8f | def __init__(self):
'Initializes event data.'
super(SkyDriveLogEventData, self).__init__(data_type=self.DATA_TYPE)
self.detail = None
self.log_level = None
self.module = None
self.source_code = None | Initializes event data. | plaso/parsers/skydrivelog.py | __init__ | roshanmaskey/plaso | 1,253 | python | def __init__(self):
super(SkyDriveLogEventData, self).__init__(data_type=self.DATA_TYPE)
self.detail = None
self.log_level = None
self.module = None
self.source_code = None | def __init__(self):
super(SkyDriveLogEventData, self).__init__(data_type=self.DATA_TYPE)
self.detail = None
self.log_level = None
self.module = None
self.source_code = None<|docstring|>Initializes event data.<|endoftext|> |
c44a47ba8e8c8214788722e0795666efb8526c8171233a80c58fe843a82f2898 | def __init__(self):
'Initializes event data.'
super(SkyDriveOldLogEventData, self).__init__(data_type=self.DATA_TYPE)
self.log_level = None
self.source_code = None
self.text = None | Initializes event data. | plaso/parsers/skydrivelog.py | __init__ | roshanmaskey/plaso | 1,253 | python | def __init__(self):
super(SkyDriveOldLogEventData, self).__init__(data_type=self.DATA_TYPE)
self.log_level = None
self.source_code = None
self.text = None | def __init__(self):
super(SkyDriveOldLogEventData, self).__init__(data_type=self.DATA_TYPE)
self.log_level = None
self.source_code = None
self.text = None<|docstring|>Initializes event data.<|endoftext|> |
9e14c031daff37b94ec192319b3a1afc6b5e45dca166a3e8c9fe3e32d507ff88 | def _ParseHeader(self, parser_mediator, structure):
"Parse header lines and store appropriate attributes.\n\n ['Logging started.', 'Version=', '17.0.2011.0627',\n [2013, 7, 25], 16, 3, 23, 291, 'StartLocalTime', '<details>']\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between p... | Parse header lines and store appropriate attributes.
['Logging started.', 'Version=', '17.0.2011.0627',
[2013, 7, 25], 16, 3, 23, 291, 'StartLocalTime', '<details>']
Args:
parser_mediator (ParserMediator): mediates interactions between parsers
and other components, such as storage and dfvfs.
structure (pypa... | plaso/parsers/skydrivelog.py | _ParseHeader | roshanmaskey/plaso | 1,253 | python | def _ParseHeader(self, parser_mediator, structure):
"Parse header lines and store appropriate attributes.\n\n ['Logging started.', 'Version=', '17.0.2011.0627',\n [2013, 7, 25], 16, 3, 23, 291, 'StartLocalTime', '<details>']\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between p... | def _ParseHeader(self, parser_mediator, structure):
"Parse header lines and store appropriate attributes.\n\n ['Logging started.', 'Version=', '17.0.2011.0627',\n [2013, 7, 25], 16, 3, 23, 291, 'StartLocalTime', '<details>']\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between p... |
cad0fb074bc81433d15aa9bfabac895e184ddccd2673c5d13cc857274fee3dcf | def _ParseLine(self, parser_mediator, structure):
'Parses a logline and store appropriate attributes.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n structure (pyparsing.ParseResults): structure of tokens... | Parses a logline and store appropriate attributes.
Args:
parser_mediator (ParserMediator): mediates interactions between parsers
and other components, such as storage and dfvfs.
structure (pyparsing.ParseResults): structure of tokens derived from
a line of a text file. | plaso/parsers/skydrivelog.py | _ParseLine | roshanmaskey/plaso | 1,253 | python | def _ParseLine(self, parser_mediator, structure):
'Parses a logline and store appropriate attributes.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n structure (pyparsing.ParseResults): structure of tokens... | def _ParseLine(self, parser_mediator, structure):
'Parses a logline and store appropriate attributes.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n structure (pyparsing.ParseResults): structure of tokens... |
e6002db15abd017911466cbf48d053c0c3dddd1cc3581d125db9e300edc40aaf | def ParseRecord(self, parser_mediator, key, structure):
'Parse each record structure and return an EventObject if applicable.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n key (str): identifier of the st... | Parse each record structure and return an EventObject if applicable.
Args:
parser_mediator (ParserMediator): mediates interactions between parsers
and other components, such as storage and dfvfs.
key (str): identifier of the structure of tokens.
structure (pyparsing.ParseResults): structure of tokens deriv... | plaso/parsers/skydrivelog.py | ParseRecord | roshanmaskey/plaso | 1,253 | python | def ParseRecord(self, parser_mediator, key, structure):
'Parse each record structure and return an EventObject if applicable.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n key (str): identifier of the st... | def ParseRecord(self, parser_mediator, key, structure):
'Parse each record structure and return an EventObject if applicable.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n key (str): identifier of the st... |
92821c5dbf4c697b2eb85a0160da3259d51d5da37e4eef6919dfa55a6e6fef03 | def VerifyStructure(self, parser_mediator, lines):
'Verify that this file is a SkyDrive log file.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n lines (str): one or more lines from the text file.\n\n R... | Verify that this file is a SkyDrive log file.
Args:
parser_mediator (ParserMediator): mediates interactions between parsers
and other components, such as storage and dfvfs.
lines (str): one or more lines from the text file.
Returns:
bool: True if this is the correct parser, False otherwise. | plaso/parsers/skydrivelog.py | VerifyStructure | roshanmaskey/plaso | 1,253 | python | def VerifyStructure(self, parser_mediator, lines):
'Verify that this file is a SkyDrive log file.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n lines (str): one or more lines from the text file.\n\n R... | def VerifyStructure(self, parser_mediator, lines):
'Verify that this file is a SkyDrive log file.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n lines (str): one or more lines from the text file.\n\n R... |
5d20d858daa28daabcc489c4e210027b46f7e0aa0daeac7b68dbaea93465e701 | def __init__(self):
'Initializes a parser.'
super(SkyDriveOldLogParser, self).__init__()
self._last_date_time = None
self._last_event_data = None | Initializes a parser. | plaso/parsers/skydrivelog.py | __init__ | roshanmaskey/plaso | 1,253 | python | def __init__(self):
super(SkyDriveOldLogParser, self).__init__()
self._last_date_time = None
self._last_event_data = None | def __init__(self):
super(SkyDriveOldLogParser, self).__init__()
self._last_date_time = None
self._last_event_data = None<|docstring|>Initializes a parser.<|endoftext|> |
39c175b462fe07c6d91d3833b8089deedfcd6d320ff399dccd2456d41f75ba4a | def _ParseLogline(self, parser_mediator, structure):
'Parse a logline and store appropriate attributes.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n structure (pyparsing.ParseResults): structure of toke... | Parse a logline and store appropriate attributes.
Args:
parser_mediator (ParserMediator): mediates interactions between parsers
and other components, such as storage and dfvfs.
structure (pyparsing.ParseResults): structure of tokens derived from
a line of a text file. | plaso/parsers/skydrivelog.py | _ParseLogline | roshanmaskey/plaso | 1,253 | python | def _ParseLogline(self, parser_mediator, structure):
'Parse a logline and store appropriate attributes.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n structure (pyparsing.ParseResults): structure of toke... | def _ParseLogline(self, parser_mediator, structure):
'Parse a logline and store appropriate attributes.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n structure (pyparsing.ParseResults): structure of toke... |
f7874bdd3d490dad59e732fd58bff2f078981b4e0a2aeef7c4ce44d556518acf | def _ParseNoHeaderSingleLine(self, parser_mediator, structure):
'Parse an isolated header line and store appropriate attributes.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n structure (pyparsing.ParseRe... | Parse an isolated header line and store appropriate attributes.
Args:
parser_mediator (ParserMediator): mediates interactions between parsers
and other components, such as storage and dfvfs.
structure (pyparsing.ParseResults): structure of tokens derived from
a line of a text file. | plaso/parsers/skydrivelog.py | _ParseNoHeaderSingleLine | roshanmaskey/plaso | 1,253 | python | def _ParseNoHeaderSingleLine(self, parser_mediator, structure):
'Parse an isolated header line and store appropriate attributes.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n structure (pyparsing.ParseRe... | def _ParseNoHeaderSingleLine(self, parser_mediator, structure):
'Parse an isolated header line and store appropriate attributes.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n structure (pyparsing.ParseRe... |
e8a551eaf0a4da7be8f46249b9c70ab0d25f345a329de568627eecc3df7b38d5 | def ParseRecord(self, parser_mediator, key, structure):
'Parse each record structure and return an EventObject if applicable.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n key (str): identifier of the st... | Parse each record structure and return an EventObject if applicable.
Args:
parser_mediator (ParserMediator): mediates interactions between parsers
and other components, such as storage and dfvfs.
key (str): identifier of the structure of tokens.
structure (pyparsing.ParseResults): structure of tokens deriv... | plaso/parsers/skydrivelog.py | ParseRecord | roshanmaskey/plaso | 1,253 | python | def ParseRecord(self, parser_mediator, key, structure):
'Parse each record structure and return an EventObject if applicable.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n key (str): identifier of the st... | def ParseRecord(self, parser_mediator, key, structure):
'Parse each record structure and return an EventObject if applicable.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n key (str): identifier of the st... |
5aa3d6b9d43061740dc278cb8bc7de2e0a72e772c3208003e44ae8be38de6c87 | def VerifyStructure(self, parser_mediator, line):
'Verify that this file is a SkyDrive old log file.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n line (str): line from a text file.\n\n Returns:\n ... | Verify that this file is a SkyDrive old log file.
Args:
parser_mediator (ParserMediator): mediates interactions between parsers
and other components, such as storage and dfvfs.
line (str): line from a text file.
Returns:
bool: True if the line is in the expected format, False if not. | plaso/parsers/skydrivelog.py | VerifyStructure | roshanmaskey/plaso | 1,253 | python | def VerifyStructure(self, parser_mediator, line):
'Verify that this file is a SkyDrive old log file.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n line (str): line from a text file.\n\n Returns:\n ... | def VerifyStructure(self, parser_mediator, line):
'Verify that this file is a SkyDrive old log file.\n\n Args:\n parser_mediator (ParserMediator): mediates interactions between parsers\n and other components, such as storage and dfvfs.\n line (str): line from a text file.\n\n Returns:\n ... |
bf6816f1fc402212e186f870ce10c83f4f43c81cbdf00fe79250cd0db28a53b3 | def save_configuration_to_file(self, device, default_dir, file_name):
' Save current configuration to file on device\n '
try:
self.lib.save_configuration_to_file(device, default_dir, file_name)
except Exception as e:
self.failed('Saving the configuration failed', from_exception=e) | Save current configuration to file on device | pkgs/sdk-pkg/src/genie/libs/sdk/libs/abstracted_libs/restore.py | save_configuration_to_file | wilbeacham85/genielibs | 94 | python | def save_configuration_to_file(self, device, default_dir, file_name):
' \n '
try:
self.lib.save_configuration_to_file(device, default_dir, file_name)
except Exception as e:
self.failed('Saving the configuration failed', from_exception=e) | def save_configuration_to_file(self, device, default_dir, file_name):
' \n '
try:
self.lib.save_configuration_to_file(device, default_dir, file_name)
except Exception as e:
self.failed('Saving the configuration failed', from_exception=e)<|docstring|>Save current configuration to file ... |
2917a8855dacb0268a6fc042d4d19d74485a92582278526fcc194e187a49da57 | def add_credential(self, url, username, password):
'\n Check if this credential has already been added to the database, if not add it in.\n '
cur = self.conn.cursor()
cur.execute('SELECT * FROM credentials WHERE LOWER(username)=LOWER(?) AND password=?', [url, username, password])
results =... | Check if this credential has already been added to the database, if not add it in. | cme/protocols/http/database.py | add_credential | kmackinley/CrackMapExec | 12 | python | def add_credential(self, url, username, password):
'\n \n '
cur = self.conn.cursor()
cur.execute('SELECT * FROM credentials WHERE LOWER(username)=LOWER(?) AND password=?', [url, username, password])
results = cur.fetchall()
if (not len(results)):
cur.execute('INSERT INTO creden... | def add_credential(self, url, username, password):
'\n \n '
cur = self.conn.cursor()
cur.execute('SELECT * FROM credentials WHERE LOWER(username)=LOWER(?) AND password=?', [url, username, password])
results = cur.fetchall()
if (not len(results)):
cur.execute('INSERT INTO creden... |
6e33dee6f851250b48e3d7484edb4380ca5dbe0ebdde110594405b10f3853402 | def is_credential_valid(self, credentialID):
'\n Check if this credential ID is valid.\n '
cur = self.conn.cursor()
cur.execute('SELECT * FROM credentials WHERE id=? LIMIT 1', [credentialID])
results = cur.fetchall()
cur.close()
return (len(results) > 0) | Check if this credential ID is valid. | cme/protocols/http/database.py | is_credential_valid | kmackinley/CrackMapExec | 12 | python | def is_credential_valid(self, credentialID):
'\n \n '
cur = self.conn.cursor()
cur.execute('SELECT * FROM credentials WHERE id=? LIMIT 1', [credentialID])
results = cur.fetchall()
cur.close()
return (len(results) > 0) | def is_credential_valid(self, credentialID):
'\n \n '
cur = self.conn.cursor()
cur.execute('SELECT * FROM credentials WHERE id=? LIMIT 1', [credentialID])
results = cur.fetchall()
cur.close()
return (len(results) > 0)<|docstring|>Check if this credential ID is valid.<|endoftext|> |
e43164ee03d9fb82f2c91bce6fda7ee8e2d58e453547342b02deb06c04847e47 | def is_host_valid(self, hostID):
'\n Check if this credential ID is valid.\n '
cur = self.conn.cursor()
cur.execute('SELECT * FROM host WHERE id=? LIMIT 1', [hostID])
results = cur.fetchall()
cur.close()
return (len(results) > 0) | Check if this credential ID is valid. | cme/protocols/http/database.py | is_host_valid | kmackinley/CrackMapExec | 12 | python | def is_host_valid(self, hostID):
'\n \n '
cur = self.conn.cursor()
cur.execute('SELECT * FROM host WHERE id=? LIMIT 1', [hostID])
results = cur.fetchall()
cur.close()
return (len(results) > 0) | def is_host_valid(self, hostID):
'\n \n '
cur = self.conn.cursor()
cur.execute('SELECT * FROM host WHERE id=? LIMIT 1', [hostID])
results = cur.fetchall()
cur.close()
return (len(results) > 0)<|docstring|>Check if this credential ID is valid.<|endoftext|> |
f4bdcc509bab246e8a5d5dbf1d1cfbeee36adb1e1f05366bf70e70f56b75d416 | def get_credentials(self, filterTerm=None):
'\n Return credentials from the database.\n '
cur = self.conn.cursor()
if self.is_credential_valid(filterTerm):
cur.execute('SELECT * FROM credentials WHERE id=? LIMIT 1', [filterTerm])
elif (filterTerm and (filterTerm != '')):
cu... | Return credentials from the database. | cme/protocols/http/database.py | get_credentials | kmackinley/CrackMapExec | 12 | python | def get_credentials(self, filterTerm=None):
'\n \n '
cur = self.conn.cursor()
if self.is_credential_valid(filterTerm):
cur.execute('SELECT * FROM credentials WHERE id=? LIMIT 1', [filterTerm])
elif (filterTerm and (filterTerm != )):
cur.execute('SELECT * FROM credentials WH... | def get_credentials(self, filterTerm=None):
'\n \n '
cur = self.conn.cursor()
if self.is_credential_valid(filterTerm):
cur.execute('SELECT * FROM credentials WHERE id=? LIMIT 1', [filterTerm])
elif (filterTerm and (filterTerm != )):
cur.execute('SELECT * FROM credentials WH... |
20c292279cd37576ca11ab2ffc8d1b9dd1c71cdc8071aac77327911011d13963 | def remove_credentials(self, credIDs):
'\n Removes a credential ID from the database\n '
for credID in credIDs:
cur = self.conn.cursor()
cur.execute('DELETE FROM credentials WHERE id=?', [credID])
cur.close() | Removes a credential ID from the database | cme/protocols/http/database.py | remove_credentials | kmackinley/CrackMapExec | 12 | python | def remove_credentials(self, credIDs):
'\n \n '
for credID in credIDs:
cur = self.conn.cursor()
cur.execute('DELETE FROM credentials WHERE id=?', [credID])
cur.close() | def remove_credentials(self, credIDs):
'\n \n '
for credID in credIDs:
cur = self.conn.cursor()
cur.execute('DELETE FROM credentials WHERE id=?', [credID])
cur.close()<|docstring|>Removes a credential ID from the database<|endoftext|> |
02495453ae6144361d6049430b1b1987cc52086c8c9a336560bfcd1fa9642c98 | def fix_program(data: List) -> int:
'\n Fix the program so that it terminates normally by\n changing exactly one jmp (to nop) or nop (to jmp).\n\n Find the tweaked version of the datathat makes the program\n run successfully without "exploding" (i.e. landing in an infinite loop),\n and return the acc... | Fix the program so that it terminates normally by
changing exactly one jmp (to nop) or nop (to jmp).
Find the tweaked version of the datathat makes the program
run successfully without "exploding" (i.e. landing in an infinite loop),
and return the accumulator value of that tweaked version | day_08/part2.py | fix_program | pawlodkowski/advent_of_code_2020 | 2 | python | def fix_program(data: List) -> int:
'\n Fix the program so that it terminates normally by\n changing exactly one jmp (to nop) or nop (to jmp).\n\n Find the tweaked version of the datathat makes the program\n run successfully without "exploding" (i.e. landing in an infinite loop),\n and return the acc... | def fix_program(data: List) -> int:
'\n Fix the program so that it terminates normally by\n changing exactly one jmp (to nop) or nop (to jmp).\n\n Find the tweaked version of the datathat makes the program\n run successfully without "exploding" (i.e. landing in an infinite loop),\n and return the acc... |
3f2eaa7a88e73717712e781cccafae51e4287366de22a444e14d506758e9d875 | def _parse_email(self, email_string):
"\n\t\t\tExpected value of email_string is 'example@example.com:John Doe'\n\t\t"
email_string
email_value = email_string.split(':')
if (len(email_value) == 1):
return {'email': email_value[0]}
elif (len(email_value) == 2):
return {'email': email_... | Expected value of email_string is 'example@example.com:John Doe' | minimailer/core/mailer.py | _parse_email | mpavelka/minimailer | 0 | python | def _parse_email(self, email_string):
"\n\t\t\t\n\t\t"
email_string
email_value = email_string.split(':')
if (len(email_value) == 1):
return {'email': email_value[0]}
elif (len(email_value) == 2):
return {'email': email_value[0], 'name': email_value[1]}
else:
raise ValueE... | def _parse_email(self, email_string):
"\n\t\t\t\n\t\t"
email_string
email_value = email_string.split(':')
if (len(email_value) == 1):
return {'email': email_value[0]}
elif (len(email_value) == 2):
return {'email': email_value[0], 'name': email_value[1]}
else:
raise ValueE... |
b71022936e10bf331c3b98c96475acfe8dfd75a49c12396836e0b736b0a11367 | def _expand_variables(self, string, data):
'\n\t\tExpands data variables\n\t\t e.g. When data looks like {"to": "example@example.com"}\n\t\t then config option "${to}" will be expanded to "example@example.com"\n\t\t'
output = string
for placeholder in set(re.findall('\\$\\{.+\\}', output)):
varnam... | Expands data variables
e.g. When data looks like {"to": "example@example.com"}
then config option "${to}" will be expanded to "example@example.com" | minimailer/core/mailer.py | _expand_variables | mpavelka/minimailer | 0 | python | def _expand_variables(self, string, data):
'\n\t\tExpands data variables\n\t\t e.g. When data looks like {"to": "example@example.com"}\n\t\t then config option "${to}" will be expanded to "example@example.com"\n\t\t'
output = string
for placeholder in set(re.findall('\\$\\{.+\\}', output)):
varnam... | def _expand_variables(self, string, data):
'\n\t\tExpands data variables\n\t\t e.g. When data looks like {"to": "example@example.com"}\n\t\t then config option "${to}" will be expanded to "example@example.com"\n\t\t'
output = string
for placeholder in set(re.findall('\\$\\{.+\\}', output)):
varnam... |
b72dc5e026372ed372f70970164b5b066f421d4766287b0dce09b9f84c8644a2 | def __init__(self, **kwargs):
'\n Initializes a new CreateChannelResult object with values from keyword arguments. This class has the following subclasses and if you are using this class as input\n to a service operations then you should favor using a subclass over the base class:\n\n * :class:... | Initializes a new CreateChannelResult object with values from keyword arguments. This class has the following subclasses and if you are using this class as input
to a service operations then you should favor using a subclass over the base class:
* :class:`~oci.oda.models.CreateWebChannelResult`
* :class:`~oci.oda.mode... | src/oci/oda/models/create_channel_result.py | __init__ | pabs3/oci-python-sdk | 0 | python | def __init__(self, **kwargs):
'\n Initializes a new CreateChannelResult object with values from keyword arguments. This class has the following subclasses and if you are using this class as input\n to a service operations then you should favor using a subclass over the base class:\n\n * :class:... | def __init__(self, **kwargs):
'\n Initializes a new CreateChannelResult object with values from keyword arguments. This class has the following subclasses and if you are using this class as input\n to a service operations then you should favor using a subclass over the base class:\n\n * :class:... |
364c4263770c71f2fb003d02da8a811cdf71afd28e32cae72dfa10269ee4bf33 | @staticmethod
def get_subtype(object_dictionary):
'\n Given the hash representation of a subtype of this class,\n use the info in the hash to return the class of the subtype.\n '
type = object_dictionary['type']
if (type == 'WEB'):
return 'CreateWebChannelResult'
if (type ==... | Given the hash representation of a subtype of this class,
use the info in the hash to return the class of the subtype. | src/oci/oda/models/create_channel_result.py | get_subtype | pabs3/oci-python-sdk | 0 | python | @staticmethod
def get_subtype(object_dictionary):
'\n Given the hash representation of a subtype of this class,\n use the info in the hash to return the class of the subtype.\n '
type = object_dictionary['type']
if (type == 'WEB'):
return 'CreateWebChannelResult'
if (type ==... | @staticmethod
def get_subtype(object_dictionary):
'\n Given the hash representation of a subtype of this class,\n use the info in the hash to return the class of the subtype.\n '
type = object_dictionary['type']
if (type == 'WEB'):
return 'CreateWebChannelResult'
if (type ==... |
c6e279bc18f87403f3780311174dfb80714b38febac8975aeca573af8333387c | @property
def id(self):
'\n **[Required]** Gets the id of this CreateChannelResult.\n Unique immutable identifier that was assigned when the Channel was created.\n\n\n :return: The id of this CreateChannelResult.\n :rtype: str\n '
return self._id | **[Required]** Gets the id of this CreateChannelResult.
Unique immutable identifier that was assigned when the Channel was created.
:return: The id of this CreateChannelResult.
:rtype: str | src/oci/oda/models/create_channel_result.py | id | pabs3/oci-python-sdk | 0 | python | @property
def id(self):
'\n **[Required]** Gets the id of this CreateChannelResult.\n Unique immutable identifier that was assigned when the Channel was created.\n\n\n :return: The id of this CreateChannelResult.\n :rtype: str\n '
return self._id | @property
def id(self):
'\n **[Required]** Gets the id of this CreateChannelResult.\n Unique immutable identifier that was assigned when the Channel was created.\n\n\n :return: The id of this CreateChannelResult.\n :rtype: str\n '
return self._id<|docstring|>**[Required]** Get... |
9561b66da548a0236ffe66dd604e422476fc31a12c4f07eb11ba557a28a7ee7d | @id.setter
def id(self, id):
'\n Sets the id of this CreateChannelResult.\n Unique immutable identifier that was assigned when the Channel was created.\n\n\n :param id: The id of this CreateChannelResult.\n :type: str\n '
self._id = id | Sets the id of this CreateChannelResult.
Unique immutable identifier that was assigned when the Channel was created.
:param id: The id of this CreateChannelResult.
:type: str | src/oci/oda/models/create_channel_result.py | id | pabs3/oci-python-sdk | 0 | python | @id.setter
def id(self, id):
'\n Sets the id of this CreateChannelResult.\n Unique immutable identifier that was assigned when the Channel was created.\n\n\n :param id: The id of this CreateChannelResult.\n :type: str\n '
self._id = id | @id.setter
def id(self, id):
'\n Sets the id of this CreateChannelResult.\n Unique immutable identifier that was assigned when the Channel was created.\n\n\n :param id: The id of this CreateChannelResult.\n :type: str\n '
self._id = id<|docstring|>Sets the id of this CreateCha... |
6fdc6302c09af146a4256751ba572deace287d4ab23e31846e41a6fb22732b34 | @property
def name(self):
"\n **[Required]** Gets the name of this CreateChannelResult.\n The Channel's name. The name can contain only letters, numbers, periods, and underscores. The name must begin with a letter.\n\n\n :return: The name of this CreateChannelResult.\n :rtype: str\n ... | **[Required]** Gets the name of this CreateChannelResult.
The Channel's name. The name can contain only letters, numbers, periods, and underscores. The name must begin with a letter.
:return: The name of this CreateChannelResult.
:rtype: str | src/oci/oda/models/create_channel_result.py | name | pabs3/oci-python-sdk | 0 | python | @property
def name(self):
"\n **[Required]** Gets the name of this CreateChannelResult.\n The Channel's name. The name can contain only letters, numbers, periods, and underscores. The name must begin with a letter.\n\n\n :return: The name of this CreateChannelResult.\n :rtype: str\n ... | @property
def name(self):
"\n **[Required]** Gets the name of this CreateChannelResult.\n The Channel's name. The name can contain only letters, numbers, periods, and underscores. The name must begin with a letter.\n\n\n :return: The name of this CreateChannelResult.\n :rtype: str\n ... |
e9031e236b6e75c521e9816152e9cf98bb3fbca98259f73d6c0b43205025aa45 | @name.setter
def name(self, name):
"\n Sets the name of this CreateChannelResult.\n The Channel's name. The name can contain only letters, numbers, periods, and underscores. The name must begin with a letter.\n\n\n :param name: The name of this CreateChannelResult.\n :type: str\n ... | Sets the name of this CreateChannelResult.
The Channel's name. The name can contain only letters, numbers, periods, and underscores. The name must begin with a letter.
:param name: The name of this CreateChannelResult.
:type: str | src/oci/oda/models/create_channel_result.py | name | pabs3/oci-python-sdk | 0 | python | @name.setter
def name(self, name):
"\n Sets the name of this CreateChannelResult.\n The Channel's name. The name can contain only letters, numbers, periods, and underscores. The name must begin with a letter.\n\n\n :param name: The name of this CreateChannelResult.\n :type: str\n ... | @name.setter
def name(self, name):
"\n Sets the name of this CreateChannelResult.\n The Channel's name. The name can contain only letters, numbers, periods, and underscores. The name must begin with a letter.\n\n\n :param name: The name of this CreateChannelResult.\n :type: str\n ... |
7e895ec52c409a4428b7dd90aa5f89214758c0d139f00e5c186ab99a95d4641c | @property
def description(self):
'\n Gets the description of this CreateChannelResult.\n A short description of the Channel.\n\n\n :return: The description of this CreateChannelResult.\n :rtype: str\n '
return self._description | Gets the description of this CreateChannelResult.
A short description of the Channel.
:return: The description of this CreateChannelResult.
:rtype: str | src/oci/oda/models/create_channel_result.py | description | pabs3/oci-python-sdk | 0 | python | @property
def description(self):
'\n Gets the description of this CreateChannelResult.\n A short description of the Channel.\n\n\n :return: The description of this CreateChannelResult.\n :rtype: str\n '
return self._description | @property
def description(self):
'\n Gets the description of this CreateChannelResult.\n A short description of the Channel.\n\n\n :return: The description of this CreateChannelResult.\n :rtype: str\n '
return self._description<|docstring|>Gets the description of this CreateCh... |
ecaaca987100b693fa2ee4a62f2fc1d1da1f3384c1f5f2de528e83a600270f71 | @description.setter
def description(self, description):
'\n Sets the description of this CreateChannelResult.\n A short description of the Channel.\n\n\n :param description: The description of this CreateChannelResult.\n :type: str\n '
self._description = description | Sets the description of this CreateChannelResult.
A short description of the Channel.
:param description: The description of this CreateChannelResult.
:type: str | src/oci/oda/models/create_channel_result.py | description | pabs3/oci-python-sdk | 0 | python | @description.setter
def description(self, description):
'\n Sets the description of this CreateChannelResult.\n A short description of the Channel.\n\n\n :param description: The description of this CreateChannelResult.\n :type: str\n '
self._description = description | @description.setter
def description(self, description):
'\n Sets the description of this CreateChannelResult.\n A short description of the Channel.\n\n\n :param description: The description of this CreateChannelResult.\n :type: str\n '
self._description = description<|docstrin... |
7dfaf2922e117458333560ceb4d2ead828089fdea9cff631f6573c20575537a9 | @property
def category(self):
'\n **[Required]** Gets the category of this CreateChannelResult.\n The category of the Channel.\n\n Allowed values for this property are: "AGENT", "APPLICATION", "BOT", "BOT_AS_AGENT", "SYSTEM", "EVENT", \'UNKNOWN_ENUM_VALUE\'.\n Any unrecognized values ret... | **[Required]** Gets the category of this CreateChannelResult.
The category of the Channel.
Allowed values for this property are: "AGENT", "APPLICATION", "BOT", "BOT_AS_AGENT", "SYSTEM", "EVENT", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
:return: The c... | src/oci/oda/models/create_channel_result.py | category | pabs3/oci-python-sdk | 0 | python | @property
def category(self):
'\n **[Required]** Gets the category of this CreateChannelResult.\n The category of the Channel.\n\n Allowed values for this property are: "AGENT", "APPLICATION", "BOT", "BOT_AS_AGENT", "SYSTEM", "EVENT", \'UNKNOWN_ENUM_VALUE\'.\n Any unrecognized values ret... | @property
def category(self):
'\n **[Required]** Gets the category of this CreateChannelResult.\n The category of the Channel.\n\n Allowed values for this property are: "AGENT", "APPLICATION", "BOT", "BOT_AS_AGENT", "SYSTEM", "EVENT", \'UNKNOWN_ENUM_VALUE\'.\n Any unrecognized values ret... |
bbd1ee6f3e2e5e6f439ce3c3ec62c061d5835b3ec92d5e960a07299e0e41ac49 | @category.setter
def category(self, category):
'\n Sets the category of this CreateChannelResult.\n The category of the Channel.\n\n\n :param category: The category of this CreateChannelResult.\n :type: str\n '
allowed_values = ['AGENT', 'APPLICATION', 'BOT', 'BOT_AS_AGENT', '... | Sets the category of this CreateChannelResult.
The category of the Channel.
:param category: The category of this CreateChannelResult.
:type: str | src/oci/oda/models/create_channel_result.py | category | pabs3/oci-python-sdk | 0 | python | @category.setter
def category(self, category):
'\n Sets the category of this CreateChannelResult.\n The category of the Channel.\n\n\n :param category: The category of this CreateChannelResult.\n :type: str\n '
allowed_values = ['AGENT', 'APPLICATION', 'BOT', 'BOT_AS_AGENT', '... | @category.setter
def category(self, category):
'\n Sets the category of this CreateChannelResult.\n The category of the Channel.\n\n\n :param category: The category of this CreateChannelResult.\n :type: str\n '
allowed_values = ['AGENT', 'APPLICATION', 'BOT', 'BOT_AS_AGENT', '... |
a86ab656666aaf1fbadda43db2ae5d42c75305afb3ea11c17501ebf72a2d88f8 | @property
def type(self):
'\n **[Required]** Gets the type of this CreateChannelResult.\n The Channel type.\n\n Allowed values for this property are: "ANDROID", "APPEVENT", "APPLICATION", "CORTANA", "FACEBOOK", "IOS", "MSTEAMS", "OSS", "OSVC", "SERVICECLOUD", "SLACK", "TEST", "TWILIO", "WEB", "... | **[Required]** Gets the type of this CreateChannelResult.
The Channel type.
Allowed values for this property are: "ANDROID", "APPEVENT", "APPLICATION", "CORTANA", "FACEBOOK", "IOS", "MSTEAMS", "OSS", "OSVC", "SERVICECLOUD", "SLACK", "TEST", "TWILIO", "WEB", "WEBHOOK", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values retu... | src/oci/oda/models/create_channel_result.py | type | pabs3/oci-python-sdk | 0 | python | @property
def type(self):
'\n **[Required]** Gets the type of this CreateChannelResult.\n The Channel type.\n\n Allowed values for this property are: "ANDROID", "APPEVENT", "APPLICATION", "CORTANA", "FACEBOOK", "IOS", "MSTEAMS", "OSS", "OSVC", "SERVICECLOUD", "SLACK", "TEST", "TWILIO", "WEB", "... | @property
def type(self):
'\n **[Required]** Gets the type of this CreateChannelResult.\n The Channel type.\n\n Allowed values for this property are: "ANDROID", "APPEVENT", "APPLICATION", "CORTANA", "FACEBOOK", "IOS", "MSTEAMS", "OSS", "OSVC", "SERVICECLOUD", "SLACK", "TEST", "TWILIO", "WEB", "... |
08a3b2bf24f14e517a7e23222d25cb2550e2768a914c503ae0ce3e01e0a7df7c | @type.setter
def type(self, type):
'\n Sets the type of this CreateChannelResult.\n The Channel type.\n\n\n :param type: The type of this CreateChannelResult.\n :type: str\n '
allowed_values = ['ANDROID', 'APPEVENT', 'APPLICATION', 'CORTANA', 'FACEBOOK', 'IOS', 'MSTEAMS', 'OSS... | Sets the type of this CreateChannelResult.
The Channel type.
:param type: The type of this CreateChannelResult.
:type: str | src/oci/oda/models/create_channel_result.py | type | pabs3/oci-python-sdk | 0 | python | @type.setter
def type(self, type):
'\n Sets the type of this CreateChannelResult.\n The Channel type.\n\n\n :param type: The type of this CreateChannelResult.\n :type: str\n '
allowed_values = ['ANDROID', 'APPEVENT', 'APPLICATION', 'CORTANA', 'FACEBOOK', 'IOS', 'MSTEAMS', 'OSS... | @type.setter
def type(self, type):
'\n Sets the type of this CreateChannelResult.\n The Channel type.\n\n\n :param type: The type of this CreateChannelResult.\n :type: str\n '
allowed_values = ['ANDROID', 'APPEVENT', 'APPLICATION', 'CORTANA', 'FACEBOOK', 'IOS', 'MSTEAMS', 'OSS... |
5e3451cf93f473729c5e49b50326b6134a5d9e0338202ac0001d44f748125a4f | @property
def session_expiry_duration_in_milliseconds(self):
'\n Gets the session_expiry_duration_in_milliseconds of this CreateChannelResult.\n The number of milliseconds before a session expires.\n\n\n :return: The session_expiry_duration_in_milliseconds of this CreateChannelResult.\n ... | Gets the session_expiry_duration_in_milliseconds of this CreateChannelResult.
The number of milliseconds before a session expires.
:return: The session_expiry_duration_in_milliseconds of this CreateChannelResult.
:rtype: int | src/oci/oda/models/create_channel_result.py | session_expiry_duration_in_milliseconds | pabs3/oci-python-sdk | 0 | python | @property
def session_expiry_duration_in_milliseconds(self):
'\n Gets the session_expiry_duration_in_milliseconds of this CreateChannelResult.\n The number of milliseconds before a session expires.\n\n\n :return: The session_expiry_duration_in_milliseconds of this CreateChannelResult.\n ... | @property
def session_expiry_duration_in_milliseconds(self):
'\n Gets the session_expiry_duration_in_milliseconds of this CreateChannelResult.\n The number of milliseconds before a session expires.\n\n\n :return: The session_expiry_duration_in_milliseconds of this CreateChannelResult.\n ... |
b9ffd595cc3eef5f0255d79007ab4993736baed34418d074c72ada604672c9a5 | @session_expiry_duration_in_milliseconds.setter
def session_expiry_duration_in_milliseconds(self, session_expiry_duration_in_milliseconds):
'\n Sets the session_expiry_duration_in_milliseconds of this CreateChannelResult.\n The number of milliseconds before a session expires.\n\n\n :param sessi... | Sets the session_expiry_duration_in_milliseconds of this CreateChannelResult.
The number of milliseconds before a session expires.
:param session_expiry_duration_in_milliseconds: The session_expiry_duration_in_milliseconds of this CreateChannelResult.
:type: int | src/oci/oda/models/create_channel_result.py | session_expiry_duration_in_milliseconds | pabs3/oci-python-sdk | 0 | python | @session_expiry_duration_in_milliseconds.setter
def session_expiry_duration_in_milliseconds(self, session_expiry_duration_in_milliseconds):
'\n Sets the session_expiry_duration_in_milliseconds of this CreateChannelResult.\n The number of milliseconds before a session expires.\n\n\n :param sessi... | @session_expiry_duration_in_milliseconds.setter
def session_expiry_duration_in_milliseconds(self, session_expiry_duration_in_milliseconds):
'\n Sets the session_expiry_duration_in_milliseconds of this CreateChannelResult.\n The number of milliseconds before a session expires.\n\n\n :param sessi... |
bb5a359d8efc6c99f74b437aeb0795123991565f0e5c210e761082c629f17e7f | @property
def lifecycle_state(self):
'\n **[Required]** Gets the lifecycle_state of this CreateChannelResult.\n The Channel\'s current state.\n\n Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", \'UNKNOWN_ENUM_VALUE\'.\n ... | **[Required]** Gets the lifecycle_state of this CreateChannelResult.
The Channel's current state.
Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'.
Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALU... | src/oci/oda/models/create_channel_result.py | lifecycle_state | pabs3/oci-python-sdk | 0 | python | @property
def lifecycle_state(self):
'\n **[Required]** Gets the lifecycle_state of this CreateChannelResult.\n The Channel\'s current state.\n\n Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", \'UNKNOWN_ENUM_VALUE\'.\n ... | @property
def lifecycle_state(self):
'\n **[Required]** Gets the lifecycle_state of this CreateChannelResult.\n The Channel\'s current state.\n\n Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED", \'UNKNOWN_ENUM_VALUE\'.\n ... |
2665f57067c9bb05fb8803a7b989a062c8ba6008819a0a8bb9905dc4f5d34bdb | @lifecycle_state.setter
def lifecycle_state(self, lifecycle_state):
"\n Sets the lifecycle_state of this CreateChannelResult.\n The Channel's current state.\n\n\n :param lifecycle_state: The lifecycle_state of this CreateChannelResult.\n :type: str\n "
allowed_values = ['CREAT... | Sets the lifecycle_state of this CreateChannelResult.
The Channel's current state.
:param lifecycle_state: The lifecycle_state of this CreateChannelResult.
:type: str | src/oci/oda/models/create_channel_result.py | lifecycle_state | pabs3/oci-python-sdk | 0 | python | @lifecycle_state.setter
def lifecycle_state(self, lifecycle_state):
"\n Sets the lifecycle_state of this CreateChannelResult.\n The Channel's current state.\n\n\n :param lifecycle_state: The lifecycle_state of this CreateChannelResult.\n :type: str\n "
allowed_values = ['CREAT... | @lifecycle_state.setter
def lifecycle_state(self, lifecycle_state):
"\n Sets the lifecycle_state of this CreateChannelResult.\n The Channel's current state.\n\n\n :param lifecycle_state: The lifecycle_state of this CreateChannelResult.\n :type: str\n "
allowed_values = ['CREAT... |
7d4334035fc080e34197edb1b55b9e1f1c01334dbfcfaf9f1bb115194649d262 | @property
def time_created(self):
'\n **[Required]** Gets the time_created of this CreateChannelResult.\n When the resource was created. A date-time string as described in `RFC 3339`__, section 14.29.\n\n __ https://tools.ietf.org/rfc/rfc3339\n\n\n :return: The time_created of this Creat... | **[Required]** Gets the time_created of this CreateChannelResult.
When the resource was created. A date-time string as described in `RFC 3339`__, section 14.29.
__ https://tools.ietf.org/rfc/rfc3339
:return: The time_created of this CreateChannelResult.
:rtype: datetime | src/oci/oda/models/create_channel_result.py | time_created | pabs3/oci-python-sdk | 0 | python | @property
def time_created(self):
'\n **[Required]** Gets the time_created of this CreateChannelResult.\n When the resource was created. A date-time string as described in `RFC 3339`__, section 14.29.\n\n __ https://tools.ietf.org/rfc/rfc3339\n\n\n :return: The time_created of this Creat... | @property
def time_created(self):
'\n **[Required]** Gets the time_created of this CreateChannelResult.\n When the resource was created. A date-time string as described in `RFC 3339`__, section 14.29.\n\n __ https://tools.ietf.org/rfc/rfc3339\n\n\n :return: The time_created of this Creat... |
385cc658703a3e88e42ae78d91215cad436650d7924d917f7b710d5820393846 | @time_created.setter
def time_created(self, time_created):
'\n Sets the time_created of this CreateChannelResult.\n When the resource was created. A date-time string as described in `RFC 3339`__, section 14.29.\n\n __ https://tools.ietf.org/rfc/rfc3339\n\n\n :param time_created: The time... | Sets the time_created of this CreateChannelResult.
When the resource was created. A date-time string as described in `RFC 3339`__, section 14.29.
__ https://tools.ietf.org/rfc/rfc3339
:param time_created: The time_created of this CreateChannelResult.
:type: datetime | src/oci/oda/models/create_channel_result.py | time_created | pabs3/oci-python-sdk | 0 | python | @time_created.setter
def time_created(self, time_created):
'\n Sets the time_created of this CreateChannelResult.\n When the resource was created. A date-time string as described in `RFC 3339`__, section 14.29.\n\n __ https://tools.ietf.org/rfc/rfc3339\n\n\n :param time_created: The time... | @time_created.setter
def time_created(self, time_created):
'\n Sets the time_created of this CreateChannelResult.\n When the resource was created. A date-time string as described in `RFC 3339`__, section 14.29.\n\n __ https://tools.ietf.org/rfc/rfc3339\n\n\n :param time_created: The time... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.