body stringlengths 26 98.2k | body_hash int64 -9,222,864,604,528,158,000 9,221,803,474B | docstring stringlengths 1 16.8k | path stringlengths 5 230 | name stringlengths 1 96 | repository_name stringlengths 7 89 | lang stringclasses 1
value | body_without_docstring stringlengths 20 98.2k |
|---|---|---|---|---|---|---|---|
def __init__(self, temboo_session):
'\n Create a new instance of the ListMembers Choreo. A TembooSession object, containing a valid\n set of Temboo credentials, must be supplied.\n '
super(ListMembers, self).__init__(temboo_session, '/Library/MailChimp/ListMembers') | 7,404,257,545,218,842,000 | Create a new instance of the ListMembers Choreo. A TembooSession object, containing a valid
set of Temboo credentials, must be supplied. | temboo/Library/MailChimp/ListMembers.py | __init__ | jordanemedlock/psychtruths | python | def __init__(self, temboo_session):
'\n Create a new instance of the ListMembers Choreo. A TembooSession object, containing a valid\n set of Temboo credentials, must be supplied.\n '
super(ListMembers, self).__init__(temboo_session, '/Library/MailChimp/ListMembers') |
def set_APIKey(self, value):
'\n Set the value of the APIKey input for this Choreo. ((required, string) The API Key provided by Mailchimp.)\n '
super(ListMembersInputSet, self)._set_input('APIKey', value) | 2,786,447,955,702,532,000 | Set the value of the APIKey input for this Choreo. ((required, string) The API Key provided by Mailchimp.) | temboo/Library/MailChimp/ListMembers.py | set_APIKey | jordanemedlock/psychtruths | python | def set_APIKey(self, value):
'\n \n '
super(ListMembersInputSet, self)._set_input('APIKey', value) |
def set_Limit(self, value):
'\n Set the value of the Limit input for this Choreo. ((optional, integer) Specifies the number of records in a page to be returned. Must be greater than zero and less than or equal to 15000. Defaults to 100.)\n '
super(ListMembersInputSet, self)._set_input('Limit', val... | -6,993,926,749,332,148,000 | Set the value of the Limit input for this Choreo. ((optional, integer) Specifies the number of records in a page to be returned. Must be greater than zero and less than or equal to 15000. Defaults to 100.) | temboo/Library/MailChimp/ListMembers.py | set_Limit | jordanemedlock/psychtruths | python | def set_Limit(self, value):
'\n \n '
super(ListMembersInputSet, self)._set_input('Limit', value) |
def set_ListId(self, value):
'\n Set the value of the ListId input for this Choreo. ((required, string) The id of the Mailchimp list to retrieve members from.)\n '
super(ListMembersInputSet, self)._set_input('ListId', value) | 3,846,483,881,471,627,000 | Set the value of the ListId input for this Choreo. ((required, string) The id of the Mailchimp list to retrieve members from.) | temboo/Library/MailChimp/ListMembers.py | set_ListId | jordanemedlock/psychtruths | python | def set_ListId(self, value):
'\n \n '
super(ListMembersInputSet, self)._set_input('ListId', value) |
def set_ResponseFormat(self, value):
'\n Set the value of the ResponseFormat input for this Choreo. ((optional, string) Indicates the desired format for the response. Accepted values are "json" or "xml" (the default).)\n '
super(ListMembersInputSet, self)._set_input('ResponseFormat', value) | -5,770,926,192,589,782,000 | Set the value of the ResponseFormat input for this Choreo. ((optional, string) Indicates the desired format for the response. Accepted values are "json" or "xml" (the default).) | temboo/Library/MailChimp/ListMembers.py | set_ResponseFormat | jordanemedlock/psychtruths | python | def set_ResponseFormat(self, value):
'\n \n '
super(ListMembersInputSet, self)._set_input('ResponseFormat', value) |
def set_Since(self, value):
"\n Set the value of the Since input for this Choreo. ((optional, date) Retrieves records that have changed since this date/time. Formatted like 'YYYY-MM-DD HH:MM:SS.)\n "
super(ListMembersInputSet, self)._set_input('Since', value) | -1,359,020,157,680,741,400 | Set the value of the Since input for this Choreo. ((optional, date) Retrieves records that have changed since this date/time. Formatted like 'YYYY-MM-DD HH:MM:SS.) | temboo/Library/MailChimp/ListMembers.py | set_Since | jordanemedlock/psychtruths | python | def set_Since(self, value):
"\n \n "
super(ListMembersInputSet, self)._set_input('Since', value) |
def set_Start(self, value):
'\n Set the value of the Start input for this Choreo. ((optional, integer) Specifies the page at which to begin returning records. Page size is defined by the limit argument. Must be zero or greater. Defaults to 0.)\n '
super(ListMembersInputSet, self)._set_input('Start... | 3,804,596,894,647,427,000 | Set the value of the Start input for this Choreo. ((optional, integer) Specifies the page at which to begin returning records. Page size is defined by the limit argument. Must be zero or greater. Defaults to 0.) | temboo/Library/MailChimp/ListMembers.py | set_Start | jordanemedlock/psychtruths | python | def set_Start(self, value):
'\n \n '
super(ListMembersInputSet, self)._set_input('Start', value) |
def set_Status(self, value):
"\n Set the value of the Status input for this Choreo. ((optional, string) Must be one of 'subscribed', 'unsubscribed', 'cleaned', or 'updated'. Defaults to 'subscribed'.)\n "
super(ListMembersInputSet, self)._set_input('Status', value) | -2,203,140,081,308,092,000 | Set the value of the Status input for this Choreo. ((optional, string) Must be one of 'subscribed', 'unsubscribed', 'cleaned', or 'updated'. Defaults to 'subscribed'.) | temboo/Library/MailChimp/ListMembers.py | set_Status | jordanemedlock/psychtruths | python | def set_Status(self, value):
"\n \n "
super(ListMembersInputSet, self)._set_input('Status', value) |
def get_Response(self):
'\n Retrieve the value for the "Response" output from this Choreo execution. (The response from Mailchimp. Corresponds to the format specified in the ResponseFormat parameter. Defaults to "xml".)\n '
return self._output.get('Response', None) | 1,283,719,462,627,130,400 | Retrieve the value for the "Response" output from this Choreo execution. (The response from Mailchimp. Corresponds to the format specified in the ResponseFormat parameter. Defaults to "xml".) | temboo/Library/MailChimp/ListMembers.py | get_Response | jordanemedlock/psychtruths | python | def get_Response(self):
'\n \n '
return self._output.get('Response', None) |
def description_of(lines, name='stdin'):
'\n Return a string describing the probable encoding of a file or\n list of strings.\n\n :param lines: The lines to get the encoding of.\n :type lines: Iterable of bytes\n :param name: Name of file or collection of lines\n :type name: str\n '
u = Uni... | -4,948,760,566,063,939,000 | Return a string describing the probable encoding of a file or
list of strings.
:param lines: The lines to get the encoding of.
:type lines: Iterable of bytes
:param name: Name of file or collection of lines
:type name: str | venv/lib/python3.8/site-packages/pip/_vendor/chardet/cli/chardetect.py | description_of | fortbox/leetcode-solve | python | def description_of(lines, name='stdin'):
'\n Return a string describing the probable encoding of a file or\n list of strings.\n\n :param lines: The lines to get the encoding of.\n :type lines: Iterable of bytes\n :param name: Name of file or collection of lines\n :type name: str\n '
u = Uni... |
def main(argv=None):
'\n Handles command line arguments and gets things started.\n\n :param argv: List of arguments, as if specified on the command-line.\n If None, ``sys.argv[1:]`` is used instead.\n :type argv: list of str\n '
parser = argparse.ArgumentParser(description='Takes one... | 1,331,823,930,218,164,700 | Handles command line arguments and gets things started.
:param argv: List of arguments, as if specified on the command-line.
If None, ``sys.argv[1:]`` is used instead.
:type argv: list of str | venv/lib/python3.8/site-packages/pip/_vendor/chardet/cli/chardetect.py | main | fortbox/leetcode-solve | python | def main(argv=None):
'\n Handles command line arguments and gets things started.\n\n :param argv: List of arguments, as if specified on the command-line.\n If None, ``sys.argv[1:]`` is used instead.\n :type argv: list of str\n '
parser = argparse.ArgumentParser(description='Takes one... |
def MediaBackend():
'Media storage backend.'
return S3Boto3Storage(location='media') | -1,886,577,899,193,967,900 | Media storage backend. | aws/backends.py | MediaBackend | florimondmanca/personal-api | python | def MediaBackend():
return S3Boto3Storage(location='media') |
def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, action_group_name: Optional[pulumi.Input[str]]=None, automation_runbook_receivers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AutomationRunbookReceiverArgs']]]]]=None, azure_app_push_receivers: Optional[pulumi.Inp... | 7,079,130,205,066,804,000 | An action group resource.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] action_group_name: The name of the action group.
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AutomationRunbookReceiverArgs']]]] automation... | sdk/python/pulumi_azure_native/insights/v20170401/action_group.py | __init__ | pulumi-bot/pulumi-azure-native | python | def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, action_group_name: Optional[pulumi.Input[str]]=None, automation_runbook_receivers: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AutomationRunbookReceiverArgs']]]]]=None, azure_app_push_receivers: Optional[pulumi.Inp... |
@staticmethod
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None) -> 'ActionGroup':
"\n Get an existing ActionGroup resource's state with the given name, id, and optional extra\n properties used to qualify the lookup.\n\n :param str resource_name: The... | 2,591,240,440,721,210,400 | Get an existing ActionGroup resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options... | sdk/python/pulumi_azure_native/insights/v20170401/action_group.py | get | pulumi-bot/pulumi-azure-native | python | @staticmethod
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None) -> 'ActionGroup':
"\n Get an existing ActionGroup resource's state with the given name, id, and optional extra\n properties used to qualify the lookup.\n\n :param str resource_name: The... |
@property
@pulumi.getter(name='automationRunbookReceivers')
def automation_runbook_receivers(self) -> pulumi.Output[Optional[Sequence['outputs.AutomationRunbookReceiverResponse']]]:
'\n The list of AutomationRunbook receivers that are part of this action group.\n '
return pulumi.get(self, 'automat... | -5,235,239,916,796,044,000 | The list of AutomationRunbook receivers that are part of this action group. | sdk/python/pulumi_azure_native/insights/v20170401/action_group.py | automation_runbook_receivers | pulumi-bot/pulumi-azure-native | python | @property
@pulumi.getter(name='automationRunbookReceivers')
def automation_runbook_receivers(self) -> pulumi.Output[Optional[Sequence['outputs.AutomationRunbookReceiverResponse']]]:
'\n \n '
return pulumi.get(self, 'automation_runbook_receivers') |
@property
@pulumi.getter(name='azureAppPushReceivers')
def azure_app_push_receivers(self) -> pulumi.Output[Optional[Sequence['outputs.AzureAppPushReceiverResponse']]]:
'\n The list of AzureAppPush receivers that are part of this action group.\n '
return pulumi.get(self, 'azure_app_push_receivers') | -1,548,000,125,861,752,600 | The list of AzureAppPush receivers that are part of this action group. | sdk/python/pulumi_azure_native/insights/v20170401/action_group.py | azure_app_push_receivers | pulumi-bot/pulumi-azure-native | python | @property
@pulumi.getter(name='azureAppPushReceivers')
def azure_app_push_receivers(self) -> pulumi.Output[Optional[Sequence['outputs.AzureAppPushReceiverResponse']]]:
'\n \n '
return pulumi.get(self, 'azure_app_push_receivers') |
@property
@pulumi.getter(name='emailReceivers')
def email_receivers(self) -> pulumi.Output[Optional[Sequence['outputs.EmailReceiverResponse']]]:
'\n The list of email receivers that are part of this action group.\n '
return pulumi.get(self, 'email_receivers') | 46,405,372,373,859,880 | The list of email receivers that are part of this action group. | sdk/python/pulumi_azure_native/insights/v20170401/action_group.py | email_receivers | pulumi-bot/pulumi-azure-native | python | @property
@pulumi.getter(name='emailReceivers')
def email_receivers(self) -> pulumi.Output[Optional[Sequence['outputs.EmailReceiverResponse']]]:
'\n \n '
return pulumi.get(self, 'email_receivers') |
@property
@pulumi.getter
def enabled(self) -> pulumi.Output[bool]:
'\n Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications.\n '
return pulumi.get(self, 'enabled') | -3,715,311,298,690,319,400 | Indicates whether this action group is enabled. If an action group is not enabled, then none of its receivers will receive communications. | sdk/python/pulumi_azure_native/insights/v20170401/action_group.py | enabled | pulumi-bot/pulumi-azure-native | python | @property
@pulumi.getter
def enabled(self) -> pulumi.Output[bool]:
'\n \n '
return pulumi.get(self, 'enabled') |
@property
@pulumi.getter(name='groupShortName')
def group_short_name(self) -> pulumi.Output[str]:
'\n The short name of the action group. This will be used in SMS messages.\n '
return pulumi.get(self, 'group_short_name') | -600,390,329,182,447,400 | The short name of the action group. This will be used in SMS messages. | sdk/python/pulumi_azure_native/insights/v20170401/action_group.py | group_short_name | pulumi-bot/pulumi-azure-native | python | @property
@pulumi.getter(name='groupShortName')
def group_short_name(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'group_short_name') |
@property
@pulumi.getter(name='itsmReceivers')
def itsm_receivers(self) -> pulumi.Output[Optional[Sequence['outputs.ItsmReceiverResponse']]]:
'\n The list of ITSM receivers that are part of this action group.\n '
return pulumi.get(self, 'itsm_receivers') | 2,912,169,956,100,402,700 | The list of ITSM receivers that are part of this action group. | sdk/python/pulumi_azure_native/insights/v20170401/action_group.py | itsm_receivers | pulumi-bot/pulumi-azure-native | python | @property
@pulumi.getter(name='itsmReceivers')
def itsm_receivers(self) -> pulumi.Output[Optional[Sequence['outputs.ItsmReceiverResponse']]]:
'\n \n '
return pulumi.get(self, 'itsm_receivers') |
@property
@pulumi.getter
def location(self) -> pulumi.Output[str]:
'\n Resource location\n '
return pulumi.get(self, 'location') | 2,974,713,878,710,662,000 | Resource location | sdk/python/pulumi_azure_native/insights/v20170401/action_group.py | location | pulumi-bot/pulumi-azure-native | python | @property
@pulumi.getter
def location(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'location') |
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
'\n Azure resource name\n '
return pulumi.get(self, 'name') | -1,714,126,423,700,497,000 | Azure resource name | sdk/python/pulumi_azure_native/insights/v20170401/action_group.py | name | pulumi-bot/pulumi-azure-native | python | @property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'name') |
@property
@pulumi.getter(name='smsReceivers')
def sms_receivers(self) -> pulumi.Output[Optional[Sequence['outputs.SmsReceiverResponse']]]:
'\n The list of SMS receivers that are part of this action group.\n '
return pulumi.get(self, 'sms_receivers') | -7,178,998,211,520,635,000 | The list of SMS receivers that are part of this action group. | sdk/python/pulumi_azure_native/insights/v20170401/action_group.py | sms_receivers | pulumi-bot/pulumi-azure-native | python | @property
@pulumi.getter(name='smsReceivers')
def sms_receivers(self) -> pulumi.Output[Optional[Sequence['outputs.SmsReceiverResponse']]]:
'\n \n '
return pulumi.get(self, 'sms_receivers') |
@property
@pulumi.getter
def tags(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]:
'\n Resource tags\n '
return pulumi.get(self, 'tags') | -1,239,552,863,427,208,400 | Resource tags | sdk/python/pulumi_azure_native/insights/v20170401/action_group.py | tags | pulumi-bot/pulumi-azure-native | python | @property
@pulumi.getter
def tags(self) -> pulumi.Output[Optional[Mapping[(str, str)]]]:
'\n \n '
return pulumi.get(self, 'tags') |
@property
@pulumi.getter
def type(self) -> pulumi.Output[str]:
'\n Azure resource type\n '
return pulumi.get(self, 'type') | -3,038,610,106,204,977,000 | Azure resource type | sdk/python/pulumi_azure_native/insights/v20170401/action_group.py | type | pulumi-bot/pulumi-azure-native | python | @property
@pulumi.getter
def type(self) -> pulumi.Output[str]:
'\n \n '
return pulumi.get(self, 'type') |
@property
@pulumi.getter(name='webhookReceivers')
def webhook_receivers(self) -> pulumi.Output[Optional[Sequence['outputs.WebhookReceiverResponse']]]:
'\n The list of webhook receivers that are part of this action group.\n '
return pulumi.get(self, 'webhook_receivers') | -4,920,229,458,121,997 | The list of webhook receivers that are part of this action group. | sdk/python/pulumi_azure_native/insights/v20170401/action_group.py | webhook_receivers | pulumi-bot/pulumi-azure-native | python | @property
@pulumi.getter(name='webhookReceivers')
def webhook_receivers(self) -> pulumi.Output[Optional[Sequence['outputs.WebhookReceiverResponse']]]:
'\n \n '
return pulumi.get(self, 'webhook_receivers') |
def _area_tables_binning_parallel(source_df, target_df, n_jobs=(- 1)):
'Construct area allocation and source-target correspondence tables using\n a parallel spatial indexing approach\n ...\n\n NOTE: currently, the largest df is chunked and the other one is shipped in\n full to each core; within each pro... | -2,854,547,330,361,908,000 | Construct area allocation and source-target correspondence tables using
a parallel spatial indexing approach
...
NOTE: currently, the largest df is chunked and the other one is shipped in
full to each core; within each process, the spatial index is built for the
largest set of geometries, and the other one used for `q... | tobler/area_weighted/area_interpolate.py | _area_tables_binning_parallel | AnGWar26/tobler | python | def _area_tables_binning_parallel(source_df, target_df, n_jobs=(- 1)):
'Construct area allocation and source-target correspondence tables using\n a parallel spatial indexing approach\n ...\n\n NOTE: currently, the largest df is chunked and the other one is shipped in\n full to each core; within each pro... |
def _area_tables_binning(source_df, target_df, spatial_index):
'Construct area allocation and source-target correspondence tables using a spatial indexing approach\n ...\n\n NOTE: this currently relies on Geopandas\' spatial index machinery\n\n Parameters\n ----------\n source_df : geopandas.GeoDataF... | 975,538,696,487,234,300 | Construct area allocation and source-target correspondence tables using a spatial indexing approach
...
NOTE: this currently relies on Geopandas' spatial index machinery
Parameters
----------
source_df : geopandas.GeoDataFrame
GeoDataFrame containing input data and polygons
target_df : geopandas.GeoDataFramee
... | tobler/area_weighted/area_interpolate.py | _area_tables_binning | AnGWar26/tobler | python | def _area_tables_binning(source_df, target_df, spatial_index):
'Construct area allocation and source-target correspondence tables using a spatial indexing approach\n ...\n\n NOTE: this currently relies on Geopandas\' spatial index machinery\n\n Parameters\n ----------\n source_df : geopandas.GeoDataF... |
def _area_tables(source_df, target_df):
'\n Construct area allocation and source-target correspondence tables.\n\n Parameters\n ----------\n source_df : geopandas.GeoDataFrame\n target_df : geopandas.GeoDataFrame\n\n Returns\n -------\n tables : tuple (optional)\n two 2-D numpy ar... | 5,719,887,546,585,006,000 | Construct area allocation and source-target correspondence tables.
Parameters
----------
source_df : geopandas.GeoDataFrame
target_df : geopandas.GeoDataFrame
Returns
-------
tables : tuple (optional)
two 2-D numpy arrays
SU: area of intersection of source geometry i with union geometry j
UT: ... | tobler/area_weighted/area_interpolate.py | _area_tables | AnGWar26/tobler | python | def _area_tables(source_df, target_df):
'\n Construct area allocation and source-target correspondence tables.\n\n Parameters\n ----------\n source_df : geopandas.GeoDataFrame\n target_df : geopandas.GeoDataFrame\n\n Returns\n -------\n tables : tuple (optional)\n two 2-D numpy ar... |
def _area_interpolate_binning(source_df, target_df, extensive_variables=None, intensive_variables=None, table=None, allocate_total=True, spatial_index='auto', n_jobs=1, categorical_variables=None):
'\n Area interpolation for extensive, intensive and categorical variables.\n\n Parameters\n ----------\n s... | -5,018,229,989,345,004,000 | Area interpolation for extensive, intensive and categorical variables.
Parameters
----------
source_df : geopandas.GeoDataFrame
target_df : geopandas.GeoDataFrame
extensive_variables : list
[Optional. Default=None] Columns in dataframes for extensive variables
intensive_variables : list
[Optional. Default=None... | tobler/area_weighted/area_interpolate.py | _area_interpolate_binning | AnGWar26/tobler | python | def _area_interpolate_binning(source_df, target_df, extensive_variables=None, intensive_variables=None, table=None, allocate_total=True, spatial_index='auto', n_jobs=1, categorical_variables=None):
'\n Area interpolation for extensive, intensive and categorical variables.\n\n Parameters\n ----------\n s... |
def _area_interpolate(source_df, target_df, extensive_variables=None, intensive_variables=None, tables=None, allocate_total=True):
'\n Area interpolation for extensive and intensive variables.\n\n Parameters\n ----------\n source_df : geopandas.GeoDataFrame (required)\n geodataframe with polygon ... | 7,904,624,371,789,951,000 | Area interpolation for extensive and intensive variables.
Parameters
----------
source_df : geopandas.GeoDataFrame (required)
geodataframe with polygon geometries
target_df : geopandas.GeoDataFrame (required)
geodataframe with polygon geometries
extensive_variables : list, (optional)
columns in dataframes ... | tobler/area_weighted/area_interpolate.py | _area_interpolate | AnGWar26/tobler | python | def _area_interpolate(source_df, target_df, extensive_variables=None, intensive_variables=None, tables=None, allocate_total=True):
'\n Area interpolation for extensive and intensive variables.\n\n Parameters\n ----------\n source_df : geopandas.GeoDataFrame (required)\n geodataframe with polygon ... |
def _area_tables_raster(source_df, target_df, raster_path, codes=[21, 22, 23, 24], force_crs_match=True):
"\n Construct area allocation and source-target correspondence tables according to a raster 'populated' areas\n\n Parameters\n ----------\n source_df : geopandas.GeoDataFrame\n geeodataframe ... | 8,537,103,575,296,378,000 | Construct area allocation and source-target correspondence tables according to a raster 'populated' areas
Parameters
----------
source_df : geopandas.GeoDataFrame
geeodataframe with geometry column of polygon type
target_df : geopandas.GeoDataFrame
geodataframe with geometry column of polygon type
raster_path ... | tobler/area_weighted/area_interpolate.py | _area_tables_raster | AnGWar26/tobler | python | def _area_tables_raster(source_df, target_df, raster_path, codes=[21, 22, 23, 24], force_crs_match=True):
"\n Construct area allocation and source-target correspondence tables according to a raster 'populated' areas\n\n Parameters\n ----------\n source_df : geopandas.GeoDataFrame\n geeodataframe ... |
def list(self, filter: Optional[str]=None, **kwargs: Any) -> AsyncIterable['_models.JobCollection']:
'Gets the list of jobs.\n\n Gets the list of Azure Site Recovery Jobs for the vault.\n\n :param filter: OData filter options.\n :type filter: str\n :keyword callable cls: A custom type or... | -7,047,998,206,408,130,000 | Gets the list of jobs.
Gets the list of Azure Site Recovery Jobs for the vault.
:param filter: OData filter options.
:type filter: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either JobCollection or the result of cls(response)
:rty... | sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_jobs_operations.py | list | AFengKK/azure-sdk-for-python | python | def list(self, filter: Optional[str]=None, **kwargs: Any) -> AsyncIterable['_models.JobCollection']:
'Gets the list of jobs.\n\n Gets the list of Azure Site Recovery Jobs for the vault.\n\n :param filter: OData filter options.\n :type filter: str\n :keyword callable cls: A custom type or... |
async def get(self, job_name: str, **kwargs: Any) -> '_models.Job':
'Gets the job details.\n\n Get the details of an Azure Site Recovery job.\n\n :param job_name: Job identifier.\n :type job_name: str\n :keyword callable cls: A custom type or function that will be passed the direct respo... | 7,681,439,816,165,434,000 | Gets the job details.
Get the details of an Azure Site Recovery job.
:param job_name: Job identifier.
:type job_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: Job, or the result of cls(response)
:rtype: ~azure.mgmt.recoveryservicessiterecovery.models.Job
:r... | sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_jobs_operations.py | get | AFengKK/azure-sdk-for-python | python | async def get(self, job_name: str, **kwargs: Any) -> '_models.Job':
'Gets the job details.\n\n Get the details of an Azure Site Recovery job.\n\n :param job_name: Job identifier.\n :type job_name: str\n :keyword callable cls: A custom type or function that will be passed the direct respo... |
async def begin_cancel(self, job_name: str, **kwargs: Any) -> AsyncLROPoller['_models.Job']:
'Cancels the specified job.\n\n The operation to cancel an Azure Site Recovery job.\n\n :param job_name: Job identifier.\n :type job_name: str\n :keyword callable cls: A custom type or function t... | 978,010,739,571,960,300 | Cancels the specified job.
The operation to cancel an Azure Site Recovery job.
:param job_name: Job identifier.
:type job_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:ke... | sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_jobs_operations.py | begin_cancel | AFengKK/azure-sdk-for-python | python | async def begin_cancel(self, job_name: str, **kwargs: Any) -> AsyncLROPoller['_models.Job']:
'Cancels the specified job.\n\n The operation to cancel an Azure Site Recovery job.\n\n :param job_name: Job identifier.\n :type job_name: str\n :keyword callable cls: A custom type or function t... |
async def begin_restart(self, job_name: str, **kwargs: Any) -> AsyncLROPoller['_models.Job']:
'Restarts the specified job.\n\n The operation to restart an Azure Site Recovery job.\n\n :param job_name: Job identifier.\n :type job_name: str\n :keyword callable cls: A custom type or functio... | -4,034,072,986,809,026,000 | Restarts the specified job.
The operation to restart an Azure Site Recovery job.
:param job_name: Job identifier.
:type job_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:... | sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_jobs_operations.py | begin_restart | AFengKK/azure-sdk-for-python | python | async def begin_restart(self, job_name: str, **kwargs: Any) -> AsyncLROPoller['_models.Job']:
'Restarts the specified job.\n\n The operation to restart an Azure Site Recovery job.\n\n :param job_name: Job identifier.\n :type job_name: str\n :keyword callable cls: A custom type or functio... |
async def begin_resume(self, job_name: str, resume_job_params: '_models.ResumeJobParams', **kwargs: Any) -> AsyncLROPoller['_models.Job']:
'Resumes the specified job.\n\n The operation to resume an Azure Site Recovery job.\n\n :param job_name: Job identifier.\n :type job_name: str\n :par... | 7,726,238,360,745,979,000 | Resumes the specified job.
The operation to resume an Azure Site Recovery job.
:param job_name: Job identifier.
:type job_name: str
:param resume_job_params: Resume rob comments.
:type resume_job_params: ~azure.mgmt.recoveryservicessiterecovery.models.ResumeJobParams
:keyword callable cls: A custom type or function t... | sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_jobs_operations.py | begin_resume | AFengKK/azure-sdk-for-python | python | async def begin_resume(self, job_name: str, resume_job_params: '_models.ResumeJobParams', **kwargs: Any) -> AsyncLROPoller['_models.Job']:
'Resumes the specified job.\n\n The operation to resume an Azure Site Recovery job.\n\n :param job_name: Job identifier.\n :type job_name: str\n :par... |
async def begin_export(self, job_query_parameter: '_models.JobQueryParameter', **kwargs: Any) -> AsyncLROPoller['_models.Job']:
'Exports the details of the Azure Site Recovery jobs of the vault.\n\n The operation to export the details of the Azure Site Recovery jobs of the vault.\n\n :param job_query_... | 4,578,152,469,486,086,000 | Exports the details of the Azure Site Recovery jobs of the vault.
The operation to export the details of the Azure Site Recovery jobs of the vault.
:param job_query_parameter: job query filter.
:type job_query_parameter: ~azure.mgmt.recoveryservicessiterecovery.models.JobQueryParameter
:keyword callable cls: A custom... | sdk/recoveryservices/azure-mgmt-recoveryservicessiterecovery/azure/mgmt/recoveryservicessiterecovery/aio/operations/_replication_jobs_operations.py | begin_export | AFengKK/azure-sdk-for-python | python | async def begin_export(self, job_query_parameter: '_models.JobQueryParameter', **kwargs: Any) -> AsyncLROPoller['_models.Job']:
'Exports the details of the Azure Site Recovery jobs of the vault.\n\n The operation to export the details of the Azure Site Recovery jobs of the vault.\n\n :param job_query_... |
def build_model(layers, model=None, input_dim=None):
"\n Build and return a Sequential model with Dense layers given by the layers argument.\n\n Arguments\n model (keras.Sequential) model to which layers will be added\n input_dim (int) dimension of input\n layers (tuple) sequenc... | -200,597,198,694,877,470 | Build and return a Sequential model with Dense layers given by the layers argument.
Arguments
model (keras.Sequential) model to which layers will be added
input_dim (int) dimension of input
layers (tuple) sequence of 2-ples, one per layer, such as ((64, 'relu'), (64, 'relu'), (1, 'sigmoid'))
Ret... | vl/model/training.py | build_model | hurwitzlab/viral-learning | python | def build_model(layers, model=None, input_dim=None):
"\n Build and return a Sequential model with Dense layers given by the layers argument.\n\n Arguments\n model (keras.Sequential) model to which layers will be added\n input_dim (int) dimension of input\n layers (tuple) sequenc... |
def parse_byteOrder(byteOrder):
'convert byteOrder to enum'
if ((byteOrder is None) or (byteOrder == '')):
return None
value = STRING_ENUM_MAP.get(byteOrder)
if (value is None):
raise ValueError(f'invalid byteOrder {repr(value)},expected one of {{SBE_STRING_ENUM_MAP.keys()}}')
return... | -3,941,613,680,548,913,000 | convert byteOrder to enum | pysbe/parser/fix_parser.py | parse_byteOrder | bkc/pysbe | python | def parse_byteOrder(byteOrder):
if ((byteOrder is None) or (byteOrder == )):
return None
value = STRING_ENUM_MAP.get(byteOrder)
if (value is None):
raise ValueError(f'invalid byteOrder {repr(value)},expected one of {{SBE_STRING_ENUM_MAP.keys()}}')
return value |
def parse_version(version):
'convert version to int'
if (version is None):
raise ValueError('sbe:messageSchema/@version is required')
return int(version) | 311,950,630,180,861,000 | convert version to int | pysbe/parser/fix_parser.py | parse_version | bkc/pysbe | python | def parse_version(version):
if (version is None):
raise ValueError('sbe:messageSchema/@version is required')
return int(version) |
def parse_optionalString(value):
'parse an optional string'
if (not value):
return None
return value | -9,117,855,241,927,928,000 | parse an optional string | pysbe/parser/fix_parser.py | parse_optionalString | bkc/pysbe | python | def parse_optionalString(value):
if (not value):
return None
return value |
def parse_common_attributes(self, element, attributes):
'parse and return dict of common attributes'
result_attributes = {}
for attribute in attributes:
attrib_info = ALL_ATTRIBUTES_MAP[attribute]
if (attrib_info.get('default', MISSING) is not MISSING):
default_value = attrib_inf... | 6,420,430,953,369,956,000 | parse and return dict of common attributes | pysbe/parser/fix_parser.py | parse_common_attributes | bkc/pysbe | python | def parse_common_attributes(self, element, attributes):
result_attributes = {}
for attribute in attributes:
attrib_info = ALL_ATTRIBUTES_MAP[attribute]
if (attrib_info.get('default', MISSING) is not MISSING):
default_value = attrib_info['default']
else:
defau... |
def parseFile(self, file_or_object):
'parse a file'
root = etree.parse(file_or_object)
element_name = ('{%s}messageSchema' % SBE_NS)
messageSchema_element = root.getroot()
if (messageSchema_element.tag != element_name):
raise ValueError(f'root element is not sbe:messageSchema, found {{repr(m... | -9,178,720,531,024,859,000 | parse a file | pysbe/parser/fix_parser.py | parseFile | bkc/pysbe | python | def parseFile(self, file_or_object):
root = etree.parse(file_or_object)
element_name = ('{%s}messageSchema' % SBE_NS)
messageSchema_element = root.getroot()
if (messageSchema_element.tag != element_name):
raise ValueError(f'root element is not sbe:messageSchema, found {{repr(messageSchema_e... |
def processSchema(self, messageSchema_element):
'process xml elements beginning with root messageSchema_element'
attrib = messageSchema_element.attrib
version = parse_version(attrib.get('version'))
byteOrder = parse_byteOrder((attrib.get('byteOrder') or 'littleEndian'))
package = parse_optionalStrin... | 5,891,823,265,714,278,000 | process xml elements beginning with root messageSchema_element | pysbe/parser/fix_parser.py | processSchema | bkc/pysbe | python | def processSchema(self, messageSchema_element):
attrib = messageSchema_element.attrib
version = parse_version(attrib.get('version'))
byteOrder = parse_byteOrder((attrib.get('byteOrder') or 'littleEndian'))
package = parse_optionalString(attrib.get('package'))
semanticVersion = parse_optionalStr... |
def parse_types(self, messageSchema, element):
'parse type, can be repeated'
for child_element in element:
if (child_element.tag not in self.VALID_TYPES_ELEMENTS):
raise ValueError(f'invalid types child element {repr(child_element.tag)}')
parser = getattr(self, f'parse_types_{child_e... | 932,864,072,484,365,200 | parse type, can be repeated | pysbe/parser/fix_parser.py | parse_types | bkc/pysbe | python | def parse_types(self, messageSchema, element):
for child_element in element:
if (child_element.tag not in self.VALID_TYPES_ELEMENTS):
raise ValueError(f'invalid types child element {repr(child_element.tag)}')
parser = getattr(self, f'parse_types_{child_element.tag}', None)
i... |
def parse_types_type(self, parent: TypeCollection, element):
'parse types/type'
attributes = self.parse_common_attributes(element, attributes=TYPE_ATTRIBUTES_LIST)
sbe_type = createType(**attributes)
parent.addType(sbe_type) | -1,194,256,432,256,632,800 | parse types/type | pysbe/parser/fix_parser.py | parse_types_type | bkc/pysbe | python | def parse_types_type(self, parent: TypeCollection, element):
attributes = self.parse_common_attributes(element, attributes=TYPE_ATTRIBUTES_LIST)
sbe_type = createType(**attributes)
parent.addType(sbe_type) |
def parse_types_ref(self, parent: TypeCollection, element):
'parse composite / ref'
attributes = self.parse_common_attributes(element, attributes=REF_ATTRIBUTES_LIST)
sbe_ref = createRef(**attributes)
reference_type = parent.lookupName(sbe_ref.type)
if (not reference_type):
raise UnknownRefe... | -8,382,981,341,107,380,000 | parse composite / ref | pysbe/parser/fix_parser.py | parse_types_ref | bkc/pysbe | python | def parse_types_ref(self, parent: TypeCollection, element):
attributes = self.parse_common_attributes(element, attributes=REF_ATTRIBUTES_LIST)
sbe_ref = createRef(**attributes)
reference_type = parent.lookupName(sbe_ref.type)
if (not reference_type):
raise UnknownReference(f'composite {pare... |
def parse_types_composite(self, parent: TypeCollection, element):
'parse types/composite'
attributes = self.parse_common_attributes(element, attributes=COMPOSITE_ATTRIBUTES_LIST)
sbe_composite = createComposite(**attributes)
parent.addType(sbe_composite)
for child_element in element:
tag = c... | 8,407,362,604,885,788,000 | parse types/composite | pysbe/parser/fix_parser.py | parse_types_composite | bkc/pysbe | python | def parse_types_composite(self, parent: TypeCollection, element):
attributes = self.parse_common_attributes(element, attributes=COMPOSITE_ATTRIBUTES_LIST)
sbe_composite = createComposite(**attributes)
parent.addType(sbe_composite)
for child_element in element:
tag = child_element.tag
... |
def parse_types_set(self, parent: TypeCollection, element):
'parse types/set'
attributes = self.parse_common_attributes(element, attributes=SET_ATTRIBUTES_LIST)
sbe_set = createSet(**attributes)
parent.addType(sbe_set)
for child_element in element.findall('choice'):
choice = self.parse_set_c... | 3,417,518,372,095,596,000 | parse types/set | pysbe/parser/fix_parser.py | parse_types_set | bkc/pysbe | python | def parse_types_set(self, parent: TypeCollection, element):
attributes = self.parse_common_attributes(element, attributes=SET_ATTRIBUTES_LIST)
sbe_set = createSet(**attributes)
parent.addType(sbe_set)
for child_element in element.findall('choice'):
choice = self.parse_set_choice(sbe_set=sbe... |
def parse_set_choice(self, sbe_set, element):
'parse and return an enum validvalue'
attributes = self.parse_common_attributes(element, attributes=SET_CHOICE_ATTRIBUTES_LIST)
value = element.text
try:
value = int(element.text)
except ValueError as exc:
raise ValueError(f"invalid value... | -7,322,725,966,345,624,000 | parse and return an enum validvalue | pysbe/parser/fix_parser.py | parse_set_choice | bkc/pysbe | python | def parse_set_choice(self, sbe_set, element):
attributes = self.parse_common_attributes(element, attributes=SET_CHOICE_ATTRIBUTES_LIST)
value = element.text
try:
value = int(element.text)
except ValueError as exc:
raise ValueError(f"invalid value for set {sbe_set.name} choice {attri... |
def parse_types_enum(self, parent: TypeCollection, element):
'parse types/enum'
attributes = self.parse_common_attributes(element, attributes=ENUM_ATTRIBUTES_LIST)
sbe_enum = createEnum(**attributes)
parent.addType(sbe_enum)
for child_element in element.findall('validValue'):
valid_value = s... | -8,241,963,529,179,988,000 | parse types/enum | pysbe/parser/fix_parser.py | parse_types_enum | bkc/pysbe | python | def parse_types_enum(self, parent: TypeCollection, element):
attributes = self.parse_common_attributes(element, attributes=ENUM_ATTRIBUTES_LIST)
sbe_enum = createEnum(**attributes)
parent.addType(sbe_enum)
for child_element in element.findall('validValue'):
valid_value = self.parse_enum_val... |
def parse_enum_valid_value(self, sbe_enum, element):
'parse and return an enum validvalue'
attributes = self.parse_common_attributes(element, attributes=ENUM_VALID_VALUES_ATTRIBUTES_LIST)
value = element.text
enum_valid_value = createValidValue(value=value, **attributes)
return enum_valid_value | -1,096,921,606,398,139,300 | parse and return an enum validvalue | pysbe/parser/fix_parser.py | parse_enum_valid_value | bkc/pysbe | python | def parse_enum_valid_value(self, sbe_enum, element):
attributes = self.parse_common_attributes(element, attributes=ENUM_VALID_VALUES_ATTRIBUTES_LIST)
value = element.text
enum_valid_value = createValidValue(value=value, **attributes)
return enum_valid_value |
def parse_message(self, messageSchema, element):
'parse message, can be repeated'
attributes = self.parse_common_attributes(element, attributes=MESSAGE_ATTRIBUTES_LIST)
message = createMessage(**attributes)
messageSchema.addMessage(message)
self.parse_field_children(messageSchema, message, element) | -6,473,633,594,660,156,000 | parse message, can be repeated | pysbe/parser/fix_parser.py | parse_message | bkc/pysbe | python | def parse_message(self, messageSchema, element):
attributes = self.parse_common_attributes(element, attributes=MESSAGE_ATTRIBUTES_LIST)
message = createMessage(**attributes)
messageSchema.addMessage(message)
self.parse_field_children(messageSchema, message, element) |
def parse_field_children(self, messageSchema, parent: FieldCollection, element):
'parse child elements that fit in a fieldCollection'
for child_element in element:
if (child_element.tag not in self.VALID_MESSAGE_TYPES):
raise ValueError(f'invalid message/group child element {repr(child_eleme... | -4,653,781,715,196,204,000 | parse child elements that fit in a fieldCollection | pysbe/parser/fix_parser.py | parse_field_children | bkc/pysbe | python | def parse_field_children(self, messageSchema, parent: FieldCollection, element):
for child_element in element:
if (child_element.tag not in self.VALID_MESSAGE_TYPES):
raise ValueError(f'invalid message/group child element {repr(child_element.tag)}')
parser = getattr(self, f'parse_me... |
def parse_message_field(self, messageSchema, parent: FieldCollection, element) -> None:
'parse field Type'
attributes = self.parse_common_attributes(element, attributes=FIELD_ATTRIBUTES_LIST)
field = createField(**attributes)
field.validate(messageSchema)
parent.addField(field) | -1,781,270,552,327,019,000 | parse field Type | pysbe/parser/fix_parser.py | parse_message_field | bkc/pysbe | python | def parse_message_field(self, messageSchema, parent: FieldCollection, element) -> None:
attributes = self.parse_common_attributes(element, attributes=FIELD_ATTRIBUTES_LIST)
field = createField(**attributes)
field.validate(messageSchema)
parent.addField(field) |
def parse_message_group(self, messageSchema, parent: FieldCollection, element) -> None:
'parse field Type'
attributes = self.parse_common_attributes(element, attributes=GROUP_ATTRIBUTES_LIST)
group = createGroup(**attributes)
group.validate(messageSchema)
parent.addField(group)
self.parse_field_... | -5,951,012,801,918,320,000 | parse field Type | pysbe/parser/fix_parser.py | parse_message_group | bkc/pysbe | python | def parse_message_group(self, messageSchema, parent: FieldCollection, element) -> None:
attributes = self.parse_common_attributes(element, attributes=GROUP_ATTRIBUTES_LIST)
group = createGroup(**attributes)
group.validate(messageSchema)
parent.addField(group)
self.parse_field_children(messageSc... |
def parse_duration(time_str, log=logging.getLogger('{}.time_utils'.format(LOG_PREFIX))):
'Parse a time string e.g. (2h13m) into a timedelta object\n https://stackoverflow.com/questions/4628122/how-to-construct-a-timedelta-object-from-a-simple-string\n\n Arguments:\n - time_str: A string identifying a d... | -4,127,285,100,476,708,400 | Parse a time string e.g. (2h13m) into a timedelta object
https://stackoverflow.com/questions/4628122/how-to-construct-a-timedelta-object-from-a-simple-string
Arguments:
- time_str: A string identifying a duration. Use
- d: days
- h: hours
- m: minutes
- s: seconds
All options ... | time_utils/automation/lib/python/community/time_utils.py | parse_duration | cherub-i/openhab-rules-tools | python | def parse_duration(time_str, log=logging.getLogger('{}.time_utils'.format(LOG_PREFIX))):
'Parse a time string e.g. (2h13m) into a timedelta object\n https://stackoverflow.com/questions/4628122/how-to-construct-a-timedelta-object-from-a-simple-string\n\n Arguments:\n - time_str: A string identifying a d... |
def delta_to_datetime(td):
'Takes a Python timedelta Object and converts it to a ZonedDateTime from now.\n\n Arguments:\n - td: The Python datetime.timedelta Object\n\n Returns:\n A ZonedDateTime td from now.\n '
return ZonedDateTime.now().plusDays(td.days).plusSeconds(td.seconds).plusNan... | -1,148,001,927,989,460,700 | Takes a Python timedelta Object and converts it to a ZonedDateTime from now.
Arguments:
- td: The Python datetime.timedelta Object
Returns:
A ZonedDateTime td from now. | time_utils/automation/lib/python/community/time_utils.py | delta_to_datetime | cherub-i/openhab-rules-tools | python | def delta_to_datetime(td):
'Takes a Python timedelta Object and converts it to a ZonedDateTime from now.\n\n Arguments:\n - td: The Python datetime.timedelta Object\n\n Returns:\n A ZonedDateTime td from now.\n '
return ZonedDateTime.now().plusDays(td.days).plusSeconds(td.seconds).plusNan... |
def parse_duration_to_datetime(time_str, log=logging.getLogger('{}.time_utils'.format(LOG_PREFIX))):
'Parses the passed in time string (see parse_duration) and returns a\n ZonedDateTime that amount of time from now.\n\n Arguments:\n - time_str: A string identifying a duration. See parse_duration above\... | 2,824,344,283,550,933,000 | Parses the passed in time string (see parse_duration) and returns a
ZonedDateTime that amount of time from now.
Arguments:
- time_str: A string identifying a duration. See parse_duration above
Returns:
A ZonedDateTime time_str from now | time_utils/automation/lib/python/community/time_utils.py | parse_duration_to_datetime | cherub-i/openhab-rules-tools | python | def parse_duration_to_datetime(time_str, log=logging.getLogger('{}.time_utils'.format(LOG_PREFIX))):
'Parses the passed in time string (see parse_duration) and returns a\n ZonedDateTime that amount of time from now.\n\n Arguments:\n - time_str: A string identifying a duration. See parse_duration above\... |
def is_iso8601(dt_str):
'Returns True if dt_str conforms to ISO 8601\n Arguments:\n - dt_str: the String to check\n Returns:\n True if dt_str conforms to dt_str and False otherwise\n '
try:
if (iso8601_regex.match(dt_str) is not None):
return True
except:
p... | 6,834,307,859,551,796,000 | Returns True if dt_str conforms to ISO 8601
Arguments:
- dt_str: the String to check
Returns:
True if dt_str conforms to dt_str and False otherwise | time_utils/automation/lib/python/community/time_utils.py | is_iso8601 | cherub-i/openhab-rules-tools | python | def is_iso8601(dt_str):
'Returns True if dt_str conforms to ISO 8601\n Arguments:\n - dt_str: the String to check\n Returns:\n True if dt_str conforms to dt_str and False otherwise\n '
try:
if (iso8601_regex.match(dt_str) is not None):
return True
except:
p... |
def to_datetime(when, log=logging.getLogger('{}.time_utils'.format(LOG_PREFIX)), output='Java'):
"Based on what type when is, converts when to a Python DateTime object.\n Type:\n - int: returns now.plusMillis(when)\n - openHAB number type: returns now.plusMillis(when.intValue())\n - ISO8601 ... | 7,924,184,960,481,924,000 | Based on what type when is, converts when to a Python DateTime object.
Type:
- int: returns now.plusMillis(when)
- openHAB number type: returns now.plusMillis(when.intValue())
- ISO8601 string: DateTime(when)
- Duration definition: see parse_duration_to_datetime
- java ZonedDateTime
For python m... | time_utils/automation/lib/python/community/time_utils.py | to_datetime | cherub-i/openhab-rules-tools | python | def to_datetime(when, log=logging.getLogger('{}.time_utils'.format(LOG_PREFIX)), output='Java'):
"Based on what type when is, converts when to a Python DateTime object.\n Type:\n - int: returns now.plusMillis(when)\n - openHAB number type: returns now.plusMillis(when.intValue())\n - ISO8601 ... |
def to_today(when, log=logging.getLogger('{}.time_utils'.format(LOG_PREFIX)), output='Java'):
"Takes a when (see to_datetime) and updates the date to today.\n Arguments:\n - when : One of the types or formats supported by to_datetime\n - log: optional logger, when not supplied one is created for lo... | -304,641,836,008,533,200 | Takes a when (see to_datetime) and updates the date to today.
Arguments:
- when : One of the types or formats supported by to_datetime
- log: optional logger, when not supplied one is created for logging errors
Returns:
- ZonedDateTime specified by when with today's date.
- datetime specified by when wi... | time_utils/automation/lib/python/community/time_utils.py | to_today | cherub-i/openhab-rules-tools | python | def to_today(when, log=logging.getLogger('{}.time_utils'.format(LOG_PREFIX)), output='Java'):
"Takes a when (see to_datetime) and updates the date to today.\n Arguments:\n - when : One of the types or formats supported by to_datetime\n - log: optional logger, when not supplied one is created for lo... |
def get_template(name):
'Given the name of a template (an entire folder in the directory here)\n Return the full path to the folder, with the intention to copy it somewhere.\n '
template = os.path.join(here, name)
if os.path.exists(template):
return template | -8,811,136,433,118,892,000 | Given the name of a template (an entire folder in the directory here)
Return the full path to the folder, with the intention to copy it somewhere. | gridtest/templates/__init__.py | get_template | khinsen/gridtest | python | def get_template(name):
'Given the name of a template (an entire folder in the directory here)\n Return the full path to the folder, with the intention to copy it somewhere.\n '
template = os.path.join(here, name)
if os.path.exists(template):
return template |
def copy_template(name, dest):
'Given a template name and a destination directory, copy the template\n to the desination directory.\n '
template = get_template(name)
dest_dir = os.path.dirname(dest)
if (template and os.path.exists(dest_dir)):
shutil.copytree(template, dest)
retu... | 5,936,665,553,016,513,000 | Given a template name and a destination directory, copy the template
to the desination directory. | gridtest/templates/__init__.py | copy_template | khinsen/gridtest | python | def copy_template(name, dest):
'Given a template name and a destination directory, copy the template\n to the desination directory.\n '
template = get_template(name)
dest_dir = os.path.dirname(dest)
if (template and os.path.exists(dest_dir)):
shutil.copytree(template, dest)
retu... |
def draw_what_sheet(image: Image.Image) -> None:
'Draw a calendar page for a WHAT display.\n\n Args:\n image: The image to be drawn on to\n\n '
draw = ImageDraw.Draw(image)
draw.line([(7, 3), (392, 3)], fill=1)
for line in range(8):
draw.line([(((line * 55) + 7), 3), (((line * 55) +... | -982,108,587,062,840,300 | Draw a calendar page for a WHAT display.
Args:
image: The image to be drawn on to | inky_calendar.py | draw_what_sheet | nukes327/inky_monitor | python | def draw_what_sheet(image: Image.Image) -> None:
'Draw a calendar page for a WHAT display.\n\n Args:\n image: The image to be drawn on to\n\n '
draw = ImageDraw.Draw(image)
draw.line([(7, 3), (392, 3)], fill=1)
for line in range(8):
draw.line([(((line * 55) + 7), 3), (((line * 55) +... |
def get_shape(tensor, dynamic=False):
' Return shape of the input tensor without batch size.\n\n Parameters\n ----------\n tensor : tf.Tensor\n\n dynamic : bool\n If True, returns tensor which represents shape. If False, returns list of ints and/or Nones.\n\n Returns\n -------\n shape : ... | 8,010,232,841,342,494,000 | Return shape of the input tensor without batch size.
Parameters
----------
tensor : tf.Tensor
dynamic : bool
If True, returns tensor which represents shape. If False, returns list of ints and/or Nones.
Returns
-------
shape : tf.Tensor or list | batchflow/models/tf/utils.py | get_shape | bestetc/batchflow | python | def get_shape(tensor, dynamic=False):
' Return shape of the input tensor without batch size.\n\n Parameters\n ----------\n tensor : tf.Tensor\n\n dynamic : bool\n If True, returns tensor which represents shape. If False, returns list of ints and/or Nones.\n\n Returns\n -------\n shape : ... |
def get_num_dims(tensor):
' Return a number of semantic dimensions (i.e. excluding batch and channels axis)'
shape = get_shape(tensor)
dim = len(shape)
return max(1, (dim - 2)) | 505,323,808,096,459,400 | Return a number of semantic dimensions (i.e. excluding batch and channels axis) | batchflow/models/tf/utils.py | get_num_dims | bestetc/batchflow | python | def get_num_dims(tensor):
' '
shape = get_shape(tensor)
dim = len(shape)
return max(1, (dim - 2)) |
def get_channels_axis(data_format='channels_last'):
' Return the integer channels axis based on string data format. '
return (1 if ((data_format == 'channels_first') or data_format.startswith('NC')) else (- 1)) | 1,287,573,240,049,828,000 | Return the integer channels axis based on string data format. | batchflow/models/tf/utils.py | get_channels_axis | bestetc/batchflow | python | def get_channels_axis(data_format='channels_last'):
' '
return (1 if ((data_format == 'channels_first') or data_format.startswith('NC')) else (- 1)) |
def get_num_channels(tensor, data_format='channels_last'):
' Return number of channels in the input tensor.\n\n Parameters\n ----------\n tensor : tf.Tensor\n\n Returns\n -------\n shape : tuple of ints\n '
shape = tensor.get_shape().as_list()
axis = get_channels_axis(data_format)
r... | 8,800,103,316,646,686 | Return number of channels in the input tensor.
Parameters
----------
tensor : tf.Tensor
Returns
-------
shape : tuple of ints | batchflow/models/tf/utils.py | get_num_channels | bestetc/batchflow | python | def get_num_channels(tensor, data_format='channels_last'):
' Return number of channels in the input tensor.\n\n Parameters\n ----------\n tensor : tf.Tensor\n\n Returns\n -------\n shape : tuple of ints\n '
shape = tensor.get_shape().as_list()
axis = get_channels_axis(data_format)
r... |
def get_batch_size(tensor, dynamic=False):
' Return batch size (the length of the first dimension) of the input tensor.\n\n Parameters\n ----------\n tensor : tf.Tensor\n\n Returns\n -------\n batch size : int or None\n '
if dynamic:
return tf.shape(tensor)[0]
return tensor.get_... | 3,089,443,516,940,477,000 | Return batch size (the length of the first dimension) of the input tensor.
Parameters
----------
tensor : tf.Tensor
Returns
-------
batch size : int or None | batchflow/models/tf/utils.py | get_batch_size | bestetc/batchflow | python | def get_batch_size(tensor, dynamic=False):
' Return batch size (the length of the first dimension) of the input tensor.\n\n Parameters\n ----------\n tensor : tf.Tensor\n\n Returns\n -------\n batch size : int or None\n '
if dynamic:
return tf.shape(tensor)[0]
return tensor.get_... |
def get_spatial_dim(tensor):
' Return spatial dim of the input tensor (without channels and batch dimension).\n\n Parameters\n ----------\n tensor : tf.Tensor\n\n Returns\n -------\n dim : int\n '
return (len(tensor.get_shape().as_list()) - 2) | 7,268,385,630,642,926,000 | Return spatial dim of the input tensor (without channels and batch dimension).
Parameters
----------
tensor : tf.Tensor
Returns
-------
dim : int | batchflow/models/tf/utils.py | get_spatial_dim | bestetc/batchflow | python | def get_spatial_dim(tensor):
' Return spatial dim of the input tensor (without channels and batch dimension).\n\n Parameters\n ----------\n tensor : tf.Tensor\n\n Returns\n -------\n dim : int\n '
return (len(tensor.get_shape().as_list()) - 2) |
def get_spatial_shape(tensor, data_format='channels_last', dynamic=False):
' Return the tensor spatial shape (without batch and channels dimensions).\n\n Parameters\n ----------\n tensor : tf.Tensor\n\n dynamic : bool\n If True, returns tensor which represents shape. If False, returns list of int... | 1,553,030,828,239,486 | Return the tensor spatial shape (without batch and channels dimensions).
Parameters
----------
tensor : tf.Tensor
dynamic : bool
If True, returns tensor which represents shape. If False, returns list of ints and/or Nones.
Returns
-------
shape : tf.Tensor or list | batchflow/models/tf/utils.py | get_spatial_shape | bestetc/batchflow | python | def get_spatial_shape(tensor, data_format='channels_last', dynamic=False):
' Return the tensor spatial shape (without batch and channels dimensions).\n\n Parameters\n ----------\n tensor : tf.Tensor\n\n dynamic : bool\n If True, returns tensor which represents shape. If False, returns list of int... |
def stub_out_db_instance_api(stubs):
'Stubs out the db API for creating Instances.'
INSTANCE_TYPES = {'m1.tiny': dict(memory_mb=512, vcpus=1, root_gb=0, flavorid=1), 'm1.small': dict(memory_mb=2048, vcpus=1, root_gb=20, flavorid=2), 'm1.medium': dict(memory_mb=4096, vcpus=2, root_gb=40, flavorid=3), 'm1.large':... | 3,721,215,118,227,447,300 | Stubs out the db API for creating Instances. | nova/tests/vmwareapi/db_fakes.py | stub_out_db_instance_api | bopopescu/openstack-12 | python | def stub_out_db_instance_api(stubs):
INSTANCE_TYPES = {'m1.tiny': dict(memory_mb=512, vcpus=1, root_gb=0, flavorid=1), 'm1.small': dict(memory_mb=2048, vcpus=1, root_gb=20, flavorid=2), 'm1.medium': dict(memory_mb=4096, vcpus=2, root_gb=40, flavorid=3), 'm1.large': dict(memory_mb=8192, vcpus=4, root_gb=80, fla... |
def fake_instance_create(context, values):
'Stubs out the db.instance_create method.'
type_data = INSTANCE_TYPES[values['instance_type']]
base_options = {'name': values['name'], 'id': values['id'], 'uuid': utils.gen_uuid(), 'reservation_id': utils.generate_uid('r'), 'image_ref': values['image_ref'], 'kernel... | -2,338,449,893,014,719,500 | Stubs out the db.instance_create method. | nova/tests/vmwareapi/db_fakes.py | fake_instance_create | bopopescu/openstack-12 | python | def fake_instance_create(context, values):
type_data = INSTANCE_TYPES[values['instance_type']]
base_options = {'name': values['name'], 'id': values['id'], 'uuid': utils.gen_uuid(), 'reservation_id': utils.generate_uid('r'), 'image_ref': values['image_ref'], 'kernel_id': values['kernel_id'], 'ramdisk_id': v... |
def fake_network_get_by_instance(context, instance_id):
'Stubs out the db.network_get_by_instance method.'
fields = {'bridge': 'vmnet0', 'netmask': '255.255.255.0', 'gateway': '10.10.10.1', 'broadcast': '10.10.10.255', 'dns1': 'fake', 'vlan': 100}
return FakeModel(fields) | -3,446,393,075,820,079,000 | Stubs out the db.network_get_by_instance method. | nova/tests/vmwareapi/db_fakes.py | fake_network_get_by_instance | bopopescu/openstack-12 | python | def fake_network_get_by_instance(context, instance_id):
fields = {'bridge': 'vmnet0', 'netmask': '255.255.255.0', 'gateway': '10.10.10.1', 'broadcast': '10.10.10.255', 'dns1': 'fake', 'vlan': 100}
return FakeModel(fields) |
def test_udp_port(self):
' test UDP ports\n Check if there are no udp listeners before gtpu is enabled\n '
self._check_udp_port_ip4(False)
self._check_udp_port_ip6(False)
r = self.vapi.gtpu_add_del_tunnel(is_add=True, mcast_sw_if_index=4294967295, decap_next_index=4294967295, src_address=s... | 573,172,237,140,440,800 | test UDP ports
Check if there are no udp listeners before gtpu is enabled | test/test_gtpu.py | test_udp_port | B4dM4n/vpp | python | def test_udp_port(self):
' test UDP ports\n Check if there are no udp listeners before gtpu is enabled\n '
self._check_udp_port_ip4(False)
self._check_udp_port_ip6(False)
r = self.vapi.gtpu_add_del_tunnel(is_add=True, mcast_sw_if_index=4294967295, decap_next_index=4294967295, src_address=s... |
def encapsulate(self, pkt, vni):
'\n Encapsulate the original payload frame by adding GTPU header with its\n UDP, IP and Ethernet fields\n '
return ((((Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src=self.pg0.remote_ip4, dst=self.pg0.local_ip4)) / UDP(sport=self.dport, dport... | 8,759,027,516,574,093,000 | Encapsulate the original payload frame by adding GTPU header with its
UDP, IP and Ethernet fields | test/test_gtpu.py | encapsulate | B4dM4n/vpp | python | def encapsulate(self, pkt, vni):
'\n Encapsulate the original payload frame by adding GTPU header with its\n UDP, IP and Ethernet fields\n '
return ((((Ether(src=self.pg0.remote_mac, dst=self.pg0.local_mac) / IP(src=self.pg0.remote_ip4, dst=self.pg0.local_ip4)) / UDP(sport=self.dport, dport... |
def ip_range(self, start, end):
" range of remote ip's "
return ip4_range(self.pg0.remote_ip4, start, end) | 1,119,192,004,210,344,300 | range of remote ip's | test/test_gtpu.py | ip_range | B4dM4n/vpp | python | def ip_range(self, start, end):
" "
return ip4_range(self.pg0.remote_ip4, start, end) |
def encap_mcast(self, pkt, src_ip, src_mac, vni):
'\n Encapsulate the original payload frame by adding GTPU header with its\n UDP, IP and Ethernet fields\n '
return ((((Ether(src=src_mac, dst=self.mcast_mac) / IP(src=src_ip, dst=self.mcast_ip4)) / UDP(sport=self.dport, dport=self.dport, chk... | -5,837,505,097,817,672,000 | Encapsulate the original payload frame by adding GTPU header with its
UDP, IP and Ethernet fields | test/test_gtpu.py | encap_mcast | B4dM4n/vpp | python | def encap_mcast(self, pkt, src_ip, src_mac, vni):
'\n Encapsulate the original payload frame by adding GTPU header with its\n UDP, IP and Ethernet fields\n '
return ((((Ether(src=src_mac, dst=self.mcast_mac) / IP(src=src_ip, dst=self.mcast_ip4)) / UDP(sport=self.dport, dport=self.dport, chk... |
def decapsulate(self, pkt):
'\n Decapsulate the original payload frame by removing GTPU header\n '
return pkt[GTP_U_Header].payload | -5,324,461,435,278,782,000 | Decapsulate the original payload frame by removing GTPU header | test/test_gtpu.py | decapsulate | B4dM4n/vpp | python | def decapsulate(self, pkt):
'\n \n '
return pkt[GTP_U_Header].payload |
def test_encap(self):
' Encapsulation test\n Send frames from pg1\n Verify receipt of encapsulated frames on pg0\n '
self.pg1.add_stream([self.frame_reply])
self.pg0.enable_capture()
self.pg_start()
out = self.pg0.get_capture(1)
pkt = out[0]
self.check_encapsulation(pkt,... | -1,844,543,995,700,587,500 | Encapsulation test
Send frames from pg1
Verify receipt of encapsulated frames on pg0 | test/test_gtpu.py | test_encap | B4dM4n/vpp | python | def test_encap(self):
' Encapsulation test\n Send frames from pg1\n Verify receipt of encapsulated frames on pg0\n '
self.pg1.add_stream([self.frame_reply])
self.pg0.enable_capture()
self.pg_start()
out = self.pg0.get_capture(1)
pkt = out[0]
self.check_encapsulation(pkt,... |
def test_ucast_flood(self):
' Unicast flood test\n Send frames from pg3\n Verify receipt of encapsulated frames on pg0\n '
self.pg3.add_stream([self.frame_reply])
self.pg0.enable_capture()
self.pg_start()
out = self.pg0.get_capture(self.n_ucast_tunnels)
for pkt in out:
... | -7,930,271,950,726,271,000 | Unicast flood test
Send frames from pg3
Verify receipt of encapsulated frames on pg0 | test/test_gtpu.py | test_ucast_flood | B4dM4n/vpp | python | def test_ucast_flood(self):
' Unicast flood test\n Send frames from pg3\n Verify receipt of encapsulated frames on pg0\n '
self.pg3.add_stream([self.frame_reply])
self.pg0.enable_capture()
self.pg_start()
out = self.pg0.get_capture(self.n_ucast_tunnels)
for pkt in out:
... |
def test_mcast_flood(self):
' Multicast flood test\n Send frames from pg2\n Verify receipt of encapsulated frames on pg0\n '
self.pg2.add_stream([self.frame_reply])
self.pg0.enable_capture()
self.pg_start()
out = self.pg0.get_capture(1)
pkt = out[0]
self.check_encapsulat... | -8,496,937,217,177,894,000 | Multicast flood test
Send frames from pg2
Verify receipt of encapsulated frames on pg0 | test/test_gtpu.py | test_mcast_flood | B4dM4n/vpp | python | def test_mcast_flood(self):
' Multicast flood test\n Send frames from pg2\n Verify receipt of encapsulated frames on pg0\n '
self.pg2.add_stream([self.frame_reply])
self.pg0.enable_capture()
self.pg_start()
out = self.pg0.get_capture(1)
pkt = out[0]
self.check_encapsulat... |
@classmethod
def add_del_shared_mcast_dst_load(cls, is_add):
'\n add or del tunnels sharing the same mcast dst\n to test gtpu ref_count mechanism\n '
n_shared_dst_tunnels = 20
teid_start = 1000
teid_end = (teid_start + n_shared_dst_tunnels)
for teid in range(teid_start, teid_end... | -6,297,277,622,027,447,000 | add or del tunnels sharing the same mcast dst
to test gtpu ref_count mechanism | test/test_gtpu.py | add_del_shared_mcast_dst_load | B4dM4n/vpp | python | @classmethod
def add_del_shared_mcast_dst_load(cls, is_add):
'\n add or del tunnels sharing the same mcast dst\n to test gtpu ref_count mechanism\n '
n_shared_dst_tunnels = 20
teid_start = 1000
teid_end = (teid_start + n_shared_dst_tunnels)
for teid in range(teid_start, teid_end... |
@classmethod
def add_del_mcast_tunnels_load(cls, is_add):
'\n add or del tunnels to test gtpu stability\n '
n_distinct_dst_tunnels = 20
ip_range_start = 10
ip_range_end = (ip_range_start + n_distinct_dst_tunnels)
for dest_ip4 in ip4_range(cls.mcast_ip4, ip_range_start, ip_range_end):
... | -505,654,480,933,667,500 | add or del tunnels to test gtpu stability | test/test_gtpu.py | add_del_mcast_tunnels_load | B4dM4n/vpp | python | @classmethod
def add_del_mcast_tunnels_load(cls, is_add):
'\n \n '
n_distinct_dst_tunnels = 20
ip_range_start = 10
ip_range_end = (ip_range_start + n_distinct_dst_tunnels)
for dest_ip4 in ip4_range(cls.mcast_ip4, ip_range_start, ip_range_end):
teid = int(dest_ip4.split('.')[3])... |
def default_handlers(handlers=[], **handler_names):
'Tornado handlers'
gist_handler = _load_handler_from_location(handler_names['gist_handler'])
user_gists_handler = _load_handler_from_location(handler_names['user_gists_handler'])
return (handlers + [('/gist/([^\\/]+/)?([0-9]+|[0-9a-f]{20,})', gist_hand... | 6,064,056,627,304,257,000 | Tornado handlers | nbviewer/providers/gist/handlers.py | default_handlers | cybergis/nbviewer | python | def default_handlers(handlers=[], **handler_names):
gist_handler = _load_handler_from_location(handler_names['gist_handler'])
user_gists_handler = _load_handler_from_location(handler_names['user_gists_handler'])
return (handlers + [('/gist/([^\\/]+/)?([0-9]+|[0-9a-f]{20,})', gist_handler, {}), ('/gist/... |
def render_usergists_template(self, entries, user, provider_url, prev_url, next_url, **namespace):
'\n provider_url: str\n URL to the notebook document upstream at the provider (e.g., GitHub)\n executor_url: str, optional (kwarg passed into `namespace`)\n URL to execute the noteb... | -1,520,432,892,554,863,600 | provider_url: str
URL to the notebook document upstream at the provider (e.g., GitHub)
executor_url: str, optional (kwarg passed into `namespace`)
URL to execute the notebook document (e.g., Binder) | nbviewer/providers/gist/handlers.py | render_usergists_template | cybergis/nbviewer | python | def render_usergists_template(self, entries, user, provider_url, prev_url, next_url, **namespace):
'\n provider_url: str\n URL to the notebook document upstream at the provider (e.g., GitHub)\n executor_url: str, optional (kwarg passed into `namespace`)\n URL to execute the noteb... |
async def tree_get(self, user, gist_id, gist, files):
'\n user, gist_id, gist, and files are (most) of the values returned by parse_gist\n '
entries = []
ipynbs = []
others = []
for file in files.values():
e = {}
e['name'] = file['filename']
if file['filename'].... | 5,717,998,368,181,414,000 | user, gist_id, gist, and files are (most) of the values returned by parse_gist | nbviewer/providers/gist/handlers.py | tree_get | cybergis/nbviewer | python | async def tree_get(self, user, gist_id, gist, files):
'\n \n '
entries = []
ipynbs = []
others = []
for file in files.values():
e = {}
e['name'] = file['filename']
if file['filename'].endswith('.ipynb'):
e['url'] = quote(('/%s/%s' % (gist_id, file['f... |
async def get_notebook_data(self, gist_id, filename, many_files_gist, file):
'\n gist_id, filename, many_files_gist, file are all passed to file_get\n '
if (file['type'] or '').startswith('image/'):
self.log.debug('Fetching raw image (%s) %s/%s: %s', file['type'], gist_id, filename, file['... | -7,604,107,273,506,377,000 | gist_id, filename, many_files_gist, file are all passed to file_get | nbviewer/providers/gist/handlers.py | get_notebook_data | cybergis/nbviewer | python | async def get_notebook_data(self, gist_id, filename, many_files_gist, file):
'\n \n '
if (file['type'] or ).startswith('image/'):
self.log.debug('Fetching raw image (%s) %s/%s: %s', file['type'], gist_id, filename, file['raw_url'])
response = (await self.fetch(file['raw_url']))
... |
async def deliver_notebook(self, user, gist_id, filename, gist, file, content):
'\n user, gist_id, filename, gist, file, are the same values as those\n passed into file_get, whereas content is returned from\n get_notebook_data using user, gist_id, filename, gist, and file.\n '
execut... | 6,513,723,941,740,857,000 | user, gist_id, filename, gist, file, are the same values as those
passed into file_get, whereas content is returned from
get_notebook_data using user, gist_id, filename, gist, and file. | nbviewer/providers/gist/handlers.py | deliver_notebook | cybergis/nbviewer | python | async def deliver_notebook(self, user, gist_id, filename, gist, file, content):
'\n user, gist_id, filename, gist, file, are the same values as those\n passed into file_get, whereas content is returned from\n get_notebook_data using user, gist_id, filename, gist, and file.\n '
execut... |
@cached
async def get(self, user, gist_id, filename=''):
'\n Encompasses both the case of a single file gist, handled by\n `file_get`, as well as a many-file gist, handled by `tree_get`.\n '
parsed_gist = (await self.parse_gist(user, gist_id, filename))
if (parsed_gist is not None):
... | -9,108,773,499,648,490,000 | Encompasses both the case of a single file gist, handled by
`file_get`, as well as a many-file gist, handled by `tree_get`. | nbviewer/providers/gist/handlers.py | get | cybergis/nbviewer | python | @cached
async def get(self, user, gist_id, filename=):
'\n Encompasses both the case of a single file gist, handled by\n `file_get`, as well as a many-file gist, handled by `tree_get`.\n '
parsed_gist = (await self.parse_gist(user, gist_id, filename))
if (parsed_gist is not None):
... |
def map_and_load(self, path: str, exec_now: bool=False):
"Map and load a module into memory.\n\n The specified module would be mapped and loaded into the address set\n in the `next_image_base` member. It is the caller's responsibility to\n make sure that the memory is available.\n\n On s... | 4,001,441,927,666,838,500 | Map and load a module into memory.
The specified module would be mapped and loaded into the address set
in the `next_image_base` member. It is the caller's responsibility to
make sure that the memory is available.
On success, `next_image_base` will be updated accordingly.
Args:
path : path of the module bina... | qiling/qiling/loader/pe_uefi.py | map_and_load | mrTavas/owasp-fstm-auto | python | def map_and_load(self, path: str, exec_now: bool=False):
"Map and load a module into memory.\n\n The specified module would be mapped and loaded into the address set\n in the `next_image_base` member. It is the caller's responsibility to\n make sure that the memory is available.\n\n On s... |
def call_function(self, addr: int, args: Sequence[int], ret: int):
'Call a function after properly setting up its arguments and return address.\n\n Args:\n addr : function address\n args : a sequence of arguments to pass to the function; may be empty\n ret : return address; ... | 7,733,981,989,651,165,000 | Call a function after properly setting up its arguments and return address.
Args:
addr : function address
args : a sequence of arguments to pass to the function; may be empty
ret : return address; may be None | qiling/qiling/loader/pe_uefi.py | call_function | mrTavas/owasp-fstm-auto | python | def call_function(self, addr: int, args: Sequence[int], ret: int):
'Call a function after properly setting up its arguments and return address.\n\n Args:\n addr : function address\n args : a sequence of arguments to pass to the function; may be empty\n ret : return address; ... |
def execute_module(self, path: str, image_base: int, entry_point: int, eoe_trap: int):
'Start the execution of a UEFI module.\n\n Args:\n image_base : module base address\n entry_point : module entry point address\n eoe_trap : end-of-execution trap address; may be None\n ... | 5,655,954,296,241,916,000 | Start the execution of a UEFI module.
Args:
image_base : module base address
entry_point : module entry point address
eoe_trap : end-of-execution trap address; may be None | qiling/qiling/loader/pe_uefi.py | execute_module | mrTavas/owasp-fstm-auto | python | def execute_module(self, path: str, image_base: int, entry_point: int, eoe_trap: int):
'Start the execution of a UEFI module.\n\n Args:\n image_base : module base address\n entry_point : module entry point address\n eoe_trap : end-of-execution trap address; may be None\n ... |
def _assert_setitem_series_conversion(self, original_series, loc_value, expected_series, expected_dtype):
"test series value's coercion triggered by assignment"
temp = original_series.copy()
temp[1] = loc_value
tm.assert_series_equal(temp, expected_series)
assert (temp.dtype == expected_dtype) | -620,337,551,841,168,800 | test series value's coercion triggered by assignment | pandas/tests/indexing/test_coercion.py | _assert_setitem_series_conversion | 701KHK1915/8-PANDAS | python | def _assert_setitem_series_conversion(self, original_series, loc_value, expected_series, expected_dtype):
temp = original_series.copy()
temp[1] = loc_value
tm.assert_series_equal(temp, expected_series)
assert (temp.dtype == expected_dtype) |
def _assert_setitem_index_conversion(self, original_series, loc_key, expected_index, expected_dtype):
"test index's coercion triggered by assign key"
temp = original_series.copy()
temp[loc_key] = 5
exp = pd.Series([1, 2, 3, 4, 5], index=expected_index)
tm.assert_series_equal(temp, exp)
assert (t... | -979,596,171,037,217,800 | test index's coercion triggered by assign key | pandas/tests/indexing/test_coercion.py | _assert_setitem_index_conversion | 701KHK1915/8-PANDAS | python | def _assert_setitem_index_conversion(self, original_series, loc_key, expected_index, expected_dtype):
temp = original_series.copy()
temp[loc_key] = 5
exp = pd.Series([1, 2, 3, 4, 5], index=expected_index)
tm.assert_series_equal(temp, exp)
assert (temp.index.dtype == expected_dtype)
temp = o... |
def _assert_insert_conversion(self, original, value, expected, expected_dtype):
'test coercion triggered by insert'
target = original.copy()
res = target.insert(1, value)
tm.assert_index_equal(res, expected)
assert (res.dtype == expected_dtype) | -525,057,754,933,178,100 | test coercion triggered by insert | pandas/tests/indexing/test_coercion.py | _assert_insert_conversion | 701KHK1915/8-PANDAS | python | def _assert_insert_conversion(self, original, value, expected, expected_dtype):
target = original.copy()
res = target.insert(1, value)
tm.assert_index_equal(res, expected)
assert (res.dtype == expected_dtype) |
def _assert_where_conversion(self, original, cond, values, expected, expected_dtype):
'test coercion triggered by where'
target = original.copy()
res = target.where(cond, values)
tm.assert_equal(res, expected)
assert (res.dtype == expected_dtype) | 6,380,131,108,986,973,000 | test coercion triggered by where | pandas/tests/indexing/test_coercion.py | _assert_where_conversion | 701KHK1915/8-PANDAS | python | def _assert_where_conversion(self, original, cond, values, expected, expected_dtype):
target = original.copy()
res = target.where(cond, values)
tm.assert_equal(res, expected)
assert (res.dtype == expected_dtype) |
def _assert_fillna_conversion(self, original, value, expected, expected_dtype):
'test coercion triggered by fillna'
target = original.copy()
res = target.fillna(value)
tm.assert_equal(res, expected)
assert (res.dtype == expected_dtype) | -1,228,754,256,084,262,400 | test coercion triggered by fillna | pandas/tests/indexing/test_coercion.py | _assert_fillna_conversion | 701KHK1915/8-PANDAS | python | def _assert_fillna_conversion(self, original, value, expected, expected_dtype):
target = original.copy()
res = target.fillna(value)
tm.assert_equal(res, expected)
assert (res.dtype == expected_dtype) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.