query
stringlengths
9
9.05k
document
stringlengths
10
222k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
4
10
document_rank
stringclasses
2 values
Shows all the equipments from the database
def show_equipments(self): database = Database('data/database.db') equipments = database.read_equipments() view = Template(filename="view/template.html", lookup=lookup) return view.render( rows = [[item.number, item.name, item.installation_number] for item ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def all_equipment(self):\n\t\tself.db = DB()\n\t\tactivity_all = self.db.select_all_from(\"equipment\")\n\t\ttmpl = lookup.get_template(\"equipment.html\")\n\t\treturn (tmpl.render(equipment=activity_all))", "def show_equipment(self, number):\n database = Database('data/database.db')\n equip = data...
[ "0.76633227", "0.6947809", "0.67456573", "0.6615799", "0.6177239", "0.61736935", "0.6138498", "0.60801035", "0.6078603", "0.6067097", "0.60606223", "0.6054881", "0.60485995", "0.59715", "0.59245", "0.5917239", "0.58929026", "0.5869813", "0.5869021", "0.586012", "0.584841", ...
0.82579195
0
Shows all the activities from the database
def show_activities(self): database = Database('data/database.db') activities = database.read_activities() view = Template(filename="view/template.html", lookup=lookup) return view.render( rows = [[item.number, item.name] for item in activities], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def all_activity(self):\n\t\tself.db = DB()\n\t\tactivity_all = self.db.select_all_from(\"activity\")\n\t\ttmpl = lookup.get_template(\"activity.html\")\n\t\treturn (tmpl.render(activity=activity_all))", "def __ui_list_all_activities(self):\n activities_list = self.__activity_service.service_get_list_of_a...
[ "0.7956943", "0.7559513", "0.71567297", "0.6593943", "0.65700984", "0.65081066", "0.64780426", "0.6435594", "0.6362298", "0.62765324", "0.62336224", "0.621595", "0.6190602", "0.61696124", "0.6159179", "0.6159179", "0.6159179", "0.6159179", "0.6157847", "0.6083726", "0.6079967...
0.83865505
0
Shows the installation which has the given number from the database
def show_installation(self, number): database = Database('data/database.db') inst = database.read_installation(number) view = Template(filename="view/template.html", lookup=lookup) try: render = view.render( rows = [[inst.number, inst.name, inst.address, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show_installations(self):\n database = Database('data/database.db')\n installations = database.read_installations()\n view = Template(filename=\"view/template.html\", lookup=lookup)\n \n \n return view.render(\n rows = [[item.number, item.name, item.address, item.z...
[ "0.679254", "0.63224375", "0.5637825", "0.55374575", "0.5517338", "0.54618335", "0.5394725", "0.53656566", "0.53460836", "0.5300642", "0.52793235", "0.5266057", "0.52598614", "0.5193216", "0.5169169", "0.5164407", "0.51391256", "0.51271594", "0.51092535", "0.510022", "0.50842...
0.7730804
0
Shows the equipment which has the given number from the database
def show_equipment(self, number): database = Database('data/database.db') equip = database.read_equipment(number) view = Template(filename="view/template.html", lookup=lookup) try: render = view.render( rows = [[equip.number, equip.name, equip.installation_nu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show_equipments(self): \n database = Database('data/database.db')\n equipments = database.read_equipments()\n view = Template(filename=\"view/template.html\", lookup=lookup)\n \n \n return view.render(\n rows = [[item.number, item.name, item.installation_num...
[ "0.69405115", "0.6025888", "0.5856586", "0.57539564", "0.5740271", "0.56885344", "0.558453", "0.55563587", "0.55362034", "0.5532173", "0.5498387", "0.548142", "0.5451306", "0.53929764", "0.5377283", "0.53668404", "0.5342139", "0.53247577", "0.5303719", "0.5300274", "0.5288869...
0.791672
0
Shows the activity which has the given number from the database
def show_activity(self, number): database = Database('data/database.db') activ = database.read_activity(number) view = Template(filename="view/template.html", lookup=lookup) try: render = view.render( rows = [[activ.number, activ.name]], pageT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show_activities(self): \n database = Database('data/database.db')\n activities = database.read_activities()\n view = Template(filename=\"view/template.html\", lookup=lookup)\n \n \n return view.render(\n rows = [[item.number, item.name] for item in activities]...
[ "0.703598", "0.5651328", "0.56446993", "0.5596035", "0.5421679", "0.54168236", "0.53886724", "0.5314571", "0.53015953", "0.52724856", "0.5244988", "0.52392125", "0.5209759", "0.51946753", "0.51631796", "0.51054376", "0.50989926", "0.50710297", "0.5067204", "0.5057887", "0.500...
0.76558006
0
Shows all the installations, equipments and activities which match the given activity and city
def find_infos(self, activity_name, city): database = Database('data/database.db') infos = database.get_infos(activity_name, city) view = Template(filename="view/template.html", lookup=lookup) try: render = view.render( rows = [[item[0].number, i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_search_result(self, user_input):\n\n conn = sqlite3.connect(self.db_name)\n\n request_field = '%' + user_input[0].strip() + '%'\n request_city = '%' + user_input[1].strip() + '%'\n\n activity_ids = []\n activities_dictionary = {}\n activities_array = self.search_ac...
[ "0.6081876", "0.5634441", "0.56299937", "0.54854494", "0.5451115", "0.54429376", "0.5318897", "0.527957", "0.52620614", "0.5245779", "0.5226336", "0.5164053", "0.5126602", "0.51202446", "0.5117655", "0.51148504", "0.510631", "0.508857", "0.50721574", "0.5069758", "0.5064015",...
0.6213436
0
fill line edit with curve name
def fillCurveLE(self): sel = mn.ls( sl = True, dag = True, ni = True, typ = 'nurbsCurve' ) self.curve_le.setText( sel[0].name )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_to_plot(self, line_name, points):\n points = [x * 100 for x in points]\n plt.plot(points, label=line_name)", "def setCurve(self, index, curve) -> None:\n ...", "def add_curve(self):\n pv_name = self._get_full_pv_name(self.pv_name_line_edt.text())\n color = random_colo...
[ "0.65251184", "0.63600713", "0.6350415", "0.6244321", "0.6214081", "0.6091867", "0.60685146", "0.60510254", "0.5991166", "0.5967503", "0.596386", "0.59406424", "0.5938429", "0.5893543", "0.583466", "0.5831425", "0.5829138", "0.5812785", "0.5776291", "0.5767876", "0.5730263", ...
0.6569289
0
remove selected object from list
def removeObject(self): for SelectedItem in self.objects_lw.selectedItems(): self.objects_lw.takeItem(self.objects_lw.row(SelectedItem) )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove(self):", "def remove():", "def removeObject(self,object):\n self.removeList.append(object)", "def get_non_selected(self):\n\n obj_list = self.get_list()\n\n for sel in self.get_selected():\n obj_list.remove(sel)\n\n return obj_list", "def remove(sel...
[ "0.7310277", "0.70695", "0.70034885", "0.6878407", "0.6866645", "0.6846475", "0.6840973", "0.6840973", "0.6840973", "0.675142", "0.6743878", "0.67410135", "0.67245823", "0.67245823", "0.67107946", "0.67068976", "0.6683341", "0.667483", "0.667084", "0.66617125", "0.66386074", ...
0.80012274
0
create scatter based on UI
def createScatter(self): curv = str( self.curve_le.text() ) objCount = self.controlCount_sbx.value() random = self.random_chb.isChecked() useTip = self.useTips_chb.isChecked() keepConn = self.keepConnected_chb.isChecked() tangent = self.tangent_chb.isChecked() groupIt = self.groupIt_chb.isChecked() anim...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def draw(self):\n duplets = list(self._chunker(self.attr, 2))\n colors = self._set_colors(duplets)\n\n for i, duplet in enumerate(duplets, start=1):\n self.chart.make_scatter(self.source, duplet[0], duplet[1], 'circle', colors[i - 1])\n\n if i < len(duplets):\n ...
[ "0.70726407", "0.67823887", "0.65958464", "0.6529031", "0.6512134", "0.6497885", "0.6460971", "0.64456946", "0.6424747", "0.6404196", "0.64007133", "0.63893604", "0.6388845", "0.6370495", "0.6369845", "0.63139355", "0.6273838", "0.6234437", "0.622965", "0.62135124", "0.617904...
0.76700217
0
Sets the cluster_node_id of this StateSyncNode.
def cluster_node_id(self, cluster_node_id): self._cluster_node_id = cluster_node_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cluster_id(self, cluster_id):\n self._cluster_id = cluster_id", "def set_cluster(self, cluster_id=None):\n cluster = objects.Cluster.get_by_uid(\n cluster_id, fail_if_not_found=False\n )\n if cluster:\n self._cluster = cluster\n self._set_task(self...
[ "0.76118255", "0.68488646", "0.6685833", "0.6680353", "0.665979", "0.64597934", "0.64168763", "0.63185054", "0.62717867", "0.62717867", "0.62717867", "0.62717867", "0.62717867", "0.62717867", "0.6237502", "0.61332864", "0.5897969", "0.5849075", "0.58098924", "0.5744126", "0.5...
0.8481871
0
Sets the api_listen_ip of this StateSyncNode.
def api_listen_ip(self, api_listen_ip): self._api_listen_ip = api_listen_ip
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def async_set_slave_ip(self, slave_ip):\n self._slave_ip = slave_ip", "def set_ip(self, ip: str, host_addr: str) -> None:\n self.config[\"linkIp\"] = ip\n self.config[\"ngapIp\"] = ip\n self.config[\"gtpIp\"] = ip", "def api(self, api):\n if self._running:\n ...
[ "0.5769698", "0.55941546", "0.55758727", "0.5282456", "0.52659065", "0.5219188", "0.5210068", "0.5210068", "0.5200352", "0.49966982", "0.49550515", "0.49326894", "0.492381", "0.48899937", "0.48827827", "0.48702243", "0.4863016", "0.48214495", "0.4695518", "0.46883398", "0.468...
0.8451454
0
Suggest a tweak based on an encoding result. For fixed QP, suggest increasing minq when bitrate is too high, otherwise suggest decreasing it. If a parameter is already at the limit, go to the next one.
def SuggestTweak(self, encoding): if not encoding.result: return None parameters = self._SuggestTweakToName(encoding, 'fixed-q') if not parameters: parameters = self._SuggestTweakToName(encoding, 'gold-q') if not parameters: parameters = self._SuggestTweakToName(encoding, 'key-q') ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _SuggestTweakToName(self, encoding, name):\n parameters = encoding.encoder.parameters\n value = int(parameters.GetValue(name))\n new_value = None\n if encoding.result['bitrate'] > encoding.bitrate:\n delta = 1\n new_value = 63\n candidates = range(value + 1, 64)\n else:\n del...
[ "0.78182817", "0.5859518", "0.5770075", "0.5642969", "0.5607727", "0.5415742", "0.52216774", "0.5206427", "0.51767814", "0.5172263", "0.5101419", "0.505127", "0.5038782", "0.5033367", "0.49953026", "0.49904868", "0.4973912", "0.49698272", "0.49614057", "0.49476328", "0.493733...
0.666621
1
Fetch the points for a given fish body
def _fish_body_points(cls, fish_num): # y coordinate is from top of FISH_HEIGHT for a given fish, to bottom of FISH_HEIGHT for a given FISH left_oval_side = FishTileView.SIZE_MULTIPLIER, \ (fish_num * cls.FISH_HEIGHT) + (cls.FISH_HEIGHT / FishTile.MAX_AMOUNT_FISH) right...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_body_part(self, body_points, segmentation_image):\n print(\"start the measuring....\")\n body_parts = {}\n shoulders = self.find_shoulders_point(body_points, segmentation_image)\n abdomen = self.find_abdomen_point(body_points)\n chest = self.find_chest_point(body_points)...
[ "0.6347192", "0.57089156", "0.5574567", "0.5518729", "0.54645497", "0.5356999", "0.5321854", "0.5314515", "0.53112376", "0.530583", "0.52986497", "0.52113086", "0.5188562", "0.51864165", "0.5180519", "0.51597506", "0.5130005", "0.5108989", "0.5103025", "0.50794214", "0.506578...
0.64592373
0
Extracts triples using Stanford CoreNLP OpenIE library via CoreNLPConnector in Java REST API
def openie(text: str) -> List[Tuple[str, str, str]]: client = env.resolve('servers.java') verbose.info('Extracting triples using OpenIE at: ' + client['address'], caller=openie) return requests.get('%s/openie/triples' % client['address'], params={'text': text}).json()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extract_triplets(self) -> Iterable[dict]:\n stg_corpus = [txt.strip()+\".\" if txt.strip()[-1]!=\".\" else txt.strip() for txt in self.__corpus__]\n stg_corpus = ' '.join(self.__corpus__)\n\n with StanfordOpenIE() as client:\n triples_corpus = client.annotate(stg_corpus)\n\n ...
[ "0.61961323", "0.6138691", "0.55915344", "0.55132866", "0.540919", "0.5384903", "0.5370869", "0.5334106", "0.5277659", "0.5261717", "0.5182233", "0.51706254", "0.5137889", "0.50874555", "0.50837165", "0.50661874", "0.5056941", "0.50455534", "0.4996862", "0.4972436", "0.496881...
0.6626662
0
readPDF opens pdf as array to be hundled by opevCV. {{{ When the pdf file has multiple pages, automatically pick first page.
def readPDF(infile, width, grayscale=True): #To open a pdf file. imgAllPages = convert_from_path(infile, dpi=100) img = imgAllPages[0] #pick first page up img = np.asarray(img) img = img.take([1,2,0], axis=2) #change color ch. (GBR -> RGB) #To scale image to designated width. if img...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_pdf(exp_type='c'):\n # shape file path\n file_name = pdffile_exptype[exp_type]\n file_path_name = os.path.join('data', 'pdf', file_name)\n pdf_file = resource_filename(__name__, file_path_name)\n\n return h5py.File(pdf_file, 'r')", "def parse_pdf(url):\n pdf_data = urllib2.urlopen(Requ...
[ "0.6721945", "0.6396926", "0.63947225", "0.62901264", "0.6155976", "0.6124074", "0.61084336", "0.608346", "0.59989536", "0.5985878", "0.5940284", "0.59238076", "0.5911455", "0.58851826", "0.58835346", "0.5843061", "0.58381116", "0.5762712", "0.5747169", "0.5674462", "0.565503...
0.6609024
1
correctMisalign corrects misalignment/misscale of a image {{{ by using two markers on the image.
def correctMisalign(img, marker, center, compus, scope=100): markerCenter = np.asarray(marker.shape)//2 guide = np.asarray([center, compus]) landmark = np.zeros(guide.shape) #To run template matching to finder markers result = cv2.matchTemplate(img, marker, 0) result = (1-result/np.max(res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def align_preprocessed(self, img):\n aligner = FaceAligner(self.args.wing_path, self.args.lm_path, self.args.img_size)\n return aligner.align(img)", "def resetAlignmentCenter(self):\n cent = self.TiltSeries_._TiltAlignmentParas.cent\n imdimX = self.TiltSeries_._imdimX\n imdimY ...
[ "0.5492849", "0.5472743", "0.5366377", "0.53595704", "0.53412116", "0.53201115", "0.5234939", "0.5230496", "0.519625", "0.5172563", "0.51371306", "0.5108179", "0.5102144", "0.50905186", "0.5074283", "0.50719476", "0.5055099", "0.49876216", "0.4970037", "0.49581602", "0.495739...
0.63359916
0
tv_loss. Deprecated. Please use tensorflow total_variation loss implementation.
def tv_loss(x, name='tv_loss'): raise NotImplementedError("Please use tensorflow total_variation loss.")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tv_loss(input: th.Tensor):\n input = tf.pad(input, (0, 1, 0, 1), \"replicate\")\n x_diff = input[..., :-1, 1:] - input[..., :-1, :-1]\n y_diff = input[..., 1:, :-1] - input[..., :-1, :-1]\n return (x_diff ** 2 + y_diff ** 2).mean([1, 2, 3])", "def tv_loss(img, tv_weight):\n # Your implementati...
[ "0.71811527", "0.7058403", "0.63139117", "0.62708676", "0.6116712", "0.60516834", "0.6036121", "0.5978986", "0.5977184", "0.59507954", "0.5913045", "0.591241", "0.58793354", "0.5870999", "0.5853943", "0.580963", "0.5757218", "0.5752254", "0.5751082", "0.57493937", "0.5742276"...
0.8830987
0
Runs loadData from LoadDataModel. Runs also previewData from this class. Shows error warning in GUI if data load does not work.
def loadPreviewData(self): # parameters for data load from GUI self.loadDataModel.pathToDataSet = self.entryPath.get() self.loadDataModel.firstRowIsTitle = bool(self.checkVarRow.get()) self.loadDataModel.firstColIsRowNbr = bool(self.checkVarCol.get()) # if entry field is empty, s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def loadPreviewDataforClassification(self):\n # parameters for data load from GUI\n self.loadDataModel.pathToDataSet = self.entryPath.get()\n self.loadDataModel.firstRowIsTitle = bool(self.checkVarRow.get())\n self.loadDataModel.firstColIsRowNbr = bool(self.checkVarCol.get())\n #...
[ "0.7363575", "0.6815484", "0.6728596", "0.65464854", "0.64301383", "0.6418219", "0.6348947", "0.6315146", "0.62988985", "0.6275391", "0.6239956", "0.616186", "0.6159784", "0.61524343", "0.6125845", "0.6116381", "0.6072893", "0.6040148", "0.603637", "0.6027977", "0.5955419", ...
0.7560283
0
Runs loadData from LoadDataModel. Runs also previewData from this class. Shows error warning in GUI if data load does not work.
def loadPreviewDataforClassification(self): # parameters for data load from GUI self.loadDataModel.pathToDataSet = self.entryPath.get() self.loadDataModel.firstRowIsTitle = bool(self.checkVarRow.get()) self.loadDataModel.firstColIsRowNbr = bool(self.checkVarCol.get()) # if entry ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def loadPreviewData(self):\n # parameters for data load from GUI\n self.loadDataModel.pathToDataSet = self.entryPath.get()\n self.loadDataModel.firstRowIsTitle = bool(self.checkVarRow.get())\n self.loadDataModel.firstColIsRowNbr = bool(self.checkVarCol.get())\n # if entry field i...
[ "0.75603956", "0.68159103", "0.6730189", "0.6547364", "0.6430838", "0.64175487", "0.63499826", "0.6315992", "0.6298599", "0.6275572", "0.62402666", "0.61616594", "0.61607134", "0.61529624", "0.61271083", "0.61156225", "0.60730803", "0.60393345", "0.60365355", "0.6028048", "0....
0.7363604
1
Set initials and try to set django user before saving
def save(self, *args, **kwargs): self._set_first_initial() self._set_user() super(AbstractHuman, self).save(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_user(self):\n\n if '' in (self.last_name, self.first_name):\n return\n\n self._set_first_initial()\n\n User = get_user_model()\n try:\n self.user = User.objects.get(\n models.Q(last_name__iexact=self.last_name),\n models.Q(fir...
[ "0.7399037", "0.6818464", "0.67360806", "0.6703886", "0.6615366", "0.65040535", "0.64916104", "0.6349639", "0.6300928", "0.6296971", "0.6286593", "0.6262981", "0.62472683", "0.62465847", "0.6244291", "0.62277496", "0.6220768", "0.62102824", "0.62016064", "0.61989367", "0.6194...
0.7171682
1
Get this entry first author
def _get_first_author(self): if not len(self.get_authors()): return '' return self.get_authors()[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_author(self):\n return self.author", "def get_author(self):\n return self.author", "def author(self):\n return self._data.get('author', None)", "def author(self):\n return self._author", "def author(self):\n return self._author", "def author(self):\n retu...
[ "0.8229262", "0.8229262", "0.8032657", "0.7940489", "0.7940489", "0.7940489", "0.78599817", "0.7840174", "0.7684184", "0.7680722", "0.7656797", "0.7656797", "0.75249034", "0.7519448", "0.748793", "0.7446496", "0.73990786", "0.7372625", "0.7222093", "0.7180607", "0.7167988", ...
0.88237596
0
Get this entry last author
def _get_last_author(self): if not len(self.get_authors()): return '' return self.get_authors()[-1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_author(self):\n return self.author", "def get_author(self):\n return self.author", "def author(self):\n return self._author", "def author(self):\n return self._author", "def author(self):\n return self._author", "def _get_first_author(self):\n if not len(...
[ "0.77854884", "0.77854884", "0.76113564", "0.76113564", "0.76113564", "0.7610408", "0.75873405", "0.7484349", "0.7426977", "0.73916334", "0.73916334", "0.73881865", "0.72666234", "0.7250214", "0.7246593", "0.71829695", "0.7149919", "0.70887244", "0.70449716", "0.7027704", "0....
0.876842
0
Get ordered authors list Note that authorentryrank_set is ordered as expected while the authors queryset is not (M2M with a through case).
def get_authors(self): return [aer.author for aer in self.authorentryrank_set.all()]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def author_articles(self):\n return ArticlePage.objects.live().filter(author=self).order_by('-date')", "def authors(self):\n authors = [\n n.people for n in self.pymbake_person_relationship.all()\n ]\n\n return authors", "def authors(self):\n user_ids = set(r.autho...
[ "0.67668843", "0.67430836", "0.6685066", "0.6684926", "0.6559511", "0.65458703", "0.65159404", "0.64794177", "0.64563096", "0.64382637", "0.63679224", "0.63222766", "0.6306415", "0.63006264", "0.6292419", "0.6286021", "0.6283298", "0.6283292", "0.6231312", "0.62176764", "0.62...
0.8204957
0
This method determines the highest http a server can support. This is done over http or https, depending on the parameter. HTTP2 is checked but never used to exchange messages.
def get_highest_http(uri, https, upgrade=True): highest_http = '1.0' response_status = "" redirect = False location = "" port = 443 if https else 80 use_https = https use_upgrade = upgrade host, path = get_host(uri) i_p = check_host_name(host) request_line = "GET "+ path +" HTTP/...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_http_protocol(self):\n if self.cfg.ssl:\n return \"https\"\n else:\n return \"http\"", "def get_protocol():\n if https():\n protocol = 'https'\n else:\n protocol = 'http'\n return protocol", "def supports_http_1_1():", "def get_protocol(self)...
[ "0.6752688", "0.6329223", "0.62902206", "0.6241211", "0.6171372", "0.6168764", "0.61381495", "0.5726957", "0.5725487", "0.57185143", "0.5554565", "0.5525395", "0.55057085", "0.5468806", "0.5437173", "0.543616", "0.5421312", "0.5418585", "0.5397975", "0.5352422", "0.5352422", ...
0.69072604
0
Passes CL args to smart_client()
def main(): parser = argparse.ArgumentParser() parser.add_argument("URI") args = parser.parse_args() smart_client(args.URI)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n super(BaseCLIClient, self).__init__()\n self.client_type = \"cli\"\n self.set_content_type('raw')\n self.set_accept_type('raw')\n self.execution_type = \"sync\"", "def client():", "def __init__(self, args):\n ClientPlugin.__init__(self)\n ...
[ "0.58076566", "0.5776437", "0.56957334", "0.5592278", "0.5579138", "0.55543005", "0.5536592", "0.55259174", "0.55259174", "0.55040467", "0.55021024", "0.549863", "0.5486501", "0.5452488", "0.5451785", "0.54476345", "0.54291", "0.53953785", "0.53953785", "0.53887117", "0.53653...
0.6573514
0
Set names using a semicolon (;) seperated string or a list of strings
def SetNames(self, names): # parse the names (a semicolon seperated list of names) if isinstance(names, str): names = names.split(';') if self.__names != names: self.__names = names self.Modified()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def names(self, names):\n\n self._names = names", "def setName(self,value):\n assert value == None or type(value) == str, repr(value)+' is not a valid name'\n self._name = value", "def setnames(self, *args, **kwargs):\n return _coordsys.coordsys_setnames(self, *args, **kwargs)", "...
[ "0.58341724", "0.5792466", "0.57665694", "0.57385945", "0.57164675", "0.5659365", "0.56351304", "0.5599404", "0.5597629", "0.55682", "0.55471784", "0.5483656", "0.53453225", "0.5342401", "0.53067094", "0.52203083", "0.5213452", "0.5210753", "0.52076817", "0.52076817", "0.5205...
0.74215704
0
Set the number of columns for the output ``vtkTable``
def SetNumberOfColumns(self, ncols): if isinstance(ncols, float): ncols = int(ncols) if self.__ncols != ncols: self.__ncols = ncols self.Modified()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setNumColumns(self, num):\n ExportDialog.numColumns = num", "def setNumCols(serDisplay, cols):\n cmd = array.array('B', (124,0))\n if (cols == 20):\n cmd[1] = 3\n else:\n if (cols != 16):\n print(\"WARNING: num columns of %d not valid - must be 16 or 20. Defaulting t...
[ "0.7280288", "0.6517732", "0.634845", "0.62785757", "0.6208003", "0.61394155", "0.61232775", "0.61086184", "0.6093149", "0.60815024", "0.6042228", "0.59893984", "0.597266", "0.5961764", "0.5887591", "0.58124113", "0.5785969", "0.5768652", "0.57523006", "0.5723587", "0.5680898...
0.6582668
1
Test case for networking_project_network_create
def test_networking_project_network_create(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_03_network_create(self):\n # Validate the following\n # 1. Create a project.\n # 2. Add virtual/direct network resource to the project. User shared\n # network resource for the project\n # 3. Verify any number of Project level Virtual/Direct networks can be\n #...
[ "0.88057435", "0.83907145", "0.8311333", "0.82338715", "0.8144531", "0.8073008", "0.766816", "0.7591707", "0.75781333", "0.75702184", "0.7456846", "0.7370858", "0.7303496", "0.72163486", "0.71597195", "0.7158633", "0.71257806", "0.7089581", "0.69936407", "0.69620895", "0.6961...
0.95674586
0
Test case for networking_project_network_delete
def test_networking_project_network_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_network(self):\n pass", "def test_networking_project_network_tag_delete(self):\n pass", "def test_delete__network(self):\n arglist = [\n '--network',\n self.projects[0].id,\n ]\n verifylist = [\n ('service', 'network'),\n ...
[ "0.8734149", "0.84788615", "0.8282214", "0.7911755", "0.74620235", "0.74408305", "0.7362307", "0.7338039", "0.72818667", "0.7161988", "0.7161988", "0.71514744", "0.7089159", "0.7023079", "0.70029515", "0.6991699", "0.6976583", "0.68999213", "0.687359", "0.6855459", "0.6838732...
0.9514106
0
Test case for networking_project_network_event_get
def test_networking_project_network_event_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_networking_project_network_event_list(self):\n pass", "def test_networking_project_network_get(self):\n pass", "def test_networking_project_network_service_get(self):\n pass", "def test_get_network(self):\n pass", "def test_networking_project_network_tag_get(self):\n ...
[ "0.82577205", "0.79113317", "0.76856494", "0.7209927", "0.7185073", "0.6887082", "0.66650337", "0.66104114", "0.6588003", "0.6416295", "0.64085007", "0.6167186", "0.60606116", "0.595175", "0.59372723", "0.58573383", "0.5803691", "0.57594985", "0.5739596", "0.56881183", "0.563...
0.9450455
0
Test case for networking_project_network_event_list
def test_networking_project_network_event_list(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_networking_project_network_event_get(self):\n pass", "def test_networking_project_network_list(self):\n pass", "def test_networking_project_network_service_list(self):\n pass", "def test_networking_project_network_tag_list(self):\n pass", "def test_networking_project_ne...
[ "0.8299006", "0.81361306", "0.7848326", "0.76107645", "0.70611805", "0.68074656", "0.67305243", "0.6706901", "0.64687085", "0.6259645", "0.62270015", "0.6207792", "0.619327", "0.6122696", "0.6068232", "0.6055929", "0.60044557", "0.6001083", "0.59810936", "0.5941543", "0.59415...
0.95086074
0
Test case for networking_project_network_get
def test_networking_project_network_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_networking_project_network_service_get(self):\n pass", "def test_get_network(self):\n pass", "def test_networking_project_network_list(self):\n pass", "def test_networking_project_network_create(self):\n pass", "def test_networking_project_network_event_get(self):\n ...
[ "0.8632432", "0.8508769", "0.8449543", "0.80295455", "0.79398155", "0.78251946", "0.7792246", "0.7602196", "0.7560636", "0.7488109", "0.7394283", "0.71187145", "0.7039374", "0.70385844", "0.70047534", "0.68530726", "0.6823287", "0.681199", "0.6767339", "0.67336947", "0.653972...
0.9436339
0
Test case for networking_project_network_list
def test_networking_project_network_list(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_networking_project_network_service_list(self):\n pass", "def test_networking_project_network_get(self):\n pass", "def test_networking_project_network_event_list(self):\n pass", "def test_networking_project_network_tag_list(self):\n pass", "def test_networking_project_ne...
[ "0.8585402", "0.8372369", "0.82831913", "0.8275119", "0.7899982", "0.76960224", "0.755038", "0.74486506", "0.7311336", "0.7203733", "0.7135034", "0.708045", "0.70350575", "0.70243955", "0.6986017", "0.69722104", "0.6854558", "0.6749359", "0.67465365", "0.6731198", "0.67179805...
0.94664603
0
Test case for networking_project_network_service_get
def test_networking_project_network_service_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_networking_project_network_get(self):\n pass", "def test_networking_project_network_service_list(self):\n pass", "def test_networking_project_network_event_get(self):\n pass", "def test_get_network(self):\n pass", "def test_networking_project_network_list(self):\n ...
[ "0.8669004", "0.83204156", "0.77490056", "0.76448596", "0.7637649", "0.7419113", "0.7296355", "0.72419596", "0.69356287", "0.68189347", "0.672783", "0.65830845", "0.6519098", "0.651618", "0.6364173", "0.6340621", "0.62232184", "0.62168264", "0.6199433", "0.6182356", "0.616484...
0.9413343
0
Test case for networking_project_network_service_list
def test_networking_project_network_service_list(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_networking_project_network_list(self):\n pass", "def test_networking_project_network_service_get(self):\n pass", "def test_networking_project_network_event_list(self):\n pass", "def test_networking_project_network_tag_list(self):\n pass", "def test_networking_project_ne...
[ "0.8442342", "0.8200452", "0.79131794", "0.765145", "0.7384875", "0.7134209", "0.68193364", "0.67868644", "0.6717133", "0.6681138", "0.6677454", "0.65660775", "0.6522769", "0.64892286", "0.64892286", "0.6452811", "0.6409245", "0.6376114", "0.6276882", "0.62717396", "0.6192692...
0.94697046
0
Test case for networking_project_network_tag_create
def test_networking_project_network_tag_create(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_networking_project_network_tag_put(self):\n pass", "def test_networking_project_network_tag_get(self):\n pass", "def test_networking_project_network_create(self):\n pass", "def test_networking_project_network_tag_list(self):\n pass", "def test_networking_project_network...
[ "0.8415681", "0.8278862", "0.827278", "0.8097047", "0.7693032", "0.71981835", "0.716799", "0.7052762", "0.7006196", "0.68853045", "0.6870068", "0.677154", "0.6724007", "0.65254825", "0.6511818", "0.6463387", "0.6381934", "0.6359911", "0.63259894", "0.6287146", "0.62654346", ...
0.95820755
0
Test case for networking_project_network_tag_delete
def test_networking_project_network_tag_delete(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_networking_project_network_delete(self):\n pass", "def test_delete_network(self):\n pass", "def test_networking_project_network_tag_create(self):\n pass", "def test_delete__network(self):\n arglist = [\n '--network',\n self.projects[0].id,\n ]...
[ "0.85864913", "0.79074013", "0.73118925", "0.72815436", "0.726035", "0.70726025", "0.7015217", "0.69911855", "0.6827487", "0.6809548", "0.6754534", "0.6743542", "0.67119163", "0.66424894", "0.66424894", "0.65924495", "0.65480644", "0.6546871", "0.65056103", "0.645967", "0.639...
0.9531553
0
Test case for networking_project_network_tag_get
def test_networking_project_network_tag_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_networking_project_network_tag_list(self):\n pass", "def test_networking_project_network_tag_create(self):\n pass", "def test_networking_project_network_get(self):\n pass", "def test_networking_project_network_tag_put(self):\n pass", "def test_networking_project_network...
[ "0.81374985", "0.7996989", "0.7775014", "0.7694906", "0.7312093", "0.71594137", "0.7070286", "0.69871694", "0.68383783", "0.67855865", "0.6660819", "0.64519733", "0.62692016", "0.6119776", "0.60387516", "0.59296036", "0.59206605", "0.5916272", "0.59021133", "0.5760429", "0.55...
0.9510173
0
Test case for networking_project_network_tag_list
def test_networking_project_network_tag_list(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_networking_project_network_tag_get(self):\n pass", "def test_networking_project_network_list(self):\n pass", "def test_networking_project_network_tag_create(self):\n pass", "def test_networking_project_network_service_list(self):\n pass", "def test_networking_project_ne...
[ "0.8407284", "0.82673967", "0.8170092", "0.7694319", "0.7642346", "0.7619595", "0.73755604", "0.7235602", "0.7030399", "0.6982695", "0.6671765", "0.66642684", "0.65270686", "0.64974034", "0.6470683", "0.64488524", "0.6414432", "0.6403719", "0.6192123", "0.611372", "0.6030102"...
0.94968116
0
Test case for networking_project_network_tag_put
def test_networking_project_network_tag_put(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_networking_project_network_tag_create(self):\n pass", "def test_networking_project_network_tag_get(self):\n pass", "def test_networking_project_network_tag_delete(self):\n pass", "def test_networking_project_network_tag_list(self):\n pass", "def test_aws_service_api_vm_...
[ "0.8162548", "0.7632924", "0.7529343", "0.73087597", "0.69838846", "0.67863727", "0.67096", "0.6460837", "0.62958515", "0.6271951", "0.6260058", "0.6142768", "0.6081592", "0.60224813", "0.6007177", "0.59064764", "0.5894923", "0.58403486", "0.5809004", "0.5711", "0.5707141", ...
0.9519759
0
Test case for networking_project_network_update
def test_networking_project_network_update(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_networking_project_network_get(self):\n pass", "def test_networking_project_network_create(self):\n pass", "def test_networking_project_network_list(self):\n pass", "def test_networking_project_network_tag_put(self):\n pass", "def test_networking_project_network_delete(...
[ "0.76064444", "0.74541", "0.7369837", "0.69817394", "0.6963334", "0.6901382", "0.69006497", "0.682339", "0.6764553", "0.67619634", "0.6689635", "0.6650327", "0.658505", "0.658505", "0.65725785", "0.65587854", "0.651825", "0.6489945", "0.6476724", "0.6430147", "0.6420457", "...
0.94251615
0
Validate that required_cols are in self.frame
def validate(self): super().validate() frame = getattr(self, 'frame', None) if frame is None: raise ValueError('Missing columns %s since no frame' % ', '.join( self.required_cols)) cols = set(list(self.frame)) missing = sorted(self.required_cols - cols...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cols_valid(self,\n df: pd.DataFrame,\n req_cols: set) -> bool:\n missing_cols = req_cols.difference(df.columns)\n\n if len(missing_cols) > 0:\n logging.error(f\"{missing_cols} columns required but missing\")\n return False\n\n return Tru...
[ "0.7897676", "0.7564741", "0.7366434", "0.7349003", "0.7240517", "0.7036314", "0.70306194", "0.69790363", "0.68797225", "0.6794021", "0.66460437", "0.6629376", "0.66237783", "0.65535456", "0.65107137", "0.6479833", "0.64632124", "0.646052", "0.6442498", "0.64324087", "0.64135...
0.8550042
0
read calibration file returns > dict calibration matrices as 44 numpy arrays
def read_calib_file(filename): calib = {} """calib1 = np.eye(4,4) calib1[0:3, 3] = [0.27, 0.0, -0.08] print(calib1) calib.append(calib1) calib2 = np.eye(4,4) calib2[0:3, 3] = [0.27, -0.51, -0.08] print(calib2) calib.append(calib2) calib3 = np.eye(4,4) calib3[0:3, 3] = [0.27...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_calib_file(self, filepath):\n data = {}\n with open(filepath, 'r') as f:\n for line in f.readlines():\n values = line.split()\n # The only non-float values in these files are dates, which\n # we don't care about anyway\n ...
[ "0.72249043", "0.7208568", "0.7208568", "0.70669484", "0.70456314", "0.7041981", "0.69114566", "0.68411756", "0.6807544", "0.6807203", "0.6558858", "0.6471239", "0.6442276", "0.63747907", "0.6323744", "0.62730527", "0.61834854", "0.61613894", "0.61245453", "0.6097307", "0.607...
0.792746
0
Parse the model description string to a keras model builder.
def _parse_model(model: str, num_classes: int) -> Callable[[], tf.keras.Model]: if model == 'cnn': keras_model_builder = functools.partial( create_conv_dropout_model, num_classes=num_classes) elif model in ['resnet18', 'resnet34', 'resnet50', 'resnet101', 'resnet152']: keras_model_builder = functool...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_model_description(model_description: str) -> ModelDescription:\n root = ET.fromstring(model_description)\n\n defaults = _get_attribute_default_values()\n\n # mandatory p.32\n fmi_version = root.get(\"fmiVersion\")\n model_name = root.get(\"modelName\")\n guid = root.get(\"guid\")\n #...
[ "0.6326366", "0.6091344", "0.5876037", "0.56606436", "0.5658026", "0.5654233", "0.562259", "0.5619373", "0.56061447", "0.55622476", "0.55564666", "0.5539365", "0.55305934", "0.5526856", "0.5487436", "0.5468888", "0.5461886", "0.5455671", "0.54494077", "0.54338133", "0.5423484...
0.6771992
0
Load (unsplitted) EMNIST(like) clientdata from sql database.
def load_custom_emnist_client_data(sql_database: str) -> ClientData: if sql_database is None: raise ValueError('sql_database cannot be None.') return sql_client_data_utils.load_parsed_sql_client_data( sql_database, element_spec=_ELEMENT_SPEC)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_custom_cifar_client_data(sql_database: str) -> ClientData:\n\n if sql_database is None:\n raise ValueError('sql_database cannot be None.')\n\n return sql_client_data_utils.load_parsed_sql_client_data(\n sql_database, element_spec=_ELEMENT_SPEC)", "def load_data(client):\n codes = [\"DUB\", ...
[ "0.62082094", "0.60316384", "0.5761554", "0.57444966", "0.5691772", "0.5639299", "0.5636918", "0.5616825", "0.5611436", "0.5602569", "0.55277586", "0.5519456", "0.5478773", "0.543038", "0.5419184", "0.54132307", "0.5410894", "0.5410576", "0.5405717", "0.5401371", "0.5387977",...
0.702729
0
Create a preprocessing function for EMNIST client datasets.
def _create_preprocess_fn( num_epochs: int, batch_size: int, merge_case: bool, shuffle_buffer_size: int = emnist_dataset.MAX_CLIENT_DATASET_SIZE, use_cache: bool = True, use_prefetch: bool = True, ) -> Callable[[tf.data.Dataset], tf.data.Dataset]: @tf.function def merge_mapping(elem): or...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_preprocess_fn(**preprocessing_kwargs):\n\n def _preprocess_fn(data):\n \"\"\"The preprocessing function that is returned.\"\"\"\n\n # Validate input\n if not isinstance(data, dict) or 'image' not in data:\n raise ValueError('Argument `data` must be a dictionary, '\n 'no...
[ "0.6911369", "0.6907225", "0.67146105", "0.64246845", "0.63995093", "0.638671", "0.63772017", "0.63574916", "0.62886465", "0.6257666", "0.62195", "0.60264665", "0.60262877", "0.60111964", "0.60054433", "0.5993835", "0.59816", "0.59801525", "0.59755504", "0.5967095", "0.596003...
0.7066413
0
Configuring federated runner spec.
def build_federated_runner_spec(self) -> training_specs.RunnerSpecFederated: task_spec = self._task_spec train_preprocess_fn = _create_preprocess_fn( num_epochs=task_spec.client_epochs_per_round, batch_size=task_spec.client_batch_size, merge_case=self._merge_case, use_cache=Tru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_federated_runner_spec(self) -> training_specs.RunnerSpecFederated:\n task_spec = self._task_spec\n\n train_preprocess_fn = _create_preprocess_fn(\n num_epochs=task_spec.client_epochs_per_round,\n batch_size=task_spec.client_batch_size,\n use_cache=True,\n use_prefetch=Tr...
[ "0.66514647", "0.65894425", "0.60085166", "0.59400094", "0.5837415", "0.5833026", "0.5818086", "0.57228833", "0.57128286", "0.56866115", "0.56454456", "0.56344074", "0.5603153", "0.5552686", "0.5537055", "0.55300355", "0.55255353", "0.5486335", "0.5477406", "0.5473784", "0.54...
0.66257405
1
Configures federated training for the EMNIST character recognition task. This method will load and preprocess datasets and construct a model used for the task. It then uses `iterative_process_builder` to create an iterative process compatible with `tff.simulation.run_training_process`.
def configure_training_federated( task_spec: training_specs.TaskSpecFederated, *, # Caller passes below args by name. model: str = 'resnet18', only_digits: bool = False, merge_case: bool = False, ) -> training_specs.RunnerSpecFederated: return _EmnistCharacterTask( task_spec, model=mo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _train_model(\n self,\n dataset: DatasetEntity,\n ):\n logger.info(\"init data cfg.\")\n self._data_cfg = ConfigDict(data=ConfigDict())\n\n for cfg_key, subset in zip(\n [\"train\", \"val\", \"unlabeled\"],\n [Subset.TRAINING, Subset.VALIDATION, Subse...
[ "0.61181545", "0.6045724", "0.6024364", "0.6009437", "0.5953014", "0.59526104", "0.5929882", "0.5899533", "0.58728266", "0.58654255", "0.57695735", "0.5762787", "0.5755617", "0.5746565", "0.5687636", "0.5658742", "0.5657223", "0.56548303", "0.56238604", "0.56198394", "0.56055...
0.61471665
0
Configures centralized training for the EMNIST character recognition task.
def configure_training_centralized( task_spec: training_specs.TaskSpecCentralized, *, # Caller passes below args by name. model: str = 'resnet18', only_digits: bool = False, merge_case: bool = False, ) -> training_specs.RunnerSpecCentralized: return _EmnistCharacterTask( task_spec, mo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_training_parameters(\n self,\n config: ConfigDict,\n len_train: int,\n len_test: int,\n ):\n self.configure_steps(config, len_train, len_test)\n self.configure_reporting(config)\n self.configure_training_functions(config)", "def train_start(self):\n ...
[ "0.63909596", "0.6319854", "0.6294421", "0.62634546", "0.62572944", "0.62403774", "0.6204174", "0.6202169", "0.620016", "0.6191305", "0.6153793", "0.6125302", "0.6112304", "0.61037904", "0.6086183", "0.60679245", "0.6048397", "0.60145044", "0.6010601", "0.5994686", "0.5976073...
0.65846765
0
Fit model that predicts return of credit
def fit_model(): global _HOME_OWNERSHIP _HOME_OWNERSHIP = {x: i for i, x in enumerate(["rent", "own", "mortgage", "other"])} df = pd.read_csv(os.path.join(settings.BASE_DIR, "LoanStats3a.csv"), skiprows=1).head(5000) df = df[df.apply(is_poor_coverage, axis=1)] df['year_issued'] = df.issue_d.apply(la...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fit(self, X):", "def predict():\n model = LinearRegression().fit(input_data[['x']], input_data['y'])\n future_vals = [[20], [21], [22]]\n return None", "def fit(self, X_raw, y_made_claim, y_claims_amount):\n\n # YOUR CODE HERE\n\n # Remember to include a line similar to the one below...
[ "0.6555756", "0.6489909", "0.64893115", "0.6393043", "0.6281668", "0.6277158", "0.62597495", "0.6257928", "0.62528986", "0.6236069", "0.62204945", "0.6190761", "0.6151779", "0.6123758", "0.61215025", "0.61070174", "0.60761875", "0.60761875", "0.60761875", "0.6063148", "0.6063...
0.66583115
0
Random rhythm and notes based on time
def randMelody(self, value, chord): self.randRhythm() self.randNotes(value, chord)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def randNotes(self, value, chord):\n aChord = mgChord(value, chord)\n self.data = []\n for i in range(len(self.rhythm)):\n note = random.choice(aChord).copy()\n note.setDuration(self.rhythm[i])\n self.data.append(note)", "def create_melody(inst, chord_progres...
[ "0.70728934", "0.6706153", "0.6540487", "0.6391081", "0.6068149", "0.60672534", "0.60280246", "0.60105956", "0.59780055", "0.5953066", "0.59486765", "0.5922868", "0.57505494", "0.5716557", "0.5710636", "0.57026637", "0.5684732", "0.56817174", "0.5633969", "0.5596766", "0.5560...
0.72257495
0
Generate random rhythm, based on chord It must have rhythm before
def randNotes(self, value, chord): aChord = mgChord(value, chord) self.data = [] for i in range(len(self.rhythm)): note = random.choice(aChord).copy() note.setDuration(self.rhythm[i]) self.data.append(note)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def randMelody(self, value, chord):\n self.randRhythm()\n self.randNotes(value, chord)", "def get_rdm_note(chord, last_note):\r\n \r\n if random.randint(1,10) <= 6:\r\n # chord note\r\n return random.choice(CHORDS[chord]) \r\n else:\r\n # scale note \r\n n ...
[ "0.7600951", "0.6710161", "0.6659425", "0.6366649", "0.6244833", "0.59357905", "0.59273636", "0.5922246", "0.58458304", "0.5795843", "0.5778329", "0.5752907", "0.57455", "0.5733294", "0.5724642", "0.57119113", "0.57089704", "0.5679657", "0.5665693", "0.5636343", "0.55583066",...
0.70778203
1
Get the duration remain, within this bar list, values of rhythm int
def durationRemain(self, l=None): if l is None: l = self.rhythm full = float(self.time.upper)/self.time.lower s = 0 for i in range(len(l)): s += 1.0 / l[i] return full - s
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getDuration(self):\n return (self._get_int('duration'), self._attributes.getDivisions())", "def get_dur(self):\n return [char.get_dur() for char in self.string]", "def duration(self):\r\n return self.t2 - self.t1", "def duration(self) -> float:\n return self.delta_t * len(self)", ...
[ "0.65641594", "0.65380937", "0.6458796", "0.64535576", "0.64535576", "0.6451906", "0.6380517", "0.6314581", "0.62721646", "0.625763", "0.6241156", "0.6210288", "0.6162527", "0.61441207", "0.6135919", "0.6135919", "0.6128094", "0.61246526", "0.6111688", "0.6027541", "0.6024031...
0.6915621
0
Compute MD5 hash of the data_path (dir or file) for data versioning.
def hash_data(data_path: Union[str, Path], chunk_size: int = 65536) -> str: if Path(data_path).is_dir(): hash = _hash_dir(data_path, chunk_size) elif Path(data_path).is_file(): hash = _hash_file(data_path, chunk_size) else: raise ValueError(f"{data_path} is neither directory nor file...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def python_repo_hash_md5(root_dir: str, *, verbose: bool = False):\n m = hashlib.md5()\n for e in _collect_entries(root_dir, '.'):\n if verbose:\n log_info('Processing e', e)\n m.update(\n f\"path={e['path']}\\tisdir={e['isdir']}\\tsize={e['size']}\\tmode={e['mode']:03o}\\...
[ "0.6850441", "0.6710063", "0.6619043", "0.654432", "0.6535877", "0.6533921", "0.644331", "0.6342902", "0.6323048", "0.6295428", "0.6286576", "0.62413317", "0.6216765", "0.6169943", "0.61495596", "0.6140576", "0.61181694", "0.6096366", "0.60879916", "0.6078742", "0.60649794", ...
0.6991578
0
Returns a normalized complex data. If the data is a numpy data with complex, returns the absolute value. Else returns the input data.
def _normalizeComplex(data): if hasattr(data, "dtype"): isComplex = numpy.issubdtype(data.dtype, numpy.complexfloating) else: isComplex = isinstance(data, numbers.Complex) if isComplex: data = numpy.absolute(data) return data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def complex_abs(data):\n assert data.size(-1) == 2\n return (data ** 2).sum(dim=-1).sqrt()", "def complex_abs(data):\n assert data.size(-1) == 2\n return (data ** 2).sum(dim=-1).sqrt()", "def complex_abs(data):\n assert data.size(-1) == 2\n return (data ** 2).sum(dim=-1).sqrt()", "def compl...
[ "0.766307", "0.766307", "0.766307", "0.661879", "0.6422132", "0.6198529", "0.6017067", "0.5993175", "0.5902083", "0.58823895", "0.5855812", "0.57926065", "0.57813406", "0.5773507", "0.5769934", "0.57515544", "0.5712033", "0.56957585", "0.568994", "0.5641625", "0.5637767", "...
0.87394947
0
Called when the widget of the view was created
def viewWidgetCreated(self, view, plot): return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_widget(self):", "def create_widgets(self):", "def on_show_view(self):\n self.setup()", "def on_show_view(self):\n self.setup()", "def on_show_view(self):\n self.setup()", "def create_widgets( self ):", "def create_widget(self):\n pass", "def onShow(self):\n ...
[ "0.7902635", "0.7300569", "0.7272871", "0.7272871", "0.7272871", "0.71997607", "0.7128017", "0.7008906", "0.6765284", "0.66968477", "0.6603362", "0.6543564", "0.6543564", "0.65416574", "0.651932", "0.64497674", "0.6448184", "0.64066774", "0.63004065", "0.62705046", "0.6247242...
0.79256094
0
Returns the data viewer hooks used by this view.
def getHooks(self): return self.__hooks
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hooks(self):\n return tuple(self.__hooks.keys())", "def get_extra_lvs_hooks(self) -> List[HammerToolHookAction]:\n return list()", "def get_extra_hierarchical_lvs_hooks(self) -> Dict[str, List[HammerToolHookAction]]:\n return dict()", "def custom_hooks(self):\n return self.con...
[ "0.69417256", "0.6475532", "0.6276654", "0.624319", "0.61839193", "0.60875654", "0.60875654", "0.6062711", "0.6000305", "0.59981173", "0.59789795", "0.5936823", "0.5913618", "0.58525425", "0.5787659", "0.57738584", "0.577255", "0.576733", "0.5754267", "0.56217355", "0.5590773...
0.7191292
0
Returns a default colormap.
def defaultColormap(self): colormap = None if self.__hooks is not None: colormap = self.__hooks.getColormap(self) if colormap is None: colormap = Colormap(name="viridis") return colormap
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_colormap(self):\n return colors.colormaps[self.name]", "def get_colormap(self):\n return colors.colormaps[self.name]", "def get_colormap(self):\n return file_io.load_viscm_colormap(self.path)", "def get_colormap(self):\n return file_io.load_viscm_colormap(self.path)", "d...
[ "0.72189206", "0.72189206", "0.7079339", "0.7079339", "0.7058597", "0.7002624", "0.6966337", "0.6905248", "0.68922603", "0.67234963", "0.6715274", "0.6709201", "0.66109717", "0.66100955", "0.6520509", "0.64768016", "0.6442025", "0.6442025", "0.6424049", "0.63886", "0.63886", ...
0.83686036
0
Returns a default color dialog.
def defaultColorDialog(self): dialog = None if self.__hooks is not None: dialog = self.__hooks.getColormapDialog(self) if dialog is None: dialog = ColormapDialog() dialog.setModal(False) return dialog
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def colorPickerDialog(self, current_color=None):\n\t\tcolor_dialog = QtWidgets.QColorDialog()\n\t\t#color_dialog.setOption(QtWidgets.QColorDialog.DontUseNativeDialog)\n\n\t\t# Set current colour\n\t\tif current_color is not None:\n\t\t\tcolor_dialog.setCurrentColor(current_color)\n\n\t\t# Only return a color if va...
[ "0.7305316", "0.6629004", "0.66000414", "0.65310407", "0.6420928", "0.63252723", "0.6239439", "0.62127674", "0.60073066", "0.59559417", "0.5938414", "0.5874301", "0.582238", "0.58178926", "0.5801812", "0.57167405", "0.5696698", "0.567963", "0.56683296", "0.5642302", "0.562387...
0.8498397
0
Returns the mode id
def modeId(self): return self.__modeId
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mode(self) -> str:\r\n return self._mode", "def mode(self) -> str:\n return pulumi.get(self, \"mode\")", "def mode(self) -> str:\n return pulumi.get(self, \"mode\")", "def getmode(self):\n return self.mode", "def get_mode(self):\r\n return self.mode", "def mode(self...
[ "0.7811208", "0.7805747", "0.7805747", "0.77869534", "0.771352", "0.76968026", "0.76935", "0.7689646", "0.7655183", "0.7655183", "0.7655183", "0.76503944", "0.7631035", "0.7631035", "0.7631035", "0.7579294", "0.75691974", "0.7563148", "0.75571734", "0.7544744", "0.7537633", ...
0.9080869
0
Set the value of a custom axis
def setCustomAxisValue(self, name, value): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def value_axis(self, value_axis):\n\n self.container['value_axis'] = value_axis", "def set_point(self, axis: int, value: Union[int, float]):\n if axis < 0:\n axis += self.ndim\n if axis < 0:\n raise ValueError(\n f'axis is negative, expected positive, got...
[ "0.7426107", "0.6823979", "0.6566052", "0.6564019", "0.64065546", "0.6389571", "0.6220259", "0.6220259", "0.6219633", "0.61972004", "0.6181993", "0.61811894", "0.6174139", "0.6174139", "0.6139899", "0.6137108", "0.6131543", "0.60985774", "0.60769933", "0.6062639", "0.60532314...
0.8554661
0
Returns true if the widget is already initialized.
def isWidgetInitialized(self): return self.__widget is not None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_initialized(self) -> bool:\n return len(self) > 0", "def is_editor_ready(self):\r\n if self.editor_widget:\r\n window = self.editor_widget.window()\r\n if hasattr(window, 'is_starting_up') and not window.is_starting_up:\r\n return True", "def _isinit(s...
[ "0.7549473", "0.7125627", "0.7058051", "0.6861954", "0.68026435", "0.67455906", "0.67142135", "0.6673255", "0.6608615", "0.6608254", "0.65874594", "0.65844923", "0.6568072", "0.6543216", "0.6534076", "0.65151435", "0.64635277", "0.6377944", "0.63721126", "0.63586754", "0.6357...
0.86975914
0
Format an iterable of slice objects
def __formatSlices(self, indices): if indices is None: return '' def formatSlice(slice_): start, stop, step = slice_.start, slice_.stop, slice_.step string = ('' if start is None else str(start)) + ':' if stop is not None: string += str(st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_slice_strings(cls, slice_key):\n start = slice_key.start\n size = slice_key.stop - start\n return (str(start), str(size))", "def __getslice__(self, i, j):\n return OutputGroup(list.__getslice__(self, i, j))", "def print_slice(input, iz=0):\n\timage=get_image(input)\n\tnx = ...
[ "0.5865665", "0.57684493", "0.5599457", "0.5525063", "0.5512937", "0.55068475", "0.5437363", "0.54111654", "0.5382067", "0.5355884", "0.5338547", "0.53211254", "0.53099644", "0.5304407", "0.5304407", "0.52531093", "0.5224272", "0.5191909", "0.51722807", "0.5160424", "0.513076...
0.6723752
0
Build title from given selection information.
def titleForSelection(self, selection): if selection is None or selection.filename is None: return None else: directory, filename = os.path.split(selection.filename) try: slicing = self.__formatSlices(selection.slice) except Exception: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def updateTitle(self):\n \n if len(self.selParams) == 0:\n self.title = 'Measure (Nothing)'\n elif len(self.selParams) == 1:\n self.title = 'Measure ' + self.selParams[0]\n elif len(self.selParams) == 2:\n self.title = 'Measure ' + self.selParams[0] + ',...
[ "0.6353829", "0.613545", "0.6039983", "0.6028894", "0.58950776", "0.5741492", "0.5696391", "0.56829673", "0.5664377", "0.556874", "0.5443336", "0.5429673", "0.54182184", "0.54098636", "0.54039633", "0.53925604", "0.53877467", "0.5369228", "0.5365641", "0.53589183", "0.5351014...
0.75292933
0
Set the data selection displayed by the view If called, it have to be called directly after `setData`.
def setDataSelection(self, selection): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_selection(self, selection):\n self._selection = selection", "def update_selection(self):\n raise NotImplementedError", "def setSelectedDate(self, data):\n # print('setSelectedDate ', data)\n self.currentDate = data", "def update_view(self, selected):\n pass", "def...
[ "0.6738302", "0.66910154", "0.66355103", "0.6523672", "0.64766914", "0.6413622", "0.63925743", "0.6344838", "0.6215796", "0.62130725", "0.6122954", "0.6097352", "0.608399", "0.6022608", "0.6015785", "0.6015256", "0.6015057", "0.6011311", "0.5971476", "0.5964737", "0.59606576"...
0.83170843
0
Returns names of the expected axes of the view, according to the input data. A none value will disable the default axes selectior.
def axesNames(self, data, info): return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def axesnames(self):\n return self._axesnames", "def allAxes( mv ):\n if mv is None: return None\n return mv.getAxisList()", "def _default_axis_names(n_dims):\n _DEFAULT_NAMES = (\"z\", \"y\", \"x\")\n return _DEFAULT_NAMES[-n_dims:]", "def _find_axes(cls, input_data, explicit_x=None):\n\n...
[ "0.697044", "0.68636376", "0.6316774", "0.61642134", "0.60828024", "0.60513145", "0.59091306", "0.58836395", "0.58836395", "0.58783954", "0.58783954", "0.58372355", "0.57716405", "0.57354414", "0.57308847", "0.5713211", "0.5692361", "0.5676367", "0.56661934", "0.56484467", "0...
0.7396134
0
Returns the views that can be returned by `getMatchingViews`.
def getReachableViews(self): return [self]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getMatchingViews(self, data, info):\n raise NotImplementedError()", "def getMatchingViews(self, data, info):\n if not self.isSupportedData(data, info):\n return []\n views = [v for v in self.__views if v.getCachedDataPriority(data, info) != DataView.UNSUPPORTED]\n retur...
[ "0.73828393", "0.69941866", "0.6910991", "0.6866864", "0.68596447", "0.6800824", "0.67730147", "0.6732255", "0.6717297", "0.6404748", "0.63528705", "0.6350586", "0.62178314", "0.613579", "0.6117917", "0.611534", "0.6032207", "0.59530085", "0.59079045", "0.5888702", "0.5878553...
0.70170206
1
Returns the priority of using this view according to a data. `UNSUPPORTED` means this view can't display this data `1` means this view can display the data `100` means this view should be used for this data `1000` max value used by the views provided by silx ...
def getDataPriority(self, data, info): return DataView.UNSUPPORTED
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __getBestView(self, data, info):\n if not self.isSupportedData(data, info):\n return None\n views = [(v.getCachedDataPriority(data, info), v) for v in self.__views.keys()]\n views = filter(lambda t: t[0] > DataView.UNSUPPORTED, views)\n views = sorted(views, key=lambda t:...
[ "0.73111045", "0.5799851", "0.56085545", "0.5550155", "0.5519779", "0.54540956", "0.54540956", "0.54540956", "0.54540956", "0.5422215", "0.53575385", "0.53053236", "0.5287806", "0.52869827", "0.5281557", "0.5281557", "0.52641714", "0.525869", "0.525869", "0.525869", "0.525869...
0.7323587
0
Returns all views that can be reachable at on point. This method return any sub view provided (recursivly).
def getReachableViews(self): raise NotImplementedError()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getReachableViews(self):\n return [self]", "def views(self):\n return self._views", "def getViews(self):\n raise NotImplementedError()", "def getViews(self):\n return list(self.__views)", "def child_views(self):\n return self.children", "def getViews(self):\n ...
[ "0.7994752", "0.65861917", "0.6485654", "0.6417944", "0.6358205", "0.6335218", "0.6190338", "0.59789574", "0.58850986", "0.5878531", "0.58777565", "0.58640367", "0.585607", "0.5808636", "0.57850796", "0.57698834", "0.56750935", "0.55629796", "0.54616225", "0.54540443", "0.542...
0.7903768
1
Returns sub views matching this data and info. This method return any sub view provided (recursivly).
def getMatchingViews(self, data, info): raise NotImplementedError()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getMatchingViews(self, data, info):\n priority = self.getCachedDataPriority(data, info)\n if priority == DataView.UNSUPPORTED:\n return []\n return [self]", "def child_views(self):\n return self.children", "def getViews(self):\n raise NotImplementedError()", ...
[ "0.66623676", "0.6509976", "0.62610114", "0.60390395", "0.60192496", "0.58090764", "0.58028334", "0.5798752", "0.56958425", "0.56136817", "0.55903375", "0.5563396", "0.5545881", "0.55402297", "0.5515465", "0.5467731", "0.54673463", "0.54271245", "0.5401829", "0.53947186", "0....
0.7676684
0
Add a new dataview to the available list.
def addView(self, dataView): hooks = self.getHooks() if hooks is not None: dataView.setHooks(hooks) self.__views[dataView] = None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addView(self, dataView):\n hooks = self.getHooks()\n if hooks is not None:\n dataView.setHooks(hooks)\n self.__views.append(dataView)", "def add_view(self, *args, **kwargs):\n return self._resources_manager.add_view(*args, **kwargs)", "def add_view_step(self, view_ste...
[ "0.7770298", "0.62751746", "0.6245295", "0.61709106", "0.6146605", "0.6143366", "0.6009386", "0.59872663", "0.5966884", "0.5899624", "0.5888188", "0.5862685", "0.58360523", "0.574251", "0.5739594", "0.5723594", "0.5711219", "0.5705367", "0.5701599", "0.567094", "0.5650077", ...
0.6986231
1
Returns the list of registered views
def getViews(self): return list(self.__views.keys())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getViews(self):\n return list(self.__views)", "def views(self):\n return self._views", "def get_views(self):\n return self._get_types_from_default_ns(View)", "def getViews(self):\n raise NotImplementedError()", "def get_views(cohesity_client):\n views = cohesity_client.vi...
[ "0.80495256", "0.7825242", "0.7322528", "0.71818465", "0.70918703", "0.7040627", "0.7036368", "0.70254064", "0.6989426", "0.6974881", "0.6926255", "0.69062054", "0.6688032", "0.6612111", "0.64889175", "0.63672256", "0.63298315", "0.6300513", "0.62238866", "0.61698407", "0.607...
0.8089164
0
Returns the best view according to priorities.
def __getBestView(self, data, info): if not self.isSupportedData(data, info): return None views = [(v.getCachedDataPriority(data, info), v) for v in self.__views.keys()] views = filter(lambda t: t[0] > DataView.UNSUPPORTED, views) views = sorted(views, key=lambda t: t[0], rev...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_best_candidate(self):\n if not self.scores:\n return None\n return self.te_list[self.scores.index(max(self.scores))]", "def get_best_known_model(self) -> Tuple[Optional[Path], int]:\n return self._get_first_model(sort='total_score', desc=False)", "def get_best_solution(s...
[ "0.5956185", "0.5946167", "0.5866012", "0.5723517", "0.571503", "0.5705968", "0.5679877", "0.5675663", "0.5662041", "0.5633913", "0.55750704", "0.55725336", "0.557066", "0.5537898", "0.551114", "0.54992044", "0.54922616", "0.54763204", "0.5463753", "0.54381096", "0.54253614",...
0.6901257
0
Replace a data view with a custom view. Return True in case of success, False in case of failure.
def replaceView(self, modeId, newView): oldView = None for view in self.__views: if view.modeId() == modeId: oldView = view break elif isinstance(view, _CompositeDataView): # recurse hooks = self.getHooks() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def replaceView(self, modeId, newView):\n oldView = None\n for iview, view in enumerate(self.__views):\n if view.modeId() == modeId:\n oldView = view\n break\n elif isinstance(view, CompositeDataView):\n # recurse\n hoo...
[ "0.6608374", "0.63342625", "0.5802944", "0.5615293", "0.55753934", "0.5501989", "0.5438444", "0.5432784", "0.54150265", "0.5374852", "0.53694946", "0.53612304", "0.53092", "0.5178626", "0.5124789", "0.50912267", "0.5088075", "0.5062455", "0.504078", "0.50203586", "0.50010663"...
0.6661702
0
Add a new dataview to the available list.
def addView(self, dataView): hooks = self.getHooks() if hooks is not None: dataView.setHooks(hooks) self.__views.append(dataView)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addView(self, dataView):\n hooks = self.getHooks()\n if hooks is not None:\n dataView.setHooks(hooks)\n self.__views[dataView] = None", "def add_view(self, *args, **kwargs):\n return self._resources_manager.add_view(*args, **kwargs)", "def add_view_step(self, view_ste...
[ "0.6986125", "0.6275191", "0.6244819", "0.6171132", "0.6145084", "0.6141402", "0.6009027", "0.59855765", "0.59667253", "0.59002584", "0.58872473", "0.58618987", "0.5837559", "0.5743151", "0.5737284", "0.5722587", "0.5710407", "0.57034796", "0.5701506", "0.56690824", "0.564912...
0.7770105
0
Returns the list of registered views
def getViews(self): return list(self.__views)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getViews(self):\n return list(self.__views.keys())", "def views(self):\n return self._views", "def get_views(self):\n return self._get_types_from_default_ns(View)", "def getViews(self):\n raise NotImplementedError()", "def get_views(cohesity_client):\n views = cohesity_cl...
[ "0.8089164", "0.7825242", "0.7322528", "0.71818465", "0.70918703", "0.7040627", "0.7036368", "0.70254064", "0.6989426", "0.6974881", "0.6926255", "0.69062054", "0.6688032", "0.6612111", "0.64889175", "0.63672256", "0.63298315", "0.6300513", "0.62238866", "0.61698407", "0.6074...
0.80495256
1
Replace a data view with a custom view. Return True in case of success, False in case of failure.
def replaceView(self, modeId, newView): oldView = None for iview, view in enumerate(self.__views): if view.modeId() == modeId: oldView = view break elif isinstance(view, CompositeDataView): # recurse hooks = self.get...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def replaceView(self, modeId, newView):\n oldView = None\n for view in self.__views:\n if view.modeId() == modeId:\n oldView = view\n break\n elif isinstance(view, _CompositeDataView):\n # recurse\n hooks = self.getHook...
[ "0.66609526", "0.633346", "0.58019185", "0.5614997", "0.557388", "0.5499673", "0.5438074", "0.5433056", "0.54160523", "0.5373652", "0.5368686", "0.5363025", "0.5309105", "0.517758", "0.51247215", "0.5092328", "0.5089086", "0.50640225", "0.5039589", "0.5020905", "0.50027037", ...
0.66075784
1
Update used colormap according to nxdata's SILX_style
def _updateColormap(self, nxdata): cmap_norm = nxdata.plot_style.signal_scale_type if cmap_norm is not None: self.defaultColormap().setNormalization( 'log' if cmap_norm == 'log' else 'linear')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def changeColor(self):\n self.layer.new_colormap()", "def color(self, sids=None, sat=1):\n if sids == None: # init/overwrite self.colors\n nids = self.nids\n # uint8, single unit nids are 1-based:\n self.colors = CLUSTERCLRSRGB[nids % len(CLUSTERCLRSRGB) - 1] * sat\...
[ "0.6052805", "0.5751103", "0.5729292", "0.56816226", "0.5550979", "0.5397923", "0.5361876", "0.5355042", "0.5344387", "0.5323888", "0.5323239", "0.53095704", "0.52873427", "0.5242239", "0.52291805", "0.52267003", "0.5224373", "0.5188541", "0.5188279", "0.51769954", "0.5140223...
0.7386802
0
Adds a new LogImg object to the logger.
def add_log_img(self, log_img_type): self.log_img_map[log_img_type] = LogImg(self.log_path, log_img_type)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def log_image(self, log_name: str, image: Union[str, Any], step: Optional[int] = None) -> None:\n for key, logger in self._loggers.items():\n log_fn = getattr(logger, \"log_image\", None)\n if callable(log_fn):\n log_fn(log_name, image, step)", "def log_image(self, log...
[ "0.69299495", "0.6862203", "0.6212648", "0.619855", "0.61236614", "0.6035992", "0.6000903", "0.59973085", "0.59945935", "0.5994575", "0.59917325", "0.5952818", "0.59483373", "0.593813", "0.59179693", "0.5897211", "0.5896683", "0.58311635", "0.5816518", "0.58037096", "0.577038...
0.80627126
0
Get an existing log img object reference
def get_log_img_obj(self, log_img_type): if log_img_type in self.log_img_map: return self.log_img_map[log_img_type] else: msg = "error: log_img_type '{}' does not exist in the Logger object.\n".format(log_img_type) msg += "There are currently {} objects saved in the L...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getimage(self):", "def image(self):\n return self._image", "def get_image ( self, object ):\n return self.image", "def getImage(cam):\n\n return cam.getImage()", "def image_reference(self, image_id):\n info = self.image_info[image_id]\n if info[\"source\"] == \"balloon\":\n ...
[ "0.65449005", "0.64309585", "0.63550127", "0.62919086", "0.62624776", "0.62624776", "0.62375873", "0.62375873", "0.62375873", "0.6186268", "0.6169566", "0.6159949", "0.61112523", "0.60648036", "0.60528", "0.6019813", "0.6012564", "0.5965432", "0.5955746", "0.59413415", "0.594...
0.7790943
0
Check the validity of an AFM number (Greek VAT code). Check if input is a valid AFM number via its check digit (not if it is actually used). Return either True of False. Input should be given as a string. An integer, under certain conditions, could through an exception.
def check_afm(afm): if not isinstance(afm, str): raise TypeError( "check_afm()", "You should feed to this function only strings to avoid exceptions and errors! Aborting." ) if len(afm) == 11 and afm[:2].upper() == "EL": afm=afm[2:] if afm.isdigit() == True and len(afm) == 9: i, sums = 256, 0 fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CheckNumber(userInput):\n try:\n float(userInput)\n return True\n except(ValueError):\n return False", "def input_validation(input_: str) -> bool:\n return fullmatch('[1-9]', input_) is not None", "def valid(f):\r\n try:\r\n return not re.search(r'\\b0[0-9]', f) ...
[ "0.6608858", "0.6412995", "0.64045024", "0.6399352", "0.63957435", "0.63957435", "0.632859", "0.62783635", "0.6233358", "0.6208753", "0.6205611", "0.62022656", "0.61651295", "0.60816836", "0.6072849", "0.60379183", "0.59668356", "0.5966686", "0.5965664", "0.5954444", "0.59408...
0.7674553
0
This method trains the clustering network from scratch if there is no pretrained autoencoder, else it will load the existing pretrained autoencoder to retrieve the latent representation of the images to train the final clustering layer in the convolutional neural network.
def train(args): dataset = args.dataset ae_mode = args.mode train_input, train_labels = load_data(dataset, mode=ae_mode) num_clusters = len(np.unique(train_labels)) data_initialization = dataset_parameters[dataset]['data_initialization'] with_attention = args.attention interval_updation = da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def train():\n init_distributed_mode(args)\n save_dir = TRAIN_CFG['save_dir']\n if not os.path.exists(save_dir) and torch.distributed.get_rank() == 0:\n os.mkdir(save_dir)\n kwargs = {}\n # If augmenting data, disable Pytorch's own augmentataion\n # This has to be done manually as augmenta...
[ "0.6275105", "0.61198753", "0.60603017", "0.60560143", "0.60117126", "0.5932849", "0.5908202", "0.58721745", "0.58566064", "0.5848631", "0.58267033", "0.5818534", "0.57857215", "0.5772631", "0.5761682", "0.5756426", "0.5731873", "0.5724584", "0.571866", "0.5717423", "0.571203...
0.7010814
0
Picks the first connection based on the best three connections possible.
def pick_first_connection(self): self.best_connection = [] stations = list(self.grid.stations.values()) # add a first station to the track for station in stations: self.track = Track(f"greedy_track_{self.count}", self.grid) self.track.add_station(self.grid, sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def choose_serial_connection(potential_connections):\n for connection in potential_connections:\n if os.path.exists(connection):\n return connection\n return None", "def _pick_server(self, key, inport): #key = ipp.srcip, ipp.dstip, tcpp.srcport, tcpp.dstport\n\n if len(se...
[ "0.6265498", "0.62159556", "0.5885226", "0.58790165", "0.5841181", "0.5781805", "0.5763767", "0.5667359", "0.56560063", "0.55838865", "0.5580121", "0.5565697", "0.554023", "0.551508", "0.5456506", "0.5409392", "0.54023296", "0.53600425", "0.5354556", "0.5351314", "0.53210104"...
0.7276076
0
Picks the next station based on the three connections that produce the best score.
def pick_next_station(self, station): self.best_score = 0 stations = self.grid.stations # all connections of the last added added station lookahead_1 = self.grid.get_station(self.best_connection[1]).connections for la1 in lookahead_1.values(): next_station = la1[0]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pick_first_connection(self):\n self.best_connection = []\n stations = list(self.grid.stations.values())\n\n # add a first station to the track \n for station in stations:\n self.track = Track(f\"greedy_track_{self.count}\", self.grid)\n self.track.add_station(...
[ "0.7436752", "0.6377942", "0.6055019", "0.56210613", "0.56195927", "0.55932504", "0.5592113", "0.5579121", "0.55658734", "0.553037", "0.5499738", "0.54976356", "0.5447143", "0.54371697", "0.54167473", "0.54167473", "0.54080623", "0.5369538", "0.53499717", "0.5339296", "0.5330...
0.83878165
0
Predicts the sound class (0 > Kick, 1 > Snare) for a single sound using an XGBoost model
def predictSoundClass(sound, boostModel, sampleRate=44100, nCoeffs=32): sound = util.normalize(sound) mfcc = extractFeatures(sound, sampleRate, nCoeffs) mfcc = mfcc.reshape(1, len(mfcc)) dTest = xgb.DMatrix(mfcc) return boostModel.predict(dTest)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def predict(x):\n\n scores = np.zeros(shape=(len(classes_def), len(x)))\n\n for idx, c in enumerate(classes_def):\n\n model_name = model_name_pre + c + model_name_post\n print('Loading model', model_name, 'and making predictions..')\n model = load_model(model_name)\n\n scores[idx]...
[ "0.6329133", "0.6319796", "0.601781", "0.6012411", "0.59950215", "0.59683543", "0.5959344", "0.5959344", "0.5952556", "0.59423214", "0.59318", "0.59194446", "0.5901314", "0.5898736", "0.5898736", "0.5898736", "0.5892773", "0.5889295", "0.58853424", "0.5880142", "0.5864906", ...
0.70426357
0
Get a amenity with id as amenity_id
def get_amenity(amenity_id): try: amenity = Amenity.get(Amenity.id == amenity_id) except Exception: return {'code': 404, 'msg': 'Amenity not found'}, 404 return amenity.to_dict(), 200
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def amenity_get_by_id(amenity_id):\n obj = storage.get(\"Amenity\", amenity_id)\n if obj is None:\n abort(404)\n else:\n return jsonify(obj.to_dict())", "def amenities_id(amenity_id):\r\n for val in storage.all(\"Amenity\").values():\r\n if val.id == amenity_id:\r\n re...
[ "0.77794546", "0.770642", "0.76352286", "0.7437263", "0.7428258", "0.7405687", "0.7220406", "0.7220406", "0.71572345", "0.71449107", "0.7110059", "0.7098071", "0.70148665", "0.69844514", "0.69547874", "0.6646272", "0.6347817", "0.6306251", "0.62925506", "0.6254703", "0.624444...
0.77215296
1
Delete amenity with id as amenity_id
def delete_amenity(amenity_id): try: amenity = Amenity.get(Amenity.id == amenity_id) except Exception: return {'code': 404, 'msg': 'Amenity not found'}, 404 amenity = Amenity.delete().where(Amenity.id == amenity_id) amenity.execute() res = {} res['code'] = 201 res['msg'] = "A...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def amenity_delete(amenity_id=None):\n obj = storage.get(\"Amenity\", amenity_id)\n if obj is None:\n abort(404)\n storage.delete(obj)\n storage.save()\n return jsonify({}), 200", "def amenities_delete(amenity_id):\r\n amenities = storage.get(\"Amenity\", amenity_id)\r\n if amenities ...
[ "0.828099", "0.81136984", "0.80685514", "0.79795176", "0.7977136", "0.7969661", "0.79693115", "0.7922059", "0.78571624", "0.78356045", "0.77734894", "0.7765752", "0.7712711", "0.7606925", "0.7024841", "0.6947486", "0.6862664", "0.6641325", "0.65328556", "0.6338358", "0.633196...
0.82829297
0
Delete amenities with id as amenity_id and place with id as place_id
def delete_place_amenities(place_id, amenity_id): try: delete = PlaceAmenities.delete().where( PlaceAmenities.amenity == amenity_id, PlaceAmenities.place == place_id ) delete.execute() res = {} res['code'] = 200 res['msg'] = 'Amenity deleted su...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_amenity_place(place_id, amenity_id):\n place = storage.get(Place, place_id)\n if place is None:\n abort(404, description=\"Not Found\")\n amenity = storage.get(Amenity, amenity_id)\n if amenity is None:\n abort(404, description=\"Not Found\")\n if amenity in place.amenities:...
[ "0.82304513", "0.8189802", "0.7973082", "0.7140258", "0.6936414", "0.68594134", "0.66304946", "0.6570661", "0.6530816", "0.64950216", "0.6485565", "0.646877", "0.6443163", "0.64373386", "0.6418685", "0.64175266", "0.6345153", "0.62653947", "0.5971674", "0.58708566", "0.585538...
0.8434596
0
Return a rate to convert the metric data to new unit, as below. value in old unit / rate = value in new unit
def get_conversion_rate(self, old_unit, new_unit): for i in [old_unit, new_unit]: if i not in self.units: raise Exception("Can't find unit %s in unitgroup '%s'" % (i, self.name)) return float(self.units[new_unit]) / float(self.units[old_unit])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_conversion_rate(self, newunit):\n if not self.unit or not self.unitgroup:\n logging.error(\"Metric %s can't be converted into %s unit. \"\n \"Please correct your config file.\" % (self.name,\n newunit)...
[ "0.70476955", "0.67164433", "0.6425538", "0.6421992", "0.63206935", "0.6272851", "0.6172931", "0.61639756", "0.6147183", "0.60993135", "0.6065548", "0.60554105", "0.59908634", "0.59607494", "0.5956799", "0.594856", "0.5939248", "0.59317255", "0.59281486", "0.5904123", "0.5901...
0.74816525
0
Return the fields of a host data record in a list.
def get_host_data_fields(self): raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_fields(fc):\n return [f.name for f in arcpy.ListFields(fc)]", "def extractFields(deerfootRDDRecord):\n fieldsList = deerfootRDDRecord.split(\",\")\n return (fieldsList[0], [fieldsList[1], fieldsList[15], fieldsList[46]])", "def listFields(self):\n return self.get_json('/field')", "de...
[ "0.6213986", "0.60264015", "0.5972971", "0.5965215", "0.59143746", "0.58616215", "0.5858335", "0.5854301", "0.58492804", "0.58246523", "0.58062214", "0.5797772", "0.5766629", "0.57091284", "0.5703255", "0.5699028", "0.56777984", "0.5672483", "0.566576", "0.56613034", "0.56385...
0.66660905
0
Return the fields of a VM data record in a list.
def get_vm_data_fields(self): raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_fields(self, pager=None):\n return Field.deserialize_list(self._get_multiple('fields', {}, pager))", "def list_fields(fc):\n return [f.name for f in arcpy.ListFields(fc)]", "def listFields(self):\n return self.get_json('/field')", "def get_fieldlist(cls):\n return cls.fieldlis...
[ "0.6668574", "0.64598054", "0.6448825", "0.63467366", "0.63245344", "0.6320131", "0.6319845", "0.631197", "0.62458086", "0.6242731", "0.6185522", "0.61597586", "0.6136137", "0.61244106", "0.60978943", "0.60761255", "0.6071319", "0.6056425", "0.60514027", "0.6050539", "0.59907...
0.656898
1
Return data time information in a tuple.
def get_time_info(self): raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_time_info(self, keys: list[str]):\n if self.is_info_v2:\n if not self.is_on:\n return 0\n return self.int_or_none(self._data.get(keys[1]))\n return self._data.get(keys[0])", "def CopyToStatTimeTuple(self):\n if self._number_of_seconds is None:\n ...
[ "0.6896615", "0.6830696", "0.67479175", "0.6706535", "0.6693293", "0.6687859", "0.6653777", "0.65909964", "0.6582156", "0.6582156", "0.6352521", "0.6329912", "0.63027865", "0.6289983", "0.6285771", "0.6283323", "0.62765485", "0.62752587", "0.62750447", "0.6242026", "0.6214285...
0.7061362
0
Return host output files in a tuple.
def get_host_outfiles(self): raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_output_files(self):\r\n fname = self.__get_output_filename()\r\n return [fname] if fname else []", "def output_files(self):\n return [self.input_files()[0].replace(\".lhe.gz\", \".stdhep\").replace(\".lhe\", \".stdhep\")]", "def output_files(self):\n output_files = []\n for ...
[ "0.6888449", "0.66737944", "0.6598473", "0.6436748", "0.6293716", "0.6286534", "0.628374", "0.6179701", "0.60801107", "0.60670453", "0.5928418", "0.5906354", "0.5890646", "0.5887146", "0.5846622", "0.5820629", "0.58062935", "0.58001685", "0.57891005", "0.578708", "0.5781865",...
0.7225652
0
Return VM output files in a tuple.
def get_vm_outfiles(self): raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_output_files(self):\r\n fname = self.__get_output_filename()\r\n return [fname] if fname else []", "def _list_outputs(self):\n outputs = self._outputs().get()\n\n out_dir = os.path.abspath(os.path.join(os.getcwd(), \"slicesdir\"))\n outputs[\"out_dir\"] = out_dir\n ...
[ "0.7118414", "0.6668537", "0.66680706", "0.66119856", "0.6590606", "0.6571721", "0.6446606", "0.64158994", "0.6320247", "0.6251037", "0.6235383", "0.619133", "0.61899394", "0.60789007", "0.60338473", "0.59975857", "0.5989016", "0.5984177", "0.5969433", "0.59565455", "0.594525...
0.74231887
0
Initialize a CSVFile object with a directory. The directory is CBTOOL experiment result directory generated by monextract command. It contains a few CSV files. Among those files, one contains host OS metric data, and another VM OS metric data.
def __init__(self, expdir): self.expdir = expdir self.expid = basename(expdir) self.host_csvfile = "%s/%s_%s.csv" % (expdir, self.HOST_FILE_PREFIX, self.expid) self.host_data = {} self.host_data_fields = [] self.host_outfiles...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __openAndInitCSVFile(self, modelInfo):\n # Get the base path and figure out the path of the report file.\n basePath = self.__outputDirAbsPath\n\n # Form the name of the output csv file that will contain all the results\n reportCSVName = \"%s_Report.csv\" % (self.__outputLabel,)\n reportCSVPath =...
[ "0.6246445", "0.6127223", "0.6095094", "0.60938084", "0.6007543", "0.59912115", "0.58670706", "0.5842792", "0.5808693", "0.57927597", "0.5757253", "0.57462543", "0.57432365", "0.57250065", "0.57250065", "0.56792647", "0.56714016", "0.5650973", "0.5606621", "0.5605827", "0.557...
0.61461604
1
Implement DataSource.get_hosts() method. The returned host names are sorted in alphabetic order.
def get_hosts(self): return sorted(self.host_data.keys())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_hosts(self):\n\n raise NotImplementedError", "def getHosts(self):\n raise \"not implemented\"", "def hosts(self) -> t.List[str]:\n if not self._hosts:\n self._hosts = self._get_db_hosts()\n return self._hosts", "def host_names(self):\n resp = self._cmd(ur...
[ "0.81791395", "0.785863", "0.77301955", "0.74106723", "0.7362429", "0.7362429", "0.7345172", "0.7278661", "0.7235248", "0.72335577", "0.7223325", "0.72067803", "0.71669626", "0.7105632", "0.7082958", "0.7082958", "0.69979745", "0.69384414", "0.6874702", "0.68602747", "0.68349...
0.82562816
0
Implement DataSource.get_vms() method. VM names in CSV files are of "vm_" format. The returned VM names are sorted in integer id order.
def get_vms(self): vms = [v for v in self.vm_data.keys()] vms.sort(lambda x, y: cmp(int(x[3:]), int(y[3:]))) return vms
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_vms(self):\n\n raise NotImplementedError", "def get_vms(self, user=None, count=None):\n crit = dict()\n if count is not None:\n crit['count'] = count\n s = self._NDL_API('getvms', crit, user)\n if len(s) == 0:\n return []\n ips = s.split(','...
[ "0.5869199", "0.5651854", "0.55376905", "0.551105", "0.5461269", "0.54513437", "0.544437", "0.5337419", "0.5264466", "0.52439404", "0.5195252", "0.5182719", "0.51786023", "0.51264375", "0.5096237", "0.5057847", "0.5049899", "0.503902", "0.5005499", "0.49837598", "0.49673596",...
0.62985337
0
Parse a datatime string and return seconds since epoch.
def parse_timestr(self, timestr): epoch = datetime.datetime(1970, 1, 1, 0, 0, 0, 0, tzutc()) return int((parsedate(timestr) - epoch).total_seconds())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_time(s):\n\n dt = dateutil.parser.parse(s)\n# epoch_time = int((dt - datetime(1970, 1, 1, tzinfo=timezone.utc)).total_seconds())\n epoch_time = int(dt.replace(tzinfo=timezone.utc).timestamp())\n\n return epoch_time", "def datumToSeconds(timestr):\n return (datetime.datetime(int(timestr.s...
[ "0.76526344", "0.7463628", "0.682279", "0.6693088", "0.6685308", "0.65293956", "0.6505844", "0.6494147", "0.6421463", "0.64137083", "0.63933265", "0.63811636", "0.6282634", "0.62804013", "0.62677103", "0.62677103", "0.6256727", "0.6202523", "0.6202523", "0.6192253", "0.618009...
0.76556337
0
Plot graph using information in graphinfo object.
def plot_graph(self, graphinfo): WIDTH = 450 HEIGHT = WIDTH * 0.55 opts = [] # Generate outfile name if not self.rrdfile: self.outfiles[graphinfo.name] = self.SKIPPED return logging.info("Plotting %s graph for %s" % (graphinfo.name, self.node)) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plot_graph(self) -> None:", "def _PlotGraph(self, event):\n self._rcvLock.acquire()\n for j in event.data[0].keys():\n data = event.data[0][j]\n #print data\n line = []\n for k in data.keys():\n if k in COLORS.keys():\n ...
[ "0.77446437", "0.6901284", "0.6651679", "0.66496754", "0.65762436", "0.6498491", "0.64938074", "0.64504176", "0.64067835", "0.6402517", "0.63337934", "0.6324918", "0.6258363", "0.6218747", "0.620347", "0.6173851", "0.6162113", "0.61547357", "0.6136123", "0.6123041", "0.612050...
0.74431366
1
A wrapper of rrdtool functions, with additional logging function.
def rrdtool_cmd(self, cmd, *args, **kwargs): fn_table = {"create": rrdtool.create, "update": rrdtool.update, "graph": rrdtool.graph} fn = fn_table[cmd] cmdline = "rrdtool %s %s" % (cmd, " ".join([i if isinstance(i, str) else " ".join(i) for i ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def logger():\n return RPLogger('pytest_reportportal.test')", "def rrd(*args):\n # We have one rrdtool instance per thread\n global _rrdtool\n thisThread = threading.currentThread()\n if not thisThread in _rrdtool:\n _rrdtool[thisThread] = popen2.Popen3(\"rrdtool -\")\n rrdtool = _rrdtoo...
[ "0.56776714", "0.56146", "0.55475384", "0.55475384", "0.5509798", "0.5460044", "0.5414567", "0.5409551", "0.5404668", "0.53456235", "0.53394705", "0.5327236", "0.53170985", "0.5291978", "0.5214487", "0.52052015", "0.5194438", "0.51273423", "0.5111953", "0.51106703", "0.508304...
0.6281851
0