query
stringlengths
10
2k
document
stringlengths
20
51.2k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
TVTropes identifier >>> tv_tropes_id("Harry Potter and the Philosopher's Stone") "Film/HarryPotterAndThePhilosophersStone" >>> tv_tropes_id("Inception") "Film/Inception" >>> tv_tropes_id("Interstellar") "Film/Interstellar"
def tv_tropes_id(title): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def the_tvdb_dot_com_id(title):\n pass", "def get_id(novel):\n href = novel.find('td', class_='tal').a['href']\n novel_id = href.split('/')[-1].split('.')[0]\n return novel_id", "def getTrid(request):\n words = request.replace('\\'').strip().split(',')[2].split(':')\n return int(words...
[ "0.6078088", "0.57009953", "0.5679321", "0.5608138", "0.55709726", "0.5547074", "0.5546363", "0.5482804", "0.54068816", "0.53981686", "0.5368778", "0.5361829", "0.5339387", "0.5314747", "0.53039086", "0.52724123", "0.5261339", "0.5252683", "0.52481806", "0.52481806", "0.52481...
0.7562092
0
Gets the path to the file where the corresponding results are located. File is presumed to be a pickle file.
def get_path( layer: LayerType, batch_size: int, num_runs: int, num_repeats: int, gsm_mode: str, random_seed: Optional[int] = None, forward_only: bool = False, root: str = "./results/raw/", suffix: str = "", ) -> str: pickle_name = f"{layer}_mode_{gsm_mode}_bs_{batch_size}_runs_{...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_file_save_path(self):\n return self.out", "def get_resultfile(self):\r\n return self._resultfile", "def _pickle_path(self) -> Path:\r\n return self.output_path / \"pickles\"", "def GetResultFile(self):\n\n file_path = self.configfile.map['ResultFilePath']\n\n # Check if...
[ "0.7329037", "0.7090694", "0.70785505", "0.70540625", "0.69719464", "0.68083024", "0.67298055", "0.66807216", "0.6586527", "0.65609425", "0.6532282", "0.6493678", "0.6446342", "0.64424974", "0.64273787", "0.6424655", "0.64169306", "0.6411216", "0.64013296", "0.63921887", "0.6...
0.587458
96
Create and return 2dimensional grid filled with default value.
def create_grid(size_x, size_y, default=None): return [[default for _x in range(size_y)] for _y in range(size_x)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_grid(grid):\r\n for i in range(4):\r\n grid.append([0]*4)\r\n return grid", "def create_empty_grid(width, height):\n return [[None] * width for _ in range(height)]", "def create_grid(self):\n return [[0] * self.width for _ in range(self.height)]", "def create_grid(grid):\r\n...
[ "0.71257526", "0.71121633", "0.6972256", "0.68929964", "0.6831307", "0.68251276", "0.67800945", "0.6750967", "0.67469025", "0.6684408", "0.66788876", "0.66390866", "0.6620341", "0.66108716", "0.6603429", "0.648895", "0.6455742", "0.6354443", "0.6342689", "0.62575114", "0.6242...
0.76616347
0
Create game grid and set initial values.
def __init__(self): self.__grid = create_grid( Settings.SIZE_X, Settings.SIZE_Y, MarkerType.NONE) self.__turn = 0 self.__state = GameState.PLAYING self.__winner = MarkerType.NONE self.__loser = MarkerType.NONE # Separate counter for turns, because __turn dep...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_grid(self) -> None:\n for i in range(self.grid_size[0]):\n for j in range(self.grid_size[1]):\n self.set(i, j, self.base_color)", "def initialize_grid(self):\n self.grid = np.zeros([self.N, self.N, self.N])\n return self.grid", "def initialize_grid(...
[ "0.7857077", "0.7786108", "0.77359056", "0.7717813", "0.77171123", "0.765116", "0.7524892", "0.7487121", "0.7471823", "0.7456017", "0.7426168", "0.7339255", "0.73312736", "0.73291785", "0.73291785", "0.73291785", "0.73176736", "0.7294929", "0.72910875", "0.72910875", "0.72584...
0.6593638
81
Returns relevant tiles and winner if found IN_A_ROW amount of marks. Checks if move is a winning move, if so, return winner MarkerType and list of tuples (x, y). If not, return MarkerType.NONE and an empty list.
def check_move(self, mark, move_x, move_y): # Check 4 possible directions: horizontal, vertical, 2 diagonals directions = [(1, 0), (0, 1), (1, 1), (1, -1)] # Tiles to mark yellow all_winning_tiles = [] for check_dir in directions: count = 0 winning_tile...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def make_move(self, x, y):\n player = self.get_player()\n self.__grid[y][x] = player\n\n winner, win_tiles = self.check_move(self.get_player(), x, y)\n\n self.__turns_played += 1\n\n # Check if winner has been found\n if player == winner:\n loser = MarkerType(1 ...
[ "0.58561605", "0.5749949", "0.5726695", "0.5681413", "0.5575043", "0.55688137", "0.55375665", "0.54955095", "0.5474098", "0.5467789", "0.54507786", "0.54371434", "0.5415139", "0.537334", "0.5372865", "0.53456646", "0.53433925", "0.5333348", "0.5305718", "0.5300994", "0.529948...
0.723252
0
Get the player of the current turn.
def get_player(self): return MarkerType(self.__turn % 2)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def player(self):\n return self.players[self.tictactoe.turn]", "def getPlayer(self):\n return self.currentPlayer", "def get_current_player(self):\r\n\r\n return self.players[(self.turn_number) % len(self.players)].get_id()", "def get_current_player(self) :\n return self.current_player...
[ "0.8355525", "0.8214713", "0.8137372", "0.81272113", "0.8120129", "0.8068833", "0.8041043", "0.80174387", "0.7972779", "0.79366964", "0.79366964", "0.7929815", "0.7904195", "0.7856204", "0.7835503", "0.7793868", "0.77605194", "0.7701857", "0.7688172", "0.75768805", "0.7502631...
0.6588572
54
Initializes the priority heap
def __init__(self, is_min=True): self._data = [] self.min = is_min
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n self.min_heap = []\n self.max_heap = []\n self.size_max, self.size_min = 0, 0", "def __init__(self):\n self.min_heap = []\n self.max_heap = []", "def __init__(self):\n self.__max_heap = []\n self.__min_heap = []", "def __init__(self):\n ...
[ "0.7895022", "0.78730625", "0.78242964", "0.7812003", "0.7795688", "0.77610606", "0.7727318", "0.7712711", "0.77093875", "0.7683902", "0.7657671", "0.764797", "0.76411146", "0.76411146", "0.76411146", "0.76315606", "0.76188815", "0.75978863", "0.75660425", "0.756221", "0.7523...
0.0
-1
Calculates the left child index
def _left(self, j): return 2 * j + 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_left_child_index(self):\n return (2 * self.index) + 1", "def left_child(self, index):\n return 2 * index + 1", "def get_left_child_index(self, parent):\n return 2*parent+1", "def left_child(self, index):\n return 2 * index", "def left_child_idx(idx):\n return (idx << ...
[ "0.9145516", "0.8720523", "0.86428577", "0.8607985", "0.8433611", "0.79732114", "0.78423846", "0.78423846", "0.77073866", "0.76501465", "0.7524695", "0.7449483", "0.7326895", "0.72024316", "0.720125", "0.71856594", "0.7181136", "0.7116415", "0.69767845", "0.69751096", "0.6912...
0.6913887
20
sorts a given array using max heap
def heap_sort(array): p = PriorityHeap(min == False) n = len(array) for i in range(n): p.push(array[i], array[i]) for j in range(n - 1, -1, -1): item = p.pop().value array[j] = item return array
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def heap_sort(array):\n highest_index = len(array)-1\n Heap.heapify(array, highest_index)\n for end in range(highest_index, 0, -1):\n array[end], array[0] = array[0], array[end]\n Heap.sift_down(array, 0, end-1)", "def heap_sort(A):\n build_max_heap(A)\n for i in ...
[ "0.80516183", "0.79705334", "0.7890772", "0.78670555", "0.7799253", "0.771836", "0.77176285", "0.7564382", "0.7546584", "0.7499826", "0.74218196", "0.74122137", "0.7375812", "0.7371726", "0.7371726", "0.73027486", "0.7227698", "0.7225297", "0.7205535", "0.72035533", "0.719425...
0.78564495
4
Returns the the target IDs of all targets which are subunits of this target.
def subunit_ids(self): return self._subunit_ids
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subunits(self):\n\n return [get_target_by_id(id_) for id_ in self._subunit_ids]", "def target_ids(self):\n\n return self._target_ids", "def targets(self):\n\n return [get_target_by_id(i) for i in self._target_ids]", "def Targets(self):\n return self._targets", "def all_targe...
[ "0.8139319", "0.7522531", "0.70983726", "0.68496126", "0.6217576", "0.61945754", "0.6187363", "0.6009484", "0.600644", "0.5960568", "0.59250546", "0.5887821", "0.5820807", "0.58099294", "0.57532734", "0.5707384", "0.57073337", "0.56545067", "0.565125", "0.565025", "0.56404316...
0.74838954
2
Returns a list of all targets which are subunits of this target.
def subunits(self): return [get_target_by_id(id_) for id_ in self._subunit_ids]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Targets(self):\n return self._targets", "def subunit_ids(self):\n\n return self._subunit_ids", "def all_targets(self):\n return self._combined_all_versioned_targets.targets", "def targets(self):\n\n return [get_target_by_id(i) for i in self._target_ids]", "def subtrees(self):\n ...
[ "0.6547798", "0.6537155", "0.6409904", "0.6134193", "0.60197294", "0.5994829", "0.596996", "0.5969776", "0.59673625", "0.5923284", "0.58888596", "0.5884446", "0.5878782", "0.57408834", "0.57351184", "0.57270235", "0.5695743", "0.5683828", "0.56541175", "0.5613859", "0.5599565...
0.8412534
0
Returns a list of all targets of which this target is a subunit.
def complexes(self): return [get_target_by_id(id_) for id_ in self._complex_ids]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subunits(self):\n\n return [get_target_by_id(id_) for id_ in self._subunit_ids]", "def GetTargets(self):\n return []", "def Targets(self):\n return self._targets", "def all_targets(self):\n return self._combined_all_versioned_targets.targets", "def subunit_ids(self):\n\n retu...
[ "0.81722623", "0.67075866", "0.6693396", "0.66129667", "0.6458573", "0.6394622", "0.6344068", "0.62526625", "0.61929977", "0.61636466", "0.61145633", "0.6106749", "0.61045384", "0.6094414", "0.60323805", "0.59853154", "0.59726447", "0.59541684", "0.5810936", "0.574323", "0.57...
0.50977606
81
Returns any genes for this target.
def genes(self, species=None): if species: return [Gene(gene_json) for gene_json in self._get_gene_json() if gene_json["species"] and gene_json["species"].lower() == species.lower()] else: return [Gene(gene_json) for gene_json in self._get_gene_json()]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generate_genotype(self):\n genes = []\n for i in range(self.n_genes):\n genes.append(self.Gene(n_bases=self.n_bases))\n self.genes = genes", "def genotypes(self):\n return self.data.genotypes.values", "def getGeneList( self ):\n return self.geneList", "def ge...
[ "0.680837", "0.6797295", "0.6750419", "0.67265266", "0.6722588", "0.6722087", "0.6712213", "0.6710539", "0.6668462", "0.6613429", "0.6534275", "0.6453582", "0.6418876", "0.62320304", "0.6212615", "0.6149725", "0.60569185", "0.60518366", "0.60473007", "0.6033758", "0.59817266"...
0.6156521
15
Returns any interactions for this target.
def interactions(self, species=None): if species: return [Interaction(interaction_json) for interaction_json in self._get_interactions_json() if interaction_json["targetSpecies"] and interaction_json["targetSpecies"].lower() == species.lower()] else: return [Interac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def interactions(self) -> Sequence[Interaction[_C_out, Tuple[int,...]]]:\n return self._simulation.interactions", "def interactions(self) -> Sequence[Interaction[_C_out,_A_out]]:\n return self._simulation.interactions", "def interactions(self) -> Sequence[Interaction[_C_out,_A_out]]:\n ret...
[ "0.7635539", "0.7618791", "0.7607021", "0.7034415", "0.69274485", "0.6626865", "0.6579458", "0.64398056", "0.6357686", "0.62823117", "0.62191", "0.6205094", "0.6088833", "0.5793229", "0.5733658", "0.5708571", "0.5677349", "0.5675201", "0.5659212", "0.56190616", "0.56143284", ...
0.6714101
5
Returns any ligands that this target interacts with.
def ligands(self, species=None): ligands = [] for interaction in self.interactions(species=species): ligand = interaction.ligand() if ligand not in ligands: ligands.append(ligand) return ligands
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ligand_idxs(self):\n return self._ligand_idxs", "def junctions(self):\n return self._node_reg.junctions", "def get_aliens(self):\n return self._aliens", "def get_provided_loans(self):\n assert self.is_valid(), \"MortechScenario is invalid.\"\n\n return list(self.instanc...
[ "0.66077334", "0.57611686", "0.56107444", "0.55208874", "0.5460841", "0.5450228", "0.5431688", "0.5414193", "0.5393048", "0.53595525", "0.53572077", "0.53465843", "0.5318789", "0.5294347", "0.52933663", "0.5288749", "0.52207863", "0.5211993", "0.51709855", "0.517", "0.5166603...
0.7339666
0
Returns a list of all targets in this family. Note that only immediate children are shown if a family has subfamilies then it will not return any targets here you must look in the subfamilies.
def targets(self): return [get_target_by_id(i) for i in self._target_ids]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def all_targets(self):\n \n # Load the most up-to-date targets of the 'targets' role and all\n # delegated roles.\n self._refresh_targets_metadata(include_delegations=True)\n \n all_targets = []\n # Fetch the targets for the 'targets' role.\n all_targets = self._targets_of_role('targets', skip...
[ "0.74319416", "0.7236862", "0.6994762", "0.6966246", "0.692934", "0.6899643", "0.6816462", "0.67954427", "0.6633013", "0.6616416", "0.6590309", "0.65442187", "0.65292895", "0.6523016", "0.64466196", "0.6410476", "0.6395937", "0.631087", "0.63102186", "0.63102186", "0.6259434"...
0.7546058
0
Creates summaries for tensorboard visualizations
def _create_summaries(self): self._loss_summary = tf.summary.scalar('loss', self._loss) self._perplexity_summary = tf.summary.scalar('average_perplexity_per_sentence', self._average_perplexity)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _make_summaries(self):\n\n self.summaries['loss'] = tf.summary.scalar('loss', self.loss)\n\n self.summaries['0_inputs_outputs'] = \\\n tf.summary.image('0_inputs_outputs', tf.concat([\n tf.expand_dims(tf.expand_dims(tf.stack(self.inputs, axis=-1), axis=0), axis=-1),\n ...
[ "0.77338934", "0.7247179", "0.7156187", "0.7156187", "0.6947823", "0.6853505", "0.6770717", "0.6766059", "0.6632517", "0.6626819", "0.66250306", "0.65890616", "0.6509384", "0.6486731", "0.6482667", "0.64412177", "0.63952094", "0.63598484", "0.63003665", "0.6281477", "0.628070...
0.75306743
1
Uses the dataset name to get the reference from the dataset factory class
def get_dataset_reference(self, dataset_name): print_debug("Geting dataset :" + dataset_name) dataset = DatasetFactory.get(dataset_file_name=dataset_name) return dataset
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cls(dataset_name):\n return find_dataset_using_name(dataset_name)", "def find_dataset_using_name(dataset_name):\n\tdataset_filename = \"data.\" + dataset_name + \"_dataset\"\n\tdatasetlib = importlib.import_module(dataset_filename)\n\n\tdataset = None\n\ttarget_dataset_name = dataset_name.replace('_',...
[ "0.7737287", "0.7597277", "0.74283355", "0.74283355", "0.74283355", "0.73712724", "0.7119853", "0.70779943", "0.69500804", "0.68951887", "0.6874477", "0.68366706", "0.67918825", "0.67714226", "0.6732941", "0.67221576", "0.6668841", "0.66002727", "0.65739554", "0.651979", "0.6...
0.8124097
0
Writes the actual guild name in YATA database
async def push_guild_info(guild, member, bot_pk): # get YATA user db_cred = json.loads(os.environ.get("DB_CREDENTIALS")) dbname = db_cred["dbname"] del db_cred["dbname"] con = await asyncpg.connect(database=dbname, **db_cred) await con.execute('UPDATE bot_guild SET "guildName"=$1, "guildOwnerId"...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def create_guild(self, name, guild_id):\n\n await self.db[str(guild_id)].insert_one({'name': name})", "def get_and_add_guild_to_DB(name, server):\n add_guild(name, server)\n update_guild_members(name, server)", "def save(self):\r\n # os.mkdirs(DATADIR, exist_ok=True)\r\n savefi...
[ "0.6869662", "0.61999714", "0.6159944", "0.5973674", "0.5942589", "0.58459914", "0.5843514", "0.5841463", "0.5781669", "0.5779924", "0.5657661", "0.5591989", "0.5587733", "0.5536538", "0.54841155", "0.5476191", "0.5444125", "0.53930324", "0.53909", "0.5372388", "0.53138566", ...
0.67068934
1
Extract the slope and intercept value from cycle 2 to cycle 100
def extract_slope_intercept_cycle_to_cycle(batch,index,start_cycle,end_cycle): slope= [] intercept = [] nums = end_cycle - start_cycle + 1 for ind in index: cell_no = list(batch.keys())[ind] x_axis = np.arange(1,nums+1,1) y_axis = batch[cell_no]['summary']['QD'][start_cycle-1:en...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_slope(x, y):\n slope = linregress(x, y)\n return slope", "def calculate_slope(cnt):\n y = OrderedDict(cnt.most_common())\n v=np.log(list(y.values()))\n k=np.log(np.arange(1,len(v)+1,1))\n return linregress(k,v)", "def slope(l):\n if l[1] == l[0]:\n return fl...
[ "0.6179249", "0.6178919", "0.609974", "0.6027926", "0.59766316", "0.59649307", "0.5944584", "0.5936941", "0.58990204", "0.5888123", "0.5840641", "0.5833274", "0.58319545", "0.58314764", "0.57866377", "0.5743019", "0.5736867", "0.57323146", "0.56653607", "0.564704", "0.5640698...
0.76948273
0
Function that converts a dictionary into a JSON string.
def dict_to_json_str(d): json_entry = '"{}":{}' json_entry_str = '"{}":"{}"' entries = [] for entry in d: key = entry value = d[entry] try: basestring except NameError: basestring = str if not value: value = False e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dict_to_json(dic):\n return json.dumps(dic)", "def dict_to_json(in_dict: dict):\n\n return json.dumps(r)", "def dict_json_beauty(json_dict=dict, encode='utf-8'):\n # type: (dict, str)->str\n return json.dumps(json_dict, encoding=encode, ensure_ascii=False, indent=4)", "def serialize_d...
[ "0.8373041", "0.8074252", "0.7809637", "0.7797931", "0.7763216", "0.7562196", "0.7552172", "0.7415153", "0.74052465", "0.7388671", "0.7181906", "0.7007948", "0.6977986", "0.6949571", "0.693303", "0.6919321", "0.69068485", "0.6904552", "0.68190086", "0.67935586", "0.6790341", ...
0.79819053
2
Test Extraction with empty result from query
def test_extraction_with_empty_query_result(self: Any, mock_method: Any) -> None: extractor = SQLAlchemyExtractor() extractor.results = [''] extractor.init(Scoped.get_scoped_conf(conf=self.conf, scope=e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_no_one_in_db(self):\n q = self.generate_query('view_manager_report', ())\n res = self.execute_query(q)\n expected = []\n assert len(res) == 0, f'There is suppose to be an empty summary {res}'\n assert res == expected, f'The result is suppose to be empty {res}'", "def t...
[ "0.7393163", "0.70585024", "0.7048534", "0.70319545", "0.68878114", "0.6797495", "0.6793276", "0.6777534", "0.67714566", "0.6764787", "0.6734216", "0.67235506", "0.6696482", "0.6696482", "0.6690482", "0.6612391", "0.65533644", "0.6546304", "0.6500685", "0.6476234", "0.6466940...
0.7185505
1
Mirroring the jinja filter implemented in ansible Input a string. Returns the uuid ansible would generate as a string.
def to_uuid(string): if sys.version_info[0] == 2: string = string.encode('utf-8') # This the seed Ansible has chosen for their UUID's return str(uuid.uuid5(uuid.UUID('361E6D51-FAEC-444A-9079-341386DA8E2E'), string))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uuid(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"uuid\")", "def uuid(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"uuid\")", "def uuid(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"uuid\")", "def _get_uuid():\n return s...
[ "0.59203994", "0.59203994", "0.59203994", "0.56577677", "0.5641837", "0.555008", "0.55203867", "0.54390424", "0.5433794", "0.54285115", "0.54114234", "0.5401233", "0.53901094", "0.5380967", "0.5368402", "0.531347", "0.5292449", "0.52758276", "0.5220495", "0.5219674", "0.51799...
0.63724566
0
The ID of the instance.
def db_instance_id(self) -> pulumi.Input[str]: return pulumi.get(self, "db_instance_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def instance_id(self) -> str:\n return pulumi.get(self, \"instance_id\")", "def get_instance_id(self):\n return self.instance_id", "def instance_id(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"instance_id\")", "def instance_id(self) -> pulumi.Input[int]:\n return pulumi...
[ "0.89131695", "0.8773287", "0.8542532", "0.8542532", "0.8542532", "0.8539506", "0.8539506", "0.8539506", "0.84977", "0.8472741", "0.8472741", "0.8472741", "0.8472741", "0.8472741", "0.8472741", "0.84428245", "0.84428245", "0.8429091", "0.84245247", "0.83920574", "0.8384655", ...
0.0
-1
The virtual private cloud (VPC) ID of the internal endpoint.
def vpc_id(self) -> pulumi.Input[str]: return pulumi.get(self, "vpc_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vpc_endpoint_id(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"vpc_endpoint_id\")", "def vpc_id(self) -> str:\n return pulumi.get(self, \"vpc_id\")", "def vpc_id(self) -> str:\n return pulumi.get(self, \"vpc_id\")", "def vpc_id(self) -> str:\n return pulumi...
[ "0.78130704", "0.7554384", "0.7554384", "0.7554384", "0.7554384", "0.7554384", "0.7554384", "0.75092775", "0.75092775", "0.7359539", "0.7261638", "0.7261638", "0.7261638", "0.7261638", "0.7261638", "0.7261638", "0.7261638", "0.7261638", "0.7261638", "0.71271604", "0.70045215"...
0.68564206
24
The Endpoint ID of the instance.
def db_instance_endpoint_id(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "db_instance_endpoint_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def endpoint_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"endpoint_id\")", "def endpoint_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"endpoint_id\")", "def endpoint_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"endpoint_id\")", "def endpoint_id...
[ "0.8465903", "0.8465903", "0.8465903", "0.8269636", "0.8269636", "0.8269636", "0.8269636", "0.8052007", "0.8052007", "0.7936544", "0.7932751", "0.76613265", "0.7434611", "0.72376716", "0.71921706", "0.71632683", "0.71632683", "0.71494555", "0.7016585", "0.69432604", "0.694190...
0.7749717
11
The type of the endpoint.
def db_instance_endpoint_type(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "db_instance_endpoint_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def endpoint_type(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"endpoint_type\")", "def endpoint_type(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"endpoint_type\")", "def endpoint_type(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"endpoint_type\")"...
[ "0.8515907", "0.83505285", "0.83505285", "0.83505285", "0.83505285", "0.83505285", "0.82375133", "0.82375133", "0.81810004", "0.73307955", "0.7058308", "0.6931561", "0.68790895", "0.6858047", "0.6855747", "0.6843066", "0.6843066", "0.6843066", "0.6843066", "0.6843066", "0.684...
0.71525705
10
The ID of the instance.
def db_instance_id(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "db_instance_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def instance_id(self) -> str:\n return pulumi.get(self, \"instance_id\")", "def get_instance_id(self):\n return self.instance_id", "def instance_id(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"instance_id\")", "def instance_id(self) -> pulumi.Input[int]:\n return pulumi...
[ "0.8913875", "0.8774321", "0.8542845", "0.8542845", "0.8542845", "0.8539942", "0.8539942", "0.8539942", "0.84983116", "0.84735614", "0.84735614", "0.84735614", "0.84735614", "0.84735614", "0.84735614", "0.8441538", "0.8441538", "0.8427743", "0.8423287", "0.83907086", "0.83833...
0.0
-1
The virtual private cloud (VPC) ID of the internal endpoint.
def vpc_id(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "vpc_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vpc_endpoint_id(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"vpc_endpoint_id\")", "def vpc_id(self) -> str:\n return pulumi.get(self, \"vpc_id\")", "def vpc_id(self) -> str:\n return pulumi.get(self, \"vpc_id\")", "def vpc_id(self) -> str:\n return pulumi...
[ "0.78130704", "0.7554384", "0.7554384", "0.7554384", "0.7554384", "0.7554384", "0.7554384", "0.75092775", "0.75092775", "0.7359539", "0.7261638", "0.7261638", "0.7261638", "0.7261638", "0.7261638", "0.7261638", "0.7261638", "0.7261638", "0.7261638", "0.71271604", "0.70045215"...
0.6738888
35
Get an existing DbInstanceEndpoint resource's state with the given name, id, and optional extra properties used to qualify the lookup.
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, connection_string: Optional[pulumi.Input[str]] = None, connection_string_prefix: Optional[pulumi.Input[str]] = None, db_instance_endpoint_description: Optional[pu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(resource_name: str,\n id: pulumi.Input[str],\n opts: Optional[pulumi.ResourceOptions] = None) -> 'Endpoint':\n opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))\n\n __props__ = EndpointArgs.__new__(EndpointArgs)\n\n __props__.__dict__[\"crea...
[ "0.6387318", "0.61979896", "0.60218257", "0.56015706", "0.5519624", "0.5508596", "0.546996", "0.5444168", "0.54207945", "0.5358268", "0.5266631", "0.52476984", "0.52427524", "0.51758385", "0.5156449", "0.51506674", "0.51422983", "0.5110461", "0.50798815", "0.50486654", "0.504...
0.730374
0
The Endpoint ID of the instance.
def db_instance_endpoint_id(self) -> pulumi.Output[str]: return pulumi.get(self, "db_instance_endpoint_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def endpoint_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"endpoint_id\")", "def endpoint_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"endpoint_id\")", "def endpoint_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"endpoint_id\")", "def endpoint_id...
[ "0.8466154", "0.8466154", "0.8466154", "0.8269857", "0.8269857", "0.8269857", "0.8269857", "0.8052156", "0.8052156", "0.79362977", "0.77498764", "0.76619303", "0.7434815", "0.7237828", "0.7192524", "0.7163422", "0.7163422", "0.7149893", "0.7016419", "0.69432676", "0.6941788",...
0.7932834
10
The type of the endpoint.
def db_instance_endpoint_type(self) -> pulumi.Output[str]: return pulumi.get(self, "db_instance_endpoint_type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def endpoint_type(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"endpoint_type\")", "def endpoint_type(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"endpoint_type\")", "def endpoint_type(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"endpoint_type\")"...
[ "0.8516277", "0.83514446", "0.83514446", "0.83514446", "0.83514446", "0.83514446", "0.8238093", "0.8238093", "0.81813186", "0.7152044", "0.70576596", "0.6931448", "0.6878155", "0.6857582", "0.6855192", "0.6842448", "0.6842448", "0.6842448", "0.6842448", "0.6842448", "0.684244...
0.7330323
9
The ID of the instance.
def db_instance_id(self) -> pulumi.Output[str]: return pulumi.get(self, "db_instance_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def instance_id(self) -> str:\n return pulumi.get(self, \"instance_id\")", "def get_instance_id(self):\n return self.instance_id", "def instance_id(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"instance_id\")", "def instance_id(self) -> pulumi.Input[int]:\n return pulumi...
[ "0.8913875", "0.8774321", "0.8542845", "0.8542845", "0.8542845", "0.8539942", "0.8539942", "0.8539942", "0.84983116", "0.84735614", "0.84735614", "0.84735614", "0.84735614", "0.84735614", "0.84735614", "0.8441538", "0.8441538", "0.8427743", "0.8423287", "0.83907086", "0.83833...
0.0
-1
The virtual private cloud (VPC) ID of the internal endpoint.
def vpc_id(self) -> pulumi.Output[str]: return pulumi.get(self, "vpc_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vpc_endpoint_id(self) -> pulumi.Output[Optional[str]]:\n return pulumi.get(self, \"vpc_endpoint_id\")", "def vpc_id(self) -> str:\n return pulumi.get(self, \"vpc_id\")", "def vpc_id(self) -> str:\n return pulumi.get(self, \"vpc_id\")", "def vpc_id(self) -> str:\n return pulumi...
[ "0.78130704", "0.7554384", "0.7554384", "0.7554384", "0.7554384", "0.7554384", "0.7554384", "0.75092775", "0.75092775", "0.7359539", "0.71271604", "0.70045215", "0.6990309", "0.68564206", "0.68564206", "0.68564206", "0.68564206", "0.68564206", "0.68564206", "0.68002284", "0.6...
0.7261638
11
Wrap all nonlist or tuple objects in a list. Provides a simple way to accept flexible arguments.
def listify(obj): if obj is None: return [] else: return obj if isinstance(obj, (list, tuple, type(None))) else [obj]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def listify(obj):\n return obj if isinstance(obj, (list, tuple, type(None))) else [obj]", "def as_list(*whatever):\n result = []\n\n for w in whatever:\n if w is None:\n continue\n elif isinstance(w, list):\n result += w\n elif isinstance(w, tuple):\n ...
[ "0.76411515", "0.7449994", "0.71768045", "0.71539134", "0.70694023", "0.7064492", "0.7015532", "0.692193", "0.68888515", "0.6838173", "0.6837566", "0.67104065", "0.66978216", "0.6692721", "0.6641982", "0.66345155", "0.6633343", "0.6618612", "0.66137666", "0.6593593", "0.65303...
0.7277687
4
Compute the outdegree centrality for nodes. The outdegree centrality for a node v is the fraction of nodes its outgoing edges are connected to.
def out_degree_centrality(self): try: if not self.G.is_directed(): self.logger.warning('G为无向网络!') else: self.logger.info('正在计算有向网络的出度中心性 ...') return self.order_dict(nx.out_degree_centrality(self.G), index=1) except Exception as e:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def degree_centrality(self):\n\n try:\n if self.G.is_directed():\n self.logger.warning('G为有向网络!')\n else:\n self.logger.info('正在计算无向网络的度中心性 ...')\n return self.order_dict(nx.degree_centrality(self.G), index=1)\n except Exception as e:...
[ "0.61984247", "0.60490054", "0.5987188", "0.59547764", "0.58994496", "0.57714", "0.57690275", "0.566504", "0.5648447", "0.5639197", "0.5629399", "0.5584186", "0.55045986", "0.55043775", "0.5461779", "0.54476625", "0.5445241", "0.54052466", "0.5395987", "0.53868574", "0.534153...
0.7179723
0
r"""Compute closeness centrality for nodes. Closeness centrality [1]_ of a node `u` is the reciprocal of the average shortest path distance to `u` over all `n1` reachable nodes.
def closeness_centrality(self): try: self.logger.info('正在计算网络的接近中心性 ...') return self.order_dict(nx.closeness_centrality(self.G), index=1) except Exception as e: self.logger.error("计算失败,原因:{0}".format(e))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nsi_cross_closeness_centrality(self, node_list1, node_list2):\n shortest_paths = self.path_lengths()\n node_weights = self.node_weights\n\n nsi_shortest_paths = shortest_paths + np.eye(len(shortest_paths))\n nsi_shortest_paths[np.isinf(nsi_shortest_paths)] = self.N - 1\n\n ns...
[ "0.7358884", "0.69108546", "0.6832718", "0.6460107", "0.6189055", "0.59944373", "0.58636546", "0.58532846", "0.58306086", "0.57833004", "0.5765515", "0.5705964", "0.56353533", "0.56258315", "0.56208193", "0.55571467", "0.55089843", "0.5497345", "0.5425431", "0.5407919", "0.53...
0.70328563
1
Sets the ch0 of this ChanPlanExplicit.
def ch0(self, ch0): if ch0 is None: raise ValueError("Invalid value for `ch0`, must not be `None`") # noqa: E501 self._ch0 = ch0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, ch0=None, chan_spacing=None, num_chans=None): # noqa: E501 # noqa: E501\n\n self._ch0 = None\n self._chan_spacing = None\n self._num_chans = None\n self.discriminator = None\n\n self.ch0 = ch0\n self.chan_spacing = chan_spacing\n self.num_chans ...
[ "0.5784982", "0.5668567", "0.5631337", "0.5349448", "0.5274855", "0.51772815", "0.50191236", "0.49086076", "0.48429915", "0.48088676", "0.47746408", "0.4772938", "0.4760208", "0.4760208", "0.47494584", "0.4729624", "0.4725292", "0.4622007", "0.46186167", "0.4604773", "0.45974...
0.7533251
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, ChanPlanExplicit): return False return self.__dict__ == other.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.8088463", "0.8088463", "0.80553037", "0.7983272", "0.7966844", "0.7966844", "0.7966844", "0.7966844", "0.7966844", "0.7966844", "0.7966844", "0.7966844", "0.7966844", "0.7966844", "0.7966844", "0.7966844", "0.7966844", "0.7966844", "0.7966844", "0.7966844", "0.7966844", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): return not self == other
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748" ]
0.0
-1
Returns the dthdegree rolling momentum of data using lookback window length k.
def get_p(prices, m, d, k): x = np.log(prices) v = x.diff() m = np.array(m) # if d == 0: return pd.rolling_sum(v, k) elif d == 1: return pd.rolling_sum(m*v, k) elif d == 2: return pd.rolling_sum(m*v, k)/pd.rolling_sum(m, k) elif d == 3: return pd.rolling_mean(v, k)/pd.rolling_std(v, k)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delta(self, k, s):\n if not self.time_dependent_delta:\n return self._delta\n else:\n return self._delta * (6 / (np.pi**2 * self.count[k][s] **2))", "def evolve(self, x, n, k, gamma):\n dxdt = tf.pow(x, n)/(tf.pow(x, n)+tf.pow(k,n)) - gamma*x\n return dxdt", "def get_k(self, m...
[ "0.5730055", "0.5718257", "0.5633959", "0.5518349", "0.55026", "0.54541457", "0.53692615", "0.536214", "0.52899903", "0.5288736", "0.5249315", "0.51971483", "0.5192178", "0.51780295", "0.51701474", "0.51645494", "0.5152631", "0.51380426", "0.51252323", "0.51075214", "0.509216...
0.51915884
13
Returns the dthdegree rolling momentum of data
def backtest_get_p(prices, m, d): v = np.diff(np.log(prices)) m = np.array(m) # if d == 0: return np.sum(v) elif d == 1: return np.sum(m*v) elif d == 2: return np.sum(m*v)/np.sum(m) elif d == 3: return np.mean(v)/np.std(v)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gradient_descent_momentum(self):\n return self._gradient_descent_momentum", "def getMomentumGradient(self):\n dphi = 0.5\n orig_phase = self.phase\n p0 = self.phaseToMomentum(orig_phase - dphi / 2)\n p1 = self.phaseToMomentum(orig_phase + dphi / 2)\n self.setRFPhase(...
[ "0.57546943", "0.56203526", "0.55759364", "0.5535135", "0.55126244", "0.5428185", "0.5418604", "0.5394685", "0.53706443", "0.5365792", "0.5356651", "0.5336531", "0.533597", "0.5329102", "0.53141874", "0.5302343", "0.5286519", "0.52557904", "0.5244054", "0.52436936", "0.517586...
0.0
-1
Backward_pass in the iLQR algorithm Return
def backward_pass(self): self.K_matrix, self.k_vector = self.backward_pass_static(self.m, self.n, self.T, self.C_matrix, self.c_vector, self.F_matrix) return self.K_matrix, self.k_vector
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backward(self, i):\n \n #Compute gradient for w1, w2, w3\n w1_grad = np.zeros((2, 3))\n w2_grad = np.zeros((3, 3))\n w3_grad = np.zeros((3, 1))\n \n \n w3_backward_pass = np.zeros((1, 1))\n w2_backward_pass = np.zeros((1, 3))\n \n #print(...
[ "0.66890174", "0.6563752", "0.65205103", "0.6504807", "0.64645773", "0.6440241", "0.64094794", "0.63442254", "0.63346577", "0.63234025", "0.63234025", "0.6277616", "0.62677985", "0.62541634", "0.62473935", "0.6236902", "0.622772", "0.6204209", "0.6204209", "0.6192006", "0.618...
0.6362919
7
Seive of eratosthenes return all prime numbers upto 'integer'
def sieve(integer): is_prime = [1]*(integer+1) is_prime[0] = is_prime[1] = 0 i = 2 while i*i <= integer: if is_prime[i]: for j in range(i*i, integer+1, i): is_prime[j] = 0 i += 1 prime = [i for i,v in enumerate(is_prime) if v] return prime
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def eratosthenes(x):\n multiples = []\n for i in range(2, x+1):\n if i not in multiples:\n print (i)\n for j in range(i*i, x+1, i):\n multiples.append(j)", "def eratosthenes(limit):\n if isinstance(limit, (int, float)) and limit == int(limit):\n limit =...
[ "0.74755704", "0.74668926", "0.7463984", "0.7440852", "0.74133795", "0.7409603", "0.7404484", "0.7326039", "0.7291503", "0.72594935", "0.72594935", "0.7247652", "0.72372544", "0.72338176", "0.71775967", "0.7175368", "0.714284", "0.71307766", "0.7130732", "0.7109668", "0.70862...
0.79986435
0
Return the unit of measurement of this entity, if any.
def unit_of_measurement(self): return self._unit
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unit_of_measurement(self):\n return self._metadata[1]", "def unit_of_measurement(self):\n if self._coordinator.data:\n return self._coordinator.data['unit']\n return None", "def unit_of_measurement(self):\n return self._unit_of_measurement", "def unit_of_measurement...
[ "0.8565862", "0.8473674", "0.845385", "0.845385", "0.845385", "0.845385", "0.845385", "0.845385", "0.845385", "0.845385", "0.845385", "0.845385", "0.845385", "0.845385", "0.845385", "0.845385", "0.843327", "0.83701795", "0.8368336", "0.8334028", "0.82777756", "0.8239642", ...
0.8477338
4
Return the device class of this entity.
def device_class(self): return self._device_class
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def device_class(self):\n return self._device_type", "def device_class(self):\r\n return self._device_class", "def device_class(self):\n return self.type", "def device_class(self):\n return self.type", "def device_class(self):\n return self.type", "def device_class(self...
[ "0.88906753", "0.8848185", "0.88091695", "0.88091695", "0.88091695", "0.8716641", "0.86759204", "0.8606744", "0.8605054", "0.8460027", "0.8458741", "0.8391178", "0.83831364", "0.83497155", "0.8252572", "0.8227272", "0.8227272", "0.8226434", "0.8226434", "0.813082", "0.813082"...
0.88960886
1
Main page of site.
def index(request): return render(request, 'shop/index.html')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def main_page():\n return render_template(\"index.html\")", "def main():\n\n return render_template(\"index.html\", title=\"Home\", heading=\"Dublin Bus\")", "def main_page():\n return render_template(\"main_page.html\")", "def main():\n page = get_page_arg()\n\n items = load_data(page)\n t...
[ "0.7762917", "0.7666044", "0.7664165", "0.7458383", "0.7431394", "0.73499334", "0.7297578", "0.7286483", "0.72843766", "0.7257674", "0.7233194", "0.7215534", "0.71981186", "0.7190986", "0.7186908", "0.7154105", "0.7154105", "0.7120952", "0.7101242", "0.7101242", "0.7095955", ...
0.0
-1
Initialize a learning rate policy
def __init__(self, policy, base_rate, gamma, power, max_steps, step_values): self.policy = policy self.base_rate = base_rate self.gamma = gamma self.power = power self.max_steps = max_steps self.step_values = step_values if self.step_values: self.stepv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_learning_rate(self):\n\n if (self.FLAGS.learning_rate_decay is \"exponential\"):\n self.learning_rate = tf.train.exponential_decay(\n self.FLAGS.learning_rate,\n self.global_step,\n self....
[ "0.7631221", "0.7346829", "0.69498533", "0.68810433", "0.6810319", "0.6774179", "0.6719983", "0.66545993", "0.65950465", "0.6592433", "0.6591663", "0.65907717", "0.6587839", "0.6542048", "0.652929", "0.650865", "0.6507338", "0.6493763", "0.6493384", "0.6491471", "0.6450636", ...
0.7034067
2
Initialize a learning rate policy
def get_learning_rate(self, step): rate = 0 progress = 100 * (step / self.max_steps) # expressed in percent units if self.policy == "fixed": rate = self.base_rate elif self.policy == "step": current_step = math.floor(step/self.step_size) rate = self....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_learning_rate(self):\n\n if (self.FLAGS.learning_rate_decay is \"exponential\"):\n self.learning_rate = tf.train.exponential_decay(\n self.FLAGS.learning_rate,\n self.global_step,\n self....
[ "0.7631221", "0.7346829", "0.7034067", "0.69498533", "0.68810433", "0.6810319", "0.6774179", "0.6719983", "0.66545993", "0.65950465", "0.6592433", "0.6591663", "0.65907717", "0.6587839", "0.6542048", "0.652929", "0.650865", "0.6507338", "0.6493763", "0.6493384", "0.6491471", ...
0.0
-1
Show the details of the given profile name, if it exists.
def execute(self) -> None: profile_name = self.args.profile[0] if not self.git_manager.check_profile_exist(profile_name): if not self.quiet: print(msg.ERR_NO_PROFILE.format(profile_name)) return # Get the details of the profile full_name = "profil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def profile_details(self, profile_name):\n url = get_url('profile details', profile=profile_name)\n response = self._get(url)\n if response.status_code == 404:\n return None\n raise_on_error(response)\n return Profile(response.json())", "def inspect(\n name: Optio...
[ "0.77059376", "0.7394588", "0.7345513", "0.71899337", "0.7165363", "0.6954103", "0.6868143", "0.68353313", "0.6656648", "0.66384727", "0.663722", "0.6612514", "0.6601493", "0.657531", "0.6550439", "0.6501244", "0.64498824", "0.63854116", "0.63698506", "0.63555455", "0.6350201...
0.6179731
32
The ID of the NodeBalancer to access.
def nodebalancer_id(self) -> pulumi.Input[int]: return pulumi.get(self, "nodebalancer_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nodebalancer_id(self) -> pulumi.Output[int]:\n return pulumi.get(self, \"nodebalancer_id\")", "def nodebalancer_id(self) -> Optional[pulumi.Input[int]]:\n return pulumi.get(self, \"nodebalancer_id\")", "def load_balancer_id(self) -> str:\n return pulumi.get(self, \"load_balancer_id\")"...
[ "0.7997175", "0.7673472", "0.7220575", "0.7220575", "0.7220575", "0.70652145", "0.6816345", "0.6673489", "0.65711", "0.6541668", "0.64032656", "0.64008653", "0.64008653", "0.6336057", "0.6336057", "0.6292967", "0.626315", "0.61280686", "0.6064782", "0.60243887", "0.59532845",...
0.79506814
1
What ciphers to use for SSL connections served by this NodeBalancer. `legacy` is considered insecure and should only be used if necessary.
def cipher_suite(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "cipher_suite")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ciphers(self) -> Sequence[str]:\n return pulumi.get(self, \"ciphers\")", "def ciphers(self) -> Sequence[str]:\n return pulumi.get(self, \"ciphers\")", "def ciphers(self):\n return self._ciphers", "def ssl_cipher(self) -> str:\n return pulumi.get(self, \"ssl_cipher\")", "def ...
[ "0.6905733", "0.6905733", "0.6736972", "0.6390333", "0.5964963", "0.5958126", "0.5873021", "0.57102275", "0.5705225", "0.56717175", "0.5664975", "0.5662904", "0.56342673", "0.56142086", "0.5600889", "0.55889684", "0.5579902", "0.55706364", "0.5562702", "0.5559739", "0.5558173...
0.0
-1
What ciphers to use for SSL connections served by this NodeBalancer. `legacy` is considered insecure and should only be used if necessary.
def cipher_suite(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "cipher_suite")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ciphers(self) -> Sequence[str]:\n return pulumi.get(self, \"ciphers\")", "def ciphers(self) -> Sequence[str]:\n return pulumi.get(self, \"ciphers\")", "def ciphers(self):\n return self._ciphers", "def ssl_cipher(self) -> str:\n return pulumi.get(self, \"ssl_cipher\")", "def ...
[ "0.6905733", "0.6905733", "0.6736972", "0.6390333", "0.5964963", "0.5958126", "0.5873021", "0.57102275", "0.5705225", "0.56717175", "0.5664975", "0.5662904", "0.56342673", "0.56142086", "0.5600889", "0.55889684", "0.5579902", "0.55706364", "0.5562702", "0.5559739", "0.5558173...
0.0
-1
The ID of the NodeBalancer to access.
def nodebalancer_id(self) -> Optional[pulumi.Input[int]]: return pulumi.get(self, "nodebalancer_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nodebalancer_id(self) -> pulumi.Output[int]:\n return pulumi.get(self, \"nodebalancer_id\")", "def nodebalancer_id(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"nodebalancer_id\")", "def load_balancer_id(self) -> str:\n return pulumi.get(self, \"load_balancer_id\")", "def l...
[ "0.7997175", "0.79506814", "0.7220575", "0.7220575", "0.7220575", "0.70652145", "0.6816345", "0.6673489", "0.65711", "0.6541668", "0.64032656", "0.64008653", "0.64008653", "0.6336057", "0.6336057", "0.6292967", "0.626315", "0.61280686", "0.6064782", "0.60243887", "0.59532845"...
0.7673472
2
Get an existing NodeBalancerConfig resource's state with the given name, id, and optional extra properties used to qualify the lookup.
def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, algorithm: Optional[pulumi.Input[str]] = None, check: Optional[pulumi.Input[str]] = None, check_attempts: Optional[pulumi.Input[int]] = None, check_bo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(resource_name: str,\n id: pulumi.Input[str],\n opts: Optional[pulumi.ResourceOptions] = None,\n minimal_action: Optional[pulumi.Input[str]] = None,\n most_disruptive_allowed_action: Optional[pulumi.Input[str]] = None,\n name: Optional[pulumi.Input[str]...
[ "0.62481624", "0.5188792", "0.51569176", "0.5100631", "0.50399363", "0.5033983", "0.5026704", "0.49838465", "0.49604768", "0.49493426", "0.49443024", "0.4939654", "0.4923048", "0.4922657", "0.4893065", "0.48908752", "0.48890933", "0.48748967", "0.48666066", "0.485431", "0.484...
0.7078155
0
What ciphers to use for SSL connections served by this NodeBalancer. `legacy` is considered insecure and should only be used if necessary.
def cipher_suite(self) -> pulumi.Output[str]: return pulumi.get(self, "cipher_suite")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ciphers(self) -> Sequence[str]:\n return pulumi.get(self, \"ciphers\")", "def ciphers(self) -> Sequence[str]:\n return pulumi.get(self, \"ciphers\")", "def ciphers(self):\n return self._ciphers", "def ssl_cipher(self) -> str:\n return pulumi.get(self, \"ssl_cipher\")", "def ...
[ "0.69054437", "0.69054437", "0.67368513", "0.6389873", "0.59642226", "0.5959941", "0.5872669", "0.5710742", "0.5704579", "0.567094", "0.5665228", "0.5664218", "0.5635061", "0.561341", "0.5600846", "0.5589235", "0.5579922", "0.557137", "0.556362", "0.55601317", "0.5557036", ...
0.0
-1
The ID of the NodeBalancer to access.
def nodebalancer_id(self) -> pulumi.Output[int]: return pulumi.get(self, "nodebalancer_id")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nodebalancer_id(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"nodebalancer_id\")", "def nodebalancer_id(self) -> Optional[pulumi.Input[int]]:\n return pulumi.get(self, \"nodebalancer_id\")", "def load_balancer_id(self) -> str:\n return pulumi.get(self, \"load_balancer_id\")",...
[ "0.79506814", "0.7673472", "0.7220575", "0.7220575", "0.7220575", "0.70652145", "0.6816345", "0.6673489", "0.65711", "0.6541668", "0.64032656", "0.64008653", "0.64008653", "0.6336057", "0.6336057", "0.6292967", "0.626315", "0.61280686", "0.6064782", "0.60243887", "0.59532845"...
0.7997175
0
r""" >>> indent("a\nb\nc", by=1) == ' a\n b\n c' True
def indent(text, by=4, first_line=True): spaces = " " * by lines = text.splitlines(True) prefix = lines.pop(0) if (lines and not first_line) else "" return prefix + "".join(spaces + line for line in lines)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_with_custom_indent(self):\n self.assertEqual(indent('foo', 3), ' foo')", "def test_with_multiple_lines(self):\n self.assertEqual(indent('foo\\nbar'),\n ' foo\\n bar')", "def indent(text, prefix, predicate=...): # -> str:\n ...", "def indent(text, n=4...
[ "0.72558635", "0.7087694", "0.7073211", "0.69521207", "0.6903636", "0.68873626", "0.6828774", "0.68213606", "0.67791986", "0.6758734", "0.6750469", "0.6690545", "0.6669866", "0.6655925", "0.6650169", "0.6598023", "0.65743273", "0.65683955", "0.6546297", "0.6538077", "0.651667...
0.6973373
3
Find the greatest common divisor of x and y >>> gcd(12, 19) 1 >>> gcd(12, 15) 3 >>> gcd(18, 12) 6
def gcd(x, y): #assert x >= 0 and y >= 0 and type(x) == int and type(y) == int, "Error: invalid input" if y > x: return gcd(y, x) elif y == 0: return x else: return gcd(y, x % y)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def gcd(x:int, y:int) -> int:\n if x == 0:\n return y\n return gcd(y % x, x)", "def gcd(x, y):\n x, y = abs(x), abs(y)\n while y:\n x, y = y, x % y\n return x", "def gcd(x,y):\n\tif x%y == 0:\n\t\treturn y\n\treturn gcd(y, x%y)", "def gcd(x, y):\n if x ...
[ "0.8652966", "0.8586033", "0.8581716", "0.85394704", "0.8391914", "0.8350549", "0.8341978", "0.78890634", "0.7785174", "0.77839535", "0.7758396", "0.76819164", "0.76139253", "0.7568507", "0.75502646", "0.74424386", "0.74239105", "0.74216926", "0.7381738", "0.7340218", "0.7320...
0.86557037
0
This is the main function that creates the dataset
def make_dataset(): numberOfTrials = dataset_params.num_of_samples numberOfTrials_train = int(numberOfTrials*0.8) numberOfTrials_test = int(numberOfTrials*0.2) print("==================================================") print("1. Generating Train images ......") print("\nTrain image per variation", numberOfTria...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dataset(options):\n pass", "def _create_data():\n tf.logging.info(\"Create records..\")\n train, val, test = util.load_data(data_dir, FLAGS[\"is_aug\"])\n tf.logging.info(\"Dataset size: Train-{} Test-{} Val-{}\".format(len(train), len(test), len(val)))\n return train, val, test", "def creat...
[ "0.74578774", "0.74224216", "0.73565084", "0.72508234", "0.7236652", "0.7226004", "0.71995854", "0.7176698", "0.71595037", "0.7153122", "0.71405315", "0.70574254", "0.7010816", "0.6966811", "0.6963917", "0.6959087", "0.6952084", "0.6935678", "0.69332415", "0.69260895", "0.692...
0.7851378
0
returns the initial (hidden, cell) states for the LSTM
def get_initial_hx(self, input_seq, hidden_state): num_directions = 2 if self.lstm.bidirectional else 1 # hidden state hidden = hidden_state.view(self.lstm.num_layers * num_directions, len(hidden_state), -1) # cell state c_zeros = torch.zeros(self.lstm.num_layers * num_directions...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_states(batch_size, num_lstm_layer, num_hidden):\n init_c = [('l%d_init_c' % l, (batch_size, num_hidden)) for l in range(num_lstm_layer)]\n init_h = [('l%d_init_h' % l, (batch_size, num_hidden)) for l in range(num_lstm_layer)]\n return init_c + init_h", "def get_init_cell(batch_size, rnn_size):\...
[ "0.7259619", "0.72342914", "0.72038627", "0.70223784", "0.6982786", "0.69450116", "0.6930364", "0.68505", "0.6794264", "0.6704277", "0.6696976", "0.66800195", "0.66705173", "0.6651057", "0.6629041", "0.6629041", "0.6629041", "0.6629041", "0.6629041", "0.6629041", "0.6629041",...
0.7079652
3
Gets the id of this StockInfoLong.
def id(self) -> int: return self._id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stock_id(self):\n return self._stock_id", "def getId(self):\n\n return self.__id", "def id(self):\n return self.cached_data[\"id\"]", "def GetId(self):\n return int(self.id)", "def getId(self):\n return self._id", "def getId(self):\n return self.ident...
[ "0.7037033", "0.6716883", "0.6699764", "0.665963", "0.6612862", "0.6602316", "0.6599003", "0.65758586", "0.65758586", "0.65758586", "0.65758586", "0.65758586", "0.65758586", "0.65758586", "0.65758586", "0.65758586", "0.65758586", "0.65758586", "0.65758586", "0.65758586", "0.6...
0.64499664
51
Sets the id of this StockInfoLong.
def id(self, id: int): self._id = id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_id(self, id):\n self.__id = id", "def set_id(self, id_):\n\n self.id_ = id_", "def SetId(self, id):\n self.id = int(id)", "def set_id(self, id):\n self.data['id'] = id", "def set_id(self, id):\n\n\t\tif id is not None and not isinstance(id, int):\n\t\t\traise SDKExceptio...
[ "0.7037659", "0.7022662", "0.6995722", "0.6909372", "0.6614949", "0.6587282", "0.6587282", "0.6587282", "0.6587282", "0.6587282", "0.6572669", "0.6551429", "0.6516435", "0.6514556", "0.6514556", "0.6514556", "0.6514556", "0.6514556", "0.6514556", "0.6514556", "0.6514556", "...
0.65265906
15
Gets the name of this StockInfoLong.
def name(self) -> str: return self._name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def longName(self):\n return self.name()", "def getLongName(self) -> str:\n return self.long_name", "def name(self):\n return str(self.name)", "def name(self) -> str:\n return self.data['name']", "def get_name(self):\n return self._label", "def getName(self):\n\n r...
[ "0.73972875", "0.73367065", "0.6708299", "0.66978145", "0.66746134", "0.66616267", "0.6653981", "0.6650624", "0.66430736", "0.66373223", "0.6633127", "0.66286635", "0.662668", "0.662668", "0.662668", "0.662525", "0.662525", "0.662525", "0.662525", "0.662525", "0.662525", "0...
0.0
-1
Sets the name of this StockInfoLong.
def name(self, name: str): self._name = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_name(self, name):\n self.name = name", "def set_name(self, name):\n self.name = name", "def set_name(self, name):\n self.name = name", "def set_name(self, name):\n self.name = name", "def set_name(self, name):\n self.name = name", "def set_name(self, name):\n\t\...
[ "0.6854926", "0.6854926", "0.6854926", "0.6854926", "0.6854926", "0.68545556", "0.6832494", "0.67866683", "0.6780349", "0.67633617", "0.67633617", "0.6755934", "0.6715258", "0.6715258", "0.6694892", "0.66797006", "0.66679287", "0.6654574", "0.6654574", "0.6639021", "0.6632039...
0.0
-1
Gets the description of this StockInfoLong.
def description(self) -> str: return self._description
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def long_description(self):\n return self._long_description", "def long_description(self) -> str:\n return self._long_description", "def long_description(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"long_description\")", "def getDescription(self):\n return self.descrip...
[ "0.7438755", "0.7294872", "0.72631365", "0.7041411", "0.70310056", "0.6944962", "0.6944268", "0.6944268", "0.6944268", "0.6944268", "0.69353163", "0.6932999", "0.69264865", "0.69264865", "0.69264865", "0.69264865", "0.69264865", "0.69264865", "0.69264865", "0.69264865", "0.69...
0.67212933
93
Sets the description of this StockInfoLong.
def description(self, description: str): self._description = description
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_longdescription(self, longdesc):\n self.longdescription(longdesc)", "def long_description(self, long_description):\n self._long_description = long_description", "def long_description(self, long_description: str):\n\n self._long_description = long_description", "def set_descriptio...
[ "0.76050204", "0.75568223", "0.7379006", "0.707537", "0.7036406", "0.6994694", "0.69817203", "0.6977702", "0.6941895", "0.6889253", "0.68891937", "0.68891937", "0.68891937", "0.68891937", "0.6809063", "0.6809063", "0.6809063", "0.6809063", "0.6809063", "0.6809063", "0.6809063...
0.66450435
57
Gets the sector of this StockInfoLong.
def sector(self) -> str: return self._sector
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sector(self):\n return self.sub_sector.sector", "def get_sector(self):\n _FUNCTION_KEY = \"SECTOR\"\n # The keys for the json output\n _DATA_KEYS = [\"Rank A: Real-Time Performance\",\n \"Rank B: 1 Day Performance\",\n \"Rank C: 5 Day Performance\",\n \"Rank D...
[ "0.8018003", "0.6578306", "0.5656707", "0.5520492", "0.5511463", "0.5448381", "0.54171026", "0.54113233", "0.5304371", "0.52824", "0.5269083", "0.51788974", "0.5161839", "0.5155268", "0.50988716", "0.5064115", "0.5038161", "0.50254035", "0.49863565", "0.4958044", "0.49574926"...
0.78620905
1
Gets the annual_dividend of this StockInfoLong.
def annual_dividend(self) -> float: return self._annual_dividend
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def annual_dividend(self, annual_dividend: float):\n\n self._annual_dividend = annual_dividend", "def annual_dividend_rate(self) -> float:\n return self._annual_dividend_rate", "def annual_dividend_rate(self, annual_dividend_rate: float):\n\n self._annual_dividend_rate = annual_dividend_ra...
[ "0.69925517", "0.6695647", "0.60729885", "0.53411096", "0.5198786", "0.50813776", "0.5055442", "0.5036086", "0.49965242", "0.49682188", "0.4963097", "0.49035117", "0.48064587", "0.4794501", "0.47866014", "0.4775571", "0.47062716", "0.4677016", "0.46631896", "0.46538925", "0.4...
0.79916465
0
Gets the annual_dividend_rate of this StockInfoLong.
def annual_dividend_rate(self) -> float: return self._annual_dividend_rate
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def annual_dividend(self) -> float:\n return self._annual_dividend", "def annual_dividend_rate(self, annual_dividend_rate: float):\n\n self._annual_dividend_rate = annual_dividend_rate", "def annual_dividend(self, annual_dividend: float):\n\n self._annual_dividend = annual_dividend", "de...
[ "0.7497593", "0.7130234", "0.5845228", "0.5668112", "0.53774154", "0.53030926", "0.5280425", "0.5234579", "0.5193622", "0.5174885", "0.5136332", "0.511647", "0.4998959", "0.49628127", "0.49577886", "0.49164873", "0.4870588", "0.48613852", "0.48394176", "0.48257366", "0.481477...
0.83207345
0
Gets the forward_pe of this StockInfoLong.
def forward_pe(self) -> float: return self._forward_pe
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forward_pe(self, forward_pe: float):\n\n self._forward_pe = forward_pe", "def get_forward_position(self):\n return self._forward_position", "def ff(self):\n return self._ff", "def energy_pfu(self):\n return self._energy_pfu", "def we(self):\n return self.long", "def...
[ "0.58072925", "0.5753016", "0.54300267", "0.5286656", "0.52710164", "0.51281464", "0.51069266", "0.5064984", "0.5063212", "0.504498", "0.50166494", "0.5013044", "0.49995774", "0.4981615", "0.4967849", "0.49556673", "0.49430746", "0.4930453", "0.49298707", "0.49092326", "0.490...
0.71850073
0
Gets the five_years_avg_dividend of this StockInfoLong.
def five_years_avg_dividend(self) -> float: return self._five_years_avg_dividend
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def five_years_avg_dividend(self, five_years_avg_dividend: float):\n\n self._five_years_avg_dividend = five_years_avg_dividend", "def annual_dividend(self) -> float:\n return self._annual_dividend", "def AverageDividendPercent(self, years=10):\n nSamples = 0\n dividendSum = 0.\n ...
[ "0.7601839", "0.62697953", "0.6024448", "0.5934762", "0.58960384", "0.57258517", "0.55961007", "0.55100393", "0.54054385", "0.537864", "0.5315416", "0.5294976", "0.52845633", "0.52611804", "0.5244029", "0.5244029", "0.5194623", "0.51931256", "0.51931256", "0.51931256", "0.514...
0.8464908
0
Repair the chromosome of a mutant.
def __call__(self, mutant, rng): raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_chromosome(mutated_genome):\n index = random.randint(0,max(0,len(mutated_genome)-1))\n del mutated_genome[index]", "def switch_chromosomes(mutated_genome):\n index1 = random.randint(0,max(0,len(mutated_genome)-1))\n index2 = random.randint(0,max(0,len(mutated_genome)-1))\n temp = mutated_gen...
[ "0.6430962", "0.6323653", "0.6218731", "0.6157754", "0.5839038", "0.5725583", "0.5687049", "0.56532824", "0.5566192", "0.5551434", "0.5541971", "0.5505752", "0.54394215", "0.5432639", "0.54306406", "0.5429206", "0.5368474", "0.53359044", "0.53171927", "0.52855176", "0.5280068...
0.50972724
34
Determine the reward for taking the given action in the given state, with no further moves. The action is always taken from the perspective of the current turn of the internal game object. The state of the current game is always modified, a copy should be sent if the state should not be modified.
def oneActionReward(self, state, action, redTurn): # TODO this is the main bottleneck for the neural network learning part # the only way to speed this up, would be to reduce the number of calls to networks # or optimize how the networks are called # save the original game ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compute_reward(self, obs, action, state):\n pass", "def get_reward(self, state, action, next_state, absorbing):\n raise NotImplementedError", "def reward(self, action):\n # Play the move on a copy of the board\n new_state = self.play_move_on_state(self.state, action)\n # ...
[ "0.7663617", "0.76410615", "0.7584153", "0.7545972", "0.75100654", "0.75029737", "0.7461057", "0.74290556", "0.74220705", "0.73498803", "0.7289895", "0.71703714", "0.71551746", "0.71497476", "0.7143294", "0.70910555", "0.70759", "0.7069114", "0.70606434", "0.70373553", "0.702...
0.78853685
0
Helper method for rewardFunc. Determines the amount of reward when a piece moves
def moveReward(state, position, modifiers, redTurn): reward = 0 newPos = movePos(position, modifiers) x, y = position selectPos = state.gridPos(x, y, state.redTurn) # if there is no valid piece to move, then return no reward if selectPos is None: return None ally, king = selectPos...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_reward(self):\n if self.status():\n return self.current_step/self.ep_length # the reward is proportional to the duration \n else:\n return 0", "def get_reward(self, state, reward, done):\n\n # simple reward = position. Don't explicitly incentivise agent to take left hill as well ...
[ "0.7735587", "0.75791436", "0.7344123", "0.734148", "0.72963244", "0.7295326", "0.7269127", "0.7241709", "0.7185168", "0.71298814", "0.7108681", "0.70881575", "0.7072718", "0.70388097", "0.703114", "0.70234495", "0.70075047", "0.70014834", "0.6970236", "0.69641477", "0.695665...
0.6654035
51
check whether the board is feasible with current information
def board_feasible(R): cur_pos = [(0, 1), (1, 7), (4, 4), (6, 0), (7, 6)] for nxt_pos in R[:-2]: if cur_pos and nxt_pos: if not move_feasible(cur_pos, nxt_pos): return False cur_pos = nxt_pos return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_valid_board(self):\n total = sum(range(1, self.n+1))\n d = {x : [set([]), set([])] for x in range(1, self.n+1)}\n for row_index in range(self.n):\n for col_index in range(self.n):\n num = self.board[row_index][col_index]\n try:\n ...
[ "0.7506663", "0.73017526", "0.72356474", "0.72086453", "0.71666247", "0.7135608", "0.6941192", "0.6915296", "0.69096935", "0.6879285", "0.6842884", "0.6775615", "0.6749407", "0.6738717", "0.67284405", "0.67284405", "0.6716782", "0.6711435", "0.6704194", "0.66893667", "0.66888...
0.6833126
11
Find path to flowcell folder on the server.
def get_flowcell_path(self): illumina_path = os.path.join(self.pipeline_path, 'Illumina') logger.debug("searching for flowcell folder") try: return [os.path.join(illumina_path, p) for p in os.listdir(illumina_path) if p == self.flowcellrun._id]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_folder(self):\n # type: () -> str\n headers = Headers({\"content-type\": \"application/json\", \"accept\": \"application/json\"})\n response = self.connection.api_call(\n \"GET\", [\"v1\", \"resources\", self.id, \"folderpath\"], headers=headers\n )\n\n return...
[ "0.6326101", "0.61641264", "0.60977024", "0.6066059", "0.6051973", "0.60231423", "0.5966547", "0.5958627", "0.5953735", "0.5920228", "0.58931565", "0.5883961", "0.5867838", "0.58049315", "0.57921565", "0.5774236", "0.5774236", "0.57503545", "0.57395446", "0.57374865", "0.5734...
0.7505514
0
Return a wrapped torchvision.models.vgg11.
def vgg11(*args): return _VGGWrapper(models.vgg11(*args))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vgg13(*args):\n return _VGGWrapper(models.vgg13(*args))", "def vgg16(*args):\n return _VGGWrapper(models.vgg16(*args))", "def vgg19(*args):\n return _VGGWrapper(models.vgg19(*args))", "def vgg11(tensorized, **kwargs):\n return _vgg('vgg11', 'A', False, tensorized, **kwargs)", "def vgg11(pre...
[ "0.8069342", "0.7719984", "0.7660113", "0.7396257", "0.7373759", "0.7363916", "0.73358816", "0.71910506", "0.7155159", "0.7113502", "0.7102346", "0.70679855", "0.70174855", "0.69907427", "0.6978665", "0.6958343", "0.69460094", "0.6908538", "0.6877123", "0.6863702", "0.6791593...
0.82451063
0
Return a wrapped torchvision.models.vgg13.
def vgg13(*args): return _VGGWrapper(models.vgg13(*args))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vgg13(tensorized, **kwargs):\n return _vgg('vgg13', 'B', False, tensorized, **kwargs)", "def vgg13(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> VGG:\n return _vgg('vgg13', 'B', False, pretrained, progress, **kwargs)", "def vgg13_bn(*args):\n return _VGGWrapper(models.vgg13_bn...
[ "0.76986635", "0.76218534", "0.75216347", "0.7281421", "0.7254467", "0.7064563", "0.69464844", "0.6880325", "0.68351233", "0.6818835", "0.6702082", "0.66789407", "0.66509086", "0.65901196", "0.65788716", "0.6525629", "0.64292634", "0.64006305", "0.6386854", "0.63837725", "0.6...
0.85764176
0
Return a wrapped torchvision.models.vgg13_bn.
def vgg13_bn(*args): return _VGGWrapper(models.vgg13_bn(*args))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vgg13_bn(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> VGG:\n return _vgg('vgg13_bn', 'B', True, pretrained, progress, **kwargs)", "def vgg13_bn(tensorized, **kwargs):\n return _vgg('vgg13_bn', 'B', True, tensorized, **kwargs)", "def vgg19_bn(*args):\n return _VGGWrapper(model...
[ "0.80823976", "0.80591005", "0.8030528", "0.79261416", "0.7825799", "0.77975863", "0.76535666", "0.74634457", "0.7462822", "0.74541914", "0.7377232", "0.7354595", "0.73223966", "0.7268475", "0.72547823", "0.7241541", "0.7236331", "0.7114514", "0.7092815", "0.69912934", "0.688...
0.87917703
0
Return a wrapped torchvision.models.vgg16.
def vgg16(*args): return _VGGWrapper(models.vgg16(*args))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vgg16(**kwargs):\r\n return VGG16(**kwargs)", "def vgg16(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> VGG:\n return _vgg('vgg16', 'D', False, pretrained, progress, **kwargs)", "def vgg16(tensorized, **kwargs):\n return _vgg('vgg16', 'D', False, tensorized, **kwargs)", "def ...
[ "0.80552846", "0.80457807", "0.7991364", "0.7913093", "0.78553563", "0.75254136", "0.7403337", "0.73923403", "0.7355807", "0.7343449", "0.7336607", "0.7331782", "0.7208186", "0.704727", "0.6999904", "0.69468087", "0.69213897", "0.68905467", "0.67893434", "0.6786666", "0.67140...
0.8706674
0
Return a wrapped torchvision.models.vgg16_bn.
def vgg16_bn(*args): return _VGGWrapper(models.vgg16_bn(*args))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vgg13_bn(*args):\n return _VGGWrapper(models.vgg13_bn(*args))", "def vgg16_bn(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> VGG:\n return _vgg('vgg16_bn', 'D', True, pretrained, progress, **kwargs)", "def vgg16_bn(tensorized, **kwargs):\n return _vgg('vgg16_bn', 'D', True, ten...
[ "0.8303011", "0.8216929", "0.8153881", "0.81051356", "0.8048895", "0.7947814", "0.781926", "0.7774809", "0.7709611", "0.75984347", "0.7553606", "0.7494791", "0.7448445", "0.7420583", "0.7348847", "0.73452646", "0.7248345", "0.72300434", "0.72113836", "0.72098434", "0.72078526...
0.8867364
0
Return a wrapped torchvision.models.vgg19.
def vgg19(*args): return _VGGWrapper(models.vgg19(*args))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vgg13(*args):\n return _VGGWrapper(models.vgg13(*args))", "def vgg19(**kwargs):\r\n return VGG19(**kwargs)", "def vgg19(tensorized, **kwargs):\n return _vgg('vgg19', 'E', False, tensorized, **kwargs)", "def vgg19(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> VGG:\n return...
[ "0.7923488", "0.775327", "0.76208353", "0.7602945", "0.75441355", "0.7541099", "0.74994266", "0.7466713", "0.7288838", "0.7184357", "0.7135501", "0.7129667", "0.7120576", "0.7088349", "0.70771897", "0.70531964", "0.7052199", "0.6985215", "0.68603814", "0.68237734", "0.679654"...
0.8454769
0
Return a wrapped torchvision.models.vgg19_bn.
def vgg19_bn(*args): return _VGGWrapper(models.vgg19_bn(*args))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vgg13_bn(*args):\n return _VGGWrapper(models.vgg13_bn(*args))", "def vgg19_bn(pretrained: bool = False, progress: bool = True, **kwargs: Any) -> VGG:\n return _vgg('vgg19_bn', 'E', True, pretrained, progress, **kwargs)", "def vgg16_bn(*args):\n return _VGGWrapper(models.vgg16_bn(*args))", "def v...
[ "0.8348196", "0.8109472", "0.8068373", "0.8025887", "0.7918028", "0.7863409", "0.7838951", "0.77972496", "0.7775535", "0.7741875", "0.76365876", "0.76103187", "0.7533963", "0.7422213", "0.7315462", "0.7304204", "0.7114142", "0.7032201", "0.6983572", "0.6935899", "0.69267434",...
0.88397497
0
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix inorder arguments and keyword arguments.
def __init__(self, *args, **kwds): if args or kwds: super(CfgNAV5, self).__init__(*args, **kwds) #message fields cannot be None, assign default values for those that are if self.mask is None: self.mask = 0 if self.dynModel is None: self.dynModel = 0 if self.fixMode is N...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, *args, **kwds):\n if args or kwds:\n super(KomodoSpeechRecCommand, self).__init__(*args, **kwds)\n #message fields cannot be None, assign default values for those that are\n if self.header is None:\n self.header = std_msgs.msg.Header()\n if self.cmd is None:\n ...
[ "0.7794795", "0.77207875", "0.77207875", "0.7687243", "0.7625947", "0.7564293", "0.7440383", "0.74175525", "0.7352349", "0.7308313", "0.72808266", "0.72378874", "0.722805", "0.7225032", "0.7225032", "0.7219433", "0.72120637", "0.72120637", "0.72120637", "0.72120637", "0.72120...
0.0
-1
fname {str} outname, including path
def save_phot_fits(df, fname): keep_col_phot = ["MJD", "FLUXCAL", "FLUXCALERR", "FLT"] # eliminate repeated rows (-777.0) df_phot = df.copy() df_phot = df_phot.loc[df_phot["FLUXCAL"].shift() != df_phot["FLUXCAL"]] if df_phot.MJD.values[-1] == -777.0: df_phot = df_phot.drop(df_phot.index[-1]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetOutputFilename(fname):\n return os.path.join(outdir, fname)", "def getOutputFile(fname):\n return os.path.join(Configurations.getOutputDir(), fname)", "def output_file_name_maker(args):\n log.debug(\"Entering output_file_name_maker()\")\n path = os.getcwd() + '/out_files/'\n if not os...
[ "0.7710816", "0.6884832", "0.6840823", "0.6804301", "0.6755415", "0.65771765", "0.6570283", "0.655171", "0.642352", "0.640055", "0.6390082", "0.6381155", "0.63600254", "0.63452667", "0.6338812", "0.629999", "0.62940365", "0.62918377", "0.6264622", "0.6260246", "0.62461555", ...
0.0
-1
Compute the neutral volumic mass (kg/m3) from known potential temperature and salinity fields using an equation of state.
def sigmantr(ptem, psal): zrau0 = 1000.0 zws = sqrt( abs(psal) ) # Numerator # T-Polynome zr1 = ( ( (-4.3159255086706703e-4 * ptem + 8.1157118782170051e-2) * ptem + 2.2280832068441331e-1 ) * ptem + 1002.3063688892480e0 ) # S-T Polynome zr2 = ( (-1.7052298331414675e-7 * psal - 3....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cal_mass(self):\n\n if not self.check_def(['E','px','py','pz']):\n sys.exit('Particle error: Quadri impulsion not define (error for mass routine)')\n\n\n \n if self.E**2-self.px**2-self.py**2-self.pz**2>1e-7: #precision problem\n self.mass=math.sqrt(self.E**2-...
[ "0.60089624", "0.5947858", "0.5927194", "0.59072286", "0.58592105", "0.5844536", "0.5770834", "0.5742854", "0.5702289", "0.56871444", "0.5679972", "0.5668663", "0.5663856", "0.56105274", "0.56036246", "0.55887246", "0.55775213", "0.5571435", "0.5558165", "0.55557317", "0.5555...
0.0
-1
Compute the density referenced to pref (ratio rho/rau0) from potential temperature and salinity fields using an equation of state defined through the namelist parameter neos.
def sigmai_dep(ptem, psal, pref): zr4 = 4.8313e-4 zd =-2.042967e-2 zrau0 = 1000.e0 sigmai_dep_out = zeros(psal.shape) # ?? for whatever reason sqrt(abs(psal)) seems to kick up a fuss when arrays # exceed a certain size...??? otherwise this could be vectorised # TODO: if pref is a number, bro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getDensityOfStates(self, Elist):\n\t\trho = np.zeros((len(Elist)), np.float64)\n\t\trho0 = _modes.hinderedrotor_densityofstates(Elist, self.frequency, self.barrier)\n\t\tfor i in range(self.degeneracy):\n\t\t\trho = _modes.convolve(rho, rho0, Elist)\n\t\treturn rho", "def computeChargeDensity(self):\n ...
[ "0.6319524", "0.5949625", "0.5887407", "0.58506113", "0.55272746", "0.5526342", "0.547861", "0.5456507", "0.5448218", "0.5437334", "0.5412844", "0.5376008", "0.53527516", "0.5333335", "0.52961624", "0.5285687", "0.52625275", "0.5259636", "0.52562284", "0.52514493", "0.5244832...
0.0
-1
Given resize portrait image and the mask shift the mask and the image to right and left corner. With some randomness to enable partial occlusion of left or right side of the body and or face.
def shift_mask_corners(portrait_image, portrait_mask, shift_arg='none'): aw = np.argwhere(portrait_mask != 0) if len(aw) == 0: return None, None aw_col1 = aw[:, 1:] # print(aw_col1.reshape(aw_col1.shape[0])) # print('Min: {}'.format(aw_col1.min())) # print('Max: {}'.format(aw_col1....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def augment(image,masks):\n\n # Random horizontal flipping\n if random.random() > 0.5:\n image = TF.hflip(image)\n masks = TF.hflip(masks)\n\n # Random vertical flipping\n if random.random() > 0.5:\n image = TF.vflip(image)\n masks = TF.vflip(...
[ "0.6317664", "0.6189913", "0.6000551", "0.5874883", "0.58400285", "0.581971", "0.5792833", "0.5784196", "0.5754534", "0.57324415", "0.57090956", "0.5704063", "0.5695382", "0.5667136", "0.5648017", "0.55786246", "0.5567983", "0.55615556", "0.55574405", "0.5549081", "0.5540379"...
0.65945107
0
Slice an iterator which comes in batches.
def _islice_batched(it: Iterator[np.ndarray], n: int) -> Iterator[np.ndarray]: while n > 0: arr: np.ndarray = next(it) k = arr.shape[0] yield arr[:n, :] n -= k
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def batches(iterable, size):\n sourceiter = iter(iterable)\n while True:\n batchiter = islice(sourceiter, size)\n yield chain([next(batchiter)], batchiter)", "def chunks(iterator, size):\n for index in range(0, len(iterator), size):\n yield iterator[index:index + size]", "def slic...
[ "0.7258964", "0.71483773", "0.7097549", "0.6982029", "0.6970826", "0.69231313", "0.6913439", "0.6873999", "0.687214", "0.68483245", "0.67608315", "0.6702634", "0.6672582", "0.6671158", "0.661621", "0.6594438", "0.6587318", "0.65842366", "0.6582009", "0.6570182", "0.65646124",...
0.73932827
0
Convert DataArrays to XData (i.e. add column names).
def dataarrays_to_xdata(arrays: DataArrays, features: FeatureSet) -> XData: x_con = None if arrays.con_marray is not None: assert features.continuous con_labels = features.continuous.columns.keys() x_con = dict(zip(con_labels, np.rollaxis(arrays.con_marray, 3))) x_cat = None if a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xr_array_to_dataset(data, names, units):\n # Create an empty dataset\n ds_new = xr.Dataset()\n \n # Insert the coordinates\n ds_new.coords[names[0]] = data[:,0]\n ds_new.coords[names[0]].attrs['units'] = units[0]\n \n # Insert the rest of the data\n for i in range(1, len(names)):\n ...
[ "0.70465654", "0.6736386", "0.66249967", "0.61846924", "0.6100064", "0.60736835", "0.6064084", "0.59519356", "0.5942647", "0.58939683", "0.58257157", "0.58204615", "0.57939917", "0.57764804", "0.57443595", "0.57344085", "0.5666428", "0.5666428", "0.5650323", "0.563645", "0.56...
0.72746456
0
For each entry in the Genre Index, write its representation to file.
def write_genre_index(self): for giEntry in self.genreIndex: # Write to file self.db_file.write(giEntry.get_representation())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write_sub_index(self):\n for sie in self.subIndex:\n self.db_file.write(sie.get_representation())", "def write_main_index(self):\n\n for miEntry in self.mainIndex:\n self.db_file.write(miEntry.get_representation())", "def write_index(self):\n self.Lock = True\n ...
[ "0.6940652", "0.68660104", "0.6693384", "0.6666078", "0.65883094", "0.65689576", "0.6531087", "0.65175045", "0.6403322", "0.63736856", "0.63617665", "0.6198193", "0.6151859", "0.6123972", "0.6111485", "0.61027384", "0.60940206", "0.6093835", "0.6042728", "0.60099316", "0.6007...
0.8640384
0
Close the database file.
def finalise(self): log.info("KenwoodDatabase finalised.") self.db_file.close()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _close_database(self):\n assert self._conn is not None\n logging.info(\"Closing file {!r}.\".format(self._filename))\n self._cursor.close()\n self._cursor = None\n self._conn.close()\n self._conn = None\n self._filename = None\n self._sessionUID = None", ...
[ "0.8084272", "0.8075283", "0.7787327", "0.7767275", "0.77559835", "0.76317424", "0.7629429", "0.7629429", "0.7629429", "0.7611661", "0.76032823", "0.75978565", "0.75705093", "0.7542673", "0.7464529", "0.7443427", "0.74033374", "0.73471105", "0.73437124", "0.72996366", "0.7247...
0.72739315
20
This saves the DataFrame as a CSV using the layout written and expected by Spark/Hadoop. E.g. if the given storage maps the asset's path to the filesystem path "/a/b/c", a directory
def handle_output(self, context, obj: Union[PandasDF, SparkDF]): if isinstance(obj, PandasDF): directory = self._get_fs_path(context.asset_key) os.makedirs(directory, exist_ok=True) open(os.path.join(directory, "_SUCCESS"), "wb").close() csv_path = os.path.join(di...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write_df_to_disk(df, out_path):\n out_dir = os.path.dirname(out_path)\n Path(out_dir).mkdir(parents=True, exist_ok=True)\n df.to_csv(out_path, index=False)", "def save_csv(df, fp):\n if not os.path.isdir(os.path.split(fp)[0]):\n os.makedirs(os.path.split(fp)[0])\n\n df.to_csv(fp, index=...
[ "0.6403686", "0.63971394", "0.61287904", "0.61139256", "0.60021925", "0.59767973", "0.59325325", "0.5869664", "0.58483595", "0.5839143", "0.5836552", "0.5798965", "0.5739622", "0.5704917", "0.5694544", "0.5668081", "0.5625501", "0.56190556", "0.5613667", "0.55819154", "0.5579...
0.5534035
23
Open url in default browser
def goto(url): terminal(f'start "" "{url}"')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def open(url):\r\n webbrowser.open(url)", "def open_in_browser(self):\n webbrowser.open(self.url)", "def open_browser(url):\n import webbrowser\n webbrowser.open_new(url)", "def open_url(name):\n url = localReadConfig.get_webServer(name)\n browser = open_browser()\n browser.get(url)\...
[ "0.8371813", "0.8229306", "0.8152828", "0.8151019", "0.80715823", "0.79613394", "0.78021127", "0.77866983", "0.77590233", "0.76830417", "0.7631916", "0.76118225", "0.7597507", "0.75871724", "0.75661695", "0.7527305", "0.7402881", "0.7386271", "0.73753023", "0.7324771", "0.731...
0.6197752
94
Returns the normalization parameters as a dict with the keys 'channels', 'means', 'stds'
def getParameters(self): return {'channels':self._channels, 'means':self._means, 'stds':self._stds}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_norm(self):\n\n # logger.info(\" Normalization factor:\")\n\n # declare the dict of class instance\n # where we'll store the normalization parameter\n self.param_norm = {'features': {}, 'targets': {}}\n for feat_type, feat_names in self.select_feature.items():\n ...
[ "0.64815795", "0.64037716", "0.63928115", "0.6338921", "0.6338587", "0.63249576", "0.6287783", "0.6266705", "0.613851", "0.61189663", "0.60752726", "0.59812254", "0.59432846", "0.59416384", "0.5892248", "0.5887186", "0.58839476", "0.58519536", "0.5809765", "0.5796488", "0.574...
0.73191345
0
Check if a language model is installed, and install it if needed
def check(module: str, force: bool = False) -> bool: lemmatizer = get_model(module) return False not in [ os.path.exists( get_path(module, file.name) ) for file in lemmatizer.DOWNLOADS ] or force
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_installed(cls, language=None):\n if language == 'python':\n return True\n return False", "def is_installed(cls, language=None):\n # Filesystem is implied\n return True", "def load_spacy_model(spacy_model_name: str) -> Optional[Language]:\n\n try:\n spacy_...
[ "0.6528625", "0.62780696", "0.59683174", "0.5924659", "0.5776293", "0.5523082", "0.5464263", "0.5411366", "0.5399497", "0.5361947", "0.53542256", "0.53467953", "0.531626", "0.5306351", "0.5298268", "0.52927125", "0.52815026", "0.5266094", "0.52321535", "0.5187166", "0.5183359...
0.49982274
34
Gets information about a unique device type.
def get_device(arn=None): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def device_type(self):\n return Context.devtype2str[self.device_typeid]", "def device_type(self):\n return Context.devtype2str[self.device_typeid]", "def type(self) -> str:\n return self._device_info[\"Type\"]", "def device_type(self):\n return self._meta['device_type']", "def t...
[ "0.7578159", "0.7578159", "0.7538417", "0.7538099", "0.7532159", "0.7506375", "0.7464883", "0.7333811", "0.71858674", "0.71708703", "0.71536046", "0.7085922", "0.6958168", "0.69133097", "0.69133097", "0.69133097", "0.6861648", "0.6823922", "0.6815007", "0.6815007", "0.6779290...
0.0
-1
Returns a list of offering promotions. Each offering promotion record contains the ID and description of the promotion. The API returns a NotEligible error if the caller is not permitted to invoke the operation. Contact awsdevicefarmsupport.com if you believe that you should be able to invoke this operation.
def list_offering_promotions(nextToken=None): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(self):\n app.logger.info('Request to list Promotions...')\n args = promotion_args.parse_args()\n code = args['promotion-code']\n promotions = []\n if code:\n app.logger.info('Request for promotion list with code %s', code)\n promotions = Promotion.fi...
[ "0.67693263", "0.6566639", "0.5363997", "0.50455517", "0.503432", "0.4949368", "0.48522595", "0.47715014", "0.47178715", "0.4675528", "0.45911214", "0.45773196", "0.44939342", "0.44921467", "0.4478049", "0.44700342", "0.4462496", "0.44176036", "0.4381814", "0.43796805", "0.43...
0.62335265
2
Returns a list of all historical purchases, renewals, and system renewal transactions for an AWS account. The list is paginated and ordered by a descending timestamp (most recent transactions are first). The API returns a NotEligible error if the user is not permitted to invoke the operation. Please contact awsdevicefa...
def list_offering_transactions(nextToken=None): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_transactions(self, crypto, address, confirmations=1):\n raise NotImplementedError(\n \"This service does not support getting historical transactions. \"\n \"Or rather it has no defined 'get_transactions' method.\"\n )", "def get(self):\n args = request.args\n ...
[ "0.70813936", "0.686384", "0.67183524", "0.6572034", "0.6546952", "0.6463222", "0.64544976", "0.6392877", "0.6391829", "0.63519764", "0.63231933", "0.62907934", "0.62469524", "0.6245291", "0.62400365", "0.6216391", "0.6200725", "0.61845976", "0.6148194", "0.6061293", "0.60405...
0.57011753
39