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
Returns tuple of the form, (max_hit, accuracy), for the given levels after factoring in the weapons available and the selected attack style. Assumes enemy has level 1 defence and 0 defence bonus
def get_max_hit_and_accuracy( levels, attack_style, attack_bonus, strength_bonus): weapon_attack, weapon_strength = get_weapon_stats(levels.attack) attack_bonus += weapon_attack strength_bonus += weapon_strength if attack_style == Attack_Style.ATTACK: effective_attack = osrs.effective_l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_weapon_stats(attack_level):\n if attack_level >= 60:\n # Dragon scimitar\n return (67, 66)\n elif attack_level >= 40:\n # Rune scimitar\n return (45, 44)\n elif attack_level >= 30:\n # Adamant scimitar\n return (29, 28)\n elif attack_level >= 20:\n ...
[ "0.6369547", "0.6126176", "0.5764121", "0.5721204", "0.56999665", "0.56620437", "0.5656497", "0.5552577", "0.5546967", "0.554252", "0.5487898", "0.54512966", "0.5447283", "0.5400377", "0.53890437", "0.5385318", "0.5371194", "0.53344166", "0.532357", "0.5270881", "0.5253192", ...
0.8360239
0
Returns tuple of the form (attack_bonus, strength_bonus) for the best scimitar (weapon) at a given attack level. Scimitars are almost always the most efficient weapon
def get_weapon_stats(attack_level): if attack_level >= 60: # Dragon scimitar return (67, 66) elif attack_level >= 40: # Rune scimitar return (45, 44) elif attack_level >= 30: # Adamant scimitar return (29, 28) elif attack_level >= 20: # Mithril sci...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def most_powerful_weapon(self):\n # sets inital damge to 0\n max_damage = 0\n # sets the best weapon to nothing\n best_weapon = None\n # Loop for each item in inventory\n for item in self.inventory:\n # Code adapted from Make Your own Python Text Based Adventure...
[ "0.6914016", "0.66133755", "0.647129", "0.6280319", "0.6277309", "0.62479544", "0.6210469", "0.6196124", "0.6190553", "0.61680675", "0.60728323", "0.60306805", "0.6020015", "0.59235066", "0.5873241", "0.5860358", "0.5845829", "0.5792037", "0.57798666", "0.5775046", "0.5746795...
0.733018
0
Returns list of tuples of the form (level, max_hit) for levels between start_strength_level and end_strength_level that increase max_hit. Assumes start_strength_level < end_strength_level and no multipliers
def get_max_hit_increases( start_strength_level, end_strength_level, strength_bonus, stance_adder): greatest_max_hit = 0 max_hit_increases = [] cur_strength_level = start_strength_level while cur_strength_level < end_strength_level: effective_strength = osrs.effective_level( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_max_hit_and_accuracy(\n levels, attack_style, attack_bonus, strength_bonus):\n weapon_attack, weapon_strength = get_weapon_stats(levels.attack)\n attack_bonus += weapon_attack\n strength_bonus += weapon_strength\n\n if attack_style == Attack_Style.ATTACK:\n effective_attack = osrs...
[ "0.58623534", "0.56103396", "0.5589479", "0.556326", "0.5557862", "0.5534794", "0.5484521", "0.54517794", "0.5345242", "0.53201896", "0.5267493", "0.522973", "0.5207859", "0.5173894", "0.5169486", "0.51680756", "0.5166746", "0.5157776", "0.51527137", "0.51492393", "0.51178026...
0.79078573
0
Generates steric beads required for checking for steric clashes between motifs. Each residues has three beads modeled after the typical three bead models used in coarse grain modeling. The three beads are, Phosphate (P, OP1, OP2) Sugar (O5',C5',C4',O4',C3',O3',C1',C2',O2') and Base (All remaining atoms).
def get_beads(self): phos_atoms,sugar_atoms,base_atoms = [],[],[] for i,a in enumerate(self.atoms): if a is None: continue if i < 3: phos_atoms.append(a) elif i < 12: sugar_atoms.append(a) else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_bespoke_bond_smirks():\n gen = SmirksGenerator()\n mol = Molecule.from_smiles(\"CC\")\n\n bond_smirks = gen._get_bespoke_bond_smirks(molecule=mol)\n # there should be 2 unique bond smirks\n assert len(bond_smirks) == 2\n all_bonds = []\n for smirk in bond_smirks:\n atoms = cond...
[ "0.55873483", "0.54603845", "0.54429716", "0.5408802", "0.5403582", "0.5389649", "0.53191894", "0.5310863", "0.52691495", "0.52479964", "0.52202135", "0.5188183", "0.51712984", "0.5130737", "0.512443", "0.5119801", "0.5115056", "0.511297", "0.51073724", "0.51057136", "0.50982...
0.5812885
0
messages1 and messages2 represent the encoded headlines from two news sources corr represents the correlation between the two currently returns average correlation
def average_similarity(messages1, messages2): if np.array_equal(messages2, messages1): return 1 corr = np.corrcoef(messages1, messages2) return np.average(corr)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def corr(arr1, arr2):\n\n\n X = []\n Y = []\n for index in range(len(arr1)):\n if arr1[index] == None or arr2[index] == None:\n continue\n X.append(arr1[index])\n Y.append(arr2[index])\n\n\n r = np.corrcoef(X, Y)[0,1]\n f = 0.5*np.log((1+r)/(1-r))\n se = 1/np.sqrt(...
[ "0.6506768", "0.6241487", "0.61946344", "0.6189344", "0.6137197", "0.60439324", "0.589026", "0.5836525", "0.58354324", "0.58140975", "0.5799354", "0.575254", "0.5746967", "0.5743244", "0.57305694", "0.5727684", "0.5720525", "0.56870764", "0.5681944", "0.5680134", "0.56749845"...
0.6749743
0
represents messages as vectors which are used to calculate similarity
def find_similarity(message1, message2): total = 0 for i in range(len(message1)): max = 0 for j in range(len(message2)): message1_encoded = embed([message1[i]]) message2_encoded = embed([message2[j]]) sim = average_similarity(message1_encoded, message2_encoded...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wrapMsg(self,vec):\n return vec.todense()", "def plot_similarity(self) -> None:\n if isinstance(self.model, FastTextWrapper):\n self.valid_data[\"vector\"] = self.valid_data[\"text\"].apply(\n lambda x: self.model.inference(word_tokenize(x), sentence_level=True))\n ...
[ "0.6673192", "0.6187192", "0.6166319", "0.6151653", "0.60369694", "0.5990431", "0.59603184", "0.593852", "0.59355754", "0.5926192", "0.5897822", "0.58214325", "0.577277", "0.5761639", "0.57491434", "0.57217455", "0.570953", "0.5705797", "0.56846756", "0.56698257", "0.5666215"...
0.6307364
1
An iterator that will in turn yield all drawable curves in the form of (kind, name, ds, style) tuples (where kind is one of 'algorithm', 'oracle', 'unifpf', 'strategy').
def _pds_plot_iterator(pds, dim, funcId): i = 0 for (algname, ds) in pds.algds_dimfunc((dim, funcId)): yield ('algorithm', algname, ds, _style_algorithm(algname, i)) i += 1 yield ('oracle', 'oracle', pds.oracle((dim, funcId)), _style_oracle()) yield ('unifpf', 'eUNIF', pds.unifpf().dictB...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iter_svgs(self):\n for name in self.parent.layers:\n yield name, self.parent.layers[name]\n for elem in self.parent.elements:\n if isinstance(elem, SVG):\n yield None, elem", "def efficiency_curves(self):\n for key in self._efficiency_curves:\n ...
[ "0.625494", "0.62062955", "0.61237484", "0.5620857", "0.5553316", "0.54564095", "0.5426019", "0.5304748", "0.5274277", "0.5261457", "0.525136", "0.5238986", "0.521688", "0.5185847", "0.5158221", "0.5131699", "0.51237047", "0.5082937", "0.5075545", "0.5069475", "0.5063264", ...
0.6866871
0
Show a legend. obj can be an Axes or Figure (in that case, also pass handles and labels arguments).
def legend(obj, ncol=3, **kwargs): # Font size handling here is a bit weird. We specify fontsize=6 # in legend constructor since that affects spacing. However, we # need to manually override with 'small' later, because the original # specification did not take effect on whole-figure legends (and for ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def legend (self, **kwargs):\n axes = self.twin_axes or self.axes\n self.mpl_legend = axes.legend (self.mpl_lines, self.labels, **kwargs)", "def legend_extras(\n self, handles=None, labels=None, *, loc=None,\n frame=None, frameon=None, ncol=None, ncols=None,\n center=None, order='C', label...
[ "0.649047", "0.61699635", "0.6117448", "0.6017658", "0.59494585", "0.59489495", "0.59252846", "0.5908187", "0.58153063", "0.58062863", "0.5786078", "0.5747794", "0.5728206", "0.5683173", "0.56398714", "0.56154585", "0.5608667", "0.5580261", "0.5554319", "0.5549609", "0.554207...
0.723461
0
Plot each algorithm/method's rank evolving as budget increases. groupby is the method of aggregating results of multiple instances a callable, stringable object, GroupByMedian by default. Note that funcId may be an array of id numbers; in that case, an average rank over listed functions is taken.
def rank_by_budget(ax, pds, dim=None, funcId=None, groupby=None): if groupby is None: groupby = GroupByMedian() pfsize = len(pds.algds.keys()) try: # funcId is array? # _pds_plot_iterator[] uses funcId only for things we don't care for fakeFuncId = funcId[0] manyranking = np.array(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ranking(self, dimfun, groupby, ftarget=10**-8):\n nameds = list(itertools.chain(self.algds_dimfunc(dimfun), self.stratds_dimfunc(dimfun)))\n count = len(nameds)\n\n # Produce \"fv\" items, one per dataset, containing single function value\n # for each budget\n fvset = []\n ...
[ "0.63259864", "0.6046818", "0.53915054", "0.5336046", "0.5121077", "0.5051932", "0.48781553", "0.48333043", "0.48324347", "0.47948903", "0.47788268", "0.4766968", "0.47533748", "0.47356328", "0.47074386", "0.46614596", "0.46601972", "0.465941", "0.46516296", "0.46457088", "0....
0.7678806
0
Plot a rotated convergence plot. It is essentially like fval_by_budget(), but rotated by 90 degrees, showing how big budget is required to reach every target. While this is a little less intuitive at first, it allows better judgement of performance impact of each strategy. With fval_by_budget(), performance change is r...
def evals_by_target(ax, pds, baseline_ds=None, baseline_label="", dim=None, funcId=None, groupby=None): if groupby is None: groupby = GroupByMedian() pfsize = len(pds.algds.keys()) runlengths = 10**np.linspace(0, np.log10(pds.maxevals((dim, funcId))), num=500) target_values = pp.RunlengthBasedTargetVal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fval_by_budget(ax, pds, baseline_ds=None, baseline_label=\"\", dim=None, funcId=None, groupby=None):\n if groupby is None: groupby = GroupByMedian()\n pfsize = len(pds.algds.keys())\n\n if baseline_ds:\n baseline_budgets = baseline_ds.funvals[:, 0]\n baseline_funvals = groupby(baseline_d...
[ "0.57839125", "0.5279949", "0.50594544", "0.50512856", "0.50476915", "0.4997148", "0.4956228", "0.48934639", "0.4885822", "0.4879313", "0.48789495", "0.48726746", "0.48418292", "0.48268393", "0.48255506", "0.4809495", "0.47626424", "0.4736917", "0.47095123", "0.46958274", "0....
0.5902508
0
Plot the evolution of relative evaluations for a target based on increasing absolute evaluations. In other words, for each absolute number of evaluations, determine the target reached and show how faster did baseline reach it. groupby is the method of aggregating results of multiple instances a callable, stringable obj...
def evals_by_evals(ax, pds, baseline1_ds=None, baseline1_label="", baseline2_ds=None, baseline2_label="", dim=None, funcId=None, groupby=None): if groupby is None: groupby = GroupByMedian() pfsize = len(pds.algds.keys()) runlengths = 10**np.linspace(0, np.log10(pds.maxevals((dim, funcId))), num=500) ta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def evals_by_target(ax, pds, baseline_ds=None, baseline_label=\"\", dim=None, funcId=None, groupby=None):\n if groupby is None: groupby = GroupByMedian()\n pfsize = len(pds.algds.keys())\n\n runlengths = 10**np.linspace(0, np.log10(pds.maxevals((dim, funcId))), num=500)\n target_values = pp.RunlengthBa...
[ "0.6690005", "0.52602696", "0.5226427", "0.5201476", "0.5161905", "0.51192516", "0.5022657", "0.49890342", "0.497622", "0.49757755", "0.49593621", "0.4885093", "0.4878392", "0.48618805", "0.48530275", "0.48435473", "0.48297042", "0.4821337", "0.47865835", "0.47860396", "0.478...
0.60396034
1
pinForward is the forward Pin, so we change its duty cycle according to speed.
def forward(self, speed): self.pwm_backward.ChangeDutyCycle(0) self.pwm_forward.ChangeDutyCycle(speed)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forward(self):\n global motor_direction\n with self._lock:\n GPIO.output(7, True)\n GPIO.output(11, False)\n GPIO.output(13, True)\n GPIO.output(15, False)\n # time.sleep(sec)\n motor_direction = 'Forward'\n return motor...
[ "0.66786534", "0.66583955", "0.66447824", "0.6522863", "0.6463652", "0.6370594", "0.62973475", "0.6285964", "0.6233026", "0.6130106", "0.6119961", "0.6082686", "0.60227823", "0.6020035", "0.5921472", "0.5857334", "0.58558404", "0.57667553", "0.5758451", "0.5737794", "0.571628...
0.726632
1
Set the duty cycle of both control pins to zero to stop the motor.
def stop(self): self.pwm_forward.ChangeDutyCycle(0) self.pwm_backward.ChangeDutyCycle(0) self.pwm_left.ChangeDutyCycle(0) self.pwm_right.ChangeDutyCycle(0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stop(self):\n\n self.pwm_forward.ChangeDutyCycle(0)\n self.pwm_backward.ChangeDutyCycle(0)", "def stop_motor(self):\n self.output(self.steering_pin, 0)\n self.pi.set_servo_pulsewidth(self.steering_pin, 0)", "def stop(self):\n\t\tGPIO.output(self._dir_pin_1, GPIO.HIGH)\n\t\tGPIO....
[ "0.7451313", "0.71744835", "0.70240444", "0.64211655", "0.6414792", "0.6408484", "0.6395715", "0.63024884", "0.6269145", "0.62610817", "0.6226628", "0.6201555", "0.614517", "0.61346424", "0.6122426", "0.6099769", "0.6093762", "0.60788894", "0.6051263", "0.60405594", "0.603532...
0.736179
1
Interpolate the points and radii between sections that have too few points.
def interpPoints(self, interpRad=False): # print(np.shape(long_distances)) long_sections, long_distances, meddist = self.findLongSections() print('Long inter-point distances found: %i' % len(long_sections)) count = 0 for sec in long_sections: print('Supposed long section %i has %i nodes' \...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __hinterpolate(self):\n \n # Temp. Data holders\n upperint = []\n lowerint = []\n \n # Dont like this, because here we insert points into the rawdata\n # But it creates consisitent results in the interpolation results\n if self.__upper[0][0] != 0: self.__...
[ "0.6352975", "0.62675714", "0.61275345", "0.5952627", "0.5907965", "0.58464473", "0.5796776", "0.578933", "0.57794523", "0.57792443", "0.5757177", "0.5749844", "0.57261205", "0.5726011", "0.56745857", "0.5649165", "0.56255597", "0.5618809", "0.5615824", "0.55846244", "0.55757...
0.6316739
1
Loads the data set provided in this repository and returns a list of Decks or FuzzyDecks. The deck list is sorted by archetype so the distance matrix is easier to visualize.
def load_data_set(hero_class: str, fuzzy: bool, filename: str = "data/Decks.json", debug: bool = False) \ -> Union[List[Deck], List[FuzzyDeck]]: if debug: print("### loading dataset...") with open(filename) as f: data = json.load(f) hero_classes = list(data["series"]["metadata"].key...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_decks(**options):\n graph = bonobo.Graph()\n\n csv_in = bonobo.noop\n\n graph.add_chain(csv_in, in_use_cards, _input=None)\n\n for deck in listdir('decks'):\n deck_path = join('decks', deck)\n if deck == '.gitignore':\n continue\n\n if isfile(deck_path):\n ...
[ "0.5819562", "0.5731613", "0.544646", "0.53726274", "0.5366942", "0.5298741", "0.5272846", "0.52254647", "0.5140814", "0.50974256", "0.50899714", "0.50865227", "0.5069896", "0.50649506", "0.5054334", "0.50400245", "0.5027452", "0.50256103", "0.50096786", "0.50049436", "0.4990...
0.648076
0
Calculates the distance matrix of a list of Deck or FuzzyDeck objects. Returns the vectorform distance vector.
def calculate_distance_matrix(played_decks: Union[List[FuzzyDeck], List[Deck]], measure: str): deck_data = np.array(played_decks).reshape(len(played_decks), 1) if measure == "jaccard": dist = pdist(deck_data, lambda u, v: u[0].jaccard_distance(v[0])) elif measure == "euclidean": dist = pdist...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getDistanceMatrix(self):\n v = self.getVectors()\n vLis = v.keys()\n N = len(v.keys())\n D = np.zeros([N, N], dtype=np.float32)\n print(N)\n for i in range(N):\n print(\"%d/%d\" %(i, N))\n D[i, i] = 1\n for j in range(i + 1, N):\n ...
[ "0.6267775", "0.60056895", "0.59760046", "0.5957225", "0.5952635", "0.5888199", "0.5881407", "0.5870848", "0.58344764", "0.58344764", "0.5777284", "0.5726229", "0.5702075", "0.5700626", "0.5683218", "0.5678633", "0.56485", "0.55838466", "0.5582898", "0.55652297", "0.5557965",...
0.68410903
0
Calculates vmeasure, homogeneity, and completeness for each clustering algorithm stored in clustering_alg and adds it to each algorithms dictionary.
def eval_v_measure_homogeneity_completeness(clustering_alg: List, sdist_euclidean, sdist_jaccard, labels_true, debug: bool = False): for i, alg_dict in enumerate(clustering_alg): if "alg" in alg_dict: if alg_dict["distance"] == "euclidean": ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def evaluate_clustering_methods(methods):\r\n results = {}\r\n for m in methods:\r\n res = results[m['name']] = {}\r\n prec = 3\r\n res['Adjusted Rand Score'] = round(sklearn.metrics.adjusted_rand_score(m['target'], m['clustering']),prec)\r\n res['Normalized Mutual Information'] =...
[ "0.6315484", "0.61245906", "0.5925279", "0.5822709", "0.57913584", "0.57853943", "0.57158273", "0.56992424", "0.5629585", "0.56262213", "0.55483156", "0.5493547", "0.5488877", "0.54682064", "0.5456372", "0.5410733", "0.5409758", "0.54085684", "0.53946304", "0.53820395", "0.53...
0.69420356
0
Calculates a clustering's contingency matrix for each clustering algorithm stored in the list clustering_alg and adds it to the dict.
def eval_cluster_contingency(clustering_alg: List, labels_true, sdist): for (alg_name, alg_dict) in clustering_alg: if "alg" in alg_dict: clustering = alg_dict["alg"].fit(sdist) labels_pred = clustering.labels_ alg_dict["labels"] = labels_pred else: la...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_clustering_info(self, algorithm_type, clustering_parameters, clusterings = []):\n clustering_info = {}\n for i, running_parameters in enumerate(clustering_parameters):\n\n clustering_id = \"clustering_%04d\"%(self.current_clustering_id)\n self.current_clustering_id ...
[ "0.60130954", "0.5818192", "0.57543993", "0.5732739", "0.56639177", "0.56580245", "0.56447226", "0.560482", "0.552206", "0.551928", "0.54748267", "0.5463208", "0.5428008", "0.54264724", "0.5389764", "0.535151", "0.5327543", "0.53244734", "0.5321029", "0.5317272", "0.5313567",...
0.7477364
0
Modify the column name to make it Pythoncompatible as a field name
def normalize_col_name(col_name, used_column_names, is_relation): field_params = {} field_notes = [] new_name = col_name.lower() if new_name != col_name: field_notes.append('Field name made lowercase.') if is_relation: if new_name.endswith('_id'): new_name = new_name[:-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _update_column_name(self, column, idx, old_name, name):\n dtype = self.dtype\n # Updating the names on the dtype should suffice\n dtype.names = dtype.names[:idx] + (name,) + dtype.names[idx + 1 :]", "def py_field_name(self, field):\n name = field.name\n name = as_identifier...
[ "0.7072573", "0.7007338", "0.6994978", "0.69579434", "0.68072045", "0.6802428", "0.6802428", "0.67907166", "0.6732477", "0.6600031", "0.65641886", "0.64931035", "0.64931035", "0.64816284", "0.6459289", "0.64281356", "0.63902634", "0.6334104", "0.6324554", "0.6324554", "0.6286...
0.7277575
0
Given the database connection, the table name, and the cursor row description, this routine will return the given field type name, as well as any additional keyword parameters and notes for the field.
def get_field_type(connection, table_name, row): field_params = OrderedDict() field_notes = [] is_geometry = False try: field_type = connection.introspection.get_field_type(row[1], row) except KeyError: field_type = 'TextField' field_notes.append('This field type is a guess.'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_fields(self):\n if not self._cursor.description:\n return {}\n\n results = {}\n column = 0\n\n for des in self._cursor.description:\n fieldname = des[0]\n results[column] = fieldname\n column = column + 1\n\n return results", ...
[ "0.6303345", "0.6107471", "0.5995526", "0.5872125", "0.5803399", "0.5616249", "0.56076336", "0.5588405", "0.55621403", "0.55433136", "0.55343395", "0.5498443", "0.5464399", "0.5463323", "0.5434962", "0.53413516", "0.53411543", "0.53399295", "0.53027624", "0.52892405", "0.5286...
0.7295043
0
Authenticate user based on code.
def authenticate_user(authentication_code): for suffix in ('', '=', '=='): attempt = authentication_code + suffix decoded = base64.decodestring(attempt) fields = decoded.split('_') email, user_id, time_stamp, str_hex = fields if time_stamp < time.time(): # Auth...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def authenticate(self, request, **kwargs):\n\n self.request = request\n if not self.request:\n return None\n\n state = self.request.GET.get('state')\n code = self.request.GET.get('code')\n nonce = kwargs.pop('nonce', None)\n\n if not code or not state:\n ...
[ "0.66076124", "0.6604477", "0.6523267", "0.64544946", "0.6403558", "0.6359539", "0.6357345", "0.6290257", "0.6288636", "0.6280958", "0.6248023", "0.6243201", "0.6242323", "0.6237753", "0.6226705", "0.6226705", "0.62162906", "0.61871463", "0.6182399", "0.61742467", "0.6170313"...
0.70372474
0
Activates the specified MFA TOTP device for the user. Activation requires manual interaction with the Console.
def activate_mfa_totp_device(self, user_id, mfa_totp_device_id, mfa_totp_token, **kwargs): resource_path = "/users/{userId}/mfaTotpDevices/{mfaTotpDeviceId}/actions/activate" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def activate_application_token(self, apptoken, temptoken) -> bool:\n await self.raw_request(\n self.URL_ACTIVATE.format(apptoken=apptoken, temptoken=temptoken)\n )\n return True", "def activate(request, uidb64, token):\n try:\n uid = force_text(urlsafe_base64_decod...
[ "0.60715777", "0.6028133", "0.59996897", "0.58769685", "0.5760404", "0.5734255", "0.5616806", "0.5603392", "0.5589512", "0.5500395", "0.5455279", "0.5448774", "0.5440349", "0.54232854", "0.5410598", "0.5386604", "0.5370613", "0.53615427", "0.5324096", "0.53227437", "0.5316876...
0.6753613
0
Moves the specified tag namespace to the specified compartment within the same tenancy. To move the tag namespace, you must have the manage tagnamespaces permission on both compartments. For more information about IAM policies, see `Details for IAM`__. Moving a tag namespace moves all the tag key definitions contained ...
def change_tag_namespace_compartment(self, tag_namespace_id, change_tag_namespace_compartment_detail, **kwargs): resource_path = "/tagNamespaces/{tagNamespaceId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_namespace(self, doc, namespace):\r\n ns = u'{%s}' % namespace\r\n nsl = len(ns)\r\n for elem in doc.getiterator():\r\n if elem.tag.startswith(ns):\r\n elem.tag = elem.tag[nsl:]\r\n else:\r\n pass", "def remove_namespace(doc, name...
[ "0.55153644", "0.5485366", "0.5347061", "0.52107394", "0.52107394", "0.5199132", "0.5165057", "0.5079889", "0.5022554", "0.49942735", "0.49675435", "0.49604434", "0.49384886", "0.48304433", "0.4796919", "0.4729666", "0.46716085", "0.46684968", "0.4638175", "0.46381432", "0.46...
0.61622286
0
Creates a new dynamic group in your tenancy. You must specify your tenancy's OCID as the compartment ID in the request object (remember that the tenancy is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) reside within the tenancy itself, unlike cloud resources su...
def create_dynamic_group(self, create_dynamic_group_details, **kwargs): resource_path = "/dynamicGroups" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "opc_retry_token" ] extra_kwargs = [_key for _key in six.i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_group():\n groupname = request.get_json().get(\"name\")\n description = request.get_json().get(\"description\")\n grp = admin.create_group(current_app.scoped_session(), groupname, description)\n if grp:\n response = admin.get_group_info(current_app.scoped_session(), groupname)\n el...
[ "0.7186179", "0.71604204", "0.7018895", "0.679185", "0.6695333", "0.661491", "0.6580392", "0.6452021", "0.64109707", "0.64004433", "0.6369519", "0.63523793", "0.6294868", "0.628068", "0.6277388", "0.62702346", "0.6215326", "0.6186225", "0.61719334", "0.6139862", "0.61309004",...
0.71613544
1
Creates a new identity provider in your tenancy. For more information, see `Identity Providers and Federation`__. You must specify your tenancy's OCID as the compartment ID in the request object. Remember that the tenancy is simply the root compartment. For information about OCIDs, see `Resource Identifiers`__. You mus...
def create_identity_provider(self, create_identity_provider_details, **kwargs): resource_path = "/identityProviders" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "opc_retry_token" ] extra_kwargs = [_key for _...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_identity_provider(module, sdk, cloud, name):\n\n if module.check_mode:\n return True, None\n\n description = module.params.get('description')\n enabled = module.params.get('enabled')\n domain_id = module.params.get('domain_id')\n remote_ids = module.params.get('remote_ids')\n\n ...
[ "0.6144289", "0.5990092", "0.5924737", "0.5494253", "0.5485202", "0.53507775", "0.53166866", "0.51905113", "0.5181825", "0.51246256", "0.5108798", "0.51040316", "0.5087071", "0.50794953", "0.50547856", "0.50211", "0.50116605", "0.5002519", "0.4999784", "0.49900097", "0.497556...
0.61856276
0
Creates a new MFA TOTP device for the user. A user can have one MFA TOTP device.
def create_mfa_totp_device(self, user_id, **kwargs): resource_path = "/users/{userId}/mfaTotpDevices" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "opc_retry_token" ] extra_kwargs = [_key for _key in six.iter...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def activate_mfa_totp_device(self, user_id, mfa_totp_device_id, mfa_totp_token, **kwargs):\n resource_path = \"/users/{userId}/mfaTotpDevices/{mfaTotpDeviceId}/actions/activate\"\n method = \"POST\"\n\n # Don't accept unknown kwargs\n expected_kwargs = [\n \"retry_strategy\",...
[ "0.5845079", "0.58070564", "0.57539624", "0.56343126", "0.5609716", "0.55635047", "0.5540228", "0.5524604", "0.552029", "0.552029", "0.552029", "0.5508349", "0.5505848", "0.5504013", "0.54644525", "0.5441662", "0.53983897", "0.53840804", "0.5339161", "0.5339142", "0.5335467",...
0.7277988
0
Creates a new network source in your tenancy. You must specify your tenancy's OCID as the compartment ID in the request object (remember that the tenancy is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) reside within the tenancy itself, unlike cloud resources s...
def create_network_source(self, create_network_source_details, **kwargs): resource_path = "/networkSources" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "opc_retry_token" ] extra_kwargs = [_key for _key in si...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def network_create(request, **kwargs):\n LOG.debug(\"network_create(): kwargs = %s\", kwargs)\n if 'tenant_id' not in kwargs:\n kwargs['tenant_id'] = request.user.project_id\n body = {'network': kwargs}\n network = neutronclient(request).create_network(body=body).get('network')\n return Netwo...
[ "0.65968263", "0.64328766", "0.63080657", "0.60401773", "0.585405", "0.5773544", "0.5750441", "0.5715569", "0.569809", "0.55888134", "0.5588614", "0.5553594", "0.54480547", "0.5373371", "0.5347243", "0.53328407", "0.5326178", "0.53198993", "0.5311947", "0.52965164", "0.529295...
0.6830833
0
Creates a subscription to a region for a tenancy.
def create_region_subscription(self, create_region_subscription_details, tenancy_id, **kwargs): resource_path = "/tenancies/{tenancyId}/regionSubscriptions" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "opc_retry_token" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_subscription(self,\n body):\n\n return super().new_api_call_builder.request(\n RequestBuilder().server('default')\n .path('/v2/subscriptions')\n .http_method(HttpMethodEnum.POST)\n .header_param(Parameter()\n ...
[ "0.61023337", "0.6050946", "0.60171896", "0.59941614", "0.5989991", "0.5985926", "0.59581876", "0.59402776", "0.5903215", "0.5853864", "0.5773465", "0.57645184", "0.56852347", "0.5659827", "0.56107926", "0.56008047", "0.55303335", "0.55104107", "0.5472032", "0.5425874", "0.54...
0.74824893
0
Creates a new SMTP credential for the specified user. An SMTP credential has an SMTP user name and an SMTP password. You must specify a description for the SMTP credential (although it can be an empty string). It does not have to be unique, and you can change it anytime with
def create_smtp_credential(self, create_smtp_credential_details, user_id, **kwargs): resource_path = "/users/{userId}/smtpCredentials" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "opc_retry_token" ] extra_kw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_new_credential(account,userName,password):\n new_credential = Credentials(account,userName,password)\n return new_credential", "def CreateNewSmtpUser(s):\n payload = ['adduser %s %s\\n' % (FLAGS.exploit_user, FLAGS.exploit_password),\n 'quit\\n']\n SendPayload(s, payload)\n ...
[ "0.6836732", "0.6782684", "0.66625166", "0.6148272", "0.60939145", "0.59752667", "0.59635276", "0.59110373", "0.5898103", "0.58977437", "0.5887567", "0.58812404", "0.5815839", "0.5802219", "0.57664925", "0.57609296", "0.57314557", "0.57081306", "0.56840855", "0.56605315", "0....
0.72970504
0
Creates a new tag in the specified tag namespace. The tag requires either the OCID or the name of the tag namespace that will contain this tag definition. You must specify a name for the tag, which must be unique across all tags in the tag namespace and cannot be changed. The name can contain any ASCII character except...
def create_tag(self, tag_namespace_id, create_tag_details, **kwargs): resource_path = "/tagNamespaces/{tagNamespaceId}/tags" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "opc_retry_token" ] extra_kwargs = [_k...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(self, name, tag):\n\n\t\turl_json = urllib.urlencode({\"name\": name, \"tag\": tag})\n\t\treturn self._create(\"/tag?json_hash=%s\" % url_json, \"tag\")", "def create_tag(self, session, tags):\n self._tag(session.put, tags=tags, session=session)", "def create_tag(self, entry_name, tag):\n ...
[ "0.668044", "0.64789695", "0.6425235", "0.63370335", "0.62885815", "0.6265026", "0.6156292", "0.61304843", "0.5985835", "0.5902972", "0.5860836", "0.5857317", "0.58103025", "0.5736905", "0.57278633", "0.571501", "0.5682197", "0.56273866", "0.5566556", "0.5561892", "0.5553828"...
0.7148086
0
Creates a new tag default in the specified compartment for the specified tag definition. If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked. If the `isRequired` flag is set t...
def create_tag_default(self, create_tag_default_details, **kwargs): resource_path = "/tagDefaults" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "opc_retry_token", "opc_request_id" ] extra_kwargs =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Option(name: str, value: Union[str, int], default: Optional[bool] = None) -> Dict:\n doc = {'name': name, 'value': value}\n if default is not None:\n doc['isDefault'] = default\n return doc", "def register_option_pair(key, default_value):\n\n _OPTION_TEMPLATE[key] = default_value", "def ...
[ "0.5894807", "0.55696887", "0.548009", "0.52427024", "0.5172015", "0.5163364", "0.5069004", "0.50466603", "0.50242513", "0.5003325", "0.4976948", "0.49649096", "0.49576932", "0.49290386", "0.4914476", "0.49040148", "0.49038035", "0.48990166", "0.48935652", "0.48932627", "0.48...
0.64231205
0
Creates a new tag namespace in the specified compartment. You must specify the compartment ID in the request object (remember that the tenancy is simply the root compartment). You must also specify a name for the namespace, which must be unique across all namespaces in your tenancy and cannot be changed. The name can c...
def create_tag_namespace(self, create_tag_namespace_details, **kwargs): resource_path = "/tagNamespaces" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "opc_retry_token" ] extra_kwargs = [_key for _key in six.i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post_namespace_create(self, resource_dict):\n pass", "def create_namespace(node, namespace, delete_before_create=True):\n if delete_before_create:\n Namespaces.delete_namespace(node, namespace)\n\n cmd = f\"ip netns add {namespace}\"\n exec_cmd_no_error(node, cmd, sudo=...
[ "0.6208053", "0.61728823", "0.61027914", "0.61002004", "0.59118104", "0.5871321", "0.58043087", "0.5771377", "0.5746048", "0.5731766", "0.5726167", "0.57059276", "0.5678216", "0.55117524", "0.54968196", "0.54622465", "0.54276574", "0.5421414", "0.54114", "0.5391365", "0.53783...
0.656771
0
Deletes the specified compartment. The compartment must be empty.
def delete_compartment(self, compartment_id, **kwargs): resource_path = "/compartments/{compartmentId}" method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_match" ] extra_kwargs = [_key for _key in six.iterkey...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def removeCompartment(self, *args):\n return _libsbml.Model_removeCompartment(self, *args)", "def removeCompartmentReference(self, *args):\n return _libsbml.MultiCompartmentPlugin_removeCompartmentReference(self, *args)", "def delcomponent(self,\n context=[],\n componentid=N...
[ "0.6996225", "0.5918634", "0.5823131", "0.573744", "0.57213587", "0.571788", "0.5709205", "0.56610256", "0.56202364", "0.55895793", "0.5515105", "0.5480321", "0.5393466", "0.5318188", "0.5316087", "0.53012276", "0.5280208", "0.527711", "0.527472", "0.52587646", "0.5253273", ...
0.6579754
1
Deletes the specified MFA TOTP device for the specified user.
def delete_mfa_totp_device(self, user_id, mfa_totp_device_id, **kwargs): resource_path = "/users/{userId}/mfaTotpDevices/{mfaTotpDeviceId}" method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_match" ] extra_kw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_user(self, user):\n self.delete(user)", "def delete_user(self, user):\n # noinspection PyUnresolvedReferences\n self.delete(user)", "def delete_user(self, user):\n try:\n with dbm.open(self.dbm_path, 'c', 0o600) as db:\n del db[user.name]\n ...
[ "0.7167678", "0.69209623", "0.6781475", "0.6747502", "0.67389566", "0.66825885", "0.66802096", "0.66421336", "0.66130745", "0.6571461", "0.64496547", "0.64242226", "0.63735026", "0.63403934", "0.6330194", "0.63215464", "0.63176155", "0.63172036", "0.63106817", "0.62828964", "...
0.69395584
1
Deletes the specified network source
def delete_network_source(self, network_source_id, **kwargs): resource_path = "/networkSources/{networkSourceId}" method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_match" ] extra_kwargs = [_key for _key in s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete(self, source):\n _source = self._source_prefix+source\n assert _source in self.cache.keys()\n del self.cache[_source]", "def delete_source(self, src_name: SourceName) -> None:\n while True:\n try:\n response = self.genes.query(\n ...
[ "0.69649154", "0.67236555", "0.67101824", "0.6658213", "0.66125065", "0.64707583", "0.6187282", "0.6125395", "0.6124346", "0.6093754", "0.6084731", "0.60805976", "0.6080252", "0.6072282", "0.6040917", "0.6035688", "0.6021448", "0.60198027", "0.60127157", "0.6012108", "0.59954...
0.69568324
1
Deletes the specified SMTP credential for the specified user.
def delete_smtp_credential(self, user_id, smtp_credential_id, **kwargs): resource_path = "/users/{userId}/smtpCredentials/{smtpCredentialId}" method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_match" ] extra_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_credential(self, credential):\r\n return self.delete(self.credential_path % (credential))", "def delete_credential(credentials):\n credentials.delete_credentials()", "def delete_credential(self):\n Credentials.credentials_list.remove(self)", "def delete_credential(name: str):\n ...
[ "0.7331302", "0.72613764", "0.670908", "0.661661", "0.65503716", "0.6531281", "0.65208536", "0.6449064", "0.6350622", "0.63303417", "0.63224506", "0.6295059", "0.62919253", "0.6242662", "0.6233042", "0.61947227", "0.6164052", "0.6137985", "0.6137985", "0.6137985", "0.6135059"...
0.72640246
1
Deletes the the specified tag default.
def delete_tag_default(self, tag_default_id, **kwargs): resource_path = "/tagDefaults/{tagDefaultId}" method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "opc_request_id", "if_match" ] extra_kwargs = [...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_default(self):\n if self.default_present:\n self.removeItem(0)\n self.default_present = False", "def delete_tag(tag):\n tag.destroy()", "def delete_tag(self,tag):\r\n\r\n # with shelf\r\n if self.using_shelf:\r\n del self.tag_dict[tag]", "de...
[ "0.6711261", "0.6618538", "0.62383074", "0.61715645", "0.5984171", "0.5975831", "0.5970485", "0.585169", "0.58504015", "0.5791107", "0.57085663", "0.55927753", "0.55772495", "0.5562356", "0.5456258", "0.5449171", "0.5441209", "0.5433733", "0.5428394", "0.5425312", "0.54240113...
0.6901326
0
Gets the authentication policy for the given tenancy. You must specify your tenant\u2019s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment).
def get_authentication_policy(self, compartment_id, **kwargs): resource_path = "/authenticationPolicies/{compartmentId}" method = "GET" expected_kwargs = ["retry_strategy"] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def authentication_policy(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"authentication_policy\")", "def authentication_policy(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"authentication_policy\")", "def authentication_policy(self) -> pulumi.Output[Optional...
[ "0.5763793", "0.5763793", "0.56437725", "0.52095336", "0.51566327", "0.5049942", "0.49517995", "0.49281493", "0.4919025", "0.48551175", "0.48236695", "0.48195675", "0.48187912", "0.47907704", "0.47624832", "0.4753156", "0.4753156", "0.47355378", "0.47262105", "0.4723426", "0....
0.6030179
0
Gets the specified compartment's information. This operation does not return a list of all the resources inside the compartment. There is no single API operation that does that. Compartments can contain multiple types of resources (instances, block storage volumes, etc.). To find out what's in a compartment, you must c...
def get_compartment(self, compartment_id, **kwargs): resource_path = "/compartments/{compartmentId}" method = "GET" expected_kwargs = ["retry_strategy"] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise Value...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getCompartment(self, *args):\n return _libsbml.Model_getCompartment(self, *args)", "def getCompartment(self):\n return _libsbml.CompartmentReference_getCompartment(self)", "def list_compartments(self, compartment_id, **kwargs):\n resource_path = \"/compartments\"\n method = \"GE...
[ "0.651724", "0.6153286", "0.6037744", "0.58690524", "0.57859063", "0.5781716", "0.5763131", "0.576079", "0.5643876", "0.5598771", "0.5592769", "0.55235153", "0.5381384", "0.5341171", "0.5341171", "0.5283982", "0.5278441", "0.5222629", "0.5219247", "0.5206948", "0.5200719", ...
0.6193012
1
Get the specified MFA TOTP device for the specified user.
def get_mfa_totp_device(self, user_id, mfa_totp_device_id, **kwargs): resource_path = "/users/{userId}/mfaTotpDevices/{mfaTotpDeviceId}" method = "GET" expected_kwargs = ["retry_strategy"] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_mfa_totp_device(self, user_id, **kwargs):\n resource_path = \"/users/{userId}/mfaTotpDevices\"\n method = \"POST\"\n\n # Don't accept unknown kwargs\n expected_kwargs = [\n \"retry_strategy\",\n \"opc_retry_token\"\n ]\n extra_kwargs = [_ke...
[ "0.6745442", "0.60613525", "0.59726477", "0.5702831", "0.55748624", "0.5469353", "0.54422414", "0.53837264", "0.53459823", "0.53429735", "0.5318181", "0.5315078", "0.5313801", "0.5306907", "0.5290798", "0.52894306", "0.52770966", "0.5263118", "0.5261724", "0.52087736", "0.518...
0.7053731
0
Get the specified tenancy's information.
def get_tenancy(self, tenancy_id, **kwargs): resource_path = "/tenancies/{tenancyId}" method = "GET" expected_kwargs = ["retry_strategy"] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tenants(self):\n # print \"tenant list is %s\" % self.auth.tenants.list()\n if not self._tenancy:\n self._tenancy = {}\n for tenant in self.auth.tenants.list():\n t = Tenant(tenant, self)\n self._tenancy[t[\"name\"]] = t\n return self._te...
[ "0.633115", "0.6270229", "0.6024418", "0.5914824", "0.59081745", "0.5818619", "0.5763514", "0.5751513", "0.5732008", "0.5686052", "0.56732315", "0.5667248", "0.5657612", "0.5629676", "0.561599", "0.56010634", "0.559895", "0.5592223", "0.5585628", "0.5580276", "0.55515385", ...
0.6393299
0
Gets the specified UserGroupMembership's information.
def get_user_group_membership(self, user_group_membership_id, **kwargs): resource_path = "/userGroupMemberships/{userGroupMembershipId}" method = "GET" expected_kwargs = ["retry_strategy"] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fetch_their_members(our_group):\n\tgroup_id = our_group[\"groupId\"]\n\turl = f'{BASE_URL}/groups/{group_id}/members'\n\tparams = {'$select': 'userPrincipalName,id'}\n\treturn call_api(url, params)", "def get_membership_data_for_current_user(self):\n # TODO: Assuming first server is good - need to mak...
[ "0.6235419", "0.61992306", "0.60605794", "0.60599184", "0.6059044", "0.60332453", "0.6025113", "0.5984252", "0.5957381", "0.5928913", "0.5920698", "0.59183306", "0.5917003", "0.59147394", "0.59113026", "0.58406615", "0.5840103", "0.5822994", "0.5788936", "0.57630724", "0.5758...
0.67357963
0
Gets details on a specified work request. The workRequestID is returned in the opcworkrequestid header for any asynchronous operation in the Identity and Access Management service.
def get_work_request(self, work_request_id, **kwargs): resource_path = "/workRequests/{workRequestId}" method = "GET" expected_kwargs = ["retry_strategy"] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise Val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getwork(self, data: Optional[str] = None) -> Dict[str, Any]:\n assert data is None or type(data) == str\n return self.rpc_call(\"getwork\", data)", "def get_request(request_id=None, workload_id=None, session=None):\n\n try:\n if not request_id and workload_id:\n request_ids...
[ "0.56530815", "0.5529833", "0.54778296", "0.5333147", "0.53069115", "0.5274904", "0.51362526", "0.51026773", "0.5036096", "0.49953598", "0.49753773", "0.49725127", "0.4961871", "0.4939883", "0.49278948", "0.4925855", "0.49189013", "0.49009278", "0.4879232", "0.48540133", "0.4...
0.6257329
0
Lists the API signing keys for the specified user. A user can have a maximum of three keys. Every user has permission to use this API call for their own user ID. An administrator in your organization does not need to write a policy to give users this ability.
def list_api_keys(self, user_id, **kwargs): resource_path = "/users/{userId}/apiKeys" method = "GET" expected_kwargs = ["retry_strategy"] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_keys(user_id):\n\n db_conn = sqlite3.connect(db_path)\n db = db_conn.cursor()\n keys = []\n try:\n for row in db.execute(\"SELECT public_key FROM public_keys WHERE username=? AND status=?\", [user_id, PK_STATUS_OK]):\n keys.append({\"public\": row[0]})\n db_conn.close()...
[ "0.6866222", "0.66910446", "0.6670618", "0.64299655", "0.6349597", "0.6267026", "0.622857", "0.62016267", "0.6186303", "0.6160741", "0.60831136", "0.5966327", "0.5913713", "0.58797574", "0.58408535", "0.57975286", "0.5738591", "0.571278", "0.5685982", "0.5669537", "0.56538075...
0.69830835
0
Lists the availability domains in your tenancy. Specify the OCID of either the tenancy or another of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). See `Where to Get the Tenancy's OCID and User's OCID`__. Note that the order of the results returned can ...
def list_availability_domains(self, compartment_id, **kwargs): resource_path = "/availabilityDomains" method = "GET" expected_kwargs = ["retry_strategy"] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise Valu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_fault_domains(self, compartment_id, availability_domain, **kwargs):\n resource_path = \"/faultDomains\"\n method = \"GET\"\n\n expected_kwargs = [\"retry_strategy\"]\n extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs]\n if extra_kwargs...
[ "0.5952278", "0.5752911", "0.56866777", "0.5658533", "0.5655036", "0.56334436", "0.5622109", "0.55967", "0.5533269", "0.55126745", "0.5500697", "0.5494048", "0.5493609", "0.5492394", "0.54891664", "0.54583323", "0.5394912", "0.5390071", "0.5349818", "0.5348451", "0.53267604",...
0.72129303
0
Lists the compartments in a specified compartment. The members of the list returned depends on the values set for several parameters. With the exception of the tenancy (root compartment), the ListCompartments operation returns only the firstlevel child compartments in the parent compartment specified in `compartmentId`...
def list_compartments(self, compartment_id, **kwargs): resource_path = "/compartments" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "page", "limit", "access_level", "compartment_id_in_subtr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getListOfCompartments(self):\n return self.model.getListOfCompartments()", "def getListOfCompartments(self, *args):\n return _libsbml.Model_getListOfCompartments(self, *args)", "def get_compartment(self, compartment_id, **kwargs):\n resource_path = \"/compartments/{compartmentId}\"\n ...
[ "0.62096506", "0.60235274", "0.5435602", "0.5372225", "0.52894926", "0.5113388", "0.50968504", "0.5042258", "0.49255446", "0.4908474", "0.48918715", "0.4878826", "0.4840922", "0.46979246", "0.46899638", "0.46821752", "0.468023", "0.45857018", "0.45253602", "0.4391601", "0.437...
0.84061605
0
Lists all the tags enabled for costtracking in the specified tenancy. For information about costtracking tags, see `Using Costtracking Tags`__.
def list_cost_tracking_tags(self, compartment_id, **kwargs): resource_path = "/tagNamespaces/actions/listCostTrackingTags" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "page", "limit" ] extra_kwarg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def listTags(self, authenticationToken):\r\n pass", "def list_tags(self, session):\n result = self._tag(session.get, session=session)\n return result['tags']", "def list_tags():\r\n tags = Tag.query.order_by(Tag.name).all()\r\n return render_template('tags.html', tags=tags)", "def get_...
[ "0.63822997", "0.61948174", "0.6163116", "0.6132447", "0.6132447", "0.6095878", "0.60922146", "0.6062289", "0.60137403", "0.6006326", "0.59625673", "0.5926329", "0.5855336", "0.5804048", "0.57833034", "0.57692766", "0.57686114", "0.5734323", "0.57283866", "0.57195485", "0.571...
0.6232547
1
Lists the secret keys for the specified user. The returned object contains the secret key's OCID, but not the secret key itself. The actual secret key is returned only upon creation.
def list_customer_secret_keys(self, user_id, **kwargs): resource_path = "/users/{userId}/customerSecretKeys" method = "GET" expected_kwargs = ["retry_strategy"] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: rai...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def describe_user_encryption_key_list(\n self,\n request: dds_20151201_models.DescribeUserEncryptionKeyListRequest,\n ) -> dds_20151201_models.DescribeUserEncryptionKeyListResponse:\n runtime = util_models.RuntimeOptions()\n return self.describe_user_encryption_key_list_with_options(...
[ "0.66501856", "0.6520959", "0.6316638", "0.6299123", "0.62734264", "0.627234", "0.62511283", "0.606225", "0.60029274", "0.59841985", "0.5940731", "0.5805145", "0.5801294", "0.5739835", "0.5712983", "0.5704147", "0.566274", "0.5550773", "0.5525107", "0.5505345", "0.5473902", ...
0.7246356
0
Lists the dynamic groups in your tenancy. You must specify your tenancy's OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See `Where to Get the Tenancy's OCID and User's OCID`__.
def list_dynamic_groups(self, compartment_id, **kwargs): resource_path = "/dynamicGroups" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "page", "limit" ] extra_kwargs = [_key for _key in six.iterkey...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list(request):\n return render_to_response('rteacher/manage_groups_list.html', request, **klist(\n request=request\n ))", "def groups(self):\n #return self.get('{}/groups'.format(ApiVersion.A1.value))\n return self.get('{}/groups'.format(ApiVersion.CM1.value))", "def groups():\n ...
[ "0.65068406", "0.6469846", "0.63963234", "0.6134552", "0.6109888", "0.6099704", "0.60848904", "0.60196185", "0.6018239", "0.6011199", "0.5968778", "0.5935231", "0.59249777", "0.587962", "0.5860688", "0.58439285", "0.58141536", "0.5788746", "0.5758732", "0.57442486", "0.567956...
0.671684
0
Lists the Fault Domains in your tenancy. Specify the OCID of either the tenancy or another of your compartments as the value for the compartment ID (remember that the tenancy is simply the root compartment). See `Where to Get the Tenancy's OCID and User's OCID`__.
def list_fault_domains(self, compartment_id, availability_domain, **kwargs): resource_path = "/faultDomains" method = "GET" expected_kwargs = ["retry_strategy"] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: rai...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def listDomains(self):\n reply = self.rpc.getDomains(self.username,\n self.password)\n if reply[0] == 'UNKNOWN_ERROR':\n raise Exception(\"RPC returned error: \" + reply[0])\n return reply", "def get_storage_domains(cohesity_client):\n storage...
[ "0.57624483", "0.5618712", "0.5579227", "0.55783147", "0.5538795", "0.54575324", "0.5412407", "0.53967834", "0.5350825", "0.5334975", "0.52671653", "0.52478313", "0.52312326", "0.52176356", "0.5216194", "0.520539", "0.5197498", "0.5193738", "0.51901394", "0.5165269", "0.51523...
0.65855885
0
Lists all the identity providers in your tenancy. You must specify the identity provider type (e.g., `SAML2` for identity providers using the SAML2.0 protocol). You must specify your tenancy's OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See `Where to Get the Tena...
def list_identity_providers(self, protocol, compartment_id, **kwargs): resource_path = "/identityProviders" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "page", "limit" ] extra_kwargs = [_key for _...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list(conn):\n try:\n return conn.get(url='/auth-providers')['providers']\n except SystemError as e:\n raise e", "def providers(self) -> List[str]:\n return [\n getattr(auth_account, \"provider\")\n for auth_account in self.auth_accounts # pylint: disable=not-...
[ "0.6727649", "0.64191025", "0.6271538", "0.62455416", "0.62455416", "0.6074249", "0.6066744", "0.5960773", "0.59022737", "0.59022737", "0.59022737", "0.59022737", "0.59022737", "0.59022737", "0.5825487", "0.5819967", "0.581062", "0.5770538", "0.576516", "0.5720312", "0.571423...
0.64960575
1
Lists the group mappings for the specified identity provider.
def list_idp_group_mappings(self, identity_provider_id, **kwargs): resource_path = "/identityProviders/{identityProviderId}/groupMappings" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "page", "limit" ] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def groups():\n access_token = session['access_token']\n return \"%s\" % list_groups(access_token)", "def get_identity_groups(self):\n\t\tresult = {\n\t\t\t'success': False,\n\t\t\t'response': '',\n\t\t\t'error': '',\n\t\t}\n\n\t\tself.ise.headers.update({'Accept': 'application/vnd.com.cisco.ise.identity.i...
[ "0.60451424", "0.6032505", "0.5956654", "0.5918813", "0.58596", "0.5801229", "0.5754967", "0.5714305", "0.5660738", "0.56143993", "0.55850315", "0.5576164", "0.55513936", "0.5545537", "0.5543902", "0.5542496", "0.5516063", "0.5498167", "0.5491729", "0.546018", "0.5443648", ...
0.6934423
0
Lists the MFA TOTP devices for the specified user. The returned object contains the device's OCID, but not the seed. The seed is returned only upon creation or when the IAM service regenerates the MFA seed for the device.
def list_mfa_totp_devices(self, user_id, **kwargs): resource_path = "/users/{userId}/mfaTotpDevices" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "page", "limit", "sort_by", "sort_order" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def retrieve_user_devices(self, user_id):\n if self.database is None:\n raise Exception(\"No database.\")\n if user_id is None or len(user_id) == 0:\n raise Exception(\"Bad parameter.\")\n devices = self.database.retrieve_user_devices(user_id)\n if devices is not N...
[ "0.63648194", "0.62265784", "0.6117706", "0.61175627", "0.5826038", "0.574232", "0.5716294", "0.5668577", "0.53647625", "0.52985567", "0.5172679", "0.5028343", "0.501832", "0.49658716", "0.4858226", "0.48548654", "0.4841386", "0.48357037", "0.48057312", "0.47699174", "0.47577...
0.6962967
0
Lists the network sources in your tenancy. You must specify your tenancy's OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See `Where to Get the Tenancy's OCID and User's OCID`__.
def list_network_sources(self, compartment_id, **kwargs): resource_path = "/networkSources" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "page", "limit" ] extra_kwargs = [_key for _key in six.iterk...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_sources():\n url = base_url + \"sources\"\n params = {\"language\": \"en\"}\n resp = requests.get(url, params=params)\n data = resp.json()\n sources = [src['id'].strip() for src in data['sources']]\n print(\"all the sources:\")\n print(sources)\n return sources", "def paths_list(c...
[ "0.6069622", "0.60684687", "0.6046004", "0.60339135", "0.59831995", "0.59754866", "0.59675294", "0.5898026", "0.586566", "0.5807168", "0.5727688", "0.5714986", "0.5702389", "0.5680545", "0.564806", "0.5645466", "0.56405693", "0.56157684", "0.55836064", "0.55833864", "0.557077...
0.66614133
0
Lists the policies in the specified compartment (either the tenancy or another of your compartments). See `Where to Get the Tenancy's OCID and User's OCID`__. To determine which policies apply to a particular group or compartment, you must view the individual statements inside all your policies. There isn't a way to au...
def list_policies(self, compartment_id, **kwargs): resource_path = "/policies" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "page", "limit" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_policies(self):\n client = self.connect(VAULT_TOKEN)\n return client.list_policies()", "def list_policies(policystore_url, verbose):\n\n if verbose:\n logging.info('Listing policies')\n\n list_url = policystore_url + POLICYSTORE_PREFIX + 'ListEntitlementPolicies'\n\n r = re...
[ "0.7189241", "0.6911353", "0.69109756", "0.6786608", "0.6505484", "0.6489422", "0.6399176", "0.6282769", "0.6273543", "0.62666065", "0.6170152", "0.61578345", "0.59558356", "0.5855535", "0.5853909", "0.58492464", "0.57598", "0.57497317", "0.5630949", "0.56128603", "0.56102735...
0.7190767
0
Lists the region subscriptions for the specified tenancy.
def list_region_subscriptions(self, tenancy_id, **kwargs): resource_path = "/tenancies/{tenancyId}/regionSubscriptions" method = "GET" expected_kwargs = ["retry_strategy"] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getAllSubscriptions(self):\n return self.request(\n \"getAllSubscriptions\",\n )", "def listSubscriptions() -> object:\n\n db = Db()\n return db.Subscriptions.objects().to_json()", "def GetSubscriptions(self):\n\n return self.__GetJson(\"/subscriptions\", True)", "de...
[ "0.6887986", "0.64734304", "0.6237735", "0.6100922", "0.6089093", "0.6054437", "0.6008919", "0.5998848", "0.5985489", "0.5876979", "0.58604753", "0.58339596", "0.58058745", "0.57581854", "0.57325035", "0.5700422", "0.56921446", "0.56718814", "0.5643824", "0.56429935", "0.5636...
0.7903534
0
Lists the SMTP credentials for the specified user. The returned object contains the credential's OCID, the SMTP user name but not the SMTP password. The SMTP password is returned only upon creation.
def list_smtp_credentials(self, user_id, **kwargs): resource_path = "/users/{userId}/smtpCredentials" method = "GET" expected_kwargs = ["retry_strategy"] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise Valu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_credentials(user):\n return Credentials.list_credentials(user)", "def get_user_credentials(connection):\n\n response = connection.get_json('user')\n user_data = response.get('user', None)\n if user_data is None:\n raise SAPCliError('gCTS response does not contain \\'user\\'')\n\n c...
[ "0.7158633", "0.63490164", "0.5840114", "0.5356084", "0.5350056", "0.5333744", "0.53025347", "0.53025347", "0.53025347", "0.5278439", "0.5255396", "0.52334976", "0.5210725", "0.5210725", "0.5193972", "0.51926774", "0.5166273", "0.51630765", "0.51324713", "0.51061445", "0.5105...
0.7803695
0
Lists the tag defaults for tag definitions in the specified compartment.
def list_tag_defaults(self, **kwargs): resource_path = "/tagDefaults" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "page", "limit", "id", "compartment_id", "tag_definition_id", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initDefaults(self):\n return _libsbml.CompartmentGlyph_initDefaults(self)", "def initDefaults(self):\n return _libsbml.Compartment_initDefaults(self)", "def defaults(file):\n\n\tUNCAT_TAGID = 47\n\tNOSERIES_TAGID = 375\n\n\treturn [NOSERIES_TAGID, UNCAT_TAGID]", "def get_default_vpas(self, ...
[ "0.5788659", "0.5745859", "0.5657144", "0.5510926", "0.5421845", "0.52667904", "0.5232069", "0.52265173", "0.51869756", "0.5130844", "0.51299524", "0.5102675", "0.5096235", "0.50511813", "0.5039385", "0.502269", "0.50160813", "0.49855888", "0.49597377", "0.4956205", "0.495322...
0.6216055
0
Lists the tag namespaces in the specified compartment.
def list_tag_namespaces(self, compartment_id, **kwargs): resource_path = "/tagNamespaces" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "page", "limit", "include_subcompartments", "lifecycle...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def list_namespaces(self) -> list:\n return await self.AD.state.list_namespaces()", "def namespaces(self):\n return [self._namespace_prefix]", "def namespaces(self):\n namespaces = set()\n for namespace_package in self.namespace_packages:\n dotted_name = []\n ...
[ "0.71969026", "0.61050427", "0.5985775", "0.59844434", "0.59576994", "0.5934063", "0.59100467", "0.5898842", "0.58896667", "0.5883841", "0.58817756", "0.58812404", "0.58636045", "0.584227", "0.581729", "0.5809152", "0.58016217", "0.5761703", "0.5708301", "0.56499183", "0.5643...
0.7114337
1
Lists the tagging work requests in compartment.
def list_tagging_work_requests(self, compartment_id, **kwargs): resource_path = "/taggingWorkRequests" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "page", "limit", "resource_identifier" ] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list(self, jobguid=\"\", executionparams=None):", "def tags(self, request, tag_list, group):\n return tag_list", "def get_jobs_list(self, response):\n pass", "def listTagsByNotebook(self, authenticationToken, notebookGuid):\r\n pass", "def handle_tags(self, request):\n \"\"\"\n ...
[ "0.58259183", "0.5787486", "0.578615", "0.5756901", "0.57381487", "0.5711629", "0.5706951", "0.5672795", "0.5647787", "0.56005555", "0.5547329", "0.5543428", "0.55379766", "0.55379766", "0.55000997", "0.5487424", "0.5475018", "0.5472611", "0.5454506", "0.54417205", "0.5426978...
0.69553626
0
Lists the `UserGroupMembership` objects in your tenancy. You must specify your tenancy's OCID as the value for the compartment ID (see `Where to Get the Tenancy's OCID and User's OCID`__).
def list_user_group_memberships(self, compartment_id, **kwargs): resource_path = "/userGroupMemberships" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "user_id", "group_id", "page", "limit" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def view_group(request, group_id):\n users = models.UserProfile.all().order('email')\n if group_id:\n group = models.UserGroup.get_by_id(int(group_id))\n if group.users:\n users = models.UserProfile.get(group.users)\n else:\n users = []\n return utility.respond(request, 'admin/view_group', {'...
[ "0.59523857", "0.59251404", "0.5874129", "0.5672281", "0.56644803", "0.56609535", "0.56514776", "0.56267077", "0.5618761", "0.56177497", "0.5544431", "0.54518914", "0.544957", "0.5421477", "0.54123914", "0.54096514", "0.5407805", "0.5396198", "0.53743017", "0.53723145", "0.53...
0.68893605
0
Lists the work requests in compartment.
def list_work_requests(self, compartment_id, **kwargs): resource_path = "/workRequests" method = "GET" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "page", "limit", "resource_identifier" ] extra_kwarg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def listRequests(self):\n reqmgr = RequestManagerImpl()\n retval = []\n for request in reqmgr.listRequests(self.endpoint):\n tmpRequest = Request()\n tmpRequest.setReqmgrUrl( self.endpoint )\n tmpRequest.setWorkflowName( request['request_name'] )\n r...
[ "0.67798686", "0.64472514", "0.6357527", "0.62949765", "0.61017513", "0.606693", "0.6015134", "0.59746355", "0.5971976", "0.59663254", "0.596574", "0.59381527", "0.5924295", "0.590886", "0.5905645", "0.5905645", "0.5890049", "0.5807364", "0.57771367", "0.57649094", "0.5733279...
0.69024056
0
Move the compartment to a different parent compartment in the same tenancy. When you move a compartment, all its contents (subcompartments and resources) are moved with it. Note that the `CompartmentId` that you specify in the path is the compartment that you want to move.
def move_compartment(self, compartment_id, move_compartment_details, **kwargs): resource_path = "/compartments/{compartmentId}/actions/moveCompartment" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_match", "op...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_patch_project_move_child(self):\n new_category = self.make_project(\n 'NewCategory', PROJECT_TYPE_CATEGORY, self.category\n )\n self.make_assignment(new_category, self.user, self.role_owner)\n url = reverse(\n 'projectroles:api_project_update',\n ...
[ "0.5687158", "0.542566", "0.533787", "0.5328388", "0.516376", "0.5099298", "0.50907147", "0.5065896", "0.50041324", "0.49923396", "0.49568546", "0.4937967", "0.49123746", "0.4888783", "0.4883443", "0.48625642", "0.48523584", "0.48384222", "0.48384222", "0.48376495", "0.483340...
0.6347577
0
Resets the OAuth2 client credentials for the SCIM client associated with this identity provider.
def reset_idp_scim_client(self, identity_provider_id, **kwargs): resource_path = "/identityProviders/{identityProviderId}/actions/resetScimClient" method = "POST" expected_kwargs = ["retry_strategy"] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def logout(self):\n self._client.clear_credentials()", "def reset_secret(self, save=False):\n client = cas.get_client()\n client.revoke_application_tokens(self.client_id, self.client_secret)\n self.client_secret = generate_client_secret()\n\n if save:\n self.save()\n...
[ "0.63996184", "0.61857796", "0.6167417", "0.61205524", "0.6116238", "0.5673805", "0.5546106", "0.54928285", "0.54202366", "0.53968155", "0.53470254", "0.53334624", "0.5311507", "0.5289614", "0.5285055", "0.5245378", "0.52309966", "0.5217204", "0.5211187", "0.51890314", "0.513...
0.6584309
0
Updates the specified compartment's description or name. You can't update the root compartment.
def update_compartment(self, compartment_id, update_compartment_details, **kwargs): resource_path = "/compartments/{compartmentId}" method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_match" ] extra_kwargs = [_ke...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_object(self, name: str) -> None:", "def update(args, config):\n print('Updates an HPC fleet with name \"{}\"'.format(args.fleet_name))", "def test_update(self):\n obj = self.provision_single_asset()\n test_string = \"testing this thing\"\n p = {'id': obj.id, 'description': te...
[ "0.56508", "0.5638967", "0.5597009", "0.55432", "0.5494998", "0.5449337", "0.53832597", "0.5348151", "0.53268445", "0.5285396", "0.5275306", "0.5235795", "0.5235795", "0.51921105", "0.5159983", "0.5123664", "0.50844306", "0.50828993", "0.50785875", "0.5047809", "0.5020412", ...
0.60476094
0
Updates the specified dynamic group.
def update_dynamic_group(self, dynamic_group_id, update_dynamic_group_details, **kwargs): resource_path = "/dynamicGroups/{dynamicGroupId}" method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_match" ] extra_kwarg...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_group():\n _id = request.form['_id']\n name = request.form['name']\n data, code, message = FIELD_SERVICE.update_group(_id, name)\n return __result(data, code, message)", "def update_group(groupname):\n name = request.get_json().get(\"name\", None)\n description = request.get_json().g...
[ "0.73748296", "0.71882457", "0.7182601", "0.7062276", "0.6967742", "0.6875376", "0.68748295", "0.6828043", "0.6739177", "0.6604309", "0.64636046", "0.6460566", "0.639448", "0.6345957", "0.6323035", "0.6288533", "0.6273564", "0.6173461", "0.61531174", "0.61079484", "0.6106953"...
0.7564378
0
Updates the specified identity provider.
def update_identity_provider(self, identity_provider_id, update_identity_provider_details, **kwargs): resource_path = "/identityProviders/{identityProviderId}" method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_match" ]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_provider(self, provider_id, provider_name, endpoints, zone_id, provider_region):\n try:\n self.client.post('{api_url}/providers/{id}'.format(api_url=self.api_url, id=provider_id),\n action='edit',\n zone={'id': zone_id},\n ...
[ "0.6841701", "0.6564375", "0.63220054", "0.62459624", "0.623236", "0.5886005", "0.58837974", "0.5625915", "0.5601719", "0.55890137", "0.5554441", "0.54530036", "0.54441226", "0.539471", "0.5389379", "0.53829527", "0.5339994", "0.5336483", "0.5261702", "0.521437", "0.52008426"...
0.7050549
0
Updates the specified network source.
def update_network_source(self, network_source_id, update_network_source_details, **kwargs): resource_path = "/networkSources/{networkSourceId}" method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_match" ] extra_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_sources(self, *args, **kwargs):\n tasks.update_sources()\n return Response({})", "def set_source(self, source):\n self.data['source'] = source", "def update_source(wn, old_source, target, new_source, change_list=None):\n rel_type = find_type(old_source, target)\n delete_re...
[ "0.6329532", "0.612555", "0.60807055", "0.6027774", "0.58959955", "0.5872399", "0.5833497", "0.5821681", "0.58040607", "0.5792299", "0.57776225", "0.5715011", "0.5686939", "0.5681682", "0.5670427", "0.5601962", "0.5567387", "0.5534381", "0.5495406", "0.5481051", "0.54780453",...
0.7314297
0
Updates the specified tag default. If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked. If the `isRequired` flag is set to \"true\", the value is set during resource creation....
def update_tag_default(self, tag_default_id, update_tag_default_details, **kwargs): resource_path = "/tagDefaults/{tagDefaultId}" method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_match", "opc_request_id" ]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_default(self, name, default, group=None):\n opt_info = self._get_opt_info(name, group)\n opt_info['default'] = self._get_enforced_type_value(\n opt_info['opt'], default)\n opt_info['location'] = LocationInfo(\n Locations.set_default,\n _get_caller_detai...
[ "0.6250223", "0.62021977", "0.6062567", "0.60212696", "0.59388936", "0.5849943", "0.58077544", "0.5761992", "0.5740362", "0.57305574", "0.5730093", "0.57221216", "0.5609175", "0.5585611", "0.5582013", "0.5553106", "0.5544306", "0.55127645", "0.55110776", "0.5498642", "0.54802...
0.7059619
0
Updates the capabilities of the specified user.
def update_user_capabilities(self, user_id, update_user_capabilities_details, **kwargs): resource_path = "/users/{userId}/capabilities" method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "retry_strategy", "if_match" ] extra_kwargs = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_user():", "def update(self, user: U) -> None:\n ...", "def update(self, user: 'User', privileges: 'Optional[List[str]]' = None) -> 'Optional[User]':\n return self._update(schema=UserSchema(), entity=user, privileges=privileges)", "def getCapabilities4User(session_key, user=None):\n\n...
[ "0.5838249", "0.5771097", "0.57477796", "0.57301706", "0.5712233", "0.56142646", "0.5583086", "0.55510235", "0.5524724", "0.5517849", "0.5512739", "0.55080456", "0.54812056", "0.5419713", "0.54144186", "0.5388361", "0.5363638", "0.5359393", "0.5356132", "0.53485364", "0.53039...
0.71365345
0
return the classroom that has given classroomId. Otherwise return None
def getClassroomById(classroomId): for classroom in classroomEntities: if classroom["classroomId"] == classroomId: return classroom.copy() return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_room(self, name=None, id=None):\n \n if(name):\n return self.rooms[name] if name in self.rooms else None\n if(id):\n return next((v for (k,v) in self.rooms.items() if v.id == id), None)\n return None", "def getRoomById(self, id):\n for room in self...
[ "0.62929714", "0.62483174", "0.61793196", "0.6084332", "0.6035611", "0.5742967", "0.569907", "0.5663777", "0.56626433", "0.5645693", "0.5644132", "0.5593693", "0.55252326", "0.54916966", "0.54792434", "0.5459054", "0.54231", "0.5395465", "0.5352263", "0.5347712", "0.5322388",...
0.83576775
0
store the classroom inside the classroom data list. return True if operation is successful
def addClassroom(classroomName, capacity,location): for classroom in classroomEntities: if classroom["classroomName"] == classroomName: print("Two classrooms can not have same name") return False if classroomEntities==[]: lastSavedIdNumber = "0" else: lastSav...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def modifyClassroom(classroomId, classroomName, capacity,location):\n for classroom in classroomEntities:\n if classroom[\"classroomId\"] == classroomId:\n selectedClassroom = classroom\n selectedClassroom[\"classroomName\"] = classroomName\n selectedClassroom[\"capacity\...
[ "0.6729376", "0.6159639", "0.6049469", "0.5342558", "0.5292166", "0.52788186", "0.5239066", "0.5235893", "0.5207037", "0.52025837", "0.5175275", "0.5164154", "0.51413965", "0.5103515", "0.51000875", "0.50629807", "0.5052926", "0.5046601", "0.5038495", "0.50214577", "0.4994517...
0.75351626
0
modify content of a already stored classroom. return True if operation is successful
def modifyClassroom(classroomId, classroomName, capacity,location): for classroom in classroomEntities: if classroom["classroomId"] == classroomId: selectedClassroom = classroom selectedClassroom["classroomName"] = classroomName selectedClassroom["capacity"] = capacity ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addClassroom(classroomName, capacity,location):\n for classroom in classroomEntities:\n if classroom[\"classroomName\"] == classroomName:\n print(\"Two classrooms can not have same name\")\n return False\n\n if classroomEntities==[]:\n lastSavedIdNumber = \"0\"\n el...
[ "0.642563", "0.5946925", "0.54554087", "0.5389277", "0.5383477", "0.5381614", "0.53707135", "0.536546", "0.5361684", "0.5358011", "0.5356025", "0.5323734", "0.5304585", "0.52719533", "0.5269355", "0.5269355", "0.52631587", "0.5255712", "0.5246466", "0.5222454", "0.5217273", ...
0.697157
0
delete a classroom from the system. return True if operation is successful
def deleteClassroom(classroomId): for classroom in classroomEntities: if classroom["classroomId"] == classroomId: selectedClassroom = classroom classroomEntities.remove(selectedClassroom) return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_remove_classroom_specific_for_coach_pt1(self):\n self.assertTrue(self.coach1.has_perm('auth.remove_classroom', self.classrooms[0]))", "def test_remove_classroom_specific_for_learner(self):\n self.assertFalse(self.learner1.has_perm('auth.remove_classroom', self.classrooms[1]))", "def dele...
[ "0.6959816", "0.6681781", "0.6642126", "0.64679796", "0.6322488", "0.6272679", "0.62258446", "0.62023646", "0.6199112", "0.6172018", "0.6158727", "0.6144896", "0.61320245", "0.60920924", "0.60902715", "0.6075575", "0.6064415", "0.6015804", "0.6012518", "0.5992586", "0.5977719...
0.7279858
0
saves classroomEntities in the ClassRoomData file
def saveClassroomData(): with open("ClassRoomData.txt","wb") as classroomData: pickle.dump(classroomEntities,classroomData)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save(cls):\n playerdata = getAttributes(cls)\n Data.object_dump(playerdata, \"savedata.dat\")\n del playerdata", "def class_to_db(self):", "def saveTeachersData():\n with open(\"TeacherData.txt\",\"wb\") as teacherData:\n pickle.dump(teacherEntities,teacherData)", "def sav...
[ "0.66771996", "0.66205716", "0.6545138", "0.60703945", "0.60378635", "0.60299575", "0.6015636", "0.5970347", "0.596366", "0.590775", "0.58763117", "0.58763117", "0.58763117", "0.58696264", "0.58696264", "0.58696264", "0.58696264", "0.58696264", "0.5866105", "0.5827522", "0.58...
0.8425549
0
If the environment variable TERM is unset try with `fallback` if not empty. vt100 is a popular terminal supporting ANSI X3.64.
def load_terminfo(terminal_name=None, fallback='vt100'): terminal_name = os.getenv('TERM') if not terminal_name: if not fallback: raise TerminfoError('Environment variable TERM is unset and no fallback was requested') else: terminal_name = fallback if os.getenv('...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _init_term(fullterm):\n if platform == 'win32':\n return True\n elif platform in ('darwin', 'linux'):\n global _STATIC_VARS\n fd = stdin.fileno()\n if not isatty(fd):\n return\n old = tcgetattr(fd)\n _STATIC_VARS.term_config = (fd, old)\n new = ...
[ "0.5692326", "0.53151155", "0.5231032", "0.52155876", "0.51974976", "0.51403886", "0.5131423", "0.50917715", "0.50907224", "0.5077649", "0.4965872", "0.48994294", "0.4885659", "0.48755345", "0.48475754", "0.48131225", "0.480396", "0.47808626", "0.4763937", "0.47169244", "0.47...
0.5457427
1
This function will create foreign table under the existing dummy schema.
def create_foreign_table(server, db_name, schema_name, fsrv_name, foreign_table_name): try: connection = get_db_connection(db_name, server['username'], server['db_password'], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_table(self):\n pass", "def create_tables():\n db.create_all()", "def create_tables():\n db.create_all()", "def create_table(self, cursor: sqlite3.Cursor) -> None:\n\n if self.created:\n return\n\n # Preset this to true to work with Foreign key loops.\n...
[ "0.68531334", "0.6769567", "0.6769567", "0.67081726", "0.6704613", "0.6654913", "0.6629334", "0.66245294", "0.6596241", "0.65905637", "0.6554986", "0.6512326", "0.64604354", "0.64442676", "0.6398214", "0.63658255", "0.63251376", "0.6320983", "0.6311493", "0.6310929", "0.63013...
0.7019781
0
This function will verify current foreign table.
def verify_foreign_table(server, db_name, fsrv_name): try: connection = get_db_connection(db_name, server['username'], server['db_password'], server['host'], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def foreign_key_check(self):\n # MyRocks doesn't support foreign key\n if self.is_myrocks_table:\n log.info(\n \"SKip foreign key check because MyRocks doesn't support \" \"this yet\"\n )\n return True\n foreign_keys = self.query(\n sq...
[ "0.73069215", "0.65584505", "0.65232533", "0.65034956", "0.6413673", "0.61686987", "0.6062092", "0.60607314", "0.5977171", "0.5951747", "0.59400225", "0.5912802", "0.5910147", "0.5875509", "0.5874834", "0.58528465", "0.5831443", "0.5819649", "0.5797078", "0.57933843", "0.5743...
0.69198555
1
returns partition sum without electronic contribution, v = vibrational frequency in m^1, m = mass in kg, I=moment of inertia either number or list of three [kgm^2], V= Volume in m^3, sym=number of similar rotation axis
def partition(v,m,I,V,sym): T = s.Symbol("T") return qvib(v) + qtrans(m,V) + qrot(I,sym)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vol_uc(x):\r\n return sum([vol(m) for m in metamer(x)])", "def get_effective_mass():\n\n H_BAR = 6.582119514e-16 # eV*s\n M_0 = 9.10938356e-31 # kg\n N_KPTS = 6 # Number of k-points included in the parabola.\n\n spin_up = Spin(1)\n\n band_structure = Vasprun('vasprun.xml').get_band_structu...
[ "0.5707858", "0.54226637", "0.5395542", "0.52172196", "0.5165793", "0.5102502", "0.5102502", "0.5101261", "0.50958854", "0.49969062", "0.49926218", "0.49795717", "0.4946353", "0.49354938", "0.49308503", "0.49158522", "0.4907569", "0.4894429", "0.4889348", "0.4864072", "0.4845...
0.7013808
0
This function subscribes to the secondaryCam topic and updates its state in the global scope.
def secondayCamCallback(msg): global secondaryCamString secondaryCamString = msg.data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _on_connect(self, client, userdata, flags, rc):\n self.subscribe(self.topic)", "def _subscribe_update_callback(self, client, userdata, message):\n logger.info('Message recieved from {} topic'.format(message.topic))\n payload = message.payload\n try:\n payload_dict = jso...
[ "0.6671746", "0.63125056", "0.6236678", "0.6203599", "0.6199879", "0.61778575", "0.61778575", "0.61778575", "0.6139608", "0.6105276", "0.60968137", "0.60713357", "0.60546625", "0.6009579", "0.59927255", "0.596567", "0.59032744", "0.588785", "0.5863523", "0.5775574", "0.577557...
0.6567832
1
This function first determines which camera is the primary and which is secondary. The image streams from the respective primary and seconday cameras are resized and republished
def resizeAndRepubThread(): # reference globals global primaryCamString global secondaryCamString global armCamImage global headCamImage # initialize image publishers primaryPub = rospy.Publisher(primaryCamRepub, Image, queue_size=1) secondaryPub = rospy.Publisher(secondaryCamRepub, Im...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, camera, cameras, settings):\n\n self.cam = None\n self.jpeg_quality = 95 # 0 to 100, higher is better quality, 95 is cv2 default\n # check picamera version\n try:\n picamversion = require('picamera')[0].version\n except:\n picamversion = ...
[ "0.6055959", "0.594556", "0.5910366", "0.58318543", "0.5761805", "0.5758764", "0.57067573", "0.56581026", "0.5576743", "0.5523943", "0.5506011", "0.53973216", "0.5318885", "0.5317909", "0.5289555", "0.5289161", "0.52827555", "0.527724", "0.52749354", "0.5268248", "0.52553976"...
0.6135356
0
Checkout code for CESM If sandbox exists, check that the right tag has been checkedout. Otherwise, download the code, checkout the tag and run manage_externals. The scripts don't seem to like multiple applications of manage_externals.
def code_checkout(cesm_repo, coderoot, tag): sandbox = os.path.split(coderoot)[-1] if os.path.exists(coderoot): print('Check for right tag: '+coderoot) p = Popen('git status', shell=True, cwd=coderoot, stdout=PIPE, stderr=PIPE) stdout, stderr = p.communicate() stdout = stdout.d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main():\n sandbox = create_sandbox()\n directory = download_package_to_sandbox(\n sandbox,\n 'https://pypi.python.org/packages/source/c/checkmyreqs/checkmyreqs-0.1.6.tar.gz'\n )\n print(directory)\n destroy_sandbox(sandbox)", "def checked_out_MPS():\n\n checked_out_packages = ...
[ "0.57098264", "0.5443898", "0.52824104", "0.5211898", "0.50929743", "0.5078513", "0.5051536", "0.50458026", "0.5009098", "0.50035506", "0.49857637", "0.49795955", "0.490863", "0.4892152", "0.4889629", "0.4881726", "0.48687592", "0.48336747", "0.4761207", "0.47558445", "0.4754...
0.6543128
0
Test adding basic Deterministic InnerNode.
def test_addInner(self): print("\nTest 1: Adding InnerNode") try: builder = StaticBuilder() builder.addInput(10, name="In") enc_name = builder.addInner(3, name="In") except AttributeError: print("\nCAUGHT! Trying to assign the same name to two nodes! " "AttributeError exc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_add_znode(self):\n z = self.test_start_empty()\n self.test_start_one_value(z)", "def test_add_new_child(self):\n root = netapp_api.NaElement('root')\n self.mock_object(netapp_api.NaElement,\n '_convert_entity_refs',\n return_val...
[ "0.634626", "0.61077243", "0.60818183", "0.6013245", "0.5986549", "0.597251", "0.595647", "0.58965737", "0.5876589", "0.5845326", "0.5809255", "0.5755622", "0.5737071", "0.5720968", "0.5700372", "0.5690431", "0.56798387", "0.56767136", "0.56564647", "0.5654355", "0.56480926",...
0.751408
0
Test adding basic OutputNode
def test_addOutput(self): print("\nTest 2: Adding OutputNode") builder = StaticBuilder() builder.addInput(10, name="In") builder.addInner(3, name="Det") o_name = builder.addOutput(name="Out") o1 = builder.nodes[o_name] print("\nNode keys in builder:", list(builder.nodes.keys())) pri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_node_outputs(self):\n pass", "def addOutputsNode():\n return render_template(\"addOutputsNode.html\")", "def testNewOutputModule(self):\n manager.OutputManager.RegisterOutput(TestOutput)\n\n output_module = manager.OutputManager.NewOutputModule('test_output')\n self.assertIsInst...
[ "0.75490946", "0.666691", "0.63000286", "0.6119677", "0.6104275", "0.6039189", "0.59738773", "0.5940442", "0.5934479", "0.5925732", "0.5917337", "0.5912333", "0.5910766", "0.58941495", "0.5879698", "0.5866728", "0.5860062", "0.5858629", "0.58093554", "0.5797671", "0.57790154"...
0.78752226
0
Test building a model with 2 outputs. Test Cloning an output
def test_BuildModel1(self): print("\nTest 5: Building a Model with cloning") builder = StaticBuilder("Clone") in1 = builder.addInput(10) enc1 = builder.addInner(3) out1 = builder.addOutput(name="Out1") out2 = builder.addOutput(name="Out2") builder.addDirectedLink(in1, enc1) builder....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_default_output_2():\n #input_file = os.path.join('.', 'test_files', 'test.input')\n actual = os.path.join('.', 'test_files', 'rc_actual.out')\n times = list(range(0, 30, 5))\n inputs = {\"names\": ['V'],\n \"values\": [\n [1],\n [0],\n ...
[ "0.6694175", "0.6504223", "0.63788325", "0.6321789", "0.6308089", "0.6245688", "0.6215992", "0.61850905", "0.6116955", "0.6110523", "0.609222", "0.6081803", "0.60653377", "0.6058217", "0.6056005", "0.6037613", "0.60202926", "0.5977124", "0.5976717", "0.59375304", "0.59170985"...
0.7202675
0
Builds a model with 2 inputs. Test ConcatNode
def test_BuildModel2(self): print("\nTest 6: Building a Model with Concat") builder = StaticBuilder("Concat") in1 = builder.addInput(10) in2 = builder.addInput(20) enc1 = builder.addInner(3, num_islots=2) out1 = builder.addOutput() builder.addDirectedLink(in1, enc1, islot=0) builder.add...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def concat_model():\n x = tf.keras.Input(shape=[10, 10, 3, ])\n x1 = tf.keras.layers.Conv2D(5, (2, 2))(x)\n x2 = tf.keras.layers.Conv2D(6, (2, 2))(x)\n x3 = tf.keras.layers.Conv2D(7, (2, 2))(x)\n z = tf.keras.layers.concatenate([x2, x1, x3], axis=-1)\n z1 = tf.keras.layers.Conv2D(10, (2, 2))(z)\n...
[ "0.6844526", "0.6768665", "0.66675013", "0.65246445", "0.6511792", "0.6232399", "0.6185943", "0.61621577", "0.60782385", "0.60532033", "0.6042736", "0.6000108", "0.5988612", "0.59775037", "0.5974451", "0.5970998", "0.59662324", "0.59449714", "0.59398437", "0.58934414", "0.588...
0.77477473
0
Given the IP ADDRESS of the camera, to which you are connected and ACQUISITION MODE into which you want to put the camera, this command will send the according request to the camera.
def command(mode, ip, log): logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging_config[log]) # Using the default dict to get a valid format string no matter what phantom_socket = PhantomSocket(ip) phantom_socket.connect() click.echo('CONNECTED TO THE PHA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def camera_control(camera_host, camera_port, camera_user, camera_pass, q):\n\n try:\n camera = IPCamera(camera_host, camera_port, camera_user, camera_pass)\n q.put(camera.get_rtsp_url())\n except RuntimeError as exc:\n q.put(exc)\n\n try:\n while True:\n camera.move_...
[ "0.657208", "0.59614706", "0.5739002", "0.5577688", "0.5528365", "0.5405239", "0.54035485", "0.5352449", "0.5316245", "0.53074706", "0.5200834", "0.5174972", "0.51566505", "0.51535857", "0.50904423", "0.50857383", "0.50825894", "0.5082426", "0.507766", "0.5062548", "0.5052165...
0.689005
0
Attempts to insert the supplied genome. If the genome is inserted, this method will return True, otherwise it will return False.
def try_insert_genome(self, genome): raise Exception("called abstract insert_genome method")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def inserted(self):\n return True", "def insert(self, row):\n if not self.loaded:\n print(\"Database is not loaded\")\n return False\n\n self.rows.append(row)\n return True", "def _can_insert(self, index, value):\n return not bool(self._insert_callback(i...
[ "0.6346422", "0.6159592", "0.60494566", "0.57980555", "0.578149", "0.57695425", "0.5667096", "0.56136864", "0.5602667", "0.5582492", "0.5562881", "0.5556916", "0.55056053", "0.54988134", "0.54925364", "0.54842436", "0.5480843", "0.547767", "0.54687303", "0.54569113", "0.54469...
0.8167088
0
Instantiate a evaluator class.
def build_evaluator(cfg: CfgNode) -> EvaluatorBase: name = cfg["name"] evaluator = simple_build(name, cfg, EVALUATORS) return evaluator
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def evaluator(self, evaluator):\n self.__evaluator = evaluator", "def _create_evaluators(self):\n pass", "def build_evaluator(cls, cfg, dataset_name, output_folder=None):\n if output_folder is None:\n output_folder = os.path.join(cfg.OUTPUT_DIR, \"inference\")\n evaluator...
[ "0.66867024", "0.6603871", "0.6451372", "0.644928", "0.6330437", "0.6274948", "0.61652106", "0.6148524", "0.6130907", "0.5967345", "0.58819443", "0.5654034", "0.56327844", "0.56159383", "0.55843073", "0.5571741", "0.5563956", "0.5515962", "0.5513957", "0.5500064", "0.5477984"...
0.68942183
0
Instantiate a evaluate helper class.
def build_evaluate_helper(cfg: CfgNode) -> EvaluateHelper: evaluator = build_evaluator(cfg.evaluator) helper = EvaluateHelper(evaluator) return helper
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _create_evaluators(self):\n pass", "def evaluator(evaluate):\r\n @functools.wraps(evaluate)\r\n def ecspy_evaluator(candidates, args):\r\n fitness = []\r\n for candidate in candidates:\r\n fitness.append(evaluate(candidate, args))\r\n return fitness\r\n ecspy_e...
[ "0.64568245", "0.6257798", "0.6237631", "0.6131028", "0.6065035", "0.60551", "0.60094994", "0.5996954", "0.59962183", "0.59601563", "0.59601563", "0.59439415", "0.5902795", "0.589313", "0.5882588", "0.58795404", "0.58464766", "0.5829064", "0.5801519", "0.5770252", "0.57448375...
0.70881444
0
Plot x and y axis of dfs in common graph.
def plot(x, y, *dfs): ax = None for df in dfs: ax = df[[x, y]].set_index(x).plot(kind='line', ylim=(0, None), xlim=(0, None), ax=ax)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def draw_plot(ax, dfs, legend, x, y, xscale, yaxis_max):\n xticks = dfs_all_values(dfs, x)\n # loop over all pandas.DataFrame objects\n for df in dfs:\n # setting the x-column as an index is required to draw the y-column\n # as a function of x argument\n df = df.set_index(x)\n ...
[ "0.7042768", "0.64889604", "0.6424103", "0.62358296", "0.62245584", "0.6214347", "0.6187972", "0.61645967", "0.6090626", "0.6083194", "0.60742915", "0.60631174", "0.6021211", "0.60032755", "0.5985849", "0.5971447", "0.59706855", "0.5946714", "0.59466743", "0.593274", "0.59300...
0.7176058
0
8 microed stepping by faking distance twice as long.
def micro_8(steps, a): df = pd.DataFrame(index=np.arange(0, steps * 16), columns=('v', 's', 'd', 't')) t = 0.0 m = 8 # micro level d = d0 = math.sqrt(1/a/m) # faster accel since distance is longer s = 0 # steps p = 0 # position p_d = 1/m # position delta for s i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def drive_eight(n):\n # Variables for the go_diff function\n fast_speed = 80 \n slow_speed = 25\n # Half a lap time, this is the time the robot turns in a direction before switching\n half_lap_time =6.2 \n # To avoid having tu manually stop the robot we set it to drive continuously for x amount of seconds.\n...
[ "0.6142764", "0.5769263", "0.57421744", "0.5703275", "0.5681504", "0.5650031", "0.5599577", "0.5527048", "0.55249375", "0.55100065", "0.55055285", "0.549204", "0.54680324", "0.5440701", "0.54385084", "0.54321384", "0.5418194", "0.54137677", "0.54083496", "0.5375917", "0.53658...
0.6169425
0
Add the elements in ref_gen to an existing index.
def update_index(self, ref_gen): testing = True logging.warning('Updating index') es_insert.index(es, ref_gen, self.index_name, testing, action="update") logging.warning('Finished updating')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _add_to_index( env, meta_dict, file_str, logger ):\n global adapter_glob\n if adapter_glob is not None:\n adapter = adapter_glob\n else:\n logger.warning( u\"Connecting to index...\" )\n adapter = adapter_file.adapter(env)\n adapter_glob = adapter\n doc = document(\n ...
[ "0.6223327", "0.6165989", "0.6162208", "0.6124569", "0.5892641", "0.5827929", "0.5818835", "0.5818835", "0.5806102", "0.57331675", "0.5731806", "0.57138515", "0.57138515", "0.569752", "0.5685238", "0.5673912", "0.56449544", "0.5584928", "0.5584928", "0.55495024", "0.5501107",...
0.7487727
0
Print crossword assignment to the terminal.
def print(self, assignment): letters = self.letter_grid(assignment) for i in range(self.crossword.height): for j in range(self.crossword.width): if self.crossword.structure[i][j]: print(letters[i][j] or " ", end="") else: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def draw_word_scheme(self) -> None:\n print(\"\".join(self.word2))", "def print(self):\n\n def format_guessed_word(word):\n return ' '.join(list(word))\n\n def format_blank_word(word):\n return ' '.join(list('_' * len(word)))\n\n print('\\n' + \"Board\" + '=' * 7...
[ "0.6418134", "0.6091784", "0.60144675", "0.5868591", "0.58374834", "0.5763381", "0.5702663", "0.56456727", "0.56032985", "0.5602622", "0.5599726", "0.55596346", "0.5540012", "0.55338246", "0.5492764", "0.54739493", "0.5469291", "0.5463655", "0.54530674", "0.54021096", "0.5400...
0.72022206
1
Save crossword assignment to an image file.
def save(self, assignment, filename): from PIL import Image, ImageDraw, ImageFont cell_size = 100 cell_border = 2 interior_size = cell_size - 2 * cell_border letters = self.letter_grid(assignment) # Create a blank canvas img = Image.new( "RGBA", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save(self, filename):\n print(\"Saving...\", end=\"\\r\")\n canvas = self.canvas[self.N:self.S,self.W:self.E]\n cv2.imwrite(\"./Output/\"+filename, canvas)\n print(\"Saved:\",filename)", "def save_detection(self, image):\n\t\timg = self.visualize_detection(image)\n\t\timg = cv2.cv...
[ "0.65461063", "0.6395748", "0.63688743", "0.6313389", "0.62285316", "0.61451906", "0.6133265", "0.6110629", "0.61080384", "0.60995334", "0.6096377", "0.60782754", "0.60167956", "0.60059804", "0.59735614", "0.5961569", "0.5951604", "0.5941784", "0.591758", "0.5905942", "0.5890...
0.78399444
1
Return True if `assignment` is complete (i.e., assigns a value to each crossword variable); return False otherwise.
def assignment_complete(self, assignment): # print("Entered assignment_complete Function") for var in assignment: if assignment[var] is None: return False return self.consistent(assignment) # raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assignment_complete(self, assignment):\n # for each variable in the crossword\n for variable in self.crossword.variables:\n # if the variable is not assigned a value\n if variable not in assignment:\n # the crossword is not complete\n return Fal...
[ "0.8660917", "0.7774996", "0.7236496", "0.715314", "0.6777561", "0.67663616", "0.6716149", "0.6668017", "0.6563448", "0.65057194", "0.64147335", "0.6396104", "0.6369181", "0.63129765", "0.63119334", "0.6073311", "0.6054601", "0.603511", "0.6031876", "0.5906102", "0.5893759", ...
0.81902444
1
Return True if `assignment` is consistent (i.e., words fit in crossword puzzle without conflicting characters); return False otherwise.
def consistent(self, assignment): # print("Entered consistent Function") # print("assignment") # print(assignment) overlaps = self.crossword.overlaps value_set = set() for variable in assignment: #checking overlaps with neighbors neighbors = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def consistent(self, assignment):\n # for each of the current assignments\n for word in assignment:\n # if the word does not fit in the gaps\n if len(assignment[word]) != word.length:\n # reject attempt\n return False\n # if the word is a...
[ "0.8402212", "0.8299707", "0.702421", "0.6465896", "0.64497894", "0.6389745", "0.6059358", "0.6028566", "0.58353883", "0.5827617", "0.5789568", "0.5764622", "0.57099473", "0.5694708", "0.5602207", "0.55700195", "0.5525498", "0.5517784", "0.5466885", "0.546393", "0.54609096", ...
0.83261746
1
Using Backtracking Search, take as input a partial assignment for the crossword and return a complete assignment if possible to do so. `assignment` is a mapping from variables (keys) to words (values). If no assignment is possible, return None.
def backtrack(self, assignment): # print("Entered backtrack Function") # Check if assignment is complete if len(assignment) == len(self.domains): return assignment # Try a new variable var = self.select_unassigned_variable(assignment) word_list = self.order_d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backtrack(self, assignment):\n # if the assignment is complete\n if self.assignment_complete(assignment):\n # return the assignment, crossword is complete\n return assignment\n # pick a variable to try to assign\n var = self.select_unassigned_variable(assignmen...
[ "0.7360267", "0.70080864", "0.6352615", "0.62211263", "0.6217823", "0.6217823", "0.5960085", "0.59551066", "0.5912701", "0.58554476", "0.5837058", "0.5765993", "0.57650095", "0.5723373", "0.55428743", "0.5452668", "0.5425594", "0.5342919", "0.53365654", "0.5329358", "0.532841...
0.70967716
1
Draws text onto a given surface.
def draw_text(self, text, font, color, surface, x, y): #use for narrative in end sequence text_obj = font.render(text, True, color) text_rect = text_obj.get_rect() text_rect.center = (x, y) surface.blit(text_obj, text_rect)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def draw_text(screen, font, text, surfacewidth, surfaceheight):\n\tfw, fh = font.size(text) # fw: font width, fh: font height\n\tsurface = font.render(text, True, (0, 0, 255))\n\t# // makes integer division in python3 \n\tscreen.blit(surface, (0,0))", "def drawText(text, font, surface, x, y, textcolour):\r\n ...
[ "0.8523884", "0.8420744", "0.82012075", "0.81627655", "0.80817306", "0.7885264", "0.78392565", "0.78264725", "0.7806616", "0.77619326", "0.77171636", "0.7670391", "0.7642468", "0.7597258", "0.7542746", "0.7457794", "0.745692", "0.7357429", "0.7349292", "0.7319174", "0.729991"...
0.85818034
0
Split the file and save chunks to separate files
def split(self): print 'Splitting file', self.__filename print 'Number of chunks', self.__numchunks, '\n' try: f = open(self.__filename, 'rb') except (OSError, IOError), e: raise FileSplitterException, str(e) bname = (os.path.split(self.__filena...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def split_file(self, input_file):\r\n file_list = [] \r\n with open(input_file, 'r', encoding='GB18030', errors='ignore') as f_in:\r\n data = f_in.readlines()\r\n lines_num = len(data)\r\n size = lines_num // self.num_workers # lines splitted in a chunk\r\n ...
[ "0.73668265", "0.70914865", "0.7090537", "0.7067825", "0.7001469", "0.68641955", "0.67107993", "0.65979683", "0.65870893", "0.6580552", "0.6572284", "0.65702844", "0.6551708", "0.64280057", "0.6383532", "0.6352524", "0.63487375", "0.629163", "0.62073165", "0.6201502", "0.6150...
0.745905
0