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
PCIE device identifier of the GPU.
def pcie_id(self) -> int: return self._pcie_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetGPU():\n return option['device_id']", "def device_num(self) -> str:\n return pulumi.get(self, \"device_num\")", "def deviceid(gpu):\n\n # Return if this is already a torch device\n # pylint: disable=E1101\n if isinstance(gpu, torch.device):\n return gpu\n\n ...
[ "0.7404472", "0.7280904", "0.7158367", "0.6986045", "0.6983866", "0.6885753", "0.6861455", "0.68434936", "0.68403655", "0.6832853", "0.67388356", "0.6709373", "0.6707698", "0.6704712", "0.66910625", "0.6667681", "0.6649495", "0.6628434", "0.66172594", "0.66172594", "0.6617259...
0.73434716
1
PCIE device identifier of the GPU.
def pcie_id(self, pcie_id: int): self._pcie_id = pcie_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetGPU():\n return option['device_id']", "def pcie_id(self) -> int:\r\n return self._pcie_id", "def device_num(self) -> str:\n return pulumi.get(self, \"device_num\")", "def deviceid(gpu):\n\n # Return if this is already a torch device\n # pylint: disable=E1101\n if ...
[ "0.7406188", "0.7341797", "0.72830254", "0.71586454", "0.6988182", "0.6985557", "0.68882567", "0.6863372", "0.6845821", "0.6841818", "0.6835041", "0.67405885", "0.6711759", "0.6710336", "0.6706974", "0.6693963", "0.6669693", "0.66508913", "0.6631376", "0.6619066", "0.6619066"...
0.0
-1
Timestamp when the associated metrics data was collected.
def timestamp(self) -> datetime: return self._timestamp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def timestamp(self):\n return self.__timestamp", "def timestamp(self):\n return self._timestamp", "def timestamp(self):\n return self._timestamp", "def timestamp(self):\n return self._timestamp", "def timestamp(self):\n return self._timestamp", "def timestamp(self):\n ...
[ "0.68878573", "0.67555314", "0.67555314", "0.67555314", "0.67555314", "0.67555314", "0.67555314", "0.67555314", "0.6647348", "0.66316706", "0.66199577", "0.6578389", "0.65579855", "0.6518234", "0.6489417", "0.64359415", "0.64283806", "0.6416989", "0.6403814", "0.63291264", "0...
0.66951555
8
Timestamp when the associated metrics data was collected.
def timestamp(self, timestamp: datetime): self._timestamp = timestamp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def timestamp(self):\n return self.__timestamp", "def timestamp(self):\n return self._timestamp", "def timestamp(self):\n return self._timestamp", "def timestamp(self):\n return self._timestamp", "def timestamp(self):\n return self._timestamp", "def timestamp(self):\n ...
[ "0.688732", "0.6754833", "0.6754833", "0.6754833", "0.6754833", "0.6754833", "0.6754833", "0.6754833", "0.6694346", "0.6646659", "0.6631095", "0.661986", "0.65778106", "0.6558163", "0.65171534", "0.6487948", "0.64352506", "0.6427614", "0.64162785", "0.64032793", "0.6328357", ...
0.0
-1
Returns starting state of the board.
def initial_state(): return [[EMPTY, EMPTY, EMPTY], [EMPTY, EMPTY, EMPTY], [EMPTY, EMPTY, EMPTY]]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def start_state(self):\r\n return np.zeros(self.board_size, dtype=np.int8)", "def start_state():\n return chess.Board()", "def startingState(self):\n # Returns starting position and 4 false because no corners are visited yet\n return (self.startingPosition, (False, False, False, False))...
[ "0.80817723", "0.7890549", "0.7534283", "0.7277978", "0.7277978", "0.7225446", "0.7225446", "0.7225446", "0.7225446", "0.7225446", "0.7225446", "0.7225446", "0.7225446", "0.7225446", "0.7225446", "0.7225446", "0.7225446", "0.7225446", "0.7225446", "0.7225446", "0.7225446", ...
0.0
-1
Returns player who has the next turn on a board.
def player(board): if board == initial_state(): return X numX=0 numO=0 for i in range(len(board)): for j in range(len(board)): if(board[i][j]==X): numX+=1 elif(board[i][j]==O): numO+=1 if numX > numO: return O else: return X
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def next_player(board, prev_player):\n opp = Othello.opponent(prev_player)\n if Othello.any_legal_move(opp, board):\n return opp\n elif Othello.any_legal_move(prev_player, board):\n return prev_player\n return None", "def next_player(self,board, prev_player):\r\n...
[ "0.7911148", "0.7521969", "0.74204457", "0.73687756", "0.71954805", "0.69775087", "0.69621766", "0.69253695", "0.69208723", "0.69010353", "0.6845991", "0.6841043", "0.6838282", "0.68265843", "0.67751175", "0.67751175", "0.6769739", "0.6713109", "0.67060393", "0.66561204", "0....
0.6409789
41
Returns the optimal action for the current player on the board.
def minimax(board): turn = player(board) if board == initial_state(): return (0,0) if turn == X: v = float("-inf") current_action = None for action in actions(board): minVal = min_value(result(board, action)) if minVal > v: v = minVal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_best_action(self):\n if self.bestAction is None:\n self.calculate_best_action()\n return self.bestAction", "def getAction(self, gameState: GameState):\n _max = float(\"-inf\")\n action = None\n for move in gameState.getLegalActions(0):\n util = min...
[ "0.7766687", "0.7631933", "0.75851405", "0.7527585", "0.7517406", "0.7466262", "0.74598145", "0.7425264", "0.7416284", "0.7393956", "0.73746264", "0.7334023", "0.7314428", "0.7305825", "0.7284075", "0.72647834", "0.72647834", "0.7249947", "0.7232492", "0.72029084", "0.7172677...
0.7037336
33
This method exists so that subclasses can override the container name as it comes in to the driver in the backup object. Implementations should return None if no change to the container name is desired.
def update_container_name(self, backup, container): return container
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def container_name(self):\n pass", "def get_current_container_name(self): # real signature unknown; restored from __doc__\n return \"\"", "def _get_container_name(self) -> str:\n dirname = os.path.basename(os.getcwd())\n default_container_name = f\"{dirname}_{self.config_name}\"\n ...
[ "0.7503577", "0.70857435", "0.70734286", "0.7050803", "0.6714085", "0.66787547", "0.6487195", "0.6405152", "0.63996774", "0.6396288", "0.6396288", "0.61956096", "0.6104214", "0.6048587", "0.60143644", "0.59725314", "0.59424436", "0.593039", "0.58704996", "0.5833893", "0.58060...
0.8374773
0
Generate a skewed peak.
def gen_skew_peak(freqs, cen, height, scale, skew): ys = stats.skewnorm.pdf(freqs, skew, cen, scale) # Scale to (0, 1), then apply power transform ys = (ys / np.abs(ys).max()) * height return ys
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def single_peak(x, mean, sigma, alpha):\n return skewnorm.pdf(x, alpha, mean, sigma)", "def peak(self):\n pass", "def gen_peak_def_high():\n\n high_cf_opts = np.arange(50, 90, 1)\n\n # Generate peak definitions\n while True:\n\n cur_cen = np.random.choice(high_cf_opts)\n cur_pw...
[ "0.63195896", "0.60660845", "0.5811049", "0.57997125", "0.5755136", "0.5622064", "0.5601441", "0.54643846", "0.5388002", "0.53583676", "0.5345595", "0.53031373", "0.5300641", "0.5278221", "0.52702415", "0.52702093", "0.52409095", "0.5240008", "0.5232844", "0.5232516", "0.5230...
0.74716306
0
Indicates if all pool is free.
def is_all_free(self): return self.pool_size == self.pool.qsize()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_all_free(self):\n return self.pool_size == self.sem._value", "def is_free(self):\n return self._size > 0", "def is_free(self) -> tuple:\n if self.running_procs >= self.procs_no:\n return (False, None)\n if self.gpus:\n for gpu in self.gpus:\n ...
[ "0.86459655", "0.72357994", "0.6984014", "0.6780621", "0.67794234", "0.6758824", "0.67582715", "0.66722465", "0.666625", "0.65039617", "0.6465879", "0.6450088", "0.64020497", "0.6231395", "0.61517763", "0.6122315", "0.6032443", "0.5928987", "0.5928925", "0.5889941", "0.586739...
0.89347214
0
Indicates if all pool is free.
def is_all_free(self): return self.pool_size == self.sem._value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_all_free(self):\n return self.pool_size == self.pool.qsize()", "def is_free(self):\n return self._size > 0", "def is_free(self) -> tuple:\n if self.running_procs >= self.procs_no:\n return (False, None)\n if self.gpus:\n for gpu in self.gpus:\n ...
[ "0.8935286", "0.7238808", "0.6984689", "0.6781709", "0.67799866", "0.6760782", "0.67596024", "0.66704965", "0.66647756", "0.65063447", "0.64641786", "0.6450032", "0.6400375", "0.6230172", "0.61514515", "0.6122063", "0.6033127", "0.592806", "0.5926281", "0.5890642", "0.5869727...
0.86467284
1
Private method for converting a dict to a DialogUtterance.
def _dict_to_dialog_utterance(du_dict): # Remove anything with for k, v in du_dict.items(): if len(v.strip()) == 0: du_dict[k] = None # Extract tokens and POS tags if du_dict["pos"]: du_dict["pos"] = [ PosTag(*token_pos_pair.split("/")) for token_po...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init_entry(self, utterance: dict, usernames: tuple) -> JsonDialogue:\n return JsonDialogue(self.topic, utterance['Title'], utterance['CreationDate_post'], usernames, self.sid)", "def from_dict(cls, dikt) -> 'StrategyActivityResponse':\n return util.deserialize_model(dikt, cls)", "def from_d...
[ "0.5425241", "0.51295227", "0.5054815", "0.5024184", "0.48811328", "0.48622468", "0.4785798", "0.47629854", "0.47629854", "0.47629854", "0.47629854", "0.47629854", "0.47629854", "0.47629854", "0.47629854", "0.47629854", "0.47629854", "0.47629854", "0.47629854", "0.47629854", ...
0.7158291
0
returns the action probability distribution, from a given observation.
def getActionProba(self, observation, dones=None, delta=0): assert self.model is not None, "Error: must train or load model before use" if len(observation.shape) > 2: observation = np.transpose(observation, (0, 3, 2, 1)) observation = th.from_numpy(observation).float().requires_grad_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def choose_action(self, observation):\n observation = observation[np.newaxis, :]\n \n prob_weights = self.sess.run(\n self.all_act_prob,\n feed_dict={self.tf_obs: observation})\n\n action = npr.choice(range(prob_weights.shape[1]), p=prob_weights.ravel())\n\n return action", "def act(self...
[ "0.75363475", "0.7469838", "0.7176215", "0.6976986", "0.6921634", "0.6883577", "0.68295866", "0.67682016", "0.6735998", "0.67333806", "0.67173976", "0.66899717", "0.66792244", "0.6665365", "0.65566915", "0.65403587", "0.651649", "0.651649", "0.6511095", "0.64913917", "0.64849...
0.6210185
42
If the user is signed in and the author of the post, deincrement the comment count in the post model and delete the comment from the db. Otherwise the user does not have permission to delete the comment.
def get(self, post_id, post_user_id, comment_id): if self.user and self.user.key().id() == int(post_user_id): postkey = db.Key.from_path('Post', int(post_id), parent=blog_key()) post = db.get(postkey) commentkey = db.Key.from_path('Comment', int(comment_id), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post(self):\n comment_id = int(self.request.get('comment_id'))\n post_id = self.request.get('post_id')\n comment = Comments.get_by_id(comment_id)\n if comment.submitter_id == self.get_active_user().key().id():\n comment.delete()\n else:\n error(403)\n\n ...
[ "0.75117576", "0.73604715", "0.7009929", "0.6857118", "0.67667866", "0.6585606", "0.6565695", "0.653583", "0.6513057", "0.6500875", "0.64324874", "0.6401286", "0.6393747", "0.63775736", "0.63157654", "0.63037586", "0.62919706", "0.62429136", "0.6238856", "0.62115306", "0.6188...
0.70232904
2
Validate the inputs related to kpoints. Either an explicit `KpointsData` with given mesh, or a desired kpoints distance should be specified. In the case of the latter, the `KpointsData` will be constructed for the input `StructureData` using the `create_kpoints_from_distance` calculation function.
def validate_kpoints(self): if all(key not in self.inputs for key in ['kpoints', 'kpoints_distance']): return self.exit_codes.ERROR_INVALID_INPUT_KPOINTS # xspectra.x can only work with a kpoints mesh, so we check that the KpointsData has a # mesh property: if 'kpoints' in s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate_keypoints(self, keypoints):\n self.validate_keypoints_label(keypoints.label)\n self.schema[keypoints.label].validate(keypoints)", "def setup_kpoints(self):\n kpoints_mesh = KpointsData()\n kpoints_mesh.set_cell_from_structure(self.inputs.structure)\n kpoints_mesh.s...
[ "0.6304307", "0.62843585", "0.5900631", "0.5835263", "0.5728282", "0.55190796", "0.5504512", "0.54719335", "0.54529816", "0.54463685", "0.54447407", "0.543001", "0.5401653", "0.5394185", "0.5383173", "0.53712624", "0.53234583", "0.5302514", "0.5301957", "0.5274975", "0.526335...
0.83015186
0
Finds user posts on URL by username newer than last_time_checked
def find_posts_by_targetuser(self): if not self.threads: raise Exception('No threads present in class. ' + 'Run find_threads_on_board first.') title_strip_text = ' - Current Events Message Board - GameFAQs' post_bodies = [] page_counter = 0 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getPosts():\n\n cur, user_id = initialise(3)\n cur.execute(\"SELECT username FROM users WHERE id = ?\", [user_id])\n name = cur.fetchall()[0][0]\n cur.execute(\"SELECT * FROM posts WHERE name IN (SELECT following FROM followers WHERE user = ?) OR name = ?\", (name, name))\n posts = cur.fetchall(...
[ "0.57034075", "0.5514633", "0.54756194", "0.5458588", "0.54228836", "0.53704166", "0.53278106", "0.5295844", "0.5290781", "0.51994616", "0.51790303", "0.5142986", "0.51422936", "0.5133675", "0.5117201", "0.5114056", "0.5112243", "0.5091533", "0.5078913", "0.50785786", "0.5078...
0.5762462
0
Returns CROWDrelated project settings. Private service method.
def _get_crowd_config(): config = getattr(settings, 'CROWD', None) if not config: raise UserWarning('CROWD configuration is not in your settings.py') return config
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def projects_settings():\n return map_settings(settings_repository.settings)", "def get_projects(self):\n return conf.projects", "def get_project_info(self):\n return self.project_info", "def project_settings(request):\n webnode_settings = kakocase_settings(request)\n webnode_settings[...
[ "0.73398834", "0.6880504", "0.66941255", "0.66277814", "0.6622517", "0.6572249", "0.6486314", "0.64521676", "0.643757", "0.6410233", "0.64049494", "0.6385791", "0.63461787", "0.6324483", "0.62854767", "0.6270813", "0.6268467", "0.6244937", "0.617788", "0.61681604", "0.6138434...
0.64141214
9
Returns True if n is prime.
def isprime(n): if n < 2: return False if n == 2: return True if n == 3: return True if n % 2 == 0: return False if n % 3 == 0: return False i = 5 w = 2 while i * i <= n: if n % i == 0: return False i += w w = 6...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isprime(n):\r\n\treturn is_prime(n)", "def isprime(n):\n\treturn is_prime(n)", "def if_prime(cls, n):\n\n if (n <= 1):\n return False\n if (n <= 3):\n return True\n\n if (n % 2 == 0 or n % 3 == 0):\n return False\n\n i = 5\n while(i * i <=...
[ "0.8514553", "0.85052115", "0.8478591", "0.8415317", "0.8408101", "0.84059155", "0.8389028", "0.8350958", "0.83173066", "0.83133805", "0.8305305", "0.83034956", "0.830075", "0.82713956", "0.8248401", "0.8248108", "0.8245176", "0.82376003", "0.82293326", "0.82223743", "0.82108...
0.78520685
63
This route is for a hello world test
def hello(): return render_template("hello.html")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_home_word(self):\r\n result = self.app.get('/hello_world')\r\n self.assertTrue(result.data, 'Hello')", "def index():\n return \"Hello, world!\"", "def test_main(self):\n path = reverse(\"main\")\n request = RequestFactory().get(path)\n response = index(request)\n ...
[ "0.7320547", "0.7168844", "0.7115104", "0.70983094", "0.70798445", "0.7027017", "0.70132846", "0.6957607", "0.69131494", "0.68570846", "0.6822823", "0.6821588", "0.67997617", "0.6763874", "0.67442673", "0.67438483", "0.6694536", "0.6685353", "0.66816586", "0.6649281", "0.6629...
0.6447685
40
Computes the recall metric. Computes the recall, a metric for multilabel classification of how many relevant items are selected.
def recall(y_true, y_pred): true_positives = K.sum(K.round(K.clip(y_true * y_pred, 0, 1))) possible_positives = K.sum(K.round(K.clip(y_true, 0, 1))) recall = true_positives / (possible_positives + K.epsilon()) return recall
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def recall(self):\n self.overall_recall = recall_score(\n self.y_true, self.y_pred, average = self.average_type).round(self.digits_count_fp)\n self.classes_recall = recall_score(\n self.y_true, self.y_pred, average = None).round(self.digits_count_fp)", "def recall_score(self, ...
[ "0.7477947", "0.7446787", "0.7298146", "0.717669", "0.717619", "0.7166503", "0.7156396", "0.71362334", "0.71362334", "0.71362334", "0.71362334", "0.71362334", "0.71362334", "0.7134402", "0.7108307", "0.7104241", "0.70811856", "0.705563", "0.7034574", "0.7034574", "0.7034574",...
0.7075305
29
Computes the precision metric. Computes the precision, a metric for multilabel classification of how many selected items are relevant.
def precision(y_true, y_pred): true_positives = K.sum(K.round(K.clip(y_true * y_pred, 0, 1))) predicted_positives = K.sum(K.round(K.clip(y_pred, 0, 1))) precision = true_positives / (predicted_positives + K.epsilon()) return precision
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def precision(self):\n self.overall_precision = precision_score(\n self.y_true, self.y_pred, average = self.average_type).round(self.digits_count_fp)\n self.classes_precision = precision_score(\n self.y_true, self.y_pred, average = None).round(self.digits_count_fp)", "def prec...
[ "0.7586407", "0.74077135", "0.7335255", "0.730423", "0.7264715", "0.72033966", "0.72031116", "0.7179727", "0.7179727", "0.7179727", "0.7179727", "0.7179727", "0.7179727", "0.7152422", "0.7148002", "0.7142301", "0.7117727", "0.7117727", "0.7117727", "0.7117727", "0.7117727", ...
0.71275824
28
Returns lowest group id. If no groups are defined, return None
def min_group_id(self) -> int: group_ids = np.asarray(self.group_ids, dtype=np.float) if np.all(np.isnan(group_ids)): group_id = None else: group_id = int(np.nanmin(group_ids)) return group_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetFirstGroupId(self):\n\t\treturn self.client.GetGroups().entry[0].id.text", "def get_min_id(self):\r\n min_id = None\r\n for pid in self.players:\r\n if min_id is None or pid < min_id:\r\n min_id = pid\r\n return min_id", "def default_included_group_id(self)...
[ "0.72568583", "0.69023913", "0.6765292", "0.6610194", "0.6582328", "0.6582328", "0.6582328", "0.63975495", "0.63730353", "0.6371971", "0.6338755", "0.628117", "0.61864334", "0.6178007", "0.6176909", "0.6162823", "0.6141201", "0.61111283", "0.61048645", "0.6098911", "0.6033402...
0.82487017
0
Returns highest group id. If no groups are defined, return None
def max_group_id(self) -> int: group_ids = np.asarray(self.group_ids, dtype=np.float) if np.all(np.isnan(group_ids)): group_id = None else: group_id = int(np.nanmax(group_ids)) return group_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetFirstGroupId(self):\n\t\treturn self.client.GetGroups().entry[0].id.text", "def min_group_id(self) -> int:\n\n group_ids = np.asarray(self.group_ids, dtype=np.float)\n if np.all(np.isnan(group_ids)):\n group_id = None\n else:\n group_id = int(np.nanmin(group_ids)...
[ "0.66832817", "0.6647579", "0.65711814", "0.65690064", "0.65690064", "0.65690064", "0.65146327", "0.6479507", "0.64665866", "0.64365214", "0.6400256", "0.6371045", "0.63664657", "0.6340837", "0.6257906", "0.62426156", "0.6217411", "0.6162581", "0.61433756", "0.6134884", "0.61...
0.7982724
0
Returns number of trees contained in skeleton object.
def num_trees(self) -> int: return len(self.nodes)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def n_trees(self):\n return len(self.data_kd)", "def num_trees(self):\n return self._ll_tree_sequence.get_num_trees()", "def count(self):\n return self.__tree.node_count", "def tree_size(self) -> int:\n Q = Queue()\n count = 0\n Q.put(self.root)\n while not Q....
[ "0.73461956", "0.72445947", "0.7038706", "0.70234084", "0.6988989", "0.69339025", "0.6901397", "0.6856496", "0.68297166", "0.68191034", "0.67840487", "0.6759071", "0.6737608", "0.67095983", "0.67003775", "0.66994345", "0.6668406", "0.66545814", "0.65985686", "0.6593608", "0.6...
0.7070014
2
Returns number of connected components for graph
def _num_conn_comp(graph): return nx.number_connected_components(graph)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def connected_components(self) -> int:\n # visited = set()\n def get_component(vert: Tuple[int, int]) -> Set[Tuple[int, int]]:\n \"\"\" \"\"\"\n nonlocal visited\n visited.add(vert)\n if graph.vertices[vert]:\n for neighbor in graph.vertices[...
[ "0.83641773", "0.83437747", "0.81624407", "0.8031547", "0.7954649", "0.78082293", "0.7705272", "0.7360719", "0.72838306", "0.72559667", "0.72473276", "0.7212645", "0.71635467", "0.70897824", "0.7080527", "0.7062978", "0.70475674", "0.7045782", "0.70328623", "0.70046943", "0.7...
0.87805754
0
Gets the runtime for the compiler. Returns an object with the compiler runtime for this architecture
def get_compiler_rt_lib(self): return self.get_runtime()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_runtime(self):\n import io\n from ..api import asm\n\n asm_src = \"\"\n return asm(io.StringIO(asm_src), self)", "def runtime(self):\n return self._runtime", "def runtime(self):\n return self._runtime", "def get_compiler() -> EBNFCompiler:\n THREAD_LOCALS ...
[ "0.71252227", "0.70908153", "0.70908153", "0.69115597", "0.6635031", "0.6598686", "0.65915775", "0.6491484", "0.64307064", "0.62726164", "0.611345", "0.6083088", "0.6019867", "0.5977133", "0.5971644", "0.59486043", "0.5865561", "0.584073", "0.5752289", "0.56791294", "0.566547...
0.8038011
0
Given an array of integers your solution should find the smallest integer.
def findSmallestInt(arr): smallest_int = min(arr) print(smallest_int) for num in arr: if num > smallest_int: smallest_int = num return smallest_int
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def findLowestPositiveInteger(arr):\n #Sort the array \n arr.sort()\n \n #Remove any non-positive numbers\n positive_arr = []\n for i in arr:\n if (i >= 1):\n positive_arr.append(i)\n\n #Initialize the lowest possible value to 1, since it the lowest possible positive integer\...
[ "0.79001784", "0.7870558", "0.75516975", "0.72483844", "0.71978855", "0.71658194", "0.7087989", "0.70819414", "0.6933024", "0.6894134", "0.6878115", "0.68588406", "0.6788487", "0.6735203", "0.67077005", "0.6658078", "0.6655882", "0.6612236", "0.6591559", "0.65629053", "0.6548...
0.7931123
0
Convert YOLOv2 box predictions to bounding box corners.
def yolo2_boxes_to_corners(box_xy, box_wh): box_mins = box_xy - (box_wh / 2.) box_maxes = box_xy + (box_wh / 2.) return K.concatenate([ box_mins[..., 1:2], # y_min box_mins[..., 0:1], # x_min box_maxes[..., 1:2], # y_max box_maxes[..., 0:1] # x_max ])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _decode_bbox(self, normalized_bbox):\n #apply the inverse of transformation\n y1,x1,y2,x2 = preprocess.apply_transformation(normalized_bbox,\n np.linalg.inv(self.transformation))\n\n w,h = self.image_size\n y1,x1,y2,x2 = y1*h,x1*w,y2*h,x2*w\n return vot.Rectang...
[ "0.6752547", "0.6630928", "0.64708626", "0.6361782", "0.61366963", "0.6115061", "0.6088159", "0.6061737", "0.6011136", "0.59522283", "0.5869778", "0.5860188", "0.5849919", "0.58330435", "0.5818474", "0.5800171", "0.57958174", "0.5787216", "0.5786475", "0.57813185", "0.5781318...
0.6915219
0
Decode final layer features to bounding box parameters.
def yolo2_decode(feats, anchors, num_classes, input_shape, scale_x_y=None, calc_loss=False): num_anchors = len(anchors) # Reshape to batch, height, width, num_anchors, box_params. anchors_tensor = K.reshape(K.constant(anchors), [1, 1, 1, num_anchors, 2]) grid_shape = K.shape(feats)[1:3] # height, width...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _recover_boundingboxes(features):\n ymin = features['image/object/bbox/ymin'].values\n xmin = features['image/object/bbox/xmin'].values\n ymax = features['image/object/bbox/ymax'].values\n xmax = features['image/object/bbox/xmax'].values\n return tf.transpose([ymin, xmin, ymax, xmax])", "def _...
[ "0.6606601", "0.6545102", "0.6375046", "0.62812316", "0.6231459", "0.6137296", "0.6111309", "0.599917", "0.5972156", "0.5951793", "0.58870757", "0.5868612", "0.58196735", "0.57547927", "0.57448685", "0.5732805", "0.56818074", "0.56755906", "0.5648855", "0.5648752", "0.5641115...
0.0
-1
Assert that two complex structures have almost equal contents. Compares lists, dicts and tuples recursively. Checks numeric values
def assertDeepAlmostEqual(test_case, expected, actual, *args, **kwargs): is_root = not '__trace' in kwargs trace = kwargs.pop('__trace', 'ROOT') try: if isinstance(expected, (int, float, complex)): test_case.assertAlmostEqual(expected, actual, *args, **kwargs) elif isinstanc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _equivalent_data_structures(struct_1, struct_2):\n if isinstance(struct_1, np.ndarray):\n return np.allclose(struct_1, struct_2)\n if isinstance(struct_1, Mapping):\n if set(struct_1.keys()) != set(struct_2.keys()):\n return False\n return all(\n _equivalent_dat...
[ "0.6857276", "0.6848873", "0.66654605", "0.66377485", "0.6620422", "0.66017956", "0.65907496", "0.655373", "0.655157", "0.64244205", "0.6401224", "0.6361603", "0.6349483", "0.6346842", "0.63336843", "0.63317245", "0.63295066", "0.63245595", "0.6312757", "0.630501", "0.630501"...
0.6161716
31
Convert raw date field into a value interpretable by the dataserver. The date is given by year and week number, the date filtering API expects mm/dd/YYYYZ format so we use the first day of the given week.
def convert_date(year: str, week: str): date = datetime.fromisocalendar(int(year), int(week), 1) return date.strftime("%m/%d/%YZ")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_week_date(self, raw_week: str) -> tuple:\n\n search_result = re.search(r'^(\\d+.\\d+)\\s+-\\s+\\d+.\\d+', raw_week)\n\n if \"from\" in raw_week:\n week = re.sub(r'^\\D+', '', raw_week)\n\n elif search_result:\n week = search_result.group(1)\n else:\n ...
[ "0.6620415", "0.6310158", "0.6028344", "0.593478", "0.5868662", "0.5810644", "0.57624", "0.56950694", "0.5693289", "0.5660523", "0.5659853", "0.5647483", "0.5596252", "0.55584306", "0.55395204", "0.54828954", "0.54741496", "0.5466091", "0.5465969", "0.54648215", "0.54348487",...
0.7026784
0
Convenience method to get current UTC time in yyyymmddhhmm format
def getisotime(): ct = datetime.utcnow() return ct.strftime("%Y%m%d%H%M")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def utcTime():\r\n return calendar.timegm(time.gmtime())", "def utcnow():\n utctime = datetime.datetime.utcnow()\n utcstamp = utctime.strftime(\"%Y-%m-%d %H:%M:%S\")\n return utcstamp", "def currentUTC():\n return str(datetime.utcnow())", "def get_current_time():\n return time.strftime(\"%Y-%...
[ "0.78634745", "0.766886", "0.7544975", "0.7532391", "0.7506429", "0.7483729", "0.7478313", "0.74086046", "0.7278408", "0.72680515", "0.7243971", "0.7243337", "0.7239311", "0.7237997", "0.7236299", "0.7233931", "0.7227746", "0.72268265", "0.7208165", "0.7194701", "0.7160312", ...
0.0
-1
Remember the function to decorate. Raises TypeError if ``func`` is not a callable.
def decorate(self, func): if not callable(func): raise TypeError('Cannot decorate non callable object "{func}"' .format(func=func)) self.decorated = func return self
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def decorator(func):\n\n def wrapper():\n \"\"\"\n decorates the given function and makes it a lazy one.\n\n :returns: function result.\n \"\"\"\n\n result = caching_services.try_get('permanent', func, None)\n if result is not None:\n ...
[ "0.6893578", "0.6891319", "0.6861042", "0.6731581", "0.6710472", "0.6679485", "0.6539745", "0.6521934", "0.64404726", "0.6359263", "0.6318659", "0.63086843", "0.625213", "0.6235959", "0.62253344", "0.6219228", "0.62028694", "0.613898", "0.6126892", "0.61247325", "0.61014223",...
0.71824074
0
Generate file paths for configured input and output table files.
def _generate_file_paths(self): for table_name in self.tables: logger.info(f"Generating input and output paths for table '{table_name}'...") self.input_paths[table_name] = os.path.join(self.pipeline['input_dir'], f'{table_name}.xml') logger.info(f"Input path for table '{table...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def path_defs(self):\n if self.input_xml is not None:\n self.input_xml = os.path.abspath(os.path.expandvars(self.input_xml))\n if self.pointing_file is not None:\n self.pointing_file = os.path.abspath(os.path.expandvars(self.pointing_file))\n self.output_dir = os.path.abs...
[ "0.6394341", "0.6237562", "0.6136406", "0.6085505", "0.6024562", "0.6021732", "0.6017429", "0.58924437", "0.5836462", "0.5831578", "0.5771964", "0.5767702", "0.5754968", "0.57486475", "0.5721386", "0.57165265", "0.5708984", "0.5706032", "0.569472", "0.56780183", "0.5676826", ...
0.8811066
0
Renders the home page.
def home(request): assert isinstance(request, HttpRequest) return render( request, 'app/index.html', { 'title':'Home Page', 'year':datetime.now().year, } )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def render_home():\r\n\treturn render_template(\"index.html\")", "def home():\n\n return render_template('home_page.html')", "def home():\n\n return render_template(\"home.html\")", "def home():\n return render_template('home.html')", "def home():\n return render_template('home.html')", "def ...
[ "0.8557744", "0.8534662", "0.8352184", "0.82770634", "0.82770634", "0.82770634", "0.82770634", "0.82770634", "0.82770634", "0.82770634", "0.82770634", "0.82770634", "0.82770634", "0.82770634", "0.82770634", "0.82770634", "0.82770634", "0.82770634", "0.82770634", "0.8274435", ...
0.0
-1
Renders the about page.
def about(request): assert isinstance(request, HttpRequest) Description = models.AboutUs.objects.all() return render( request, 'app/about.html', { 'title':'About', 'message':'Your application description page.', 'year':datetime.now().year, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def about():\n return render_template('about.html', title='About')", "def about():\n\n return render_template('about_page.html', title='About')", "def about():\n\n\treturn render_template(\"about.html\")", "def on_about(self):\n render_about_window()", "def about():\n return render_temp...
[ "0.85650355", "0.85034525", "0.84489655", "0.84044397", "0.8394454", "0.82935613", "0.82709616", "0.82709616", "0.82709616", "0.82709616", "0.82709616", "0.82709616", "0.82709616", "0.82709616", "0.82709616", "0.82709616", "0.82709616", "0.82709616", "0.82709616", "0.82680845",...
0.71754843
99
Renders the Portfolio page.
def portfolio(request): assert isinstance(request, HttpRequest) category = request.GET.get('category') if category == None: Images = models.Photo.objects.all() else : Images = models.Photo.objects.filter(category__name__contains=category) Categories = models.Category.objects.a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def portfolio_detail():\n return render_template('portfolio/portfolio.html')", "def index():\n user_id = session[\"user_id\"]\n portfolio_table = port(user_id, db)\n \n if not isinstance(portfolio_table, dict): \n return apology(\"Error in portfolio\")\n \n return render_templa...
[ "0.77163917", "0.7363863", "0.72069246", "0.6958023", "0.6832886", "0.67240053", "0.6710301", "0.6444703", "0.6396421", "0.63873595", "0.63806105", "0.6337761", "0.6259254", "0.6257137", "0.62408847", "0.62389874", "0.6192785", "0.61823523", "0.61133915", "0.6037919", "0.5968...
0.5977893
20
Renders the Portfolio page.
def Drone(request): assert isinstance(request, HttpRequest) Videos= models.Video.objects.all() return render( request, 'app/Videos.html', { 'title':'Drone Videos', 'message':'Drone videos coming soon...', 'year':datetime.now().year, 'Vi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def portfolio_detail():\n return render_template('portfolio/portfolio.html')", "def index():\n user_id = session[\"user_id\"]\n portfolio_table = port(user_id, db)\n \n if not isinstance(portfolio_table, dict): \n return apology(\"Error in portfolio\")\n \n return render_templa...
[ "0.77163917", "0.7363863", "0.72069246", "0.6958023", "0.6832886", "0.67240053", "0.6710301", "0.6444703", "0.6396421", "0.63873595", "0.63806105", "0.6337761", "0.6259254", "0.6257137", "0.62408847", "0.62389874", "0.6192785", "0.61823523", "0.61133915", "0.6037919", "0.5977...
0.0
-1
Test column names list size mismatch exception
def test_set_col_names_exception(self): with self.assertRaises(ValueError) as ctx: self.dboard.set_col_names(["A", "B", "C"]) self.assertEqual("'names' list size does not match the number of columns allocated", str(ctx.exception))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _validate_columns(self, names):\n if not is_list_like(names):\n raise ValueError(\"Columns should be list-like\")\n\n if len(set(names)) != len(names):\n raise ValueError(\"Duplicate column names\")\n\n if self._data and len(names) != len(self._data[0]):\n ...
[ "0.748813", "0.7097434", "0.7041561", "0.7003699", "0.692872", "0.68954307", "0.6861895", "0.68537235", "0.6846043", "0.6786945", "0.67654634", "0.6758441", "0.6699675", "0.6676777", "0.66698", "0.66647196", "0.6621104", "0.6618466", "0.6615003", "0.6603763", "0.65971994", ...
0.79252064
0
Test row names unset exception
def test_get_row_index_not_set_exception(self): with self.assertRaises(DashboardError) as ctx: index = self.dboard._get_row_index("1") self.assertEqual("row names are not set", str(ctx.exception))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_row_names_exception(self):\n with self.assertRaises(ValueError) as ctx:\n self.dboard.set_row_names([\"1\", \"2\", \"3\"])\n\n self.assertEqual(\"'names' list size does not match the number of rows allocated\", str(ctx.exception))", "def test_set_row_names(self):\n se...
[ "0.6929206", "0.63284016", "0.62783545", "0.6209697", "0.6036684", "0.60327554", "0.5976182", "0.5943461", "0.5920874", "0.5913033", "0.59079605", "0.59009427", "0.58705515", "0.5863165", "0.5861898", "0.58584064", "0.58175254", "0.58060527", "0.57948923", "0.5786204", "0.578...
0.6248503
3
helper func to get difference between two dates in seconds
def datetime_difference(d1, d2): res = d1 - d2 return 86400 * res.days + res.seconds
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def seconds_elapsed(date1, date2):\n return (date1 - date2).total_seconds()", "def time_diff(dt1, dt2):\n return abs(int((dt2 - dt1).total_seconds()))", "def diff_secs(self, other):\n if not isinstance(other, datetime):\n types = (type(other), datetime)\n raise TypeError('Type mismatch: %s n...
[ "0.8079301", "0.7691208", "0.74970096", "0.72088784", "0.71840703", "0.7153568", "0.71158785", "0.71036726", "0.7028021", "0.6919312", "0.69073844", "0.6745594", "0.6660719", "0.6644333", "0.65803444", "0.65111434", "0.6479098", "0.6476214", "0.643871", "0.64266956", "0.64107...
0.7701068
1
Suggest insertion index for decorator deco_name in given decorator_list. ``decorator_list`` is the eponymous attribute of a ``FunctionDef`` or ``AsyncFunctionDef`` AST node.
def suggest_decorator_index(deco_name, decorator_list): if deco_name not in all_decorators: return None # unknown decorator, don't know where it should go # pragma: no cover names = [getname(tree) for tree in decorator_list] pri_by_name = {dname: pri for pri, dname in decorator_registry} # sa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _visit_decorators_and_check_asynq(self, decorator_list):\n async_kind = AsyncFunctionKind.non_async\n is_classmethod = False\n is_decorated_coroutine = False\n is_staticmethod = False\n decorators = []\n for decorator in decorator_list:\n # We have to descen...
[ "0.5119754", "0.48164266", "0.4687633", "0.46841127", "0.46616882", "0.4609195", "0.45475256", "0.45343086", "0.4498382", "0.44695872", "0.44673443", "0.44244447", "0.4405808", "0.43915933", "0.43014547", "0.4251116", "0.4221834", "0.41503158", "0.4108825", "0.40951174", "0.4...
0.85920507
0
Helper function that calculates the greatcircle distance between a pair of geographical coordinates.
def haversine(lat2, lon2): lat1 = 53.342998628 lon1 = -6.256165642 lon1, lat1, lon2, lat2 = map(np.radians, [lon1, lat1, lon2, lat2]) dlon = lon2 - lon1 dlat = lat2 - lat1 a = np.sin(dlat / 2.0) ** 2 + np.cos(lat1) * np.cos(lat2) * np.sin(dlon / 2.0) ** 2 c =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def great_circle(lat_1, long_1, lat_2, long_2):\n long_1 = m.radians(long_1)\n lat_1 = m.radians(lat_1)\n long_2 = m.radians(long_2)\n lat_2 = m.radians(lat_2)\n\n d = 2 * 6367.45 * m.asin(\n m.sqrt(haversine(lat_2 - lat_1)\n + m.cos(lat_1)*m.cos(lat_2) *\n haversine(long...
[ "0.7698843", "0.7670894", "0.7663812", "0.7450659", "0.7341956", "0.72380936", "0.7184047", "0.7110075", "0.71084076", "0.7070297", "0.70651877", "0.70595706", "0.7041652", "0.7013207", "0.70057976", "0.69816417", "0.6967899", "0.69389695", "0.6905809", "0.68702567", "0.68700...
0.0
-1
Sets the name of this OneOfFluidResultControlsFieldCalculations.
def name(self, name): if (self.local_vars_configuration.client_side_validation and name is not None and not re.search(r'^[A-Za-z()][-+0-9a-zA-Z_()\h]{0,199}$', name)): # noqa: E501 raise ValueError(r"Invalid value for `name`, must be a follow pattern or equal to `/^[A-Za-z()][-+0-9a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setResultsName(self, name, **kwargs):\n self.structure.set_name(name)\n return self", "def set_name(self, name):\n\t\tself.name_ = name", "def name(self, name):\n\n self._set_field(\"name\", name)", "def setName(self, name):\n self.name = str(name)", "def setname(self, name)...
[ "0.6671629", "0.64394647", "0.63775253", "0.62996197", "0.62967783", "0.6283429", "0.6283429", "0.6283429", "0.6283429", "0.62748736", "0.62723655", "0.62723655", "0.62723655", "0.62723655", "0.62723655", "0.6259594", "0.6258785", "0.6258785", "0.6254336", "0.6254336", "0.624...
0.0
-1
Sets the result_type of this OneOfFluidResultControlsFieldCalculations.
def result_type(self, result_type): self._result_type = result_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def result_value_type(self, result_value_type):\n if self.local_vars_configuration.client_side_validation and result_value_type is None: # noqa: E501\n raise ValueError(\"Invalid value for `result_value_type`, must not be `None`\") # noqa: E501\n allowed_values = [\"ResultValue\", \"Resu...
[ "0.71457607", "0.68649566", "0.5722179", "0.56241816", "0.55464923", "0.5516734", "0.5501502", "0.546909", "0.53389025", "0.53077453", "0.52951443", "0.528472", "0.52731913", "0.52565837", "0.52511317", "0.52511317", "0.5240739", "0.5195781", "0.5195781", "0.5192405", "0.5172...
0.7830995
0
Sets the age_of_fluid_diffusion of this OneOfFluidResultControlsFieldCalculations.
def age_of_fluid_diffusion(self, age_of_fluid_diffusion): self._age_of_fluid_diffusion = age_of_fluid_diffusion
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def age_diff(self, other):\n diff = self.age - other.age\n print(abs(diff), \"year difference\")", "def set_age(self, age):\n self.age = float(age)", "def diffusion_coefficient(self, diffusion_coefficient):\n\n self._diffusion_coefficient = diffusion_coefficient", "def set_age(sel...
[ "0.48859596", "0.48837823", "0.47994456", "0.46981585", "0.46847057", "0.46793416", "0.46793416", "0.46673048", "0.4632146", "0.45763713", "0.45697087", "0.45139056", "0.4511994", "0.449241", "0.44726565", "0.44583145", "0.4455418", "0.43976513", "0.4397241", "0.43824255", "0...
0.8776832
0
Sets the relative_humidity_factor of this OneOfFluidResultControlsFieldCalculations.
def relative_humidity_factor(self, relative_humidity_factor): if (self.local_vars_configuration.client_side_validation and relative_humidity_factor is not None and relative_humidity_factor > 100): # noqa: E501 raise ValueError("Invalid value for `relative_humidity_factor`, must be a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_iaq_relative_humidity(self, celsius: float, relative_humidity: float):\n numerator = ((relative_humidity / 100) * 6.112) * exp(\n (17.62 * celsius) / (243.12 + celsius)\n )\n denominator = 273.15 + celsius\n\n humidity_grams_pm3 = 216.7 * (numerator / denominator)\n ...
[ "0.66933274", "0.5505173", "0.53247386", "0.5118266", "0.48839277", "0.48403522", "0.4825612", "0.48253453", "0.47170526", "0.47062722", "0.4665921", "0.45898336", "0.4546112", "0.45316195", "0.45297918", "0.4520771", "0.44840032", "0.447919", "0.44566366", "0.4430926", "0.44...
0.81199014
0
Sets the compute_sensitivities_to of this OneOfFluidResultControlsFieldCalculations.
def compute_sensitivities_to(self, compute_sensitivities_to): allowed_values = ["MAXIMIZE_FORCE", "MINIMIZE_FORCE"] # noqa: E501 if self.local_vars_configuration.client_side_validation and compute_sensitivities_to not in allowed_values: # noqa: E501 raise ValueError( "Inval...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def localize_sensitivities(self, sensitivities):\n return sensitivities[:, self.p_external]", "def _compute_sensitivities(self, context):\n _logger.info(\"calling _compute_sensitivities.\")\n cached_id = np.random.randint(1000)\n if self.start_epoch == context.epoch_id:\n s...
[ "0.45638815", "0.4537992", "0.44791958", "0.44788453", "0.4291992", "0.42081547", "0.41325232", "0.41128126", "0.40917432", "0.4073942", "0.4053975", "0.40274498", "0.4005038", "0.39474058", "0.39318928", "0.3931033", "0.3889505", "0.38768148", "0.38752478", "0.38541502", "0....
0.8404953
0
Sets the reference_temperature_result_type of this OneOfFluidResultControlsFieldCalculations.
def reference_temperature_result_type(self, reference_temperature_result_type): self._reference_temperature_result_type = reference_temperature_result_type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def result_type(self, result_type):\n\n self._result_type = result_type", "def result_value_type(self, result_value_type):\n if self.local_vars_configuration.client_side_validation and result_value_type is None: # noqa: E501\n raise ValueError(\"Invalid value for `result_value_type`, mu...
[ "0.5650067", "0.5332816", "0.5179784", "0.50796247", "0.4701658", "0.46537855", "0.46107498", "0.45578787", "0.45249584", "0.44960314", "0.4470091", "0.44552487", "0.43907332", "0.4386981", "0.43760744", "0.43610713", "0.43390852", "0.43251908", "0.4323229", "0.426983", "0.42...
0.8612214
0
Sets the compute_nusselt_number of this OneOfFluidResultControlsFieldCalculations.
def compute_nusselt_number(self, compute_nusselt_number): self._compute_nusselt_number = compute_nusselt_number
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_necrosis_count(self, number):\n\n print(\"controller - update_necrosis_count!\")\n self.view.processing_gui.update_necrosis_count(number)", "def set_n(self, n: int) -> None:\r\n self.n_is_set = True\r\n self.n = n", "def set_NE(self, value):\n super(DescribeEvaluat...
[ "0.56177396", "0.5561527", "0.5431257", "0.53008974", "0.5250179", "0.5211884", "0.5195109", "0.5132575", "0.5132047", "0.5092769", "0.50700563", "0.5050393", "0.5045502", "0.5039565", "0.50249183", "0.5022767", "0.50182855", "0.4943815", "0.4943049", "0.49277005", "0.4924356...
0.8331745
0
Sets the reference_nusselt_number_length of this OneOfFluidResultControlsFieldCalculations.
def reference_nusselt_number_length(self, reference_nusselt_number_length): self._reference_nusselt_number_length = reference_nusselt_number_length
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_document_reference_number(self, reference_number):\n self.set_value_into_input_field(self.reference_number_text_field_locator, reference_number)", "def reference_number(self, reference_number):\n\n self._reference_number = reference_number", "def reference(self, reference):\n if re...
[ "0.57414216", "0.5508016", "0.53464097", "0.5167126", "0.5142256", "0.49401107", "0.4882175", "0.48792094", "0.48648196", "0.4861623", "0.48475558", "0.47742194", "0.47560316", "0.47484943", "0.47466946", "0.4700384", "0.46898222", "0.46772367", "0.46453333", "0.46398222", "0...
0.8505514
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, OneOfFluidResultControlsFieldCalculations): return False return self.to_dict() == other.to_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.80891633", "0.80891633", "0.8055254", "0.7983334", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", "0.7967544", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): if not isinstance(other, OneOfFluidResultControlsFieldCalculations): return True return self.to_dict() != other.to_dict()
{ "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.8456063", "0.83918154", "0.8144437", "0.8140196", "0.8132038", "0.8093834", "0.80918837", "0.80918837", "0.80918837", "0.80852824", "0.80852824", "0.807626", "0.807626", "0.80657643", "0.8042481", "0.8042481", "0.8042481", "0.8042481", "0.8042481", "0.8042481", "0.8042481"...
0.0
-1
given a string URL, return its normalized/unicode form
def norm(url): url = _unicode(url) # operate on unicode strings url_tuple = urlparse(url) normalized_tuple = norm_tuple(*url_tuple) return urlunparse(normalized_tuple).replace(' ','%20')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalize_for_url(text: str) -> str:\n\n # German is our main language, so we are extra considerate about it\n # (unidecode turns ü into u)\n text = text.replace(\"ü\", \"ue\")\n text = text.replace(\"ä\", \"ae\")\n text = text.replace(\"ö\", \"oe\")\n clean = _unwanted_url_chars.sub('-', uni...
[ "0.73168033", "0.7136285", "0.6941001", "0.6931672", "0.6924527", "0.6889752", "0.6874369", "0.6816762", "0.6758843", "0.67231375", "0.66693336", "0.66297746", "0.65911394", "0.65095913", "0.64242226", "0.64219373", "0.64195615", "0.64188385", "0.640887", "0.6408458", "0.6405...
0.77289164
0
given individual url components, return its normalized form
def norm_tuple(scheme, authority, path, parameters, query, fragment): scheme = lower(scheme) if not scheme: raise InvalidUrl('missing URL scheme') authority = norm_netloc(scheme, authority) if not authority: raise InvalidUrl('missing netloc') path = norm_path(scheme, path) # TODO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalize_url(self, url):\n pass", "def norm(url):\n url = _unicode(url) # operate on unicode strings\n url_tuple = urlparse(url)\n normalized_tuple = norm_tuple(*url_tuple)\n return urlunparse(normalized_tuple).replace(' ','%20')", "def normalize(cls, url):\n # Always ignore the ...
[ "0.73723054", "0.7322919", "0.7196781", "0.71182257", "0.7067345", "0.7050196", "0.68991303", "0.6898185", "0.6863628", "0.68005294", "0.6794585", "0.66582257", "0.6652341", "0.6620551", "0.6498704", "0.6479304", "0.64688075", "0.64359796", "0.643411", "0.64294314", "0.641449...
0.0
-1
Given a binary string and a mask dictionary, apply the mask to the binary.
def apply_mask(binary, mask_dict): result = "" for i, val in enumerate(binary): if mask_dict[i] in ('X', '1'): result += mask_dict[i] else: result += binary[i] return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def apply_mask_v2(binmask, memaddress):\n binrep_masked = ''\n binrep = num2binrep(memaddress)\n for bit, m in zip(binrep, binmask):\n if m == '1':\n binrep_masked += '1'\n elif m == 'X':\n binrep_masked += 'X'\n elif m == '0':\n binrep_masked += bit\n...
[ "0.69420123", "0.6901822", "0.6846594", "0.6670075", "0.62167275", "0.5988227", "0.5975552", "0.59093916", "0.5729339", "0.5657425", "0.5652682", "0.5648805", "0.5546163", "0.55261225", "0.5514006", "0.5490724", "0.54546344", "0.5366755", "0.53645164", "0.53401786", "0.533942...
0.8211301
0
Returns a list of (start_row, end_row, indent) tuples that denote fold locations. Basically anywhere that there's an indent.
def find_fold_points(block): token_whitelist = (tokenize.NL, tokenize.NEWLINE, tokenize.INDENT, tokenize.DEDENT, tokenize.COMMENT, ) # temporary code that allows for running a block or a f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getStartSpots(self):\n spots = []\n if self.index == 0:\n startRow = 1\n endRow = 4\n if self.index == 1:\n startRow = 6\n endRow = 9\n for row in range(startRow, endRow):\n for col in range(1,9):\n spots += [(col...
[ "0.56887203", "0.55070126", "0.54346144", "0.54225534", "0.53652674", "0.5287475", "0.52789724", "0.5240929", "0.5226074", "0.5221965", "0.5214136", "0.5212514", "0.5164901", "0.51648575", "0.51308566", "0.5129636", "0.51209664", "0.5100359", "0.5100359", "0.5088632", "0.5086...
0.6397099
0
The final dense/fully connected layer. Flattens the input, calculates a dense layer with relu activation, and calculates a softmax.
def dense_layer(self, img, weights, bias): # 1: Flattening step img_w, img_h, img_c = img.shape flat = img.reshape((img_w * img_h * img_c, 1)) # 2: dense/relu layer z = (weights[0].dot(flat) + bias[0]) / (weights[0][0].shape[0] + 1) z[z <= 0] = 0 # ReLU output =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fully_connected(self, input_layer, num_outputs, activation=None):\n num_inputs = input_layer.get_shape().as_list()[1]\n kernel_size = [num_inputs, num_outputs]\n with tf.variable_scope(self._count_layer('fully_connected')):\n kernel = self._get_variable('weights', kernel_size,\n...
[ "0.70349437", "0.694018", "0.6913666", "0.6757658", "0.67225885", "0.66238666", "0.655353", "0.65448785", "0.6514575", "0.6512477", "0.6505568", "0.6505281", "0.65028316", "0.64960945", "0.64866436", "0.6467944", "0.64588326", "0.6445641", "0.6424838", "0.6397823", "0.6387207...
0.7179032
0
Calculates a categorical crossentropy.
def categorical_crossentropy(self, y_hat, y): y_hat[y_hat == 0] = 10 ** -10 return -np.sum(y * np.log(y_hat))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def categorical_crossentropy(predictions, targets):\n return theano.tensor.nnet.categorical_crossentropy(predictions, targets)", "def categorical_crossentropy(predictions, targets):\n return theano.tensor.nnet.categorical_crossentropy(predictions, targets)", "def cross_entropy(\n **kwargs\n) -> Ca...
[ "0.81930006", "0.81930006", "0.81714183", "0.79045933", "0.76871896", "0.75537086", "0.7330956", "0.73071635", "0.7303161", "0.71937865", "0.71747774", "0.71682596", "0.7149895", "0.7148791", "0.71252066", "0.7084315", "0.7068743", "0.70625436", "0.7039654", "0.70191294", "0....
0.7524986
6
Initializes the weights of the layers
def layer_weight_init(self, size): # TODO: make smarter init return np.random.uniform(size=size)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initialize_weights(self):\n weights_initializer.WeightsInitializer.initialize_layer_or_model(\n self._batch)", "def init_weight(self):\n init_layer(self.conv1)\n init_layer(self.conv2)\n init_bn(self.norm1)\n init_bn(self.norm2)", "def initialize_weights(self):\n fo...
[ "0.8738031", "0.8723581", "0.8684139", "0.8514848", "0.8495031", "0.8471257", "0.8352827", "0.82469743", "0.8167781", "0.81322646", "0.81322163", "0.80618054", "0.80618054", "0.80618054", "0.8043467", "0.80395854", "0.8032377", "0.8023287", "0.8023287", "0.8023287", "0.801692...
0.0
-1
Test the OGXB homepage.
def test_index(self): result = self.client.get('/') self.assertEqual(result.status, '200 OK') self.assertIn(b'Game', result.data)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_homepage(self):\n rv = self.app.get('/')\n assert 'Enter your url here' in rv.data", "def test_home(self):\n self.selenium.get('{}/'.format(self.live_server_url))", "def test_home_page(self):\n\n self.browser.get('http://localhost:8000/index.html')\n\n # there is a p...
[ "0.76347536", "0.7544102", "0.7424962", "0.7417333", "0.738454", "0.7379109", "0.7344799", "0.73371685", "0.7325164", "0.73204124", "0.73004216", "0.73004216", "0.72716224", "0.7257802", "0.71452856", "0.71287614", "0.71247417", "0.7014481", "0.6902986", "0.6900414", "0.68980...
0.0
-1
Should raise Assertion error after failing to open the project.
def test_open_project_fails(self): with patch('cauldron.steptest.support.open_project') as open_project: open_project.side_effect = RuntimeError('FAKE') with self.assertRaises(AssertionError): self.open_project()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _assert(ok, detail):\n\n if not ok:\n raise UserException(\"the project file is invalid\", detail)", "def test_no_such_project(self):\n project = cd.project.get_internal_project()\n cd.project.load(None)\n\n with self.assertRaises(Exception):\n self.run_step('FAKE')\...
[ "0.7184313", "0.68354416", "0.67589736", "0.67013544", "0.66985357", "0.668354", "0.66583335", "0.6623701", "0.66001916", "0.6506534", "0.64775646", "0.64689827", "0.6456676", "0.6456676", "0.6456676", "0.64543563", "0.6437508", "0.63821363", "0.63788325", "0.6371782", "0.636...
0.7996178
0
Add or remove rows to/from a table according to the prescribed growth rate for this model.
def transition(self, data, year): if self.accounting_column is None: nrows = int(round(len(data) * self.growth_rate)) else: nrows = int(round(data[self.accounting_column].sum() * self.growth_rate)) with log_start_finish( 'adding {} rows via growth rate ({}...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_rows(self):\n for row in self.rows:\n self.table.add_row(row)", "def addEntryToTable(self):\n self.table_view.table_model.insertRows(0, 1)", "def _update_cust_table(self, add, i, pred):\n self.cust_table.set_value(add, 'period{}_forc_shrink_value_per_day_per_item'.format...
[ "0.59543324", "0.5870212", "0.5851199", "0.5700913", "0.56099516", "0.5569551", "0.5550192", "0.5536234", "0.5315424", "0.5291193", "0.52870643", "0.52800435", "0.5176341", "0.51452804", "0.5118861", "0.51136494", "0.51136494", "0.50464267", "0.50421035", "0.50389504", "0.503...
0.62674284
0
compressed_issues is a list of issues, but stripped down to just the information relevant to display them. Search through that list and remove the issue that has the same key as the one given, if one exists.
def removeCompressedIssueIfPresent(issue, compressed_issues): for i in compressed_issues: if i['id'] == issue.key: compressed_issues.remove(i) return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cleanIssues(issues):\n response = []\n for issue in issues:\n response.append({\"title\": issue[\"title\"], \"body\": issue[\"body\"]})\n return response", "def cleanup_dict_infos(self, list_del_sha1s):\n for sha1 in list_del_sha1s:\n try:\n del self.dict_sha1_infos[str(sha1)]\...
[ "0.5928324", "0.56914544", "0.5603379", "0.52747154", "0.523962", "0.5232505", "0.5203311", "0.5133627", "0.507468", "0.49969307", "0.49756053", "0.49149793", "0.4900445", "0.4870276", "0.48685318", "0.48381662", "0.48151287", "0.47915512", "0.4786567", "0.47820655", "0.47472...
0.8135962
0
Twelve months are remapped (averaged) into four representative months
def test_remap_coefficients(self, months, remap_months): adaptor = IntervalAdaptor("test-month-remap") from_spec = Spec( name="test-var", dtype="float", dims=["months"], coords={"months": months} ) adaptor.add_input(from_spec) to_spec = Spec( name="test-va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_months(self, cr, uid, context):\n months=[(str(n),str(n)) for n in range(1,13)]\n return months", "def month(self):\n return 0", "def month(self):\n return 0", "def test_resample_mapped_months_to_months(self, months, remap_months):\n register = NDimensionalRegister()...
[ "0.6534512", "0.621023", "0.621023", "0.6156306", "0.6137878", "0.6072088", "0.60602266", "0.5996288", "0.59737104", "0.5966072", "0.5960885", "0.5929629", "0.5928573", "0.59141344", "0.59138185", "0.5895654", "0.58870685", "0.58551115", "0.58479095", "0.58451617", "0.5839592...
0.0
-1
Returns True if the database contains a table with the given name.
def table_exist(self, name): sql = """ SELECT table_name FROM information_schema.tables WHERE table_schema = '{}' AND table_name = '{}'""".format(self.db, name) try: self.cursor.execute(sql) result = self.cursor.fetchone() if result: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_table(self, name: str) -> bool:\n try:\n self.execute(\"select * from {table} limit 1\", name)\n return True\n except sqlite3.OperationalError:\n return False", "def table_exists(self, table_name):\n\t\tif self.__dbfile is None:\n\t\t\treturn False\n\n\t\tcu...
[ "0.88124794", "0.87079996", "0.8435672", "0.84342164", "0.8352136", "0.83260274", "0.83111084", "0.82594836", "0.8169692", "0.8167576", "0.80775243", "0.8076127", "0.8069364", "0.80447614", "0.79407847", "0.79262453", "0.79115665", "0.7906786", "0.7877831", "0.7822014", "0.78...
0.839313
4
Get a command line parser.
def get_parser(): parser = libdot.ArgumentParser(description=__doc__) parser.add_argument('paths', nargs='+', help='Image files or directories to crush.') return parser
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_parser():\n\n parser = parser.ArgumentParser()\n return parser", "def get_parser(self):\n parser = ArgumentParser()\n parser.add_argument(\n \"-c\", default='', dest='cmd',\n help=(\"just like python -c or sh -c (pass in a command)\"))\n parser.add...
[ "0.85478896", "0.77850306", "0.7679999", "0.76531893", "0.7475671", "0.7475671", "0.746597", "0.74282885", "0.74282354", "0.74103934", "0.73460567", "0.73315305", "0.72972935", "0.7244798", "0.72251326", "0.7224408", "0.722186", "0.72033733", "0.7202008", "0.719787", "0.71916...
0.6936723
33
Constructor to prepare API connection.
def __init__(self, api_key, client=Fetcher(FANART_URL)): self.api_key = api_key self.client = client
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n super().__init__()\n self._api_url = API_BASE_URL\n self._api_params = API_BASE_PARAMS.copy()", "def __init__(self, api_key=None, api_secret=None):\n\n self.session = requests.session()\n headers = {'Accept': 'application/json', 'User-Agent': 'binance/python'}\n\n...
[ "0.77396744", "0.7595165", "0.75662524", "0.74698067", "0.74052596", "0.73577577", "0.7319089", "0.729314", "0.72799826", "0.72796863", "0.7254166", "0.7249879", "0.7218785", "0.72153294", "0.7206745", "0.71909577", "0.7175214", "0.7169476", "0.7145732", "0.7134477", "0.71179...
0.69705606
35
Fetches a random clause if clause_id is not provided, otherwise fetches the corresponding clause.
def get_clause(self, clause_letter, clause_id = None): clause_type = {"A":"subject", "B":"predicate", "C":"outcome"}[clause_letter] if not clause_id: clause_id = get_random_id(self.soup, clause_type) clause_text = self.soup.find(clause_type, number=clause_id).description.text ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_by_id(cls, name):\n\t\treturn super(Clause, cls).get_by_id(cls.normalize_name(name))", "def _clause_query(self, structure, clause : Sentence, contexts, engine):\n logging.debug(\"Testing Clause: {}\".format(repr(clause)))\n\n clause = self._start_word_semantics(structure, contexts, clause)\...
[ "0.60154957", "0.48132682", "0.47962016", "0.4780053", "0.46821973", "0.46214458", "0.46161616", "0.45999226", "0.45995572", "0.45859358", "0.4572206", "0.4544576", "0.45406446", "0.45266137", "0.448437", "0.44742808", "0.4469923", "0.44341117", "0.44309717", "0.44247547", "0...
0.6980749
0
Fetches a random carryon (dircetion = +) or a random leadup (dircetion = ). The optional choose argument forces which carryon/leadup to get. This is a generator that yield conflicts one by one, as some carryon/leadups consist of more than one conflict.
def generate_next(self, direction ="+", choose= None): import random if direction == "+": links = self.links_f elif direction == "-": links = self.links_b else: raise ValueError("Undefined direction argument") if len(links.link) == 0: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def com_pick_normal(self):\n global num_dots\n # Because the computer decision making is based on code alone, it will be\n # more complex than the user's.\n a = (num_dots - 1)\n b = (num_dots - 2)\n c = (num_dots - 3)\n d = (num_dots - 4)\n # It is the comput...
[ "0.55544925", "0.5463966", "0.5431445", "0.53285843", "0.5324812", "0.5318963", "0.5267297", "0.52581954", "0.52472216", "0.5215928", "0.52149457", "0.52056396", "0.52020866", "0.51932526", "0.5186982", "0.5169431", "0.5157991", "0.5152152", "0.5140235", "0.5136387", "0.51195...
0.67907006
0
Return whether this stack contains no items. >>> s = Stack() >>> s.is_empty() True >>> s.push('hello') >>> s.is_empty() False
def is_empty(self) -> bool: return len(self._items) == 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_empty(self): #checks to see if stack is empty or not\n if self.num_items == 0:\n return True\n else:\n return False", "def is_empty(self):\n return self._stack_items == []", "def is_empty(self):\n return len(self.the_stack) == 0", "def i...
[ "0.8721869", "0.86406344", "0.8567535", "0.84289664", "0.8358576", "0.8349384", "0.83198047", "0.8240932", "0.8209109", "0.81546515", "0.81546515", "0.81051683", "0.8102384", "0.81005496", "0.8091995", "0.80657357", "0.80584216", "0.8047883", "0.8045528", "0.8035207", "0.8026...
0.8062829
16
Add a new element to the top of this stack.
def push(self, item: Any) -> None: self._items.append(item)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def push(self, element):\n self.the_stack.append(element)", "def push(self, new_element):\n self.ll.insert_first(new_element)", "def push(self, op):\n self.top += 1\n self.stack.append(op)", "def push(self, item):\r\n self.stack.insert(0, item)", "def push(self, elem):\n ...
[ "0.7795522", "0.72629446", "0.72370446", "0.7226988", "0.7199398", "0.7125915", "0.7125915", "0.7125915", "0.71146506", "0.7055988", "0.703948", "0.7038767", "0.69869816", "0.6954181", "0.6954181", "0.69469106", "0.693951", "0.6915541", "0.691189", "0.6902007", "0.6898625", ...
0.0
-1
Get longest 1s sequence of input value with flip each bit
def longest_seq(n): max_seq = 0 for i in range(SEQ_LENGTH): max_seq = max(max_seq, longest_seq_of_1s(n, i)) return max_seq
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def flipBits(x):\n lastZeros = 0\n while x%2 == 0 and x: #remove last zeros\n lastZeros += 1\n x >>=1\n if not x: #only 0s\n return 1\n prevLength, res, currLength = 0, 0, 0\n while x & 1 :\n prevLength += 1\n x >>= 1\n if not x: #only 1s\n return prevLen...
[ "0.70132214", "0.67310596", "0.67078215", "0.66327786", "0.65524876", "0.6487207", "0.64595675", "0.63146794", "0.62952125", "0.6293493", "0.626424", "0.6251499", "0.6226399", "0.6203193", "0.6192514", "0.61597425", "0.6119437", "0.60940146", "0.608897", "0.6054282", "0.60450...
0.0
-1
Yield successive nsized chunks from l.
def chunks(l, n): for i in range(0, len(l), n): yield l[i:i + n]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _chunk(self, l, n):\n for i in range(0, len(l) + 1, n):\n yield l[i:i + n]", "def chunks(self, l, n):\n for i in range(0, len(l), n):\n yield l[i:i + n]", "def __chunks(l, n):\n for i in range(0, len(l), n):\n yield l[i:i + n]", "def get_chunks(self, ...
[ "0.8040086", "0.79256725", "0.7923959", "0.78855336", "0.78781366", "0.7816429", "0.7766289", "0.7756418", "0.7744994", "0.77324396", "0.77295053", "0.77257586", "0.77034765", "0.7690202", "0.7690202", "0.7664886", "0.7657751", "0.7656609", "0.7656609", "0.7646568", "0.764656...
0.74497783
62
Optionally restricts the returned purchases to a given user, by filtering against a `username` query parameter in the URL.
def get_queryset(self): queryset = Cliente.objects.all() id = self.request.query_params.get('id') cedula = self.request.query_params.get('cedula') if id is not None: queryset = queryset.filter(id=id) return queryset if cedula is not None: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_queryset(self):\n username = self.kwargs.get('username', None)\n filters = {}\n if username:\n filters['user__username'] = username\n return super(PhotosListView, self).get_queryset().filter(**filters)", "def filter_queryset(self, request, queryset, view):\n ...
[ "0.59675545", "0.5965039", "0.59329563", "0.591112", "0.5906636", "0.56630075", "0.5653514", "0.55474776", "0.5540568", "0.55116814", "0.5503135", "0.549428", "0.5486801", "0.54832596", "0.5472476", "0.5471063", "0.5450648", "0.541672", "0.54061854", "0.5381719", "0.53731793"...
0.0
-1
Optionally restricts the returned purchases to a given user, by filtering against a `username` query parameter in the URL.
def get_queryset(self): queryset = Producto.objects.all() nombre = self.request.query_params.get('nombre') print(nombre) if nombre is not None: queryset = queryset.filter(nombre__icontains=nombre) return queryset return queryset
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_queryset(self):\n username = self.kwargs.get('username', None)\n filters = {}\n if username:\n filters['user__username'] = username\n return super(PhotosListView, self).get_queryset().filter(**filters)", "def filter_queryset(self, request, queryset, view):\n ...
[ "0.5968108", "0.59659094", "0.59338", "0.59118384", "0.5908102", "0.56630045", "0.56534576", "0.554612", "0.5540686", "0.5510677", "0.5504299", "0.54937184", "0.54871666", "0.5482915", "0.54725003", "0.5471175", "0.545114", "0.5415667", "0.5406434", "0.53824294", "0.53717166"...
0.0
-1
Optionally restricts the returned purchases to a given user, by filtering against a `username` query parameter in the URL.
def get_queryset(self): queryset = Venta.objects.all() n_venta = self.request.query_params.get('n_venta') if n_venta is not None: queryset = queryset.filter(n_venta=n_venta) return queryset return queryset
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_queryset(self):\n username = self.kwargs.get('username', None)\n filters = {}\n if username:\n filters['user__username'] = username\n return super(PhotosListView, self).get_queryset().filter(**filters)", "def filter_queryset(self, request, queryset, view):\n ...
[ "0.59699035", "0.59665763", "0.59351", "0.59134907", "0.5907972", "0.56645304", "0.56552756", "0.5547018", "0.5542082", "0.55114317", "0.5501799", "0.5495832", "0.5489346", "0.54839647", "0.54715014", "0.5471053", "0.5451177", "0.54174745", "0.5407697", "0.5383397", "0.537290...
0.0
-1
Optionally restricts the returned purchases to a given user, by filtering against a `username` query parameter in the URL.
def get_queryset(self): queryset = DetalleVenta.objects.all() fk_venta = self.request.query_params.get('fk_venta') if fk_venta is not None: queryset = queryset.filter(fk_venta=fk_venta) return queryset return queryset
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_queryset(self):\n username = self.kwargs.get('username', None)\n filters = {}\n if username:\n filters['user__username'] = username\n return super(PhotosListView, self).get_queryset().filter(**filters)", "def filter_queryset(self, request, queryset, view):\n ...
[ "0.5968246", "0.59660697", "0.5933852", "0.59120125", "0.5905824", "0.5664086", "0.5653617", "0.5545852", "0.5541743", "0.5511397", "0.5503343", "0.5495237", "0.54874337", "0.5483638", "0.5472281", "0.5471483", "0.5451547", "0.5416162", "0.5407321", "0.5380891", "0.53716034",...
0.0
-1
Optionally restricts the returned purchases to a given user, by filtering against a `username` query parameter in the URL.
def get_queryset(self): queryset = DetalleVenta.objects.all() fk_venta = self.request.query_params.get('fk_venta') if fk_venta is not None: queryset = queryset.filter(fk_venta=fk_venta) return queryset return queryset
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_queryset(self):\n username = self.kwargs.get('username', None)\n filters = {}\n if username:\n filters['user__username'] = username\n return super(PhotosListView, self).get_queryset().filter(**filters)", "def filter_queryset(self, request, queryset, view):\n ...
[ "0.59675545", "0.5965039", "0.59329563", "0.591112", "0.5906636", "0.56630075", "0.5653514", "0.55474776", "0.5540568", "0.55116814", "0.5503135", "0.549428", "0.5486801", "0.54832596", "0.5472476", "0.5471063", "0.5450648", "0.541672", "0.54061854", "0.5381719", "0.53731793"...
0.0
-1
Returns a list of prime number less than or equal to the given number 'n'
def generate_prime_less_than_n(n): if n <= 1: return [] list_of_primes = [2] for i in range(3, n, 2): is_prime = True for j in list_of_primes: if i%j == 0: is_prime = False break if is_prime: list_of_primes.append(i) return list_of_primes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_primes(n):\n primeList = []\n for i in range(n):\n if is_prime(i):\n primeList.append(i)\n return primeList", "def primes_less(n):\n test_nums = list(range(3, int(floor(sqrt(n))), 2))\n prime_flags = [True] * ((n - 2) // 2)\n for a in test_nums:\n next_div = a**2\n whil...
[ "0.847243", "0.8429201", "0.8423028", "0.8253207", "0.8227135", "0.82095414", "0.80518067", "0.80211437", "0.8001455", "0.79861915", "0.7967432", "0.79163927", "0.79094094", "0.7903886", "0.7885929", "0.78649974", "0.78557867", "0.7823906", "0.7822633", "0.7822186", "0.782137...
0.8506523
0
Prepares the test fixture before each test method is called.
def setUp(self): return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _fixture_setup(self):\n pass", "def setUpFixture(self):\n pass", "def setUp(self):\n self.dataset = get_test_dataset()", "def setUp(self):\n super(TestCase, self).setUp()\n # Change the default directory that the tempfile\n # module places temporary files and dir...
[ "0.7592348", "0.7381866", "0.7099172", "0.69481707", "0.69481707", "0.69362855", "0.68939835", "0.6884558", "0.68642", "0.6837688", "0.68177116", "0.67925274", "0.6778029", "0.6775666", "0.67700386", "0.6727651", "0.67172766", "0.67049044", "0.6687046", "0.66869044", "0.66757...
0.66596514
24
Compute dual of a point
def compute_dual_line(P): return Line(P.x, -P.y)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def d2(x0,y0,x1,y1):\n return (x0-x1)*(x0-x1) + (y0-y1)*(y0-y1)", "def eDouble(P): #adding P + P by using a tangent line\r\n R = point(0, 0, P.c)\r\n i = ( (3 * P.x ** 2) + P.c.a) #the slope equation (i/j)\r\n j = (2 * P.y)\r\n s = (i * modInv(j, P.c.p) ) % P.c.p\...
[ "0.67110425", "0.67071027", "0.6491836", "0.6395366", "0.6242045", "0.6226883", "0.61723244", "0.60957676", "0.60613114", "0.6056031", "0.60181284", "0.60000265", "0.597179", "0.59556603", "0.5954467", "0.5891816", "0.58701", "0.5846944", "0.581005", "0.5806165", "0.5802982",...
0.661317
2
returns the crossproduct of two 3vectors
def cross(a, b): c1 = a[1]*b[2] - a[2]*b[1] c2 = a[2]*b[0] - a[0]*b[2] c3 = a[0]*b[1] - a[1]*b[0] return sp.array([c1,c2,c3])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cross_product(v1, v2):\n return cg3d_vector.CG3dVector(\n v1[1] * v2[2] - v2[1] * v1[2],\n v1[2] * v2[0] - v2[2] * v1[0],\n v1[0] * v2[1] - v2[0] * v1[1]\n )", "def crossProduct(p1, p2, p3):\n return (\n -(p1[1]*p2[0]) + p1[0]*p2[1] +\n p1[1]*p3[0] - p2...
[ "0.84502965", "0.81323415", "0.80305284", "0.80217886", "0.8014611", "0.79637253", "0.7955808", "0.7948951", "0.7942795", "0.7931019", "0.7878767", "0.78346014", "0.78029263", "0.77601814", "0.77572405", "0.77122545", "0.76691836", "0.7585817", "0.7578047", "0.7487682", "0.73...
0.80275923
3
returns the dot product of two 3vectors
def dot(a, b): return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dotproduct(vec1, vec2):\n return sum((a*b) for a, b in zip(vec1, vec2))", "def dotproduct(first, other):\n if isinstance(first,FreeCAD.Vector) and isinstance(other,FreeCAD.Vector):\n return (first.x*other.x + first.y*other.y + first.z*other.z)", "def vector_dot(v1,v2):\n return (v1.x * v2.x...
[ "0.8241671", "0.8210472", "0.8185444", "0.81487113", "0.8121103", "0.80768824", "0.8049511", "0.803932", "0.8011135", "0.79798156", "0.7977912", "0.79358697", "0.7925288", "0.7920181", "0.79008067", "0.7894965", "0.7877759", "0.7866867", "0.7838292", "0.778045", "0.7716787", ...
0.7842288
18
Return the name of the InputItem.
def name(self): return self.key
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_item_name(self):\n return self.__item_name", "def name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"name\")", "def name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"name\")", "def name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"name\")", ...
[ "0.7797194", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "0.7607627", "...
0.0
-1
Return the widget's value.
def value(self): return str(self.input.text())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_value(self):\n if self.notebook:\n return self.widget.value\n else:\n if hasattr(self.widget, \"value\"):\n return self.widget.value()\n elif hasattr(self.widget, \"currentText\"):\n return self.widget.currentText()\n e...
[ "0.86192983", "0.7837043", "0.78089726", "0.7701881", "0.7701881", "0.7701881", "0.7695642", "0.764018", "0.7638825", "0.7638825", "0.7597688", "0.7591426", "0.75806963", "0.7574966", "0.7552569", "0.7552569", "0.7552569", "0.7529296", "0.7516486", "0.75080454", "0.74951786",...
0.7282812
36
Change the widget's value.
def setValue(self,val): self.input.setText(str(val))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setValue(self, value):\n self.setText(str(value))", "def change_value(self,val):\n self.val = val", "def set_value(self, value):\n if self.notebook:\n self.widget.value = value\n else:\n if hasattr(self.widget, \"setValue\"):\n self.widge...
[ "0.81650984", "0.81335413", "0.8046718", "0.7894542", "0.789224", "0.7573783", "0.7570143", "0.75580525", "0.75474405", "0.7512271", "0.74522203", "0.7410017", "0.73818564", "0.73771447", "0.7359452", "0.7359452", "0.7359452", "0.73161274", "0.72585565", "0.72566986", "0.7226...
0.80233526
3
Return the widget's value.
def value(self): return self._value_
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_value(self):\n if self.notebook:\n return self.widget.value\n else:\n if hasattr(self.widget, \"value\"):\n return self.widget.value()\n elif hasattr(self.widget, \"currentText\"):\n return self.widget.currentText()\n e...
[ "0.8619286", "0.7838884", "0.7805611", "0.7696525", "0.7696525", "0.7696525", "0.76916736", "0.7636346", "0.7633243", "0.7633243", "0.7592193", "0.7586152", "0.7577611", "0.7571931", "0.7547001", "0.7547001", "0.7547001", "0.75265634", "0.7511581", "0.75024223", "0.74897397",...
0.71861374
74
Change the widget's value.
def setValue(self,val): val = str(val) if self._plain: self.input.setText(val) else: updateText(self.input,val)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setValue(self, value):\n self.setText(str(value))", "def change_value(self,val):\n self.val = val", "def set_value(self, value):\n if self.notebook:\n self.widget.value = value\n else:\n if hasattr(self.widget, \"setValue\"):\n self.widge...
[ "0.81650984", "0.81335413", "0.8046718", "0.80233526", "0.7894542", "0.789224", "0.7573783", "0.7570143", "0.75580525", "0.7512271", "0.74522203", "0.7410017", "0.73818564", "0.73771447", "0.7359452", "0.7359452", "0.7359452", "0.73161274", "0.72585565", "0.72566986", "0.7226...
0.75474405
9
Return the widget's value.
def value(self): s = str(self.input.text()) if self._is_string_: return s else: return eval(s)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_value(self):\n if self.notebook:\n return self.widget.value\n else:\n if hasattr(self.widget, \"value\"):\n return self.widget.value()\n elif hasattr(self.widget, \"currentText\"):\n return self.widget.currentText()\n e...
[ "0.86192983", "0.7837043", "0.78089726", "0.7701881", "0.7701881", "0.7701881", "0.7695642", "0.764018", "0.7638825", "0.7638825", "0.7597688", "0.7591426", "0.75806963", "0.7574966", "0.7552569", "0.7552569", "0.7552569", "0.7529296", "0.7516486", "0.75080454", "0.74951786",...
0.0
-1
Return the widget's value.
def value(self): s = str(self.input.toPlainText()) if self._is_string_: return s else: return eval(s)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_value(self):\n if self.notebook:\n return self.widget.value\n else:\n if hasattr(self.widget, \"value\"):\n return self.widget.value()\n elif hasattr(self.widget, \"currentText\"):\n return self.widget.currentText()\n e...
[ "0.8619286", "0.7838884", "0.7805611", "0.7696525", "0.7696525", "0.7696525", "0.76916736", "0.7636346", "0.7633243", "0.7633243", "0.7592193", "0.7586152", "0.7577611", "0.7571931", "0.7547001", "0.7547001", "0.7547001", "0.75265634", "0.7511581", "0.75024223", "0.74897397",...
0.0
-1
Change the widget's value.
def setValue(self,val): if self._plain: self.input.setPlainText(str(val)) else: updateText(self.input,str(val))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setValue(self, value):\n self.setText(str(value))", "def change_value(self,val):\n self.val = val", "def set_value(self, value):\n if self.notebook:\n self.widget.value = value\n else:\n if hasattr(self.widget, \"setValue\"):\n self.widge...
[ "0.81634307", "0.81331855", "0.80457467", "0.80234236", "0.78933406", "0.7892486", "0.7573996", "0.7568683", "0.75586784", "0.7547441", "0.751063", "0.745214", "0.7408914", "0.7382569", "0.73779815", "0.7358218", "0.7358218", "0.7358218", "0.731455", "0.72589403", "0.7255768"...
0.7190007
24
Return the widget's value.
def value(self): return self.input.checkState() == QtCore.Qt.Checked
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_value(self):\n if self.notebook:\n return self.widget.value\n else:\n if hasattr(self.widget, \"value\"):\n return self.widget.value()\n elif hasattr(self.widget, \"currentText\"):\n return self.widget.currentText()\n e...
[ "0.8619286", "0.7838884", "0.7805611", "0.7696525", "0.7696525", "0.7696525", "0.76916736", "0.7636346", "0.7633243", "0.7633243", "0.7592193", "0.7586152", "0.7577611", "0.7571931", "0.7547001", "0.7547001", "0.7547001", "0.75265634", "0.7511581", "0.75024223", "0.74897397",...
0.0
-1
Change the widget's value.
def setValue(self,val): if val: self.input.setCheckState(QtCore.Qt.Checked) else: self.input.setCheckState(QtCore.Qt.Unchecked)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setValue(self, value):\n self.setText(str(value))", "def change_value(self,val):\n self.val = val", "def set_value(self, value):\n if self.notebook:\n self.widget.value = value\n else:\n if hasattr(self.widget, \"setValue\"):\n self.widge...
[ "0.81634307", "0.81331855", "0.80457467", "0.80234236", "0.78933406", "0.7892486", "0.7573996", "0.7568683", "0.75586784", "0.7547441", "0.751063", "0.745214", "0.7408914", "0.7382569", "0.73779815", "0.7358218", "0.7358218", "0.7358218", "0.731455", "0.72589403", "0.7255768"...
0.632798
91
Return the widget's value.
def value(self): if self._check_: f = self.getChecked else: f = self.getSelected return f()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_value(self):\n if self.notebook:\n return self.widget.value\n else:\n if hasattr(self.widget, \"value\"):\n return self.widget.value()\n elif hasattr(self.widget, \"currentText\"):\n return self.widget.currentText()\n e...
[ "0.8619286", "0.7838884", "0.7805611", "0.7696525", "0.7696525", "0.7696525", "0.76916736", "0.7636346", "0.7633243", "0.7633243", "0.7592193", "0.7586152", "0.7577611", "0.7571931", "0.7547001", "0.7547001", "0.7547001", "0.75265634", "0.7511581", "0.75024223", "0.74897397",...
0.71907926
73
Change the widget's value.
def setValue(self,val): if self._check_: f = self.setChecked else: f = self.setSelected f(val,True) f(olist.difference(self._choices_,val),False)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setValue(self, value):\n self.setText(str(value))", "def change_value(self,val):\n self.val = val", "def set_value(self, value):\n if self.notebook:\n self.widget.value = value\n else:\n if hasattr(self.widget, \"setValue\"):\n self.widge...
[ "0.81634307", "0.81331855", "0.80457467", "0.80234236", "0.78933406", "0.7892486", "0.7573996", "0.7568683", "0.75586784", "0.7547441", "0.751063", "0.745214", "0.7408914", "0.7382569", "0.73779815", "0.7358218", "0.7358218", "0.7358218", "0.731455", "0.72589403", "0.7255768"...
0.0
-1
Return the widget's value.
def value(self): return str(self.input.currentText())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_value(self):\n if self.notebook:\n return self.widget.value\n else:\n if hasattr(self.widget, \"value\"):\n return self.widget.value()\n elif hasattr(self.widget, \"currentText\"):\n return self.widget.currentText()\n e...
[ "0.8619286", "0.7838884", "0.7805611", "0.7696525", "0.7696525", "0.7696525", "0.76916736", "0.7636346", "0.7633243", "0.7633243", "0.7592193", "0.7586152", "0.7577611", "0.7571931", "0.7547001", "0.7547001", "0.7547001", "0.75265634", "0.7511581", "0.75024223", "0.74897397",...
0.7197077
71
Change the widget's value.
def setValue(self,val): val = str(val) if val in self._choices_: self.input.setCurrentIndex(self._choices_.index(val))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setValue(self, value):\n self.setText(str(value))", "def change_value(self,val):\n self.val = val", "def set_value(self, value):\n if self.notebook:\n self.widget.value = value\n else:\n if hasattr(self.widget, \"setValue\"):\n self.widge...
[ "0.81634307", "0.81331855", "0.80457467", "0.80234236", "0.78933406", "0.7892486", "0.7573996", "0.7568683", "0.75586784", "0.7547441", "0.751063", "0.745214", "0.7408914", "0.7382569", "0.73779815", "0.7358218", "0.7358218", "0.7358218", "0.731455", "0.72589403", "0.7255768"...
0.67268
54
Return the widget's value.
def value(self): for rb in self.rb: if rb.isChecked(): return str(rb.text()) return ''
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_value(self):\n if self.notebook:\n return self.widget.value\n else:\n if hasattr(self.widget, \"value\"):\n return self.widget.value()\n elif hasattr(self.widget, \"currentText\"):\n return self.widget.currentText()\n e...
[ "0.8619286", "0.7838884", "0.7805611", "0.7696525", "0.7696525", "0.7696525", "0.76916736", "0.7636346", "0.7633243", "0.7633243", "0.7592193", "0.7586152", "0.7577611", "0.7571931", "0.7547001", "0.7547001", "0.7547001", "0.75265634", "0.7511581", "0.75024223", "0.74897397",...
0.0
-1
Change the widget's value.
def setValue(self,val): val = str(val) for rb in self.rb: if rb.text() == val: rb.setChecked(True) break
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setValue(self, value):\n self.setText(str(value))", "def change_value(self,val):\n self.val = val", "def set_value(self, value):\n if self.notebook:\n self.widget.value = value\n else:\n if hasattr(self.widget, \"setValue\"):\n self.widge...
[ "0.8164613", "0.81342715", "0.80459005", "0.80246407", "0.7893645", "0.78935117", "0.7575533", "0.75690585", "0.75590235", "0.7548683", "0.75123805", "0.7453666", "0.74110395", "0.73848647", "0.7379169", "0.7360229", "0.7360229", "0.7360229", "0.7316806", "0.7260266", "0.7256...
0.0
-1