query
stringlengths
10
2k
document
stringlengths
20
51.2k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Sets the survey_id of this SurveyResponseItem.
def survey_id(self, survey_id): self._survey_id = survey_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def survey_id(self, survey_id):\n\n self.logger.debug(\"In 'survey_id' setter.\")\n\n self._survey_id = survey_id", "def survey_response_id(self, survey_response_id):\n\n self._survey_response_id = survey_response_id", "def response_id(self, response_id):\n\n self._response_id = res...
[ "0.8618573", "0.843785", "0.65354514", "0.64803505", "0.602205", "0.5888887", "0.5888887", "0.5763692", "0.5577389", "0.5542974", "0.5542974", "0.5542974", "0.55101526", "0.53621364", "0.5250599", "0.52268004", "0.5217111", "0.5190976", "0.5134774", "0.50895065", "0.50895065"...
0.8573162
1
Sets the date_start of this SurveyResponseItem.
def date_start(self, date_start): self._date_start = date_start
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_date(self, start_date):\n \n self._start_date = start_date", "def start_date(self, start_date):\n\n self._start_date = start_date", "def start_date(self, start_date):\n\n self._start_date = start_date", "def start_date(self, start_date):\n\n self._start_date = sta...
[ "0.8044184", "0.8031017", "0.8031017", "0.8031017", "0.8031017", "0.8031017", "0.8031017", "0.8031017", "0.8031017", "0.8031017", "0.79630566", "0.79136777", "0.7667779", "0.7499739", "0.7391622", "0.72661567", "0.7103995", "0.6787578", "0.6609779", "0.65321636", "0.6432155",...
0.7981389
10
Sets the date_complete of this SurveyResponseItem.
def date_complete(self, date_complete): self._date_complete = date_complete
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def completion_date(self, completion_date):\n\n self._completion_date = completion_date", "def datefinished(self, datefinished):\n\n self._datefinished = datefinished", "def date_finished(self, date_finished):\n self._date_finished = date_finished", "def mark_quiz_complete(self):\n ...
[ "0.7304426", "0.6777117", "0.6679292", "0.6179888", "0.60299665", "0.60299665", "0.60299665", "0.59835947", "0.5957958", "0.59346396", "0.59262896", "0.5840707", "0.5747361", "0.5727676", "0.56830406", "0.5681281", "0.5676561", "0.5632499", "0.56152236", "0.56152236", "0.5615...
0.8693423
0
Sets the entry_id of this SurveyResponseItem.
def entry_id(self, entry_id): self._entry_id = entry_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def line_item_id(self, line_item_id):\n\n self._line_item_id = line_item_id", "def survey_response_id(self, survey_response_id):\n\n self._survey_response_id = survey_response_id", "def response_id(self, response_id):\n\n self._response_id = response_id", "def setEntry(self, entry):\n ...
[ "0.59562767", "0.5916819", "0.5861926", "0.5856332", "0.5759836", "0.57216984", "0.57216984", "0.565832", "0.55221486", "0.5518037", "0.547828", "0.547828", "0.547828", "0.54350024", "0.54350024", "0.54350024", "0.5418015", "0.5398864", "0.5350229", "0.5350229", "0.5350229", ...
0.8001054
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, SurveyResponseItem): return False return self.__dict__ == other.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): return not self == other
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.8455985", "0.83913255", "0.81440157", "0.8140831", "0.8132328", "0.80937284", "0.809181", "0.809181", "0.809181", "0.808509", "0.808509", "0.8076134", "0.8076134", "0.8065528" ]
0.0
-1
Update position of bullets and get rif of old bullets.
def update_bullets(ai_settings, screen, stats, sb, ship, aliens, bullets): # Update bullets positions. bullets.update() # Get rid of bullets that have disappearred. for bullet in bullets.copy(): # Don't remove items from a list or group within a for loop # Loop over a copy of the ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_bullets(bullets):\r\n\t# Update bullet positions.\r\n\tbullets.update()\r\n\tfor bullet in bullets.copy():\r\n\t\tif bullet.rect.right >= 1000:\r\n\t\t\tbullets.remove(bullet)", "def _update_bullet(self):\n\n # update position of old bullets\n self.bullets.update()\n\n # Get rid o...
[ "0.78057015", "0.77952707", "0.7557973", "0.7479368", "0.7402671", "0.7321421", "0.7282783", "0.7223705", "0.71716464", "0.7155258", "0.7084942", "0.7062982", "0.7047425", "0.7012463", "0.69891095", "0.6960275", "0.69391257", "0.6795739", "0.6791307", "0.6658272", "0.6532199"...
0.70299685
13
Check the bullets that have hit the aliens and increse level and speed if there are no aliens left.
def check_bullet_alien_collisions( ai_settings, screen, stats, sb, ship, aliens, bullets ): # Check for any bullets that have hit aliens, with groupcollide(). # If so, get rid of the bullet and the alien. collisions = pygame.sprite.groupcollide(bullets, aliens, True, True) if collisions: for...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_bullet_alien_collisions(self):\n collisions = pygame.sprite.groupcollide(self.bullets, self.aliens, True, True)\n if collisions:\n for hits in collisions.values():\n self.stats.score += self.settings.alien_points * len(hits)\n self.scoreboard.prep_score...
[ "0.77423304", "0.77225107", "0.76369363", "0.7537396", "0.7526439", "0.7511723", "0.7449847", "0.74276257", "0.7279663", "0.72340155", "0.70347446", "0.70186657", "0.6908489", "0.6797692", "0.67903775", "0.6775878", "0.6743335", "0.6735932", "0.67119116", "0.6659797", "0.6594...
0.73596555
8
Determine the number of aliens that fit in a row.
def get_number_alliens_x(ai_settings, alien_width): avaliable_spaxe_x = ai_settings.screen_width - 2 * alien_width number_aliens_x = int(avaliable_spaxe_x / (2 * alien_width)) return number_aliens_x
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def num_cells_for_rows(self, rows):\r\n return (rows * rows + rows) // 2", "def row_count(self):\n return self.well_count // self.col_count", "def rows(self) -> int:\n return self.__squares.__len__()", "def get_number_rows(si_settings,ship_height,alien_height):\n available_space_y = (...
[ "0.7487146", "0.692609", "0.69007885", "0.6785386", "0.6682812", "0.6627333", "0.65228796", "0.6495328", "0.64848644", "0.64505374", "0.6426073", "0.64189243", "0.6388001", "0.6375635", "0.63449955", "0.63037527", "0.62604576", "0.6245096", "0.6237766", "0.6235838", "0.621457...
0.0
-1
Drop entire fleet and change its direction.
def change_fleet_direction(ai_settings, aliens): for alien in aliens.sprites(): alien.rect.y += ai_settings.fleet_drop_speed ai_settings.fleet_direction *= -1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _change_fleet_direction(self):\n\t\tfor alien in self.aliens.sprites():\n\t\t\talien.rect.y += self.settings.fleet_drop_speed\n\t\tself.settings.fleet_direction*=-1", "def _change_fleet_direction(self):\n for alien in self.aliens.sprites():\n alien.rect.y += self.settings.fleet_drop_speed\n...
[ "0.7048327", "0.69970644", "0.69970644", "0.6948205", "0.6753448", "0.66815495", "0.6526987", "0.65244645", "0.64967835", "0.64656526", "0.57720035", "0.5690254", "0.5668506", "0.5492251", "0.5418593", "0.53919894", "0.53870755", "0.5380706", "0.5360977", "0.5346901", "0.5345...
0.65917873
7
Respond to ship being hit by an alien, by losing a life.
def ship_hit(ai_settings, screen, stats, sb, ship, aliens, bullets): if stats.ships_left > 0: # Decrement ships left. stats.ships_left -= 1 # Update scoreboard. sb.prep_ships() # Empty the list of aliens and bullets. aliens.empty() bullets.empty() #...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lose_life(self):\n self.lives -= 1\n self.alive = self.calculate_alive()", "def lose_life(self):\n if self.lives > 0:\n self.lives -= 1\n if self.lives == 0:\n self.is_alive = False\n else:\n print(\"'Cat is dead x_x'\")", "def los...
[ "0.6849069", "0.659972", "0.6564748", "0.64522326", "0.64288664", "0.6076861", "0.6049566", "0.6047057", "0.6039398", "0.60323185", "0.60096383", "0.597118", "0.59515756", "0.5950128", "0.59299576", "0.58882695", "0.5877814", "0.58611506", "0.5851922", "0.5845436", "0.5784992...
0.5240925
93
Check if any aliens have reached the bottom of the screen.
def check_aliens_bottom(ai_settings, screen, stats, sb, ship, aliens, bullets): screen_rect = screen.get_rect() for alien in aliens.sprites(): if alien.rect.bottom >= screen_rect.bottom: # Same as ship_hit ship_hit(ai_settings, screen, stats, sb, ship, aliens, bullets) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_aliens_bottom(self):\n screen_rect = self.screen.get_rect()\n for alien in self.aliens.sprites():\n if alien.rect.bottom >= screen_rect.bottom:\n # Treat the same as if ship got hit.\n self._ship_hit()\n break", "def _check_aliens_b...
[ "0.8486648", "0.8461532", "0.8461532", "0.7864324", "0.77721924", "0.7770103", "0.7643164", "0.7636709", "0.75130475", "0.7461403", "0.7070199", "0.6923705", "0.6811722", "0.6648256", "0.6578502", "0.6486917", "0.64601713", "0.6454203", "0.63879746", "0.63546145", "0.63330704...
0.7785582
4
Update the position of all aliens in the fleet. Check if the fleet is at the edge.
def update_aliens(ai_settings, screen, stats, sb, ship, aliens, bullets): check_fleet_edges(ai_settings, aliens) aliens.update() # Look for alien-ship collisions. if pygame.sprite.spritecollideany(ship, aliens): ship_hit(ai_settings, screen, stats, sb, ship, aliens, bullets) # Look for ali...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _update_aliens(self):\n self._check_fleet_edges()\n\n self.aliens.update()\n if pygame.sprite.spritecollideany(self.ship, self.aliens) != None :\n print(\"SHIP Hit !\")\n self._ship_hit()\n\n # Verify if aliens reach the bottom of the screen\n self._chec...
[ "0.7141535", "0.699815", "0.6981848", "0.6971576", "0.6932162", "0.6884748", "0.68242353", "0.68242353", "0.68242353", "0.67056996", "0.66002494", "0.65957254", "0.65827537", "0.6579233", "0.6579233", "0.6562708", "0.6474722", "0.6474722", "0.6474082", "0.64740723", "0.645826...
0.6089066
34
Get the raw content of the publication.
def get_raw(self, params=None, api=None): api = api or RadarlyApi.get_default_api() doc_platform = self['origin']['platform'] available_platform = [ PLATFORM.FORUM, PLATFORM.BLOG, ] assert doc_platform in available_platform, \ "{} is not compat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_raw_data(self):\n return self.content", "def content(self):\n if hasattr(self.raw_content, 'read'):\n if hasattr(self.raw_content, 'seek'):\n self.raw_content.seek(0)\n data = self.raw_content.read()\n else:\n data = self.raw_content\n\...
[ "0.76527095", "0.7325872", "0.7198754", "0.71454763", "0.70552146", "0.70544565", "0.70544565", "0.70544565", "0.6993798", "0.6993798", "0.6993798", "0.6993798", "0.6946849", "0.6871928", "0.6835247", "0.68257034", "0.67919475", "0.67376584", "0.6684609", "0.66841716", "0.665...
0.75860333
1
Get comment by id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def comment_get(self, id, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.comment_get_with_http_info(id, **kwargs) else: (data) = self.comment_get_with_http_info(id, **kwargs) return data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_comment_by_id(self, id):\n comment = None\n comments = self.session.query(Comment).filter(Comment.id == id).all()\n if len(comments) > 0:\n comment = comments[0]\n return comment", "def get(self, id):\n return get_comments(id)", "def get_comment(self, id):...
[ "0.74781096", "0.743965", "0.7421984", "0.73811835", "0.67587006", "0.6749057", "0.6742412", "0.67332286", "0.67332286", "0.67221755", "0.6701298", "0.6534718", "0.6532419", "0.6455669", "0.630954", "0.6203489", "0.61208916", "0.6096408", "0.5967135", "0.59636706", "0.5945135...
0.84898543
0
Get comment by id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def comment_get_with_http_info(self, id, **kwargs): all_params = ['id', 'html_format', 'authorization', 'x_impersonate_user'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def comment_get(self, id, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.comment_get_with_http_info(id, **kwargs)\n else:\n (data) = self.comment_get_with_http_info(id, **kwargs)\n return data", "def load_comme...
[ "0.84892136", "0.74790984", "0.74406326", "0.7423851", "0.7382015", "0.6759458", "0.6748625", "0.6742699", "0.673137", "0.673137", "0.6722461", "0.67014444", "0.65351987", "0.6453752", "0.63096577", "0.6203883", "0.6121279", "0.60968775", "0.5969839", "0.5962784", "0.5945462"...
0.6533932
13
Get comment by id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def comment_get_comment_preview(self, id, **kwargs): kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.comment_get_comment_preview_with_http_info(id, **kwargs) else: (data) = self.comment_get_comment_preview_with_http_info(id, **kwargs) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def comment_get(self, id, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.comment_get_with_http_info(id, **kwargs)\n else:\n (data) = self.comment_get_with_http_info(id, **kwargs)\n return data", "def load_comme...
[ "0.8490591", "0.74782324", "0.7438947", "0.74233836", "0.7382398", "0.67584395", "0.67481303", "0.67326343", "0.67326343", "0.67209864", "0.6702198", "0.6535446", "0.6533638", "0.64542145", "0.63095737", "0.6203619", "0.61210436", "0.60975343", "0.59694946", "0.59636074", "0....
0.6744042
7
Get comment by id. This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when receiving the response.
def comment_get_comment_preview_with_http_info(self, id, **kwargs): all_params = ['id', 'authorization', 'x_impersonate_user'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def comment_get(self, id, **kwargs):\n kwargs['_return_http_data_only'] = True\n if kwargs.get('callback'):\n return self.comment_get_with_http_info(id, **kwargs)\n else:\n (data) = self.comment_get_with_http_info(id, **kwargs)\n return data", "def load_comme...
[ "0.84888804", "0.7478807", "0.74378896", "0.7422605", "0.7380422", "0.6757794", "0.67466027", "0.6741316", "0.6731166", "0.6731166", "0.6720643", "0.6700596", "0.6534422", "0.6532115", "0.64519835", "0.63075256", "0.62024814", "0.61200607", "0.60970527", "0.59692854", "0.5961...
0.5286861
41
From dict parse to DTO
def _parsetouserDTO(self, data_user): return JsonSerializer.DeserializeJson(JsonSerializer.SerializeObject(data_user), UserDTO())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _from_dict_transform(cls: Type[TElementSubclass], data: Dict[str, Any]) -> Dict[str, Any]:\n if 'application' in data:\n data['created_by'] = data.pop('application')\n\n if 'added_timestamp' in data:\n data['created_ts'] = data.pop('added_timestamp')\n\n if 'created_t...
[ "0.63252795", "0.6275378", "0.6255031", "0.6224978", "0.6178479", "0.6127836", "0.60706097", "0.60644203", "0.6043876", "0.6043876", "0.60270876", "0.6004618", "0.6000637", "0.5991131", "0.5991131", "0.5991131", "0.5991131", "0.5991131", "0.5991131", "0.5991131", "0.5991131",...
0.0
-1
Save config as JSON to a file
def save(self, config_file: typing.TextIO): json.dump(self.to_dict(), config_file, indent=4)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save():\n with open(CONFIG_FILE, 'w') as f:\n json.dump(config, f, indent=4, sort_keys=True)", "def save_config_to_json(config, filename):\n with open(filename, 'w+') as f:\n json.dump(vars(config), f)", "def save_config_file(self):\n with open(self.config_file_name, 'w',encoding...
[ "0.8530463", "0.8417069", "0.8399463", "0.82841545", "0.82793313", "0.8201489", "0.8198742", "0.8198499", "0.81665546", "0.81356215", "0.81257635", "0.80912304", "0.80385816", "0.8025519", "0.79618216", "0.79524064", "0.78697425", "0.7820003", "0.7769692", "0.77369374", "0.76...
0.8358988
3
Initialize a FeedbackLinearizableOutput object.
def __init__(self, vector_relative_degree, permutation_idxs=None): self.vector_relative_degree = vector_relative_degree output_size = sum(vector_relative_degree) if permutation_idxs is None: permutation_idxs = arange(output_size) self.permutation_idxs = permutation_idxs ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _init_feedback(self):\n self._feedback_layer = DNN(\n num_units=self._params['generator']['feedback'],\n activation=tf.nn.sigmoid,\n kernel_initializer=tf.contrib.layers.xavier_initializer()\n )", "def __init__(self, callable_fn, output_layer):\n\n super(...
[ "0.60724103", "0.59584814", "0.5780571", "0.5777642", "0.57029086", "0.56848896", "0.5626051", "0.5555843", "0.55465436", "0.5537591", "0.55374116", "0.55324453", "0.55304825", "0.5517786", "0.54824317", "0.54659164", "0.544999", "0.54393435", "0.5422399", "0.5412679", "0.541...
0.0
-1
Looks through the fields of the instance and if it finds any instances of uuid.UUID it sets them to str
def _fix_uuids(self, instance): for atom in instance.atoms(): if isinstance(atom.value, uuid.UUID): setattr(instance, atom.name, str(atom.value)) return instance
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_uuid_assignment(self):\n game = Game()\n game.uuid = '01234567-abcd-abcd-abcd-0123456789ab'\n assert isinstance(game.uuid, uuid.UUID), 'Value should be a UUID.'", "def test_api_object_uuid(self, api_object):\n assert isinstance(api_object.uuid_, uuid.UUID)", "def uuid(self,...
[ "0.6307608", "0.58789074", "0.5848132", "0.5755675", "0.5745884", "0.57376164", "0.5732303", "0.5724061", "0.5701439", "0.56837827", "0.55865574", "0.5567138", "0.5567138", "0.5567138", "0.5567138", "0.5564525", "0.55537707", "0.5497907", "0.5497907", "0.5471965", "0.5456911"...
0.7729844
0
initialize weights nn.MultiheadAttention is already initalized by PyTorch (xavier)
def init_weights(self, module): if isinstance(module, (torch.nn.Linear, torch.nn.Embedding, torch.nn.LayerNorm)): module.weight.data.normal_(mean=0.0, std=self.initializer_range) if isinstance(module, (torch.nn.Linear, torch.nn.LayerNorm)) and module.bias is not None: module.bias...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, nheads, d_model):\n super(MultiheadAttention, self).__init__()\n assert d_model % nheads == 0\n self.d_head = d_model // nheads\n self.nheads = nheads\n self.Q_fc = nn.Linear(d_model, d_model, bias=False)\n self.K_fc = nn.Linear(d_model, d_model, bias=Fa...
[ "0.7547259", "0.72737306", "0.71129006", "0.70424914", "0.70159143", "0.69390786", "0.6916275", "0.68944466", "0.6892109", "0.6886628", "0.68252754", "0.68214715", "0.6815093", "0.6797835", "0.67931956", "0.67918557", "0.67825437", "0.6780123", "0.6774835", "0.6773612", "0.67...
0.0
-1
Mean of prior state vector distribution calculated at state x.
def xa(self, x_surface, geom): return np.array(self.init)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def avgX(self):\n return np.mean(self.getx())", "def x_mean(self):\n return self._get_mean_pole(\"x\")", "def prior_mean(self):\n\n priors = []\n for i in self.active_ssms(0):\n ssm = self.ssms[i]\n prior = ssm.prior_mean()\n if self.ssm_starts[i] < ...
[ "0.6938978", "0.6834755", "0.67435783", "0.64277023", "0.6400453", "0.63907963", "0.6367801", "0.63440853", "0.6319731", "0.6318616", "0.6312227", "0.6217943", "0.62151045", "0.6198621", "0.6196556", "0.6186735", "0.6181573", "0.61755705", "0.617031", "0.6165243", "0.6156137"...
0.0
-1
Partial derivative of reflectance with respect to unmodeled variables, calculated at x_surface. In the case that there are no free paramters our convention is to return the vector of zeros.
def drfl_dsurfaceb(self, x_surface, geom): return np.zeros((self.n_wl, 1))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def drfl_dsurface(self, x_surface, geom):\n\n return np.zeros((self.n_wl, 1))", "def getDerivativeSkeletonEqs(self):\n xs = np.array(self.XYProjections)[:,0]\n L = xs[-1] - xs[0]\n \n # Derivation\n xi = sy.symbols('xi')\n self.dudx_xyPlane = sy.diff(self.u_xyPlan...
[ "0.6538308", "0.62354916", "0.61377126", "0.6083326", "0.6034449", "0.6033451", "0.599284", "0.5926746", "0.586917", "0.5844732", "0.583701", "0.58143425", "0.5799508", "0.578554", "0.5752053", "0.5668414", "0.5651722", "0.56460863", "0.56460416", "0.5564942", "0.55613333", ...
0.61914414
2
Return the appropriate SharedCollectionAPI for the request library.
def shared_collection(self): return self.manager.shared_collection_api
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetApiCollection(resource_type):\n return 'compute.' + resource_type", "def get_files_api():\n return get_api_client(cloudsmith_api.FilesApi)", "def _get_collection(self):\n pk = self.kwargs.get('pk', None)\n ns_name = self.kwargs.get('namespace', None)\n name = self.kwargs.get('na...
[ "0.59098876", "0.5538", "0.54617596", "0.54547894", "0.52599686", "0.52312034", "0.5189785", "0.5142959", "0.51379937", "0.51292", "0.51271415", "0.51254165", "0.5111768", "0.51066244", "0.5049563", "0.5049563", "0.5049563", "0.5049563", "0.50150084", "0.49463993", "0.4919631...
0.75319654
0
Create an OPDS feed containing the information necessary to run a full set of integration tests against this server and the vendors it relies on.
def qa_feed(self, feed_class=AcquisitionFeed): def factory(library, facets): return JackpotWorkList(library, facets) return self._qa_feed( feed_factory=feed_class.groups, feed_title="QA test feed", controller_name="qa_feed", facet_class=Jackpo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_expected_integration_sample():\n\n path_to_metadata = Path(__file__).parent.joinpath(\"metadata-northwind-v2.xml\")\n metadata_file_contents = path_to_metadata.read_bytes()\n # do not pass metadata as python string but read as bytes, usually ends with Unicode vs xml encoding mismatch.\n\n rest...
[ "0.58161485", "0.56901354", "0.55497634", "0.5482197", "0.54817945", "0.5470916", "0.54563993", "0.5412126", "0.53969944", "0.5362821", "0.5334071", "0.5312309", "0.53081775", "0.52746964", "0.5274421", "0.5263402", "0.5254234", "0.5228475", "0.5227478", "0.521209", "0.518770...
0.0
-1
Returns the metric prescribed in self._metric, must be in the supported list given by self._metrics
def get_metric(self): assert self._metric in self._metrics, 'Unsupported metric! Check the _metrics attribute for a list of supported metrics.' if self._metric == 'Euclidean': metric = torch.eye(self.parameters.shape[0]) elif self._metric == 'Banana': n = self.dataset.sha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def metric(self):\n return self.__metric", "def metric(self):\n return self._metric", "def metric(self) -> str:\r\n return self._metric", "def get_metric(self, metric_name):\n return getattr(self, metric_name, None)", "def get_metrics(self, metric_name: str):\n if metric_...
[ "0.7947336", "0.79191357", "0.7449059", "0.7257165", "0.72121537", "0.7191987", "0.7015752", "0.6766922", "0.6766922", "0.6741991", "0.6703414", "0.6693818", "0.6693818", "0.6666886", "0.6655285", "0.6618549", "0.6618549", "0.66129524", "0.66129524", "0.65555364", "0.65444213...
0.7430809
3
Return inorder traversal of tree in generator form.
def inorder_generator(self): for val in self.inorder_helper_generator(self.root): yield val
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def inorder(self): \n if self.root:\n yield from self.root.inorder()\n else:\n raise ValueError(\"cannot perform inorder traversal\"\n \" of an empty tree\")", "def inorder(self):\n if not self.is_empty():\n for p in self._subtree_inorder(se...
[ "0.76329744", "0.7529384", "0.73960274", "0.7331821", "0.73239297", "0.73124963", "0.7287207", "0.72775286", "0.7269014", "0.7209528", "0.7070103", "0.70380676", "0.7015417", "0.69595945", "0.69325286", "0.6883395", "0.68750274", "0.6802361", "0.67908084", "0.679011", "0.6772...
0.7503373
2
Check if integervalue data sum to `k` along path from root to leaf.
def has_path_sum(self, k): return self.has_path_sum_helper(self.root, k)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_sum1(self, k: int, L:list) -> bool:\n for index, n in enumerate(L):\n for i in L[index+1:]:\n if i + n == k:\n return True\n return False", "def containNode(self, root, sum):\n if (root is None):\n return 0\n \n res...
[ "0.6664176", "0.64240915", "0.63833755", "0.6010533", "0.5976432", "0.5968691", "0.58893305", "0.5860151", "0.58067316", "0.58002555", "0.5716726", "0.57134813", "0.56886977", "0.56761736", "0.56576747", "0.56469154", "0.5643099", "0.5643099", "0.56403524", "0.56121075", "0.5...
0.777964
0
Function that measures Binary Cross Entropy between target and output logits.
def pixel_bce_with_logits(input, target): if not (target.size() == input.size()): raise ValueError("Target size ({}) must be the same as input size ({})".format(target.size(), input.size())) max_val = (-input).clamp(min=0) loss = input - input * target + max_val + ((-max_val).exp() + (-input - max_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def binary_cross_entropy(input: Tensor, target: Tensor) -> Tensor:\n assert input.shape == target.shape, 'input and target have different shape!'\n assert len(input.shape) == 2, 'binary cross entropy only used in 2 dim matrix'\n assert input.shape[1] == 1, 'binary shape[1] should be 1'\n loss = target ...
[ "0.6973737", "0.6962942", "0.6950037", "0.6873096", "0.6835147", "0.6750172", "0.6732109", "0.6690062", "0.66133285", "0.66063446", "0.6606275", "0.6595811", "0.6563865", "0.6518974", "0.65185153", "0.6512829", "0.6476457", "0.646559", "0.64396864", "0.6409353", "0.64042395",...
0.6127386
48
Sets the attached_bus_ob_id of this Attachment.
def attached_bus_ob_id(self, attached_bus_ob_id): self._attached_bus_ob_id = attached_bus_ob_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def attached_bus_ob_rec_id(self, attached_bus_ob_rec_id):\n\n self._attached_bus_ob_rec_id = attached_bus_ob_rec_id", "def bus_ob_id(self, bus_ob_id):\n\n self._bus_ob_id = bus_ob_id", "def bus_ob_id(self, bus_ob_id):\n\n self._bus_ob_id = bus_ob_id", "def bus_ob_rec_id(self, bus_ob_rec_...
[ "0.84598345", "0.7846832", "0.7846832", "0.76621306", "0.6185156", "0.5869282", "0.5746378", "0.5589756", "0.5425351", "0.53253996", "0.52689785", "0.49682587", "0.495721", "0.49307987", "0.48991013", "0.48239246", "0.47674292", "0.47092912", "0.47015944", "0.46857932", "0.46...
0.87262774
0
Sets the attached_bus_ob_rec_id of this Attachment.
def attached_bus_ob_rec_id(self, attached_bus_ob_rec_id): self._attached_bus_ob_rec_id = attached_bus_ob_rec_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bus_ob_rec_id(self, bus_ob_rec_id):\n\n self._bus_ob_rec_id = bus_ob_rec_id", "def attached_bus_ob_id(self, attached_bus_ob_id):\n\n self._attached_bus_ob_id = attached_bus_ob_id", "def bus_ob_id(self, bus_ob_id):\n\n self._bus_ob_id = bus_ob_id", "def bus_ob_id(self, bus_ob_id):\n\n...
[ "0.8246371", "0.8007387", "0.72830045", "0.72830045", "0.6127797", "0.5885976", "0.5522137", "0.54141665", "0.52241814", "0.5208274", "0.49643403", "0.49014196", "0.48971593", "0.48935324", "0.48104644", "0.47545135", "0.4738904", "0.4735289", "0.4733929", "0.47080532", "0.47...
0.865864
0
Sets the attachment_file_type of this Attachment.
def attachment_file_type(self, attachment_file_type): self._attachment_file_type = attachment_file_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def attachment_mime_type(self, attachment_mime_type):\n\n self._attachment_mime_type = attachment_mime_type", "def file_type(self, file_type):\n allowed_values = [undefined, undefined, undefined, ] # noqa: E501\n\n self._file_type = file_type", "def attachment_type(self, attachment_type):...
[ "0.8237988", "0.7488981", "0.74211776", "0.6985759", "0.65458643", "0.6279016", "0.6275513", "0.6179906", "0.6105019", "0.6105019", "0.5986973", "0.591547", "0.588742", "0.58310777", "0.5796282", "0.5717161", "0.5717161", "0.57154554", "0.57154554", "0.5662825", "0.5661539", ...
0.88244545
0
Sets the attachment_id of this Attachment.
def attachment_id(self, attachment_id): self._attachment_id = attachment_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def attachment_file_id(self, attachment_file_id):\n\n self._attachment_file_id = attachment_file_id", "def attachment_upload_id(self, attachment_upload_id):\n\n self._attachment_upload_id = attachment_upload_id", "def attachment_file_name(self, attachment_file_name):\n\n self._attachment_f...
[ "0.79368705", "0.75270283", "0.6152735", "0.6152735", "0.61121994", "0.5923511", "0.58359987", "0.5802491", "0.5784571", "0.5772363", "0.57465345", "0.5721989", "0.5703275", "0.5622169", "0.56197876", "0.55717796", "0.5550925", "0.5534679", "0.54994047", "0.546479", "0.545768...
0.86630166
0
Sets the attachment_type of this Attachment.
def attachment_type(self, attachment_type): allowed_values = ["Imported", "Linked", "URL"] # noqa: E501 if self.local_vars_configuration.client_side_validation and attachment_type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `attachment_type` ({0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def attachment_file_type(self, attachment_file_type):\n\n self._attachment_file_type = attachment_file_type", "def attachment_mime_type(self, attachment_mime_type):\n\n self._attachment_mime_type = attachment_mime_type", "def mime_type(self, mime_type):\n\n self._mime_type = mime_type", ...
[ "0.8386755", "0.8134742", "0.66363007", "0.6614257", "0.6424594", "0.6424594", "0.62245804", "0.6187092", "0.6187092", "0.6187092", "0.61740345", "0.61740345", "0.6139233", "0.6135801", "0.6089811", "0.60842997", "0.6080367", "0.60426676", "0.6020134", "0.6017292", "0.59651",...
0.7932717
2
Sets the bus_ob_id of this Attachment.
def bus_ob_id(self, bus_ob_id): self._bus_ob_id = bus_ob_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bus_ob_rec_id(self, bus_ob_rec_id):\n\n self._bus_ob_rec_id = bus_ob_rec_id", "def attached_bus_ob_id(self, attached_bus_ob_id):\n\n self._attached_bus_ob_id = attached_bus_ob_id", "def attached_bus_ob_rec_id(self, attached_bus_ob_rec_id):\n\n self._attached_bus_ob_rec_id = attached_bu...
[ "0.8321973", "0.7414735", "0.71590483", "0.65192866", "0.6243786", "0.591079", "0.56146467", "0.5464242", "0.5336817", "0.5319407", "0.52495533", "0.5233604", "0.5231742", "0.51689696", "0.51561797", "0.51532227", "0.5140943", "0.5138619", "0.5086768", "0.5024764", "0.4973985...
0.8731038
1
Sets the bus_ob_rec_id of this Attachment.
def bus_ob_rec_id(self, bus_ob_rec_id): self._bus_ob_rec_id = bus_ob_rec_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bus_ob_id(self, bus_ob_id):\n\n self._bus_ob_id = bus_ob_id", "def bus_ob_id(self, bus_ob_id):\n\n self._bus_ob_id = bus_ob_id", "def attached_bus_ob_rec_id(self, attached_bus_ob_rec_id):\n\n self._attached_bus_ob_rec_id = attached_bus_ob_rec_id", "def attached_bus_ob_id(self, attach...
[ "0.7773701", "0.7773701", "0.7535848", "0.6701336", "0.5851389", "0.56745166", "0.54148877", "0.53868735", "0.52370745", "0.51424736", "0.5128034", "0.5083891", "0.504759", "0.5040799", "0.5015383", "0.495603", "0.495603", "0.4952642", "0.49276504", "0.49127185", "0.49036333"...
0.88331753
0
Sets the created of this Attachment.
def created(self, created): self._created = created
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def created(self, created):\n if created is None:\n raise ValueError(\"Invalid value for `created`, must not be `None`\")\n\n self._created = created", "def set_created(self, dt):\n self.created = dt_to_iso(dt)", "def date_created(self, date_created):\n self._date_created...
[ "0.77317697", "0.73416847", "0.7164095", "0.7164095", "0.7116515", "0.7071216", "0.70390296", "0.70390296", "0.70390296", "0.7029233", "0.7027523", "0.69772804", "0.6944193", "0.69420123", "0.692614", "0.6901136", "0.6875674", "0.6859566", "0.6859566", "0.6859566", "0.6859566...
0.78204155
6
Sets the display_text of this Attachment.
def display_text(self, display_text): self._display_text = display_text
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_text(self, text):\n\n self.text = text", "def SetText(self, text):\r\n\r\n self._text = text", "def _set_text(self, text):\n self.clear()\n self.paragraphs[0].text = _to_unicode(text)", "def set_text(self, text):\n self.set_text_f(\"%s\", text)", "def setText(self...
[ "0.6433419", "0.64118975", "0.6338484", "0.6223902", "0.615723", "0.6145639", "0.6112844", "0.61091095", "0.61091095", "0.61091095", "0.61091095", "0.61091095", "0.61091095", "0.60755795", "0.60509384", "0.59950954", "0.5973019", "0.5961356", "0.59137994", "0.5887564", "0.583...
0.8140615
0
Sets the owner of this Attachment.
def owner(self, owner): self._owner = owner
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_owner(self, owner):\n self.__owner = owner", "def owner(self, owner: str):\n\n self._owner = owner", "def owner(self, owner):\n self._owner = owner", "def owner(self, owner):\n self._owner = owner", "def owner(self, owner):\n self._owner = owner", "def owner(sel...
[ "0.8166003", "0.78335005", "0.76980567", "0.76980567", "0.76980567", "0.76980567", "0.7689646", "0.7132249", "0.71011496", "0.70202225", "0.699021", "0.6982324", "0.6982202", "0.6779253", "0.67501587", "0.65255225", "0.6363752", "0.6238383", "0.61197555", "0.6119594", "0.6101...
0.7725752
4
Sets the scope_owner of this Attachment.
def scope_owner(self, scope_owner): self._scope_owner = scope_owner
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_owner(self, owner):\n self.__owner = owner", "def set_owner(self, owner):\n self.settings[\"owner\"] = owner", "def owner(self, owner: str):\n\n self._owner = owner", "def owner(self, owner):\n\n self._owner = owner", "def owner(self, owner):\n\n self._owner = own...
[ "0.7289558", "0.7082842", "0.6988895", "0.691128", "0.691128", "0.691128", "0.691128", "0.6898162", "0.6898162", "0.6898162", "0.6898162", "0.6817538", "0.66391736", "0.66343385", "0.6618663", "0.6505869", "0.6481937", "0.6436507", "0.6410825", "0.6312574", "0.6014842", "0....
0.8517029
0
Sets the type of this Attachment.
def type(self, type): allowed_values = ["None", "File", "FileManagerFile", "BusOb", "History", "Other"] # noqa: E501 if self.local_vars_configuration.client_side_validation and type not in allowed_values: # noqa: E501 raise ValueError( "Invalid value for `type` ({0}), must ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_type(self, type):\n self._type = type", "def set_type(self, type):\n self.type = type", "def set_type(self, type):\n self.type = type", "def attachment_file_type(self, attachment_file_type):\n\n self._attachment_file_type = attachment_file_type", "def type(self, type: st...
[ "0.78381586", "0.7693798", "0.7693798", "0.7513206", "0.72961235", "0.7292288", "0.7292288", "0.7292288", "0.72356594", "0.72167903", "0.7215415", "0.7158419", "0.71428096", "0.71428096", "0.71428096", "0.71428096", "0.71428096", "0.71428096", "0.71428096", "0.71428096", "0.7...
0.65391254
56
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, Attachment): return False return self.to_dict() == other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.80885184", "0.80885184", "0.805514", "0.7983044", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", "0.7966715", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): if not isinstance(other, Attachment): return True return self.to_dict() != other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", ...
0.0
-1
Builds the weight tensor given a label tensor.
def build_weight_for_label(labels): # Creates a weight tensor and sets the weights to 0 if the corresponding # element in labels is negative: first creates an all-one vector of the same # size as labels, then creates a mask where the elements having negative # values in labels has 0 as mask value. Multiplying t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_task_weight_from_label(task_name_to_labels):\n task_name_to_weights = {}\n for task_name, label in task_name_to_labels.items():\n task_name_to_weights[task_name] = tf.cast(tf.divide(tf.cast(tf.count_nonzero(tf.greater_equal(label, 0)), dtype=tf.int32), tf.shape(label)[0]), dtype=tf.float32)\n\n ret...
[ "0.67960256", "0.6239722", "0.60918397", "0.5940721", "0.5933264", "0.591893", "0.5880581", "0.5836289", "0.57590514", "0.5752966", "0.5752966", "0.5733932", "0.5721897", "0.570148", "0.56220806", "0.55541015", "0.5539803", "0.5533564", "0.55101514", "0.54972243", "0.5491239"...
0.789495
0
Builds the regularization loss given a dictionary of task name to regularization loss tensor and a dictionary of task name to labels. The total regularization is the weighted sum of the individual regularization loss. The weight for a task is that returned by build_task_weight_from_label. We build a weighted sum to avo...
def build_weighted_task_reg_loss(task_name_to_reg_loss, task_name_to_labels, add_summary=True): if set(task_name_to_reg_loss.keys()) != set(task_name_to_labels.keys()): raise ValueError('task_name_to_reg_loss and task_name_to_labels do not have the same set of keys.') task_name_to_weights = build_task_weight_fr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_task_loss(labels,\n logits,\n task_name,\n task_classes,\n label_smoothing=0.0):\n return build_total_loss(\n logits=logits,\n onehot_labels=tf.one_hot(labels, task_classes),\n add_regularization_losses=False,\n ...
[ "0.7032243", "0.6280472", "0.6170228", "0.59260994", "0.58425695", "0.58167243", "0.5734646", "0.5731407", "0.56789374", "0.56707007", "0.56339353", "0.55519855", "0.5524941", "0.5500443", "0.54977965", "0.5487623", "0.54866153", "0.54839635", "0.5468524", "0.5461017", "0.544...
0.77066314
0
Builds a learning rate schedule.
def build_learning_rate(initial_learning_rate, global_step, decay_steps=250000, add_summary=True, warmup_steps=2500): learning_rate = tf.train.cosine_decay(initial_learning_rate, global_step, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _create_learning_rate_scheduler(learning_rate_config, optimizer, last_step=-1):\n lr_scheduler = None\n learning_rate_type = learning_rate_config.name \n if learning_rate_type == 'constant_learning_rate': \n\n lr_scheduler = learning_schedules.Constant(\n optimizer, last_step=last_s...
[ "0.73794925", "0.7198601", "0.7134662", "0.7013873", "0.68775964", "0.68685263", "0.6839285", "0.6829824", "0.68135923", "0.67306644", "0.6665824", "0.6654051", "0.6628099", "0.6621892", "0.6552277", "0.64181983", "0.63885117", "0.6377364", "0.6357835", "0.6354713", "0.634537...
0.6210329
26
Retrieves the variables to be loaded from a checkpoint.
def _init_checkpoint_and_variables(pretrain_checkpoint_path, pretrain_checkpoint_exclude_scopes): checkpoint_reader = tf.contrib.framework.load_checkpoint( pretrain_checkpoint_path) return get_variables_to_restore_from_pretrain_checkpoint( pretrain_checkpoint_exclude_s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_load_vars(self):\n all_vars = tf.compat.v1.global_variables()\n if self.params.cp_load_var is None:\n load_v = [v for v in all_vars if v not in self.full_model_load_ignore]\n else:\n load_v = []\n error_string = \"\\n\"\n for weight in self.params.cp_load_var:\n found=Fa...
[ "0.6965658", "0.69580793", "0.69580793", "0.68874365", "0.68454355", "0.6824048", "0.67670405", "0.6738332", "0.6736177", "0.66968966", "0.66511303", "0.6580226", "0.64955854", "0.6493362", "0.6481122", "0.64755785", "0.6444655", "0.64377", "0.64377", "0.6424164", "0.63853925...
0.7574379
0
Returns a scaffold object to load variables from a pretrained checkpoint.
def build_pretrained_loader_fn(pretrain_checkpoint_path, checkpoint_exclude_scopes): scaffolding = None try: tf.logging.info( 'Attempts to load checkpoint: {}'.format(pretrain_checkpoint_path)) var_list = _init_checkpoint_and_variables( pretrain_checkpoint_path...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _init_checkpoint_and_variables(pretrain_checkpoint_path,\n pretrain_checkpoint_exclude_scopes):\n checkpoint_reader = tf.contrib.framework.load_checkpoint(\n pretrain_checkpoint_path)\n return get_variables_to_restore_from_pretrain_checkpoint(\n pretrain_checkpoint...
[ "0.64327997", "0.60703564", "0.60587764", "0.6036353", "0.6036353", "0.60340786", "0.5990984", "0.5957818", "0.5952427", "0.5924571", "0.5903926", "0.59035075", "0.59030855", "0.5849011", "0.5813437", "0.5794322", "0.5794322", "0.5787861", "0.57752866", "0.5748343", "0.573916...
0.72079206
0
add a new word to training set
def add_word(self, word): if word in self.wordlist: return "Already in word list" file_name = self.config_folder + self.wordlist_file word_list = open(file_name,'a+') word_list.write(word + "\n") word_list.close() return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add(self, word: str) -> None:\n self.d.add(word)\n self.d.add(word.lower())\n self.save_user_dict()", "def add_vocab_word(self, word):\n # If it's a special token, it'll be separatelly processed during saving file. Skip here.\n if word in special_tokens:\n return...
[ "0.7330775", "0.7302481", "0.7169806", "0.7157692", "0.7096263", "0.7079754", "0.7063637", "0.7041413", "0.70334643", "0.70168024", "0.696637", "0.6961297", "0.69605225", "0.6960481", "0.6935448", "0.6906013", "0.6906013", "0.69048315", "0.6889667", "0.6871919", "0.6861898", ...
0.6585069
47
Add spaces between characters in a string.
def add_spaces(text): return " ".join(text)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insert_spaces(word):\n new_word = \"\"\n for c in word:\n new_word += c + \" \" \n return new_word", "def space_hex_string(hex_string):\n new_string = hex_string[0] + hex_string[1]\n for i in range(2, len(hex_string) - 1, 2):\n new_string = new_string + ' ' + hex_string[i] + hex_...
[ "0.80088013", "0.7214157", "0.7088609", "0.70466906", "0.6961696", "0.69053316", "0.69043666", "0.690063", "0.6879592", "0.68080586", "0.6756593", "0.67318577", "0.67061925", "0.67049414", "0.6647866", "0.6642143", "0.6609906", "0.65979356", "0.65841717", "0.6545976", "0.6544...
0.79649824
1
Convert a string to uppercase.
def convert_to_uppercase(text): return text.upper()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uppercase(str):\n \n return str.upper()", "def uppercase(string):\n\n return str(string).upper()", "def capitalcase(string):\n\n string = str(string)\n if not string:\n return string\n return uppercase(string[0]) + string[1:]", "def to_upper(self, text):\n\t\treturn text.upper()"...
[ "0.876264", "0.861766", "0.8090524", "0.80494374", "0.8035913", "0.7546762", "0.75419056", "0.7422281", "0.7332539", "0.7327384", "0.7238466", "0.7145457", "0.7018174", "0.7001833", "0.6980477", "0.69105583", "0.689548", "0.6819244", "0.6788957", "0.6782612", "0.6730706", "...
0.81154794
2
Reorder stack (B, I, J, C, M, M) so that patches are stacked in the batch dimension,
def batch_stack(S): C, M = S.shape[3], S.shape[-1] return S.reshape(-1,C,M,M)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unbatch_stack(S, grid_shape):\n\tI, J = grid_shape\n\tC, M = S.shape[1], S.shape[2]\n\treturn S.reshape(-1, I, J, C, M, M)", "def unstack(S):\n\tB, I, J, C, M, _ = S.shape\n\tT = S.reshape(B, I*J, C*M*M).permute(0,2,1)\n\treturn F.fold(T, (I*M, J*M), M, stride=M)", "def stack(T, ks, stride, padding=False):...
[ "0.6376454", "0.6022563", "0.59964585", "0.5977489", "0.59670836", "0.5883779", "0.58704734", "0.586195", "0.57468003", "0.5733119", "0.5721146", "0.5707417", "0.56883335", "0.5666483", "0.5663266", "0.56589085", "0.5648128", "0.5644929", "0.5619196", "0.56117934", "0.5526508...
0.63796544
0
test a list of zeros
def test_running_sum_multi_zeros(self): argument = [0,0,0,0] expected = [0,0,0,0] sums.running_sum(argument) self.assertEqual(expected,argument,"the list contains only zeros")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nonzero(list_):\n for a in list_:\n if a!=0:\n return True\n return False", "def isVecZero(vec):\n trues = [isZero(e) for e in vec]\n return all(trues)", "def zeros(n):\n return [0 for i in range(n)]", "def _make_zero(p):\n\n return [pi == 0 for pi in p]", "def zeros(s...
[ "0.79787165", "0.707014", "0.70447695", "0.7033329", "0.702128", "0.6809064", "0.6771801", "0.6771226", "0.6679074", "0.6678044", "0.66699636", "0.6654158", "0.6637056", "0.66360116", "0.6519751", "0.6517971", "0.6513687", "0.6507339", "0.6484429", "0.6409337", "0.6406329", ...
0.68069506
6
Localizes in the UTC timezone a given Datetime object.
def localize_datetime_utc(date_time): return pytz.utc.localize(date_time)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def localize_utc(value):\n if isinstance(value, datetime):\n return value.replace(tzinfo=tzutc()).astimezone(tzlocal())\n else:\n return value", "def localize(dt):\n if dt.tzinfo is UTC:\n return (dt + LOCAL_UTC_OFFSET).replace(tzinfo=None)\n # No TZ info so not going to assume a...
[ "0.7542377", "0.71504605", "0.7117965", "0.7117965", "0.70806795", "0.69358426", "0.69358426", "0.6861417", "0.6612836", "0.65744245", "0.6539677", "0.6525015", "0.6491847", "0.6482187", "0.64231306", "0.6394246", "0.6323827", "0.63134986", "0.62925357", "0.6262261", "0.62530...
0.7686743
1
This method returns now's datetime object UTC localized.
def get_now_utc(no_microseconds=True): if no_microseconds: return pytz.utc.localize(datetime.datetime.utcnow()).replace( microsecond=0 ) else: return pytz.utc.localize(datetime.datetime.utcnow())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nowUTC():\n return datetime.datetime.now(pytz.utc)", "def utc_now():\n realtime = datetime.utcnow()\n realtime = pytz.utc.localize(realtime)\n return realtime", "def utc_now():\n return datetime.now(tz=timezone.utc)", "def datetime_utc_now() -> datetime:\n return datetime.now(timezone.u...
[ "0.7938195", "0.78354627", "0.78104156", "0.77831733", "0.77421755", "0.76666653", "0.76531154", "0.75951886", "0.7574178", "0.75345874", "0.75227463", "0.7473466", "0.7462387", "0.74613583", "0.742286", "0.7420622", "0.72866446", "0.72499305", "0.7162963", "0.7162082", "0.71...
0.69837517
26
This method returns now's hour in the UTC timezone.
def get_now_hour_utc(no_microseconds=True): if no_microseconds: return datetime.time.utcnow().replace(microsecond=0).time() else: return datetime.time.utcnow().time()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_hour_today() -> str:\n return datetime.now().strftime(\"%H\")", "def get_date_hour_today() -> str:\n return datetime.now().strftime(\"%Y-%m-%dT%H\")", "def actual_hour():\n actual_hour = datetime.now()\n return str(actual_hour.hour) + ':' + str(actual_hour.minute) + ':' + str(actual...
[ "0.79656625", "0.7699142", "0.7531355", "0.7442243", "0.7349582", "0.73457414", "0.7230136", "0.719586", "0.719586", "0.7192973", "0.7123007", "0.7044939", "0.69142175", "0.6913407", "0.6888746", "0.6879265", "0.6809303", "0.67744493", "0.67119074", "0.6708802", "0.66485155",...
0.6935121
12
This method returns today's date localized with the microseconds set to zero.
def get_today_utc(): return pytz.utc.localize(datetime.datetime.utcnow()).replace( hour=0, minute=0, second=0, microsecond=0 )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _today() -> str:\n return strftime(DATE_FORMAT, gmtime())", "def _today() -> datetime.date:\n return datetime.today().date()", "def today(self):\n return(datetime.date.today().isoformat())", "def static_now():\n return datetime.datetime(2000, 9, 4).replace(tzinfo=timezone.utc)", "def no...
[ "0.71156204", "0.7019942", "0.69802743", "0.697853", "0.69633734", "0.69095886", "0.6878136", "0.6864425", "0.68415785", "0.6835453", "0.677874", "0.67678297", "0.6763251", "0.6725535", "0.67019784", "0.6672066", "0.66553646", "0.66461927", "0.663581", "0.6629652", "0.662824"...
0.6953968
5
This method returns today's datetime 00am.
def get_next_midnight(): return pytz.utc.localize(datetime.datetime.today()).replace( hour=0, minute=0, second=0, microsecond=0 ) + datetime.timedelta(days=1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_today():\n return datetime.today()", "def today():\n return datetime.today()", "def today():\n today = datetime.utcnow() \n return datetime(today.year, today.month, today.day)", "def get_date_hour_today() -> str:\n return datetime.now().strftime(\"%Y-%m-%dT%H\")", "def set_dat...
[ "0.72165734", "0.7158993", "0.7042619", "0.7032514", "0.6980131", "0.6979453", "0.6931131", "0.6917349", "0.69008094", "0.6837345", "0.6835703", "0.68296105", "0.68246573", "0.68016183", "0.67969626", "0.6772354", "0.67546105", "0.67199165", "0.669044", "0.66354966", "0.65530...
0.0
-1
Localizes in the UTC timezone the given date object.
def localize_date_utc(date): return pytz.utc.localize( datetime.datetime.combine( date, datetime.time(hour=0, minute=0, second=0) ) )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tolocal(dateobj, timezone):\n \n utc_date_with_tz = pytz.utc.localize(dateobj) # \n user_tz = pytz.timezone(timezone)\n localdate = user_tz.normalize(utc_date_with_tz) \n \n return localdate", "def localize(dt):\n if dt.tzinfo is UTC:\n return (dt + LOCAL_UTC_OFFSET).replac...
[ "0.7094344", "0.70660865", "0.69835216", "0.6966509", "0.6966509", "0.6966509", "0.6939908", "0.6901606", "0.6633604", "0.6464719", "0.643207", "0.63970566", "0.63712436", "0.63249296", "0.6208421", "0.6186552", "0.6081063", "0.60789174", "0.606436", "0.604821", "0.604821", ...
0.7405236
0
Localizes in the UTC timezone a given Datetime object.
def localize_datetime_utc(date_time): return pytz.utc.localize(date_time)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def localize_utc(value):\n if isinstance(value, datetime):\n return value.replace(tzinfo=tzutc()).astimezone(tzlocal())\n else:\n return value", "def localize(dt):\n if dt.tzinfo is UTC:\n return (dt + LOCAL_UTC_OFFSET).replace(tzinfo=None)\n # No TZ info so not going to assume a...
[ "0.75445867", "0.71497077", "0.7119326", "0.7119326", "0.7082018", "0.6937001", "0.6937001", "0.68596905", "0.6614155", "0.6575395", "0.65414435", "0.6525796", "0.6492883", "0.6481895", "0.64253026", "0.6395393", "0.6323916", "0.63142496", "0.62946403", "0.6262686", "0.625295...
0.76885664
0
Localizes in the UTC timezone the given time object.
def localize_time_utc(non_utc_time): return pytz.utc.localize(non_utc_time)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def localize_datetime_utc(date_time):\n return pytz.utc.localize(date_time)", "def localize_datetime_utc(date_time):\n return pytz.utc.localize(date_time)", "def localize_datetime_utc(date_time):\n return pytz.utc.localize(date_time)", "def localize_time(self, apitime):\n return self.feedzone...
[ "0.721911", "0.721911", "0.721911", "0.71019447", "0.69049937", "0.6584208", "0.64531296", "0.6183116", "0.61217636", "0.61217636", "0.6113041", "0.6087233", "0.60042715", "0.5962918", "0.5825111", "0.5756664", "0.5754511", "0.57530814", "0.57001823", "0.56924844", "0.5653468...
0.7415812
0
Returns a timestamp with the number of microseconds ellapsed since January 1st of 1970 for the given datetime object, UTC localized.
def get_utc_timestamp(utc_datetime=None): if utc_datetime is None: utc_datetime = get_now_utc() diff = utc_datetime - TIMESTAMP_0 return int(diff.total_seconds() * 10**6)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def utc_millisecond_timestamp():\n return __date_to_millisecond_ts(utc())", "def _time_ms(self, dt):\n if dt.tzinfo is None:\n dt = dt.replace(tzinfo=pytz.utc)\n return int((dt - self._EPOCH).total_seconds() * 1000)", "def timestamp(self):\n if self._tzinfo is None:\n ...
[ "0.7130854", "0.6925918", "0.6921936", "0.6887988", "0.6841928", "0.68408537", "0.6786452", "0.6775534", "0.67231375", "0.66803664", "0.6662213", "0.6637355", "0.66036355", "0.65881974", "0.65476197", "0.6519438", "0.64587635", "0.64540744", "0.64342046", "0.64258164", "0.641...
0.6842932
4
Returns the confidence interval of the fitted parameters.
def conf_int(self, alpha=.05, cols=None, method='default'): bse = self.bse if self.use_t: dist = stats.t df_resid = getattr(self, 'df_resid_inference', self.df_resid) q = dist.ppf(1 - alpha / 2, df_resid) else: dist = stats.norm q = di...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def confidence(self) -> float:\n return self._confidence", "def confidence(self):\n return self._confidence", "def confidence(self):\n return self._confidence", "def confidence(self) -> float:\n return float(self.class_scores[self.class_num])", "def calculate_confidence_interval...
[ "0.68219185", "0.6498113", "0.6498113", "0.64727414", "0.6388635", "0.6311576", "0.62752163", "0.6229275", "0.6110395", "0.60803914", "0.60660297", "0.60526866", "0.6051802", "0.6024401", "0.60003996", "0.590071", "0.5890141", "0.58519065", "0.5841124", "0.58395547", "0.57960...
0.54542834
38
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`.
def plot_confusion_matrix(cm, classes, normalize=False, title='Confusion matrix', cmap=plt.cm.Blues): if normalize: cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis] print("Normalized confusion matrix") else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot_confusion_matrix(cm, classes=[0,1], normalize=False, title='Confusion matrix', print_matrix=False):\n\n if normalize:\n cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis]\n print(\"Normalized confusion matrix\")\n else:\n print('Confusion matrix, without normalization')\n\n...
[ "0.81940335", "0.8095006", "0.80290395", "0.8019189", "0.7993875", "0.7991161", "0.79809004", "0.7975263", "0.7961412", "0.7956938", "0.7937461", "0.7934524", "0.7934342", "0.7931134", "0.7926225", "0.79244965", "0.792367", "0.79231006", "0.7922885", "0.792215", "0.7917699", ...
0.7828839
73
Split a dataset into ``n_splits`` folds. Splits a ratings matrix using Kfold cross validation with no stratification. Train and val folds each share the same dimensions (rows x cols) but mask elements out of the train set for collaborative filtering.
def split(self, X): # Make sure it's a sparse array... X = check_sparse_array(X) # Use np.linspace to evenly partition the space between 0 and 1 into # k + 1 pieces so we can use them as "training_sizes" train_sizes = np.linspace(0, 1, self.n_splits + 1) # We use a seri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_data(num_samples, num_splits):\n\n kf = sklearn.model_selection.KFold(n_splits=num_splits, random_state=0);\n return kf.split(range(num_samples))", "def kfold_cross_validation(X, n_splits=5):\n\n #Define variables\n X_train_folds = []\n X_test_folds = []\n indexes = list(range(len(X))...
[ "0.7619095", "0.7420797", "0.73663837", "0.7055926", "0.70486385", "0.7016339", "0.69952774", "0.6991312", "0.6957546", "0.68459606", "0.684031", "0.6807076", "0.67488396", "0.6697539", "0.66935235", "0.6643292", "0.6640863", "0.6593931", "0.659107", "0.65755266", "0.65688956...
0.65651864
21
Returns the pickled value (deferred).
def get_cucumber(self, valueid): raise NotImplementedError("abstract")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __value_get(self):\n return from_pickle(self.db_value, db_obj=self)", "def get_value(self):\n if self._value is self.NO_VALUE:\n # has to happen in a background thread as it might try to\n # load modules through the import hook\n \n def inthread():\n ...
[ "0.7045021", "0.6882173", "0.67925054", "0.674425", "0.6442093", "0.6437253", "0.6283874", "0.62313217", "0.6196074", "0.6134079", "0.6017622", "0.60166425", "0.59600264", "0.5959409", "0.58904284", "0.58529925", "0.57973564", "0.5786851", "0.5784478", "0.57772845", "0.574932...
0.0
-1
Creates a copy of a value. The `to_valueid` must not yet exist.
def copy(self, source_valueid, dest_valueid): raise NotImplementedError("abstract")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy(self, source_valueid, dest_valueid):\n if source_valueid not in self._values:\n raise ValueError(\"Source of copy does not exist\")\n elif dest_valueid in self._values:\n raise ValueError(\"Destination of value already exists.\")\n \n source_holder = self....
[ "0.65475965", "0.57332367", "0.5569898", "0.55337983", "0.54988945", "0.5480476", "0.54047", "0.54047", "0.5396123", "0.53008115", "0.5155962", "0.51449966", "0.5129863", "0.5115353", "0.50613725", "0.50458586", "0.5043677", "0.5038396", "0.5020477", "0.4995453", "0.49686405"...
0.67372286
0
Creates a copy of a value. The `to_valueid` must not yet exist.
def copy(self, source_valueid, dest_valueid): if source_valueid not in self._values: raise ValueError("Source of copy does not exist") elif dest_valueid in self._values: raise ValueError("Destination of value already exists.") source_holder = self._values[source_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy(self, source_valueid, dest_valueid):\n raise NotImplementedError(\"abstract\")", "def __copy__(self):\n return type(self)(self.value)", "def copy_value(obj):\n c = obj.GetDynamicValue(obj.GetPreferDynamicValue())\n return c", "def new_value(self, value=b''):\n return data_...
[ "0.6737105", "0.57312655", "0.55691725", "0.5535208", "0.54999095", "0.5480259", "0.54061097", "0.54061097", "0.5397664", "0.52986795", "0.5156965", "0.51463944", "0.51356316", "0.51160437", "0.5059923", "0.5045692", "0.5044778", "0.50378406", "0.50243276", "0.4993524", "0.49...
0.65475196
1
Store the given pickled value in this worker. Completes immediately.
def set_cucumber(self, valueid, cucumber): assert isinstance(cucumber, str) if valueid in self._values: raise ValueError("valueid already in use") container = ValueContainer(cucumber=cucumber) holder = ValueHolder(valueid, None) holder.set(container) self._val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set(self, key, value, timeout=None):\n try:\n key = self.prepare_key(key)\n # store the pickled value\n result = self._cache.set(key, pickle.dumps(value))\n # set expiration if needed\n self.expire(key, timeout)\n # result is a boolean\n ...
[ "0.60488385", "0.60174173", "0.5980279", "0.5966646", "0.5910882", "0.5878338", "0.5806111", "0.5690026", "0.5650536", "0.5572779", "0.55651903", "0.55605733", "0.5554328", "0.5539804", "0.5525776", "0.55248153", "0.5486929", "0.54790556", "0.5439936", "0.5431518", "0.5414322...
0.0
-1
Store the given unpickled value object in this worker. Completes immediately.
def set_value(self, valueid, value, pickle_supported=True, fail_if_pickle_unsupported=False): if not pickle_supported and fail_if_pickle_unsupported: raise ValueError("Cannot combine pickle_supported and fail_if_pickle_unsupported like this.") if valueid in self._values: raise Va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_value(value):\n return pickle.dumps(value)", "def test_pickling():\n client, server = make_queue_pairs('localhost', use_pickle=True)\n\n # Attempt to push a non-JSONable object to the queue\n client.send_inputs(Test())\n _, task = server.get_task()\n assert task.args[0].x is None\n\n ...
[ "0.6074844", "0.60721904", "0.6022864", "0.59770626", "0.59557927", "0.5854776", "0.5854776", "0.583358", "0.57666713", "0.5713065", "0.5704537", "0.5619256", "0.5614375", "0.5603351", "0.5500655", "0.54749876", "0.5467213", "0.54668367", "0.54533225", "0.5442039", "0.5426074...
0.0
-1
Set the value. Callbacks all deferreds returned
def set(self, value): if self._state == self.State.transfering_no_waiters: self._value = value self._get_deferreds = None self._free_deferreds = None self._state = self.State.stored elif self._state == self.State.transfering_waiters: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def result(self, value):\n self.set_local(0, value)", "def value(self, value):\n\n\t\tself.__value = value", "def set(self, obj, success=True):\n self.value = obj\n self.success = success\n if self.callback and success:\n self.callback(obj)\n if self.errback and no...
[ "0.7155684", "0.7076806", "0.70489806", "0.7014442", "0.6981319", "0.6925418", "0.6905874", "0.6867243", "0.6867243", "0.6867243", "0.6867243", "0.6867243", "0.6867243", "0.68664753", "0.6833062", "0.6833062", "0.67854786", "0.67820954", "0.67662895", "0.67662895", "0.6746232...
0.7616094
0
Extract feature embeddings from bounding boxes synchronously.
def __call__(self, frame, tlbrs): self.extract_async(frame, tlbrs) return self.postprocess()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extract_async(self, frame, tlbrs):\n imgs = multi_crop(frame, tlbrs)\n self.embeddings, cur_imgs = [], []\n # pipeline inference and preprocessing the next batch in parallel\n for offset in range(0, len(imgs), self.batch_size):\n cur_imgs = imgs[offset:offset + self.batch...
[ "0.64946884", "0.5954356", "0.59102625", "0.58076364", "0.5804223", "0.5758845", "0.5747119", "0.5732097", "0.56798923", "0.5664065", "0.56052035", "0.55748755", "0.5554944", "0.55135906", "0.551157", "0.55105364", "0.54605407", "0.5458417", "0.5447113", "0.54308134", "0.5429...
0.0
-1
Extract feature embeddings from bounding boxes asynchronously.
def extract_async(self, frame, tlbrs): imgs = multi_crop(frame, tlbrs) self.embeddings, cur_imgs = [], [] # pipeline inference and preprocessing the next batch in parallel for offset in range(0, len(imgs), self.batch_size): cur_imgs = imgs[offset:offset + self.batch_size] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_features(boxDict, img_directory, encoder):\n with Parallel(n_jobs=-1, verbose=2, backend=\"threading\") as parallel:\n feature_vectors = parallel(delayed(image_to_feature)(\"/\".join([img_directory, imagepath]), boundingBox, encoder)\n for imagepath, boundin...
[ "0.6092422", "0.5750389", "0.5620041", "0.56016463", "0.55038816", "0.54988253", "0.54791576", "0.5472404", "0.54566354", "0.54497933", "0.5447024", "0.54202604", "0.5418706", "0.5417699", "0.53622454", "0.5316927", "0.53038126", "0.5283377", "0.5266113", "0.5264883", "0.5257...
0.67950016
0
Remove self from the DB.
def remove(self): with managed_session() as session: session.delete(self)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove(self):\n db.session.delete(self)\n db.session.commit()", "def delete_self(self):\n self.table.remove((Query().name == self.name))", "def delete_self(self):\n self.table.remove((Query().name == self.name))", "def delete(self):\n db.session.delete(self)\n db...
[ "0.8371581", "0.8030973", "0.8030973", "0.80138093", "0.7984718", "0.7984718", "0.7829815", "0.77222705", "0.7717596", "0.7717596", "0.7717596", "0.7717596", "0.7717596", "0.7717596", "0.7717596", "0.7717596", "0.7717596", "0.76749796", "0.76674277", "0.76027423", "0.7578763"...
0.7794863
7
Tests POST api/jobs/pay Makes a transaction with a non existing freelancer. Checks if the response status code of the server is 400.
def test_post_pay_freelancer_does_not_exist(self): client_id = self.create_object('api/clients', self.valid_clients[0]) freelancer_id = self.create_object('api/freelancers', self.valid_freelancers[0]) freelancer_id...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_post_pay_job_does_not_exist(self):\n freelancer_id = self.create_object('api/freelancers',\n self.valid_freelancers[0])\n\n payment = {'freelancer_id': freelancer_id,\n 'job_id': -100, # Non existing job id\n 'amo...
[ "0.8154662", "0.7434631", "0.6732384", "0.66463786", "0.6391403", "0.6358423", "0.6202548", "0.613583", "0.6123543", "0.6118605", "0.60923153", "0.607188", "0.6052286", "0.6043654", "0.6033292", "0.6031247", "0.6024646", "0.60186714", "0.6009765", "0.59646857", "0.59439236", ...
0.7828082
1
Tests POST api/jobs/pay Makes a transaction with a non existing job. Checks if the response status code of the server is 400.
def test_post_pay_job_does_not_exist(self): freelancer_id = self.create_object('api/freelancers', self.valid_freelancers[0]) payment = {'freelancer_id': freelancer_id, 'job_id': -100, # Non existing job id 'amount': 300} ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_post_pay(self):\n freelancer = self.valid_freelancers[0]\n client = self.valid_clients[0]\n amount = 150\n\n client_id = self.create_object('api/clients',\n client)\n freelancer_id = self.create_object('api/freelancers',\n ...
[ "0.72066706", "0.67850804", "0.6782833", "0.6757056", "0.6494396", "0.6435486", "0.6389209", "0.6388243", "0.6323978", "0.6318149", "0.63048714", "0.6208057", "0.6184117", "0.61341465", "0.6098706", "0.6087444", "0.6002939", "0.59972644", "0.59845716", "0.5982112", "0.5978458...
0.82762134
0
Returns a random number drawn from a Gaussian distribution
def get_value(self) -> float: return random.gauss(self._mu, self._sigma)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_gaussian_random(self):\n u1 = generateRandom()\n u2 = generateRandom()\n if u1 < 1e-6:\n u1 = 1e-6\n return sqrt(-2 * log(u1)) * cos(2 * pi * u2)", "def generate_gaussian():\n amp = 10 * numpy.random.chisquare(3)\n width = numpy.random.chisquare(3)\n mean ...
[ "0.82339406", "0.7453384", "0.7384035", "0.733207", "0.7208547", "0.7174151", "0.71638304", "0.71374613", "0.6997541", "0.696134", "0.69611955", "0.694377", "0.69099236", "0.68544275", "0.68332565", "0.681222", "0.6792174", "0.67680436", "0.67510056", "0.66435903", "0.6642841...
0.7252204
4
Get messages that have not expired.
def getCacheMessages(self): return self.db.getCacheMsgs()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def expired(self, *args, **kwargs):\n # Expired messages are those that have been delivered, AND have a\n # set `expire_on` attribute.\n #\n # OR, those messages that were never delivered, but are no longer\n # relevant (ie. they're too old).\n now = timezone.now()\n ...
[ "0.7639083", "0.64995813", "0.64908314", "0.6343577", "0.6343577", "0.62063223", "0.6179759", "0.6160395", "0.61436146", "0.61040175", "0.6086191", "0.6057175", "0.60322326", "0.59332836", "0.5931924", "0.5924073", "0.5889151", "0.5878474", "0.5876654", "0.58561665", "0.58527...
0.5877088
18
Initialises a PointLight object. To initialize a point light, we need to supply a name(optional), a reference frame, and a point.
def __init__(self, *args, **kwargs): try: self._color = kwargs['color'] except KeyError: self._color = 'white' self._color_rgb = convert.to_rgb(self._color) #Now we use same approach as in VisualizationFrame #for setting reference_frame and origin ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pointLight(*args, decayRate: Union[int, bool]=0, discRadius: Union[float, bool]=0.0,\n exclusive: bool=True, intensity: Union[float, bool]=0.0, name: Union[AnyStr,\n bool]=\"\", position: Union[List[float, float, float], bool]=None, rgb:\n Union[List[float, float, floa...
[ "0.644747", "0.6309835", "0.6232672", "0.59428483", "0.59343237", "0.58919", "0.58869374", "0.5816942", "0.5801159", "0.57861614", "0.57713", "0.5724954", "0.56671363", "0.56494087", "0.5638794", "0.5627615", "0.5622623", "0.5588382", "0.55773956", "0.55503166", "0.55456877",...
0.5719788
12
Returns races that will start within the next minute as numpy array to be passed into make_bet_recommendation
def find_race_to_bet(now=None, min_before_start=0, countrycodes=['GB','IE']): log.debug("Start downloading races to bet") now = dt.datetime.now() if not now else now m = MongoManager() data = m.get_ts_for_races_about_to_start(now, countrycodes, min_before_start) # Group quotes by race ($marketid) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_driver_schedule(self, duration_mins=60):\n elapsed_mins, schedule = 0, []\n while elapsed_mins < duration_mins:\n elapsed_mins += expon.ppf(random()) * self.mins_between_drivers\n schedule.append(elapsed_mins)\n return schedule", "def race(v1, v2, g):\n if v2...
[ "0.54591775", "0.50900793", "0.5058973", "0.4900751", "0.48799834", "0.48641035", "0.48460165", "0.48049155", "0.48027223", "0.48008907", "0.47532475", "0.47497776", "0.47358987", "0.47351825", "0.47277936", "0.47122335", "0.4706966", "0.4703273", "0.47023863", "0.46818367", ...
0.61589557
0
Draw a rounded rectangle around an image
def draw_rounded_rectangle( img: PilImage, color: PilColor, arc_size: int = 20 ) -> PilImage: # pylint: disable=invalid-name x0, y0, x1, y1 = img.getbbox() x1 -= 1 y1 -= 1 copy = img.copy() draw = ImageDraw.Draw(copy) arc_size_half = arc_size // 2 draw.arc((x0, y0, arc_size, arc_size...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def draw_rounded_rectangle(\n img: PilImage, color: PilColor, arc_size: int = 20\n) -> PilImage:\n x0, y0, x1, y1 = img.getbbox()\n x1 -= 1\n y1 -= 1\n copy = img.copy()\n draw = ImageDraw.Draw(copy)\n arc_size_half = arc_size // 2\n draw.arc((x0, y0, arc_size, arc_size), start=180, end=270...
[ "0.77442485", "0.72969645", "0.7181461", "0.6953991", "0.6858651", "0.68553674", "0.6835767", "0.68216497", "0.6786222", "0.67735654", "0.6771525", "0.6707417", "0.66786045", "0.6653492", "0.66526777", "0.66202426", "0.6594753", "0.6554674", "0.6513422", "0.6496861", "0.64685...
0.7510413
1
The name of the Resource Group in which the Databricks Virtual Network Peering should exist. Changing this forces a new resource to be created.
def resource_group_name(self) -> pulumi.Input[str]: return pulumi.get(self, "resource_group_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resource_group_name(self) -> str:\n return pulumi.get(self, \"resource_group_name\")", "def resource_group(self) -> str:\n return pulumi.get(self, \"resource_group\")", "def get_resource_group_name(self):\n return self.instance_metadata.resource_group_name", "def get_resource_group_n...
[ "0.6993109", "0.6830618", "0.67975396", "0.6742793", "0.6734553", "0.6734553", "0.6734553", "0.6734553", "0.6734553", "0.6734553", "0.6734553", "0.6734553", "0.6734553", "0.6734553", "0.6734553", "0.6734553", "0.6734553", "0.6734553", "0.6734553", "0.66870207", "0.66018474", ...
0.6771978
11
Specifies the name of the Databricks Virtual Network Peering resource. Changing this forces a new resource to be created.
def name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(__self__,\n resource_name: str,\n args: VirtualNetworkPeeringArgs,\n opts: Optional[pulumi.ResourceOptions] = None):\n ...", "def computer_network_name(self, computer_network_name: str):\n self._computer_network_name = computer_network_na...
[ "0.5802149", "0.5438943", "0.5433285", "0.53748125", "0.5154425", "0.5127753", "0.50813055", "0.5080322", "0.5073141", "0.50508803", "0.5034314", "0.502698", "0.50134784", "0.50104904", "0.4994227", "0.4988068", "0.49803835", "0.49733967", "0.49586105", "0.49521607", "0.49483...
0.0
-1
Specifies the name of the Databricks Virtual Network Peering resource. Changing this forces a new resource to be created.
def name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(__self__,\n resource_name: str,\n args: VirtualNetworkPeeringArgs,\n opts: Optional[pulumi.ResourceOptions] = None):\n ...", "def computer_network_name(self, computer_network_name: str):\n self._computer_network_name = computer_network_na...
[ "0.58034575", "0.5436846", "0.5433467", "0.5374157", "0.51534235", "0.5129495", "0.508051", "0.5080248", "0.50721663", "0.5049048", "0.5033223", "0.5026841", "0.50146425", "0.5009515", "0.49930888", "0.49866402", "0.49796438", "0.49744338", "0.4957971", "0.4952006", "0.494917...
0.0
-1
The name of the Resource Group in which the Databricks Virtual Network Peering should exist. Changing this forces a new resource to be created.
def resource_group_name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "resource_group_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resource_group_name(self) -> str:\n return pulumi.get(self, \"resource_group_name\")", "def resource_group(self) -> str:\n return pulumi.get(self, \"resource_group\")", "def get_resource_group_name(self):\n return self.instance_metadata.resource_group_name", "def resource_group_name(...
[ "0.69952387", "0.6832564", "0.67995286", "0.6773993", "0.6773993", "0.6773993", "0.6773993", "0.6773993", "0.6773993", "0.6773993", "0.6773993", "0.6773993", "0.6773993", "0.6773993", "0.6773993", "0.6773993", "0.6773993", "0.6773993", "0.6773993", "0.6773993", "0.6773993", ...
0.6736461
52
Specifies the name of the Databricks Virtual Network Peering resource. Changing this forces a new resource to be created.
def name(self) -> pulumi.Output[str]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(__self__,\n resource_name: str,\n args: VirtualNetworkPeeringArgs,\n opts: Optional[pulumi.ResourceOptions] = None):\n ...", "def computer_network_name(self, computer_network_name: str):\n self._computer_network_name = computer_network_na...
[ "0.58020395", "0.54413706", "0.5437154", "0.53786504", "0.5158132", "0.51312816", "0.50824153", "0.5080729", "0.5073165", "0.5055796", "0.5034822", "0.50295985", "0.5014983", "0.5013708", "0.49958116", "0.49915546", "0.4981248", "0.49764106", "0.49611983", "0.49547338", "0.49...
0.0
-1
The name of the Resource Group in which the Databricks Virtual Network Peering should exist. Changing this forces a new resource to be created.
def resource_group_name(self) -> pulumi.Output[str]: return pulumi.get(self, "resource_group_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resource_group_name(self) -> str:\n return pulumi.get(self, \"resource_group_name\")", "def resource_group(self) -> str:\n return pulumi.get(self, \"resource_group\")", "def get_resource_group_name(self):\n return self.instance_metadata.resource_group_name", "def resource_group_name(...
[ "0.6995415", "0.68316865", "0.6799234", "0.6774183", "0.6774183", "0.6774183", "0.6774183", "0.6774183", "0.6774183", "0.6774183", "0.6774183", "0.6774183", "0.6774183", "0.6774183", "0.6774183", "0.6774183", "0.6774183", "0.6774183", "0.6774183", "0.6774183", "0.6774183", ...
0.6604205
62
Retrieve the template by name
def get_template(name): file_name = "{name}.template".format(name=name) data = resource_string("pyscaffoldext.custom_extension.templates", file_name) return string.Template(data.decode("UTF-8"))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_template(self, name):\n return self.templates.get(name)", "def get_template(self, name):\n for template in self.templates:\n if template.name == name:\n assert isinstance(template, Template)\n return template\n return None", "def get_templat...
[ "0.8814703", "0.86731505", "0.8479254", "0.8119874", "0.8109737", "0.8096091", "0.7891226", "0.7840303", "0.7816099", "0.76968426", "0.7607141", "0.75724983", "0.75657964", "0.7411381", "0.72969157", "0.72534084", "0.71701694", "0.71165645", "0.7062584", "0.7019318", "0.69839...
0.7081931
18
List items start with zero or more spaces, a list character (which can be either , + or ), a space and some text
def test_unordered_lists(self): list_str = '- Item 1\n- Item 2\n- Item 3' doc = parser.parse(list_str) self.assertEqual(len(doc.children()), 1) ul = doc.children()[0] self.assertEqual(len(ul.children), 3) li1 = ul.children[0] self.assertTrue(isinstance(li1, par...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tokenlist(sep, item):\n return item + ZeroOrMore(sep + item) + Optional(sep)", "def lists(self, text):\n\n #Replace line-initial bullets with asterisks\n bullet_pattern = re.compile(u'^•', re.U | re.M)\n\n pattern = re.compile(r'^((?:[*;:]+|[*;:#]*#(?:_|\\d+)?)%s[ .].*)$(?![^#*;:])'\n...
[ "0.6689135", "0.6428686", "0.64151895", "0.6362025", "0.6155541", "0.614061", "0.6119346", "0.6096191", "0.6055335", "0.60234165", "0.60159695", "0.58990276", "0.58853024", "0.58660346", "0.5864787", "0.58640355", "0.5815838", "0.5814468", "0.58007354", "0.58006996", "0.57977...
0.53750026
69
The name of the Managed Network.
def managed_network_name(self) -> pulumi.Input[str]: return pulumi.get(self, "managed_network_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def network_name(self, **kwargs):\n\n return self.api_request(self._get_method_fullname(\"network_name\"), kwargs)", "def computer_network_name(self) -> str:\n return self._computer_network_name", "def network(self) -> str:\n return pulumi.get(self, \"network\")", "def managed_network_gr...
[ "0.75739413", "0.75685954", "0.7324821", "0.71985644", "0.7111581", "0.6987201", "0.6936018", "0.6866363", "0.6793813", "0.66873145", "0.6686688", "0.66843927", "0.6627352", "0.6578151", "0.6577622", "0.6481803", "0.6473848", "0.64392996", "0.6414308", "0.64111936", "0.634098...
0.8219356
0
The name of the resource group.
def resource_group_name(self) -> pulumi.Input[str]: return pulumi.get(self, "resource_group_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resource_group_name(self) -> str:\n return pulumi.get(self, \"resource_group_name\")", "def group_name(self) -> str:\n return pulumi.get(self, \"group_name\")", "def resource_group_name(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_group_name\")", "def resource_gr...
[ "0.8794932", "0.85470533", "0.84212106", "0.84212106", "0.84212106", "0.84212106", "0.84212106", "0.84212106", "0.84212106", "0.84212106", "0.84212106", "0.84212106", "0.84212106", "0.84212106", "0.837923", "0.8275838", "0.8230199", "0.82145786", "0.807179", "0.807179", "0.80...
0.81754035
37
The geolocation where the resource lives
def location(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "location")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_location(self):\n\t\treturn self.location", "def get_location(self):\n return self.location", "def get_location(self):\n return self.location", "def get_location(self):\r\n return self.__location", "def get_location(self):\r\n return None", "def getLocation(self):\n ...
[ "0.816298", "0.7999453", "0.79540074", "0.7945644", "0.78364915", "0.77626437", "0.7730134", "0.7681095", "0.7624169", "0.76093256", "0.76093256", "0.75724584", "0.75544393", "0.7547195", "0.75165695", "0.74507827", "0.74267685", "0.7419033", "0.7419033", "0.7419033", "0.7419...
0.0
-1
The name of the Managed Network Group.
def managed_network_group_name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "managed_network_group_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def group_name(self) -> str:\n return pulumi.get(self, \"group_name\")", "def group_name(self):\n\n return self._group_name", "def get_group_name(self):\n return self.groupname", "def group(self) -> str:\n return pulumi.get(self, \"group\")", "def group_name(self) -> pulumi.Outp...
[ "0.80412936", "0.7904325", "0.782097", "0.74038523", "0.7366259", "0.7322762", "0.7222062", "0.71694434", "0.7147344", "0.7147344", "0.7123293", "0.710593", "0.7087169", "0.7087169", "0.7085111", "0.703945", "0.6990254", "0.6965578", "0.69234705", "0.69234705", "0.69143367", ...
0.8458566
0
The collection of subnets covered by the Managed Network
def subnets(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ResourceIdArgs']]]]: return pulumi.get(self, "subnets")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subnets(self) -> Sequence[str]:\n return pulumi.get(self, \"subnets\")", "def subnets(self) -> pulumi.Output[Sequence[str]]:\n return pulumi.get(self, \"subnets\")", "def subnets(self) -> pulumi.Output[Sequence[str]]:\n return pulumi.get(self, \"subnets\")", "def subnetting(self):\n ...
[ "0.7998711", "0.78494895", "0.78494895", "0.7629231", "0.7551963", "0.7514852", "0.7382092", "0.73681784", "0.73459804", "0.73078024", "0.7125634", "0.70324975", "0.69418085", "0.67496496", "0.67496496", "0.67496496", "0.6630847", "0.6624753", "0.6504578", "0.6504578", "0.650...
0.72693485
10
The geolocation where the resource lives
def location(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "location")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_location(self):\n\t\treturn self.location", "def get_location(self):\n return self.location", "def get_location(self):\n return self.location", "def get_location(self):\r\n return self.__location", "def get_location(self):\r\n return None", "def getLocation(self):\n ...
[ "0.816298", "0.7999453", "0.79540074", "0.7945644", "0.78364915", "0.77626437", "0.7730134", "0.7681095", "0.7624169", "0.76093256", "0.76093256", "0.75724584", "0.75544393", "0.7547195", "0.75165695", "0.74507827", "0.74267685", "0.7419033", "0.7419033", "0.7419033", "0.7419...
0.68391085
80
Provisioning state of the ManagedNetwork resource.
def provisioning_state(self) -> pulumi.Output[str]: return pulumi.get(self, "provisioning_state")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_provisioning_state(self):\n url = \"/api/v1/machine/{}\".format(self.machine_id)\n return self.urlhandler.get(url)", "def provisioning_state(self) -> str:\n return pulumi.get(self, \"provisioning_state\")", "def provisioning_state(self) -> str:\n return pulumi.get(self, \"pr...
[ "0.6992482", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "0.6713163", "...
0.6583907
32
The collection of subnets covered by the Managed Network
def subnets(self) -> pulumi.Output[Optional[Sequence['outputs.ResourceIdResponse']]]: return pulumi.get(self, "subnets")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subnets(self) -> Sequence[str]:\n return pulumi.get(self, \"subnets\")", "def subnets(self) -> pulumi.Output[Sequence[str]]:\n return pulumi.get(self, \"subnets\")", "def subnets(self) -> pulumi.Output[Sequence[str]]:\n return pulumi.get(self, \"subnets\")", "def subnetting(self):\n ...
[ "0.7998711", "0.78494895", "0.78494895", "0.7629231", "0.7551963", "0.7382092", "0.73681784", "0.73459804", "0.73078024", "0.72693485", "0.7125634", "0.70324975", "0.69418085", "0.67496496", "0.67496496", "0.67496496", "0.6630847", "0.6624753", "0.6504578", "0.6504578", "0.65...
0.7514852
5
The type of the resource. Ex Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts.
def type(self) -> pulumi.Output[str]: return pulumi.get(self, "type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resource_type(self) -> Optional[str]:\n return pulumi.get(self, \"resource_type\")", "def resource_type(self) -> Optional[str]:\n return pulumi.get(self, \"resource_type\")", "def resource_type(cls):\n pass", "def resource_type(self) -> Optional[pulumi.Input[str]]:\n return pu...
[ "0.76004905", "0.76004905", "0.7557206", "0.75291336", "0.75291336", "0.75291336", "0.75291336", "0.75291336", "0.7211352", "0.6982805", "0.6829412", "0.67326057", "0.6526899", "0.6523776", "0.6420981", "0.6398562", "0.6335117", "0.6332488", "0.63047135", "0.63047135", "0.630...
0.0
-1