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
Return the name of the sensor.
def unique_id(self) -> str: return self._unique_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n return self._sensor.name", "def get_sensor_name(self):\n return self.data[1]", "def name(self):\n return self.device.device_data[self.device_id]['name'] + \\\n f' {self._sensor_type}'", "def name(self):\n return f\"{self._name} {SENSOR_TYPES[self.senso...
[ "0.91896784", "0.9168378", "0.890185", "0.8770976", "0.8511273", "0.8479953", "0.844435", "0.8299758", "0.8186503", "0.8105667", "0.8079737", "0.8066149", "0.8049647", "0.7700968", "0.7612295", "0.7611456", "0.7600605", "0.7600605", "0.7600605", "0.75392073", "0.75166553", ...
0.0
-1
Return the state attributes.
def device_state_attributes(self): state = { "car": self._licenseplate, "vin": self._vin, "retrievalstatus": self._get_car_value( self._feature_name, self._object_name, "retrievalstatus", "error" ), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def state_attributes(self):\n return self._attributes", "def state_attributes(self):\n return self._attributes", "def device_state_attributes(self):\r\n return self.attributes", "def device_state_attributes(self):\n return self._state_attrs", "def device_state_attributes(self):\...
[ "0.8953404", "0.8953404", "0.85239846", "0.8366765", "0.8366765", "0.8363429", "0.83362615", "0.8334551", "0.8310377", "0.8292682", "0.8289349", "0.8289349", "0.82871646", "0.82871646", "0.82871646", "0.82871646", "0.82871646", "0.82871646", "0.82871646", "0.82871646", "0.828...
0.0
-1
Return the source type, eg gps or router, of the device.
def source_type(self): return SOURCE_TYPE_GPS
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def source_type(self):\n return SOURCE_TYPE_ROUTER", "def source_type(self):\n return SOURCE_TYPE_ROUTER", "def source_type(self) -> SourceType:\n return SourceType.ROUTER", "def source_type(self) -> SourceType:\n return SourceType.ROUTER", "def source_type(self) -> SourceType:\...
[ "0.77605873", "0.77605873", "0.77508706", "0.77508706", "0.77508706", "0.7447897", "0.72797686", "0.7174375", "0.66187227", "0.6579098", "0.6433391", "0.6370096", "0.6225061", "0.6219921", "0.6186551", "0.6182296", "0.6179175", "0.61742234", "0.6170249", "0.6155701", "0.60870...
0.79875
0
Add callback after being added to hass. Show latest data after startup.
async def async_added_to_hass(self): self._car.add_update_listener(self.update_callback)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def async_added_to_hass(self) -> None:\n self._nobo.register_callback(self._after_update)", "async def async_added_to_hass(self):\n self.async_on_remove(self.coordinator.async_add_listener(self.refresh))", "async def async_added_to_hass(self):\n self._device.register_update_callback(...
[ "0.7340083", "0.69040155", "0.69033784", "0.6899683", "0.6860939", "0.68131804", "0.6775254", "0.6775254", "0.6775254", "0.6775254", "0.6775254", "0.6775254", "0.6775254", "0.6735405", "0.6722569", "0.6722569", "0.67116475", "0.67116475", "0.67116475", "0.66903096", "0.666392...
0.685852
5
Called when the user specifies an intent for this skill
def on_intent(intent_request, session): print("on_intent requestId=" + intent_request['requestId'] + ", sessionId=" + session['sessionId']) intent = intent_request['intent'] intent_name = intent_request['intent']['name'] # Dispatch to your skill's intent handlers if intent_name == "When...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_intent(intent_request, session):\n\n intent = intent_request['intent']\n intent_name = intent_request['intent']['name']\n\n # Dispatch to your skill's intent handlers\n\n if intent_name not in skillmap:\n intent_name = \"NullSkill\"\n\n if intent_name in skillmap:\n try:\n ...
[ "0.7143966", "0.6956116", "0.6949057", "0.6905333", "0.68928874", "0.6754843", "0.6722764", "0.6720773", "0.67161995", "0.6699252", "0.6691263", "0.6670276", "0.6645522", "0.6642719", "0.6638686", "0.6607724", "0.6594981", "0.6575682", "0.6570076", "0.65620786", "0.65609014",...
0.67641324
5
Get all stop punctuation used in this class of stop punctuation
def getStopPunctuation(self): return self.stop_puncs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getStopWords(self):\n\t\treturn self.stop_words", "def _parse_punctuation(self, corpus: str):\n pattern_nonstop_punct = re.compile(r'[][{},;:()/~\"_|]+')\n pattern_stop_punct = re.compile('[.!?]+')\n corpus = pattern_nonstop_punct.sub('', corpus)\n corpus = pattern_stop_punct.sub(...
[ "0.684052", "0.667542", "0.66231024", "0.66037446", "0.659891", "0.6473453", "0.64463365", "0.6432911", "0.6394395", "0.637684", "0.6276296", "0.6273752", "0.62510675", "0.62479705", "0.6238775", "0.6201514", "0.61965156", "0.61964554", "0.6164514", "0.6151479", "0.6146209", ...
0.833109
0
Get all stop words used in this class of stop words
def getStopWords(self): return self.stop_words
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_stopwords():\n all_stopwords = many_stop_words.get_stop_words('ru')\n all_stopwords.update(many_stop_words.get_stop_words('en'))\n\n more_stopwords = set(stopwords.words(['russian', 'english']))\n all_stopwords.update(more_stopwords)\n\n return all_stopwords", "def stop_words():\n retu...
[ "0.8093854", "0.78768367", "0.78760695", "0.78554696", "0.7578836", "0.7563865", "0.73921835", "0.7325552", "0.73217547", "0.715307", "0.7133158", "0.70772356", "0.70650655", "0.70640326", "0.70194495", "0.70113796", "0.7004892", "0.69739324", "0.69673854", "0.69637734", "0.6...
0.82241994
0
Get words from a document without punctuation
def getWords(self, text): textWithoutPunctuation = self.removePunctuation(text) return [word for word in textWithoutPunctuation.split() if len(word) >= 1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tokenize(document):\n raw_words=[word.lower() for word in nltk.word_tokenize(document) if word.isalpha()]\n raw_words=[word.lower() for word in raw_words]\n final_words=[]\n for word in raw_words:\n if word not in string.punctuation and word not in nltk.corpus.stopwords.words(\"english\"):\n...
[ "0.76766855", "0.75308853", "0.74917233", "0.7454243", "0.7444085", "0.7404468", "0.7294159", "0.72471005", "0.72227544", "0.71744657", "0.71365345", "0.7087682", "0.70763695", "0.70624864", "0.70473707", "0.7029324", "0.69357014", "0.69320077", "0.68929595", "0.6884471", "0....
0.722238
9
Remove all stop words from an input list of tokens
def removeStopWords(self, text=None, sort=True, lc=False): if type(text) == type(str()): text = text.split() textWithStopWords = text textWithoutStopWords = list() if sort: textWithStopWords = sorted(textWithStopWords) append = textWithoutStopWords.append lower = str.lower # Loop through al...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_stop_words(stop_list, tokens):\n return [t for t in tokens if len(t) > 2 and not t in stop_list]", "def remove_stopwords(tokens):\n stop_words = set(stopwords.words('english'))\n\n tokens = [w for w in tokens if w not in stop_words]\n\n return tokens", "def remove_stopwords(tokens):\n\n ...
[ "0.8499447", "0.8482062", "0.84252465", "0.8311352", "0.82476795", "0.8216373", "0.8173665", "0.8090284", "0.80678034", "0.8034584", "0.8006046", "0.79127717", "0.7869113", "0.7864783", "0.7794858", "0.77646935", "0.7731033", "0.769411", "0.76495224", "0.7648677", "0.7647411"...
0.0
-1
Remove all stop words from this object's self.textFile variable
def removeOwnStopWords(self, sort=True, lc=False): self.textFile = self.removeStopWords(text=self.textFile, sort=sort, lc=lc)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_stopwords_fun(self):\n tokens = str(self.doc).split()\n cleaned_tokens = [token for token in tokens\n if token.lower() not in self.stopword_list]\n self.doc = ' '.join(cleaned_tokens)", "def remove_stop_words(self):\n self.word_list = [word for word...
[ "0.80025023", "0.7839317", "0.74233615", "0.7389611", "0.7353432", "0.7337223", "0.7294318", "0.7162079", "0.7141305", "0.707594", "0.70356864", "0.7024306", "0.70218664", "0.701126", "0.7008017", "0.7004135", "0.6960223", "0.695508", "0.693407", "0.69335514", "0.69017506", ...
0.8026418
0
Set this object's self.textFile variable as tokens
def setOwnTokens(self): self.removeOwnPunctuation() self.removeOwnStopWords()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, file):\n self.__in_file = file\n self.__token = \"\" # will contain the current token\n self.__tokens = [] # will contain all tokens\n self.__lines = file.readlines()\n self.__lines = \"\".join(self.__lines) # all lines as one string, in order to make the it...
[ "0.735276", "0.6873943", "0.6785897", "0.6730606", "0.65872747", "0.6507122", "0.6462297", "0.642814", "0.6401638", "0.6377558", "0.6279851", "0.62458277", "0.6206124", "0.6183115", "0.61154896", "0.604024", "0.598688", "0.5925711", "0.5903878", "0.59033924", "0.58993965", ...
0.61445516
14
Get region id from name. Return region id.
def get_region_id(region_name): region_id = None all_region = api_get('region') if all_region.get('status') == 200: region_data = all_region.get('result') for region in region_data: if region_data[region].get('name') == region_name: region_id = region_data[region]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fregion_id_by_name(name=None):\n f_region_types = FilteredElementCollector(doc).OfClass(FilledRegionType)\n for fregion_type in f_region_types:\n fregion_name = Element.Name.GetValue(fregion_type)\n if not name or name.lower() == fregion_name.lower():\n return fregion_type.Id\n ...
[ "0.77587116", "0.74429554", "0.7296377", "0.7071384", "0.7040642", "0.6867872", "0.6622731", "0.6620584", "0.65269184", "0.6414258", "0.640979", "0.63308334", "0.6328945", "0.6309165", "0.62769306", "0.62553096", "0.62429833", "0.6171465", "0.6171465", "0.6171465", "0.6171465...
0.81001997
0
This function calculates and returns the recall
def recall(prediction, ground_truth): return precision_recall_f1(prediction, ground_truth)[1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def recall(self):\n tpos, fneg = len(self.__true_positives), len(self.__false_negatives)\n return float(tpos) / (tpos + fneg)", "def recall(y_true, y_pred):\n tp = true_positive(y_true, y_pred)\n fn = false_negative(y_true, y_pred)\n recall = tp / (tp + fn)\n return recall", "def reca...
[ "0.7383049", "0.730809", "0.729481", "0.72714585", "0.7260718", "0.7165436", "0.71549386", "0.71150184", "0.7025544", "0.7015815", "0.700435", "0.7002185", "0.69589734", "0.69589734", "0.69589734", "0.69589734", "0.69589734", "0.69589734", "0.6954294", "0.69351184", "0.693112...
0.6986173
12
Dynamically pads the batch_data with pad_id
def _dynamic_padding(self, batch_data, pad_id = 0 ): #print 'dynamic _padding...' #print 'pad_id' + str(pad_id) max_p_len = 1000 max_q_len =1000 pad_p_len = min(max_p_len, max(batch_data['passage_length']))+1 #print 'pad_p_len' + str(pad_p_len) pad_q_len = min(max...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _dynamic_padding(self, batch_data, pad_id):\n pad_p_len = min(self.max_p_len, max(batch_data['passage_length']))\n pad_q_len = min(self.max_q_len, max(batch_data['question_length']))\n batch_data['passage_token_ids'] = [(ids + [pad_id] * (pad_p_len - len(ids)))[: pad_p_len]\n ...
[ "0.8182761", "0.7264285", "0.69672924", "0.6958365", "0.69562846", "0.6821268", "0.6815583", "0.68085265", "0.6800871", "0.6762125", "0.67257625", "0.6699586", "0.66755253", "0.66576433", "0.66129065", "0.66090053", "0.6607526", "0.65554667", "0.6524988", "0.6473104", "0.6432...
0.827876
0
Return a valid SlackPost instance.
def get_slackpost(): return SlackPost( channel='#tester', subject='[Messages] Integration Test', body='Conducting Integration Testing', profile='integration_tester', attachments='https://imgs.xkcd.com/comics/python.png', save=False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def slackobj(self):\r\n try:\r\n if self.glob_data['SlackNotifications'].lower() == 'yes':\r\n if \"Slack\" in self.glob_data:\r\n username = self.data['Slack']['username']\r\n channelname = self.glob_data['Slack']['channelname']\r\n ...
[ "0.6011416", "0.5855455", "0.56733084", "0.5478176", "0.54717803", "0.54194516", "0.5380445", "0.53385615", "0.53385615", "0.53059053", "0.5303496", "0.5302607", "0.52967435", "0.52209324", "0.51671124", "0.51521766", "0.5147713", "0.51128584", "0.5095342", "0.50887173", "0.5...
0.6284581
0
Return the vertices of the cube at position x, y, z with size 2n.
def cube_vertices(x, y, z, n): return [ x-n,y+n,z-n, x-n,y+n,z+n, x+n,y+n,z+n, x+n,y+n,z-n, # top x-n,y-n,z-n, x+n,y-n,z-n, x+n,y-n,z+n, x-n,y-n,z+n, # bottom x-n,y-n,z-n, x-n,y-n,z+n, x-n,y+n,z+n, x-n,y+n,z-n, # left x+n,y-n,z+n, x+n,y-n,z-n, x+n,y+n,z-n, x+n,y+n,z+n, # rig...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cube_vertices(x, y, z, nx, ny=None, nz=None):\n if ny == None: ny = nx\n if nz == None: nz = nx\n return [\n x - nx, y + ny, z - nz, x - nx, y + ny, z + nz, x + nx, y + ny, z + nz, x + nx, y + ny, z - nz, # top\n x - nx, y - ny, z - nz, x + nx, y - ny, z - nz, x + nx, y - ny, z + nz, x ...
[ "0.84028685", "0.83493423", "0.7549717", "0.7102708", "0.66024923", "0.6499729", "0.6417182", "0.640172", "0.6398933", "0.6339799", "0.62435925", "0.6203052", "0.61983263", "0.61178654", "0.609611", "0.6069485", "0.60654193", "0.60633194", "0.6010405", "0.59747946", "0.592083...
0.8873902
0
Return a list of the texture squares for the top, bottom and side.
def tex_coords(top, bottom, side): top = tex_coord(*top) bottom = tex_coord(*bottom) side = tex_coord(*side) result = [] result.extend(top) result.extend(bottom) result.extend(side * 4) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tex_coords(top, bottom, side):\n top = tex_coord(*top)\n bottom = tex_coord(*bottom)\n side = tex_coord(*side)\n result = []\n result.extend(top)\n result.extend(bottom)\n result.extend(side * 4)\n return result", "def tex_coords(top, bottom, n, e, s, w):\n top = tex_coord(*top)\n ...
[ "0.70120525", "0.6371634", "0.6313774", "0.6256759", "0.60697514", "0.5951464", "0.59414285", "0.5878671", "0.5872278", "0.5813781", "0.5796909", "0.5705748", "0.56036305", "0.5517446", "0.55131584", "0.5504185", "0.5500049", "0.5448204", "0.54349416", "0.5433738", "0.5430835...
0.70498157
0
Returns False is given `position` is surrounded on all 6 sides by blocks, True otherwise.
def exposed(self, position): x, y, z = position for dx, dy, dz in FACES: if (x + dx, y + dy, z + dz) not in self.world: return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_position_blocked(self, position: typing.Tuple[float, float, float]) -> bool:\n raise NotImplementedError", "def __is_valid_position(self, position):\n return (position[0] >= 0\n and position[0] < self.config.arena_size[0]\n and position[1] >= 0\n and position...
[ "0.69926906", "0.6889749", "0.68881494", "0.67686224", "0.66627455", "0.66438025", "0.6613632", "0.66117513", "0.6605935", "0.65963286", "0.65781456", "0.65298533", "0.65219575", "0.6520474", "0.6519436", "0.64179677", "0.63673455", "0.6355879", "0.63327813", "0.6274499", "0....
0.5940875
66
Set the seed to be used in any random generator. This is used to produce deterministic results.
def set_seed(seed): if seed < 0 or seed > UINT32_MAX: raise ValueError("Seed given is not within the required range.") _config.set_seed(seed) random.seed(seed) # numpy.random isn't thread safe numpy.random.seed(seed)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_seed(cls, seed: Any) -> None:\n cls.rand = Random(seed)", "def set_seed(self, seed):\n self.seed = seed", "def set_seed(self, seed: int):\n self.__sim.seed(seed)", "def set_seed(self, seed):\n if seed is None:\n warnings.warn(\n \"Initializing pla...
[ "0.8740031", "0.8623177", "0.84769076", "0.8417357", "0.8407203", "0.83106583", "0.8295091", "0.8291422", "0.8220655", "0.8220655", "0.82017386", "0.8173769", "0.80774575", "0.8050675", "0.80346555", "0.8030958", "0.80176276", "0.7978097", "0.79660374", "0.79660374", "0.79660...
0.8110245
12
Set the number of rows to be prefetched.
def set_prefetch_size(size): if size <= 0 or size > INT32_MAX: raise ValueError("Prefetch size given is not within the required range.") _config.set_op_connector_size(size)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_number_of_rows(self, number_of_rows):\n self.set_value_into_input_field(self.number_of_rows_inputbox_locator, number_of_rows, True)\n global bulk_add_number_of_rows\n bulk_add_number_of_rows = int(number_of_rows)", "def SetNumberOfRows(self, nrows):\n if isinstance(nrows, floa...
[ "0.724699", "0.6561477", "0.6327407", "0.6303449", "0.6276396", "0.62215525", "0.5988416", "0.5829691", "0.58258796", "0.5786469", "0.5779063", "0.577826", "0.57663196", "0.5724117", "0.57075924", "0.5683502", "0.56829995", "0.5659796", "0.56374216", "0.5602634", "0.5568251",...
0.5970832
7
String representation of the configurations.
def __str__(): return str(_config)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __str__(self):\n config_str = 'Configurations\\n'\n config_str += pprint.pformat(self.__dict__)\n return config_str", "def __repr__(self) -> str:\n return json.dumps(self._config)", "def str(self):\n\n list_of_entries = ['{0} name={1}'.format(self.layer_type, self.name)]\...
[ "0.8874748", "0.7922019", "0.78686243", "0.78509504", "0.7707175", "0.7680234", "0.7630873", "0.74890924", "0.7291009", "0.72622997", "0.72423315", "0.7201013", "0.7201013", "0.71941936", "0.7009992", "0.69965124", "0.697192", "0.69648975", "0.690328", "0.68702286", "0.684470...
0.7552578
7
Retorna la fecha actual con formato dd/mm/aaaa
def get_fecha_actual(): hoy = datetime.datetime.now() fecha_actual = hoy.strftime("%d-%m-%Y") return fecha_actual
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def actual_date():\n actual_date = datetime.now()\n return str(actual_date.day) + '-' + str(actual_date.month) + '-' + str(actual_date.year)", "def get_date():\n now = datetime.now()\n date = now.strftime(\"%Y%m%d\")\n return date", "def get_date():\n dt = datetime.now()\n return dt.strfti...
[ "0.6891505", "0.68336314", "0.68064207", "0.6623234", "0.65912867", "0.6443757", "0.6409538", "0.6406994", "0.6343931", "0.63324094", "0.62401867", "0.6239749", "0.62216514", "0.6208393", "0.6200284", "0.61968094", "0.61918324", "0.61877596", "0.61845905", "0.61774606", "0.61...
0.80906063
0
Parse name from spreadsheet row.
def _parse_name(self, row): return row[Row.NAME]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _parse_name(self, item):\n return item.css('td[headers=Name]::text').extract_first().strip()", "def _parse_name(self, cell, cell_content):\n mp_page = cell_content.find(\"a\").attrs[\"href\"]\n\n full_name = cell_content.text.strip()\n name, *title = full_name.split(\",\")\n ...
[ "0.672798", "0.6511314", "0.62355113", "0.61684275", "0.6085273", "0.5913917", "0.57449985", "0.5655619", "0.5546215", "0.55339247", "0.5533067", "0.5479771", "0.54746014", "0.54731613", "0.5422033", "0.5413562", "0.53394103", "0.5333415", "0.53251433", "0.5310582", "0.530711...
0.85307986
0
Estimate the end time to be 3 hours after the start time.
def _parse_end(self, row): start_datetime = self._parse_start_datetime(row) return { 'date': start_datetime.date(), 'time': (start_datetime + timedelta(hours=3)).time(), 'note': 'estimated 3 hours after start time' }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def end_time(self) -> float:\r\n ...", "def end(self):\r\n hours = self.length // 60\r\n minutes = self.length % 60\r\n return time(self.start.hour + hours, self.start.minute + minutes)", "def stop_time(self):\n return self.start_time + timedelta(hours=self.duration)", "def...
[ "0.72502553", "0.70148486", "0.6911672", "0.6837226", "0.655786", "0.64924175", "0.6459668", "0.6370092", "0.6343086", "0.6278563", "0.62670326", "0.62351763", "0.6207576", "0.61992085", "0.61595386", "0.61366415", "0.6117847", "0.6117847", "0.6117847", "0.6117847", "0.611784...
0.56782466
55
The MAC address of the BMC for this machine.
def bmc_mac_address(self) -> pulumi.Input[str]: return pulumi.get(self, "bmc_mac_address")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mac_address(self) -> str:\n return self._device.mac", "def mac_address(self):\n return self._mac_address", "def __get_mac_address(self):\n str_hex_mac = uuid.UUID(int=uuid.getnode()).hex[-12:]\n return str_hex_mac", "def MacAddress(self):\n if self.force_auto_sync:\n ...
[ "0.8457592", "0.82929313", "0.79365367", "0.7892616", "0.7882977", "0.7793298", "0.7793298", "0.76207066", "0.7616299", "0.7578909", "0.7575946", "0.7519012", "0.7502452", "0.749309", "0.74787015", "0.74102753", "0.74098873", "0.7355", "0.7342288", "0.73314035", "0.72764796",...
0.85031694
0
The MAC address associated with the PXE NIC card.
def boot_mac_address(self) -> pulumi.Input[str]: return pulumi.get(self, "boot_mac_address")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mac_address(self) -> str:\n return self._device.mac", "def mac_address(self):\n return self._mac_address", "def get_mac_address(self):\n\t\treturn call_sdk_function('PrlSrvCfgNet_GetMacAddress', self.handle)", "def get_mac(self) :\n\t\ttry :\n\t\t\treturn self.p_fields.f128\n\t\texcept :\n\...
[ "0.772973", "0.75816125", "0.7543943", "0.75403297", "0.747024", "0.74660796", "0.745361", "0.7416282", "0.7295916", "0.7283541", "0.72512907", "0.72501826", "0.7163856", "0.7148189", "0.7148189", "0.7110401", "0.707853", "0.69873273", "0.69330335", "0.68943465", "0.68943465"...
0.6257435
47
The serial number of the machine. Hardware suppliers may use an alternate value. For example, service tag.
def serial_number(self) -> pulumi.Input[str]: return pulumi.get(self, "serial_number")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def device_serial_number(self) -> str:\n return pulumi.get(self, \"device_serial_number\")", "def device_serial_number(self) -> str:\n return pulumi.get(self, \"device_serial_number\")", "def serial_number(self) -> str:\n return pulumi.get(self, \"serial_number\")", "def get_serial(self)...
[ "0.8421275", "0.8421275", "0.83592486", "0.8165125", "0.81580627", "0.81527644", "0.81327915", "0.81152004", "0.80942684", "0.7967733", "0.795271", "0.79252744", "0.7786174", "0.77640927", "0.7744729", "0.76735437", "0.7621449", "0.76163775", "0.7610738", "0.7518703", "0.7503...
0.789162
12
The subnet blocks in CIDR format for Kubernetes service external IPs to be advertised over BGP.
def service_external_prefixes(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: return pulumi.get(self, "service_external_prefixes")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subnetting(self):\n ip = netaddr.IPNetwork(addr=self.subnet)\n subnets = list(ip.subnet(prefixlen=24))\n list_subnets = [str(subnet) for subnet in subnets]\n return list_subnets", "def cidr_blocks(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['CidrBlockArgs']]]]:\n r...
[ "0.6813238", "0.6800243", "0.6670716", "0.6484499", "0.6473761", "0.6473761", "0.6438559", "0.63951766", "0.63820213", "0.63820213", "0.6289542", "0.61285216", "0.6084707", "0.6063184", "0.60339576", "0.60083693", "0.5991745", "0.59664595", "0.5941497", "0.59284204", "0.59284...
0.0
-1
The subnet in CIDR format for which properties should be advertised.
def subnet_prefix(self) -> pulumi.Input[str]: return pulumi.get(self, "subnet_prefix")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subnet(self) -> pulumi.Output[Optional['outputs.ResourceIdResponse']]:\n return pulumi.get(self, \"subnet\")", "def subnet(self) -> Optional[pulumi.Input['ResourceIdArgs']]:\n return pulumi.get(self, \"subnet\")", "def subnet_id(self) -> str:\n return pulumi.get(self, \"subnet_id\")", ...
[ "0.7193618", "0.71922874", "0.7139986", "0.710055", "0.7078851", "0.7040386", "0.69792634", "0.69792634", "0.6978669", "0.69737524", "0.6874952", "0.6874952", "0.6829208", "0.6826255", "0.6823278", "0.67958224", "0.67958224", "0.6731015", "0.669703", "0.6647207", "0.663888", ...
0.6293041
34
The name of the VM SKU supplied during creation.
def vm_sku_name(self) -> pulumi.Input[str]: return pulumi.get(self, "vm_sku_name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vm_sku_name(self) -> str:\n return pulumi.get(self, \"vm_sku_name\")", "def sku_name(self) -> str:\n return pulumi.get(self, \"sku_name\")", "def sku_name(self) -> str:\n return pulumi.get(self, \"sku_name\")", "def sku_name(self) -> str:\n return pulumi.get(self, \"sku_name\"...
[ "0.84254736", "0.8000554", "0.8000554", "0.8000554", "0.78773034", "0.78773034", "0.77781934", "0.75745046", "0.7542663", "0.7183704", "0.70743084", "0.70743084", "0.6912299", "0.68096715", "0.67432064", "0.6685927", "0.6682888", "0.6655091", "0.6599893", "0.6578086", "0.6543...
0.83534116
1
The selection of how this agent pool is utilized, either as a system pool or a user pool. System pools run the features and critical services for the Kubernetes Cluster, while user pools are dedicated to user workloads. Every Kubernetes cluster must contain at least one system node pool with at least one node.
def mode(self) -> pulumi.Input[Union[str, 'AgentPoolMode']]: return pulumi.get(self, "mode")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def agent_pool(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"agent_pool\")", "def pool(self):\n return self._properties.get('pool')", "def get_default_pool():\n return 'tank'", "def _determine_resource_pool(session, vm_):\n resource_pool = \"\"\n if \"resource_pool\...
[ "0.6892237", "0.65215933", "0.6334302", "0.61887264", "0.61769044", "0.6153188", "0.5990394", "0.5899859", "0.5808034", "0.5804726", "0.5785459", "0.57705665", "0.5708198", "0.56814474", "0.56528896", "0.5573221", "0.557223", "0.55532515", "0.5504209", "0.5443783", "0.5434208...
0.57841986
11
The name that will be used for the agent pool resource representing this agent pool.
def name(self) -> pulumi.Input[str]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n return self.__name", "def name(self):\n return self.__name", "def name(self):\n return self.__name", "def name(self):\n return self.__name", "def name(self):\n return self.__name", "def name(self):\n return self.__name", "def name(self):\n ...
[ "0.6891934", "0.6891934", "0.6891934", "0.6891934", "0.6891934", "0.6891934", "0.6891934", "0.6891934", "0.6891934", "0.6891934", "0.6865796", "0.68622625", "0.68622625", "0.68622625", "0.68622625", "0.68622625", "0.68622625", "0.68622625", "0.68622625", "0.68622625", "0.6862...
0.0
-1
The labels applied to the nodes in this agent pool.
def labels(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['KubernetesLabelArgs']]]]: return pulumi.get(self, "labels")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_nodepool_labels(self) -> Union[Dict[str, str], None]:\n return self.agentpool_context.get_nodepool_labels()", "def labels(self):\n return self._labels", "def labels(self):\n return self._labels", "def labels(self):\n return self._labels", "def labels(self):\n retu...
[ "0.8260448", "0.7904689", "0.7904689", "0.7904689", "0.7904689", "0.7904689", "0.7904689", "0.77586967", "0.7735358", "0.7688879", "0.76294655", "0.76175183", "0.76175183", "0.76175183", "0.76175183", "0.7585114", "0.7505268", "0.74692374", "0.7455826", "0.7437136", "0.742468...
0.0
-1
The name used to identify this IP address pool for association with a BGP advertisement.
def name(self) -> pulumi.Input[str]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self) -> str:\n return f\"{self._inst} NAT {self._data['name']}\"", "def name(self) -> 'Literal[\"Dynamic Reverse Address Resolution Protocol\", \"Inverse Address Resolution Protocol\", \"Reverse Address Resolution Protocol\", \"Address Resolution Protocol\"]': # pylint: disable=line-too-long\n ...
[ "0.69689435", "0.68676615", "0.68554515", "0.67863065", "0.6728472", "0.659753", "0.64363146", "0.64331865", "0.642312", "0.63811857", "0.6357789", "0.632989", "0.63281476", "0.6319333", "0.6319333", "0.6311855", "0.62854135", "0.62768", "0.627653", "0.6248352", "0.6234019", ...
0.0
-1
The indicator to determine if automatic allocation from the pool should occur.
def auto_assign(self) -> Optional[pulumi.Input[Union[str, 'BfdEnabled']]]: return pulumi.get(self, "auto_assign")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def allocate(self) -> bool:\n if hasattr(self.at_options, 'allocate'):\n return self.at_options.allocate == 1\n return False", "def is_single_allocation(self):\n return False", "def allocated(self):\n if self.filename()==\"$OrphanFiles\": return False\n return ison...
[ "0.7250048", "0.7152055", "0.66272557", "0.62390596", "0.618714", "0.61171997", "0.605229", "0.5924391", "0.59182316", "0.58985585", "0.5846799", "0.58236396", "0.5783592", "0.57726204", "0.57266325", "0.5687973", "0.5644704", "0.56237984", "0.5601355", "0.55906373", "0.55576...
0.0
-1
The value of the label or taint.
def value(self) -> pulumi.Input[str]: return pulumi.get(self, "value")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _value(self):\n if self.data is None:\n return self._original_value\n elif self.get_label:\n return self.get_label(self.data)\n else:\n return unicode(self.data)", "def value(self):\n return self.node_value", "def value(self):\n return sel...
[ "0.725969", "0.6888748", "0.68829596", "0.67987293", "0.6749187", "0.6749187", "0.6749187", "0.6749187", "0.6749187", "0.6749187", "0.6749187", "0.6749187", "0.6749187", "0.6749187", "0.6749187", "0.6749187", "0.6749187", "0.6749187", "0.669954", "0.6686476", "0.6636792", "...
0.6509296
39
The location of the managed resource group. If not specified, the location of the parent resource is chosen.
def location(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "location")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resource_group(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"resource_group\")", "def resource_group(self) -> str:\n return pulumi.get(self, \"resource_group\")", "def resource_group(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"resource_group\")", "def...
[ "0.6459492", "0.6447463", "0.6239318", "0.6239318", "0.6005518", "0.5939726", "0.59260505", "0.59244", "0.5907997", "0.58390915", "0.58381367", "0.58381367", "0.58381367", "0.58381367", "0.58381367", "0.58381367", "0.58381367", "0.58381367", "0.5832762", "0.58003604", "0.5787...
0.0
-1
The name for the managed resource group. If not specified, the unique name is automatically generated.
def name(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "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 get_resource_group_name(self):\n return self.instance_metadata.resource_group_name", "def resource_group_name(self) ->...
[ "0.801652", "0.7866061", "0.76779586", "0.76652044", "0.76652044", "0.76652044", "0.76652044", "0.76652044", "0.76652044", "0.76652044", "0.76652044", "0.76652044", "0.76652044", "0.76652044", "0.76652044", "0.76652044", "0.76652044", "0.76652044", "0.7650235", "0.7650235", "...
0.0
-1
The indicator of whether this is the default gateway. Only one of the attached networks (including the CloudServicesNetwork attachment) for a single machine may be specified as True.
def default_gateway(self) -> Optional[pulumi.Input[Union[str, 'DefaultGateway']]]: return pulumi.get(self, "default_gateway")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_network_default_gateway(self):\n return self.mycam.devicemgmt.GetNetworkDefaultGateway()", "def host_network(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"host_network\")", "def host_network(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"hos...
[ "0.744197", "0.6640637", "0.6640637", "0.6558221", "0.6552503", "0.65128446", "0.6439725", "0.6419751", "0.63902265", "0.63709843", "0.6362668", "0.6353113", "0.6353113", "0.6353113", "0.6353113", "0.6353113", "0.63522243", "0.63522243", "0.6338229", "0.63246226", "0.62987757...
0.70065653
1
The CIDR notation IP ranges from which to assign pod IPs. One IPv4 CIDR is expected for singlestack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dualstack networking.
def pod_cidrs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: return pulumi.get(self, "pod_cidrs")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_IPv4_to_CIDR(self):\n match_list = '1.2.3.0/29'\n self.assertEqual(helpers.IPRange_to_CIDR('1.2.3.1', '1.2.3.6'), match_list)", "def test_IPv4s_to_valid_CIDR(self):\n self.assertEqual(\n helpers.IPRange_to_valid_CIDR('192.168.0.1', '192.168.0.1'),\n '192.168.0....
[ "0.69213134", "0.6509432", "0.6485055", "0.6416659", "0.6383427", "0.6275349", "0.6215008", "0.61691546", "0.61691546", "0.6165547", "0.6165547", "0.6151937", "0.6151937", "0.6140444", "0.6137141", "0.6085426", "0.6034255", "0.6034255", "0.6029523", "0.6029523", "0.60244954",...
0.56541383
37
The CIDR notation IP ranges from which to assign service IPs. One IPv4 CIDR is expected for singlestack networking. Two CIDRs, one for each IP family (IPv4/IPv6), is expected for dualstack networking.
def service_cidrs(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: return pulumi.get(self, "service_cidrs")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_IPv4_to_CIDR(self):\n match_list = '1.2.3.0/29'\n self.assertEqual(helpers.IPRange_to_CIDR('1.2.3.1', '1.2.3.6'), match_list)", "def test_IPv4s_to_valid_CIDR(self):\n self.assertEqual(\n helpers.IPRange_to_valid_CIDR('192.168.0.1', '192.168.0.1'),\n '192.168.0....
[ "0.69322884", "0.6638506", "0.6506547", "0.63804156", "0.63671964", "0.6335973", "0.63259876", "0.6235901", "0.6220739", "0.61475664", "0.61475664", "0.6137279", "0.61196166", "0.61196166", "0.61068225", "0.61068225", "0.61068225", "0.60944986", "0.60944986", "0.6073921", "0....
0.53434247
84
The zone name used for this rack when created. Availability zones are used for workload placement.
def availability_zone(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "availability_zone")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zone_name(self):\n return self._zone_name", "def zone(self) -> str:\n return pulumi.get(self, \"zone\")", "def zone(self) -> str:\n return pulumi.get(self, \"zone\")", "def zone(self) -> str:\n return self._zone", "def availability_zone(self) -> str:\n return pulumi.g...
[ "0.86514175", "0.7965059", "0.7965059", "0.7855363", "0.7630797", "0.75792885", "0.7411996", "0.74062717", "0.74062717", "0.74062717", "0.74062717", "0.74062717", "0.72066957", "0.7152893", "0.7061124", "0.70403683", "0.699829", "0.699829", "0.699829", "0.699829", "0.69966376...
0.67006844
25
The name used to identify this BGP peer for association with a BGP advertisement.
def name(self) -> pulumi.Input[str]: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self) -> str:\n return f\"{self._inst} NAT {self._data['name']}\"", "def peername(self):\n return self.socket_.getpeername()", "def name(self) -> str:\n return self.proto.name", "def name(self):\n return '{} {}'.format(self._device,\n self._en...
[ "0.70923233", "0.6996719", "0.69076204", "0.6845482", "0.68229395", "0.681331", "0.68045986", "0.67628646", "0.6761718", "0.6685379", "0.66760343", "0.66760343", "0.6657124", "0.6657124", "0.6657124", "0.6657124", "0.66568035", "0.66568035", "0.66568035", "0.66568035", "0.665...
0.0
-1
The requested BGP hold time value. This field uses ISO 8601 duration format, for example P1H.
def hold_time(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "hold_time")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tunnel1_bgp_holdtime(self) -> Optional[pulumi.Input[int]]:\n return pulumi.get(self, \"tunnel1_bgp_holdtime\")", "def tunnel1_bgp_holdtime(self) -> pulumi.Output[int]:\n return pulumi.get(self, \"tunnel1_bgp_holdtime\")", "def tunnel2_bgp_holdtime(self) -> Optional[pulumi.Input[int]]:\n ...
[ "0.7190525", "0.7165648", "0.6916809", "0.68365437", "0.60471535", "0.60471535", "0.60471535", "0.60471535", "0.60471535", "0.60471535", "0.5965024", "0.5961759", "0.59294677", "0.591647", "0.5907321", "0.5887086", "0.58652437", "0.5847005", "0.5846035", "0.58188975", "0.5812...
0.71254236
2
The autonomous system number used for the local end of the BGP session.
def my_asn(self) -> Optional[pulumi.Input[float]]: return pulumi.get(self, "my_asn")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_system_id(self):\n return system.SystemManagement(self.client).get_system_id()", "def global_location_number(self) -> str:\n return self._global_location_number", "def get_system_id(self):\n return self.machine_config_file_value(\"DEFAULT.SID\").strip('\"')", "def device_num(self...
[ "0.6939995", "0.6800212", "0.6699619", "0.65231264", "0.65085757", "0.6452595", "0.6396762", "0.6343809", "0.6335389", "0.62596464", "0.6259106", "0.6225217", "0.6223208", "0.618804", "0.618804", "0.61858654", "0.61456835", "0.61274064", "0.61189073", "0.6106089", "0.6094671"...
0.0
-1
The serial number of the appliance.
def serial_number(self) -> pulumi.Input[str]: return pulumi.get(self, "serial_number")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def serial_number(self) -> str:\n return pulumi.get(self, \"serial_number\")", "def serial_number(self):\n return self._serialno", "def serial_number(self) -> str:\n return self._serial_number", "def device_serial_number(self) -> str:\n return pulumi.get(self, \"device_serial_numb...
[ "0.8364284", "0.82803714", "0.8252093", "0.8173306", "0.8173306", "0.8136962", "0.8123653", "0.8107577", "0.8106978", "0.8081181", "0.80658644", "0.7998559", "0.785562", "0.7841261", "0.7619393", "0.7583822", "0.7581711", "0.7581417", "0.74501884", "0.7421167", "0.741003", ...
0.74642634
19
Given two sparse vectors |a| and |b|, each represented as collections.defaultdict(float), return their dot product. You might find it useful to use sum() and a list comprehension. This function will be useful later for linear classifiers.
def sparseVectorDotProduct(a, b): # BEGIN_YOUR_CODE (our solution is 4 lines of code, but don't worry if you deviate from this) ref = a if len(a)>len(b) else b return sum(a[key]*b[key] for key in ref) # END_YOUR_CODE
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dot(a,b):\n acc = 0\n for k in b.keys():\n acc += a[k] * b[k]\n return acc", "def sparse_dot_product(first_vector, second_vector):\n # Initialize a dictionary\n product_vector = {}\n # Calculate the dot product of the two vectors\n for key_1, value_1 in first_vector.items():\n ...
[ "0.79897726", "0.7936029", "0.78619874", "0.78544265", "0.7696974", "0.75309443", "0.7497966", "0.74440336", "0.7281937", "0.72047687", "0.71740055", "0.715717", "0.7147989", "0.7137717", "0.71276456", "0.71042067", "0.7037299", "0.69855773", "0.6981858", "0.69553447", "0.693...
0.83940524
0
Given two sparse vectors |v1| and |v2|, perform v1 += scale v2. This function will be useful later for linear classifiers.
def incrementSparseVector(a, scale, b): # BEGIN_YOUR_CODE (our solution is 2 lines of code, but don't worry if you deviate from this) ref = a if len(a)>len(b) else b for key in ref: a[key] += scale*b[key] # END_YOUR_CODE
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def incrementSparseVector(v1, scale, v2):\n for index in v2:\n v1[index] += v2[index] * scale", "def incrementSparseVector(v1, scale, v2):\n # BEGIN_YOUR_CODE (our solution is 2 lines of code, but don't worry if you deviate from this)\n for k in v2.keys():\n v1[k] += scale*v2[k]\n\n ret...
[ "0.8318007", "0.8040623", "0.80171686", "0.7116045", "0.68097806", "0.64905167", "0.6356559", "0.6250385", "0.61549056", "0.61451995", "0.59310114", "0.5929396", "0.59202933", "0.58751816", "0.5873797", "0.5777656", "0.57702166", "0.5708213", "0.5627215", "0.56062645", "0.560...
0.726585
3
Splits the string |text| by whitespace and returns the set of words that occur exactly once. You might find it useful to use collections.defaultdict(int).
def findSingletonWords(text): # BEGIN_YOUR_CODE (our solution is 4 lines of code, but don't worry if you deviate from this) return {w for w in text.split() if text.count(w) == 1} # END_YOUR_CODE
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def findSingletonWords(text):\n counter = collections.Counter(text.split(' '))\n return set(key for key in counter if counter[key] == 1)", "def word_count(text):\n # Use a dictionary to store the words\n words = {}\n\n # Simple way to strip extra whitespace\n text = ' '.join(text.split())\n\n ...
[ "0.8278977", "0.69614375", "0.68882203", "0.6812349", "0.679617", "0.6742889", "0.6727086", "0.6712202", "0.6699072", "0.66925263", "0.66868424", "0.6673909", "0.6670333", "0.66697", "0.66584605", "0.6615145", "0.66092306", "0.6587535", "0.65564215", "0.6549852", "0.6549759",...
0.81265616
1
Destroy the driver session. This function is called everytime a driver instance is destroyed This is a good place to close any open sessions, finish writing to log files
def cleanup(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def close_session(self):\n self.driver.close()", "def dispose():\n if _driver:\n log.msg_debug(\"[{driver}] dispose\".format(driver=_driver.get_name()))\n _driver.dispose()", "def __del__(self):\n\n self.session.close()", "def clean_up(self):\n self.session.close()", "...
[ "0.7169286", "0.70526034", "0.68742615", "0.6821676", "0.6750532", "0.6714746", "0.6690324", "0.6690324", "0.6690324", "0.66829705", "0.6568068", "0.6536267", "0.6533049", "0.6510136", "0.6429853", "0.64173555", "0.64154327", "0.6413506", "0.64073646", "0.6392621", "0.6375012...
0.0
-1
Gets the schedule_type of this OneOffSchedule.
def schedule_type(self): return self._schedule_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def schedule_type(self, schedule_type):\n allowed_values = [\"one_off\"] # noqa: E501\n if schedule_type not in allowed_values:\n raise ValueError(\n \"Invalid value for `schedule_type` ({0}), must be one of {1}\"\n .format(schedule_type, allowed_values)\n ...
[ "0.7260141", "0.6596978", "0.6596978", "0.6293652", "0.62636197", "0.62636197", "0.62465614", "0.6226899", "0.618448", "0.618448", "0.6148312", "0.6140172", "0.6110091", "0.6082713", "0.60616225", "0.6059399", "0.6037836", "0.602941", "0.59962916", "0.59962916", "0.59962916",...
0.86846936
0
Gets the datetime of this OneOffSchedule.
def datetime(self): return self._datetime
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def event_date_time(self) -> EventDateTime:\n return self._event_date_time", "def datetime(self):\n\n time = self.time()\n if time is None or time < 0 or time >= 24:\n time = 0\n\n try:\n d = datetime(self.year(), self.month(), self.day()) + timedelta(hours=time...
[ "0.7098529", "0.6969873", "0.69363016", "0.6924966", "0.68183374", "0.67878836", "0.6724136", "0.6648011", "0.664179", "0.6597222", "0.65893817", "0.6551962", "0.64952725", "0.6487474", "0.6454161", "0.6356609", "0.6318833", "0.63096976", "0.6304221", "0.6301678", "0.6299658"...
0.6442802
15
Parses an Order object from a dict.
def from_dict(cls, input_dict: dict): input_dict = input_dict.get('order') or input_dict details = OrderDetails(input_dict.get('underlying-symbol')) or OrderDetails(input_dict.get('symbol')) details.order_id = input_dict.get('id') details.ticker = input_dict.get('underlying-symbol') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, order_dict):\n self.order_ref = order_dict['order_ref']\n\n self.error_status_code = order_dict.get('error_status_code', None)\n self.error_reason = order_dict.get('error_reason', None)\n self.status = order_dict.get('status')\n self.created = timeutils.parse_i...
[ "0.6243378", "0.62318933", "0.612554", "0.5924327", "0.5870051", "0.5830886", "0.566187", "0.566058", "0.5648474", "0.56413156", "0.5634562", "0.56046015", "0.56017107", "0.55989605", "0.55989605", "0.55989605", "0.55989605", "0.55989605", "0.55989605", "0.55989605", "0.55989...
0.7010817
0
returns the value of the workspace config file key
def getWorkspaceValue(self,type,default=False): if default: return self.workspace['defaultconfig'].get(type.lower(),"1") else: return self.workspace['config'].get(type.lower(),"1")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def config(self):\n return CurrentProject().config.config[self.key]", "def get(self, key):\n return self.config.get(key)", "def getconfig(self, key):\n return self.config[key]", "def config_file(self):\n return self[CONFIG_FILE_KEY]", "def get_config(self, key):\n return ...
[ "0.71295583", "0.7006758", "0.6915561", "0.6899579", "0.6882351", "0.6881114", "0.6864473", "0.6769067", "0.6727689", "0.67199653", "0.66504306", "0.66496414", "0.66153854", "0.6596235", "0.65934736", "0.6584219", "0.6567552", "0.64775604", "0.64714843", "0.646878", "0.645208...
0.64319813
21
Generate a random string of fixed length
def randomString(stringLength=10): letters = string.ascii_lowercase return ''.join(random.choice(letters) for i in range(stringLength))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _generate_random_string(length: int):\n\tall_chars = string.ascii_letters + string.digits\n\treturn ''.join(random.choices(all_chars, k=length))", "def generate_random_string(length=6):\n n = int(length / 2 + 1)\n x = binascii.hexlify(os.urandom(n))\n s = x[:length]\n return s.decode(\"utf-8\")",...
[ "0.8680464", "0.8573714", "0.85486245", "0.85297275", "0.85209286", "0.84331024", "0.8432044", "0.84157014", "0.84120053", "0.8389201", "0.8345882", "0.8343962", "0.83406156", "0.83348686", "0.83240855", "0.82986933", "0.82911193", "0.8281826", "0.82818025", "0.82811046", "0....
0.7761017
96
RegistrationImagePullSpec represents the desired image configuration of registration agent.
def registration_image_pull_spec(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "registration_image_pull_spec")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def work_image_pull_spec(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"work_image_pull_spec\")", "def _set_image(self):\n\n if not self.spec.get(\"image\"):\n try:\n self.spec[\"image\"] = self._get_image_from_artifact()\n except (AttributeEr...
[ "0.6318446", "0.54857177", "0.52429855", "0.5099131", "0.50834256", "0.50218844", "0.4953229", "0.4949375", "0.4799141", "0.47875062", "0.47818193", "0.47730651", "0.47730651", "0.47680163", "0.47552583", "0.47301877", "0.4715091", "0.4711834", "0.46983433", "0.46658581", "0....
0.8002439
0
Status represents the current status of Klusterlet agent.
def __init__(__self__, *, conditions: Optional[pulumi.Input[Sequence[pulumi.Input['KlusterletStatusConditionsArgs']]]] = None, generations: Optional[pulumi.Input[Sequence[pulumi.Input['KlusterletStatusGenerationsArgs']]]] = None, observed_generation: Optional[pulumi.In...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def status(self):\n return status_dict[self._get_property_(self.STATUS).upper()]", "def get_status(self):\n return IronicPythonAgentStatus(\n started_at=self.started_at,\n version=self.version\n )", "def status(self):\n return STATUS[self.fields['status']]", ...
[ "0.7328856", "0.7316085", "0.7275613", "0.7219902", "0.7214967", "0.71590734", "0.7158682", "0.7115309", "0.7115309", "0.71080256", "0.71064615", "0.71036196", "0.71036196", "0.71036196", "0.71036196", "0.71036196", "0.71036196", "0.71036196", "0.71036196", "0.71036196", "0.7...
0.0
-1
lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
def last_transition_time(self) -> pulumi.Input[str]: return pulumi.get(self, "last_transition_time")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def last_transition_time(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"last_transition_time\")", "def transition_after(self) -> typing.Optional[aws_cdk.core.Duration]:\n return self._values.get('transition_after')", "def last_state_time(self) -> str:\n return pulumi.get...
[ "0.70149565", "0.5981621", "0.5935536", "0.5904527", "0.58912814", "0.5792327", "0.5686002", "0.56083184", "0.55555457", "0.55385876", "0.55342925", "0.55137813", "0.54497457", "0.5429167", "0.5319993", "0.5315681", "0.53137445", "0.5277426", "0.52419823", "0.5234218", "0.519...
0.69102573
1
Computes distance matrix between elements of X and Y, using metric. Returns 2D array distance, where distance[i, j] = metric(X[i], Y[j]).
def distance_matrix(X, Y, metric): distance = np.zeros((len(X), len(Y))) for i in range(len(X)): for j in range(len(Y)): m = metric(X[i], Y[j]) if np.isnan(m): pdb.set_trace() distance[i, j] = m return distance
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_distance_matrix(input1, input2, metric='euclidean'):\n # check input\n assert isinstance(input1, torch.Tensor)\n assert isinstance(input2, torch.Tensor)\n assert input1.dim() == 2, 'Expected 2-D tensor, but got {}-D'.format(\n input1.dim()\n )\n assert input2.dim() == 2, 'Expec...
[ "0.69461244", "0.69033325", "0.6775763", "0.6745622", "0.66243005", "0.6493876", "0.6477413", "0.6387066", "0.624647", "0.62444335", "0.6234725", "0.6234043", "0.62154067", "0.6178447", "0.6163099", "0.61206436", "0.61085975", "0.60905504", "0.6081324", "0.6065764", "0.605593...
0.80443424
0
Computes square of arc length metric (the geodesic) between points Y1 and Y2 on Grassmann manifold. Refer to [1] section 6.4.
def arc_length_sq(Y1, Y2): assert Y1.shape == Y2.shape s = scipy.linalg.svdvals(Y1.transpose() @ Y2) # handle numerical imprecision s[np.isclose(s, 1)] = 1 s[np.isclose(s, -1)] = -1 theta = np.arccos(s) return (theta ** 2).sum()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_grassman_distance(Y1, Y2):\n Q1, _ = jnp.linalg.qr(Y1)\n Q2, _ = jnp.linalg.qr(Y2)\n\n _, sigma, _ = jnp.linalg.svd(Q1.T @ Q2)\n sigma = jnp.round(sigma, decimals=6)\n return jnp.linalg.norm(jnp.arccos(sigma))", "def calculate_line_length(x1, y1, x2, y2):\n distance = np.sqrt((x2 - x1)**2 + (...
[ "0.6776398", "0.6689561", "0.6462521", "0.6340689", "0.6311694", "0.62765586", "0.6196412", "0.6194886", "0.61760753", "0.61616045", "0.6159071", "0.6117396", "0.6077475", "0.6072009", "0.6069676", "0.60164106", "0.60024905", "0.6002284", "0.6002283", "0.60002023", "0.5997894...
0.7563943
0
Adds an edge from x to y.
def addEdge(self, x, y): self._dictOut[x].append(y) self._dictIn[y].append(x)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addEdge(self,x,y):\n\t\tself._dictOut[x].append(y)\n\t\tself._dictIn[y].append(x)", "def addEdge(self,x,y):\n\t\tself._dict[x].append(y)", "def addEdge(self,x,y):\n\t\tself._matr[x][y] = True", "def addEdge(self,x,y):\r\n self.matr[x][y] = True\r\n self.matr[y][x] = True", "def add_edge(s...
[ "0.8612095", "0.8502274", "0.79762065", "0.76878595", "0.76740915", "0.7508194", "0.7498055", "0.745225", "0.7385579", "0.7355833", "0.734631", "0.7339625", "0.7334341", "0.7323005", "0.728338", "0.72663236", "0.72342396", "0.72261655", "0.7208663", "0.71908885", "0.71426624"...
0.8675201
0
Initialize the Mask class Mask.data will be generated as per the original_array_shape, and custom_data (if provided)
def __init__(self, original_array_shape, func_true, func_false=lambda x: x, custom_data=None): self.shape = original_array_shape self.func_true = func_true self.func_false = func_false # initialize Mask.data as an all False boolean numpy.array self.data = self.init_data() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, samples, shape):\n self.samples = samples\n self.shape = shape\n self._mask = convert_locations_to_mask(self.samples, self.shape)", "def __init__(self, arr, *args, **kwds):\n # intensity array\n self.set_array(arr, **kwds)\n # the mask will often inclu...
[ "0.6785546", "0.6511113", "0.6455427", "0.6340733", "0.63406205", "0.63138807", "0.6095937", "0.60900503", "0.60002846", "0.5940314", "0.5911983", "0.5887431", "0.5842693", "0.5777551", "0.575434", "0.5754104", "0.5722479", "0.5689268", "0.5662555", "0.5660422", "0.5656624", ...
0.79263777
0
Called with a list of inputs from the model, returns (state, reward, terminal).
def convert_input(self, inlist): # First map the ordered state list from the simulation into a # state dictionary for the brain. self.state = { 'heat_cost': inlist[0], 'set_temp': inlist[1], 'room_temp': inlist[2], 'room_temp_change': inlist[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def model_inputs():\n # TODO: Implement Function\n inputs = tf.placeholder(tf.int32, shape=[None,None], name= \"input\")\n targets = tf.placeholder(tf.int32, shape=[None,None], name= \"targets\")\n lrate = tf.placeholder(tf.float32, name= \"learning_rate\")\n keep_prob = tf.placeholder(tf.float32, n...
[ "0.6193667", "0.6178104", "0.6064196", "0.6002623", "0.59728706", "0.5850324", "0.58187944", "0.5806909", "0.58028775", "0.5789478", "0.5779858", "0.577571", "0.5727892", "0.5727207", "0.56806105", "0.5603766", "0.55893844", "0.5573486", "0.5563018", "0.55627656", "0.5546897"...
0.6711488
0
Called with a dictionary of actions from the brain, returns an ordered list of outputs for the simulation model.
def convert_output(self, act): outlist = [] if act is not None: self.action = act outlist = [ act['heater_on'], ] return outlist
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def actions(self):\n return np.array([m['actions'] for m in self.model_outs], dtype=np.int32)", "def output(self):\n acts = []\n for i in self.actions:\n acts.append(i.output())\n return {\n \"delay\": self.delay,\n \"actions\": acts\n }", "de...
[ "0.6593974", "0.6293566", "0.6111177", "0.600559", "0.600056", "0.5958693", "0.5910888", "0.5870965", "0.5848498", "0.5848498", "0.58112115", "0.5771501", "0.5762106", "0.5755059", "0.5751727", "0.5731879", "0.5714606", "0.5714606", "0.56925684", "0.5670099", "0.56687963", ...
0.5620848
26
swipes the grid up, doing all the necessary additions uses swipeBase
def swipeUp (self) : self.grid = self.swipeBase()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def swipe_up(self):\n self.swipe_sub(SWIPE_MATRIX[0])", "def swipeDown (self) :\n rotated = Grid(np.rot90(np.rot90(self.grid)))\n self.grid = np.rot90(np.rot90(rotated.swipeBase()))", "def onMoveUp(self):\n self.mainGrid.moveUp()", "def swipe_up(self):\n self.driver.swipe(start...
[ "0.78050476", "0.7796098", "0.7674124", "0.72863257", "0.7126566", "0.70800215", "0.70436424", "0.6945877", "0.66380847", "0.6577486", "0.6572682", "0.64261186", "0.6415143", "0.6410049", "0.63407093", "0.63305897", "0.62838095", "0.6237828", "0.6189507", "0.6181719", "0.6150...
0.9074098
0
Tests whether the index page can be accessed
def test_index_view(self): response = self.client.get(reverse('index')) self.assertEquals(response.status_code, 200)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def checkForIndexPage(r):\n soup = BeautifulSoup(r.text, 'lxml')\n head = soup.find('h1')\n if head != None and head.string != None and (\"Index of \" in head.string):\n return \"Shows 'Index Of' page ✘\" \n else:\n return \"Displays properly ✓\"", "def index_exi...
[ "0.68998194", "0.689753", "0.68859845", "0.6789309", "0.66911316", "0.6663339", "0.66396004", "0.6616655", "0.66040295", "0.6595182", "0.6570997", "0.65204287", "0.64947116", "0.6445904", "0.6444932", "0.6444824", "0.6411991", "0.63396895", "0.6333266", "0.6318787", "0.630055...
0.61971635
23
Returns the image resizer config from a model config.
def get_image_resizer_config(model_config): meta_architecture = model_config.WhichOneof("model") meta_architecture_config = getattr(model_config, meta_architecture) if hasattr(meta_architecture_config, "image_resizer"): return getattr(meta_architecture_config, "image_resizer") else: raise ValueError("{...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_model_config(model_cfg: mmcv.Config,\n imgs: Sequence[Union[str, np.ndarray]],\n input_shape: Optional[Sequence[int]] = None):\n cfg = model_cfg.deepcopy()\n if isinstance(imgs[0], str):\n if cfg.data.test.pipeline[0]['type'] != 'LoadImageFro...
[ "0.60294944", "0.594613", "0.5925681", "0.57445836", "0.5612447", "0.5579079", "0.5547045", "0.5475008", "0.5456308", "0.5419105", "0.54103", "0.5399768", "0.53898", "0.5361926", "0.53441256", "0.5341895", "0.5334842", "0.53155756", "0.52866197", "0.5278676", "0.5272199", "...
0.8050628
0
Returns context feature length from a given config.
def get_context_feature_length(model_config): meta_architecture = model_config.WhichOneof("model") meta_architecture_config = getattr(model_config, meta_architecture) if hasattr(meta_architecture_config, "context_config"): return meta_architecture_config.context_config.context_feature_length
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_max_num_context_features(model_config):\n meta_architecture = model_config.WhichOneof(\"model\")\n meta_architecture_config = getattr(model_config, meta_architecture)\n\n if hasattr(meta_architecture_config, \"context_config\"):\n return meta_architecture_config.context_config.max_num_context_feature...
[ "0.6964804", "0.66571206", "0.6149475", "0.6123576", "0.6027014", "0.5959131", "0.59561056", "0.5899251", "0.58841527", "0.58509576", "0.5828792", "0.5776238", "0.57703346", "0.57114846", "0.57095", "0.56946087", "0.5666238", "0.5610539", "0.5604237", "0.5601883", "0.5588737"...
0.8101928
0
Set `fine_tune_checkpoint_type` using `from_detection_checkpoint`. `train_config.from_detection_checkpoint` field is deprecated. For backward compatibility, this function sets `train_config.fine_tune_checkpoint_type` based on `train_config.from_detection_checkpoint`.
def update_fine_tune_checkpoint_type(train_config): if not train_config.fine_tune_checkpoint_type: if train_config.from_detection_checkpoint: train_config.fine_tune_checkpoint_type = "detection" else: train_config.fine_tune_checkpoint_type = "classification"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clear_fine_tune_checkpoint(pipeline_config_path,\n new_pipeline_config_path):\n configs = get_configs_from_pipeline_file(pipeline_config_path)\n configs[\"train_config\"].fine_tune_checkpoint = \"\"\n configs[\"train_config\"].load_all_detection_checkpoint_vars = False\n pipel...
[ "0.5988169", "0.591557", "0.5634792", "0.52783686", "0.51746285", "0.5104157", "0.50546634", "0.5048067", "0.50222886", "0.49668902", "0.4918989", "0.49108595", "0.48470035", "0.4846288", "0.48412624", "0.4808448", "0.47779784", "0.47637227", "0.4740438", "0.47097805", "0.467...
0.87784946
0
Returns the learning rate type for training.
def get_learning_rate_type(optimizer_config): return optimizer_config.learning_rate.WhichOneof("learning_rate")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_learning_rate_type(self, learning_rate):\n try:\n return LEARNING_RATE_TYPES[learning_rate]\n except KeyError:\n raise ValueError(\"learning rate %s \"\n \"is not supported. \" % learning_rate)", "def get_learning_rate():\n return 0.0000...
[ "0.8056266", "0.72972107", "0.7276959", "0.7065693", "0.7058839", "0.694395", "0.69130206", "0.68767875", "0.68767875", "0.6702439", "0.66374516", "0.6574738", "0.65732837", "0.6513989", "0.649564", "0.6482941", "0.6319623", "0.63023674", "0.629083", "0.61754227", "0.61754227...
0.8020855
1
Updates `configs` to reflect the new initial learning rate. This function updates the initial learning rate. For learning rate schedules, all other defined learning rates in the pipeline config are scaled to maintain their same ratio with the initial learning rate. The configs dictionary is updated in place, and hence ...
def _update_initial_learning_rate(configs, learning_rate): optimizer_type = get_optimizer_type(configs["train_config"]) if optimizer_type == "rms_prop_optimizer": optimizer_config = configs["train_config"].optimizer.rms_prop_optimizer elif optimizer_type == "momentum_optimizer": optimizer_config = config...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_learning_rate(self) -> None:\n optimizer = list(self.optimizers.values())[0]\n old_lr = optimizer.param_groups[0]['lr']\n for name, scheduler in self.schedulers.items():\n if name == 'generator' and self.opt.generator_scheduler_name == 'plateau':\n schedule...
[ "0.6816427", "0.6799031", "0.664777", "0.6629371", "0.6605509", "0.6550398", "0.64980674", "0.649182", "0.64881283", "0.64878196", "0.64878196", "0.6451124", "0.6420417", "0.63502395", "0.63321024", "0.6326059", "0.6323389", "0.6253907", "0.62462264", "0.62373996", "0.6233594...
0.80349046
0
Updates `configs` to reflect the new momentum value. Momentum is only supported for RMSPropOptimizer and MomentumOptimizer. For any other optimizer, no changes take place. The configs dictionary is updated in place, and hence not returned.
def _update_momentum_optimizer_value(configs, momentum): optimizer_type = get_optimizer_type(configs["train_config"]) if optimizer_type == "rms_prop_optimizer": optimizer_config = configs["train_config"].optimizer.rms_prop_optimizer elif optimizer_type == "momentum_optimizer": optimizer_config = configs["...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def momentum_updates(self, params, grads, learning_rate=1e-3, m=0.9,\n nesterov=True):\n updates = []\n lr = learning_rate * (1 - m)\n for param, grad in zip(params, grads):\n size = param.eval().shape\n # momentum velocity\n v = theano....
[ "0.6578104", "0.6225441", "0.6114929", "0.6101765", "0.5954882", "0.57930183", "0.579052", "0.5682142", "0.5632357", "0.55270505", "0.5457266", "0.54440874", "0.54411983", "0.5434013", "0.54293686", "0.54259527", "0.5425167", "0.5412457", "0.5396711", "0.537815", "0.53602463"...
0.80600595
0
Updates the alpha value for a sigmoid focal loss. The configs dictionary is updated in place, and hence not returned.
def _update_focal_loss_alpha(configs, alpha): classification_loss = _get_classification_loss(configs["model"]) classification_loss_type = classification_loss.WhichOneof( "classification_loss") if classification_loss_type != "weighted_sigmoid_focal": raise TypeError("Classification loss must be `weighted...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_alpha(model):\n a = model.params.alpha_prior[0]\n b = model.params.alpha_prior[1]\n\n alpha_old = model.params.alpha\n\n log_p_old = model.feat_alloc_dist.log_p(model.params)\n\n alpha_new = scipy.stats.gamma.rvs(a, scale=(1 / b))\n\n model.params.alpha = alpha_new\n\n log_p_new = m...
[ "0.6529631", "0.61519325", "0.6029736", "0.60168636", "0.59633136", "0.59588414", "0.5887104", "0.5808794", "0.5799448", "0.5719935", "0.56112444", "0.559655", "0.5546288", "0.55332357", "0.55277425", "0.55191064", "0.5507267", "0.54913545", "0.5480239", "0.547167", "0.546444...
0.7999063
0
Updates the mask type for both train and eval input readers. The configs dictionary is updated in place, and hence not returned.
def _update_mask_type(configs, mask_type): configs["train_input_config"].mask_type = mask_type _update_all_eval_input_configs(configs, "mask_type", mask_type)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def configure_masking(self, masks):\n self.masks = masks", "def update_mask(self, mask):\n\n # Get general mask\n general_mask = self.general_mask\n\n # Complete with the input mask\n new_mask = (general_mask | mask)\n\n # Update attribute\n self.mask = new_mask\n...
[ "0.5966109", "0.58070683", "0.5470127", "0.5455038", "0.53965545", "0.53135103", "0.52476937", "0.5243227", "0.5196084", "0.5152018", "0.51418567", "0.51083547", "0.5096416", "0.5093743", "0.5085546", "0.5029471", "0.50210595", "0.49997312", "0.49247557", "0.49134535", "0.486...
0.83371735
0
Returns True if both Lagrangemultiplier equations are satisfied, otherwise False. Assumes that the SVM has support vectors assigned, and that all training points have alpha values assigned.
def check_alpha_equations(svm): fourSum = 0 fiveSum = [0] * len(svm.training_points[0]) for point in svm.training_points: fourSum += point.classification * point.alpha fiveSum = vector_add(fiveSum, scalar_mult(point.classification * point.alpha, point)) return fourSum is 0 and fiveSum[0]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_valid(self):\n posit1 = (self.mean_v > 0) & (self.kappa_y > 0) & (self.eta_y > 0)\n posit2 = (self.kappa_s > 0) & (self.eta_s > 0)\n return posit1 & posit2 & self.feller()", "def _check_optimality(self):\n\n dual_obj = -0.5* np.dot(self.beta, self.beta) + np.sum(self.alpha)\n\n...
[ "0.59937245", "0.593901", "0.5932015", "0.5779008", "0.5715306", "0.5698764", "0.56018597", "0.5597762", "0.5557452", "0.5547293", "0.5547293", "0.538162", "0.5339759", "0.5329457", "0.5315115", "0.52876365", "0.52803653", "0.5273876", "0.5243224", "0.52388996", "0.5229508", ...
0.6750873
0
Turn the name of the months to digit and replace '' for '/'
def meses_to_num(palabra): palabra = str(palabra) meses_dict = {'Jan' : '01', 'Feb' : '02', 'Mar' : '03', 'Apr' : '04', 'May' : '05', 'Jun' : '06', 'Jul' : '07', 'Aug' : '08', 'Sep' : '09', 'Oct' : '10', 'Nov' : '11', 'Dec' : '12',} palabra = palabra.strip() for key, value in mes...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fix_single_digit_month(connection):\n _update_date_by_regexp(connection=connection,\n regexp=\"^[0-9]{1}/[0-9]{1,2}/[0-9]{4}$\",\n new_value=\"CONCAT('0', cav.attribute_value)\")", "def _french_month(month):\n mois = \"janvfévrmarsavr-mai-juinjuilaoûtseptoc...
[ "0.6841", "0.6613696", "0.6563913", "0.65165746", "0.648298", "0.6474837", "0.6448772", "0.6387334", "0.6309783", "0.6239595", "0.61963564", "0.61556846", "0.61148554", "0.6109956", "0.6084492", "0.60648817", "0.60528", "0.6032835", "0.6021555", "0.60186285", "0.5991653", "...
0.5465322
48
Return the last four digits for the value taken if this value have 4 or more characters
def columna_year(palabra): if len(palabra) >= 4: return palabra[-4:]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def safe_number(self):\n mask = '*' * (len(self.account_number) - 4)\n return '{0}{1}'.format(mask, self.account_number[-4:])", "def safe_number(self):\n mask = '*' * (len(self.card_number) - 4)\n return '{0}{1}'.format(mask, self.card_number[-4:])", "def first_four_last_four(seq):\...
[ "0.6630878", "0.6569092", "0.644805", "0.6381354", "0.6300672", "0.61117744", "0.60528576", "0.60273254", "0.5840331", "0.58130133", "0.58119303", "0.57729733", "0.57670254", "0.5761941", "0.5757561", "0.566354", "0.56413174", "0.5640264", "0.5597648", "0.5550996", "0.5537658...
0.0
-1
Return the value of the state (computed in __init__).
def getValue(self, state): return self.values[state]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def value(self, state):\n raise NotImplementedError", "def value(self, state):\n raise NotImplementedError", "def value(self, state):\n\t\traise NotImplementedError", "def getValue(self, state):\n util.raiseNotDefined()", "def getValue(self, state):\n util.raiseNotDefined()", ...
[ "0.83014333", "0.83014333", "0.826012", "0.8086146", "0.8086146", "0.79581815", "0.79296756", "0.78013283", "0.77367806", "0.77336967", "0.76010257", "0.76010257", "0.76010257", "0.76010257", "0.76010257", "0.76010257", "0.76010257", "0.76010257", "0.76010257", "0.76010257", ...
0.77333474
17
Recursively find subclasses of this metric. If ``include_parents`` is passed as ``True``, intermediate child classes that also have subclasses will be included. Otherwise, only classes without subclasses will be included to ensure that they are final implementations and are ready to be run on data.
def get_subclasses(cls, include_parents=False): subclasses = dict() for child in cls.__subclasses__(): grandchildren = child.get_subclasses(include_parents) subclasses.update(grandchildren) if include_parents or not grandchildren: subclasses[child.__na...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_all_subclasses(parent: type, include_private_sublcasses=False) -> t.List[type]:\r\n\r\n # I refuse to use recursion in Python. I am afraid that I would melt the CPU.\r\n # => do it iteratively\r\n i: int = 0 # Index of last class that has been checked for subclasses\r\n all_subs = parent.__sub...
[ "0.60111946", "0.57195556", "0.5662616", "0.5614895", "0.54931945", "0.5479527", "0.5474378", "0.54728144", "0.5468871", "0.5458959", "0.5399118", "0.5377722", "0.5320709", "0.52882415", "0.52501714", "0.52459615", "0.524344", "0.5206847", "0.516989", "0.5165813", "0.5157036"...
0.6880257
0
Assemble a uri based on a base, any number of path segments, and query string parameters.
def uri(base, *path, **query): if base and base.endswith('/'): base = base[:-1] retval = [base] # build the path path = '/'.join([''] + [unicode_quote(s.strip('/')) for s in path if s is not None]) if path: retval.append(path) # build th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _build_uri(self, uri_base, params):\n if not params:\n return uri_base\n else:\n uri_extension = \"?\"\n for param in params:\n uri_extension = uri_extension + param + \"&\"\n uri_extension = uri_extension[:-1] # clip off the final & \n ...
[ "0.81732285", "0.7680201", "0.6879778", "0.68686986", "0.6698369", "0.6584601", "0.64705807", "0.6420034", "0.6362892", "0.6343003", "0.63139135", "0.6288215", "0.6276257", "0.6271385", "0.6254617", "0.622278", "0.620622", "0.61182255", "0.60942173", "0.60766655", "0.6068355"...
0.75137776
2
Creates CSVs from the data for later use with pandas dataframes
def export_data(filename: str, headers: [str], data: int, text: bool=False): path = C.TEST_DIR if not exists(path): mkdir(path) with open(path + filename + '.csv', 'w', newline='') as f: wr = csv.writer(f, delimiter=',', quoting=csv.QUOTE_NONE) wr.writerow(hea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_csv(self):\n try:\n # Convert List of Lists to DataFrame and write it to a CSV\n pd.DataFrame(self.data, columns=self.header) \\\n .to_csv(os.path.join(self.file_path, self.file_name), index=False)\n self.successful_run = True\n except:\n ...
[ "0.7477253", "0.69239384", "0.69205415", "0.6915719", "0.6792945", "0.67929024", "0.6778213", "0.67704344", "0.67091477", "0.66807485", "0.66199106", "0.6589445", "0.6556856", "0.65491366", "0.65468234", "0.6542499", "0.65200347", "0.6513843", "0.6510483", "0.65063345", "0.64...
0.0
-1
Mostly equivalent to `tf.layers.batch_normalization`, but different in
def BatchNorm(inputs, axis=None, training=None, momentum=0.9, epsilon=1e-5, center=True, scale=True, beta_initializer=tf.zeros_initializer(), gamma_initializer=tf.ones_initializer(), virtual_batch_size=None, internal_update=False): # parse shapes...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def batch_norm(inputs, training, data_format):\n # We set fused=True for a significant performance boost. See\n # https://www.tensorflow.org/performance/performance_guide#common_fused_ops\n return tf.compat.v1.layers.batch_normalization(\n inputs=inputs, axis=1 if data_format == 'channels_first' else 3,\n ...
[ "0.8122588", "0.8099415", "0.774626", "0.7725665", "0.76168764", "0.76080966", "0.75199896", "0.7475892", "0.73734915", "0.71194327", "0.7071137", "0.7012755", "0.6990438", "0.69761354", "0.69450647", "0.6938304", "0.6926858", "0.68831134", "0.6876203", "0.68547195", "0.68137...
0.6702433
27
Loads and sets OS environment variables from a local config file. This should only be called when locally developing, running tests, or setting remote SSM key/values. In production or CI all variables must be set in the OS environment or SSM and not loaded from a file.
def load_local_into_env(cls, filename, stage=None): env_vars = cls.open_local(filename, stage=stage, for_env=True) for key, value in env_vars.items(): if value is None: print('Environment variable: {0} has no value and will not be set.'.format(key)) else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_evironment():\n environment = Utility.load_yaml(os.getenv(\"system_file\", \"./system.yaml\"))\n for key in environment:\n if key in os.environ:\n environment[key] = os.getenv(key)\n Utility.environment = environment", "def _env_vars(self, cred_file=None, s...
[ "0.75161177", "0.6871498", "0.67835367", "0.666238", "0.6621201", "0.6416681", "0.64125293", "0.6361786", "0.62763596", "0.62480634", "0.62101126", "0.61866766", "0.6155675", "0.6153451", "0.6143233", "0.6044381", "0.60281247", "0.60082656", "0.5997749", "0.5995804", "0.59856...
0.6911676
1
Yields values in the form of 6n 1 and 6n + 1 until m
def sixn(m): if m <= 2: return () if m > 2: yield 2 if m > 3: yield 3 for n in count(1): x = 6 * n - 1 y = x + 2 if x < m: yield x else: break if y < m: yield y else: break
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def islice(n, m):\n npiece = int(math.ceil(1.0*n/m))\n for i in range(npiece):\n if (i+1)*m > n:\n yield i, i*m, n\n else:\n yield i, i*m, (i+1)*m", "def cashflow_times(n, m):\n return [i for i in range(m * n+1) if i != 0 ]", "def algorithm_h(n, m):\n partiti...
[ "0.7102037", "0.6725873", "0.66359276", "0.6604757", "0.6492092", "0.6469066", "0.64281946", "0.64185464", "0.64104176", "0.6374721", "0.6343013", "0.6330315", "0.6306338", "0.6288488", "0.6277879", "0.6273048", "0.61868757", "0.6164543", "0.6140324", "0.6134796", "0.6130589"...
0.7822665
0
This function will return a random datetime between two datetime objects.
def random_date(start, end): delta = end - start int_delta = (delta.days * 24 * 60 * 60) + delta.seconds random_second = randrange(int_delta) return start + timedelta(seconds=random_second)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def random_date(start, end):\r\n return start + datetime.timedelta(\r\n # Get a random amount of seconds between `start` and `end`\r\n seconds=random.randint(0, int((end - start).total_seconds())),\r\n )", "def random_date(start, end):\r\n delta = end - start\r\n int_delta = (delta.days...
[ "0.77918494", "0.75647223", "0.7562488", "0.754578", "0.75309545", "0.7405053", "0.7334951", "0.7235134", "0.7207752", "0.7169905", "0.6945745", "0.6864313", "0.67521274", "0.66044766", "0.6574501", "0.6525121", "0.6248982", "0.6201766", "0.6185233", "0.6137791", "0.60238856"...
0.7509593
9
Turn off the light.
async def async_turn_off(self, **kwargs: Any) -> None: self._device.light_on = False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def turn_off(self):\n GPIO.output(self.gpio, False) # turn off light", "def set_light_off(self):\n self._light = \"OFF\"", "def set_light_off(self):\r\n self._light = \"OFF\"", "def lightning_turnoff(self):\n self.turnOff()", "def turn_off(self, **kwargs):\n self._light....
[ "0.9052932", "0.88391656", "0.8812152", "0.8755596", "0.87526155", "0.87362814", "0.8640198", "0.8629958", "0.8588046", "0.8578178", "0.8392005", "0.8388165", "0.8384779", "0.8298985", "0.8174446", "0.81200165", "0.8115888", "0.8092821", "0.8077324", "0.8018149", "0.79744524"...
0.83275425
13
Sets the reference_id of this DestinyHistoricalStatsActivity.
def reference_id(self, reference_id): self._reference_id = reference_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_reference_id(self, reference_id):\n self.reference_id = reference_id", "def setReferenceId(self, *args):\n return _libsbml.ReferenceGlyph_setReferenceId(self, *args)", "def back_reference_schedule_id(self, back_reference_schedule_id):\n\n self._back_reference_schedule_id = back_ref...
[ "0.6767242", "0.59480655", "0.5735632", "0.5572401", "0.5511492", "0.54443395", "0.54443395", "0.5355432", "0.52677155", "0.524701", "0.5236441", "0.5173001", "0.5121862", "0.5097602", "0.5095242", "0.5091717", "0.5085687", "0.5064169", "0.5064169", "0.5058637", "0.50510806",...
0.66640913
1
Sets the director_activity_hash of this DestinyHistoricalStatsActivity.
def director_activity_hash(self, director_activity_hash): self._director_activity_hash = director_activity_hash
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def family_history(self, family_history):\n\n self.logger.debug(\"In 'family_history' setter.\")\n\n self._family_history = family_history", "def activity(self, activity):\n if activity is None:\n raise ValueError(\"Invalid value for `activity`, must not be `None`\") # noqa: E501...
[ "0.5090065", "0.47781125", "0.4712268", "0.4687122", "0.4598562", "0.45637232", "0.45304593", "0.44935468", "0.44873667", "0.44500193", "0.444469", "0.4411477", "0.4340902", "0.42628583", "0.42392772", "0.42381778", "0.41884795", "0.4177731", "0.41641453", "0.41578785", "0.41...
0.83169967
0
Sets the instance_id of this DestinyHistoricalStatsActivity.
def instance_id(self, instance_id): self._instance_id = instance_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def instance_identifier(self, instance_identifier):\n\n self._instance_identifier = instance_identifier", "def inst_id(self, inst_id):\n\n self._inst_id = inst_id", "def set_instance(self, instance):\n self.instance = instance", "def set_instance(self, instance):\n self.instance =...
[ "0.56492835", "0.5269083", "0.5161322", "0.5161322", "0.5161322", "0.5161322", "0.5161322", "0.5070406", "0.49877417", "0.49748638", "0.49360183", "0.4833145", "0.4821692", "0.47997922", "0.46660542", "0.46174517", "0.45736745", "0.45531002", "0.45029664", "0.44929352", "0.44...
0.66670316
0
Sets the membership_type of this DestinyHistoricalStatsActivity.
def membership_type(self, membership_type): self._membership_type = membership_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_destiny_aggregate_activity_stats_get(self, characterId, destinyMembershipId, membershipType):\n # TODO: Assuming first server is good - need to make fallback logic\n return self.session.get_any(\"{base}{request_url}\".format(base=self.servers[0],\n ...
[ "0.5204672", "0.51588494", "0.51588494", "0.5042666", "0.49787784", "0.49787784", "0.49787784", "0.49787784", "0.49776423", "0.49776423", "0.4955811", "0.4941051", "0.48580316", "0.4844216", "0.4833119", "0.4833119", "0.4810788", "0.4781123", "0.47748965", "0.47434545", "0.47...
0.7605956
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, DestinyHistoricalStatsActivity): 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.8457167", "0.8393036", "0.81455255", "0.8139734", "0.81333447", "0.8094964", "0.8093362", "0.8093362", "0.8093362", "0.80863476", "0.80863476", "0.8077286", "0.8077286", "0.806682" ]
0.0
-1
Gets information about a user access token issued by an app. See
def debug_access_token(self, token, app_id, app_secret): args = { "input_token": token, "access_token": "{0}|{1}".format(app_id, app_secret), } return self.request(self.version + "/" + "debug_token", args=args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_facebook_app_access_token():\n\n params = {\n \"client_id\": App.facebook_app_id,\n \"client_secret\": App.facebook_app_secret,\n \"grant_type\": \"client_credentials\"\n }\n\n response = get_response(FB_URL_ACCESS_TOKEN, params)\n respon...
[ "0.7109115", "0.6923357", "0.67929345", "0.67442", "0.67276645", "0.6709723", "0.6675666", "0.6630756", "0.66193485", "0.6544326", "0.6527994", "0.65124136", "0.65063065", "0.65063065", "0.64997435", "0.64986104", "0.6487435", "0.6460451", "0.6441855", "0.6415378", "0.6389104...
0.0
-1
Greet when users are added to the conversation. Note that all channels do not send the conversation update activity. If you find that this bot works in the emulator, but does not in another channel the reason is most likely that the channel does not send this activity.
async def on_members_added_activity( self, members_added: [ChannelAccount], turn_context: TurnContext ): for member in members_added: if member.id != turn_context.activity.recipient.id: reply = MessageFactory.list([]) member_name = member.name ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_bot_start(update, context):\n user = update.effective_user\n chat_id = update.effective_chat.id\n log.info(\n \"ADD %s, %s, %s, %s\", user.username, user.full_name, chat_id, user.language_code,\n )\n\n context.bot.send_message(\n chat_id=chat_id,\n ...
[ "0.7068359", "0.70057225", "0.6858996", "0.6780166", "0.6748209", "0.66113174", "0.6536421", "0.63773024", "0.63518006", "0.63496226", "0.63485485", "0.6345151", "0.6332404", "0.63291174", "0.6293361", "0.6293361", "0.62612873", "0.6258905", "0.62540674", "0.62385076", "0.622...
0.6365125
8
custom nickname validation filtering special characters
def validate_nickname(self, nickname): for char in nickname: if not char.isdigit() and not char.isalpha(): raise serializers.ValidationError("Nickname contains characters that are not numbers nor letters.") return nickname
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clean_username(self):\n data = self.cleaned_data['username']\n if '@' in data or '|' in data or ' ' in data or '+' in data:\n raise forms.ValidationError(_(u'Usernames should not have special characters.'))\n try:\n user = User.objects.get(username__exact=self.cleaned...
[ "0.682574", "0.6810178", "0.6807157", "0.67931455", "0.67838424", "0.67394036", "0.66985106", "0.6654083", "0.6616751", "0.6597314", "0.65899456", "0.64442915", "0.6393189", "0.6384678", "0.637351", "0.63680464", "0.63429", "0.63187486", "0.62818134", "0.6255969", "0.62552875...
0.8190695
0
compute L2 regularization decay.
def l2_regularization(cg, rate=0.01): W = VariableFilter(roles=[WEIGHT])(cg.variables) L2_cost = rate * l2_norm(W) return L2_cost
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def l2_regularization_penalty(self):\n return self.l2 * (np.linalg.norm(self.weights)**2)", "def l2_regularization(W, reg_strength):\n # TODO: Copy from the previous assignment\n loss = reg_strength*np.sum(W*W)\n grad = 2*reg_strength*W\n return loss, grad", "def EmbeddingL2RegularizationUpd...
[ "0.75687766", "0.7110183", "0.6971778", "0.69565564", "0.6902947", "0.67512697", "0.6749969", "0.67392", "0.66892654", "0.6673921", "0.6673921", "0.6673921", "0.6651605", "0.66264707", "0.6619406", "0.660533", "0.66044235", "0.65670925", "0.65476966", "0.6532875", "0.64752054...
0.7810511
0
Respond with 405 Method Not Allowed.
def response_405_method_not_allowed(self): errormsg = 'Method Not Allowed: {0}'.format(self.request.method) return self.create_response(405, errormsg, body={'error': errormsg})
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def response_method_not_allowed():\n\n return b\"HTTP/1.1 405 Method Not Allowed\\r\\n\"", "def http405(req, resp, error, params):\n resp.status = falcon.HTTP_405\n resp.media = {\n \"code\": \"405_METHOD_NOT_ALLOWED\",\n \"message\": \"Cannot perform \" + req.method + \" on \" + req.url\n...
[ "0.83900875", "0.8102103", "0.8071466", "0.80632424", "0.7989058", "0.7957838", "0.7888732", "0.7799156", "0.77594185", "0.77030754", "0.7607001", "0.7525692", "0.7383925", "0.73224944", "0.7273863", "0.72528845", "0.7232358", "0.7149705", "0.7125795", "0.7089108", "0.7074891...
0.8552914
0
Administrate milestones. Opens an exhibit that offers the actions below depending on milestone status and user permissions.
def milestones(request): # we need to use {% url %} with an exhibit {{.foo}} as param, # fake { and } to be safe in urllib.quote, which is what reverse # calls down the line. if '{' not in urllib.always_safe: always_safe = urllib.always_safe urllib.always_safe = always_safe + '{}' el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_issue_edit_milestone(self):\n pass", "def milestones(self, milestones):\n\n self._milestones = milestones", "def activate_milestone(self, milestone_id, message=None):\n data = {}\n data['milestone_id'] = milestone_id\n\n if message:\n data['message'] = mes...
[ "0.5807756", "0.57310784", "0.56521845", "0.5455653", "0.5404848", "0.54007477", "0.5341982", "0.53202605", "0.5302014", "0.5295567", "0.52950144", "0.5195792", "0.5193202", "0.51330274", "0.5054295", "0.50267977", "0.50211793", "0.5010185", "0.5008982", "0.5002668", "0.49952...
0.5024902
16
Test case for get_date_column_index when column name has left trailing spaces with 'Date'.
def test_get_date_column_index_left_trailing_spaces(self, date_trailing_left_spaces_worksheet): actual_result = date_trailing_left_spaces_worksheet.get_date_column_index() assert actual_result == 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_date_column_index_no_date(self, no_date_col_name_worksheet):\n\n actual_result = no_date_col_name_worksheet.get_date_column_index()\n assert actual_result == -1", "def test_get_date_column_index_right_trailing_spaces(self, date_trailing_right_spaces_worksheet):\n\n actual_result...
[ "0.75694805", "0.7358514", "0.68965787", "0.66902137", "0.6328059", "0.5860152", "0.5799068", "0.55833864", "0.55761003", "0.5528023", "0.5514959", "0.5509535", "0.54912984", "0.5465113", "0.5438442", "0.5398486", "0.5382389", "0.5346944", "0.53391993", "0.5332686", "0.531077...
0.7268026
2
Test case for get_date_column_index when column name has right trailing spaces with 'Date'.
def test_get_date_column_index_right_trailing_spaces(self, date_trailing_right_spaces_worksheet): actual_result = date_trailing_right_spaces_worksheet.get_date_column_index() assert actual_result == 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_date_column_index_no_date(self, no_date_col_name_worksheet):\n\n actual_result = no_date_col_name_worksheet.get_date_column_index()\n assert actual_result == -1", "def test_get_date_column_index_left_trailing_spaces(self, date_trailing_left_spaces_worksheet):\n\n actual_result =...
[ "0.766277", "0.7309769", "0.70677525", "0.6765125", "0.6446464", "0.59008723", "0.5877868", "0.56655824", "0.5591033", "0.5585865", "0.5554894", "0.55152684", "0.5482945", "0.5455146", "0.5417881", "0.54144686", "0.54094386", "0.5406611", "0.5381959", "0.535449", "0.5326574",...
0.7462475
1