query
stringlengths
9
3.4k
document
stringlengths
9
87.4k
metadata
dict
negatives
listlengths
4
101
negative_scores
listlengths
4
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
CQ encodings are independent of speed, so should not be grouped.
def SpeedGroup(self, bitrate): return 'all'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encode(self, seq):", "def test_decode_qdc(self):\n self.assertEqual(td.qdc(), decoder.decode_qdc(BytesIO(td.qdc(True))))", "def time_encode(self):\n for ii in range(100):\n for fragment in self.msg.encode_msg(1, 16382):\n pass", "def decode(self, coded_set):", "d...
[ "0.6006678", "0.5760689", "0.5671513", "0.55821073", "0.5502236", "0.53923804", "0.53876966", "0.5364135", "0.5356846", "0.5337399", "0.5313916", "0.53095436", "0.5269019", "0.52463037", "0.5223725", "0.51786166", "0.51786166", "0.51783174", "0.5172435", "0.5169267", "0.51578...
0.0
-1
Ensure that goldq and keyq are smaller than fixedq.
def ConfigurationFixups(self, config): fixed_q_value = config.GetValue('fixed-q') if int(config.GetValue('gold-q')) > int(fixed_q_value): config = config.ChangeValue('gold-q', fixed_q_value) if int(config.GetValue('key-q')) > int(fixed_q_value): config = config.ChangeValue('key-q', fixed_q_value...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def blowup(qNew, max_size):\n return (absolute(qNew) > max_size).any()", "def _sanityCheckKeySizes(other):\n if other.minKeySize < 512:\n raise ValueError(\"minKeySize too small\")\n if other.minKeySize > 16384:\n raise ValueError(\"minKeySize too large\")\n if other...
[ "0.62403035", "0.6000047", "0.5806859", "0.56767833", "0.55996144", "0.5595407", "0.5577116", "0.5559701", "0.5514552", "0.5482072", "0.54538447", "0.5435169", "0.54317313", "0.5420425", "0.54120344", "0.54033726", "0.53820455", "0.53723013", "0.53532654", "0.5351187", "0.533...
0.5455897
10
Returns a parameter string based on this encoding that has the parameter identified by "name" changed in a way worth testing. If no sensible change is found, returns None.
def _SuggestTweakToName(self, encoding, name): parameters = encoding.encoder.parameters value = int(parameters.GetValue(name)) new_value = None if encoding.result['bitrate'] > encoding.bitrate: delta = 1 new_value = 63 candidates = range(value + 1, 64) else: delta = -1 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_name(self) -> str:\n # read the original value passed by the command\n name = self.raw_param.get(\"name\")\n\n # this parameter does not need dynamic completion\n # this parameter does not need validation\n return name", "def getParam(self, params, name):\n retur...
[ "0.622179", "0.60660815", "0.6040889", "0.6040889", "0.58146137", "0.5806079", "0.5795579", "0.57549846", "0.5727818", "0.57237387", "0.57168627", "0.5687548", "0.5619562", "0.5595139", "0.556885", "0.55674666", "0.55310893", "0.55302817", "0.5513008", "0.551243", "0.55016464...
0.57055604
11
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
The HttpAgent used to make observations is bound in the constructor.
def agent(self): return self.__agent
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, agent):\n self.agent = agent", "def __init__(self, agent: AEA) -> None:\n self._agent = agent\n super().__init__()", "def __init__(self, agent_name):\n\n self._agent_name = agent_name", "def __init__(self, gym_env: gym.Env) -> None:\n super().__init__()\n...
[ "0.7351164", "0.6957303", "0.6808179", "0.670577", "0.6512269", "0.6495163", "0.6488134", "0.6333099", "0.6304801", "0.63044655", "0.62554175", "0.62005746", "0.6146556", "0.61349744", "0.6131", "0.61131203", "0.6107742", "0.6102221", "0.6100459", "0.609825", "0.6079396", "...
0.6539539
4
Implements helper method to extract observed objects.
def _do_decode_objects(self, content, observation): decoder = json.JSONDecoder() try: doc = decoder.decode(content) if not isinstance(doc, list): doc = [doc] observation.add_all_objects(doc) except ValueError as ex: error = 'Invalid JSON in response: %s' % content loggi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def observation(self):\n return {k: observer(self._state)\n for k, observer in self.observers.items()}", "def _get_observation(self):\n return []", "def __iter__(self):\n return iter(vars(self.obj))", "def observe(self) -> dict:\n return OrderedDict((key, o.get()) f...
[ "0.6175112", "0.61106783", "0.60204405", "0.60091937", "0.5929103", "0.59056705", "0.5799155", "0.5745424", "0.5730578", "0.56924415", "0.56217235", "0.5579725", "0.5554065", "0.55297357", "0.548012", "0.5456269", "0.5448644", "0.54456645", "0.5442461", "0.5431473", "0.543008...
0.5350148
31
Perform the observation using HTTP GET on a path.
def get_url_path(self, path): self.observer = HttpObjectObserver(self.__agent, path) observation_builder = jc.ValueObservationVerifierBuilder( 'Get ' + path, strict=self.__strict) self.verifier_builder.append_verifier_builder(observation_builder) return observation_builder
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def simulate_get(self, path='/', **kwargs):\n return self.simulate_request('GET', path, **kwargs)", "def get(self, path):\n return self.request(path, method='GET')", "def get(self, *path, **data):\n\t\treturn self.request('GET', *path, **data)", "def simulate_get(self, path='/', **kwargs) -> _R...
[ "0.7288038", "0.72503275", "0.7173312", "0.70527613", "0.7005011", "0.69969994", "0.69610393", "0.6953752", "0.6909677", "0.690561", "0.6859075", "0.68457997", "0.6798055", "0.67914647", "0.6736182", "0.6731656", "0.6726706", "0.67003083", "0.6679551", "0.66303647", "0.662056...
0.6458858
29
Calibration of the deformable mirror
def m4_calibration(self, commandAmpVector_ForM4Calibration, nPushPull_ForM4Calibration, maskIndex_ForM4Alignement, nFrames): zernike_coef_coma, coma_surface = self._measureComaOnSegmentMask(nFrames) print(zernike_coef_coma) self._tt = self._cal.measu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _doCalibration(self):\n self._cmdCalibration(2)", "def photometric_calibration():\n pass", "def calibration(self) -> int:", "def arm_calibration(self):\n self.arm_motor.run_forever(speed_sp=self.MAX_SPEED)\n while not self.touch_sensor.is_pressed:\n time.sleep(0.01)...
[ "0.67941266", "0.67645663", "0.65776956", "0.63947", "0.6092254", "0.6069542", "0.6038276", "0.59309524", "0.5876742", "0.58702165", "0.58668363", "0.5824653", "0.5823095", "0.58227694", "0.58188707", "0.5799465", "0.5777438", "0.57686573", "0.5747901", "0.57312226", "0.56957...
0.0
-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
checkAnswer checks answers according to {{{ the coordinate in answerList.
def checkAnswer(img, marker, answerList, threshold=110): markerCenter = np.asarray(marker.shape)//2 width = img.shape[1] height = img.shape[0] #To run template matching to find answer markers resultFinal = cv2.matchTemplate(imgModified, marker, 0) resultFinal = (1-resultFinal/np.max(resultFina...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_for_answer(list_name, answer):\n\n for item in list_name:\n if item['answer'] == answer:\n return True", "def check_answer():\r\n global choice, answer_choice, tries, submit_button, total, point, file, split, detail\r\n # getting the answer being submitted and comparing them ...
[ "0.7170723", "0.67453265", "0.638104", "0.6376527", "0.63755095", "0.6354558", "0.6348346", "0.6266409", "0.6145809", "0.6018026", "0.5969312", "0.59654385", "0.58950686", "0.58929944", "0.58739173", "0.57799274", "0.5771715", "0.5734414", "0.57037175", "0.570233", "0.5677227...
0.5611689
29
Send NDB query result to serialize function if single result, else loop through the query result and serialize records one by one
def filter_results(qry): result = [] # check if qry is a list (multiple records) or not (single record) if type(qry) != list: record = make_ndb_return_data_json_serializable(qry) return(record) for q in qry: result.append(make_ndb_return_data_json_serializable(q)) return(r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def query(self,query):\n if self.data is not None:\n qData = cPickle.loads(query)\n results = self.handleQuery(qData)\n qResults = cPickle.dumps(results)\n else:\n results = None\n qResults = cPickle.dumps(results)\n return qResults", "d...
[ "0.6215104", "0.5766029", "0.5742681", "0.57376796", "0.56941646", "0.5663792", "0.5624949", "0.5558396", "0.5548996", "0.55322397", "0.55096585", "0.5504129", "0.54955757", "0.54347366", "0.5416373", "0.5400906", "0.536496", "0.5363302", "0.53601617", "0.5337387", "0.5325546...
0.5694889
4
Build a new dict so that the data can be JSON serializable
def make_ndb_return_data_json_serializable(data): result = data.to_dict() record = {} # Populate the new dict with JSON serializiable values for key in result.iterkeys(): if isinstance(result[key], datetime.datetime): record[key] = result[key].isoformat() continue ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def as_dict(self) -> dict[str, Any]:\n return {\n \"type\": self.type,\n \"timestamp\": self.timestamp,\n \"data\": self.data or {},\n }", "def to_dict(self) -> Dict:\n obj = super().to_dict()\n obj['values'] = self.values\n return obj", "def ...
[ "0.68644804", "0.67345625", "0.66815794", "0.6653987", "0.661725", "0.65883857", "0.6576611", "0.65699446", "0.65687215", "0.6557158", "0.6544177", "0.65357584", "0.6521566", "0.6508762", "0.649658", "0.64861465", "0.6482451", "0.6482451", "0.6480924", "0.64330506", "0.642630...
0.6570601
7
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
Set author first name initial
def _set_first_initial(self, force=False): if self.first_initial and not force: return self.first_initial = ' '.join([c[0] for c in self.first_name.split()])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def author_name(self, author_name):\n\n self._author_name = author_name", "def first_name(self, name):\n self._first_name = name", "def first_name_and_initial(self):\n return u\"{} {}\".format(self.pref_first_name(), self.last_name[0])", "def _get_first_author(self):\n if not len(...
[ "0.7323572", "0.71771324", "0.70817894", "0.7054424", "0.7022617", "0.7003764", "0.6919942", "0.6896514", "0.6873318", "0.68670076", "0.68632287", "0.6860131", "0.68508995", "0.6757529", "0.6736017", "0.67150563", "0.67113507", "0.67113507", "0.670267", "0.6662656", "0.666265...
0.6821622
13
Return author formated full name, e.g. Maupetit J
def get_formatted_name(self): return '%s %s' % (self.last_name, self.first_initial)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_author_full_name(self, obj):\n return obj.author.get_full_name()", "def author(self) -> str:\n return pulumi.get(self, \"author\")", "def get_short_name(self):\n split = self.name.split(' - ')\n # author, year, and first couple of words of paper title\n return \"{} ({...
[ "0.82585573", "0.77515906", "0.7608914", "0.75679374", "0.75590986", "0.736285", "0.73591524", "0.73569363", "0.73169523", "0.73169523", "0.7259127", "0.72563523", "0.7227451", "0.7207076", "0.7200211", "0.7180581", "0.71690756", "0.7159358", "0.714601", "0.70617265", "0.7046...
0.0
-1
Look for local django user based on human name
def _set_user(self): if '' in (self.last_name, self.first_name): return self._set_first_initial() User = get_user_model() try: self.user = User.objects.get( models.Q(last_name__iexact=self.last_name), models.Q(first_name__iexact=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def usernameFind(self):\r\n return self.username()", "def find_user(user_name):\n return User.find_by_user_name(user_name)", "def _user_from_name_or_email(username_or_email):\r\n username_or_email = strip_if_string(username_or_email)\r\n\r\n if '@' in username_or_email:\r\n return User.o...
[ "0.6567877", "0.65613717", "0.6539821", "0.64463395", "0.6416921", "0.63903224", "0.6369646", "0.6352932", "0.6349323", "0.6345395", "0.634484", "0.63361585", "0.63224024", "0.63217324", "0.62943405", "0.62787086", "0.6234388", "0.6217391", "0.6210545", "0.6195787", "0.618779...
0.5708707
99
Format entry with a default bibliography style
def __unicode__(self): # Authors author_str = '%(last_name)s %(first_initial)s' s = ', '.join([author_str % a.__dict__ for a in self.get_authors()]) s = ', and '.join(s.rsplit(', ', 1)) # last author case s += ', ' # Title s += '"%(title)s", ' % self.__dict__ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def format_bib_entry(e: BibDocument):\n if e.bibtex is not None:\n b = e.bibtex\n s = fix_string(b.get('title', b.get('ID', '?'))) + '\\n'\n s += format_author(b.get('author', b.get('editor', '?'))) + ' ' + b.get('year', '')\n if len(e.filepaths) > 0:\n s += ' [PDF]'\n ...
[ "0.7411567", "0.69221437", "0.6217476", "0.61077625", "0.61064523", "0.60556054", "0.5987748", "0.592009", "0.590796", "0.5846889", "0.58392334", "0.5790335", "0.57841504", "0.575899", "0.57537985", "0.57427317", "0.57351536", "0.5686892", "0.5663739", "0.5643611", "0.5634517...
0.0
-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 is the function which is called from the main method. Redirection handling is done here based on returned values from other functions
def smart_client(uri): original_uri = uri http = "1.0" use_https = check_https(uri) redir = True count = 0 u_p = True while redir: response_status, \ response_headers, \ highest_http, \ redirect, \ location, \ new_https, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main():\n inputs = []\n files = set()\n\n args = parseArguments()\n\n # Configure the stdout logger\n logging.basicConfig(format=\"%(filename)s: %(levelname)s: %(message)s\",\n level=logging.DEBUG)\n\n try:\n # Create a list of input format objects\n for gcsv in args.gcs...
[ "0.5755369", "0.56499326", "0.5628064", "0.56229633", "0.560184", "0.55084866", "0.5496683", "0.5468766", "0.54514056", "0.54514056", "0.53364265", "0.53364265", "0.53364265", "0.53364265", "0.53364265", "0.53364265", "0.53364265", "0.53364265", "0.53364265", "0.53364265", "0...
0.0
-1
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
Used by pipeline. Necessary when dealing with multiple input ports
def FillInputPortInformation(self, port, info): # all are tables so no need to check port info.Set(self.INPUT_REQUIRED_DATA_TYPE(), "vtkTable") return 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def processInputs(self):", "def __init__(__self__, *,\n from_port: pulumi.Input[int],\n to_port: pulumi.Input[int]):\n pulumi.set(__self__, \"from_port\", from_port)\n pulumi.set(__self__, \"to_port\", to_port)", "def get_number_of_output_ports(self):\n retu...
[ "0.64459944", "0.625526", "0.6248811", "0.62121683", "0.6181329", "0.6100554", "0.60476756", "0.5961336", "0.5931539", "0.5907093", "0.58822894", "0.58620906", "0.58542335", "0.5853043", "0.58156896", "0.58087647", "0.58058053", "0.5786404", "0.5725807", "0.5700029", "0.56195...
0.0
-1
Used by pipeline to generate output
def RequestData(self, request, inInfo, outInfo): # Inputs from different ports: pdi0 = self.GetInputData(inInfo, 0, 0) pdi1 = self.GetInputData(inInfo, 1, 0) pdo = self.GetOutputData(outInfo, 0) pdo.DeepCopy(pdi0) # Get number of rows nrows = pdi0.GetNumberOfRow...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _generate_output(self):\n raise NotImplementedError()", "def write_output(self):", "def outputs(self):\n pass", "def _populate_output(self):\n pass", "def collect_output(self):\n pass", "def collect_output(self):\n pass", "def output(self):\r\n self.logic ( )\r...
[ "0.7615837", "0.73535603", "0.72271895", "0.7095047", "0.6970138", "0.6970138", "0.69010055", "0.68070275", "0.67311907", "0.6730409", "0.66625345", "0.66403157", "0.6595656", "0.65816605", "0.6573563", "0.6573563", "0.6573563", "0.6573563", "0.65275764", "0.6520451", "0.6491...
0.0
-1
Internal helper to perfrom the reshape
def _Reshape(self, pdi, pdo): # Get number of columns cols = pdi.GetNumberOfColumns() # Get number of rows rows = pdi.GetColumn(0).GetNumberOfTuples() if len(self.__names) is not 0: num = len(self.__names) if num < self.__ncols: for i in r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reshape(data):\n return K.reshape(x=data, shape=(K.shape(data)[0], 1, reshape_size))", "def _reshape(self, arr: np.ndarray) -> np.ndarray:\n return arr.reshape(self.TileHeight.value, self.TileWidth.value, self.bands,)", "def reshape(self, *shape):\n return F.Reshape.apply(self, sha...
[ "0.7144847", "0.68330306", "0.6810042", "0.663358", "0.65176374", "0.6502568", "0.6428562", "0.6419787", "0.6401154", "0.63567775", "0.6333695", "0.63271326", "0.6304994", "0.6303932", "0.6302932", "0.62272435", "0.62223023", "0.61971766", "0.6173259", "0.61662495", "0.615951...
0.60213363
28
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
Use to append a name to the list of data array names for the output table.
def AddName(self, name): self.__names.append(name) self.Modified()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def append(self, narray, name):\n if narray is NoneArray:\n # if NoneArray, nothing to do.\n return\n\n added = False\n if not isinstance(narray, VTKCompositeDataArray): # Scalar input\n for ds in self.DataSet:\n ds.GetAttributes(self.Association...
[ "0.5988727", "0.58012074", "0.56854564", "0.56484556", "0.5633105", "0.5623627", "0.55826586", "0.5524948", "0.54935294", "0.5478021", "0.5474341", "0.54661304", "0.54569197", "0.5453789", "0.54530656", "0.5418614", "0.5380218", "0.5361656", "0.5359868", "0.5359625", "0.53534...
0.0
-1
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
Set the number of rows for the output ``vtkTable``
def SetNumberOfRows(self, nrows): if isinstance(nrows, float): nrows = int(nrows) if self.__nrows != nrows: self.__nrows = nrows self.Modified()
{ "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 setNumRows(serDisplay, rows):\n cmd = array.array('B', (124,0...
[ "0.69697976", "0.69400305", "0.67426425", "0.6337014", "0.62214696", "0.6137355", "0.6128068", "0.6114174", "0.61094636", "0.60945934", "0.59596753", "0.59596753", "0.59561414", "0.5952081", "0.59400713", "0.5908973", "0.5877149", "0.585046", "0.5849349", "0.5849035", "0.5816...
0.6433899
3
Set the reshape order (``'C'`` of ``'F'``)
def SetOrder(self, order): if self.__order != order: self.__order = order self.Modified()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def output_reshape(ct):\n return np.moveaxis(ct, 1, -1)", "def _optimizeshape(shape):\n shape.sort()\n if ORDER == 'C':\n shape[:] = shape[::-1]", "def change_orientation(self):\n self.shape = self.shape.T", "def reorderEigenspaces(self, *order):\n order = self._reor...
[ "0.56006664", "0.5536408", "0.534123", "0.52923334", "0.5150682", "0.5138542", "0.5106645", "0.50824875", "0.5078592", "0.5048254", "0.5010744", "0.49845436", "0.4983413", "0.49833164", "0.49573484", "0.4957227", "0.49509206", "0.49305683", "0.49204037", "0.48952043", "0.4872...
0.0
-1
Used by pipeline to generate output
def RequestData(self, request, inInfo, outInfo): # Inputs from different ports: pdi = self.GetInputData(inInfo, 0, 0) table = self.GetOutputData(outInfo, 0) # Note user has to select a single array to save out field, name = self.__inputArray[0], self.__inputArray[1] vtk...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _generate_output(self):\n raise NotImplementedError()", "def write_output(self):", "def outputs(self):\n pass", "def _populate_output(self):\n pass", "def collect_output(self):\n pass", "def collect_output(self):\n pass", "def output(self):\r\n self.logic ( )\r...
[ "0.76157534", "0.7353986", "0.72273624", "0.70952", "0.69702864", "0.69702864", "0.6901308", "0.68081224", "0.67318356", "0.6731069", "0.6662458", "0.6640859", "0.6595182", "0.65812975", "0.65740347", "0.65740347", "0.65740347", "0.65740347", "0.6528857", "0.6521222", "0.6492...
0.0
-1
Used to set the input array(s)
def SetInputArrayToProcess(self, idx, port, connection, field, name): if self.__inputArray[0] != field: self.__inputArray[0] = field self.Modified() if self.__inputArray[1] != name: self.__inputArray[1] = name self.Modified() return 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def array(self, src) -> None:\n self.set_array(src)", "def set_params(self, arr):\n self.arr = arr", "def setUniformValueArray(self, *__args): # real signature unknown; restored from __doc__ with multiple overloads\n pass", "def array(self, array):\n\n self._array = array", "def...
[ "0.7241959", "0.7219714", "0.68609273", "0.6672674", "0.6511627", "0.64334154", "0.64316237", "0.6391575", "0.6360614", "0.6334181", "0.62941873", "0.62733847", "0.6226461", "0.62186706", "0.6136797", "0.6098933", "0.6078015", "0.6034682", "0.6034682", "0.6034682", "0.6034682...
0.66184026
6
Used to set the input array(s)
def SetInputArrayToProcess(self, idx, port, connection, field, name): if self.__inputArray[0] != field: self.__inputArray[0] = field self.Modified() if self.__inputArray[1] != name: self.__inputArray[1] = name self.Modified() return 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def array(self, src) -> None:\n self.set_array(src)", "def set_params(self, arr):\n self.arr = arr", "def setUniformValueArray(self, *__args): # real signature unknown; restored from __doc__ with multiple overloads\n pass", "def array(self, array):\n\n self._array = array", "def...
[ "0.7240696", "0.721781", "0.6860336", "0.6669498", "0.65123177", "0.6434082", "0.64325017", "0.63909864", "0.6359503", "0.63352495", "0.62932074", "0.6274183", "0.6225836", "0.621846", "0.61331207", "0.60983515", "0.60760087", "0.6032754", "0.6032754", "0.6032754", "0.6032754...
0.6619196
5
Creates new schema or creates new version and updates next_version of previous
def create(self, validated_data): if validated_data['version'] > 1: # Viewset's get_serializer() will always add 'version' with transaction.atomic(): current = RecordSchema.objects.get(record_type=validated_data['record_type'], next...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def upgrade_schema():\n\n db_version = get_db_version()\n try:\n while db_version < CURRENT_DATABASE_VERSION:\n db_version += 1\n upgrade_script = 'upgrade_to_'+str(db_version)\n globals()[upgrade_script]()\n except KeyError as e:\n logging.exception('Attempt...
[ "0.7260953", "0.67752755", "0.6296328", "0.6292026", "0.6222661", "0.61200744", "0.6024229", "0.5977015", "0.5931262", "0.59245014", "0.5897773", "0.58668256", "0.5809811", "0.5774801", "0.5773382", "0.5700059", "0.56862545", "0.5684552", "0.5684552", "0.56727153", "0.5633165...
0.56990176
16
Due to the way our merging works, if this schema has any defaults they will clobber potentially useful values in the backing manifest. 227
def test_does_not_contain_defaults(): to_process = [(CONFIG_JSON_SCHEMA, ())] while to_process: schema, route = to_process.pop() # Check this value if isinstance(schema, dict): if 'default' in schema: raise AssertionError( 'Unexpected defau...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def merge_schema(self, schema):\n self.validate_schema(schema)\n\n if self.exclusive is False:\n self.exclusive = schema.exclusive\n\n if self.default is None:\n self.default = schema.default", "def _add_to_schema(self, new: dict):\n self._defaults.update(new)\n ...
[ "0.6092501", "0.5738518", "0.5725758", "0.5545568", "0.5352203", "0.5305392", "0.52949214", "0.5261467", "0.5245125", "0.52413476", "0.52342093", "0.52113444", "0.52074134", "0.51651245", "0.51092094", "0.51080793", "0.5104977", "0.5098712", "0.5086971", "0.5076587", "0.50538...
0.51478
14
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
Implements FTRL with rescaled gradients and linearithmic regularizer.
def __init__(self, params): defaults = {} super(Regralizer, self).__init__(params, defaults)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def apply_regularization(self, w, loss, gradient, regularization, lambda_, m):\n if regularization == 'l2':\n loss += lambda_ / (2 * m) * np.squeeze(w.T.dot(w))\n gradient += lambda_ / m * w\n elif regularization == 'l1':\n loss += lambda_ / (2 * m) * np.sum(np.abs(w)...
[ "0.6043861", "0.59705585", "0.5945837", "0.5887921", "0.585111", "0.5839", "0.5834819", "0.582763", "0.5718077", "0.57092035", "0.5691352", "0.5689245", "0.5647996", "0.5641125", "0.5615204", "0.56046516", "0.55929756", "0.55704355", "0.55497617", "0.553497", "0.5526624", "...
0.0
-1
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
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( [c[0] for c in self.col_regexps])) for col_name, c_re in self.col_regexps: if col_name n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate(self):\n super().validate()\n frame = getattr(self, 'frame', None)\n if frame is None:\n raise ValueError('Missing columns %s since no frame' % ', '.join(\n self.required_cols))\n cols = set(list(self.frame))\n missing = sorted(self.required...
[ "0.8549901", "0.7896959", "0.75633276", "0.7367074", "0.7239867", "0.70361763", "0.70298463", "0.6977291", "0.68799907", "0.67940336", "0.6645067", "0.6627117", "0.6622096", "0.65550065", "0.650822", "0.64810985", "0.6462903", "0.6459277", "0.6440878", "0.64331204", "0.641338...
0.73491883
4
Create an S3Backend instance.
def get_backend(cls, backend=None): return backend if backend else aws.S3Backend( category=cls.default_category, bucket_name=cls.default_bucket)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_s3(sitename):\n return s3.S3(sitename)", "def s3_create_bucket(self):\n self.conn.create_bucket(DEFAULT_BUCKET_NAME)", "def get_s3_client():\n return boto3.resource('s3')", "def s3_bucket(s3_server): # pylint: disable=redefined-outer-name\n client = s3_server.get_s3_client()\n bu...
[ "0.67337704", "0.67020965", "0.64005727", "0.6341852", "0.6122109", "0.60842115", "0.6067415", "0.6063343", "0.6048431", "0.6045403", "0.604531", "0.60147995", "0.5989435", "0.596969", "0.5956802", "0.5870337", "0.5861566", "0.5846471", "0.58433914", "0.58393073", "0.5824821"...
0.6487786
2
This function returns train and test data and amount of different classes
def get_data(numbers): numbers = numbers n_classes = len(numbers) z = zipfile.ZipFile('lab3/mnist.pkl.zip', 'r') k = z.extract('mnist.pkl') # Извлечь файл из архива with open(k, 'rb') as f: train_set, _, test_set = pickle.load(f, encoding="bytes") x_train = train_set[0] x_te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def num_training_examples(self):", "def get_num_classes(self):", "def num_classes():\n return NUM_CLASSES", "def get_num_classes(dataset: str):\n if dataset == \"imagenet\" or dataset == \"kitti\":\n return 1000\n elif dataset == \"cifar10\" or dataset == \"mnist\" or dataset == \"fashion_mni...
[ "0.75494504", "0.7527431", "0.7394811", "0.72946763", "0.69094735", "0.6897226", "0.6870488", "0.67837375", "0.668422", "0.6665446", "0.6654703", "0.6577999", "0.65736794", "0.65736794", "0.6543151", "0.6542344", "0.6535379", "0.6532243", "0.6501701", "0.6497568", "0.6497568"...
0.6272706
40
This function calculates init p(k|x) and p(k)
def init_parameters(data, n_classes): N = data.shape[0] K = n_classes D = data.shape[1] init_p_k_x = np.zeros((K,)) matrix = np.random.rand(N, K) matrix /= matrix.sum(axis=1)[:, np.newaxis] for i in range(K): init_p_k_x[i] = sum(matrix[:, i]) / matrix.shape[0] p_k_x_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_parameters(X: np.ndarray, k):\n idx = np.random.choice(X.shape[0], k, replace=False)\n mu = X[idx]\n sigma = compute_sigma(X, mu)\n pi = np.ones(k) / k\n return mu, sigma, pi", "def _compute_parameters(self, p, k):\n for i in range(self._.d + 1):\n p[0, i, i] = k[i...
[ "0.66798216", "0.6609475", "0.66066784", "0.6502079", "0.64455104", "0.642912", "0.641136", "0.6377091", "0.61414003", "0.6138719", "0.612936", "0.6117516", "0.610951", "0.59979415", "0.5979644", "0.5978313", "0.5893618", "0.58717704", "0.5866976", "0.58425736", "0.5841052", ...
0.61180997
11
This function performs Maximization Step of the EMalgorithm
def m_step(data, p_k_x): N = data.shape[0] D = data.shape[1] K = p_k_x.shape[1] Nk = np.sum(p_k_x, axis=0) p_i_j_new = np.empty((K, D)) for k in range(K): p_i_j_new[k] = np.sum(p_k_x[:, k][:, np.newaxis] * data, axis=0) / Nk[k] return Nk / N, p_i_j_new
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run_em(self, maxiter=400, tol=1e-4, verbose=True, regularization=0.0):\n self.means = self.means.T\n\n L = None\n for i in xrange(maxiter):\n newL = self._expectation()\n if i == 0 and verbose:\n print(\"Initial NLL =\", -newL)\n\n self._maxi...
[ "0.6474297", "0.64715934", "0.63503337", "0.6318457", "0.62608415", "0.6227241", "0.60013664", "0.5978136", "0.58662164", "0.5829126", "0.5817829", "0.58153695", "0.5807976", "0.5776075", "0.5764646", "0.57643855", "0.57546365", "0.5753092", "0.5744375", "0.57314605", "0.5702...
0.0
-1
This function performs Expectation Step of the EMalgorithm
def e_step(data, p_k, p_i_j): N = data.shape[0] K = p_i_j.shape[0] p_k_x = np.empty((N, K)) for i in range(N): for k in range(K): p_k_x[i, k] = np.prod((p_i_j[k] ** data[i]) * ((1 - p_i_j[k]) ** (1 - data[i]))) p_k_x *= p_k p_k_x /= p_k_x.sum(axis=1)[:, np.newaxis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __em(self, x):\n _, log_resp = self._e_step(x)\n\n pi, mu, var = self._m_step(x, log_resp)\n\n self.__update_pi(pi)\n self.__update_mu(mu)\n self.__update_var(var)", "def e_step(self):\n # update VMF probabilities (Equation (3))\n logP = np.dot(self.features, ...
[ "0.63739145", "0.62474275", "0.61847925", "0.613631", "0.6098325", "0.6009017", "0.6005586", "0.5960616", "0.59229577", "0.5879187", "0.5849416", "0.58455557", "0.5838416", "0.58154655", "0.5804324", "0.5774335", "0.57677954", "0.57566774", "0.5727094", "0.5719774", "0.571922...
0.0
-1
This function performs EMalgorithm
def bernoulli_em_algorithm(data, n_classes, max_iters=100): N = data.shape[0] D = data.shape[1] K = n_classes # initializing init_p_k_x, init_p_k = init_parameters(data, K) p_k_x = e_step(data, init_p_k, init_p_k_x) for i in range(max_iters): # perform M Step p_k...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def em_mog(X, k, max_iter=20):\n\n # Initialize variables\n mu = None\n sigma = [np.eye(X.shape[1]) for i in range(k)]\n phi = np.ones([k,])/k\n ll_prev = float('inf')\n start = time.time()\n\n #######################################################################\n # TODO: ...
[ "0.6568218", "0.65053093", "0.6457587", "0.640457", "0.6350182", "0.6315953", "0.6213009", "0.61301386", "0.6121796", "0.60581744", "0.604855", "0.60376555", "0.59813815", "0.5941793", "0.59308505", "0.5916092", "0.5899629", "0.58466226", "0.5839338", "0.58202195", "0.5780968...
0.6138721
7
This functions calculates predictions for test data and calculates mean squared error
def predict(data, labels, p_k, p_i_j, numbers): pred = e_step(data, p_k, p_i_j).argmax(axis=1) for j in range(len(numbers)): for i in range(len(pred)): if pred[i] == j: pred[i] = numbers[j] print('metrics:', metrics.classification_report(labels, pred)) return p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run_analyses(y_predict_train, y_train, y_predict, y_test):\n # calculate metrics\n _, training_error = output_error(y_predict_train, y_train)\n (precision, recall, f1, _), testing_error = output_error(y_predict, y_test)\n \n # print out metrics\n print 'Average Precision:',...
[ "0.74832344", "0.73980325", "0.72532654", "0.71508014", "0.71508014", "0.7138027", "0.71137744", "0.710535", "0.70594305", "0.70295507", "0.70254856", "0.69821894", "0.69704026", "0.695812", "0.6956206", "0.69433063", "0.68771243", "0.68710256", "0.6835331", "0.68330276", "0....
0.0
-1
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
Convolutional model with dropout for EMNIST experiments.
def create_conv_dropout_model(num_classes: int, seed: Optional[int] = None): data_format = 'channels_last' if seed is not None: tf.random.set_seed(seed) model = tf.keras.models.Sequential([ tf.keras.layers.Conv2D( 32, kernel_size=(3, 3), activation='relu', data_f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dropout_keras_model():\n\n inputs = tf.keras.Input(shape=(10, 10, 3,))\n x = tf.keras.layers.Conv2D(16, (3, 3))(inputs)\n x = tf.keras.layers.Dropout(rate=.4)(x)\n x = tf.identity(x)\n x = tf.keras.layers.Conv2D(8, (2, 2))(x)\n x = tf.keras.layers.Flatten()(x)\n outputs = tf.keras.layers.D...
[ "0.6676039", "0.6343185", "0.6315899", "0.63006896", "0.6291182", "0.62849694", "0.6277511", "0.6254841", "0.6247444", "0.62473774", "0.6212494", "0.6209054", "0.6208818", "0.62064856", "0.6202018", "0.612881", "0.6127414", "0.61184245", "0.61167794", "0.6106968", "0.6086234"...
0.61856663
15
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
Configuring centralized runner spec.
def build_centralized_runner_spec( self) -> training_specs.RunnerSpecCentralized: task_spec = self._task_spec train_preprocess_fn = _create_preprocess_fn( num_epochs=1, batch_size=task_spec.batch_size, merge_case=self._merge_case, shuffle_buffer_size=task_spec.centralized...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def runner_setup():\n runner = ClassicRunner()\n yield runner", "def test_configurator(self):\n runner = Runner(YamlManifest(manifest))\n run1 = runner.run(JobOptions(resource=\"test1\"))\n assert not run1.unexpectedAbort, run1.unexpectedAbort.getStackTrace()\n assert len(run1.w...
[ "0.71298325", "0.6979565", "0.6711335", "0.6575954", "0.6558287", "0.6379455", "0.636857", "0.636857", "0.636857", "0.6353171", "0.6317362", "0.6305636", "0.6305636", "0.62795645", "0.6226063", "0.61880255", "0.61236566", "0.61038077", "0.6095097", "0.6086364", "0.60816413", ...
0.5579558
88
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
Return a list of note objects in major
def mgChordMajor(value): chord = [MgNote(value), MgNote(value) + 4, MgNote(value) + 7] return chord
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def listNotes() -> list:\n list_of_notes = []\n for note in Note.objects.all():\n list_of_notes.append({\n 'uuid': note.uuid, 'title': note.title,\n 'author': note.author, 'body': note.body, 'created_at': localtime(note.created_at)\n })\n return list_of_notes", "def n...
[ "0.69472075", "0.6502322", "0.64504087", "0.63504153", "0.6300085", "0.62833136", "0.6271847", "0.62041575", "0.6133791", "0.61144036", "0.60960543", "0.605202", "0.6051364", "0.60231435", "0.6019179", "0.6019179", "0.60149145", "0.59323066", "0.5914525", "0.59088063", "0.590...
0.0
-1
Return a list of note objects in minor
def mgChordMinor(value): chord = [MgNote(value), MgNote(value) + 3, MgNote(value)+7] return chord
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def listNotes() -> list:\n list_of_notes = []\n for note in Note.objects.all():\n list_of_notes.append({\n 'uuid': note.uuid, 'title': note.title,\n 'author': note.author, 'body': note.body, 'created_at': localtime(note.created_at)\n })\n return list_of_notes", "def n...
[ "0.6403214", "0.63809764", "0.631014", "0.62889194", "0.61292934", "0.61097884", "0.605849", "0.6053666", "0.6009318", "0.5971191", "0.593564", "0.59113747", "0.5908884", "0.5889423", "0.5875394", "0.5820836", "0.5792839", "0.5787869", "0.57424015", "0.5723736", "0.5721369", ...
0.0
-1
Return a list of note objects in diminished
def mgChordDiminished(value): chord = [MgNote(value), MgNote(value) + 3, MgNote(value) + 6] return chord
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_note():\n\n return Note.query.all()", "def notes(self):\n return reapy.NoteList(self)", "def listNotes() -> list:\n list_of_notes = []\n for note in Note.objects.all():\n list_of_notes.append({\n 'uuid': note.uuid, 'title': note.title,\n 'author': note.autho...
[ "0.6918545", "0.68457854", "0.67542857", "0.6423082", "0.6351363", "0.633306", "0.6201348", "0.6194495", "0.6162774", "0.6150949", "0.61312294", "0.6117048", "0.60784066", "0.60784066", "0.602897", "0.59813625", "0.59791195", "0.59717655", "0.59624857", "0.593649", "0.590595"...
0.0
-1
Return a list of note objects in augmented
def mgChordAugmented(value): chord = [MgNote(value), MgNote(value) + 4, MgNote(value) + 8] return chord
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def augment(self):\n for n in self.notes:\n n.augment()", "def notes(self):\n return reapy.NoteList(self)", "def add_notes(self, notes):\n if hasattr(notes, \"notes\"):\n for x in notes.notes:\n self.add_note(x)\n return self.notes\n e...
[ "0.7549341", "0.6924999", "0.64609313", "0.6448983", "0.6341835", "0.6265768", "0.6224044", "0.61404175", "0.6124106", "0.6078764", "0.60639954", "0.6008974", "0.6008974", "0.60029846", "0.59637725", "0.59542704", "0.5905439", "0.5901639", "0.58900833", "0.58588296", "0.58077...
0.0
-1
Return a list of note based on chord
def mgChord(value, chord): ret = None if chord == 'M': ret = mgChordMajor(value) elif chord == 'm': ret = mgChordMinor(value) elif chord == 'dim': ret = mgChordDiminished(value) elif chord == 'aug': ret = mgChordAugmented(value) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_chord(key: str, starting_note: int, chord: str) -> List[int]:\n assert key in constants.NOTES_FOR_KEY, f\"Invalid key: {key}.\"\n assert (\n starting_note in constants.NOTES_FOR_KEY[key]\n ), f\"Note {starting_note} not in key {key}.\"\n assert chord in constants.STEPS_FOR_CHORD, f\"Inva...
[ "0.74840385", "0.71133006", "0.6987371", "0.6944393", "0.69076145", "0.662363", "0.6594826", "0.6532851", "0.641009", "0.62176156", "0.6167714", "0.61373204", "0.61218643", "0.6079255", "0.60533977", "0.59837556", "0.5976758", "0.5965469", "0.5926441", "0.5900762", "0.5892764...
0.5303932
75
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
Check a SIMULATED phylogeny for consistency with its backbone source tree and a taxonomy. The SIMULATED phylogeny should have been generated by the tact_add_taxa script. All phylogenies should be in Newick format.
def main(simulated, backbone, taxonomy, output, cores, chunksize): pool = multiprocessing.Pool(processes=cores) click.echo("Using %d parallel cores" % cores, err=True) taxonomy = dendropy.Tree.get_from_path(taxonomy, schema="newick") tn = taxonomy.taxon_namespace click.echo("Taxonomy OK", err=True) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_calc_shared_phylotypes(self):\r\n\r\n observed = calc_shared_phylotypes(self.biom_as_string)\r\n expected = \"\"\"\\tS1\\tS2\\tS3\r\nS1\\t5\\t2\\t3\r\nS2\\t2\\t2\\t1\r\nS3\\t3\\t1\\t3\\n\"\"\"\r\n self.assertEqual(observed, expected)", "def test_check_tree_exact_match(self):\r\n\r\n...
[ "0.5643234", "0.5496658", "0.5485725", "0.54545605", "0.5438682", "0.5353483", "0.53417605", "0.5323132", "0.52515745", "0.52508986", "0.52369666", "0.51995516", "0.5156391", "0.5128606", "0.51240194", "0.5093063", "0.50914335", "0.5089271", "0.5042017", "0.5032846", "0.50174...
0.0
-1
Reshape a numpy array, which is input_shape=(height, width), as opposed to input_shape=(width, height) for cv2
def np_resize(img, input_shape): height, width = input_shape return cv2.resize(img, (width, height))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def img_reshape(self, input_img):\n _img = np.transpose(input_img, (1, 2, 0)) \n _img = np.flipud(_img)\n _img = np.reshape(_img, (1, img_dim[0], img_dim[1], img_dim[2]))\n return _img", "def numpyReshape(array):\n return np.array(array, dtype = float).reshape(1, len(array))",...
[ "0.75424194", "0.75378686", "0.75035334", "0.7405382", "0.7378981", "0.7117111", "0.70272535", "0.6998127", "0.6938943", "0.6895453", "0.68916667", "0.6878874", "0.6737582", "0.667375", "0.6638827", "0.6624398", "0.6608408", "0.65904003", "0.654305", "0.65211385", "0.64932525...
0.72959924
5
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
Display information about pet
def describe_pets(animal_type, pet_name): print(f"\nI have a {animal_type}.") print(f"My {animal_type}'s name is {pet_name.title()}")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def show_pet(self):\n pet = self.pet_factory.get_pet()\n print \"We have a lovely {}\".format(pet)\n print \"It says {}\".format(pet.speak())\n print \"We also have {}\".format(self.pet_factory.get_food())", "def show_pet(self):\n pet = self.pet_factory.get_pet()\n\n pri...
[ "0.814422", "0.81127334", "0.7560209", "0.7560209", "0.7560209", "0.7560209", "0.7532049", "0.7495639", "0.7495639", "0.7481198", "0.74389154", "0.7438613", "0.7393894", "0.7373882", "0.7327594", "0.7288435", "0.7232166", "0.7204182", "0.7189433", "0.71606326", "0.6922216", ...
0.75088006
8
Returns a normalized data. If the data embed a numpy data or a dataset it is returned. Else returns the input data.
def _normalizeData(data): if isinstance(data, H5Node): if data.is_broken: return None return data.h5py_object return data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalizeData(self, data):\n return _normalizeData(data)", "def normalizeData(self, data):\n return _normalizeData(data)", "def normalized_data(self):\n return self._data", "def normalize_dataset(self):", "def normalized_data(self):\n return self._normalization_constant * se...
[ "0.72648424", "0.72648424", "0.71091664", "0.7035169", "0.6851011", "0.6670504", "0.6645314", "0.6523729", "0.6430414", "0.64292383", "0.6396991", "0.6373839", "0.63612485", "0.63536185", "0.6324898", "0.6320754", "0.6300311", "0.6296813", "0.629189", "0.6264069", "0.6258603"...
0.6096874
27
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
Returns a normalized data if the embed a numpy or a dataset. Else returns the data.
def normalizeData(self, data): return _normalizeData(data)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalize_dataset(self):", "def denormalise_0_1(value_or_array, array_min, array_max):\n if isinstance(value_or_array, list):\n raise ValueError('this function accepts arraylike data, not a list. '\n 'Please check data or convert list to numpy array')\n elif isinstance(va...
[ "0.6411453", "0.6259078", "0.6019786", "0.59921646", "0.57862496", "0.5763898", "0.5716769", "0.571654", "0.56771535", "0.56653965", "0.56437415", "0.5640771", "0.56243145", "0.56201", "0.55731094", "0.555722", "0.5551846", "0.55445325", "0.55431825", "0.5495918", "0.5480445"...
0.57240814
7
Returns a colormap for this view.
def getColormap(self, view): return None
{ "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.8298571", "0.8298571", "0.81955755", "0.81955755", "0.8056556", "0.7981543", "0.764267", "0.76329446", "0.756393", "0.7444203", "0.7027589", "0.6996905", "0.6950566", "0.6934548", "0.6839568", "0.66553605", "0.65015465", "0.65008515", "0.65008515", "0.6488026", "0.6488026"...
0.7707698
6
Returns a color dialog for this view.
def getColormapDialog(self, view): return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def defaultColorDialog(self):\n dialog = None\n if self.__hooks is not None:\n dialog = self.__hooks.getColormapDialog(self)\n if dialog is None:\n dialog = ColormapDialog()\n dialog.setModal(False)\n return dialog", "def colorPickerDialog(self, curren...
[ "0.75629133", "0.68842196", "0.62867564", "0.6189634", "0.61299944", "0.6009618", "0.59474766", "0.58456355", "0.5730012", "0.5706063", "0.57012826", "0.5627111", "0.55824256", "0.55625993", "0.5549173", "0.5520978", "0.55189264", "0.5484155", "0.546726", "0.5448726", "0.5443...
0.62007624
3
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
Set the data view hooks to use with this view.
def setHooks(self, hooks): self.__hooks = hooks
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setHooks(self, hooks):\n super(SelectOneDataView, self).setHooks(hooks)\n if hooks is not None:\n for v in self.__views:\n v.setHooks(hooks)", "def setHooks(self, hooks):\n super(SelectManyDataView, self).setHooks(hooks)\n if hooks is not None:\n ...
[ "0.7749455", "0.762406", "0.6071119", "0.60160655", "0.5796744", "0.5793318", "0.5742086", "0.57116985", "0.5485993", "0.53418344", "0.52981484", "0.5218101", "0.52134025", "0.52093846", "0.51925564", "0.5186529", "0.51696926", "0.51528996", "0.515082", "0.51220757", "0.51081...
0.6966032
2
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 default icon
def icon(self): return self.__icon
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def icon(self):\n return DEFAULT_ICON", "def icon(self):\n return None", "def icon(self):\n return None", "def icon(self):\n return ICON", "def icon(self):\n return ICON", "def icon(self):\n return ICON", "def icon(self):\n return ICON", "def icon(self...
[ "0.8951425", "0.8020554", "0.8020554", "0.7916969", "0.7916969", "0.7916969", "0.7916969", "0.7916969", "0.7916969", "0.7916969", "0.7916969", "0.7916969", "0.7916969", "0.7746288", "0.7746288", "0.77171725", "0.7693508", "0.7670877", "0.76192194", "0.7585411", "0.7554771", ...
0.74875426
25
Returns the default label
def label(self): return self.__label
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default_label(self) -> str:\n return self.settings[\"default_label\"]", "def Label(self, default=None):\n return self.data.get('label', default)", "def Label(self, default=None):\n return self.data.get('label', default)", "def _get_label(self):\n return self.label", ...
[ "0.88785267", "0.8536957", "0.8536957", "0.7672459", "0.76072305", "0.7562238", "0.7522904", "0.7505501", "0.7505501", "0.7505501", "0.7505501", "0.74452853", "0.7442264", "0.7435549", "0.74049765", "0.74049765", "0.74049765", "0.74049765", "0.74049765", "0.74049765", "0.7404...
0.7432878
15