query
stringlengths
9
9.05k
document
stringlengths
10
222k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
4
10
document_rank
stringclasses
2 values
Tagging Criteria containing retention tag for adhoc backup.
def tagging_criteria(self) -> pulumi.Input['AdhocBasedTaggingCriteriaArgs']: return pulumi.get(self, "tagging_criteria")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tagging_criteria(self) -> 'outputs.AdhocBasedTaggingCriteriaResponse':\n return pulumi.get(self, \"tagging_criteria\")", "def tagging_criteria(self) -> pulumi.Input[Sequence[pulumi.Input['TaggingCriteriaArgs']]]:\n return pulumi.get(self, \"tagging_criteria\")", "def retention_interval(self) ...
[ "0.512986", "0.5116565", "0.50759995", "0.50680023", "0.50338006", "0.49056616", "0.48794648", "0.4851937", "0.4679422", "0.4583592", "0.44604668", "0.4452592", "0.44318685", "0.43845296", "0.4357261", "0.43465194", "0.43298987", "0.43232423", "0.43131796", "0.4294255", "0.42...
0.5456821
0
BackupType ; Full/Incremental etc
def backup_type(self) -> pulumi.Input[str]: return pulumi.get(self, "backup_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backup_type(self) -> str:\n return pulumi.get(self, \"backup_type\")", "def __makeBackup(self):\n pass #FIXME!!!", "def test_backup_with_compress_flag(self):\n gen = BlobGenerator(\"ent-backup\", \"ent-backup-\", self.value_size,\n end=self.num_items)\n ...
[ "0.7215503", "0.67244494", "0.6484654", "0.64501673", "0.63010424", "0.62281334", "0.6176586", "0.6167723", "0.606157", "0.5901424", "0.58989316", "0.5850878", "0.5800665", "0.57918626", "0.57901514", "0.5707677", "0.56977606", "0.5649737", "0.5631627", "0.56304663", "0.56195...
0.68206203
1
Gets or sets the data source information.
def data_source_info(self) -> pulumi.Input['DatasourceArgs']: return pulumi.get(self, "data_source_info")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def data_source_info(self) -> 'outputs.DatasourceResponse':\n return pulumi.get(self, \"data_source_info\")", "def data_source_set_info(self) -> Optional[pulumi.Input['DatasourceSetArgs']]:\n return pulumi.get(self, \"data_source_set_info\")", "def get_datasource(self):\n return None", "...
[ "0.75590134", "0.73536307", "0.716036", "0.71266514", "0.6862567", "0.67499715", "0.67252916", "0.67252916", "0.67252916", "0.6581912", "0.6573053", "0.6483894", "0.6464943", "0.6375144", "0.63499516", "0.62679535", "0.62139446", "0.6180138", "0.6067901", "0.6064962", "0.5994...
0.7549123
1
Gets or sets the policy information.
def policy_info(self) -> pulumi.Input['PolicyInfoArgs']: return pulumi.get(self, "policy_info")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def policy_info(self) -> 'outputs.PolicyInfoResponse':\n return pulumi.get(self, \"policy_info\")", "def policy(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"policy\")", "def policy(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"policy\")", "def policy(self) -> pulum...
[ "0.8096558", "0.75693375", "0.75693375", "0.75693375", "0.7531359", "0.7435671", "0.74054617", "0.74054617", "0.73719686", "0.73183817", "0.73183817", "0.73183817", "0.73152965", "0.73152965", "0.73152965", "0.7289983", "0.72424453", "0.72424453", "0.72099376", "0.7140712", "...
0.79712874
1
Gets or sets the data source set information.
def data_source_set_info(self) -> Optional[pulumi.Input['DatasourceSetArgs']]: return pulumi.get(self, "data_source_set_info")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def data_source_set_info(self) -> Optional['outputs.DatasourceSetResponse']:\n return pulumi.get(self, \"data_source_set_info\")", "def data_source_info(self) -> 'outputs.DatasourceResponse':\n return pulumi.get(self, \"data_source_info\")", "def data_source_info(self) -> pulumi.Input['Datasource...
[ "0.7884515", "0.6915923", "0.68967354", "0.6632009", "0.6423846", "0.63412696", "0.6287178", "0.6263025", "0.6253388", "0.61486983", "0.6148637", "0.6064526", "0.6058136", "0.5996255", "0.5996255", "0.5996255", "0.5955794", "0.588024", "0.586139", "0.5834371", "0.5793308", ...
0.8067465
0
Credentials to use to authenticate with data source provider.
def datasource_auth_credentials(self) -> Optional[pulumi.Input['SecretStoreBasedAuthCredentialsArgs']]: return pulumi.get(self, "datasource_auth_credentials")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def datasource_auth_credentials(self) -> Optional['outputs.SecretStoreBasedAuthCredentialsResponse']:\n return pulumi.get(self, \"datasource_auth_credentials\")", "def set_credentials():", "def _get_credentials(self):\n if self.config_file:\n with open(self.config_file) as f:\n ...
[ "0.69238144", "0.67338276", "0.66479945", "0.6596178", "0.6358507", "0.63536966", "0.6351446", "0.63486385", "0.62328255", "0.62007207", "0.6150011", "0.61444044", "0.6096688", "0.60815525", "0.60569346", "0.60471785", "0.6037918", "0.600526", "0.5992395", "0.59530324", "0.59...
0.7254761
0
Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc
def policy_rules(self) -> pulumi.Input[Sequence[pulumi.Input[Union['AzureBackupRuleArgs', 'AzureRetentionRuleArgs']]]]: return pulumi.get(self, "policy_rules")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def policy_rules(self) -> Sequence[Any]:\n return pulumi.get(self, \"policy_rules\")", "def rules_dict(self) -> Dict[str, Dict[str, str]]:\n if self._cached_rules_dict is not None:\n return self._cached_rules_dict\n\n rules_index_dict = json.loads(\n constants.get_packa...
[ "0.57562774", "0.55658984", "0.5460134", "0.54329795", "0.54177535", "0.5401266", "0.5367468", "0.5348334", "0.5296654", "0.5216118", "0.52005774", "0.5188352", "0.51793575", "0.5166783", "0.5127975", "0.5122451", "0.5108602", "0.50852805", "0.5071231", "0.50530446", "0.50362...
0.60675246
0
Parameters to be used during configuration of backup of blobs
def __init__(__self__, *, containers_list: pulumi.Input[Sequence[pulumi.Input[str]]], object_type: pulumi.Input[str]): pulumi.set(__self__, "containers_list", containers_list) pulumi.set(__self__, "object_type", 'BlobBackupDatasourceParameters')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(__self__, *,\n containers_list: Sequence[str],\n object_type: str):\n pulumi.set(__self__, \"containers_list\", containers_list)\n pulumi.set(__self__, \"object_type\", 'BlobBackupDatasourceParameters')", "def __init__(self, name, config):\n self....
[ "0.6018418", "0.57194746", "0.56884426", "0.5668436", "0.5660915", "0.5602261", "0.5565859", "0.5490772", "0.5464575", "0.5461231", "0.5429405", "0.54291284", "0.54176", "0.5393472", "0.5377446", "0.53701556", "0.5330117", "0.5327307", "0.5291257", "0.5276703", "0.5276703", ...
0.61531687
0
Copy on Expiry Option
def __init__(__self__, *, object_type: pulumi.Input[str]): pulumi.set(__self__, "object_type", 'CopyOnExpiryOption')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(__self__, *,\n object_type: str):\n pulumi.set(__self__, \"object_type\", 'CopyOnExpiryOption')", "def expires(self, value):\n value = util.parse_valid_date(value)\n self._set_attr('expires', value)", "def _extend_expiration_time(self, fname=None):\n if ...
[ "0.619862", "0.61631906", "0.6056428", "0.602876", "0.5986575", "0.5877878", "0.57751095", "0.5766212", "0.5728372", "0.56796914", "0.56761634", "0.56736565", "0.5647848", "0.5642663", "0.5592296", "0.5591483", "0.55881524", "0.5573781", "0.55664426", "0.55599076", "0.552889"...
0.6222569
0
Duration based custom options to copy
def __init__(__self__, *, object_type: pulumi.Input[str], duration: Optional[pulumi.Input[str]] = None): pulumi.set(__self__, "object_type", 'CustomCopyOption') if duration is not None: pulumi.set(__self__, "duration", duration)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(__self__, *,\n object_type: str,\n duration: Optional[str] = None):\n pulumi.set(__self__, \"object_type\", 'CustomCopyOption')\n if duration is not None:\n pulumi.set(__self__, \"duration\", duration)", "def __init__(self, duration, start, st...
[ "0.6862285", "0.5868531", "0.57912177", "0.5661205", "0.55611336", "0.55445075", "0.5538626", "0.54778814", "0.5454411", "0.5444886", "0.5430659", "0.54281044", "0.542383", "0.54214615", "0.54214615", "0.53864545", "0.53864545", "0.5371798", "0.53583753", "0.5323975", "0.5288...
0.6926607
0
Parameters for Kubernetes Cluster Backup Datasource
def __init__(__self__, *, include_cluster_scope_resources: pulumi.Input[bool], object_type: pulumi.Input[str], snapshot_volumes: pulumi.Input[bool], excluded_namespaces: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, exclu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(__self__, *,\n include_cluster_scope_resources: bool,\n object_type: str,\n snapshot_volumes: bool,\n excluded_namespaces: Optional[Sequence[str]] = None,\n excluded_resource_types: Optional[Sequence[str]] = None,\n ...
[ "0.65925884", "0.63682824", "0.6335676", "0.5708515", "0.5623292", "0.5556613", "0.5464543", "0.53439295", "0.5286605", "0.52634084", "0.5253795", "0.5118217", "0.50676066", "0.50225747", "0.4969119", "0.49573535", "0.49464455", "0.4939049", "0.49388227", "0.49362847", "0.493...
0.710096
0
Gets or sets the include cluster resources property. This property if enabled will include cluster scope resources during restore.
def include_cluster_scope_resources(self) -> pulumi.Input[bool]: return pulumi.get(self, "include_cluster_scope_resources")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def include_cluster_scope_resources(self) -> bool:\n return pulumi.get(self, \"include_cluster_scope_resources\")", "def cluster_resource_restore_scope(self) -> Optional[pulumi.Input['ClusterResourceRestoreScopeArgs']]:\n return pulumi.get(self, \"cluster_resource_restore_scope\")", "def resource...
[ "0.7343263", "0.60120964", "0.556491", "0.556491", "0.556491", "0.556491", "0.5564127", "0.54990435", "0.54468966", "0.5367927", "0.5347967", "0.5347967", "0.5347967", "0.5327018", "0.52269936", "0.52251977", "0.5209365", "0.51744527", "0.5140345", "0.5093166", "0.50835544", ...
0.74428254
0
Gets or sets the exclude resource types property. This property sets the resource types to be excluded during restore.
def excluded_resource_types(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: return pulumi.get(self, "excluded_resource_types")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def excluded_resource_types(self) -> Optional[Sequence[str]]:\n return pulumi.get(self, \"excluded_resource_types\")", "def excludes(self) -> Set:\n if self._excludes is None:\n manifest = self._get_manifest()\n self._excludes = manifest[\"files\"][\"excludes\"]\n\n ret...
[ "0.7825609", "0.6543331", "0.6409233", "0.6290658", "0.61532205", "0.60402614", "0.6011158", "0.59279233", "0.5913899", "0.59135956", "0.57552916", "0.5684337", "0.5684337", "0.55710495", "0.5533531", "0.5523392", "0.54886454", "0.54656905", "0.5414614", "0.53041255", "0.5297...
0.7609018
1
Gets or sets the include namespaces property. This property sets the namespaces to be included during restore.
def included_namespaces(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: return pulumi.get(self, "included_namespaces")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def included_namespaces(self) -> Optional[Sequence[str]]:\n return pulumi.get(self, \"included_namespaces\")", "def namespaces(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:\n return pulumi.get(self, \"namespaces\")", "def namespaces(self):\n if not self._namespaces:\n ...
[ "0.659927", "0.5581146", "0.55532175", "0.54933363", "0.5478107", "0.5474242", "0.5474242", "0.53990406", "0.5392762", "0.5342906", "0.5342906", "0.53105736", "0.5229174", "0.5221067", "0.5201948", "0.51790524", "0.5177969", "0.51693755", "0.51572084", "0.5129574", "0.5098706...
0.6340288
1
Gets or sets the include resource types property. This property sets the resource types to be included during restore.
def included_resource_types(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: return pulumi.get(self, "included_resource_types")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def included_resource_types(self) -> Optional[Sequence[str]]:\n return pulumi.get(self, \"included_resource_types\")", "def resource_types(self) -> Sequence[str]:\n return pulumi.get(self, \"resource_types\")", "def resource_types(self) -> ConfigNodePropertyArray:\n return self._resource_t...
[ "0.757377", "0.6788042", "0.63652754", "0.6054983", "0.5867822", "0.5835522", "0.5703689", "0.5703346", "0.5672201", "0.55240357", "0.5462959", "0.54628754", "0.5461283", "0.5427511", "0.5427511", "0.5427511", "0.5427511", "0.5374758", "0.53386927", "0.5329069", "0.53275585",...
0.7434583
1
Gets or sets the LabelSelectors property. This property sets the resource with such label selectors to be included during restore.
def label_selectors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: return pulumi.get(self, "label_selectors")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def label_selectors(self) -> Optional[Sequence[str]]:\n return pulumi.get(self, \"label_selectors\")", "def selectors(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['SelectorArgs']]]]:\n return pulumi.get(self, \"selectors\")", "def labels(self):\n return self._labels", "def labels...
[ "0.6914534", "0.5572962", "0.5504074", "0.5504074", "0.5504074", "0.5504074", "0.5504074", "0.5504074", "0.5488628", "0.54406863", "0.54388607", "0.5263123", "0.5258452", "0.5245797", "0.52228844", "0.52215075", "0.5137084", "0.5092222", "0.50849134", "0.50842905", "0.5077066...
0.6586224
1
Settings for Azure Monitor based alerts
def azure_monitor_alert_settings(self) -> Optional[pulumi.Input['AzureMonitorAlertSettingsArgs']]: return pulumi.get(self, "azure_monitor_alert_settings")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def azure_monitor_alert_settings(self) -> Optional['outputs.AzureMonitorAlertSettingsResponse']:\n return pulumi.get(self, \"azure_monitor_alert_settings\")", "def set_up_azure_monitor_profile(self, mc: ManagedCluster) -> ManagedCluster:\n self._ensure_mc(mc)\n # read the original value pass...
[ "0.71577626", "0.60129887", "0.5683597", "0.56741583", "0.56523335", "0.55952334", "0.55066997", "0.54139704", "0.53262174", "0.52870804", "0.5197493", "0.51919997", "0.517192", "0.5122524", "0.5119399", "0.50967675", "0.5094665", "0.5071173", "0.5046851", "0.5046249", "0.504...
0.73235637
0
Gets or sets the Backup Data Source Parameters
def backup_datasource_parameters_list(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[Union['BlobBackupDatasourceParametersArgs', 'KubernetesClusterBackupDatasourceParametersArgs']]]]]: return pulumi.get(self, "backup_datasource_parameters_list")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backup_datasource_parameters_list(self) -> Optional[Sequence[Any]]:\n return pulumi.get(self, \"backup_datasource_parameters_list\")", "def alternate_data_source_parameters(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['DataSourceParametersArgs']]]]:\n return pulumi.get(self, \"alternate...
[ "0.65967256", "0.6167608", "0.60494995", "0.57744884", "0.5750568", "0.56374073", "0.5545736", "0.55366623", "0.55174905", "0.5504011", "0.54434407", "0.5417025", "0.5359193", "0.53465897", "0.52679724", "0.5253878", "0.5172687", "0.51035506", "0.50621635", "0.5059192", "0.50...
0.65284705
1
List of critical operations which are not protected by this resourceGuard
def vault_critical_operation_exclusion_list(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: return pulumi.get(self, "vault_critical_operation_exclusion_list")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vault_critical_operation_exclusion_list(self) -> Optional[Sequence[str]]:\n return pulumi.get(self, \"vault_critical_operation_exclusion_list\")", "def vault_critical_operation(self) -> str:\n return pulumi.get(self, \"vault_critical_operation\")", "def resource_guard_operations(self) -> Sequ...
[ "0.70377547", "0.61508566", "0.6149599", "0.6029687", "0.5782031", "0.57352316", "0.5728801", "0.5682676", "0.5630311", "0.5630311", "0.5629544", "0.5612101", "0.55513245", "0.551914", "0.5463921", "0.5458725", "0.5423385", "0.5415712", "0.5282814", "0.5280494", "0.5263334", ...
0.68795717
1
Schedule for this backup
def schedule(self) -> pulumi.Input['BackupScheduleArgs']: return pulumi.get(self, "schedule")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def schedule(self) -> 'outputs.BackupScheduleResponse':\n return pulumi.get(self, \"schedule\")", "def schedule_task(self, name, date):\n pass", "def backup(ctx):\n config_path = ctx.obj['config_path']\n logger = ctx.obj['logger']\n\n config = Config(config_path)\n scheduler = Blockin...
[ "0.7043391", "0.6812066", "0.66431814", "0.64206386", "0.63974744", "0.62273985", "0.6215872", "0.61957705", "0.6135774", "0.60673666", "0.60673666", "0.60330683", "0.6032389", "0.59822303", "0.588805", "0.587709", "0.587255", "0.5851956", "0.58401006", "0.58399695", "0.58159...
0.70583266
0
Gets or sets the type of secret store
def secret_store_type(self) -> pulumi.Input[Union[str, 'SecretStoreType']]: return pulumi.get(self, "secret_store_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def secret_store_type(self) -> str:\n return pulumi.get(self, \"secret_store_type\")", "def secret_type(self) -> Optional[str]:\n return pulumi.get(self, \"secret_type\")", "def secret_type(self) -> Optional[str]:\n return pulumi.get(self, \"secret_type\")", "def secret_store(self) -> Op...
[ "0.86437297", "0.74055386", "0.74055386", "0.70122814", "0.687414", "0.663541", "0.65290064", "0.65290064", "0.65239507", "0.65239507", "0.65239507", "0.64956546", "0.62622714", "0.62588483", "0.6237899", "0.62309027", "0.62309027", "0.62309027", "0.615531", "0.6068672", "0.6...
0.83322126
1
Soft delete related settings
def soft_delete_settings(self) -> Optional[pulumi.Input['SoftDeleteSettingsArgs']]: return pulumi.get(self, "soft_delete_settings")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def undo_settings(self):\r\n cF.undo_settings()", "def soft_delete_settings(self) -> Optional['outputs.SoftDeleteSettingsResponse']:\n return pulumi.get(self, \"soft_delete_settings\")", "def soft_delete(self, instance):\n self.destroy(instance)", "def reset_settings():\n settings = S...
[ "0.6860034", "0.6850951", "0.668494", "0.6635679", "0.64225626", "0.64130825", "0.62901175", "0.6284274", "0.6284274", "0.6183021", "0.6152017", "0.6133716", "0.6126548", "0.61198574", "0.6085266", "0.6081306", "0.60494757", "0.6024585", "0.59995246", "0.5980518", "0.59538245...
0.70361614
0
Gets or sets the type of the datastore.
def datastore_type(self) -> Optional[pulumi.Input[Union[str, 'StorageSettingStoreTypes']]]: return pulumi.get(self, "datastore_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def datastore_type(self) -> Optional[str]:\n return pulumi.get(self, \"datastore_type\")", "def data_store_type(self) -> str:\n return pulumi.get(self, \"data_store_type\")", "def data_store_type(self) -> str:\n return pulumi.get(self, \"data_store_type\")", "def data_store_type(self) ->...
[ "0.83830196", "0.7282083", "0.7282083", "0.7005503", "0.7005503", "0.7005503", "0.68426", "0.67546064", "0.6690773", "0.6659043", "0.66421914", "0.6623806", "0.66209894", "0.66209894", "0.6607081", "0.6566162", "0.6566162", "0.6554883", "0.6511155", "0.6494774", "0.64919704",...
0.7673924
1
Instantiates a wrapper object. If no key or password are provided, test credentials are used.
def __init__ (self, key = None, password = None): self.KEY = key or 'testapi' self.PASSWORD = password or 'testpass' self.URL = 'https://api.internet.bs/' # assume we use test credential if none were provided if not key or not password: self.URL = 'https://testapi.int...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, username, password):\n self.username = username\n self.password = password\n self.privkey = None\n\n # sets self.privkey\n self.__set_or_create_key_if_not_exist()", "def __init__(self, key_id: str, user: str, password: str):\n\n self.key_id = key_id\n ...
[ "0.68325883", "0.6495225", "0.6491945", "0.6358254", "0.6236218", "0.6178432", "0.6178285", "0.611396", "0.6088939", "0.60862464", "0.60674316", "0.6048542", "0.6036135", "0.5967444", "0.5954972", "0.5954963", "0.59548664", "0.5954423", "0.5937249", "0.59283173", "0.5919976",...
0.7006819
0
The command is intended to check whether a domain is available for registration or not. The command is not generating any cost.
def domain_check(self, domain, raw=False): endpoint = '/Domain/Check' params = { 'Domain' : domain, } response = self.__perform_get_request(endpoint, params) if response.status_code == 200: parsed_response = response.json() if raw: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def domain_command():\n # 1. Get input host from Demisto\n domain = demisto.args().get('domain')\n # 2. Get the host reputation from SlashNext API\n response = domain_lookup(domain=domain)\n if response.get('errorNo') != 0:\n return\n # 3. Parse and format the response\n dbot_score_cont...
[ "0.6168885", "0.54719186", "0.5409004", "0.53872854", "0.5354795", "0.53477466", "0.53159434", "0.52927786", "0.52507544", "0.5250052", "0.52436876", "0.5229238", "0.5219758", "0.52093047", "0.52028215", "0.5197591", "0.51877826", "0.51853925", "0.51762986", "0.5162448", "0.5...
0.6007156
1
The command is intended to update a domain, including Registrant Contact, Billing Contact, Admin Contact, Tech. Contact, registrar locks status, epp auth info, name servers, private whois status, etc... The command takes exactly the same parameters as domain_create, however only Domain ismandatory, all other parameters...
def domain_update(self, domain, contact_info, raw=True, **kwargs): endpoint = '/Domain/Update' params = { 'Domain' : domain } params.update(contact_info) params.update(kwargs) response = self.__perform_get_request(endpoint, params) if response.stat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update(domain_id, name, sensitive):\n domain = get(domain_id)\n domain.name = name\n domain.sensitive = sensitive\n database.update(domain)", "def set_keystone_v3_domain(self, **kwargs):\n LOG_OBJ.debug(\"Creating the domain.\")\n\n _url = \"http://\" + self.host_ip + \":35357/v3/do...
[ "0.64811015", "0.6210318", "0.60436493", "0.59955615", "0.5990337", "0.59827375", "0.57583463", "0.55781895", "0.55450356", "0.54974914", "0.5489345", "0.5418793", "0.5397181", "0.53931963", "0.5383751", "0.53837454", "0.53708124", "0.5324803", "0.53238237", "0.5300221", "0.5...
0.674504
0
The command is intended to remove a DNS record from a specific zone. While the command accepts the same parameters as /Domain/DnsRecord/Add, you only need to pass the credentials (API Key and Password), the FullRecordName and Type, all other parameters are optional and are required only when there is a possibility of a...
def dns_remove(self, full_record_name, record_type, value=None, raw=False, **kwargs): endpoint = '/Domain/DnsRecord/Remove' params = { 'FullRecordName' : full_record_name, 'Type': record_type, } params.update(kwargs) if record_type not in VALID_DNS_REC...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove(self):\n\n self.call(method='removeZoneRecord', args=[self.domainname, self.subdomain, self.record_id])", "def delRR(self, name, record_id):\n reply = self.rpc.removeZoneRecord(self.username,\n self.password,\n ...
[ "0.691936", "0.67210716", "0.65746415", "0.63391984", "0.63264924", "0.6248506", "0.6149588", "0.6127195", "0.6120888", "0.6061559", "0.6035057", "0.60162437", "0.6001736", "0.5894486", "0.5870704", "0.5845739", "0.5703803", "0.56973016", "0.569639", "0.56931704", "0.5692328"...
0.8010865
0
The command is intended to update an existing DNS record. Only the credentials (API Key and Password), FullRecordName, Type and NewValue are required, all other parameters are only needed if there is a risk of ambiguity, in particular when you have advanced DNS record used for load balancing. We recommend to always pas...
def dns_update(self, full_record_name, record_type, value=None, raw=False, **kwargs): endpoint = '/Domain/DnsRecord/Update' params = { 'FullRecordName' : full_record_name, 'Type': record_type, } params.update(kwargs) if record_type not in VALID_DNS_RE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cli_update_record(field_list, record_data):\n api.update_record(field_list, record_data)", "def update_record(self, record, name=None, type=None, data=None, extra=None):\n params = {\"type\": record.type, \"name\": record.name, \"data\": data}\n if data is None:\n params[\"data\"]...
[ "0.6705855", "0.6642774", "0.659981", "0.6526978", "0.65261054", "0.63973325", "0.6218298", "0.6089694", "0.58889955", "0.58575994", "0.58070016", "0.57094055", "0.5690874", "0.562034", "0.554177", "0.5480424", "0.5453833", "0.5403579", "0.54010886", "0.535074", "0.5321329", ...
0.69515413
0
calculate the probabilities of the given data and labels p(x), p(y) and (y|x)
def extract_probs(label, x): b = np.ascontiguousarray(x).view(np.dtype((np.void, x.dtype.itemsize * x.shape[1]))) unique_array, unique_indices, unique_inverse_x, unique_counts = \ np.unique(b, return_index=True, return_inverse=True, return_counts=True) unique_a = x[unique_indices] b1 = np.ascontiguousarray(unique...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prob(self, x, y):\n p = self.tag_prob(y)\n for i in range(len(y)):\n p *= self.out_prob(x[i], y[i])\n\n return p", "def probabilities(self, x, y):\n return self.feed_and_return(x, y, self.network.a)", "def predict_prob(self, _input_data):\n yhat_probs = (self.m...
[ "0.69859254", "0.6970387", "0.6938792", "0.6771588", "0.6624184", "0.65702873", "0.6564338", "0.6527763", "0.6505747", "0.6497186", "0.6476133", "0.64545935", "0.644594", "0.6423038", "0.641216", "0.63977325", "0.63880986", "0.63880986", "0.63880986", "0.6362084", "0.6315531"...
0.732544
0
Calculate the information between public/secret inputs with y_hat
def get_information_y_hat(x_pub, x_priv, x_joint, y_hat, num_of_bins_y): print('Start calculating the information for y_hat...') y_hat = np.array(y_hat).astype(np.float) pys_hat, unique_inverse_y, y_hat = extract_probs_label(y_hat,num_of_bins_y) p_y_given_x_pub, b1_pub, b_pub, unique_a_pub, unique_inverse_x_pub, px...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_information_priv_y_hat(x_priv, y_hat, num_of_bins_y):\n\tprint('Start calculating the information for y_hat...')\n\ty_hat = np.array(y_hat).astype(np.float)\n\tpys_hat, unique_inverse_y, y_hat = extract_probs_label(y_hat,num_of_bins_y)\n\tp_y_given_x_priv, b1_priv, b_priv, unique_a_priv, unique_inverse_x_p...
[ "0.74913377", "0.69438916", "0.6249762", "0.61089665", "0.607017", "0.6047166", "0.5839015", "0.57916886", "0.5689181", "0.56849176", "0.56739724", "0.5667939", "0.56675726", "0.565222", "0.56204456", "0.56129605", "0.5557334", "0.5544918", "0.55396307", "0.5533139", "0.55301...
0.7782291
0
Calculate the information between secret inputs with y_hat
def get_information_priv_y_hat(x_priv, y_hat, num_of_bins_y): print('Start calculating the information for y_hat...') y_hat = np.array(y_hat).astype(np.float) pys_hat, unique_inverse_y, y_hat = extract_probs_label(y_hat,num_of_bins_y) p_y_given_x_priv, b1_priv, b_priv, unique_a_priv, unique_inverse_x_priv, pxs_priv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_information_y_hat(x_pub, x_priv, x_joint, y_hat, num_of_bins_y):\n\tprint('Start calculating the information for y_hat...')\n\ty_hat = np.array(y_hat).astype(np.float)\n\tpys_hat, unique_inverse_y, y_hat = extract_probs_label(y_hat,num_of_bins_y)\n\tp_y_given_x_pub, b1_pub, b_pub, unique_a_pub, unique_inve...
[ "0.74673814", "0.6866002", "0.65252155", "0.6300222", "0.6280248", "0.6158067", "0.61250186", "0.6112778", "0.6107909", "0.60246354", "0.5936749", "0.59056", "0.58964854", "0.58781654", "0.5864431", "0.58225054", "0.58166915", "0.57722497", "0.5766384", "0.5758585", "0.575093...
0.73007303
1
Gradient clipping to the range [10, 10].
def clip_grads(self): # Clipping gradients for stability parameters = list(filter(lambda p: p.grad is not None, self.machine.parameters())) for p in parameters: p.grad.data.clamp_(-10, 10)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clip_gradient(model):\n totalnorm = 0\n for p in model.parameters():\n p.grad.data.clamp_(-5, 5)", "def clip_gradient(self, grad_clip):\n for group in self.optimizer.param_groups:\n for param in group['params']:\n if param.grad is not None:\n p...
[ "0.73053664", "0.7258348", "0.7025958", "0.69371647", "0.69270736", "0.689526", "0.689526", "0.689526", "0.689526", "0.689526", "0.68707263", "0.68610644", "0.67710054", "0.67440856", "0.6722008", "0.6719249", "0.66054136", "0.6582356", "0.6474208", "0.6391982", "0.61585534",...
0.76588684
0
Checks the validity of the reset link corresponding to the given 'token' parameter.
def validate_password_reset_link(request, token): if request.method == "GET": passwordResetTokenGenerator = PasswordResetTokenGenerator() id = PasswordResetTokenGenerator.get_token_value(passwordResetTokenGenerator, token) if id != None: id = int(id) if User.object...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_reset_token(self, token):\n\n expired, invalid, data = self._verify_token(token)\n if data and data.get('id') == self.id and data.get('op') == 'reset':\n data = True\n else:\n data = False\n return expired, invalid, data", "def ...
[ "0.7471118", "0.66979194", "0.64189106", "0.6257907", "0.61799204", "0.61395097", "0.60925007", "0.6004116", "0.5977282", "0.5952014", "0.58258325", "0.5819673", "0.5814138", "0.5788056", "0.5785477", "0.57792294", "0.5763077", "0.5752989", "0.57499474", "0.57284755", "0.5708...
0.70115525
1
Handles user request to approve/reject PhD synopsis
def referee_synopsis_approval(request): if not validate_request(request): return redirect(reverse(URL_FORBIDDEN)) user = auth.get_user(request) referee = Referee.objects.get(user = user) if request.method == "POST": id = int(request.POST['id']) isApproved = (request.POST['...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def approve_lyrics():\n pass", "def hod_approve(self):\n print \"HOD approved this form. Current state:\", self.state", "def approve (self, response) :\n if 'event' in response and 'moderator' in response :\n eventId = response ['event']\n userId = response ['moderator']\n else ...
[ "0.6986268", "0.6241836", "0.62250835", "0.6037373", "0.57576144", "0.57308125", "0.5677744", "0.56596166", "0.5655909", "0.5618193", "0.5569507", "0.5534649", "0.54875684", "0.54807895", "0.5473941", "0.54584765", "0.54396355", "0.5421704", "0.54127645", "0.5409663", "0.5402...
0.6569525
1
View method. Renders page for procedure help
def referee_help_procedure(request): if not validate_request(request): return redirect(reverse(URL_FORBIDDEN)) if request.method == "GET": return render( request, 'app/referee/procedure.html', { 'title':'Procedure', 'layout_data' : ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def help(request):\n return render(request, 'collab_user_views/help.html', {})", "def documentation():\n return render_template('help.html')", "def get(self):\n self.render('view.html')", "def overview():\n # TODO: fix ajax https://groups.google.com/d/msg/web2py/YyVilc2ywdg/ZLtN3Gg3Ft0J\n ...
[ "0.67439026", "0.665437", "0.6571626", "0.65694934", "0.6433658", "0.63957924", "0.62478", "0.6244975", "0.61839396", "0.6146538", "0.61006606", "0.60632586", "0.6052791", "0.6048536", "0.6043971", "0.6040707", "0.6019242", "0.6007049", "0.6004184", "0.6003015", "0.5999342", ...
0.7327818
0
Given the directory of data and index of the image the function returns the image, ground truth belief and affinity maps.
def get_truth_maps(data_path, index=0, sigma=8): imgs_data = loadimages(data_path) path, name, txt = imgs_data[index] img = default_loader(path) data = loadjson(path=txt, objectsofinterest=None, img=img) pointsBelief = data['pointsBelief'] objects_centroid = data['centroids'] beliefsImg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __getitem__(self, index):\r\n if self.is_train:\r\n image_names,labels = self.sample_train_batch()\r\n # get sampled order image_file names and corresponding label\r\n image_list,label_list=[],[]\r\n for img,label in zip(image_names,labels):\r\n ...
[ "0.64686805", "0.6430592", "0.6109409", "0.605146", "0.6051054", "0.6047428", "0.603919", "0.6016716", "0.6003468", "0.6002474", "0.5979919", "0.5974212", "0.5972493", "0.59716666", "0.5963653", "0.5958945", "0.59579825", "0.5940868", "0.5923224", "0.59078276", "0.59064716", ...
0.7187432
0
Given Activations, this will plot belief maps on the left and overlaid image on the right column
def viz_belief_maps(activations, in_img): fig, ax = plt.subplots(nrows=9, ncols=2, sharex=True, figsize=(20, 50)) red = [255, 0, 0] height, width = 480, 640 for i, map in enumerate(activations): map = map.detach().numpy() # Converting PIL-Image object to Numpy # map = cv2.cvtColor(map, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def visualize_control_activation_maps(FLAGS, model, input_images=[]):\n # load input\n if len(input_images) == 0:\n # use predefined images\n img_dir='/esat/opal/kkelchte/docker_home/pilot_data/visualization_images'\n input_images=sorted([img_dir+'/'+f for f in os.listdir(img_dir)])\n inputs = load_ima...
[ "0.66749746", "0.63816863", "0.616146", "0.59715396", "0.59348166", "0.58929247", "0.58833045", "0.5879891", "0.58622277", "0.5835725", "0.5830622", "0.58072233", "0.5791659", "0.57730323", "0.57676125", "0.57216454", "0.57151467", "0.5700649", "0.56743175", "0.5666843", "0.5...
0.7977534
0
Function to create the affinity maps, e.g., vector maps pointing toward the object center.
def GenerateMapAffinity(img, nb_vertex, pointsInterest, objects_centroid, scale): # Apply the downscale right now, so the vectors are correct. img_affinity = Image.new(img.mode, (int(img.size[0] / scale), int(img.size[1] / scale)), "black") # Create the empty tensors totensor = transforms.Compose([tran...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GenerateMapAffinity(img,nb_vertex,pointsInterest,objects_centroid,scale):\n\n # Apply the downscale right now, so the vectors are correct. \n img_affinity = Image.new(img.mode, (int(img.size[0]/scale),int(img.size[1]/scale)), \"black\")\n # Create the empty tensors\n totensor = transforms.Compose([...
[ "0.72914267", "0.6098607", "0.5900292", "0.5821465", "0.5807587", "0.5718745", "0.57103854", "0.5665518", "0.56358296", "0.5575892", "0.5574704", "0.55391586", "0.5535653", "0.55339247", "0.552962", "0.54919034", "0.54876024", "0.5487066", "0.5469129", "0.5448512", "0.5447627...
0.7259864
1
Saves a given Tensor into an image file. If given a minibatch tensor, will save the tensor as a grid of images.
def save_image(tensor, filename, nrow=4, padding=2, mean=None, std=None): from PIL import Image tensor = tensor.cpu() grid = make_grid(tensor, nrow=nrow, padding=10, pad_value=1) if not mean is None: ndarr = grid.mul(std).add(mean).mul(255).byte().transpose(0, 2).transpose(0, 1).numpy() els...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save_image(tensor, filename, nrow=4, padding=2,mean=None, std=None):\n from PIL import Image\n \n tensor = tensor.cpu()\n grid = make_grid(tensor, nrow=nrow, padding=10,pad_value=1)\n if not mean is None:\n ndarr = grid.mul(std).add(mean).mul(255).byte().transpose(0,2).transpose(0,1).nump...
[ "0.7021137", "0.66569316", "0.6625439", "0.65545875", "0.65407854", "0.64340246", "0.64161474", "0.63014567", "0.6241725", "0.623748", "0.6212051", "0.6209211", "0.62070173", "0.6193083", "0.6158778", "0.6143167", "0.6046069", "0.60308546", "0.6016111", "0.59715664", "0.59673...
0.70855963
0
Returns the deepest ExtCall in the hierarchy of this call that contains `stack`.
def common_call(self, stack: list): if self._parent is None: return self if len(stack) < self._level: return self._parent.common_call(stack) for i in range(self._level - 1): if self._parents[i+1]._function != stack[-1-i].function: return self._...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def findCaller(self, stack_info=False, stacklevel=2):\n f = currentframe()\n #On some versions of IronPython, currentframe() returns None if\n #IronPython isn't run with -X:Frames.\n if f is not None:\n f = f.f_back\n orig_f = f\n while f and stacklevel > 1:\n ...
[ "0.64358866", "0.6149696", "0.6078072", "0.60397816", "0.5987905", "0.5933181", "0.5883689", "0.5873929", "0.58647674", "0.5810924", "0.5798195", "0.57610404", "0.57610404", "0.57610404", "0.5718096", "0.5679358", "0.5648577", "0.5635221", "0.5617197", "0.55936134", "0.557487...
0.67600656
0
Stores an external message in this profile. External messages are printed in `Profile.print()`.
def add_external_message(self, message: str): self._messages.append(message)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save_message(self, user, message):\n full_message = '{0} {1} {2}'.format(str(datetime.now()), user, message)\n with open(self.path_to_message_file, 'a') as output:\n output.write(full_message + '\\n')", "def write_message(self, payload):\n self.messages.append(payload)", "de...
[ "0.62315375", "0.5808651", "0.57545894", "0.5717964", "0.5689881", "0.5620335", "0.54924613", "0.5486393", "0.5374987", "0.5345878", "0.5331712", "0.5328952", "0.53222334", "0.53222334", "0.53091514", "0.52989185", "0.52908134", "0.52424926", "0.5242359", "0.5242359", "0.5242...
0.63089556
0
Creates a `Profile` for the function `fun(args, kwargs)`.
def profile_function(fun: Callable, args: tuple or list = (), kwargs: dict or None = None, backends=None, trace=True, subtract_trace_time=True, retime=True, warmup=1, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def profile(fnc):\r\n \r\n def inner(*args, **kwargs):\r\n \r\n pr = cProfile.Profile()\r\n pr.enable()\r\n retval = fnc(*args, **kwargs)\r\n pr.disable()\r\n s = io.StringIO()\r\n sortby = 'time'\r\n ps = pstats.Stats(pr, stream=s).sort_stats(sortby)\r...
[ "0.7059013", "0.7050016", "0.6951492", "0.6949123", "0.69294155", "0.6879479", "0.68431515", "0.6825201", "0.6722068", "0.6684076", "0.66402185", "0.64941096", "0.64858747", "0.64715683", "0.64203924", "0.63862824", "0.63245595", "0.6314109", "0.6198207", "0.6196763", "0.6102...
0.7204873
0
Returns the currently active `Profile` if one is active. Otherwise returns `None`.
def get_current_profile() -> Optional[Profile]: return _PROFILE[-1] if _PROFILE else None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_profile(request):\n p_obj = Profile.objects.filter(hashid=request.session.get('profile', '-'))\n if len(p_obj):\n return p_obj[0]\n else:\n return None", "def profile(self) -> Profile:\n return self._profile", "def profile(self) -> Profile:\n return self._profile", ...
[ "0.7236233", "0.71459234", "0.71459234", "0.7133403", "0.7133403", "0.7130366", "0.70442265", "0.69931716", "0.6962505", "0.6937645", "0.69102436", "0.6892931", "0.6862889", "0.6854187", "0.6831359", "0.67874044", "0.67564577", "0.66067594", "0.65885854", "0.65863895", "0.656...
0.86201096
0
setup_structlog sets up colored structlog logging and adds a structlog formatter to stdlib logging.
def setup_structlog(level=logging.INFO, mode=CONSOLE): if structlog is None: logging.basicConfig(level=level) log.error(SystemError("please install structlog")) return use_colors = colorama is not None if mode == JSON: configure_jsonlog() elif mode == CONSOLE: configure_c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def configure_structlog(logging_level: str = \"INFO\", development: bool = False) -> None:\n pre_chain = [\n structlog.stdlib.add_log_level,\n structlog.stdlib.add_logger_name,\n structlog.processors.TimeStamper(fmt=\"iso\"),\n ]\n\n structlog.configure(\n processors=pre_chain\...
[ "0.7077403", "0.6616256", "0.64345515", "0.6171094", "0.60349447", "0.599651", "0.59925175", "0.5957823", "0.5937615", "0.5896785", "0.5861602", "0.58411515", "0.5793941", "0.5721388", "0.5709292", "0.56772065", "0.5675787", "0.56653297", "0.5652909", "0.56524885", "0.5652435...
0.7779396
0
setup_logging sets up stdlib or structlog logging with to the given level. If use_structlog is True, it also sets up structlog logging with convenient defaults for humanreadable logs.
def setup_logging(level=logging.INFO, use_structlog=False, mode=CONSOLE): shutdown() if mode == JSON: assert structlog is not None # structlog required for json logging assert pythonjsonlogger is not None # pythonjsonlogger required for json logging use_structlog = True i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_structlog(level=logging.INFO, mode=CONSOLE):\n\n if structlog is None:\n logging.basicConfig(level=level)\n log.error(SystemError(\"please install structlog\"))\n return\n\n use_colors = colorama is not None\n\n if mode == JSON: configure_jsonlog()\n elif mode == CON...
[ "0.7196253", "0.70335656", "0.6997879", "0.6730724", "0.6591471", "0.64604527", "0.64557314", "0.64143646", "0.63778806", "0.6353357", "0.63245475", "0.6300924", "0.62923765", "0.62861913", "0.6268693", "0.62559754", "0.624988", "0.6237316", "0.6225895", "0.6225841", "0.62139...
0.81938934
0
Method for generating random confirmation code
def generate_new_code(): code = ''.join(random.choice(string.digits) for i in range(6)) return code
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_verification_code():\n new_ver_code = str(random.randint(1000000, 9999999))\n return new_ver_code", "def generate_code(self):\n seeds = \"1234567890\"\n random_str = []\n for i in range(4):\n random_str.append(choice(seeds))\n\n return \"\".join(random_st...
[ "0.7362478", "0.72056156", "0.71803963", "0.71550715", "0.7144293", "0.7057272", "0.70454043", "0.6987841", "0.6985476", "0.693898", "0.69144964", "0.67079353", "0.669809", "0.66752225", "0.66603136", "0.6641477", "0.66348475", "0.6562537", "0.65485805", "0.6541062", "0.65007...
0.7497348
0
Method for formation user phone (+ and only digits)
def check_format_user_phone(phone): match = re.match(r'^\+[0-9]{10,}$', phone) if not match: raise exceptions.ValidationError('phone is not valid!') return phone
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_phone(self):\n data = self.cleaned_data['phone']\n data = data.strip(' +').replace('-', '')\n if len(data) == 12:\n data = data[3:]\n\n return data", "def clean_phone(self):\n phone = self.cleaned_data['phone']\n if phone.startswith('8') and len(phon...
[ "0.7408519", "0.72669107", "0.72257733", "0.72253704", "0.7181173", "0.68756413", "0.6853067", "0.6756722", "0.67259914", "0.6666317", "0.66169184", "0.6583681", "0.6583681", "0.65734565", "0.6558398", "0.6542882", "0.6514869", "0.65083337", "0.65042216", "0.6468455", "0.6466...
0.7412544
0
Method for setting confirmation sms code to user
def set_confirmation_code(cls, user_obj: User) -> str: confirmation_code = cls.generate_new_code() if user_obj.phone == '+996553000117' or user_obj.phone == '+996999111222': confirmation_code = '123456' user_obj.confirmation_code = confirmation_code user_obj.confirmation_date...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def send_sms_code(user_phone):\n client = Client(settings.TWILIO_ACCOUNT_SID, settings.TWILIO_AUTH_TOKEN)\n code = str(random.randint(0, 9999)).rjust(4, '0')\n\n try:\n message = client.messages.create(\n to=str(user_phone),\n from_=settings.TWILIO_NUMBER,\n body=f\...
[ "0.68820137", "0.6173374", "0.61149144", "0.60314494", "0.6024391", "0.59383494", "0.5906276", "0.5868028", "0.5846718", "0.5845394", "0.5835854", "0.58169425", "0.57211393", "0.5665673", "0.5614317", "0.5593307", "0.5576336", "0.55593556", "0.55335", "0.55263984", "0.5458667...
0.7041602
0
Method for sending confirmation sms to a new or old user
def send_confirmation_sms(cls, user_obj: User) -> bool: confirmation_code = cls.set_confirmation_code(user_obj) id_string = '%s%d' % (user_obj.id, datetime.now().timestamp()) data = { 'login': settings.NIKITA_LOGIN, 'pwd': settings.NIKITA_PASSWORD, 'id': id_s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def send_to_old_phone(cls, user: User) -> Response:\n if not cls.compare_confirmation_time(user):\n return Response(\n {'message': 'Вы слишком часто отправляете сообщение.'},\n status=status.HTTP_429_TOO_MANY_REQUESTS\n )\n if not cls.send_confirmat...
[ "0.7490879", "0.66236407", "0.6576361", "0.6355395", "0.6217663", "0.61272484", "0.6021457", "0.59890866", "0.5986793", "0.59741867", "0.5943808", "0.586646", "0.58490366", "0.58479446", "0.58464354", "0.5836514", "0.57945234", "0.5794357", "0.57725483", "0.57691175", "0.5736...
0.66809434
1
Prints self.foo and it's type
def foo_printer(self): print("\nHi I'm {}".format(self.foo))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __str__(self):\n # DOC {{{\n # }}}\n\n # CODE {{{\n return \"%s (%s) [%s, %u, %u]\" % (self.name, PythonTag.TAG_TYPE_NAME[self.type],\n self.fullName, self.lineNumber, self.indentLevel,)\n # }}}", "def dump(self) :\n st = \"%s=...
[ "0.6733068", "0.6534413", "0.6524914", "0.6511857", "0.64268994", "0.63395303", "0.6319636", "0.6309042", "0.628671", "0.62735134", "0.6251779", "0.62264454", "0.6201865", "0.6201429", "0.6184494", "0.61666596", "0.61608547", "0.61531776", "0.61379117", "0.61353", "0.6129131"...
0.7781236
0
Prints some text about the update, updates foo, then runs foo_printer()
def foo_changer(self, newfoo, updatetxt): print(updatetxt) # updates the attribute self.foo = newfoo # Notice we don't have to put self in the (), it passes itself the information self.foo_printer() # Even though we didn't use this it was there to use return se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def foo_printer(self):\n print(\"\\nHi I'm {}\".format(self.foo))", "def help_update(self):\n print(UPDATE)", "def update(self):\n\n print(\"---\\n |\\n |\")\n print(self.__body__, \"\\n\\n\")", "def StatusUpdate(msg):\r\n if verbosity > 0:\r\n print msg", "def update( ):\...
[ "0.679668", "0.63583314", "0.6278233", "0.6172151", "0.6172034", "0.6135355", "0.6010157", "0.6010157", "0.596085", "0.5921144", "0.5915883", "0.5903125", "0.5859072", "0.5758148", "0.5757799", "0.5720687", "0.5625812", "0.5618094", "0.5579973", "0.5568464", "0.55454344", "...
0.7216021
0
build rel batch with concept batches.
def rel_to_batch(rel_batch_p,rel_index_batch_p,data_iterator,dicts,frame): if frame =="amr": lemma_dict,amr_category_dict = dicts["lemma_dict"], dicts["amr_category_dict"] data = [torch.LongTensor([[amr_category_dict[uni.cat],lemma_dict[uni.le],0] for uni in uni_seq]) for uni_seq in rel_batch_p ] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _make_batches(self, n_batches: int) -> Iterable[Dict[Any, Any]]:\n batch_iters = []\n for problem in self.problems:\n service = problem.problem_service\n it = service.batch_iter(self.batch_size_per_problem, n_batches)\n batch_iters.append(it)\n combined = z...
[ "0.556257", "0.5518949", "0.5501697", "0.54909664", "0.54857266", "0.5473347", "0.5435509", "0.53880775", "0.53731143", "0.53105533", "0.5309512", "0.52699494", "0.52564526", "0.5244492", "0.5235599", "0.52340543", "0.5214711", "0.521048", "0.5197187", "0.5194463", "0.5193043...
0.67546844
0
adding target according to different mr "dm_rel_seq","dm_rel_triples","dm_convertedl_seq","dm_seq"
def addTarget(self, data): #tgt: length x n_feature, n_feture is 5, AMR_CAT, AMR_LE, AMR_AUX, AMR_SENSE, AMR_CAN_COPY # after make all node aligned to a word or NULL word, length is equal to the length of tokes. if "amr_id" in data: self.tgt.append(torch.LongTensor(data["amr_id"])) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_target_sequence(self):\n self.target_sequence = ''\n target_residues = []\n if len(self.target_residues) < 1:\n for i in range(0, self.target.size()):\n target_residues.append(i+1)\n self.target_residues = target_residues\n for resnum in self...
[ "0.5940518", "0.59294116", "0.5574846", "0.5522186", "0.54720855", "0.5452419", "0.5400141", "0.5327257", "0.5321002", "0.5290396", "0.5287431", "0.52772653", "0.5264834", "0.5241068", "0.5241068", "0.5208702", "0.51983523", "0.51902264", "0.51377493", "0.5121059", "0.5120283...
0.7027442
0
add src ids, and original source for original source, it add the anchors of each token also tok, lem, pos, ner, anchors
def addSource(self, data): # read input self.example_ids.append(data["example_id"]) self.src_char.append(torch.LongTensor(data['char_id']).contiguous()) #src: snt_length x n_feature, contiguous means in memory in C order self.src.append(torch.LongTensor([data["snt_id"],data["lemm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _add_offsets_to_token_nodes(self):\n for edge_index in self._textual_relation_ids:\n token_node_index = self.edges[edge_index].source\n self.nodes[token_node_index].onset = self.edges[edge_index].onset\n self.nodes[token_node_index].offset = self.edges[edge_index].offset...
[ "0.5823038", "0.55960125", "0.5580843", "0.5573242", "0.5451451", "0.53209424", "0.53012633", "0.52563846", "0.5252329", "0.52064645", "0.5179528", "0.5160813", "0.515878", "0.5111943", "0.51118815", "0.5083605", "0.5023418", "0.50204605", "0.50179756", "0.50174886", "0.49688...
0.5638033
1
Return True if the file has a archive extension and False ortherwise
def is_archive_ext(filepath): file_extension = os.path.splitext(filepath)[1].lower() if file_extension in get_archive_extensions(): return True else: return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_archive(afile):\n return file_ext(os.path.basename(afile)) in ARCHIVE_COMPRESS_FORMATS", "def is_archive_file(filepath):\n\n file_extension = os.path.splitext(filepath)[1].lower()\n if file_extension == \".zip\":\n if not zipfile.is_zipfile(filepath):\n raise DeidentificationErr...
[ "0.80152494", "0.7739437", "0.76255554", "0.7467998", "0.725886", "0.7251883", "0.713892", "0.6992214", "0.69908905", "0.6966924", "0.6872416", "0.685236", "0.67050856", "0.6693323", "0.66667575", "0.6666524", "0.6630289", "0.66168165", "0.6579202", "0.6571219", "0.65545446",...
0.8654882
0
Unpacks the input_filename archive to the extract_dir directory.
def unpack(input_filename, extract_dir): if not is_archive_file(input_filename): raise AttributeError("Input_filename must be an archive (ex: .tar.gz, .zip)") if zipfile.is_zipfile(input_filename): unzip(input_filename, extract_dir) else: untar(input_filename, extract_dir)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unzip(input_filename, extract_dir):\n if not zipfile.is_zipfile(input_filename):\n raise ValueError(\"%s is not a zip file\" % (input_filename))\n zip_ds = zipfile.ZipFile(input_filename)\n zip_ds.extractall(path=extract_dir)\n zip_ds.close()", "def unpack_first(input_filename: str, extrac...
[ "0.78270996", "0.7532626", "0.7266417", "0.6812043", "0.67704004", "0.6667337", "0.65912974", "0.6547432", "0.6540289", "0.64410365", "0.63914156", "0.6329632", "0.6312792", "0.62907684", "0.6245696", "0.62174714", "0.620927", "0.61057574", "0.60407495", "0.6030595", "0.59671...
0.8648521
0
Unpacks the first file in input_filename archive to the extract_dir directory.
def unpack_first(input_filename: str, extract_dir: str) -> str: if not is_archive_file(input_filename): raise AttributeError("Input_filename must be an archive (ex: .tar.gz, .zip)") if zipfile.is_zipfile(input_filename): return unzip_first(input_filename, extract_dir) else: return un...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unpack(input_filename, extract_dir):\n if not is_archive_file(input_filename):\n raise AttributeError(\"Input_filename must be an archive (ex: .tar.gz, .zip)\")\n if zipfile.is_zipfile(input_filename):\n unzip(input_filename, extract_dir)\n else:\n untar(input_filename, extract_di...
[ "0.8494251", "0.771072", "0.7514755", "0.7382363", "0.7178212", "0.7048307", "0.6925228", "0.668948", "0.65867454", "0.6573171", "0.64242464", "0.63223", "0.6316393", "0.6280918", "0.6236047", "0.6187796", "0.61652285", "0.61276567", "0.61099946", "0.60635626", "0.60531116", ...
0.81730884
1
Packs the source_dir directory in the output_filename archive.
def pack(output_filename, sources): dirname = os.path.dirname(output_filename) if not os.path.exists(dirname): os.makedirs(dirname) ext = os.path.splitext(output_filename)[1][1:] if ext == 'zip': pack_zip(output_filename, sources) elif ext in ('gz', 'tgz', 'bz2', 'tar'): pack...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pack(filename: Union[str, Path], source_dir: Union[str, Path]) -> None:\n raise NotImplemented", "def pack_zip(output_filename, sources):\n previous_dir = os.getcwd()\n if not isinstance(sources, (list, tuple)) and \\\n isinstance(sources, str):\n sources = [sources]\n zip_ds = z...
[ "0.77196527", "0.7118374", "0.70861894", "0.6998258", "0.6877993", "0.6792935", "0.67194355", "0.65980804", "0.6521609", "0.62069845", "0.6164217", "0.61576134", "0.5963958", "0.58855206", "0.5846564", "0.5776876", "0.57734007", "0.57539135", "0.57431", "0.57384926", "0.56675...
0.7203569
1
Extracts the first file in an archive file and return filepath extracted.
def untar_first(input_filename: str, extract_dir: str) -> str: with tarfile.open(input_filename) as tar_data: file_to_extract = tar_data.next() while file_to_extract is not None and not file_to_extract.isfile(): file_to_extract = tar_data.next() if file_to_extract is None: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extract_file(path):", "def unzip_first(input_filename: str, extract_dir: str) -> str:\n with zipfile.ZipFile(input_filename) as zip_file:\n zip_file_list = zip_file.infolist()\n zip_index = 0\n while zip_index < len(zip_file_list) and zip_file_list[zip_index].is_dir():\n zi...
[ "0.7009401", "0.69568104", "0.66981906", "0.65729815", "0.6512175", "0.64137274", "0.64137274", "0.6284852", "0.62261045", "0.62129813", "0.6192763", "0.6086338", "0.604241", "0.5973949", "0.5956374", "0.5919965", "0.5872994", "0.58673006", "0.5852967", "0.585244", "0.5796557...
0.75931007
0
Extracts the input_filename archive to the extract_dir directory.
def unzip(input_filename, extract_dir): if not zipfile.is_zipfile(input_filename): raise ValueError("%s is not a zip file" % (input_filename)) zip_ds = zipfile.ZipFile(input_filename) zip_ds.extractall(path=extract_dir) zip_ds.close()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unpack(input_filename, extract_dir):\n if not is_archive_file(input_filename):\n raise AttributeError(\"Input_filename must be an archive (ex: .tar.gz, .zip)\")\n if zipfile.is_zipfile(input_filename):\n unzip(input_filename, extract_dir)\n else:\n untar(input_filename, extract_di...
[ "0.749209", "0.7084235", "0.690997", "0.6679553", "0.6638198", "0.66373515", "0.65382844", "0.6464558", "0.6373831", "0.637175", "0.6340261", "0.6327941", "0.6256453", "0.6247306", "0.62193626", "0.6209982", "0.61714166", "0.6165865", "0.6122725", "0.6090908", "0.6050698", ...
0.73844963
1
Extracts the first file in a zip file and return filepath extracted.
def unzip_first(input_filename: str, extract_dir: str) -> str: with zipfile.ZipFile(input_filename) as zip_file: zip_file_list = zip_file.infolist() zip_index = 0 while zip_index < len(zip_file_list) and zip_file_list[zip_index].is_dir(): zip_index += 1 if zip_index == le...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unzip_file(path_to_zip_file: str, dir_to_extract_to: str) -> str:\n with zipfile.ZipFile(path_to_zip_file, 'r') as zip_ref:\n zip_ref.extractall(dir_to_extract_to)\n return f'{dir_to_extract_to}/{zip_ref.namelist()[0]}'", "def untar_first(input_filename: str, extract_dir: str) -> str:\n w...
[ "0.7343693", "0.7193317", "0.6900429", "0.6755518", "0.6739186", "0.6738648", "0.6697676", "0.66449076", "0.6538686", "0.6513321", "0.6508132", "0.64640623", "0.640506", "0.6372543", "0.63418245", "0.63114077", "0.63079065", "0.63052726", "0.6301901", "0.6259281", "0.6223132"...
0.7894104
0
Create all Ship Design Objects that Player currently uses
def createShipDesigns(self): for designID, designInfo in self.game.shipDesigns.iteritems(): if designID not in self.game.shipDesignObjects.keys(): myDesign = self.getShipDesign(designInfo[1],designInfo[2],designInfo[3],designInfo[0]) self.game.shipDesignObjects[design...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _createShip(self):\n self._ship=Ship()", "def __init__(self, obj, solids):\n # Add an unique property to identify the Ship instances\n tooltip = str(QtGui.QApplication.translate(\n \"Ship\",\n \"True if it is a valid ship instance, False otherwise\",\n No...
[ "0.7193727", "0.6751288", "0.6551836", "0.65225935", "0.64505315", "0.64324427", "0.6361584", "0.63088405", "0.62441844", "0.62384385", "0.62006783", "0.6179699", "0.6161934", "0.61606246", "0.6159826", "0.61443406", "0.6143329", "0.61335063", "0.61094445", "0.6102912", "0.60...
0.8246068
0
Create the System Sims
def createSystemSims(self): # create systems import anwp.sims self.systemSims = [] for systemID, systemDict in self.game.allSystems.iteritems(): empireDict = self.game.allEmpires[systemDict['myEmpireID']] imageFileName = '%s%s.png' % (self.game.app.simImagePath, s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_system(sys_structure):\n pass", "def createResourceSims(self):\n if self.game.myEmpire['viewResources'] == 0:\n return\n import anwp.sims\n # remove old sims if any\n self.removeResourceSims()\n # create resource sims\n self.resourceSims = []\n ...
[ "0.7097686", "0.6825744", "0.65875006", "0.63065094", "0.6273804", "0.61984444", "0.6180004", "0.6095018", "0.60618424", "0.60456485", "0.5937969", "0.59309906", "0.59094757", "0.5846985", "0.58450717", "0.5842613", "0.58367705", "0.58268774", "0.5795343", "0.57665074", "0.57...
0.7802708
0
Create the Shipyard Sims
def createShipyardSims(self): # create shipyards import anwp.sims self.shipyardSims = [] for systemID, systemDict in self.game.allSystems.iteritems(): if systemDict['myEmpireID'] == self.game.myEmpireID and systemDict['availSYC'] > 0: # shipyard capacity found...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createArmySims(self):\n # create army sims for player\n for systemID in self.game.myArmies.keys():\n self.createPlayerArmySim(systemID)\n \n # create army sims representing other empires\n for systemID in self.game.otherArmies.keys():\n self.createOtherA...
[ "0.55423826", "0.5517543", "0.54934144", "0.5451105", "0.54381263", "0.5428281", "0.53665346", "0.53565687", "0.5319916", "0.5300141", "0.52985966", "0.52710116", "0.52124476", "0.5193295", "0.5177881", "0.51765525", "0.5152121", "0.5144906", "0.5141644", "0.51415443", "0.512...
0.66619325
0
Create the Military Installation Sims
def createMilitaryInstSims(self): # create shipyards import anwp.sims self.militaryinstSims = [] for systemID, systemDict in self.game.allSystems.iteritems(): if systemDict['myEmpireID'] == self.game.myEmpireID and systemDict['availMIC'] > 0: # military instal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createResourceSims(self):\n if self.game.myEmpire['viewResources'] == 0:\n return\n import anwp.sims\n # remove old sims if any\n self.removeResourceSims()\n # create resource sims\n self.resourceSims = []\n for systemID, systemDict in self.game.allSy...
[ "0.5889182", "0.57370275", "0.54988986", "0.5479971", "0.54787624", "0.5390214", "0.53359824", "0.533517", "0.52716017", "0.52589417", "0.52204037", "0.51904523", "0.5171159", "0.5164862", "0.51531124", "0.51439816", "0.51293486", "0.5111439", "0.50663394", "0.5044186", "0.50...
0.71507
0
Create all Armada Sims
def createArmadaSims(self): # create armada sims for player for systemID in self.game.myArmadas.keys(): self.createPlayerArmadaSim(systemID) # create armada sims representing other empires for systemID in self.game.otherArmadas.keys(): self.createOtherArm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createArmySims(self):\n # create army sims for player\n for systemID in self.game.myArmies.keys():\n self.createPlayerArmySim(systemID)\n \n # create army sims representing other empires\n for systemID in self.game.otherArmies.keys():\n self.createOtherA...
[ "0.69423336", "0.6536769", "0.6419759", "0.60692", "0.5970453", "0.5915355", "0.59151685", "0.58095944", "0.57740384", "0.5745977", "0.56146294", "0.5534917", "0.55321574", "0.5491836", "0.5489307", "0.54003125", "0.539595", "0.53953373", "0.53885347", "0.53724635", "0.537246...
0.7694832
0
Create all Army Sims
def createArmySims(self): # create army sims for player for systemID in self.game.myArmies.keys(): self.createPlayerArmySim(systemID) # create army sims representing other empires for systemID in self.game.otherArmies.keys(): self.createOtherArmySim(syste...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createArmadaSims(self):\n # create armada sims for player\n for systemID in self.game.myArmadas.keys():\n self.createPlayerArmadaSim(systemID)\n \n # create armada sims representing other empires\n for systemID in self.game.otherArmadas.keys():\n self.cr...
[ "0.62745416", "0.60390735", "0.5969804", "0.5957279", "0.58480763", "0.58284056", "0.5822385", "0.58210826", "0.5818682", "0.5742821", "0.56131667", "0.5569657", "0.5568871", "0.5551833", "0.54884934", "0.5470303", "0.5458704", "0.54365164", "0.5306371", "0.52960485", "0.5248...
0.74493706
0
Create other Armada Sim
def createOtherArmadaSim(self, systemID): systemDict = self.game.allSystems[systemID] empireList = self.game.otherArmadas[systemID] i = 1 for empireID in empireList: empireDict = self.game.allEmpires[empireID] imageFileName = '%sarmada_%s_%s.png' % (self.game.app....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createArmadaSims(self):\n # create armada sims for player\n for systemID in self.game.myArmadas.keys():\n self.createPlayerArmadaSim(systemID)\n \n # create armada sims representing other empires\n for systemID in self.game.otherArmadas.keys():\n self.cr...
[ "0.71115196", "0.69768375", "0.6690594", "0.63029116", "0.6231723", "0.61855906", "0.6043713", "0.5885325", "0.5747728", "0.5679798", "0.5673125", "0.566625", "0.5660886", "0.5656936", "0.5646183", "0.5629483", "0.556247", "0.5561703", "0.5539066", "0.5525946", "0.5516831", ...
0.7400635
0
Create other Army Sim
def createOtherArmySim(self, systemID): systemDict = self.game.allSystems[systemID] empireList = self.game.otherArmies[systemID] i = 1 for empireID in empireList: empireDict = self.game.allEmpires[empireID] imageFileName = '%sarmy_%s_%s.png' % (self.game.app.simIm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createArmySims(self):\n # create army sims for player\n for systemID in self.game.myArmies.keys():\n self.createPlayerArmySim(systemID)\n \n # create army sims representing other empires\n for systemID in self.game.otherArmies.keys():\n self.createOtherA...
[ "0.7240843", "0.6736704", "0.6678093", "0.6546484", "0.64159065", "0.629609", "0.60980743", "0.60978067", "0.6034849", "0.6028273", "0.6023579", "0.59802", "0.591641", "0.5908899", "0.58308357", "0.5783767", "0.5761999", "0.5746233", "0.57455045", "0.5724207", "0.5722192", ...
0.7254975
0
Create Player Armada Sim
def createPlayerArmadaSim(self, systemID): systemDict = self.game.allSystems[systemID] empireDict = self.game.myEmpire imageFileName = '%sarmada_%s_%s.png' % (self.game.app.simImagePath, empireDict['color1'], empireDict['color2']) sim = ArmadaEntity(self, anwp.sims.categories.ClickableMo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createArmadaSims(self):\n # create armada sims for player\n for systemID in self.game.myArmadas.keys():\n self.createPlayerArmadaSim(systemID)\n \n # create armada sims representing other empires\n for systemID in self.game.otherArmadas.keys():\n self.cr...
[ "0.6883977", "0.6859759", "0.63550013", "0.6110384", "0.5971736", "0.5902196", "0.57614356", "0.56967103", "0.56452423", "0.5603675", "0.5396717", "0.53956795", "0.5381449", "0.5377659", "0.5361575", "0.5355802", "0.53529274", "0.5330801", "0.53275996", "0.5322218", "0.531495...
0.7579975
0
Create Player Army Sim
def createPlayerArmySim(self, systemID): systemDict = self.game.allSystems[systemID] empireDict = self.game.myEmpire imageFileName = '%sarmy_%s_%s.png' % (self.game.app.simImagePath, empireDict['color1'], empireDict['color2']) sim = ArmyEntity(self, anwp.sims.categories.ClickableMobileCa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createArmySims(self):\n # create army sims for player\n for systemID in self.game.myArmies.keys():\n self.createPlayerArmySim(systemID)\n \n # create army sims representing other empires\n for systemID in self.game.otherArmies.keys():\n self.createOtherA...
[ "0.6867037", "0.65932286", "0.63697517", "0.62913775", "0.62206036", "0.61340064", "0.5880388", "0.5864071", "0.5819583", "0.5802883", "0.57657075", "0.57419664", "0.57384807", "0.5731273", "0.5719366", "0.57101935", "0.568378", "0.5680816", "0.56577766", "0.56485045", "0.563...
0.7304421
0
Create the Trade Route Sims
def createTradeRouteSims(self): import anwp.sims # remove old trade route sims if any self.removeTradeRouteSims() # create trade route sims self.tradeRouteSims = [] for trID, tradeRouteDict in self.game.tradeRoutes.iteritems(): imageFileName = '%s%s.png' % (se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def genTradeRoute(self, tradeRouteDict):\n try:\n # add order id\n id = '%s-%s-%s' % (tradeRouteDict['fromSystem'], tradeRouteDict['toSystem'], tradeRouteDict['type'])\n d = {'id':id}\n for key, value in tradeRouteDict.iteritems():\n d[key] = value\...
[ "0.6397567", "0.5910929", "0.5910352", "0.59035546", "0.5900289", "0.5742809", "0.56567895", "0.5615142", "0.55725485", "0.5557295", "0.5538091", "0.55059165", "0.5490808", "0.5485027", "0.5474814", "0.54715526", "0.54486465", "0.544333", "0.5403755", "0.53785914", "0.5369447...
0.7626936
0
Create the Resource Sims
def createResourceSims(self): if self.game.myEmpire['viewResources'] == 0: return import anwp.sims # remove old sims if any self.removeResourceSims() # create resource sims self.resourceSims = [] for systemID, systemDict in self.game.allSystems.iterite...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_resource_object():\n\n # Create two objects of different users and same center code\n Resource.objects.create(status=0, title='Recurso de teste (BR1.1)', \n link='http://bvsalud.org', originator='BIREME',\n created_by_id=1, cooperative_center_c...
[ "0.6731282", "0.66741097", "0.6639004", "0.6639004", "0.6508852", "0.64509636", "0.64164114", "0.63839227", "0.6329812", "0.6299186", "0.6272673", "0.61526585", "0.6151807", "0.6151017", "0.61299753", "0.6079213", "0.606391", "0.6062902", "0.60530543", "0.6037475", "0.599958"...
0.6783233
0
Create the Radar Sims
def createRadarSims(self): import anwp.sims # remove old sims if any self.removeRadarSims() # create resource sims self.radarSims = [] for systemID, systemDict in self.game.allSystems.iteritems(): imageFileName = '' if systemDict['inte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_agree_vis_nir(self,rad):\n print( 'Ratio-ing the NIR spectra to match VIS *** Only for 4STAR ***')\n ivis = range(1055,1069)\n inir = range(1004,1037)\n mean_vis = np.nanmean(mea['rad'][600,ivis])\n mean_nir = np.nanmean(mea['rad'][600,inir])\n s_ratio_vis_nir = m...
[ "0.60389245", "0.58684295", "0.5689533", "0.56427896", "0.5626804", "0.55745", "0.5550983", "0.5547978", "0.5543918", "0.5468019", "0.5459123", "0.542437", "0.53975207", "0.5335691", "0.53258723", "0.5322583", "0.53104836", "0.5299818", "0.52875626", "0.52855986", "0.5270683"...
0.6919111
0
Create the War Gate Sims
def createWarpGateSims(self): # create warpgates import anwp.sims self.warpgateSims = [] for systemID, systemDict in self.game.allSystems.iteritems(): systemEmpireDict = self.game.allEmpires[systemDict['myEmpireID']] if systemDict['myEmpireID'] == self.game.myEmpi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createShipyardSims(self):\n # create shipyards\n import anwp.sims\n self.shipyardSims = []\n for systemID, systemDict in self.game.allSystems.iteritems():\n if systemDict['myEmpireID'] == self.game.myEmpireID and systemDict['availSYC'] > 0:\n # shipyard cap...
[ "0.5655532", "0.56523246", "0.5524411", "0.53923047", "0.5383116", "0.52760917", "0.5274617", "0.52700984", "0.5253043", "0.52448714", "0.522931", "0.51793116", "0.5172245", "0.5136017", "0.5130526", "0.5129314", "0.50987524", "0.5088415", "0.50827515", "0.5071677", "0.506999...
0.7311121
0
Remove Armada Sim at system in question
def removeArmadaSim(self, systemID): for key in self.armadaSims.keys(): sim = self.armadaSims[key] if sim.systemID == systemID and sim.myEmpireDict['id'] == self.game.myEmpireID: self.world.removeFromWorld(sim) del self.armadaSims[key] self.reposit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def removeArmySim(self, systemID):\n for key in self.armySims.keys():\n sim = self.armySims[key]\n if sim.systemID == systemID and sim.myEmpireDict['id'] == self.game.myEmpireID:\n self.world.removeFromWorld(sim)\n del self.armySims[key]\n self.repo...
[ "0.69320977", "0.6377577", "0.6177386", "0.605486", "0.5947773", "0.5917483", "0.58786774", "0.584279", "0.5833308", "0.58227", "0.58033127", "0.5798417", "0.5753733", "0.5737399", "0.57227063", "0.57084095", "0.570768", "0.5698317", "0.56874466", "0.5682352", "0.5655632", ...
0.7748402
0
Remove Army Sim at system in question
def removeArmySim(self, systemID): for key in self.armySims.keys(): sim = self.armySims[key] if sim.systemID == systemID and sim.myEmpireDict['id'] == self.game.myEmpireID: self.world.removeFromWorld(sim) del self.armySims[key] self.repositionMilit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def removeArmadaSim(self, systemID):\n for key in self.armadaSims.keys():\n sim = self.armadaSims[key]\n if sim.systemID == systemID and sim.myEmpireDict['id'] == self.game.myEmpireID:\n self.world.removeFromWorld(sim)\n del self.armadaSims[key]\n s...
[ "0.7209542", "0.6700588", "0.6535441", "0.621184", "0.6054955", "0.60388774", "0.6030465", "0.59472346", "0.5932803", "0.5911013", "0.58603674", "0.58373517", "0.5791307", "0.5724091", "0.57111263", "0.5678436", "0.56777066", "0.5657299", "0.5649543", "0.5642545", "0.56265587...
0.7521545
0
Remove the Trade Route Sims
def removeTradeRouteSims(self): for sim in self.tradeRouteSims: self.world.removeFromWorld(sim) self.tradeRouteSims = []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_from_withdraws(self, route: Route) -> None:\n if hash(route.addr) not in self.withdraws.keys():\n raise KeyError(\"{} not in the withdraws\".format(route.addr))\n self.withdraws[hash(route.addr)].remove(route)\n if len(self.withdraws[hash(route.addr)]) == 0:\n ...
[ "0.65442467", "0.63816094", "0.6199846", "0.61430615", "0.6082152", "0.60148066", "0.60145193", "0.58933604", "0.58902544", "0.5887845", "0.58149666", "0.580917", "0.5805686", "0.58036214", "0.5799356", "0.5781282", "0.5781282", "0.57710344", "0.57514745", "0.5708478", "0.569...
0.807546
0
Remove the Resource Sims
def removeResourceSims(self): for sim in self.resourceSims: self.world.removeFromWorld(sim) self.resourceSims = []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def destroy(self):\n for item in self.resources:\n if item[\"status\"] == REGISTER:\n item[\"resource\"].destroy()\n item[\"status\"] = UNREGISTER", "def remove():", "def remove(self, resource, _no_min=False):\n\t\tif isinstance(resource, ResourceWrapper):\n\t\t\...
[ "0.715178", "0.6972042", "0.68924797", "0.68784994", "0.68784994", "0.6838246", "0.6821963", "0.6795876", "0.67912036", "0.6772358", "0.6755379", "0.67468005", "0.6723937", "0.6699908", "0.66933775", "0.6640944", "0.6629393", "0.6629393", "0.6629393", "0.6607328", "0.6552502"...
0.76835835
0
Remove the Radar Sims
def removeRadarSims(self): for sim in self.radarSims: self.world.removeFromWorld(sim) self.radarSims = []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def removeRounabouts(segmentsMeta):\n roundabouts = segmentsMeta[segmentsMeta.nodes.apply(lambda x : x[0]==x[-1] )]\n roundabouts.apply(lambda x : linkInsOuts(x['ins'],x['outs'],segmentsMeta,x.name) ,axis=1)\n segmentsMeta.drop(roundabouts.index,inplace=True)", "def removeResourceSims(self):\n fo...
[ "0.6097251", "0.6046438", "0.5960405", "0.5942353", "0.59022343", "0.58930844", "0.58822", "0.58463097", "0.57969517", "0.5731055", "0.57235324", "0.56669873", "0.56583273", "0.56571555", "0.56038004", "0.5578772", "0.5577442", "0.5518889", "0.5498401", "0.5497797", "0.549628...
0.73559654
0
Build an Add City Frame for adding a city to a system
def createAddCityFrame(self, systemID, systemName): self.destroyTempFrames() self.addCityFrame = anwp.gui.addcity.AddCityFrame(self, self.game.app, 'Add City', None, systemID, systemName) self.tempFrames.append(self.addCityFrame)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createChangeCityFrame(self, cityList, systemID, systemName):\n self.destroyTempFrames()\n self.changeCityFrame = anwp.gui.addcity.AddCityFrame(self, self.game.app, 'Change City Resource', cityList, systemID, systemName)\n self.tempFrames.append(self.changeCityFrame)", "def addCity(self, ...
[ "0.69200796", "0.64460915", "0.63814616", "0.60628474", "0.6002084", "0.59671617", "0.58868474", "0.58582723", "0.5829857", "0.5681942", "0.5675564", "0.55698633", "0.5492029", "0.54722655", "0.5467029", "0.54495084", "0.5435696", "0.5423597", "0.5395721", "0.53697616", "0.53...
0.7690504
0
Build an Add Industry Frame for adding an Industry to a system
def createAddIndustryFrame(self, systemID, systemName): self.destroyTempFrames() self.addIndustryFrame = anwp.gui.addindustry.AddIndustryFrame(self, self.game.app, 'Add Industry to: %s' % systemName, systemID) self.tempFrames.append(self.addIndustryFrame)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def onAddIndustry(self, item):\n self.frame.mode.createAddIndustryFrame(self.mySystemDict['id'], self.mySystemDict['name'])", "def createIndustryInfo(self):\n self.setCurrentValue(0)\n self.setMinMax()\n self.writeIndustryName()\n self.createIndustrySim()\n self.writeInd...
[ "0.799026", "0.6832532", "0.63418055", "0.55538607", "0.54058903", "0.52744496", "0.52505994", "0.5169643", "0.51678735", "0.51621944", "0.51555383", "0.50710183", "0.50585556", "0.5046313", "0.4999439", "0.49238205", "0.49217567", "0.4921031", "0.49088174", "0.48942205", "0....
0.7662607
1
Build a Change City Frame for changing city resource
def createChangeCityFrame(self, cityList, systemID, systemName): self.destroyTempFrames() self.changeCityFrame = anwp.gui.addcity.AddCityFrame(self, self.game.app, 'Change City Resource', cityList, systemID, systemName) self.tempFrames.append(self.changeCityFrame)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def onChangeCity(self, item):\n list = self.lstCities.getMultiSelectedItems()\n self.frame.mode.createChangeCityFrame(list, self.mySystemDict['id'], self.mySystemDict['name'])", "def createAddCityFrame(self, systemID, systemName):\n self.destroyTempFrames()\n self.addCityFrame = anwp....
[ "0.6233123", "0.59983534", "0.5988942", "0.5924279", "0.569596", "0.5664031", "0.5612272", "0.5510782", "0.5484666", "0.54167324", "0.54167324", "0.54167324", "0.54167324", "0.54167324", "0.54167324", "0.54167324", "0.54167324", "0.54167324", "0.53546447", "0.5340119", "0.530...
0.75314945
0
Create Send Mail Frame to empire given
def createSendMailFrame(self, empireDict): self.destroyTempFrames() self.sendMailInfo = anwp.gui.sendmailinfo.SendMailInfoFrame(self, self.game.app, empireDict) self.tempFrames.append(self.sendMailInfo)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sendEmail(_name, _email, _body):\n\n _mailer = app.config['MAIL_USERNAME']\n msg = Message(\"Contact Form\", sender=('iSOLveIT Contact', f'{_mailer}'), recipients=[f'{_mailer}'])\n msg.body = f'''{_body}\n\n\nSender's Name: {_name}\nSender's Email: {_email}\nDate Sent: {dt.now(tz=GMT_tz).strftime('%B...
[ "0.6520707", "0.65206254", "0.6460662", "0.6362416", "0.63167185", "0.6308494", "0.6248037", "0.6199634", "0.6191426", "0.6191426", "0.61329144", "0.6127278", "0.6125926", "0.61195654", "0.6095541", "0.6082269", "0.60723543", "0.606272", "0.6049811", "0.60440516", "0.60420614...
0.78078413
0
Ask Server to create a new regiment at system specified
def createRegiment(self, regimentID): try: systemID = self.game.myRegiments[regimentID]['fromSystem'] serverResult = self.game.server.createRegiment(self.game.authKey, systemID) if type(serverResult) == types.StringType: self.modeMsgBox(serverResult) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create():", "def create():", "def setNewRegiment(self, empireID, systemID, typeID, name='Marine'):\n id = self.getNextID(self.regiments)\n myEmpire = self.empires[empireID]\n myRegiment = anwp.war.regiment.Regiment({'id':id, 'empireID':myEmpire.id, \n ...
[ "0.60191214", "0.60191214", "0.5880502", "0.58563846", "0.5854076", "0.57503814", "0.5749521", "0.57263047", "0.56448346", "0.5638244", "0.5632333", "0.56301874", "0.5629059", "0.55583894", "0.55579525", "0.55556", "0.5540375", "0.5540375", "0.5540375", "0.553412", "0.552431"...
0.71365625
0
Build a Ship Info Frame based on fleet and shipID's given
def createShipInfoFrame(self, shipID, fleetID): self.destroyTempFrames() self.myShipDesign = None # create ship instance import anwp.war.ship import anwp.war.captain import anwp.war.empire myShipDict = myFleetDict['ships'][shipID] myCaptainDict = self.game...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_ships(self, ship, number=1, planet=None):\n menge = \"\" if number == 1 else str(number)\n self.send_build_post(\"shipyard\", planet, codes.ships[ship], form={\"menge\": menge})", "def create_fleet(si_settings,screen,ship,aliens):\n #creates an alien and finds the number in a row\n ...
[ "0.6532863", "0.60802096", "0.5957465", "0.59268105", "0.59006876", "0.5893285", "0.5885811", "0.5879511", "0.5849743", "0.58127373", "0.57977", "0.57883525", "0.5779138", "0.57704806", "0.5749783", "0.57095116", "0.56527734", "0.5574228", "0.55463856", "0.55436736", "0.55066...
0.8251121
0
Send an Add Trade Route Request to the Server
def addTradeRoute(self, AL, EC, IA, fromSystem, toSystem, type, oneTime=0): try: dOrder = {'AL':AL, 'EC':EC, 'IA':IA, 'fromSystem':fromSystem, 'toSystem':toSystem, 'type':type, 'oneTime':oneTime} serverResult = self.game.server.addTradeRoute(self.game.authKey, dOrder) if serv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def onAddOneTimeTrade(self, item):\n self.frame.mode.addTradeRoute(float(self.txtAL.getValue()), float(self.txtEC.getValue()),\n float(self.txtIA.getValue()), self.mySystemDict['id'],\n self.lstToSystem.getSelectedItem().data, 'REG',1...
[ "0.6830881", "0.6511653", "0.6500234", "0.6441114", "0.6090593", "0.5967884", "0.59513974", "0.5936668", "0.5935738", "0.5889695", "0.56534165", "0.5646505", "0.5630569", "0.5568064", "0.5442751", "0.54330885", "0.54256946", "0.5406006", "0.5380957", "0.5313856", "0.53055626"...
0.6950825
0
Send an Add Market Order to Server
def addMarketOrder(self, type, value, min, max, amount, system): try: dOrder = {'type':type, 'value':value, 'min':min, 'max':max, 'amount':amount, 'system':system} serverResult = self.game.server.addMarketOrder(self.game.authKey, dOrder) if serverResult <> 1: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def order(self, typ, price, volume):\r\n self.count_submitted += 1\r\n self.client.send_order_add(typ, price, volume)", "def _send_to_market(self, order, is_mine):\n \n \n ord_type = order[self.col_idx['ordtype']]\n if ord_type == \"new\":\n self.mkt.send(is_b...
[ "0.6842201", "0.6524477", "0.6429841", "0.6427177", "0.63665885", "0.6302249", "0.6215484", "0.621352", "0.6185627", "0.60841405", "0.5969018", "0.5967026", "0.5949462", "0.5877474", "0.5857624", "0.58406216", "0.5820575", "0.5811223", "0.58069605", "0.5804307", "0.57962626",...
0.6628702
1
Send an Add City Request to the Server
def addCity(self, resource, systemID): try: dOrder = {'type':'Add City', 'value':resource, 'system':systemID, 'round':self.game.myGalaxy['currentRound']} serverResult = self.game.server.addIndustryOrder(self.game.authKey, dOrder) if serverResult <> 1: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _add_city(city_name):\n \n #Checks if city exist, if exist returns ALREADY_EXIST message\n if City.query.filter_by(name=city_name).first():\n return jsonify(MESSAGES.get('ALREADY_EXIST_MESSAGE'))\n\n metric_resp, imperial_resp = _get_open_weather_requests(city_name)\n\n #Checks if request...
[ "0.6817965", "0.6481804", "0.6319588", "0.6295011", "0.61951023", "0.6140534", "0.60701656", "0.6019253", "0.5990679", "0.5852374", "0.58210844", "0.57742023", "0.57174927", "0.569633", "0.5678017", "0.5641288", "0.5553096", "0.5514176", "0.5495959", "0.5482068", "0.5472367",...
0.7101835
0
Send an Add Industry Request to the Server
def addIndustry(self, amount, industryType, systemID): try: dOrder = {'type':'Add Industry', 'value':'%s-%s' % (str(amount), industryType), 'system':systemID, 'round':self.game.myGalaxy['currentRound']} serverResult = self.game.server.addIndustryOrder(self.game.auth...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def onAddIndustry(self, item):\n self.frame.mode.createAddIndustryFrame(self.mySystemDict['id'], self.mySystemDict['name'])", "def upgradeIndustry(self, industryList, systemID):\n try:\n for industryID in industryList:\n dOrder = {'type':'Upgrade Industry', 'value':'%s' % ...
[ "0.6578673", "0.5834094", "0.5649759", "0.54239494", "0.54046077", "0.53978324", "0.5367421", "0.5342238", "0.5338688", "0.5328386", "0.5318335", "0.53165436", "0.52955145", "0.5253263", "0.5247452", "0.5237083", "0.5171179", "0.5113729", "0.51040375", "0.509842", "0.5092482"...
0.7109692
0
Send an Add Ship Request to the Server
def addShipOrder(self, amount, shipDesignID, systemID): try: dOrder = {'type':'Add Ship', 'value':'%s-%s' % (str(amount), shipDesignID), 'system':systemID, 'round':self.game.myGalaxy['currentRound']} serverResult = self.game.server.addIndustryOrder(self.game.authKey...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ship_new(name):\n click.echo('Created ship %s' % name)", "def buy_ship(self, location, ship_type):\n payload = {'location': location, 'type': ship_type}\n r = requests.post(self.base_url + f'/users/{self.username}/ships', headers=self.auth_header, )\n return r.text", "def do_add_rou...
[ "0.65269256", "0.6075525", "0.6074995", "0.6057269", "0.60147583", "0.58981156", "0.58320624", "0.5673394", "0.56227124", "0.56105065", "0.55750465", "0.5572231", "0.55627894", "0.55230767", "0.55117446", "0.5495425", "0.54898304", "0.54757226", "0.5454471", "0.54438627", "0....
0.6633711
0
Send a Repair Starship Request to the Server
def repairStarshipOrder(self, shipList, systemID): try: for value in shipList: dOrder = {'type':'Repair Starship', 'value':value, 'system':systemID, 'round':self.game.myGalaxy['currentRound']} serverResult = self.game.server.addIndustryOrder(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def repair(self, ship_id, target_id):\n\n # Perfom repair\n repair_string = \"SELECT REPAIR(\" + str(ship_id) + \",\" + str(target_id) + \");\"\n self.conn_cur.execute(repair_string)\n print(\"[>] Repair ordered\")", "def _send_request(self):\n route_chosen = self.comboBox_rout...
[ "0.5571486", "0.53496194", "0.5260666", "0.5134404", "0.5127715", "0.50817066", "0.5021471", "0.4951779", "0.49474606", "0.49423102", "0.4906", "0.49013367", "0.4868407", "0.4830539", "0.48219237", "0.48181483", "0.48002812", "0.4790003", "0.47767705", "0.4764989", "0.4753516...
0.55589473
1
Send a Upgrade Starship Request to the Server
def upgradeStarshipOrder(self, value, newDesignID, systemID): try: dOrder = {'type':'Upgrade Starship', 'value':'%s-%s' % (value, newDesignID), 'system':systemID, 'round':self.game.myGalaxy['currentRound']} serverResult = self.game.server.addIndustryOrder(self.game....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def submitUpgrade(self, upgrade):\n\t\tquery = ''\n\t\tconn = self.get_connection()\n\t\theaders = { 'Content-type' : 'application/json', 'Authorization' : 'A10 %s' %self.sessionid}\n\t\toutput=OrderedDict()\n\t\toutput['upgrade']=serialize_Upgrade_json(upgrade)\n\t\tpayload = serialize_final_json(output)\n\t\tcon...
[ "0.58831775", "0.58006155", "0.57312983", "0.5609044", "0.5497002", "0.54170656", "0.54170656", "0.54029775", "0.5384765", "0.53103185", "0.53103185", "0.53031105", "0.530016", "0.5284694", "0.52797866", "0.5279409", "0.52785295", "0.5261212", "0.5236451", "0.5162234", "0.516...
0.6124495
0
Send a Change City Request to the Server
def changeCity(self, resource, cityList, systemID): try: for cityID in cityList: dOrder = {'type':'Change City', 'value':'%s-%s' % (cityID, resource), 'system':systemID, 'round':self.game.myGalaxy['currentRound']} serverResult = self.game.ser...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def city_update(self):\n self.city = self.city_finder(self.location.__str__())", "def change_city(update, context):\n text = \"Выберите город для которого вы хотите получать прогнозы погоды:\"\n keyboard = []\n for city in context.bot_data['cities']:\n keyboard.append(InlineKeyboardButton(...
[ "0.6663336", "0.62715334", "0.601674", "0.59078443", "0.5874249", "0.5740363", "0.5740363", "0.5740363", "0.5740363", "0.5740363", "0.5740363", "0.5740363", "0.5740363", "0.5740363", "0.5548151", "0.55466586", "0.55179083", "0.54797816", "0.5407591", "0.54046226", "0.5361261"...
0.64537144
1
Send an Upgrade Industry Request to the Server
def upgradeIndustry(self, industryList, systemID): try: for industryID in industryList: dOrder = {'type':'Upgrade Industry', 'value':'%s' % industryID, 'system':systemID, 'round':self.game.myGalaxy['currentRound']} serverResult = self.game.se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def onUpgradeIndustry(self, item):\n self.frame.mode.upgradeIndustry(self.lstIndustry.getMultiSelectedItems(), self.mySystemDict['id'])", "def putUpgrade(self, upgrade):\n\t\tquery = ''\n\t\tconn = self.get_connection()\n\t\theaders = { 'Content-type' : 'application/json', 'Authorization' : 'A10 %s' %self...
[ "0.64728266", "0.56415874", "0.54775846", "0.54764247", "0.5464972", "0.54102933", "0.5372601", "0.53667414", "0.53667414", "0.5304643", "0.5289307", "0.51534754", "0.51217216", "0.5117058", "0.5095513", "0.5095513", "0.5063401", "0.50334805", "0.50283486", "0.50021476", "0.4...
0.6486769
0
Send a Remove Industry Request to the Server
def removeIndustry(self, industryList, systemID): try: for industryID in industryList: dOrder = {'type':'Remove Industry', 'value':'%s' % industryID, 'system':systemID, 'round':self.game.myGalaxy['currentRound']} serverResult = self.game.serv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def onRemoveIndustry(self, item):\n self.frame.mode.removeIndustry(self.lstIndustry.getMultiSelectedItems(), self.mySystemDict['id'])", "def remove(auth_context):\n uid = auth_context.get('uid')\n item_id = request.form.get('id')\n print(\"Remove:\"+item_id)\n if item_id:\n carts.remove...
[ "0.66085905", "0.5896786", "0.5712835", "0.5666746", "0.5591159", "0.54879755", "0.54631156", "0.54591674", "0.5342989", "0.5342989", "0.5317733", "0.53105915", "0.5308066", "0.529149", "0.52845466", "0.5252707", "0.5221221", "0.52082735", "0.5169906", "0.5168562", "0.515193"...
0.7167433
0
refresh Armadas in both systems given
def refreshArmadas(self, myFleetID, fromSystemID, toSystemID): try: # get system update if nessessary myShipDict = self.game.myShips[myFleetID] if toSystemID not in self.game.allSystems[fromSystemID]['connectedSystems'] and fromSystemID <> toSystemID: # warp m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _reload_acls(self):\n\t\tself.acls = ACLs()", "def refresh():\n return __apf_cmd(\"-e\")", "def reload():\n if not _status_apf():\n return __apf_cmd(\"-r\")", "def reload(self):", "def reload(self):", "def refresh(self):\n self.update_from_file()\n self.update_from_env()", ...
[ "0.62471324", "0.615544", "0.5981153", "0.5886698", "0.5886698", "0.58249754", "0.5640278", "0.5639728", "0.56047136", "0.56047136", "0.5603611", "0.5547479", "0.54831105", "0.54745996", "0.54745996", "0.54745996", "0.54244626", "0.54215544", "0.53838384", "0.53835917", "0.53...
0.63831264
0
Perform refresh to accomodate industry Order
def refreshIndustryOrder(self, systemID): try: # get empire update self.getEmpireUpdate(['CR','AL','EC','IA']) # refresh gui self.mainFooter.panel.populate() # refresh panel if still hovering over it if self.system...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def refresh(self, from_date=None, to_date=None):\n if self.db_tool.is_connected():\n self.__handle_open_orders()", "def refresh(self, irc, msg, args, optlist, orderid):\n self.db.deleteExpired(self.registryValue('orderExpiry'))\n gpgauth = self._checkGPGAuth(irc, msg.prefix)\n ...
[ "0.66867507", "0.63671505", "0.61137855", "0.60263824", "0.60224473", "0.60224473", "0.5973685", "0.5901901", "0.5901901", "0.5840083", "0.5808225", "0.5801637", "0.5795329", "0.5795329", "0.5782632", "0.57808536", "0.57463706", "0.57463706", "0.57463706", "0.57109416", "0.56...
0.64525163
1
Perform refresh to trade routes
def refreshTradeRoutes(self, systemID): try: # get empire update self.getTradeRoutes() # show trade routes if not already shown if self.game.myEmpire['viewTradeRoutes'] == 0: self.toggleTradeRoutes() else: s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def refresh(self, url, args, cancellationSignal):\n pass", "def refresh(self):\n pass", "def refresh(self):\n pass", "def refresh_view():\n pass", "def refreshSwapRates(self):\r\n self.firstPass()", "def refresh(self) -> None:\n pass", "def refresh(self) -> None:\n...
[ "0.6427736", "0.6298683", "0.6298683", "0.6296685", "0.61771286", "0.61719096", "0.61719096", "0.61719096", "0.6151888", "0.6128708", "0.60788935", "0.60556966", "0.6003625", "0.59166884", "0.59166884", "0.59150994", "0.5894135", "0.5878472", "0.58700484", "0.58700484", "0.58...
0.7151813
0
Perform refresh to market orders
def refreshMarketOrders(self, systemID): try: # get empire update self.getMarketOrders() # get empire update self.getEmpireUpdate(['CR','AL','EC','IA']) # get system update self.getSystemUpdate(['AL','EC','IA'], sy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def refresh(self, from_date=None, to_date=None):\n if self.db_tool.is_connected():\n self.__handle_open_orders()", "def refresh(self, irc, msg, args, optlist, orderid):\n self.db.deleteExpired(self.registryValue('orderExpiry'))\n gpgauth = self._checkGPGAuth(irc, msg.prefix)\n ...
[ "0.65837204", "0.6569524", "0.637456", "0.637456", "0.6260474", "0.6233192", "0.6233192", "0.6233192", "0.6161472", "0.6146556", "0.6141642", "0.611664", "0.6108066", "0.61036533", "0.60770214", "0.60770214", "0.6034718", "0.6025904", "0.60247755", "0.60247755", "0.6021657", ...
0.6825157
0