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
Test case for aws_service_api_keypair_get
def test_aws_service_api_keypair_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_keypairs_get(self):\n pass", "def test_aws_service_api_keypair_generate_post(self):\n pass", "def test_aws_service_api_keypair_delete(self):\n pass", "def test_aws_service_api_keypair_import_post(self):\n pass", "def test_create_api_key(self):\n p...
[ "0.87272215", "0.77711517", "0.76828736", "0.69687665", "0.6587534", "0.65302324", "0.6508063", "0.6470722", "0.6401116", "0.6392054", "0.6370844", "0.6345941", "0.63402843", "0.63292104", "0.63100874", "0.62989324", "0.6209678", "0.6179603", "0.61722237", "0.61598915", "0.61...
0.9449849
0
Test case for aws_service_api_keypair_import_post
def test_aws_service_api_keypair_import_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_keypair_generate_post(self):\n pass", "def test_aws_service_api_keypair_get(self):\n pass", "def test_aws_service_api_keypair_delete(self):\n pass", "def test_aws_service_api_keypairs_get(self):\n pass", "def test_create_api_key(self):\n pass", ...
[ "0.792199", "0.694477", "0.67042994", "0.67018545", "0.61249477", "0.6051414", "0.56280106", "0.5590886", "0.55801374", "0.5567025", "0.5530842", "0.55304706", "0.5523036", "0.54735106", "0.54558766", "0.5437347", "0.5433976", "0.5428403", "0.54215634", "0.54156524", "0.54147...
0.9547715
0
Test case for aws_service_api_keypairs_get
def test_aws_service_api_keypairs_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_keypair_get(self):\n pass", "def test_aws_service_api_keypair_generate_post(self):\n pass", "def test_aws_service_api_keypair_delete(self):\n pass", "def test_aws_service_api_keypair_import_post(self):\n pass", "def get(self, name):\n path = '/os-...
[ "0.89948696", "0.7429849", "0.72318494", "0.68253005", "0.6428975", "0.637614", "0.60023105", "0.59939665", "0.5983117", "0.59761864", "0.59480745", "0.5947974", "0.59439266", "0.5929136", "0.58903056", "0.58107954", "0.5772948", "0.57086974", "0.569662", "0.5693239", "0.5678...
0.9444123
0
Test case for aws_service_api_network_subnets_get
def test_aws_service_api_network_subnets_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_subnets(self):\n url = '%s/v2.0/subnets' % self.catalog['network']\n res = self.get(url)\n if res['status'] == 200:\n return json.loads(res['body'])['subnets']\n else:\n LOG.error('Get subnets failed: %s %s %s' %\n (res['status'], res['...
[ "0.8326366", "0.8207443", "0.77458423", "0.773097", "0.76437336", "0.7635327", "0.75836563", "0.747489", "0.73467875", "0.73467875", "0.731024", "0.72891515", "0.7184063", "0.7079082", "0.70580095", "0.69772714", "0.6942426", "0.6940601", "0.6905459", "0.68559116", "0.6825933...
0.9566142
0
Test case for aws_service_api_networks_get
def test_aws_service_api_networks_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_networks(self):\n pass", "def test_get_network(self):\n pass", "def get_networks(self):\n url = '%s/v2.0/networks' % self.catalog['network']\n res = self.get(url)\n if res['status'] == 200:\n return json.loads(res['body'])['networks']\n else:\n ...
[ "0.8384454", "0.7379086", "0.7318698", "0.7318663", "0.7294449", "0.7183769", "0.69510686", "0.6810491", "0.67909086", "0.6770815", "0.6674351", "0.6660264", "0.66253245", "0.66232175", "0.6577437", "0.6521967", "0.651514", "0.65070605", "0.650605", "0.6473854", "0.6383238", ...
0.95457506
0
Test case for aws_service_api_private_image_get
def test_aws_service_api_private_image_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_private_images_get(self):\n pass", "def test_aws_service_api_public_image_get(self):\n pass", "def test_aws_service_api_image_get(self):\n pass", "def test_aws_service_api_public_images_get(self):\n pass", "def get_image(event, context):\n try:\n ...
[ "0.9268567", "0.8515992", "0.8399844", "0.81762105", "0.6704678", "0.66913", "0.64894724", "0.64272404", "0.63345486", "0.62184286", "0.6190606", "0.6187278", "0.6182644", "0.61573607", "0.61392295", "0.6135909", "0.61230046", "0.6112058", "0.60774755", "0.6073487", "0.601545...
0.9579085
0
Test case for aws_service_api_private_images_get
def test_aws_service_api_private_images_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_private_image_get(self):\n pass", "def test_aws_service_api_public_images_get(self):\n pass", "def test_aws_service_api_public_image_get(self):\n pass", "def test_aws_service_api_image_get(self):\n pass", "def test_images(self):\n\n message = {\"m...
[ "0.9245754", "0.8509919", "0.8128298", "0.7955235", "0.67987007", "0.67778707", "0.66492873", "0.65181035", "0.6443877", "0.6395238", "0.63889945", "0.6366931", "0.6331277", "0.6261341", "0.622767", "0.6148064", "0.6132572", "0.61236227", "0.6058544", "0.6032558", "0.6021095"...
0.9565417
0
Test case for aws_service_api_public_image_get
def test_aws_service_api_public_image_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_public_images_get(self):\n pass", "def test_aws_service_api_image_get(self):\n pass", "def test_aws_service_api_private_image_get(self):\n pass", "def test_aws_service_api_private_images_get(self):\n pass", "def get_image(event, context):\n try:\n ...
[ "0.9147275", "0.8947318", "0.86610794", "0.8327578", "0.6968766", "0.6962929", "0.68538654", "0.6803162", "0.6783308", "0.6701789", "0.6664229", "0.6662487", "0.66177744", "0.6595421", "0.6537655", "0.6490602", "0.6470058", "0.6434494", "0.6427295", "0.6417345", "0.6409972", ...
0.9514068
0
Test case for aws_service_api_public_images_get
def test_aws_service_api_public_images_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_public_image_get(self):\n pass", "def test_aws_service_api_private_images_get(self):\n pass", "def test_aws_service_api_image_get(self):\n pass", "def test_aws_service_api_private_image_get(self):\n pass", "def test_images(self):\n\n message = {\"...
[ "0.9030294", "0.8608971", "0.84502596", "0.8226284", "0.7452266", "0.6786225", "0.6761363", "0.6706916", "0.6639855", "0.6559341", "0.653849", "0.6529791", "0.65247184", "0.6505588", "0.6494819", "0.64355224", "0.64348966", "0.6434324", "0.6426369", "0.64168745", "0.6388035",...
0.9515447
0
Test case for aws_service_api_regions_get
def test_aws_service_api_regions_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_api_regions(self):\n # load api base\n r = requests.get('{server}/api/0.1/'.format(\n server=self.get_server_url())).json()\n # load regions from url specified in api base\n r = requests.get(r['regions']).json()\n self.assertIn('count', r)\n self.assert...
[ "0.7572894", "0.73636293", "0.7204617", "0.71709335", "0.7119498", "0.7119498", "0.6878119", "0.6786396", "0.6769581", "0.65975285", "0.6471772", "0.6452135", "0.6423102", "0.63701135", "0.63528806", "0.6258155", "0.6240444", "0.61896706", "0.6179061", "0.6056295", "0.6048398...
0.9564887
0
Test case for aws_service_api_security_groups_get
def test_aws_service_api_security_groups_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_api_v1_groups_get(self):\n pass", "def test_get_groups(self):\n pass", "def test_get_groups(self):\n pass", "def test_get_groups(self):\n response = self.client.get_groups()\n uri, args = response[\"uri\"].split(\"?\")\n\n self.assertEqual(response[\"method\...
[ "0.7902849", "0.7510473", "0.7510473", "0.7471958", "0.74338824", "0.74338824", "0.7391786", "0.73295635", "0.7019355", "0.6873554", "0.6837248", "0.68147165", "0.6743259", "0.6743259", "0.6727421", "0.6713464", "0.670311", "0.66311735", "0.6624133", "0.6624133", "0.6624133",...
0.9491485
0
Test case for aws_service_api_snapshot_delete
def test_aws_service_api_snapshot_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_snapshot(self):\n ctxt = context.get_admin_context()\n extra_specs = {}\n type_ref = volume_types.create(ctxt, 'hgst-1', extra_specs)\n snapshot = {'id': '1', 'name': 'volume1',\n 'display_name': '',\n 'volume_type_id': type_ref['id'...
[ "0.7890424", "0.7668865", "0.7533782", "0.73568654", "0.7311986", "0.7207969", "0.7096665", "0.70816356", "0.69637513", "0.690928", "0.69079185", "0.68927884", "0.6888659", "0.6888522", "0.68796116", "0.6850907", "0.67979336", "0.6763749", "0.6683268", "0.663037", "0.6612236"...
0.9599573
0
Test case for aws_service_api_snapshots_get
def test_aws_service_api_snapshots_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_snapshots_post(self):\n pass", "def xtest_snapshot_api(self):\n\n req = httplib2.Http(\".cache\")\n body = r\"\"\"{ \"snapshot\": { \"instanceId\": \"123\", \"name\": \"dbapi_test\" } }\"\"\"\n \n # Test creating an snapshot without a body in th...
[ "0.8165117", "0.76457405", "0.7574539", "0.7050154", "0.7035185", "0.6838947", "0.6798095", "0.67245835", "0.6693685", "0.6692401", "0.6687871", "0.66250813", "0.65893096", "0.6535789", "0.6534415", "0.6528434", "0.64653736", "0.63096005", "0.6277198", "0.62761366", "0.625982...
0.9516805
0
Test case for aws_service_api_snapshots_post
def test_aws_service_api_snapshots_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_snapshots_get(self):\n pass", "def xtest_snapshot_api(self):\n\n req = httplib2.Http(\".cache\")\n body = r\"\"\"{ \"snapshot\": { \"instanceId\": \"123\", \"name\": \"dbapi_test\" } }\"\"\"\n \n # Test creating an snapshot without a body in the...
[ "0.7824954", "0.727321", "0.71308035", "0.68776023", "0.6790315", "0.664617", "0.6434439", "0.6432623", "0.63407123", "0.63197875", "0.6133041", "0.6101257", "0.6053529", "0.60171944", "0.59851056", "0.59770787", "0.595111", "0.5950911", "0.5950342", "0.5913461", "0.58947", ...
0.9483812
0
Test case for aws_service_api_validate_subscription_post
def test_aws_service_api_validate_subscription_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_subscription(self):\n pass", "def post_create_subscription(\n self, response: pubsub.Subscription\n ) -> pubsub.Subscription:\n return response", "def test_get_subscription(self):\n pass", "def test_create_response_descriptor_subscriptions_subscription_subscript...
[ "0.72985333", "0.6906576", "0.6746659", "0.67185956", "0.670407", "0.65617806", "0.6491322", "0.6466054", "0.64172935", "0.64076334", "0.6401086", "0.63378197", "0.62992346", "0.624313", "0.62266105", "0.6217573", "0.6185081", "0.6161922", "0.61287135", "0.6126021", "0.612336...
0.95499164
0
Test case for aws_service_api_vm_command_put
def test_aws_service_api_vm_command_put(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_tag_put(self):\n pass", "def test_aws_service_api_vm_workshift_put(self):\n pass", "def test_aws_service_api_vm_patch(self):\n pass", "def test_aws_service_api_vm_delete(self):\n pass", "def test_aws_service_api_vm_management_get(self):\n pass"...
[ "0.81759644", "0.74614275", "0.72217697", "0.6894823", "0.6842685", "0.67816526", "0.6751381", "0.6558063", "0.64946073", "0.63549376", "0.6314738", "0.61670405", "0.614158", "0.61310565", "0.6130978", "0.6096973", "0.60926175", "0.6065767", "0.6025456", "0.5973508", "0.59611...
0.9491606
0
Test case for aws_service_api_vm_delete
def test_aws_service_api_vm_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_volume_delete(self):\n pass", "def test_delete_virtual_service(self):\n pass", "def delete_vm(client, resource_group_name, vm_name):\n return client.delete(resource_group_name, vm_name)", "def test_aws_service_api_snapshot_delete(self):\n pass", "def test_aw...
[ "0.76845914", "0.7401219", "0.73782235", "0.7279414", "0.72571427", "0.7151605", "0.70824784", "0.70211935", "0.700503", "0.6966841", "0.69554144", "0.69535273", "0.69121355", "0.6897992", "0.687267", "0.6852948", "0.6817927", "0.6777296", "0.6759868", "0.6732892", "0.6713095...
0.95375043
0
Test case for aws_service_api_vm_details_get
def test_aws_service_api_vm_details_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_get(self):\n pass", "def test_aws_service_api_vm_management_get(self):\n pass", "def test_aws_service_api_vms_get(self):\n pass", "def get_details(self, psvm):\n return self.get(psvm)", "def test_aws_service_api_vm_patch(self):\n pass", "def ...
[ "0.86986274", "0.82846344", "0.7914184", "0.7215921", "0.68684095", "0.68192875", "0.66386724", "0.6511931", "0.6482203", "0.646786", "0.6464285", "0.637554", "0.6286821", "0.6259161", "0.6224959", "0.62205684", "0.6214965", "0.6181512", "0.61462253", "0.61442876", "0.6130757...
0.95614815
0
Test case for aws_service_api_vm_get
def test_aws_service_api_vm_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_details_get(self):\n pass", "def test_aws_service_api_vm_management_get(self):\n pass", "def test_aws_service_api_vms_get(self):\n pass", "def test_aws_service_api_vm_patch(self):\n pass", "def test_virtualservice_get(self):\n pass", "def tes...
[ "0.91339034", "0.8864053", "0.861006", "0.76438653", "0.72016954", "0.71333116", "0.7080705", "0.70437694", "0.70271695", "0.69803905", "0.69289654", "0.6851026", "0.6775111", "0.6690608", "0.6568262", "0.64512783", "0.6433684", "0.64195716", "0.6370653", "0.63509077", "0.630...
0.9452272
0
Test case for aws_service_api_vm_management_get
def test_aws_service_api_vm_management_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_get(self):\n pass", "def test_aws_service_api_vm_details_get(self):\n pass", "def test_aws_service_api_vms_get(self):\n pass", "def test_aws_service_api_vm_patch(self):\n pass", "def test_aws_service_api_vm_command_put(self):\n pass", "def te...
[ "0.8650585", "0.8562624", "0.8373791", "0.70795417", "0.6962664", "0.6897586", "0.6574185", "0.65094703", "0.64713967", "0.6338804", "0.62986034", "0.62899095", "0.6258442", "0.6202984", "0.61594754", "0.61232984", "0.6044133", "0.6041169", "0.6038002", "0.6024266", "0.597843...
0.95178163
0
Test case for aws_service_api_vm_password_get
def test_aws_service_api_vm_password_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetPassword(self):\n pass", "def get_password(self):\n raise NotImplementedError('get_password')", "def GetPassword(self):\n return self._password", "def password(self) -> str:", "def test_invalid_password(self):\n pass", "def _get_password(self):\r\n return self._passwor...
[ "0.7222929", "0.7099967", "0.68307626", "0.6830078", "0.6776669", "0.6640706", "0.66043776", "0.65847296", "0.65678656", "0.6471251", "0.64595413", "0.6397165", "0.6388326", "0.6383084", "0.6377725", "0.6366573", "0.63620764", "0.63547564", "0.63525546", "0.6336687", "0.63261...
0.9478655
0
Test case for aws_service_api_vm_patch
def test_aws_service_api_vm_patch(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_get(self):\n pass", "def test_aws_service_api_vm_command_put(self):\n pass", "def test_aws_service_api_vm_management_get(self):\n pass", "def test_aws_service_api_vm_tag_put(self):\n pass", "def test_aws_service_api_vm_details_get(self):\n pass...
[ "0.82336074", "0.8126507", "0.7836095", "0.77227956", "0.7702922", "0.751186", "0.7425756", "0.7319667", "0.7219776", "0.6920091", "0.68976235", "0.66285187", "0.6533979", "0.6498052", "0.64471275", "0.6408248", "0.63949734", "0.63852394", "0.63488567", "0.6342148", "0.633660...
0.9435803
0
Test case for aws_service_api_vm_security_group_delete
def test_aws_service_api_vm_security_group_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_resource_group(self):\n pass", "def test_delete_group(self):\n pass", "def test_delete_group(self):\n pass", "def test_aws_service_api_vm_security_group_put(self):\n pass", "def security_group_delete(auth=None, **kwargs):\n cloud = get_operator_cloud(auth)\n ...
[ "0.7839854", "0.7500313", "0.7500313", "0.7480745", "0.7460259", "0.7452618", "0.743292", "0.7414543", "0.73841035", "0.7381263", "0.73142505", "0.71547073", "0.7150299", "0.7143438", "0.7121918", "0.71215004", "0.707065", "0.7057178", "0.705154", "0.7003657", "0.69980025", ...
0.96059275
0
Test case for aws_service_api_vm_security_group_put
def test_aws_service_api_vm_security_group_put(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_security_group_delete(self):\n pass", "def test_08_security_group(self):\n # Validate the following:\n # 1. Create a project\n # 2. Assign some security groups to that project\n # 3. Verify the security groups can only be assigned to VM belonging\n ...
[ "0.7739094", "0.73521936", "0.7036603", "0.6653077", "0.6653077", "0.6556714", "0.65383494", "0.65037537", "0.64947385", "0.6492873", "0.6491554", "0.6489214", "0.6464362", "0.63628876", "0.63405657", "0.63301015", "0.6310847", "0.6285586", "0.627555", "0.62239367", "0.622218...
0.95949286
0
Test case for aws_service_api_vm_tag_put
def test_aws_service_api_vm_tag_put(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_command_put(self):\n pass", "def test_add_or_update_single_tag(self):\n p = self.load_policy({\n 'name': 'test-azure-tag',\n 'resource': 'azure.vm',\n 'filters': [\n {'type': 'value',\n 'key': 'name',\n ...
[ "0.80429476", "0.729708", "0.70491844", "0.6841491", "0.6683153", "0.6553686", "0.6502497", "0.6415904", "0.64025015", "0.63829607", "0.63378245", "0.63253623", "0.61899245", "0.61463225", "0.6143658", "0.60995877", "0.5990448", "0.5973975", "0.59707505", "0.59622836", "0.595...
0.96140796
0
Test case for aws_service_api_vm_workshift_delete
def test_aws_service_api_vm_workshift_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_workshift_put(self):\n pass", "def test_aws_service_api_vm_workshift_post(self):\n pass", "def test_aws_service_api_vm_delete(self):\n pass", "def test_delete_workout(self):\n response = self.client.open(\n '/workout/{id}'.format(id='id_examp...
[ "0.7511097", "0.7364616", "0.73206496", "0.67302877", "0.66817266", "0.6495581", "0.64496297", "0.64332926", "0.6427471", "0.6413648", "0.6361137", "0.6328748", "0.6317846", "0.6265027", "0.61935854", "0.612659", "0.61088544", "0.60996175", "0.6056947", "0.60172695", "0.60065...
0.9626205
0
Test case for aws_service_api_vm_workshift_post
def test_aws_service_api_vm_workshift_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_workshift_put(self):\n pass", "def test_aws_service_api_vm_workshift_delete(self):\n pass", "def test_aws_service_api_vms_post(self):\n pass", "def test_aws_service_api_vm_command_put(self):\n pass", "def test_shift_view_post(self):\n path = re...
[ "0.84547627", "0.7423614", "0.68335587", "0.617915", "0.6070825", "0.5989244", "0.5934529", "0.5797156", "0.5796808", "0.5699866", "0.5630047", "0.5624665", "0.55860275", "0.55702406", "0.5515915", "0.54990745", "0.5466368", "0.5455596", "0.5427891", "0.53978723", "0.53920615...
0.94778556
0
Test case for aws_service_api_vm_workshift_put
def test_aws_service_api_vm_workshift_put(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_workshift_post(self):\n pass", "def test_aws_service_api_vm_workshift_delete(self):\n pass", "def test_aws_service_api_vm_command_put(self):\n pass", "def test_shift_view_put(self):\n path = reverse('api:id-shifts', kwargs={'id': self.shift.id})\n ...
[ "0.86835265", "0.7789825", "0.74265546", "0.64560974", "0.64510584", "0.62108296", "0.61423326", "0.6033521", "0.60048115", "0.5985862", "0.59651035", "0.59144586", "0.5877153", "0.5786453", "0.5764561", "0.57141596", "0.56339496", "0.560271", "0.54617304", "0.54551876", "0.5...
0.9653785
0
Test case for aws_service_api_vms_get
def test_aws_service_api_vms_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vm_get(self):\n pass", "def test_aws_service_api_vm_management_get(self):\n pass", "def test_aws_service_api_vm_details_get(self):\n pass", "def test_aws_service_api_vms_post(self):\n pass", "def test_virtualservice_get(self):\n pass", "def test...
[ "0.86987966", "0.8631125", "0.842901", "0.7912379", "0.693028", "0.69067043", "0.6821294", "0.6698808", "0.66339666", "0.6614842", "0.6563548", "0.65617937", "0.654087", "0.64765596", "0.6475945", "0.64094234", "0.63141346", "0.6279449", "0.6171911", "0.6146017", "0.61012304"...
0.9503802
0
Test case for aws_service_api_vms_post
def test_aws_service_api_vms_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_vms_get(self):\n pass", "def test_aws_service_api_vm_workshift_post(self):\n pass", "def test_aws_service_api_vm_command_put(self):\n pass", "def test_aws_service_api_vm_tag_put(self):\n pass", "def test_deployvm_userdata_post(self):\n deployVmRes...
[ "0.7603022", "0.72159064", "0.6981549", "0.69673485", "0.693044", "0.6839709", "0.68275684", "0.67187107", "0.65854514", "0.6572492", "0.6507726", "0.6489554", "0.63969433", "0.63578254", "0.6249199", "0.6237796", "0.6137117", "0.61366147", "0.60767686", "0.6037173", "0.60177...
0.94187784
0
Test case for aws_service_api_volume_attachment_delete
def test_aws_service_api_volume_attachment_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_volume_delete(self):\n pass", "def test_delete_attached_volume(self):\n server, validation_resources = self._create_server()\n volume = self.create_volume()\n self.attach_volume(server, volume)\n\n self.assertRaises(lib_exc.BadRequest,\n ...
[ "0.8310692", "0.77349037", "0.7635774", "0.75067145", "0.75060105", "0.7399964", "0.73437047", "0.7274928", "0.7239528", "0.7180327", "0.71410435", "0.69960743", "0.6957549", "0.6951939", "0.6923718", "0.687879", "0.6873728", "0.68463564", "0.6834399", "0.6799959", "0.6781629...
0.9622656
0
Test case for aws_service_api_volume_attachment_put
def test_aws_service_api_volume_attachment_put(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_volume_attachment_delete(self):\n pass", "def test_aws_service_api_volume_patch(self):\n pass", "def test_attachment_update_volume_in_error_state(self):\n volume_params = {'status': 'available'}\n\n vref = tests_utils.create_volume(self.context, **volume_par...
[ "0.78520364", "0.70537263", "0.6843338", "0.66168505", "0.65721464", "0.6559735", "0.6498688", "0.64489305", "0.6446952", "0.6433131", "0.6415115", "0.6407497", "0.63907266", "0.63678694", "0.6332799", "0.6299971", "0.6292937", "0.6288657", "0.62113434", "0.6199681", "0.61764...
0.95771945
0
Test case for aws_service_api_volume_delete
def test_aws_service_api_volume_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_volume_attachment_delete(self):\n pass", "def test_delete_volume(self):\n ctxt = context.get_admin_context()\n extra_specs = {}\n type_ref = volume_types.create(ctxt, 'hgst-1', extra_specs)\n volume = {'id': '1', 'name': 'volume1',\n 'd...
[ "0.8468831", "0.81775326", "0.8146488", "0.77009195", "0.75285304", "0.7432786", "0.7391771", "0.735651", "0.73492223", "0.72565275", "0.71595895", "0.7126499", "0.7101761", "0.70642024", "0.7002589", "0.69212985", "0.6907403", "0.68808544", "0.6820135", "0.67568016", "0.6745...
0.9583541
0
Test case for aws_service_api_volume_get
def test_aws_service_api_volume_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_volumes_get(self):\n pass", "def test_volumes_get(self):\n pass", "def test_aws_service_api_volume_patch(self):\n pass", "def test_aws_service_api_volume_types_get(self):\n pass", "def test_aws_service_api_volume_delete(self):\n pass", "def volu...
[ "0.87159956", "0.8193062", "0.79313076", "0.78389907", "0.75917023", "0.72042996", "0.7173881", "0.7138423", "0.70423996", "0.6946495", "0.6889604", "0.6761077", "0.67592734", "0.67408574", "0.66669095", "0.65210545", "0.6495301", "0.64644176", "0.6450827", "0.64361185", "0.6...
0.9506741
0
Test case for aws_service_api_volume_patch
def test_aws_service_api_volume_patch(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_volume_get(self):\n pass", "def test_aws_service_api_volume_attachment_put(self):\n pass", "def test_aws_service_api_volume_delete(self):\n pass", "def test_aws_service_api_volumes_get(self):\n pass", "def test_aws_service_api_volumes_post(self):\n ...
[ "0.8404985", "0.7963305", "0.7776195", "0.77071863", "0.76335806", "0.74082214", "0.7226184", "0.7076858", "0.6940691", "0.6913554", "0.6855418", "0.671127", "0.6625104", "0.64926636", "0.6474662", "0.6460252", "0.64272976", "0.6321299", "0.6295169", "0.6265758", "0.6237064",...
0.9439126
0
Test case for aws_service_api_volume_types_get
def test_aws_service_api_volume_types_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_aws_service_api_volume_get(self):\n pass", "def get_volume_types(self):\n res = self.get('%s/types' % self.catalog['volume'])\n if res['status'] == 200:\n return json.loads(res['body'])['volume_types']\n else:\n LOG.error('Get volume types failed: %s %s ...
[ "0.7527856", "0.7515748", "0.7399525", "0.73993516", "0.70917654", "0.68899465", "0.63437366", "0.6312394", "0.60646117", "0.6017373", "0.59605116", "0.58603066", "0.5806784", "0.5803278", "0.5764818", "0.57422024", "0.5703015", "0.5697612", "0.56767386", "0.5667692", "0.5651...
0.956193
0
Test case for aws_service_api_volumes_get
def test_aws_service_api_volumes_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_volumes_get(self):\n pass", "def test_aws_service_api_volume_get(self):\n pass", "def test_aws_service_api_volumes_post(self):\n pass", "def test_aws_service_api_volume_types_get(self):\n pass", "def get_volumes_detail(self, **kw):\n return (200, {}, {\"volumes\"...
[ "0.8942529", "0.87519145", "0.80404556", "0.77520996", "0.7608479", "0.7544432", "0.7415526", "0.733975", "0.7072568", "0.6962387", "0.69297963", "0.6905789", "0.68827385", "0.68624336", "0.6763317", "0.67302483", "0.671769", "0.6712588", "0.6687525", "0.6679484", "0.6639061"...
0.9550234
0
Test case for aws_service_api_volumes_post
def test_aws_service_api_volumes_post(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_volumes_post(self):\n pass", "def test_aws_service_api_volumes_get(self):\n pass", "def test_volumes_get(self):\n pass", "def test_aws_service_api_volume_get(self):\n pass", "def test_aws_service_api_volume_delete(self):\n pass", "def test_aws_service_api_volum...
[ "0.8798903", "0.7797968", "0.72953814", "0.69540304", "0.6889303", "0.6877601", "0.67905885", "0.6789412", "0.6704169", "0.6693733", "0.6646005", "0.6571699", "0.64049333", "0.63365346", "0.62437063", "0.6133804", "0.60914564", "0.6068486", "0.60637164", "0.6053222", "0.60373...
0.94235116
0
An observation for Deep Xi (noisyspeech STMS and STPS).
def observation(self, x): x = self.normalise(x) x_STMS, x_STPS = self.polar_analysis(x) x_STMS_STPS = tf.concat([x_STMS, x_STPS], axis=-1) return x_STMS_STPS, x_STMS_STPS
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def observation(self, x):\n\t\tx = self.normalise(x)\n\t\tx_STDCT = self.stdct_analysis(x)\n\t\treturn x_STDCT, None", "def observation(self, x):\n\t\tx = self.normalise(x)\n\t\tx_STMS, x_STPS = self.polar_analysis(x)\n\t\treturn x_STMS, x_STPS", "def get_observable_description(stix_obj, log):\n desc = \"\"...
[ "0.551871", "0.5380339", "0.5367954", "0.52299434", "0.5219479", "0.50972205", "0.50261205", "0.4998411", "0.4998411", "0.49744838", "0.49730173", "0.49615476", "0.49530286", "0.49497813", "0.49444118", "0.49292263", "0.49218303", "0.49119952", "0.48962384", "0.48684102", "0....
0.5608419
0
Method to expand the neighbor_word_list with synsets, hyponyms and hypernyms. used in get_neighbor_words_set()
def expand_synset(neighbor_word_list, language): if not expand_synset_activated or not language.__eq__("English"): return neighbor_word_list new_neighbor_word_set = set() for word in neighbor_word_list: new_neighbor_word_set.add(word) synsets = wn.synsets(word) synonyms_lis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_neighbor_words_list(sentence, language):\n if language.__eq__(\"Spanish\") or language.__eq__(\"Catalan\"):\n sentence = sentence.getElementsByTagName('target')[0]\n\n left_list, right_list = get_left_right_lists(sentence, language)\n neighbor_word_list = []\n\n for item in left_list[-k:...
[ "0.6233785", "0.54712224", "0.5385365", "0.53399545", "0.5255301", "0.5233051", "0.5192063", "0.51569444", "0.5123623", "0.50904995", "0.5077879", "0.50651765", "0.50616145", "0.5047993", "0.5031947", "0.5022816", "0.4951013", "0.4943876", "0.49117774", "0.49117774", "0.48616...
0.806715
0
Method to read the test set, parse the test data, and map each instance into a vector space
def parse_test_data(test_set, training_output, language): print "Reading test set: " + test_set xmldoc = minidom.parse(test_set) data = {} lex_list = xmldoc.getElementsByTagName('lexelt') for node in lex_list: lexelt = node.getAttribute('item') # item "active.v" data[lexelt] = [] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test(self, test_data):\n with open(test_data, 'r') as test_data:\n results = {}\n for type in self.label_type_map:\n results[self.label_type_map[type]] = []\n while True:\n tokens = test_data.readline().split()\n pos = test_da...
[ "0.66019076", "0.62800115", "0.6211686", "0.6174027", "0.60878825", "0.60251486", "0.60153896", "0.599982", "0.59790295", "0.5974165", "0.5945519", "0.59419864", "0.59393996", "0.5916594", "0.59055924", "0.58963406", "0.587455", "0.5853635", "0.5831062", "0.5817713", "0.58151...
0.66560996
0
This runs a command on the remote host. This returns a pexpect.spawn object. This handles the case when you try to connect to a new host and ssh asks you if you want to accept the public key fingerprint and continue connecting.
def ssh_command (user, host, password, command): ssh_newkey = 'Are you sure you want to continue connecting (yes/no)?' child = pexpect.spawn('ssh -l %s %s %s'%(user, host, command)) i = child.expect([ssh_newkey, PASSWORD, pexpect.TIMEOUT]) if i == 0: # First Time access - send yes to connect. chi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def execute_remote(ipaddr, command):\n\n\treturn execute(['ssh', '-f', '-t', '-oPasswordAuthentication=no',\n\t\t'-l', 'alt', ipaddr, command])", "def ssh(pi):\n command = \"ssh {0}\".format(pi)\n subprocess.Popen(command, shell=True)", "def _remote_cmd(self, cmd, block=True):\n s = remote_cmd(hos...
[ "0.69595283", "0.6643719", "0.6521727", "0.6504823", "0.6419268", "0.6395431", "0.6382922", "0.6355576", "0.63307595", "0.63192797", "0.63166046", "0.62774366", "0.6273903", "0.62710875", "0.6231371", "0.6216641", "0.62067455", "0.6205677", "0.6203712", "0.61976033", "0.61973...
0.74644256
0
The constructor for reviewsMenuClass. Attributes
def __init__(self): super().__init__() self.status = True self.token = tokensClass() self.layout = layout.reviewsLayoutClass(self) self.title = "LMS Reviews GUI" self.location = (50, 125)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, menu_name):\n self.menu_name = menu_name", "def __init__(self, parent_menu, label):\n self._parent_menu = parent_menu\n self._options = {}\n self._label = label\n self._menu = Menu(parent_menu)\n self._key_underline = 0", "def __init__(self, name, ti...
[ "0.7024792", "0.6597017", "0.6345977", "0.6256314", "0.62525284", "0.62365556", "0.614118", "0.60794574", "0.60352033", "0.59544903", "0.59349453", "0.59194565", "0.5849597", "0.5827087", "0.58053714", "0.57678133", "0.57440007", "0.57258856", "0.5698869", "0.56835824", "0.56...
0.68060464
1
Encodes a dictionary (asterix) in the EUROCONTROL ASTERIX category.
def encode(asterix): assert type(asterix) is dict asterix_record = 0 #priority_asterix_cat = [21, 34] for k, v in asterix.iteritems(): #for k in priority_asterix_cat: v = asterix[k] record = 0 n_octets_data_record = 0 cat = 0 ctf = load_asterix_category_for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encode(category_main : ):", "def latin1_to_ascii(self, unicrap):\n xlate = {0xc0: 'A', 0xc1: 'A', 0xc2: 'A', 0xc3: 'A', 0xc4: 'A', 0xc5: 'A',\n 0xc6: 'Ae', 0xc7: 'C',\n 0xc8: 'E', 0xc9: 'E', 0xca: 'E', 0xcb: 'E',\n 0xcc: 'I', 0xcd: 'I', 0xce: 'I', 0xcf: ...
[ "0.5903913", "0.49887666", "0.49819857", "0.49383077", "0.49203125", "0.4909551", "0.4891353", "0.47965437", "0.47933576", "0.4793037", "0.47612906", "0.47022176", "0.4689794", "0.46841627", "0.46771052", "0.46750674", "0.4664644", "0.4662446", "0.4597144", "0.4587141", "0.45...
0.6899768
0
Encodes the record from the given category (cat).
def encode_category(cat, did, tree): if did == {}: return 0, 0 mdi = {} for c in tree.getElementsByTagName('DataItem'): di = c.getAttribute('id') if di.isdigit(): di = int(di) rule = c.getAttribute('rule') if di in did: if verbose >= 1: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encode(category_main : ):", "def add_category(self, category: str) -> None:\n for letter in self.data:\n if not self.data[letter].get(category):\n self.data[letter][category] = []\n print(f'Categoria: {category} adicionada ao dicionário.')\n self.save()\n self.beautify_json()", "def...
[ "0.67229545", "0.561765", "0.5484989", "0.5475443", "0.5324302", "0.5320905", "0.53020734", "0.524053", "0.51852304", "0.50320554", "0.50262564", "0.5022167", "0.49936855", "0.49604708", "0.4958038", "0.4957628", "0.49234056", "0.49139455", "0.48985356", "0.48847762", "0.4876...
0.6056459
1
Returns the encoded Data Item. Encodes the Data Item in the data field of record according to the rules defined in the XML file.
def encode_dataitem(dfd, tree): assert type(dfd) is dict or type(dfd) is list for c in tree.getElementsByTagName('DataItemFormat'): for d in c.childNodes: if d.nodeName == 'Fixed': return encode_fixed(dfd, d) else: if d.nodeName == 'Variable': ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prep_posting_data(cls, items: List[dict]) -> bytes:\n\n def my_item_func(x):\n if x == \"contributors\":\n return \"contributor\"\n elif x == \"records\":\n return \"record\"\n\n xml = dicttoxml(\n items, custom_root=\"records\", attr...
[ "0.5869862", "0.5869558", "0.5837552", "0.5814655", "0.56730103", "0.5657856", "0.56101656", "0.5610163", "0.55314076", "0.544302", "0.5434582", "0.54142344", "0.54142344", "0.53586537", "0.53413665", "0.53378576", "0.5311251", "0.53084904", "0.529813", "0.52737993", "0.52665...
0.5936579
0
Board Path Cloner This function is used to clone the BoardPath object.
def clone(self): # Run the constructor. other = BoardPath() # Copy the object variables other._current_cost = self._current_cost other._path = self._path[:] other._current_loc = self._current_loc return other
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clone(self):\n joined_function = lambda: dot_joiner(self.path, self.path_type)\n return self.__class__(self.path, self.configuration, self.converters, self.ignore_converters, joined_function=joined_function)", "def clone(self) -> 'BoardGraph':\n return self.__class__(self.board_class)", ...
[ "0.69156903", "0.6680933", "0.6565345", "0.64692", "0.63603795", "0.63189757", "0.6306653", "0.62988687", "0.6227066", "0.6202716", "0.6115038", "0.6103501", "0.6099532", "0.60984504", "0.6085155", "0.6061067", "0.60572535", "0.6047523", "0.5992621", "0.59245497", "0.59100866...
0.81588864
0
Current Location Accessor Function to get the current location for this path.
def get_current_location(self): return self._current_loc
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_current_location(self):\n return self.enu_2_local()", "def get_current_location():\n global current_location\n return current_location", "def get_location(self):\r\n return self.__location", "def get_location(self):\n\t\treturn self.location", "def get_location(self):\n r...
[ "0.82560873", "0.8195256", "0.8011756", "0.79347134", "0.7920117", "0.78825885", "0.7742611", "0.7653603", "0.7653603", "0.7628534", "0.7536863", "0.75195265", "0.75195265", "0.75195265", "0.75195265", "0.75195265", "0.75195265", "0.75195265", "0.75195265", "0.75195265", "0.7...
0.8912243
0
Distance Calculator Flexible function for calculating the distance. Depending on the specified heuristic (either explicit in call or implicit with class), different distances can be returned for the same functions.
def get_distance(self, heuristic=""): # If no heuristic is specified, used the default if(heuristic == ""): heuristic = BoardPath._heuristic if(heuristic == "manhattan"): return self.calculate_manhattan_dist() elif(heuristic == "euclidean"): return se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def heuristic(current, goal):\r\n distance = getDistance(current, goal)\r\n return distance", "def test_distance(self):\n\n def f(a, b):\n if a == b:\n return 0\n if (a in \"UC\" and b in \"UC\") or (a in \"AG\" and b in \"AG\"):\n return 1\n ...
[ "0.639866", "0.6343634", "0.61924297", "0.59297323", "0.59297323", "0.5853613", "0.5760782", "0.57106924", "0.56957674", "0.56786555", "0.56701374", "0.565588", "0.5652829", "0.56316733", "0.56216407", "0.5561049", "0.5556251", "0.55511826", "0.5511873", "0.550787", "0.549677...
0.7659271
0
Manhattan Distance Calculator Calculates difference between current location and\ the goal location using Manhattan distance.
def calculate_manhattan_dist(self): return self._current_cost + abs(self._current_loc.get_row() - self._goal_loc.get_row()) +\ abs(self._current_loc.get_column() - self._goal_loc.get_column())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __manhattan(self, x_state, y_state, x_goal, y_goal):\n distance = (abs(x_state - x_goal) + abs(y_state - y_goal))\n return distance", "def manhattan_distance(self):\n return calculate_manhattan_distance(self.location, self.target_location)", "def manhattan_distance(self):\n x, y...
[ "0.8165803", "0.8088598", "0.7407255", "0.73463696", "0.73238844", "0.7292226", "0.7271559", "0.7247168", "0.7209934", "0.71817213", "0.7162157", "0.71465975", "0.7138987", "0.71370137", "0.70733595", "0.7065889", "0.70469683", "0.70367557", "0.69594985", "0.69328445", "0.689...
0.816172
1
Euclidean Distance Calculator Calculates difference between current location and\ the goal location using Euclidean distance.
def calculate_euclidean_dist(self): x_dist = self._current_loc.get_column() - self._goal_loc.get_column() y_dist = self._current_loc.get_row() - self._goal_loc.get_row() # Note ** is power operator in Python return self._current_cost + sqrt(x_dist**2 + y_dist**2)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def euclidean_distance(self):\n return sqrt(pow((self.goal_pose.x - self.ground_truth_pose.x), 2) +\n pow((self.goal_pose.y - self.ground_truth_pose.y), 2))", "def getEuclideanDistance():\r\n global euclideanDistance\r\n return euclideanDistance", "def euclideanDistance(loc1, lo...
[ "0.7016859", "0.696656", "0.6942588", "0.6918102", "0.6652748", "0.66375005", "0.65335757", "0.64920557", "0.6466708", "0.6416474", "0.63655174", "0.63655174", "0.63360476", "0.6332252", "0.6328849", "0.632643", "0.63199997", "0.63198346", "0.63112885", "0.62728566", "0.62400...
0.78475267
0
Direct Blocked Path Checker This function checks whether if all direct next moves from the current location are blocked by an unpassable object or the edge of the board. This can be used to determine a penalty factor when calculating the heuristic. This function is used in the made_up heuristics function.
def _is_all_direct_next_moves_blocked(self, reference_board=None): # Use untraversed board if none is specified if reference_board is None: reference_board = BoardPath._untraversed_board # Case #1 - Goal and Current Location in the Same Row if self._current_loc.get_row() == ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_move_knight_legally_blocked(self):\n for piece in [('N', True), ('N', False)]:\n self.c.board = \\\n [[('K', piece[1]) for i in range(8)] for i in range(8)]\n self.c.turn = piece[1]\n self.c.board[4][4] = piece\n for dest in ['d6', 'f6', 'c...
[ "0.61759573", "0.61158156", "0.5978466", "0.5958256", "0.59319913", "0.5661901", "0.56494457", "0.56460166", "0.5641585", "0.5622185", "0.5597397", "0.5537868", "0.54507625", "0.5450352", "0.5431192", "0.54221904", "0.5419678", "0.5415468", "0.5415228", "0.541518", "0.5394872...
0.7079593
0
Move Location Calculator Calculates the new location for a move in the specified direction.
def _calculate_move_location(self, direction): current_row = self._current_loc.get_row() current_column = self._current_loc.get_column() # Calculate the new location for a left move if (direction == "l"): return Location(current_row, current_column - 1) # Calculate t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getNewLocation(self, currentLocation, directionalMovement):\n x = currentLocation[0] + directionalMovement[0]\n y = currentLocation[1] + directionalMovement[1]\n return (x, y)", "def get_location(self, currentlocation, action):\n\t\t# Retrieve movement tuple from dictionary\n\t\tmovement...
[ "0.6761584", "0.65838546", "0.6551763", "0.6501945", "0.6485612", "0.6441349", "0.6333201", "0.623619", "0.62274575", "0.6121013", "0.6087272", "0.60715115", "0.60713834", "0.6050827", "0.6002279", "0.59576184", "0.5944363", "0.59366095", "0.5923641", "0.59176326", "0.5860694...
0.8537776
0
Goal Setter This function sets the goal for the board.
def set_goal(goal_loc): BoardPath._goal_loc = goal_loc
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_goal(self, goal: GoalType) -> None:\n self.goal = goal", "def goal(self, goal):\n\n self._goal = goal", "def set_goal(self, goal):\r\n self.goal = goal\r\n self.start_time = self.get_current_time()", "def set_goal(self, **kwargs):\n return self.env.set_goal(**kwargs...
[ "0.7807485", "0.7740968", "0.75928867", "0.753877", "0.7105755", "0.69478315", "0.6941798", "0.66204673", "0.6585629", "0.64913666", "0.63631916", "0.6287369", "0.62222", "0.6091264", "0.6044519", "0.59357023", "0.59132695", "0.5908332", "0.5907529", "0.58134097", "0.5791385"...
0.7828492
0
Untraversed Board Setter This function stores the untraversed board configuration.
def set_untraversed_board(board): BoardPath._untraversed_board = board
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resetBoard(self):\n pass", "def reset(self, board):", "def reset_board(self):\n\n self.board = np.array(self.initial_board)", "def resetBoard(self):\n\t\tself.board = np.zeros((self.boardSize,self.boardSize))", "def resetBoard(self):\n\t\tself.board = np.zeros((self.boardSize,self.boardSi...
[ "0.65023744", "0.6442172", "0.63471204", "0.63091016", "0.63091016", "0.6104631", "0.6043555", "0.5902821", "0.58919376", "0.5850664", "0.58014584", "0.57706535", "0.57347137", "0.5697121", "0.56899226", "0.5621945", "0.5598106", "0.5597589", "0.5568787", "0.5554146", "0.5552...
0.7495511
0
Heuristic Setter This function stores the board path heuristic
def set_heuristic(heuristic): BoardPath._heuristic = heuristic
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def heuristic(self):\r\n # 1.\r\n blacks, whites = 0, 0\r\n weights = [0 for _ in range(6)]\r\n directions = [[-1, -1], [-1, 1], [1, 1], [1, -1]]\r\n user_dir = directions[:2] if self.current_player == 'n' else directions[2:]\r\n for i in range(8):\r\n for j in ...
[ "0.72173494", "0.7166709", "0.68784773", "0.68497974", "0.6678026", "0.6647084", "0.6623912", "0.6621537", "0.6619162", "0.65451026", "0.6475537", "0.6408203", "0.6355258", "0.631753", "0.62351453", "0.6221724", "0.6215816", "0.6163034", "0.61629605", "0.61505026", "0.6150489...
0.77581763
0
Less Than Operator Less than operator used for the distance of two BoardPath objects.
def __lt__(self, other): return self.get_distance() < other.get_distance()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __lt__(self, other):\n return self.lessThan(other)", "def less(lhs, rhs):\n return _make.less(lhs, rhs)", "def __lt__(self, other):\n return self.dist_from_source < other.dist_from_source", "def __lt__(self, other):\n return self.abs2phy.__lt__(other)", "def __lt__(self, other):...
[ "0.70282334", "0.69592035", "0.6899089", "0.68775755", "0.68775755", "0.6856517", "0.6844349", "0.6821911", "0.67643285", "0.6722422", "0.6687183", "0.6684212", "0.6676479", "0.6667317", "0.6630886", "0.66158414", "0.6570471", "0.65577924", "0.65521175", "0.65098625", "0.6481...
0.7412242
0
Row Number Accessor Accessor to get the row number of this location.
def get_row(self): return self._row_number
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def row_counter(self) -> int:\n return self.writer.row_counter", "def row(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"row\")", "def row(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"row\")", "def row(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"row...
[ "0.75195545", "0.74487907", "0.74487907", "0.74487907", "0.74487907", "0.74487907", "0.74487907", "0.74487907", "0.74487907", "0.74487907", "0.74487907", "0.74487907", "0.74487907", "0.74487907", "0.74487907", "0.74487907", "0.74372005", "0.74104637", "0.74104637", "0.7353418",...
0.81669563
0
Column Number Accessor Accessor to get the column number of this location.
def get_column(self): return self._column_number
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def column(self) -> int:\n return self._column", "def get_column(self, pos, **opts):\n lnum, cnum = self._get_column(pos, **opts)\n return lnum + self.LINE_NUM_BASE, cnum + self.COLUMN_NUM_BASE", "def column(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"column\")", "def ...
[ "0.784214", "0.7419771", "0.7389335", "0.7389335", "0.7389335", "0.7389335", "0.7389335", "0.7389335", "0.7389335", "0.7389335", "0.7389335", "0.7389335", "0.7389335", "0.7389335", "0.7389335", "0.7389335", "0.7389335", "0.71282494", "0.6932579", "0.6846213", "0.68336886", ...
0.82080346
0
Read in molecule(s) (and conformers, if present) in insdf file. Create Psi4 input calculations for each structure.
def confs_to_psi(insdf, method, basis, calctype='opt', memory=None, via_json=False): wdir = os.getcwd() # open molecules molecules = reader.read_mols(insdf) ### For each molecule: for each conf, generate input for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_single_sdf_to_pdb(pdb_subfolder_path, sdf_file_path):\n\n if os.path.exists(sdf_file_path) is True:\n\n file_basename = basename(sdf_file_path)\n file_basename = file_basename.split(\"__input1\")[0]\n\n file_output_name = \"{}{}_\".format(pdb_subfolder_path, file_basename)\n\n ...
[ "0.6264046", "0.59976745", "0.58319986", "0.5608725", "0.56042486", "0.55735916", "0.5559321", "0.5514504", "0.5502829", "0.5502089", "0.54991895", "0.5464917", "0.5451997", "0.5418302", "0.54164004", "0.54018366", "0.53971356", "0.5395792", "0.53391236", "0.5336778", "0.5336...
0.6674122
0
Extract a date from the JSON filing, at the provided path.
def get_date(filing: Dict, path: str) -> date: try: raw = dpath.util.get(filing, path) return date.fromisoformat(raw) except (IndexError, KeyError, TypeError, ValueError): return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fromJSON(self, path='') -> dict:\n try:\n return(importJSON(path))\n except Exception as error:\n print(f\"Error: self.fromJSON({path}) -> {error}\")", "def parse_data_from_file(path):\n print(path.stem)\n \n raw = path.stem.split('-')\n\n rawdate = raw[0][2:]\...
[ "0.6075106", "0.5673903", "0.56059843", "0.5590737", "0.55821204", "0.5564711", "0.55302495", "0.54868776", "0.54759276", "0.54637516", "0.5429487", "0.5429347", "0.5408953", "0.5400296", "0.53059995", "0.530356", "0.52951413", "0.5294175", "0.5283827", "0.5268045", "0.523605...
0.6837925
0
Extract a str from the JSON filing, at the provided path.
def get_str(filing: Dict, path: str) -> str: try: raw = dpath.util.get(filing, path) return str(raw) except (IndexError, KeyError, TypeError, ValueError): return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_json_str(self):\n\n with open(self.path, mode='r', encoding='utf-8') as file:\n return file.read()", "def actual(self, path: str):\n nodes = path.split('.')\n resp_json = self.json\n for node in nodes:\n resp_json = resp_json.get(node)\n return res...
[ "0.6552176", "0.6368723", "0.62871057", "0.62073576", "0.6198753", "0.61034834", "0.5978531", "0.5907652", "0.59014565", "0.5865438", "0.58326775", "0.58097404", "0.5789452", "0.5682722", "0.56802696", "0.5669492", "0.5638627", "0.5630336", "0.56209874", "0.5619586", "0.56013...
0.6647993
0
Extract a boolean from the JSON filing, at the provided path.
def get_bool(filing: Dict, path: str) -> str: try: raw = dpath.util.get(filing, path) return bool(raw) except (IndexError, KeyError, TypeError, ValueError): return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def boolean_value(cls, json_field: str, value: bool) -> \"JsonPattern\":\n return jsii.sinvoke(cls, \"booleanValue\", [json_field, value])", "def getBool( self, par, path ):\n\n return self.db.getBoolPar( par, path )", "def is_json_path(location):\n if filetype.is_f...
[ "0.6071287", "0.57850856", "0.5647551", "0.55946714", "0.5420584", "0.5406428", "0.5285786", "0.5227173", "0.52162", "0.51716995", "0.5158244", "0.5113517", "0.51068", "0.50923777", "0.509074", "0.5047108", "0.50103277", "0.49863604", "0.49533832", "0.4951799", "0.49441293", ...
0.7121972
0
quote src to string
def _quote(src, encoding="utf-8"): if isinstance(src, unicode): src = src.encode(encoding) return urllib.quote(src)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def replacement(self):\n assert (self.src or self.inline) and not (self.src and self.inline)\n if self.src:\n return '<script async type=\"text/javascript\" src=\"%s\"></script>' % urllib.quote(self.src)\n else:\n return '<script>\\n%s\\n</script>' % self.inline", "def Sourceify(path):\n retu...
[ "0.5974841", "0.58601075", "0.5774958", "0.5739309", "0.561575", "0.5580705", "0.5553651", "0.5544228", "0.5541506", "0.548759", "0.5487165", "0.54729", "0.5467639", "0.54428", "0.54321027", "0.5386833", "0.53533804", "0.53520805", "0.5338085", "0.53334767", "0.5330983", "0...
0.6619573
0
Return the expected keys for the log entry.
def expected_log_keys(learner: adaptive.BaseLearner) -> list[str]: # Check if the result contains the expected keys expected_keys = [ "elapsed_time", "overhead", "npoints", "cpu_usage", "mem_usage", ] if not _at_least_adaptive_version("0.16.0", raises=False) and n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check(self, entry_type:str, x:str):\n keys = set()\n x = self._decode(x)\n\n for log in self.logs:\n for datum in log[entry_type]:\n res = self._follow(datum, x)\n\n if type(res) == dict:\n for key in res.keys():\n ...
[ "0.6501111", "0.62000287", "0.61273104", "0.61169225", "0.6086626", "0.60766816", "0.60219604", "0.6018274", "0.5984301", "0.5967556", "0.5930063", "0.5905795", "0.5868908", "0.586158", "0.5827901", "0.57728463", "0.5768729", "0.5760981", "0.5749968", "0.5745742", "0.5743827"...
0.71414775
0
Return the Spacy processed sentences in which the element is positioned.
def get_processed_sentence(self): if not hasattr(self, "in_sentence"): raise AttributeError(f"{self} does not have attribute 'in_sentence'.") try: sen_ixs = [sen.element_id for sen in self.in_sentence] except TypeError as e: sen_ixs = [self.in_sentence.eleme...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sentences(self) -> List[str]:\n\t\treturn [self.text[start:end] for start, end in self.tokenizations]", "def sentences(self) -> List[str]:\n\t\treturn [self.text[start:end] for start, end in self.tokenizations]", "def get_sentences(self):\n return [s for s in self.text.split('\\n')]", "def get_pro...
[ "0.69350046", "0.69350046", "0.6880929", "0.68049884", "0.6687255", "0.6577726", "0.64769137", "0.6395686", "0.6395686", "0.6374306", "0.63575345", "0.6353244", "0.6340651", "0.62586695", "0.6229776", "0.622054", "0.6184957", "0.61654425", "0.6101179", "0.6096108", "0.6073652...
0.7071078
0
Check if the annotation is pronominal by full parsed PoS tag. All tokens should be pronominal (works best for anaphoric pronominal mentions as intended).
def check_pronominal(self): pronom_tags = ["PRP", "PRP$", "WDT", "WP", "WP$"] token_procs = self.get_processed_tokens() all_pronom = all( t.tag_ in pronom_tags for t in token_procs ) # True if all tokens are pronom_tags # print(f"{' '.join(t.text + '.' + t.tag_ for t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def contains_pronoun(cluster):\n for mention in cluster:\n if any([w.tag_.startswith(\"PRP\") for w in mention]):\n # Found a mention with a pronoun\n return True\n return False", "def find_pronoun(sent):\n pronoun = None\n\n for word, part_of_speech in sent.pos_tags:\n ...
[ "0.61451167", "0.58428335", "0.5761659", "0.55204415", "0.542974", "0.53121424", "0.52965194", "0.5273935", "0.5249292", "0.5238592", "0.52133167", "0.5151928", "0.5150011", "0.5145963", "0.5134433", "0.5119308", "0.5116591", "0.50993526", "0.5094933", "0.5078213", "0.5075910...
0.72758985
0
Get a list of token objects for the event extent. The extent can be set to include discontiguous_triggers, participants, and/or fillers. Setting this to an empty list will only return the original In the definition of an event nugget we include all of these.
def get_extent_tokens(self, extent=["discontiguous_triggers"], source_order=True): all_tokens = self.tokens.copy() core_sen_idx = all_tokens[0].in_sentence.element_id # to ensure discont is in same sentence for ext in extent: if getattr(self, ext): all_tokens.extend(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_extent_tokens(self, extent=[], source_order=True):\n all_tokens = self.tokens.copy()\n\n for ext in extent:\n if getattr(self, ext):\n all_tokens.extend(t for x in getattr(self, ext) for t in x.tokens)\n\n all_tokens = list(\n set(all_tokens)\n ...
[ "0.77589923", "0.6758597", "0.64047307", "0.6147929", "0.60916317", "0.6056437", "0.5989617", "0.58163434", "0.58126074", "0.56831574", "0.567847", "0.56537056", "0.55833375", "0.54851276", "0.54851276", "0.54851276", "0.5463045", "0.5441857", "0.54370433", "0.53718114", "0.5...
0.7712019
1
Get a list of token ids for the event extent. Relies on Event.get_extent_tokens() for fetching the tokens.
def get_extent_token_ids(self, **kwargs): token_span = self.get_extent_tokens(**kwargs) return [t.index for t in token_span]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_extent_tokens(self, extent=[], source_order=True):\n all_tokens = self.tokens.copy()\n\n for ext in extent:\n if getattr(self, ext):\n all_tokens.extend(t for x in getattr(self, ext) for t in x.tokens)\n\n all_tokens = list(\n set(all_tokens)\n ...
[ "0.7306065", "0.7179015", "0.67308676", "0.66366893", "0.6510626", "0.63861024", "0.6332538", "0.6213533", "0.6002818", "0.59769213", "0.59459466", "0.58939326", "0.58939326", "0.58939326", "0.5877605", "0.58751804", "0.58647084", "0.5804137", "0.5802045", "0.5801702", "0.578...
0.85507065
0
Get a list of token objects for the sentiment expression extent. The extent can be set to include targets. Setting this to an empty list will only return the original tokens.
def get_extent_tokens(self, extent=[], source_order=True): all_tokens = self.tokens.copy() for ext in extent: if getattr(self, ext): all_tokens.extend(t for x in getattr(self, ext) for t in x.tokens) all_tokens = list( set(all_tokens) ) # this i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_extent_tokens(self, extent=[\"discontiguous_triggers\"], source_order=True):\n all_tokens = self.tokens.copy()\n core_sen_idx = all_tokens[0].in_sentence.element_id # to ensure discont is in same sentence\n\n for ext in extent:\n if getattr(self, ext):\n all_t...
[ "0.79144996", "0.66847426", "0.64567703", "0.64525014", "0.6422023", "0.63470286", "0.6025481", "0.5879312", "0.5853642", "0.58203405", "0.58203405", "0.55929494", "0.5589577", "0.55816835", "0.5545209", "0.553422", "0.54197466", "0.54197466", "0.54197466", "0.5392735", "0.53...
0.82137984
0
Set token id based on document id + token position in text
def get_token_id(self): return f"{self.document_title}_{self.index}"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def correct_token_begin_position(self, tokens, text):\n beginning = 0\n for token in tokens:\n token.text_begin = text.find(token.text_content, beginning) \n beginning += len(token.text_content)\n return tokens", "def doc2id(self, doc):\n doc = map(self.process_t...
[ "0.61441404", "0.6103226", "0.60713357", "0.58848673", "0.58489716", "0.5830993", "0.5819702", "0.5808241", "0.5795522", "0.57590806", "0.5744294", "0.5744294", "0.5727401", "0.57221353", "0.57152474", "0.56934476", "0.568862", "0.56846684", "0.5665206", "0.5659678", "0.56587...
0.7065767
0
Append value to attribute list, create the attribute list if does not exist.
def append_attribute(myobj, attrib_k, val): vals = getattr(myobj, attrib_k, []) if val not in vals: vals.append(val) setattr(myobj, attrib_k, vals)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _setAttribute(self, attribute, value):\n\n # if multiple values found\n if hasattr(self, attribute):\n\n # make sure attribute is a list\n values = getattr(self, attribute)\n if not isinstance(values, list):\n setattr(self, attribute, [values])\n\n ...
[ "0.72828615", "0.7063005", "0.70154303", "0.6982224", "0.6949298", "0.6837699", "0.66487557", "0.6644792", "0.660447", "0.6597281", "0.65214103", "0.64085853", "0.639992", "0.6395541", "0.63902277", "0.6352462", "0.6338568", "0.63299024", "0.63299024", "0.63299024", "0.632369...
0.74247986
0
Function to converts XML attributes into a dictionary
def __convertAttributes__(xml_source): attributes = {} for attrName, attrValue in xml_source.attributes.items(): attributes[attrName] = attrValue return attributes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_attrs_dict(self, root_element):\n attr_elements = root_element.findall(\"attribute\")\n attrs_dict = {}\n for el in attr_elements:\n attrs_dict[el.attrib[\"name\"]] = {\n \"value\": el.attrib[\"value\"],\n \"type\": el.attrib.get(\"type\", None)...
[ "0.7548967", "0.722563", "0.71245855", "0.711149", "0.7095163", "0.7094138", "0.70292187", "0.6932637", "0.69197536", "0.68689096", "0.6855458", "0.68021226", "0.68001693", "0.6756407", "0.6698822", "0.6619554", "0.6612907", "0.6576497", "0.6554866", "0.6512518", "0.6490863",...
0.7341555
1
Run the Spacy processing pipeline on the annotation documents. Add processed docs so they can be accessed.
def process_spacy(self): def prevent_sentence_boundary_detection(doc): for token in doc: # This will entirely disable spaCy's sentence detection token.is_sent_start = False return doc def process_sentence(sen_tokens): doc = spacy.toke...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process(self, doc):\n # don't try to process null notes\n if not doc[1]:\n if self.verbose:\n print(\"Error segmenting doc\",doc[0])\n return []\n # odd notes may throw an error. Just continue rather than stopping the entire process\n try:\n ...
[ "0.6669254", "0.6452818", "0.6272669", "0.6263057", "0.6151627", "0.6133174", "0.6116166", "0.60921097", "0.6062387", "0.6043837", "0.5952495", "0.5947582", "0.5938026", "0.5930227", "0.58644366", "0.5852183", "0.58298236", "0.5801322", "0.57992077", "0.57630277", "0.57474416...
0.8031649
0
Parses the main corpus and IAA gold standard files and joins them in one WebAnnoProject.
def parse_main_iaa(main_dirp, iaa_dirp, opt_fp): # moderator_id = "gilles" # exclude_moderator = lambda x: moderator_id not in Path(x.path).stem # include_moderator = lambda x: moderator_id in Path(x.path).stem main_project = WebannoProject(main_dirp) # # exclude moderator and trial files which st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main(url, inputFile, directory, rss, opml, output, verbose, debug, relevanceAlgorithm):\n\n if (len(argv) < 2):\n print(\n \"Usage: python3 ctirt.py [options] [target files]\\n\\n Use --> ctirt.py --help for more details...\"\n )\n exit(1)\n\n if (verbose and url) or (url ...
[ "0.56196046", "0.5577734", "0.5525874", "0.5449749", "0.53875864", "0.53493977", "0.53235525", "0.5311306", "0.5266425", "0.5258258", "0.52553433", "0.5223228", "0.5213364", "0.51755184", "0.51462036", "0.5135373", "0.513461", "0.512963", "0.5127664", "0.51267636", "0.5118992...
0.6385642
0
Update the last times attributes of the AddressStatus and of all the processes running on it.
def update_times(self, remote_time, local_time): self.remote_time = remote_time self.local_time = local_time for process in self.processes.values(): process.update_times(self.address_name, remote_time)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _UpdateProcessingStatus(self, pid, process_status, used_memory):", "def update_status(self):\n\n # Memory information can be found in status and statm /proc/PID files\n # status file VmRSS equivalent to top's RES column\n # statm disagrees with status VmRSS, I think it may not include\n ...
[ "0.63074714", "0.61598605", "0.5967854", "0.587815", "0.5851434", "0.5803371", "0.57687116", "0.5440648", "0.5423083", "0.5397243", "0.5386455", "0.5369842", "0.5331419", "0.5302193", "0.52979624", "0.5289811", "0.52506447", "0.5244542", "0.52427137", "0.5232442", "0.5212697"...
0.6196417
1
Add a new process to the process list.
def add_process(self, process): self.processes[process.namespec()] = process
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_process(self):\n process_id = str(self.processBox.currentText())\n\n arguments = {}\n\n for row in range(0, self.processTableWidget.rowCount()):\n p_id = \"\"\n val = None\n\n if self.processTableWidget.item(row, 0):\n p_id = self.process...
[ "0.76126385", "0.7507758", "0.7315577", "0.72722274", "0.72574365", "0.71727246", "0.68514043", "0.6843939", "0.6840627", "0.6770633", "0.6737064", "0.67065763", "0.6432417", "0.6367946", "0.63575804", "0.6237238", "0.61873573", "0.61138415", "0.61019224", "0.6021345", "0.601...
0.83901864
0
Return the process running on the address. Here, 'running' means that the process state is in Supervisor RUNNING_STATES.
def running_processes(self): return [process for process in self.processes.values() if process.running_on(self.address_name)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def running(self):\n info = self.info()\n return info['running']", "def is_process_running(name):\n if not hasattr(is_process_running, \"proc\"):\n is_process_running.proc = None # it doesn't exist yet, so init it\n\n if is_process_running.proc:\n if is_process_running.proc.i...
[ "0.61827284", "0.605477", "0.5984106", "0.59605074", "0.5830705", "0.5814387", "0.57667416", "0.57487637", "0.57090694", "0.5694411", "0.5676516", "0.5661446", "0.5649374", "0.5617451", "0.56060237", "0.55911523", "0.55796784", "0.5576243", "0.55739254", "0.55647177", "0.5558...
0.6297126
0
Return the process running on the address and having a pid. Different from running_processes_on because it excludes the states STARTING and BACKOFF
def pid_processes(self): return [(process.namespec(), process.infos[self.address_name]['pid']) for process in self.processes.values() if process.pid_running_on(self.address_name)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_process(self, pid):\n return self.processes.get(pid, None)", "def running_processes(self):\n return [process for process in self.processes.values()\n if process.running_on(self.address_name)]", "def get_process_pid(robot_name):\n\n try:\n result = check_output(['p...
[ "0.7015587", "0.670613", "0.6585871", "0.6583493", "0.64844155", "0.64499414", "0.6438885", "0.64362067", "0.6434716", "0.63813657", "0.63745505", "0.63590276", "0.63359684", "0.6330875", "0.63202155", "0.62983465", "0.62884915", "0.62884915", "0.6279087", "0.62753826", "0.62...
0.70801574
0
Return the loading of the address, by summing the declared loading of the processes running on that address
def loading(self): loading = sum(process.rules.expected_loading for process in self.running_processes()) self.logger.debug('address={} loading={}'. format(self.address_name, loading)) return loading
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def current_load(self):\n nn = [p.n for p in self._procs]\n return sum(nn), min(nn)", "def get_load_data():\n proc_stat = open(\"/proc/stat\", \"r\")\n ret = []\n #times_since_startup = proc_stat.readline().strip().split()[1:]\n for line in proc_stat:\n line_split = line.strip()....
[ "0.62994903", "0.5876818", "0.577103", "0.5671219", "0.56705534", "0.56662524", "0.55867136", "0.55307513", "0.54727614", "0.5392582", "0.5365475", "0.533915", "0.5335333", "0.5271789", "0.52094007", "0.5200593", "0.519389", "0.5176355", "0.51122624", "0.51087445", "0.5093616...
0.7182065
0
Returns two lists with the ids of grec_seq_rec and seq_reserva
def get_seq_lists(dataframe_bookings): seq_rec = dataframe_bookings.select('operative_incoming').collect() seq_reserva = dataframe_bookings.select('booking_id').collect() seq_rec = [val[0] for val in list(seq_rec)] seq_reserva = [val[0] for val in list(seq_reserva)] return seq_rec, seq_reserva
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def seq_xref_ids(entry):\n\n xref_ids = []\n exon_data = exons(entry)\n for ids in xref_data(entry).values():\n for exon in exon_data:\n for xref_id in ids:\n key = \"{xref_id}-{gene_id}-{chr}:{start}..{stop}\".format(\n xref_id=xref_id,\n ...
[ "0.6269399", "0.61774325", "0.60897326", "0.5778329", "0.5776383", "0.5763285", "0.5730644", "0.5721721", "0.57183284", "0.568632", "0.5685907", "0.56623137", "0.55932146", "0.5542651", "0.5516142", "0.5515765", "0.5473292", "0.5469163", "0.54488885", "0.5432289", "0.5427406"...
0.6646673
0
It calculates the subquery for the field Tax_Sales_Transfer_pricing
def sub_tax_sales_transfer_pricing(manager, df_fields, seq_recs, seq_reservas): # df_hotel = manager.get_dataframe(tables['dwc_bok_t_canco_hotel']) # df_circuit = manager.get_dataframe(tables['dwc_bok_t_canco_hotel_circuit']) # df_other = manager.get_dataframe(tables['dwc_bok_t_canco_other']) # df_trans...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sub_tax_cost_transfer_pricing(manager, df_fields, seq_recs, seq_reservas):\n # df_hotel = manager.get_dataframe(tables[\"dwc_bok_t_canco_hotel\"])\n # df_circuit = manager.get_dataframe(tables[\"dwc_bok_t_canco_hotel_circuit\"])\n # df_other = manager.get_dataframe(tables[\"dwc_bok_t_canco_other\"])\n...
[ "0.6498725", "0.637397", "0.63043004", "0.62905616", "0.6242464", "0.59541345", "0.5881588", "0.5839122", "0.5801799", "0.57798594", "0.5711908", "0.5685891", "0.5622643", "0.55404156", "0.5537151", "0.5537049", "0.5476859", "0.5469033", "0.5468134", "0.5453045", "0.54431385"...
0.66625917
0
It calculates the subquery for the field Tax_Cost_Transfer_pricing
def sub_tax_cost_transfer_pricing(manager, df_fields, seq_recs, seq_reservas): # df_hotel = manager.get_dataframe(tables["dwc_bok_t_canco_hotel"]) # df_circuit = manager.get_dataframe(tables["dwc_bok_t_canco_hotel_circuit"]) # df_other = manager.get_dataframe(tables["dwc_bok_t_canco_other"]) # df_transf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sub_tax_cost_transfer_pricing_eur(manager, df_fields, seq_recs, seq_reservas):\n # df_hotel = manager.get_dataframe(tables[\"dwc_bok_t_canco_hotel\"])\n # df_circuit = manager.get_dataframe(tables[\"dwc_bok_t_canco_hotel_circuit\"])\n # df_other = manager.get_dataframe(tables[\"dwc_bok_t_canco_other\"...
[ "0.65499413", "0.6401581", "0.62985355", "0.6264737", "0.6263573", "0.6209262", "0.5951682", "0.59322137", "0.5912796", "0.58500355", "0.5839168", "0.5828151", "0.57621986", "0.56807303", "0.5652692", "0.5645219", "0.5632515", "0.5612633", "0.55991054", "0.5577054", "0.556269...
0.6695558
0
It calculates the subquery for the field Tax_Transfer_pricing_EUR
def sub_tax_transfer_pricing_eur(manager, df_fields, seq_recs, seq_reservas): # df_hotel = manager.get_dataframe(tables["dwc_bok_t_canco_hotel"]) # df_circuit = manager.get_dataframe(tables["dwc_bok_t_canco_hotel_circuit"]) # df_other = manager.get_dataframe(tables["dwc_bok_t_canco_other"]) # df_transfe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sub_tax_cost_transfer_pricing_eur(manager, df_fields, seq_recs, seq_reservas):\n # df_hotel = manager.get_dataframe(tables[\"dwc_bok_t_canco_hotel\"])\n # df_circuit = manager.get_dataframe(tables[\"dwc_bok_t_canco_hotel_circuit\"])\n # df_other = manager.get_dataframe(tables[\"dwc_bok_t_canco_other\"...
[ "0.65058285", "0.6245366", "0.62209433", "0.60142535", "0.601361", "0.588141", "0.5866098", "0.5865709", "0.5844462", "0.5841258", "0.5803155", "0.5662047", "0.56258506", "0.5612775", "0.5599036", "0.55835426", "0.556036", "0.5547852", "0.5484853", "0.5466989", "0.545998", ...
0.6462657
1
It calculates the subquery for the field Tax_Cost_Transfer_pricing_EUR
def sub_tax_cost_transfer_pricing_eur(manager, df_fields, seq_recs, seq_reservas): # df_hotel = manager.get_dataframe(tables["dwc_bok_t_canco_hotel"]) # df_circuit = manager.get_dataframe(tables["dwc_bok_t_canco_hotel_circuit"]) # df_other = manager.get_dataframe(tables["dwc_bok_t_canco_other"]) # df_tr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sub_tax_cost_transfer_pricing(manager, df_fields, seq_recs, seq_reservas):\n # df_hotel = manager.get_dataframe(tables[\"dwc_bok_t_canco_hotel\"])\n # df_circuit = manager.get_dataframe(tables[\"dwc_bok_t_canco_hotel_circuit\"])\n # df_other = manager.get_dataframe(tables[\"dwc_bok_t_canco_other\"])\n...
[ "0.64423364", "0.6376252", "0.6182043", "0.61586916", "0.6076942", "0.6071446", "0.59395057", "0.5931084", "0.586201", "0.5850323", "0.5799269", "0.57859534", "0.5713411", "0.5647553", "0.5607687", "0.5596589", "0.5572917", "0.5561368", "0.5530456", "0.5508553", "0.5498966", ...
0.66247785
0
This function constructs the integrator to be suitable with casadi environment, for the equations of the model and the objective function with variable time step.
def integrator_model(self): xd, xa, u, uncertainty, ODEeq, Aeq, u_min, u_max, states, algebraics, inputs, nd, na, nu, nmp, modparval \ = self.DAE_system() dae = {'x': vertcat(xd), 'z': vertcat(xa), 'p': vertcat(u), 'ode': vertcat(*ODEeq), 'alg': vertcat(*Aeq)} opts =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def integrator_model(self):\n\n xd, xa, u, uncertainty, ODEeq, Aeq, u_min, u_max, states, algebraics, inputs, nd, na, nu, nmp, modparval \\\n = self.DAE_system()\n ODEeq_ = vertcat(*ODEeq)\n\n self.ODEeq = Function('f', [xd, u], [vertcat(*ODEeq)], ['x0', 'p'], ['xdot'])\n\n d...
[ "0.69303405", "0.59939796", "0.57994497", "0.57433486", "0.57079077", "0.5678165", "0.56725657", "0.5661507", "0.56537825", "0.56398034", "0.5597277", "0.55902517", "0.55843586", "0.55814993", "0.55416745", "0.5530678", "0.5516298", "0.5508994", "0.55017346", "0.55017346", "0...
0.68241906
1
This function constructs the integrator to be suitable with casadi environment, for the equations of the model and the objective function with variable time step.
def integrator_model(self): xd, xa, u, uncertainty, ODEeq, Aeq, u_min, u_max, states, algebraics, inputs, nd, na, nu, nmp, modparval \ = self.DAE_system() ODEeq_ = vertcat(*ODEeq) self.ODEeq = Function('f', [xd, u], [vertcat(*ODEeq)], ['x0', 'p'], ['xdot']) dae = {'x': ver...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def integrator_model(self):\n\n xd, xa, u, uncertainty, ODEeq, Aeq, u_min, u_max, states, algebraics, inputs, nd, na, nu, nmp, modparval \\\n = self.DAE_system()\n\n dae = {'x': vertcat(xd), 'z': vertcat(xa), 'p': vertcat(u),\n 'ode': vertcat(*ODEeq), 'alg': vertcat(*Aeq)}\n ...
[ "0.6824473", "0.6824473", "0.5993993", "0.5799238", "0.5743481", "0.5707509", "0.56789947", "0.56719893", "0.5662057", "0.56536293", "0.5639711", "0.55976707", "0.55896133", "0.5583953", "0.5581527", "0.5541686", "0.5530698", "0.55166656", "0.5509524", "0.55018413", "0.550184...
0.69306874
0
Sort the 4 corners clockwise of a rectangle so that the topleft corner is the first one.
def sort_corners(self, corners: np.ndarray): center = np.sum(corners, axis=0) / 4 sorted_corners = sorted( corners, key=lambda p: math.atan2(p[0][0] - center[0][0], p[0][1] - center[0][1]), reverse=True, ) return np.roll(sorted_corners, 1, axis=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sort_corners(corners):\n col_sorted = corners[np.argsort(corners[:, 1])] # sort on the value in column\n\n # sort on the value in rows. a, b are the indexes\n a = np.argsort(col_sorted[:2, 0])\n b = np.argsort(col_sorted[2:, 0]) + 2\n\n return col_sorted[np.hstack((a, b))]", "def order_rect(pt...
[ "0.6854596", "0.66109776", "0.6415772", "0.63892233", "0.62674105", "0.62512946", "0.6234069", "0.6007216", "0.6000448", "0.59593153", "0.5874499", "0.58601785", "0.58035123", "0.57796407", "0.5720378", "0.5702618", "0.5701921", "0.5618068", "0.56109095", "0.5608352", "0.5567...
0.7108666
0
Given 4 sorted corners, compute the homography between the corners and the rectangle's ground truth and return the information on the mapped plane. In other words, this function returns information on a plane (in particular, the desk's or wall's). The plane's origin is in the topleft corner of the rectangle, and the no...
def get_H_R_t(self, corners: np.ndarray) -> Plane: H = cv.findHomography(self.inner_rectangle, corners)[0] result = self.K_inv @ H result /= cv.norm(result[:, 1]) r0, r1, t = np.hsplit(result, 3) r2 = np.cross(r0.T, r1.T).T _, u, vt = cv.SVDecomp(np.hstack([r0, r1, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _prepare_plane(self):\n verticies = [\n # main plane - note that the mainplane is scaled so the mat_plane\n # matrix will it transform to the correct coordinates\n -self.i_border[0]/self._scaling[0], self.i_border[1]/self._scaling[1],\n -self.i...
[ "0.58668405", "0.58515084", "0.5808322", "0.5808322", "0.5799701", "0.5799701", "0.5593243", "0.55419457", "0.5481281", "0.5459112", "0.54404145", "0.5418466", "0.541714", "0.53940755", "0.53733194", "0.5373061", "0.5357221", "0.5352762", "0.5341513", "0.53396374", "0.5331517...
0.6981937
0
Given an image and a rectangle defining a region, return the laser points in that region. In case we are considering the wall or the desk, require at least 30 points for better accuracy.
def get_laser_points_in_region( self, image: np.ndarray, region: Rectangle, is_obj: bool = False, ) -> Optional[np.ndarray]: top_left = region.top_left bottom_right = region.bottom_right region_image = image[top_left.y : bottom_right.y, top_left.x : bottom_right.x] imag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_laser_points(\r\n self,\r\n original_image: np.ndarray,\r\n image: np.ndarray,\r\n extreme_points: ExtremePoints,\r\n ) -> Tuple[\r\n Optional[np.ndarray],\r\n Optional[np.ndarray],\r\n Optional[np.ndarray],\r\n Optional[np.ndarray],\r\n ]:\r\n ...
[ "0.6679829", "0.634663", "0.62997025", "0.6223093", "0.621849", "0.6095733", "0.60441035", "0.59959286", "0.59956324", "0.5957144", "0.59263897", "0.5916754", "0.5900934", "0.587384", "0.58581173", "0.5833918", "0.5820731", "0.58049595", "0.5782126", "0.5764281", "0.575516", ...
0.7383569
0
Use the DBSCAN clustering algorithm in order to remove possible outliers from the points detected as laser in the object. We are basically enforcing continuity in the laser line on the object, i.e. looking for a dense cluster of pixels. Interesting points are the ones whose label is not 1, i.e. the ones belonging to a ...
def remove_obj_outliers(self, points: np.ndarray) -> Optional[np.ndarray]: dbscan_result = self.dbscan.fit(points[:, 0]) mask = dbscan_result.labels_ != -1 return np.expand_dims(points[:, 0][mask], axis=1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DBSCAN(M, eps, min_points):\n colors = ['r', 'g', 'b', 'y', 'c', 'm'] # tablica kolorow - inny kolor dla kazdego clustera\n checked = np.zeros(M.shape[\n 0]) # tablica sprawdzonych punktow wypelniona zerami jesli punkt zostal sprawdzony zmieniana jest wartosc na 1print(checked...
[ "0.6458574", "0.62219197", "0.6213678", "0.61207443", "0.6074292", "0.6022414", "0.5965475", "0.5942092", "0.5927346", "0.5881949", "0.57391447", "0.5729232", "0.56970525", "0.5679967", "0.5674256", "0.5669259", "0.5664249", "0.5654197", "0.56165564", "0.5572699", "0.555027",...
0.6430791
1
Given an image and a list of coordinates of shape (n_points, 1, 2), return the RGB colors of those coordinates in the (0...1) range. Notice that OpenCV uses BGR instead of RGB by default, thus we need to flip the columns.
def get_colors(self, image: np.ndarray, coordinates: np.ndarray) -> np.ndarray: x = coordinates.squeeze(1) return np.flip(image[x[:, 1], x[:, 0]].astype(np.float64) / 255.0, axis=1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_image(img):\n xs = [] # positions\n ys = [] # colors\n for row_i in range(img.shape[0]):\n for col_i in range(img.shape[1]):\n xs.append([row_i, col_i])\n ys.append(img[row_i, col_i])\n \n xs = np.array(xs)\n ys = np.array(ys)\n return xs, ys", ...
[ "0.6468485", "0.6468485", "0.6345939", "0.62494427", "0.61467564", "0.61461294", "0.59144837", "0.59094536", "0.58901876", "0.5879799", "0.58757746", "0.58628285", "0.5841417", "0.5825361", "0.58153236", "0.5774531", "0.57576954", "0.5743293", "0.57418716", "0.5741592", "0.57...
0.702163
0
Given points in the 3D world, save the PLY file representing the point cloud. This function saves both the original file and a version to which an outlier removal process has been applied.
def save_3d_render( self, points: List[np.ndarray], colors: List[np.ndarray] ) -> None: pcd = o3d.geometry.PointCloud() pcd.points = o3d.utility.Vector3dVector(np.vstack(points).astype(np.float64)) pcd.colors = o3d.utility.Vector3dVector(np.vstack(colors)) if self.debug...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save(self, filename):\n if len(self.interpolated_points) > 0:\n red, green, blue = zip(*self.interpolated_points)\n red = [np.asscalar(x) for x in red]\n green = [np.asscalar(x) for x in green]\n blue = [np.asscalar(x) for x in blue]\n output_type =...
[ "0.6294344", "0.62656236", "0.60348487", "0.5977392", "0.5924391", "0.58835065", "0.58382964", "0.5795747", "0.5772745", "0.5762645", "0.5722541", "0.5684895", "0.56516", "0.5644123", "0.56439006", "0.5636157", "0.56341565", "0.56338894", "0.5624714", "0.56098646", "0.5586971...
0.639831
0
Given a plane represented by its origin and a normal and a list of rays, compute the intersections between the plane and the rays.
def compute_intersections( self, plane: Plane, directions: List[np.ndarray] ) -> List[np.ndarray]: return [ line_plane_intersection( plane_origin=plane.origin, plane_normal=plane.normal, line_direction=direction, ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def intersects(self, ray):\n theta = 45\n H = 512\n W = 512\n A = self.origin\n B = Point(W, A.y, A.z)\n C = Point(B.x, (int)(H * math.sin(theta * math.pi / 180)), (int)(H * math.cos(math.pi * theta / 180)))\n D = Point(A.x, (int)(H * math.sin(theta * math.pi / 180)...
[ "0.7197938", "0.6904024", "0.6653329", "0.6607719", "0.65378755", "0.6519269", "0.6485377", "0.6441739", "0.6334094", "0.6284775", "0.6276811", "0.6276351", "0.6261968", "0.62611717", "0.62223566", "0.6186185", "0.61805207", "0.6166154", "0.60925084", "0.60659647", "0.6016266...
0.7335776
0
Build command string from parameters passed to object. Usage of paramter h in options is going to be ignored.
def build_command_string(self): if self._regex_helper.search_compiled(W._re_h, self.options): if self._regex_helper.group("SOLO"): self.options = self.options.replace('-h', '') else: self.options = self.options.replace('h', '') cmd = "{} {}".f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gen_command(process):\n cmd = \"{} \".format(process.name)\n for o in process.options.opt_list:\n i = 0\n opt = \"\"\n for el in o: \n if el and el != \"input\" and el != \"output\" and i != 3:\n opt += str(el)\n if opt[-1] != \"=\" and opt[-1...
[ "0.6516497", "0.64271504", "0.6422479", "0.63904124", "0.6238994", "0.6229805", "0.62154454", "0.6114734", "0.6070556", "0.5986263", "0.59837586", "0.5973345", "0.59382427", "0.5915507", "0.5883363", "0.5877054", "0.58658147", "0.58613133", "0.58564746", "0.585302", "0.583697...
0.7719122
0
Parse general information in line and update it to GENERAL_INFO dictionary.
def _parse_general_info(self, line): if self._regex_helper.search_compiled(W._re_general_info, line): self.current_ret['GENERAL_INFO'].update({ 'time': datetime.datetime.strptime(self._regex_helper.group("TIME"), '%H:%M:%S').time(), 'uptime': self._regex_helper.group(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _parse_line(self, line):\n fields = line.split('|', 4) # stop splitting after fourth | found\n line_info = {'raw_message': line}\n if len(fields) == 5:\n line_info.update(dict(zip(self._fieldnames, fields)))\n return line_info", "def _parse_general_info_V4X(par, parfil...
[ "0.6655572", "0.65438634", "0.61774", "0.6080733", "0.6014996", "0.59691495", "0.5966504", "0.5905911", "0.58785135", "0.583794", "0.5830027", "0.57280356", "0.5722466", "0.56339806", "0.562032", "0.5615857", "0.5602782", "0.5572568", "0.5570758", "0.5545635", "0.5519029", ...
0.8499883
0
Parse V option output in line and append it to RESULT list.
def _parse_v_option(self, line): if self._regex_helper.search_compiled(W._re_v_option, line): self.current_ret['RESULT'].append(self._regex_helper.group("V_OPTION")) raise ParsingDone
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def processOption (self, line) :\n ll = line.split ('=')\n if len (ll) < 2:\n print \"Cannot parse option \" , line\n sys.exit()\n result = (ll[0].strip() , ll[1].strip())\n return result", "def _parse_results(self):\n for line in self.file_dic['output'].s...
[ "0.6423425", "0.5811027", "0.580129", "0.5655842", "0.55434406", "0.533609", "0.53108877", "0.53000253", "0.5271251", "0.5269717", "0.5203191", "0.51964784", "0.5171904", "0.5154556", "0.5100387", "0.5036834", "0.5026639", "0.5026215", "0.5009487", "0.49926525", "0.49875903",...
0.8179622
0
Parse headers and entries in line, create dictionary and append it to RESULT list.
def _parse_header(self, line): if self._regex_helper.search_compiled(W._re_header, line): if not self.headers: for value in re.findall(W._re_header, line): self.headers.append(value[0]) raise ParsingDone else: # Dictiona...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_line(self, line):\n find_result = re.findall(LINE_REGEX, line)\n line_data = {r[0]: r[1] for r in find_result}\n self.process_url(line_data.get('request_to'))\n self.process_status_code(line_data.get('response_status'))", "def process_line(line):\n\n name_comp_list ...
[ "0.66752446", "0.6504577", "0.63924736", "0.6246586", "0.60992664", "0.60275394", "0.59553164", "0.5938524", "0.58829117", "0.58815986", "0.58645564", "0.5864273", "0.5848218", "0.5842252", "0.58342505", "0.58329415", "0.5803412", "0.5788858", "0.57804203", "0.5771522", "0.57...
0.7336327
0
We need to find the halfedge h that is incident to u and is on the face that contains the diagonal uv. To find it, we test every pair of halfedges incident to u and v until we find a pair belonging to the same face.
def referenceEdge(u,v): v1 = u v2 = v e1 = u.getEdge().getPrev() e2 = v.getEdge().getPrev() aux = None #aux is an half-edge incident to u while aux != e1: if aux is None: aux = e1 aux2 = None #aux2 is an half-edge incident to v while aux2 != e2: if aux2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def solve_homography(u, v):\r\n N = u.shape[0]\r\n H = None\r\n\r\n if v.shape[0] is not N:\r\n print('u and v should have the same size')\r\n return None\r\n if N < 4:\r\n print('At least 4 points should be given')\r\n\r\n # TODO: 1.forming A\r\n A = np.zeros((2*N, 8))\r\n ...
[ "0.60242623", "0.5956021", "0.58149", "0.5760208", "0.56859523", "0.5671715", "0.56677574", "0.5637607", "0.5518257", "0.54610336", "0.54298204", "0.5412329", "0.5374091", "0.53719383", "0.53666955", "0.53609663", "0.53559095", "0.5352723", "0.5348312", "0.5332194", "0.531307...
0.62999815
0
FNV1 64bit hash function Implement this, and/or DJB2.
def fnv1(self, key): # hash = 0xff hash = 0xcbf29ce484222325 for n in key.encode(): # print(n) hash = hash ^ n hash = hash * 0x100000001b3 # print(hash) return hash
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fnv1(self, key, seed=0):\n # def fnv1(self, key):\n\n # Your code here\n \"\"\"\n Returns: The FNV-1 hash (64-bit) of a given string. \n \"\"\"\n #Constants : Fails the tests\n # FNV_prime = 1099511628211\n # offset_basis = 14695981039346656037\n\n # #...
[ "0.7850084", "0.72370136", "0.7108986", "0.705044", "0.6990908", "0.691239", "0.67458034", "0.6731104", "0.6608719", "0.6538066", "0.65314394", "0.6447355", "0.6440217", "0.6417119", "0.63966304", "0.6386951", "0.63631225", "0.6338462", "0.6330434", "0.63016164", "0.62938416"...
0.75328153
1