query_id
stringlengths
32
32
query
stringlengths
9
4.01k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
babaf3c56f104e69df4c50b6984ebdb6
signal handler used to shut down system.
[ { "docid": "ceb1e55cfb234fbe289bc7eda933f52d", "score": "0.7846179", "text": "def signal_handler(dummy_signum, dummy_frame):\n log.info(\"main process is shut down\")\n global need_shutdown\n need_shutdown = True\n if child_pid:\n os.kill(child_pid, signal.SIGINT)"...
[ { "docid": "810555f96212df6b2b32cbbf4e43d0fe", "score": "0.8261516", "text": "def handler(self, signum, _):\n logging.warning(\"Signal Handler called with signal %s\", signum)\n logging.warning(\"Shutting down...\\n\")\n\n self.close_all()\n\n raise SystemExit(0)", "title...
9c0ab71f295a9810ed36b32027816ef2
equivalent to java's toString()
[ { "docid": "ecd70f62174ad356df3ac3fba685cd97", "score": "0.0", "text": "def __str__(self):\n return \"%s clients connected to %s. Overall %s connections\" % (len(self.connections), self.type.__name__, Connection_manager.all_conn_count)", "title": "" } ]
[ { "docid": "81546b32127a82d536e19a034200923f", "score": "0.79608345", "text": "def to_string(self):", "title": "" }, { "docid": "43b3a37a9629538ccb503d07e5946651", "score": "0.79494643", "text": "def to_string(self) -> str:", "title": "" }, { "docid": "2b1110d4fe19e8c3243...
f2b09bd130b23dbfb9aea3c73b0071d6
acadadmin can delete the outdated exam timetable.
[ { "docid": "8582c4a57a7c60d7c63e189a44e553d7", "score": "0.71408355", "text": "def delete_exam_timetable(request):\r\n if request.method == \"POST\":\r\n data = request.POST['delete']\r\n t = Exam_timetable.objects.get(exam_time_table=data)\r\n t.delete()\r\n return HttpRe...
[ { "docid": "094c5803b3b85df1dcc34f4e9d81a60e", "score": "0.6372826", "text": "def delete_timetable(request):\r\n if request.method == \"POST\":\r\n data = request.POST['delete']\r\n t = Timetable.objects.get(time_table=data)\r\n t.delete()\r\n return HttpResponse(\"TimeTab...
fa08f5b6263b151bdf2725af3507e987
clearall(global()) suprime les variables locales dans la console
[ { "docid": "f4b5c8c1a565a91e5a21fe1391e73ba0", "score": "0.68569124", "text": "def clearall(local_global_var):\n\tall = [var for var in local_global_var if var[0] != \"_\"]\n\tfor var in all:\n\t\tprint(var)\n\t\tdel local_global_var[var]", "title": "" } ]
[ { "docid": "7260233c4631e8ea5925bda2da5e0a27", "score": "0.6935533", "text": "def unload_all_languages():\n lingua_franca._set_active_langs([])", "title": "" }, { "docid": "694f8068527d028e3c48d1d2161f838b", "score": "0.6595749", "text": "def clear_all():\n gl = globals().copy(...
74a791aaa5b84c51ccfc8a0dc4110aed
Test case for get_web_form
[ { "docid": "3e80d6e0fe4ad055ebde3fcb6ec48a54", "score": "0.9336786", "text": "def test_get_web_form(self):\n pass", "title": "" } ]
[ { "docid": "c07256acd291408bd2ba0e1918ad6f8a", "score": "0.7466407", "text": "def test_get_form(self):\n self.client.login(username='featuretest', password='pword')\n response = self.client.get(self.options.get_create_form())\n self.assertEqual(response.status_code, 200)", "titl...
a9252f98f9ee6d2450a98f1c83844315
Get real path of image. self.train_image_path + '/' + path
[ { "docid": "3d821415e9a5a3c32013794d773a2f47", "score": "0.9221826", "text": "def _real_image_path(self, path):\r\n return osp.join(self.train_image_path, path)", "title": "" } ]
[ { "docid": "8e98291675304f4138e28ce227c4e5c7", "score": "0.8561364", "text": "def train_image_path(self) -> str:\n return join(self.directory_path, 'train-images')", "title": "" }, { "docid": "7c7b4b0da3f358ad243b4f0b76751007", "score": "0.7292678", "text": "def imagePath(self...
b6db145505be221d5f1a34fffcaf86d3
Test sending simple input and echoing it back
[ { "docid": "e8838f529ec16f7ec00237b56f9a6b00", "score": "0.6970885", "text": "def __test_basic_input(conn):\n code= \"\"\"\ndef echo():\n api.send('hello')\n data= api.recv()\n api.send('echoing response...')\n api.send(data)\n \n \"\"\"\n token, errmsg= conn.send_store_request(\...
[ { "docid": "ca6bb92a4a52407a7fd63abd2c560c4d", "score": "0.6779401", "text": "def test(test_input):\n print(str(test_input))\n return 1", "title": "" }, { "docid": "4a28dd6b41fb3d80f2890367ac6f5628", "score": "0.67543083", "text": "def request(inquiry='What is you question?'):\...
aca5a5ef0b7fa6f75b18141d8962491e
Train for one epoch.
[ { "docid": "7072e85b9c4c058931cd666cb5f6add8", "score": "0.0", "text": "def train_cn_consistency(net, train_loader, optimizer, scheduler):\n print('running train_cn_consistency')\n batch_time = AverageMeter()\n data_time = AverageMeter()\n losses = AverageMeter()\n s_losses = AverageMeter...
[ { "docid": "3ab8b4deed91d5005b9e0436d2f04d99", "score": "0.90381783", "text": "def train_one_epoch(self):\n pass", "title": "" }, { "docid": "a77c909a79c94abcf34eb1cb53ea77d6", "score": "0.84027237", "text": "def train(self):\n\n for epoch in range(self.current_epoch, s...
d5d17d46c3da5c9a52da6df460e4060b
Generates a sample with size iterations of large numbers from 1<n<p1
[ { "docid": "06e0f0ada5afc42233cd49a94afc253c", "score": "0.77541995", "text": "def getSamplesLargeNumber(p, iterations):\r\n aValues = []\r\n while len(aValues) != iterations:\r\n sample = rd.randrange(2, p - 1)\r\n if sample not in aValues:\r\n aValues.append(sample)\r\n ...
[ { "docid": "054dc7fa11549fb6cf88daddc630bcc0", "score": "0.7613719", "text": "def gen_samples(n) :\n\tsamples = [s for s in gen_sample(n)]\n\treturn samples", "title": "" }, { "docid": "a2f5b7a4bb65b9f77fd742c49250ddaa", "score": "0.75296617", "text": "def sampler(n):\r\n np.rando...
f550739e33a551c18750f07fe5309ebb
Takes a start and end date and will return a dataframe of daily hitting statistics for every player that played for each day in the date range. start_date and end_date should be in YYYYMMDD format. Data is being pulled from the PyBaseball API using their batting_stats_range() function. Each iteration through the date r...
[ { "docid": "445ff75c7e3a9efeefbda75e5b7faae7", "score": "0.7701687", "text": "def get_batting_data(start_date, end_date):\n start = datetime.strptime(start_date, \"%Y-%m-%d\")\n end = datetime.strptime(end_date, \"%Y-%m-%d\")\n dates_generator = [start + timedelta(days=x) for x in range(0, ((en...
[ { "docid": "44515bf5de9aac9a1fca871ee3471a1a", "score": "0.7267774", "text": "def get_pitching_data(start_date, end_date):\n start = datetime.strptime(start_date, \"%Y-%m-%d\")\n end = datetime.strptime(end_date, \"%Y-%m-%d\")\n dates_generator = [start + timedelta(days=x) for x in range(0, ((e...
7cea56bbaf7cfb2dd4488789a8f9c00a
Upon calling create_game, the Connect Four game should initialize the board
[ { "docid": "8915df425fd4c67e4d6225ffb77148ae", "score": "0.0", "text": "def create_game(self, request: dict) -> dict:\n\n ConnectFourGame.sessions += 1\n game = {\"board\": [], \"player_to_play\": 1, \"session_id\": ConnectFourGame.sessions}\n\n self.games[ConnectFourGame.sessions] ...
[ { "docid": "f3fa404fc0556a1d3aece2288fcf90e1", "score": "0.81248873", "text": "def initialize_game(self):\n self._board = self.create_a_new_board()\n self.create_board(self._board)", "title": "" }, { "docid": "8ddd7f1f51f24d01a0d2d043cc935d57", "score": "0.76318944", "t...
d949997beb31ca924df3cdb23230190b
Function to initialize the Window and it's properties.
[ { "docid": "52d1d927d2154ba449870dc44c957799", "score": "0.0", "text": "def initialize_tkinter_window(self):\n self.width, self.height = 500, 600 # Screen size of the initial window\n self.ws = self.winfo_screenwidth() # width of the screen\n self.hs = self.winfo_screenheight() #...
[ { "docid": "a4521b50f655b91ad23a1e5814152959", "score": "0.81713", "text": "def Initialize(self, window):", "title": "" }, { "docid": "14c1338b2aa60718417be6d0a2e2a7ed", "score": "0.7876121", "text": "def window_init(self):\n self.window = tk.Tk()\n self.window.title(\"...
94860492140c86be3dbeae61b5dcf0cb
Event handler which pokes the language after traversing and authentication is done, but before rendering. Normally language negotiation happens in LanguageTool.setLanguageBindings() but this is before we have found request["PUBLISHED"] and we know if we are an editor or not.
[ { "docid": "616a2ce3e989268bff0c812166c9a9c9", "score": "0.67999476", "text": "def admin_language_negotiator(event):\n\n request = event.request\n\n lang = get_editor_language(request)\n\n if lang:\n # Kill it with fire\n request[\"LANGUAGE\"] = lang\n tool = request[\"LANG...
[ { "docid": "a6377d501e4c8d04e631c1f22eea8aea", "score": "0.5977694", "text": "def lang(update, context):\r\n\r\n query = update.callback_query\r\n query.answer() # according to telegram api, all queries must be answered\r\n\r\n if query.data == \"en\":\r\n query.edit_message_text(text=\...
94be5e35f33d58e4a6b50c4acead38ed
Handler for receiving external platform PubSub/RPC requests from internal agents. It then calls external PubSub/RPC router handler to forward the request to external platform.
[ { "docid": "47f08ee382423adf29f9e4090f62bac3", "score": "0.6289094", "text": "def outbound_request_handler(self, ch, method, props, body):\n _log.debug(\"Proxy ZMQ Router {}\".format(body))\n frames = jsonapi.loads(body.decode('utf-8'))\n if len(frames) > 6:\n if frames[5...
[ { "docid": "fa85b609fb70c1509535350a74c6e70a", "score": "0.64669406", "text": "def on_request(self, ch, method, props, message_body):\n logger.info(' [-] Publishing through Remote Rrocedure Call (RPC)...')\n logger.info(' [x] Received %r' % message_body)\n\n message = json.loads(mes...
14a168fffb50104ce16e96fe8b2c89cc
Action models for a footstep phase.
[ { "docid": "981216e217c31644d2bc531c762a5df5", "score": "0.5858494", "text": "def createFootstepModels(self, comPos0, feetPos0, stepLength, stepHeight, timeStep, numKnots, supportFootIds,\n swingFootIds):\n numLegs = len(supportFootIds) + len(swingFootIds)\n com...
[ { "docid": "21228deb4d6a0ed92944ccbc9a77decf", "score": "0.60571176", "text": "def perform_step(self, action: Action) -> dict:", "title": "" }, { "docid": "df2d28fb4b50d371ca4049bda1ded3e3", "score": "0.5815846", "text": "def step(self, action, **kwargs):\n pass", "title":...
53ecc997fde6146d2c03c85ffb7ae81f
Fetch the storage usage from Rucio, which will then be used as part of the data placement mechanism. Also calculate the available quota given the configurable quota fraction and mark RSEs with less than 1TB available as NOT usable.
[ { "docid": "2f001744d41069ae79a899525cc24651", "score": "0.77216226", "text": "def fetchStorageUsage(self, dataSvcObj):\n self.logger.info(\"Using Rucio for storage usage, with acct: %s\", self.dataAcct)\n for item in dataSvcObj.getAccountUsage(self.dataAcct):\n if item['rse'] n...
[ { "docid": "d79afe470ec012494926e358feb8c972", "score": "0.73003674", "text": "def fetchStorageQuota(self, dataSvcObj):\n self.nodeUsage.clear()\n response = dataSvcObj.getAccountLimits(self.dataAcct)\n for rse, quota in viewitems(response):\n if rse.endswith(\"_Tape\") o...
cdf0260b6ceb5b3e53529a432048a105
Given a list of paths to DCM files, and a RTSTRCT DCM file, it returns the 3D volumes.
[ { "docid": "9c747aa504fffc61c4a2764c11b1b2dd", "score": "0.0", "text": "def get_ImageAndGroundTruth( dcms , seg_fls_ls='none' ):\n # Get the 3D CT scan\n image = np.stack([s.pixel_array for s in dcms])\n gts = np.zeros_like( image )\n # Get pixel spacings\n pix_spc = [float(a) for a in dc...
[ { "docid": "c0828c96158906a06f7db878b1e79b53", "score": "0.5677691", "text": "def calculate_volume(segment_path, centroids, ct_path=None):\n\n mask = np.load(segment_path)\n mask, _ = scipy.ndimage.label(mask)\n labels = [mask[centroid['x'], centroid['y'], centroid['z']] for centroid in centroi...
5647f4aac8d50d08f4c4673a0ac7661a
Get transitions from states.
[ { "docid": "f4f7119e780434b6f5604700929de29e", "score": "0.7659456", "text": "def all_transitions(self):\n transitions = list()\n for src_state in self.states:\n for input_value, dst_state in src_state.items():\n transitions.append((src_state, input_value, dst_sta...
[ { "docid": "edb52bb22b35b21c7d670dca2ab5264f", "score": "0.7203781", "text": "def extract(transitions):\n states = torch.cat([t.state for t in transitions])\n actions = torch.cat([t.action for t in transitions])\n rewards = torch.cat([t.reward for t in transitions])\n mask = torch.tensor([t....
dd87bc8d0603a6b8d9b6379643382c4a
Test backing up the Plone data into a single file
[ { "docid": "1efb6412d4c9eb1b80b09d992a3a46ed", "score": "0.0", "text": "def test_backup_combined(self):\n tmp_path = self.create_dir('combined')\n wheelbarrow = Wheelbarrow(\n tmp_path,\n os.path.join('/', 'opt', 'current-plone', 'zeocluster'),\n verbosity=...
[ { "docid": "94c035edcc158e9cec5a0d1ae38fb429", "score": "0.6593598", "text": "def test_to_file(self):\n fd, fp = mkstemp()\n close(fd)\n pt = qdb.metadata_template.prep_template.PrepTemplate.create(\n self.metadata, self.test_study, self.data_type)\n pt.to_file(fp)...
3ef7615d0965c054880db2854b139b13
Process a string into a shapely polygon
[ { "docid": "3060d8a552a97cef7923be4ccde69727", "score": "0.5660084", "text": "def proc_polystr(polys, llcrnrlat, llcrnrlon, urcrnrlat, urcrnrlon, tolerance=-1):\n\t\n\tif len(polys) == 0:\n\t\treturn []\n\n\tall_polys = []\t\n\n\tfor i in polys:\n\t\tji = ast.literal_eval(i[0])\n\t\tfor p in ji['coordin...
[ { "docid": "e25e0406c63c139422244c19be5ab765", "score": "0.68376374", "text": "def _polygon(s, r):\n return MyPolygon(s, r)", "title": "" }, { "docid": "12f2ba308ea094d0ea76e8448d640467", "score": "0.6781244", "text": "def str2polygon(strdata):\n pts = []\n partial = Non...
e3ad1ecc0b94296802f80087c1b85c0e
Read telemetry data from a PACE HKT product.
[ { "docid": "5f5c4e404086d52f704ac63219548881", "score": "0.0", "text": "def from_hkt(self, flnames: Path | list[Path], *,\n instrument: str | None = None, dump: bool = False):\n if isinstance(flnames, Path):\n flnames = [flnames]\n if instrument is None:\n ...
[ { "docid": "3ec696c850c588d537fed90f96a8bf3f", "score": "0.55891937", "text": "def _get_data(self):\n self._data = system_info(self.payload)\n if self._data:\n self._target_temperature = data['setpoint']\n self._current_temperature = data['temperature']\n s...
b8952633b24641cb5bcf4dabccd9c01a
Return the class containing all connections to the gateway.
[ { "docid": "3a17156ee575bc122fc50d9f4e910d08", "score": "0.5476334", "text": "def gateway_device(self):\n return self._gateway_device", "title": "" } ]
[ { "docid": "66be67a4d16a295d168036e8901ac466", "score": "0.6589074", "text": "def get_connections(self):\n connection_list = []\n for c in self._classical_connections:\n connection_list.append({'type': 'classical', 'connection': c})\n for q in self._quantum_connections:\n...
350b7523904a95a2ed8c1e0fa8b9a114
Concatenate two lists, always return a list of list
[ { "docid": "4ddec1d2b2a03bc4480dd6525386e2d3", "score": "0.78962314", "text": "def concatenateList(list1, list2):\n outputList = []\n\n ## list1\n # if it's an empty list\n if len(list1) == 0:\n outputList.append(list1)\n # if it's al...
[ { "docid": "d76a43f7db550ba5c7436b8bff4a4884", "score": "0.844466", "text": "def concat_lists(list1, list2):\n\n # return list1 + list2\n for item in list2:\n list1.append(item)\n\n return list1", "title": "" }, { "docid": "dbd51aa3117026d4eabce506f4f5ae8e", "score": "0.8...
15db5a05cb5149df307187fc4ce51663
General rank order filter. Applies a callback to each pixel in the image. The callback receives the sorted pixel values in the neighborhood around the pixel and has to return a new pixel value.
[ { "docid": "a5cd938a258b0d16ef7cc5243fb736da", "score": "0.7132174", "text": "def rank_order(img, callback):\n result = np.zeros(img.shape)\n height, width = img.shape\n for y in range(height):\n for x in range(width):\n y_start = y-1 if y > 0 else 0\n y_end = y+1 i...
[ { "docid": "e16b5919ccebda07a9c2f8c9cd3f220f", "score": "0.5808636", "text": "def erosion(img):\n return rank_order(img, lambda neighborhood: neighborhood[0])", "title": "" }, { "docid": "dfb6ecf1a5601a0acb5831583b1d8255", "score": "0.5299369", "text": "def zrank(self, name, value...
897e1dc8a4d5d109f8f194759653c2ed
Replace the volume with the average of its left half and right half.
[ { "docid": "646a1178452e416d9a31392814ab4d31", "score": "0.0", "text": "def symmetricalize_volume(prob_vol):\n\n zc = prob_vol.shape[2]/2\n prob_vol_symmetric = prob_vol.copy()\n left_half = prob_vol[..., :zc]\n right_half = prob_vol[..., -zc:]\n left_half_averaged = (left_half + right_ha...
[ { "docid": "09b27b1c83e6077463596ea13e3703fe", "score": "0.64357704", "text": "def normalize_volume_in_place(vol):\n\n assert isinstance(vol, pydeform.Volume)\n\n # Convert the volume object into a numpy array\n # `copy=False` means that the array object only holds a reference to the \n # da...
5249c3119d444b60b8c04a101e4826a4
Gets the number_of_downloads of this DownloadableDataLinkInterface. Of downloads per user
[ { "docid": "0d12b58cb5ce76b3128a478964dc9dea", "score": "0.7901032", "text": "def number_of_downloads(self) -> int:\n return self._number_of_downloads", "title": "" } ]
[ { "docid": "8d49586cfa39b76befcca53789bce95b", "score": "0.6652608", "text": "def download_count(self):\n pass", "title": "" }, { "docid": "663700e1e8ba46404a911ca9c9716260", "score": "0.63293475", "text": "def user_count(self):\n return self._n_users", "title": "" ...
80629d85ef87ffbba484cd8f9fefc5e2
Uses buildin landlab candy to get aspect values of the model grid
[ { "docid": "77d6d5ae26f283302d810124b22ecf64", "score": "0.58663845", "text": "def calcAspect(self):\n\n aspect = self._grid.calc_aspect_at_node()\n #this was moved to the .reshapeGrid() function for consitency.\n #need to reshape here directly...\n #aspect = aspect.reshape(s...
[ { "docid": "669f89cb45e23612c55003ca5c1b00e9", "score": "0.6027867", "text": "def _getGridInformation(self):\n # Are there cell areas associated with this model?\n if \"areacella\" not in self.variables.keys(): return\n f = Dataset(self.variables[\"areacella\"][0])\n self.cel...
49c5861372d25ec22218cc91fe7a198f
Job directory names default to "run00001, run00002..."
[ { "docid": "b642aa1b7be602aae0a5da10195b24ec", "score": "0.5937661", "text": "def runCreateJobsDirs(jobj, jobEditorList, scriptEditor):\n \n global u\n\n # Set basic script editor for all jobs\n jobj.setScriptEditor(scriptEditor)\n\n #\n # Loop over input file editor objects created ab...
[ { "docid": "e3dfac1458829ce7e315ecb8bcf34f06", "score": "0.69982713", "text": "def job_directory(uuid):\n d = os.path.join(app.config['JOB_FOLDER'], str(uuid))\n return d", "title": "" }, { "docid": "ab57418d59989585fe271ae6ceedfa0c", "score": "0.6934569", "text": "def work_dir...
72fe97dcf6b04db82bce33b9f3fc4a0f
Return a Django form field appropriate for a date property. This defaults to a DateField instance, except if auto_now or auto_now_add is set, in which case None is returned, as such 'auto' fields should not be rendered as part of the form.
[ { "docid": "d14063d7089b49052f3395734f3e4c68", "score": "0.8639604", "text": "def get_form_field(self, **kwargs):\r\n if self.auto_now or self.auto_now_add:\r\n return None\r\n defaults = {'form_class': forms.DateField}\r\n defaults.update(kwargs)\r\n return super(DateProperty, self).ge...
[ { "docid": "00950dd3fa209a44c2a5f1d3e907a1b5", "score": "0.77816665", "text": "def get_form_field(self, **kwargs):\r\n if self.auto_now or self.auto_now_add:\r\n return None\r\n defaults = {'form_class': forms.DateTimeField}\r\n defaults.update(kwargs)\r\n return super(DateTimeProperty,...
35b6ba6294b09c77fcf4be6cc931faec
To update the requirements for MudTelnet, edit the requirements.txt file.
[ { "docid": "1134af41f3fedd4a5977df6c9d8b6488", "score": "0.0", "text": "def get_requirements():\n with open(\"requirements.txt\", \"r\") as f:\n req_lines = f.readlines()\n reqs = []\n for line in req_lines:\n # Avoid adding comments.\n line = line.split(\"#\")[0].strip()\n...
[ { "docid": "7d535ffadbd06d4155dcb12434db0959", "score": "0.5219412", "text": "def SetupLMNotification(self):\n self.Install('python3')\n self.RemoteCommand('pip install requests')\n self.PushDataFile(\n self._LM_NOTICE_SCRIPT, f'{self.temp_dir}\\\\{self._LM_NOTICE_SCRIPT}'\n )", "...
d8c6bfa24395eb5f91b31736e769a1ba
reply thread by user that requires approval
[ { "docid": "221aa17e2f2d39a5a31dbe00bfb3663b", "score": "0.66562307", "text": "def test_user_moderation_queue(self):\n self.override_acl({'require_replies_approval': 1})\n\n response = self.client.post(\n self.api_link, data={\n 'post': \"Lorem ipsum dolor met!\",...
[ { "docid": "dae93e3ca0fd0a90b7397e1dbd1f795e", "score": "0.6544899", "text": "def test_user_moderation_queue_bypass(self):\n override_acl(self.user, {'can_approve_content': 1})\n\n self.override_acl({'require_replies_approval': 1})\n\n response = self.client.post(\n self....
ab03f1747aff3494dfab4385cd45f172
getStateSet(LODRef self) > StateSet getStateSet(LODRef self) > StateSet
[ { "docid": "16883e913ce1cddc5b304449a08d6bf2", "score": "0.76371", "text": "def getStateSet(self, *args):\n return _osg.LODRef_getStateSet(self, *args)", "title": "" } ]
[ { "docid": "aa7e5bd964b2b6cf791ceef094fe12ab", "score": "0.728946", "text": "def getStateSet(self, *args):\n return _osg.PagedLODRef_getStateSet(self, *args)", "title": "" }, { "docid": "80b2eb5fffe4ea6649af0c73500b6410", "score": "0.7240245", "text": "def getOrCreateStateSet(...
cca8c52535af0f8ee21bead37ab93bef
Testcase8 in NAT Functionality
[ { "docid": "822b6acbfd248a6794dd1f9ebbdb2990", "score": "0.6763254", "text": "def test_nat_func_8(self):\n LOG.info(\n \"\\n**** Execution of Testcase TEST_NAT_FUNC_8 starts ****\")\n if not self.steps.testCreatePtgDefaultL3p():\n return 0\n if not self.steps.testCr...
[ { "docid": "952b0702aa0a844ea1ddd3dae56a140c", "score": "0.7165074", "text": "def test_twice_nat_interface_addr(self):\n flags = self.config_flags.NAT_IS_TWICE_NAT\n self.vapi.nat44_add_del_interface_addr(\n sw_if_index=self.pg11.sw_if_index, flags=flags, is_add=1\n )\n\n...
80ee60f6a1ed3ed14d64af8a5c4cf192
Main helper that moves the aliens. Determines when to move aliens based on the time that has passed. At the start, and each time the aliens move, _time it is reset to 0. The setting of _time to 0 is taken care of in update(). Then, add the number of seconds that have passed to _time, and do not move the aliens. When _t...
[ { "docid": "ea6b3cbe3660c8a85a1d6cbd10106bd4", "score": "0.68448657", "text": "def _move_Aliens_Main(self, key_input, dt):\n assert isinstance(key_input, GInput)\n assert isinstance(dt, int) or isinstance(dt, float)\n \n self._time += dt\n \n if key_input.is_key...
[ { "docid": "7bf63b7d7114febe5dcb3a3f30558c6f", "score": "0.71475893", "text": "def movealiens(self):\n if self._emptyaliens == False:\n if self._ismovingright == True:\n if self._time >= self._alienspeed:\n self.moveright()\n self._a...
9e8cffa87aa18190b39d065b730b3025
Iterates over all text nodes and merges all text nodes that are close to each other. This is useful for text extraction.
[ { "docid": "3aa34874c7a425fadb84b8a6805e4bb7", "score": "0.7767277", "text": "def merge_text_nodes(self):\n ...", "title": "" } ]
[ { "docid": "39590391492dc3733a65e910084f4590", "score": "0.57207865", "text": "def normalizeDocument(self): # TODO - test\n for each in self.childNodes:\n if each.nodeType == Node.TEXT_NODE:\n if each.nodeValue.strip() == '':\n each.parentNode.removeC...
65246afaff55f26d0806cad0ac86c7db
Decorator to cause a method to cache it's results in self for each combination of inputs and return the cached result on subsequent calls. Does not support named arguments or arg values that are not hashable.
[ { "docid": "9f8ae71fe1c2e3f7a8edb01c79c208de", "score": "0.0", "text": "def memoizedproperty(func):\n inner_attname = '__%s' % func.__name__\n\n def new_fget(self):\n if not hasattr(self, '_cache_'):\n self._cache_ = dict()\n cache = self._cache_\n if inner_attname ...
[ { "docid": "539f3b61f9b3e2132bdcc815438fc149", "score": "0.73366696", "text": "def wrapper(*args, **kwargs):\n if (args, kwargs) not in cache:\n cache[(args, kwargs)] = func(*args, **kwargs)\n #### regardless of seen before or not, return computed result\n return cache[(a...
a8dbefb486e82630481dbfd5d1fefc72
takes the players guess and adds it to list. Takes next guess of goes to resultpage if all guesses are made.
[ { "docid": "3342969e50a1336429a4eec64af52a5c", "score": "0.0", "text": "def next(self):\n suit = Suit(self.suit_var.get())\n card = Card( self.num_var.get(),suit)\n print(\"going to next page with card: \", card.card_id())\n self.gamestate.add_answer(card)\n if self.ga...
[ { "docid": "02495b3588d0cc6606ec2b6f7f7f6269", "score": "0.6550348", "text": "def startGuessGame(self, totalNumberOfGuessGames):\n i=0\n gameList = []\n print('The Guessing Game')\n while (i<totalNumberOfGuessGames):\n choice = ''\n #generate random numb...
eddd6b33c727fb40e0dbf06dd805dd9a
This function enlarges a given number by 100.
[ { "docid": "6082666add84985420c2dc8f993f869a", "score": "0.8559718", "text": "def enlarge(n):\n return n * 100", "title": "" } ]
[ { "docid": "f948822003c9915cb32121da0de29efa", "score": "0.6154489", "text": "def __enlarge(self, number, multiplier, pattern=None):\n if pattern == 'linear':\n return number * 2\n else:\n return number * multiplier", "title": "" }, { "docid": "0c83e3c1154...
94935ef11b62088bf66b2de396c412e6
create arbitrary obsolete marker With no arguments, displays the list of obsolescence markers.
[ { "docid": "1ba9b1dd877414dc7085fcf6dde19aad", "score": "0.5471082", "text": "def debugobsolete(ui, repo, precursor=None, *successors, **opts):\n\n opts = pycompat.byteskwargs(opts)\n\n def parsenodeid(s):\n try:\n # We do not use revsingle/revrange functions here to accept\n ...
[ { "docid": "32511ebf74660e381cf17ed2e4b7e868", "score": "0.5585488", "text": "def markHelpUnnecessary(self) -> None:\n ...", "title": "" }, { "docid": "3ee0ed96189f38d1f0bbecea79758cfe", "score": "0.5508379", "text": "def marker(self):\n return ''", "title": "" },...
60c512e59b628f5fdeb197bb02dd4ba3
Load the keywords for the page object identified by the type and object name The page type / object name pair must have been registered using the cumulusci.robotframework.pageobject decorator.
[ { "docid": "1f16bf2aad9aa0d0cea64ca5ddbe1c87", "score": "0.6187196", "text": "def load_page_object(self, page_type, object_name=None):\n pobj = self._get_page_object(page_type, object_name)\n self._set_current_page_object(pobj)\n return pobj", "title": "" } ]
[ { "docid": "527b8070fd3ab07ee9407f79410b3c6b", "score": "0.7067027", "text": "def test_load_single_page_object(self, get_context_mock, get_library_instance_mock):\n\n po = PageObjects(FOO_PATH)\n\n # Until we request the page object, we shouldn't be able to\n # see the page-specific...
ed39a3a013ae5b8f461617359320f645
Calculates the exponent of input.
[ { "docid": "f380fbbaade742babf8802c984f6ea5c", "score": "0.0", "text": "def exp(x: Union[Rnode, Dual, float]) -> Union[Rnode, Dual, float, List[float]]:\n try:\n z = Rnode(np.exp(x.value))\n x.children.append((np.exp(x.value), z))\n return z\n except AttributeError:\n t...
[ { "docid": "1aea5fbc09f22496651026edb239b347", "score": "0.7366763", "text": "def exponent(x, y):\n return x ** y", "title": "" }, { "docid": "b5cc273b95ee4c93ad6f9a071e880419", "score": "0.7241899", "text": "def exp(exponent):\n return e**exponent", "title": "" }, { ...
8770fb55163d080a5ff236efe6ab58ff
Checks whether `chars` is a punctuation character.
[ { "docid": "f89d82d411a50a54ac53773eabec0df4", "score": "0.8179238", "text": "def _is_punctuation(char):\n cp = ord(char)\n # We treat all non-letter/number ASCII as punctuation.\n # Characters such as \"^\", \"$\", and \"`\" are not in the Unicode\n # Punctuation class but we treat them as ...
[ { "docid": "fc4aa7b34e3b974c738c014df45d4aea", "score": "0.8229112", "text": "def _is_punctuation(char):\n cp = ord(char)\n # We treat all non-letter/number ASCII as punctuation.\n # Characters such as \"^\", \"$\", and \"`\" are not in the Unicode\n # Punctuation class but we treat them as ...
bd2a43d574079b697d6f76479bd76e66
Binary shift map. Optional parameter to include random noise in the 50th+ binary digits.
[ { "docid": "b80aa990a9f8502fd75da9c487d0d191", "score": "0.58863705", "text": "def modulo_map(x_n, noise=False):\n mapped = 2.*x_n % 1\n if noise:\n mapped = binary_noise(mapped)\n return mapped", "title": "" } ]
[ { "docid": "ccaaf1870abeed6117be85c37317a87d", "score": "0.63734806", "text": "def binary_noise(x):\n ## Create a bit mask based on the\n ## position passed in\n ## produces '10000' if we pass in position=4\n ## our bit in the '4th' position is set to 1\n binary = bin(x)[2:]\n for posi...
a8e0c31277f421df23fae1cc1807645d
Creates a Surface Finish Symbol based on last selection
[ { "docid": "f9ab0940b876a25a228a7aebadda13bb", "score": "0.5583832", "text": "def InsertSurfaceFinishSymbol2(self, SymType=defaultNamedNotOptArg, LeaderType=defaultNamedNotOptArg, LocX=defaultNamedNotOptArg, LocY=defaultNamedNotOptArg\n\t\t\t, LocZ=defaultNamedNotOptArg, LaySymbol=defaultNamedNotOptArg,...
[ { "docid": "81582f125eaad40d376f178912744790", "score": "0.56996644", "text": "def ModifySurfaceFinishSymbol(self, SymType=defaultNamedNotOptArg, LeaderType=defaultNamedNotOptArg, LocX=defaultNamedNotOptArg, LocY=defaultNamedNotOptArg\n\t\t\t, LocZ=defaultNamedNotOptArg, LaySymbol=defaultNamedNotOptArg,...
ed0f05833051f5ab1172a28aaf5117fc
sets up the key word hook and the unhook state
[ { "docid": "3d3e830b7ae4c2e4fd11f08eeea8e31b", "score": "0.6124911", "text": "def enter(self):\n super().enter()\n self.hook_handler = keyboard.add_word_listener(self.context.option_data_ref.substitute_keyword,\n self.key_word_replace_c...
[ { "docid": "fa7e7f9d3a0baac266a7baff1c29423e", "score": "0.67543864", "text": "def quick_hook_event(self):\n self.quit()\n self.context.state = self.context.keyword_hook_state\n self.context.state.enter()", "title": "" }, { "docid": "5e2fb428e4e4e7e465e7c4c5042348fa", ...
3ce530f4622894de87071fb3f7fbd997
Run the given command and return its output
[ { "docid": "293cfa1552dc903c6d00fda3ffe53f9c", "score": "0.0", "text": "def run(command, shell=None):\n out_stream = subprocess.PIPE\n err_stream = subprocess.PIPE\n\n if shell is not None:\n p = subprocess.Popen(command, shell=True, stdout=out_stream,\n stder...
[ { "docid": "0f8e2a2fc52817196221cd93eae9665e", "score": "0.8390274", "text": "def run_command(command):\n output = subprocess.getoutput(command)\n return output", "title": "" }, { "docid": "0629b87a77882a05030d4ef9c359d4e9", "score": "0.8349085", "text": "def run_command(comman...
5af6802750378385b9d7f09681c007a6
Private method to group the tree items by window.
[ { "docid": "3e8b693410b1b25e7e41c41c0119116f", "score": "0.7198706", "text": "def __groupByWindow(self):\n windows = self.__mw.mainWindows()\n \n self.__isRefreshing = True\n \n winCount = 0\n for mainWin in windows:\n winCount += 1\n winIt...
[ { "docid": "7b2a923dc7ea54af35026c00234ac715", "score": "0.5919494", "text": "def open_groups_wnd():\n head_text = head_groups.groups_win_text(LNG)\n db = data_training.OpenSaveDb().db\n data_text = proc_data.Processer(db).data_groups_wnd()\n db.close()\n open = window_groups.MyTk(title=h...
bac775a0f2b4c28aedc888838fc529eb
Returns a random integer session ID for this flow.
[ { "docid": "b5104c4cbb829727818cc13cd5bd5b3c", "score": "0.6393333", "text": "def GetNewSessionID(self, **_):\n return rdfvalue.SessionID(base=\"aff4:/hunts\", queue=self.args.queue)", "title": "" } ]
[ { "docid": "53ae99991fe967be899a143c5c23b960", "score": "0.790744", "text": "def generate_session_id():\n return random.randint(1, 2 ** 53)", "title": "" }, { "docid": "360881e3d5f62773e10abe9f123531d3", "score": "0.7590223", "text": "def _generate_session_id(self):\n\n whi...
ea3d105b9d0a86773cfefaa29047af97
Get device information as a dictionary
[ { "docid": "02c061ba8303e4ae92dfa3e081d6d4a7", "score": "0.69765407", "text": "def get_info(self):\n return dict(firmware_version=self.firmware_version,\n adc_mask=self.adc_mask,\n sampling_rate=self.sampling_rate)", "title": "" } ]
[ { "docid": "4b0099d52d86f3e79f6beb7cdd6ac700", "score": "0.8830638", "text": "async def get_device_info(self) -> Dict[str, str]:\n ...", "title": "" }, { "docid": "03f81716fd6eab6529a468da7a3a47a5", "score": "0.8455661", "text": "def device_info(self):\n return {\n ...
0ca0dd98dd1074caed4c03f7b0d6db0d
This function should provide analysis w.r.t Logistic Regression Model.
[ { "docid": "212aa0738ea68a80c02d61a4900dfcb8", "score": "0.66393757", "text": "def logistic_regression_modelling(x_train_res, y_train_res, X_test, y_test):\n\n print(\"\\n\\n\\nLogistic Regression\")\n print(\"Cross Validating for best parameters..\")\n print(\"This might take some time..\\n\")...
[ { "docid": "31f378090b180373cc086b4762a552da", "score": "0.7591138", "text": "def logistic_regression(**kwargs):\n return base_models.LogRegression(**kwargs)", "title": "" }, { "docid": "6b1761eedbde255fc46714f922e2b9a1", "score": "0.7497423", "text": "def logistic_regression(self...
2b27dd8aee7d95b8454db0feb276548e
Return the allocated type for this allocator.
[ { "docid": "29ce9c4bc71c3bb0aad8d3ebf014d135", "score": "0.74096143", "text": "def get_allocated_type():\n return origin.bind(Self.origin_node, Entity.type_or_expr.match(\n lambda t=SubtypeIndication.entity: t.designated_type,\n lambda q=QualExpr.entity: q.designated_type,\n...
[ { "docid": "973a29d668d185078df1d15b78c6e96c", "score": "0.682636", "text": "def get_typ(self, ):\n return self._typ", "title": "" }, { "docid": "7c874f510c1a1fd7f094a29e38d629a4", "score": "0.67755115", "text": "def getType(self):\n return self.__typeid.getType()", ...
97cbb65bef88db7d1debcf8c87daec78
Searches for printable strings in a file
[ { "docid": "35f411b1a0cf39dd76bff3edfc1585d1", "score": "0.48263007", "text": "def test_grep_string(self):\n\n sampleFile = os.path.join(os.path.dirname(__file__), \"SampleDir\", \"SampleFile.txt\")\n sampleFile = lib_util.standardized_file_path(sampleFile)\n\n mySourceGrep = lib_cl...
[ { "docid": "b18cc9a8bb2647a8f266f3e70ec1005c", "score": "0.6613732", "text": "def get_strings(path):\n with open(path, errors='ignore') as file:\n res = ''\n for c in file.read():\n if c in string.printable:\n res += c\n continue\n if ...
9024498c7a6b12c88b2e7355fd6b45a0
cast(itkLightObject obj) > itkMirrorPadImageFilterIUS2IUS2
[ { "docid": "f97e644df5f9ca2980068d6c4d7199f8", "score": "0.8566191", "text": "def cast(obj: 'itkLightObject') -> \"itkMirrorPadImageFilterIUS2IUS2 *\":\n return _itkMirrorPadImageFilterPython.itkMirrorPadImageFilterIUS2IUS2_cast(obj)", "title": "" } ]
[ { "docid": "6c84b2c32ac5fcd58068eb1711acd375", "score": "0.85065377", "text": "def itkMirrorPadImageFilterIUS2IUS2_cast(obj: 'itkLightObject') -> \"itkMirrorPadImageFilterIUS2IUS2 *\":\n return _itkMirrorPadImageFilterPython.itkMirrorPadImageFilterIUS2IUS2_cast(obj)", "title": "" }, { "do...
c1e62984ba020ecf718c16d15fed7c96
Returns a small dataset of data.
[ { "docid": "5b1a5928c84dcc51b86ea54e013ac8ac", "score": "0.0", "text": "def get_data(path_data, transformation=None):\r\n\r\n # get a list of all the images\r\n img_list = os.listdir(path_data)\r\n\r\n # throw away files that are not in the allowed format (png or jpg)\r\n for img_file in img...
[ { "docid": "6b8ac51f166d56feae905fb66d14e31b", "score": "0.7209428", "text": "def dataset(self) -> global___Dataset:", "title": "" }, { "docid": "8bacfe130d4b5ad546bc19587b311be3", "score": "0.70424104", "text": "def dataset():\n return obsplus.load_dataset(DATASET_NAME)", "ti...
eac4ed6f8e20037cf0acc6d4e61d1374
Return the path up to the folder
[ { "docid": "d7b69421195330f20aaa278aab51337e", "score": "0.62405604", "text": "def localPath(self):\n return self.home", "title": "" } ]
[ { "docid": "5c0709de22f515be7f5334ecf931497e", "score": "0.74314433", "text": "def dir(self) -> str:\n return f'{os.path.dirname(self.path)}/'.lstrip('/')", "title": "" }, { "docid": "1219ae0f2bf743c1c792d2b69d8da416", "score": "0.73235214", "text": "def get_path(self):\n ...
0a588590510a1389dbe8ecda4d7718da
Returns namedTuple from table file using first row fields as col headers.
[ { "docid": "380986dd868ee86e8702f703fc9cc56e", "score": "0.76259065", "text": "def tableFile2namedTuple(tablePath,sep='\\t'):\n\n reader = csv.reader(open(tablePath), delimiter=sep)\n headers = reader.next()\n Table = collections.namedtuple('Table', ', '.join(headers))\n data = map(Tab...
[ { "docid": "7c6de548fc0189c5e6a6aadfdc75942c", "score": "0.60297465", "text": "def name_dtypes(file):\n with open(file,'r') as f:\n columns = f.readline().split()\n return tuple(columns)", "title": "" }, { "docid": "80146f967e30aaa718c2c6b46e109ac6", "score": "0.59406924", ...
20a66f5fe17b32e5e44979c26ec8fca1
Tests that the field uk region name has correct default value.
[ { "docid": "7ad5f17c217e2ad0ddbbd305165ca427", "score": "0.64815146", "text": "def test_uk_region_name(actual_uk_region_id, possible_uk_region_id, expected):\n investment_project = InvestmentProjectFactory()\n if actual_uk_region_id:\n investment_project.actual_uk_regions.add(parse_uuid(act...
[ { "docid": "7e29ae2184d4aea393895cb1a38957f2", "score": "0.7086188", "text": "def test_default_values(self):\r\n form = AustralianPlaceForm()\r\n self.assertTrue(re.search(SELECTED_OPTION_PATTERN % 'NSW',\r\n str(form['state_default'])))\r\n self.ass...
2f492391193d21e391f187901e5fa1dc
get the minimum node root at node
[ { "docid": "5b326b64d272fe62e99054fcbc1eba39", "score": "0.75541747", "text": "def min_node(self, node):\n if node is None:\n return\n curr = node\n while curr.left is not None:\n curr = curr.left\n return curr", "title": "" } ]
[ { "docid": "38fe563b4800c65347e0c3b604c4163e", "score": "0.84560716", "text": "def minimum(self):\n return self.minimum_node(self.root)", "title": "" }, { "docid": "9f5c4998799db6b9f2127d8d21a86ec8", "score": "0.81945544", "text": "def minvalue(node):\n cursor = node \n ...
d57f0ee2fe3702c783d948681b672191
Get the list of Snapshots
[ { "docid": "20b1f321f397d64a6aecaa6330326504", "score": "0.7944827", "text": "def getSnapshots(self):\n response, body = self.http.get('/snapshots')\n return body", "title": "" } ]
[ { "docid": "49f84d34119227ad50fa52d13d09fb43", "score": "0.82314456", "text": "def get_snapshots_list(self):\n request = self._build_request_url(\n [self.REQUEST_SNAPSHOTS, self.REQUEST_SNAPSHOTS_LIST])\n\n return json.loads(self._process_request(request))", "title": "" },...
abc5a1f084d1bb4c3fbf0efa308dcc4f
Cook up a fake group.
[ { "docid": "f612d0b8394f81610baedbcb6bd05359", "score": "0.0", "text": "def group_object_factory(group_type_id, **attributes):\n group = {\n 'name': rl_fake().word(),\n 'description': rl_fake().sentences(nb=1)[0],\n 'active': flip(),\n 'groupTypeId': group_type_id,\n ...
[ { "docid": "8cdd45be6df65e77b44660665779a97c", "score": "0.59586596", "text": "def test_create_group(self):\n pass", "title": "" }, { "docid": "2a352fd728637cf85ed4e2752e473ddf", "score": "0.59189045", "text": "def dummy_group_fixture(self):\n try:\n from anu...
c9b7fcef9c8934cafb0d5e9b726af7ef
Filter out include or libpath flags pointing to directories
[ { "docid": "d52e2576ef53b9c6f8090a07257f4f7b", "score": "0.55614215", "text": "def nonexistent_path_flags(cls, flags: AnySet[str]) -> OCDFrozenSet[str]:\n match_func = cls.directory_flag_matcher\n check_func = os.path.exists\n return OCDFrozenSet(\n filter(lambda flag: bo...
[ { "docid": "7003e546c3b31a256289940fe0d9f000", "score": "0.67606294", "text": "def include_flags(self):\n return \" \".join([\"-I\" + x for x in self.directories])", "title": "" }, { "docid": "529dbc089802271e42e6a220ae01d54f", "score": "0.6293114", "text": "def filter_toolcha...
f28a0bf064166e081a6aed00ad1adb70
gets the error description.
[ { "docid": "c92f86333d8f466655e6fadcd3fd7bfb", "score": "0.0", "text": "def description(self):\n\n return self._description", "title": "" } ]
[ { "docid": "767454acd36f8fd0da54896b02fb8955", "score": "0.8973676", "text": "def GetErrorDescription(self):", "title": "" }, { "docid": "de2e22bc4e4f9719fe97e9a1c1742446", "score": "0.8318775", "text": "def getErrorDesc(self):\n return self._error_desc", "title": "" }, ...
76ea43e2f89fb0d37f713ca3bca57611
run all contrasts through model
[ { "docid": "52d4f53a0f3b5e9acc36a42a2fc4edf0", "score": "0.6126068", "text": "def run(self, contrast, do_pmap = False):\n # Create contrast Volume\n data = self.weights.T.dot(contrast.vector)\n # print data[self._voxels_predicted]\n data[self.voxels_predicted] = npp.rs(data[...
[ { "docid": "981441a65f23576f435f647a9700a877", "score": "0.61060727", "text": "def contrastive_step(self, data):\n if self.step_id % self.report_interval == 0:\n self.visualize(data)\n\n self.optimizer.zero_grad()\n data = to_device(data, self.device)\n make_differentiable(data)\n ar...
4bd164fe888f4e8dd49dd0473517a0a0
Given a string rewrite the string as a block of text and return the columns of the block.
[ { "docid": "c6c9c634f9c1099d6dda62c15c508850", "score": "0.0", "text": "def encrypt(str):\n length = int(math.floor(len(str) ** 0.5))\n width = int(math.ceil(len(str) ** 0.5))\n while len(str) > length*width:\n length += 1\n str = str.ljust(length*width)\n\n result = []\n for i ...
[ { "docid": "36965b3d2c211f4629000c582719004e", "score": "0.6524146", "text": "def convert(string):\n string = string.upper()\n rows = [\"\", \"\", \"\", \"\", \"\"]\n\n for i in range(len(string)):\n b_char = BLOCK_CHAR[string[i]]\n for i in range(5):\n rows[i] += b_cha...
a206da35d1875a5bd983fe30e21ee345
Method for extracting the negative random value with settled minimum and maximum values.
[ { "docid": "3a8e7b4b55cdad8532cfb8d79b6d4e41", "score": "0.0", "text": "def rand(self):\n pass", "title": "" } ]
[ { "docid": "9cd0e7b95dbf464ecf16b47866d60332", "score": "0.6874778", "text": "def random_negative(self, value):\n if np.random.rand() < self.random_negative_prob:\n return -value\n else:\n return value", "title": "" }, { "docid": "6d795f79247e33effd70846ec...
be23d7683daca00e373a29768d3ceb1e
Helper Function used to hold information about source.
[ { "docid": "306ee5e70c004413151acaa5a82c7cc8", "score": "0.0", "text": "def _makeimap(self):\n self.map_['source'] = 'NAOJ'\n self.map_['provider'] = 'NRO'\n self.map_['instrument'] = 'NORH'\n self.map_['physobs'] = ''", "title": "" } ]
[ { "docid": "07df9a4b8a56ffb16ae2af1c35e2bde8", "score": "0.82223535", "text": "def _source_info(self):\n raise NotImplementedError", "title": "" }, { "docid": "8f1525149c824dd39c528c068e304f2b", "score": "0.80226475", "text": "def gets_source_info(self):\n return self.s...
a3aefbba4f3fe7499f753e9cc4189344
Return the command prefix used to access this instance. If the access method is 'local_netns', return the prefix to SSH to the instance throught the DHCP network namespace.
[ { "docid": "0497a1c5bc2c4f7841917b86195be32c", "score": "0.8331157", "text": "def _get_access_ssh_prefix_command(self):\n if CONF.instance_access == INSTANCE_ACCESS_LOCAL_NETNS:\n server = self.server.manager.get(self.server.id)\n network_name = server.networks.popitem()[0]\...
[ { "docid": "d034930ba238d451a6a15ec6fb6787e5", "score": "0.66399455", "text": "def connection_prefix(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"connection_prefix\")", "title": "" }, { "docid": "3e04c860ff4fb0d40a0607f04029da14", "score": "0.6254952", "text": "def...
8ab59f3b21a98b54621cd7170c19f9f1
list events from calendar, where start date >= start
[ { "docid": "80a4a8c3b7a3fab3c8d915a327a2f432", "score": "0.767218", "text": "def list_events_from(self, start: datetime) -> EventList:\n fields: str = \"nextPageToken,items(id,iCalUID,updated)\"\n events: EventList = []\n page_token: Optional[str] = None\n time_min: str = (\n...
[ { "docid": "ce00275f45df9e6338bd946652e6d651", "score": "0.72512436", "text": "def events(self, start, end):\n events = Event.query.filter(\n Event.group_id == self.id,\n Event.is_active == True,\n Event.parent_id == None # TODO: remove ugly hack - prevent dups\n...
9d7e1f7f5df28310d15c9647baa93f57
Print statistics of identified and unidentified in the dialog_occurrences
[ { "docid": "e959cdd5a0b58a5b01a40a7b18d2ba2b", "score": "0.759004", "text": "def compute_statistics(dialog_occurrences): \n cUnk = 0\n cOth = 0\n for d in dialog_occurrences:\n if d['from'] == []:\n cUnk += 1\n else:\n cOth += 1\n percentID = (1.0*cOth)/...
[ { "docid": "1a3c67914860fa14b0b9023ba7674167", "score": "0.67646086", "text": "def compute_statistics_CID(dialog_occurrences): \n cUnk = 0\n cOth = 0\n for d in dialog_occurrences:\n if len(d['from']) == 0:\n cUnk += 1\n else:\n cOth += 1\n percentID = (...
c0fd0ca17a9d16fbd8a9de5c0dacd58d
Loads a saved sklearn regression model or train new model
[ { "docid": "bf8e4a74820266704bb2e2f077c513fc", "score": "0.689888", "text": "def load_model(model_path):\n path_n = model_path\n if os.path.isfile(path_n):\n fil = open(path_n, \"rb\")\n prediction_model = pickle.load(fil)\n print(\"model found\")\n else:\n predictio...
[ { "docid": "0be94cf408d24cc8ffed8a3fa6a308d2", "score": "0.705837", "text": "def model(self):\n filePath1 = self.config['model_data1']['train_data']\n data = self.loadCSV(filePath1)\n cleandata = self.preprocess(data)\n X, y = self.dataSplit(cleandata)\n filepath2 = se...
39bfd9139fd023c1319d792d2f52643d
Test case for update_entry_membership
[ { "docid": "8d360ca07a627cb720c473ff7dd388d7", "score": "0.947138", "text": "def test_update_entry_membership(self):\n pass", "title": "" } ]
[ { "docid": "7ef61fa44c05bc75b72ab5b0b5efd3dd", "score": "0.77704763", "text": "def test_update_entry(self):\n pass", "title": "" }, { "docid": "7ca7fab9168ea8c5b33959eaa2673f7f", "score": "0.76735425", "text": "def test_update_membership_type(self):\n pass", "title"...
abe9377762dc8ca7dae12be903171755
Download bilingual file and parse it as [models.MxliffUnit]
[ { "docid": "6567f5aabc1fc5107c73953c4230f147", "score": "0.5796927", "text": "def get_bilingual_as_mxliff_units(\n self,\n project_id: int,\n job_uids: List[str]\n ) -> models.MxliffUnit:\n return mxliff.MxliffParser().parse(self.get_bilingual_file_xml(project_...
[ { "docid": "e408405ca2df7c6e47a2b616631da004", "score": "0.6113033", "text": "def retrieve_text(file_name):\n\n # Initialization\n he_rev_id = []\n en_rev_id = []\n he_page_name = []\n en_page_name = []\n # translated = []\n\n with open(file_name, 'r') as info:\n info.readlin...
1891419710c609da67c3b8d25c49a07a
Look into portal_catalog and return first story found
[ { "docid": "88b2634f12ffb71e518cf9db737fe470", "score": "0.6264447", "text": "def get_story(project_id, story_id):", "title": "" } ]
[ { "docid": "6dead8b4a9a802a90f7dd6f84bdf331f", "score": "0.59180546", "text": "def get_object(self, catalog, portal_type, title=None, **kwargs):\n if not title and not kwargs:\n return None\n contentFilter = {\"portal_type\": portal_type}\n if title:\n contentF...
b1b503812f818fd617459f0a4601f2fe
iterator doing a breadth first expansion of args
[ { "docid": "45e4eae1349b0aa1782a10647a84baa1", "score": "0.6627926", "text": "def breadth(iterable, testFn=isIterable, limit=sys.getrecursionlimit()):\n deq = _deque((x, 0) for x in iterable)\n while deq:\n arg, level = deq.popleft()\n if testFn(arg) and level < limit:\n f...
[ { "docid": "acefc46a9b3b6448986eaaa7135d2b45", "score": "0.7489818", "text": "def breadthIterArgs(limit=sys.getrecursionlimit(), testFn=isIterable, *args):\n deq = _deque((x, 0) for x in args)\n while deq:\n arg, level = deq.popleft()\n if testFn(arg) and level < limit:\n ...
8ab13c10f751fee03b02fbd3306888af
Tally a user's vote on his favorite hint.
[ { "docid": "fec81930c6623627cc1a009a140be9e0", "score": "0.70770836", "text": "def tally_vote(self, data):\r\n if self.user_voted:\r\n return {'error': 'Sorry, but you have already voted!'}\r\n ans = data['answer']\r\n if not self.validate_answer(ans):\r\n # Uh...
[ { "docid": "032db2842605f6bc0bfef2feb4c8d36b", "score": "0.6199063", "text": "def t(p, vote_count):\n return vote_count[p]", "title": "" }, { "docid": "360a0e38b8979ef8f0598a1dbf058b32", "score": "0.59225565", "text": "def auto_fav(q, count=5, result_type=\"recent\"):\n\n resul...
193289eca65ad1de4c8f26be05866866
Save the trajectory to VTK file sols list of return values of odeint outputFile
[ { "docid": "2cbebc2b84e1f507d8560b59c16a3750", "score": "0.6825749", "text": "def saveTrajectory(sols, outputFile):\r\n\r\n # number of contours\r\n nContours = len(sols)\r\n\r\n # number of points for each contour\r\n nptsContour = [sol.shape[0] for sol in sols]\r\n\r\n # total number of...
[ { "docid": "dd27b61786d1a199f83439837f88fbea", "score": "0.6813716", "text": "def _writeDemVtk(self):\n zDim = 1\n v = open(self.vtkOutputFile, 'w')\n v.write('# vtk DataFile Version 2.0\\n')\n v.write('Resampled DEM\\n')\n v.write('ASCII\\n')\n v.write('DATASET...
84e78c229edff92a2dfe9c829995bd95
Toma una dataframe de estados financieros y devuelve un vector de evolucion de una variable financiera
[ { "docid": "2576b42db78018823eb2d2d39eb98b62", "score": "0.6282502", "text": "def crea_df_de_puntos(df, concepto):\r\n #\r\n # Crea una lista vacia de fechas\r\n lista_de_fechas = []\r\n # Crea una lista vacia de valores\r\n lista_de_valores = []\r\n #\r\n # Donde 0 y 1 son las posi...
[ { "docid": "6df014f7b61a113cc7a2f6ea2df380d6", "score": "0.624267", "text": "def get_dataframe_implantaciones(self):\r\n \r\n return self.v.df_implantaciones.copy()", "title": "" }, { "docid": "dd867f3ac997ed01c0a1b77a6882a3aa", "score": "0.6163258", "text": "def var_ca...
7504c3669d05550d91d0e2c455e1eeb6
Helper function to get the value of the move with the minimum weight
[ { "docid": "5624456f1a3c79d0a5535eae1b9ccde5", "score": "0.6600952", "text": "def get_min_value(board, alpha, beta):\n min_value = math.inf\n min_move = None\n\n action_weights = []\n if terminal(board):\n return utility(board)\n\n for action in actions(board):\n min_val...
[ { "docid": "0145eba868631cb2c3642a449d530696", "score": "0.6817948", "text": "def min_value(game_state):\n v = sys.maxsize\n for move in game_state.possible_moves():\n v1 = value(game_state.successor(move, 'user'), 'AI') # little gud\n tup = [v, v1]\n # print(\"TUP\", tup)\n ...
e23cb37d97ac77657f5703518a9642e9
Define a nonequality test
[ { "docid": "95ec201ca7e997f00a3ab1a8028e341a", "score": "0.0", "text": "def __ne__(self, other):\n return not self.__eq__(other)", "title": "" } ]
[ { "docid": "24c5c676df052221a2504412bb2096be", "score": "0.71697515", "text": "def test_not_there_ok(self): # pragma: no branch", "title": "" }, { "docid": "f4314b49871a8596590a688621a3adec", "score": "0.6869145", "text": "def test_quality_is_never_negative_but_stays_at_0():\n ass...
5c4955589b646fadb7b033a550a8b280
Estimates the parameter X > Y.
[ { "docid": "55126a0452c8cc0dbdf99fd12f175219", "score": "0.0", "text": "def fit(self, X, Y, data, ivs=None, civs=None):\n if (ivs is None) and (civs is None):\n ivs = self.model.get_ivs(X, Y)\n civs = self.model.get_conditional_ivs(X, Y)\n\n civs = [civ for civ in civ...
[ { "docid": "e71147f5b83e3d6679dbfe1da7b8c4eb", "score": "0.6575952", "text": "def __gt__(self, y):\n return self._binary_operation(y, \"__gt__\")", "title": "" }, { "docid": "a1eb6a04cb06cec52254f9109f3b7f23", "score": "0.6464306", "text": "def conditional_est(X,Y):\n return ...
8a4bd4e73f5f820f2c92790c16a8da09
Test that manager handles dependencies correctly.
[ { "docid": "e274cd933131c2f7b7ea941410f67ca6", "score": "0.7210767", "text": "def test_dependencies(self):\n process_parent = Process.objects.filter(slug=\"test-dependency-parent\").latest()\n process_child = Process.objects.filter(slug=\"test-dependency-child\").latest()\n data_par...
[ { "docid": "26700313d381242bcc845d3b15ccdddc", "score": "0.67114073", "text": "def test_manager(self):\n manager = ISubscriptionManager(self.root.document, None)\n self.assertNotEqual(manager, None)\n self.assertTrue(verifyObject(ISubscriptionManager, manager),)\n\n manager =...
9df2c53b6f9220f5f435cda250380baf
Transforms data of arbitrary shape linear into a given range.
[ { "docid": "50387e328cc12ad552376c0c0b43bcd0", "score": "0.7565772", "text": "def normalize_linear(data, range=[-1, 1], data_range=None):\n if data_range is not None:\n xmin, xmax = data_range[0], data_range[1]\n else:\n xmin, xmax = np.min(data), np.max(data)\n\n data = (range[1]...
[ { "docid": "21feeb116766e8566d03092050f7e572", "score": "0.6647987", "text": "def linearscale(input, boundfrom, boundto):\n\n\t### check args\n\tif len(input) < 1:\n\t\treturn input\n\tif len(boundfrom) != 2:\n\t\traise ValueError, 'boundfrom must be length 2'\n\tif len(boundto) != 2:\n\t\traise ValueEr...
14a430696c4604428dfccbd582a58d4d
Add jump moves to the list of available moves.
[ { "docid": "dfb8975d7a80bd241b82a2a107fd3ad7", "score": "0.7265457", "text": "def add_jump_moves(self, loc):\n # go through adjacent field\n for i in range(len(Conf.NORMAL_DIRECTIONS)):\n jump_over_loc = (loc[0] + Conf.NORMAL_DIRECTIONS[i][0], loc[1] + Conf.NORMAL_DIRECTIONS[i][...
[ { "docid": "c4be96ae3dfd0e9491f987b4b956f0a8", "score": "0.65495294", "text": "def list_jumps(self):\n\n logger.debug(u'list_jumps(): position={}'.format(self.position))\n\n # Each jump chain begins with checker's starting position\n self._jump_chain = [self.position]\n logge...
c4e8c93c6258fee1b91052671f2f1037
Returns a fit model (and background if desired) for evaluation on data
[ { "docid": "b04841cbda08153c582a8082541e81c9", "score": "0.0", "text": "def getmodel(self, i, modelnumber, bckgsign=0):\n def individualmodel(x):\n bckg = self.bckg(x, self.getparams()[i][self.modelparamcount:])\n paramstart = sum(self.modelparams[:modelnumber])\n ...
[ { "docid": "1c9cafc520b5fb8eb1b1ab5879bf3780", "score": "0.6879479", "text": "def build_and_evaluate_model():\n y, X_without_constant, X = create_linreg_model_inputs()\n fit_and_evaluate_model_from_inputs(y, X_without_constant, X)", "title": "" }, { "docid": "ff6ab8ec878cafbd43cf5aaec0...
1489657d219db01357102495748f2c1b
Creates a Path object representing the full path of an output feature class in whatever the destination format is.
[ { "docid": "c9fb61ec9f74708b54f3fb10e6135b5c", "score": "0.0", "text": "def _feature_class_default_name(self, desc, output_workspace, **kwargs):\n return", "title": "" } ]
[ { "docid": "90e65dca5b6ac0d9ee582a58a09964c9", "score": "0.6265195", "text": "def dest_path(self) -> Path:\n pass", "title": "" }, { "docid": "90e65dca5b6ac0d9ee582a58a09964c9", "score": "0.6265195", "text": "def dest_path(self) -> Path:\n pass", "title": "" }, ...
933253e9cdd380d613041813dd603e18
Checks the arrival of each user to his desk and switch ON his devices.
[ { "docid": "cac54172c57f94e12612e679ab9fe9c5", "score": "0.61905897", "text": "def check_user_arrival():\n print('[{}] Checking user arrival'.format(datetime.now()))\n\n # Database and Fibaro credentials\n user = 'dadtkzpuzwfows'\n database_password = '1a62e7d11e87864c20e4635015040a6cb0537b1...
[ { "docid": "90c9d8582ab1661b1b528277052582af", "score": "0.6017518", "text": "def check_user_departure():\n print('[{}] Checking user departure'.format(datetime.now()))\n\n # Database and Fibaro credentials\n user = 'dadtkzpuzwfows'\n database_password = '1a62e7d11e87864c20e4635015040a6cb053...
b73b6734c98ffd85b806abcda78459bc
First enforce basic pointtopoint deps (in base class), then call ComputeAtStoreAtParser to normalize schedule.
[ { "docid": "b9d6a54d54e6b5e3f255a3b77f7a7db0", "score": "0.586543", "text": "def normalize(self, cfg):\n super(HalideComputeAtScheduleParameter, self).normalize(cfg)\n cfg[self.name] = ComputeAtStoreAtParser(cfg[self.name],\n self.post_dominat...
[ { "docid": "45a281a86547359deb6a5def2862f653", "score": "0.5088013", "text": "def update(self):\n try:\n soup = self._fetch_raw_train_status() # The raw\n self.schedule = self._create_trip_struct(soup) # The struct\n \n if self.metadata:\n ...
e361c790d3f65e1e27c73dc6e33652cd
Save a dataset to an HDF5 file
[ { "docid": "539658809dd9ab621f6380de089c0177", "score": "0.84975827", "text": "def save_dataset(dataset, outfile):\n import h5py\n f = h5py.File(outfile, 'w')\n for key in dataset.keys():\n f.create_dataset(key, data=dataset[key])\n f.close()", "title": "" } ]
[ { "docid": "ffd982c0c98aa42c210018a9eaf184eb", "score": "0.82145315", "text": "def saveToHdf5(data, dataset_name, save_path, filename):\n hf = h5py.File(os.path.join(save_path, filename), \"w\")\n hf.create_dataset(dataset_name, data=data, dtype=np.uint16)\n hf.close()", "title": "" }, ...
65c71fb8a4ab4f4cfe3284611a7507f9
Creates a database and deletes it if it already exists.
[ { "docid": "47b3a033fb75f986d7c6942aa34364bf", "score": "0.0", "text": "def syncdb(self):\n conn.execute('''DROP TABLE IF EXISTS CAMPGROUNDS''') # preventing \"sqlite3.OperationalError: table already exists\"\n\n conn.execute('''CREATE TABLE CAMPGROUNDS \n (ID ...
[ { "docid": "12ad554f5bd2d013fe7a9d8a77a2f529", "score": "0.79566014", "text": "def create_db():\n db.create_all()", "title": "" }, { "docid": "e5d7e8d159193a0ae38bfda54ba225f3", "score": "0.784458", "text": "def create_db():\n db.create_all()", "title": "" }, { ...
050cb928284b6a9c9703074777173b5e
Submits a job to a cluster. Autonaming is currently not supported for this resource.
[ { "docid": "4ff55f313bedd8830cdedccd4c460f33", "score": "0.0", "text": "def __init__(__self__,\n resource_name: str,\n opts: Optional[pulumi.ResourceOptions] = None,\n driver_scheduling_config: Optional[pulumi.Input[pulumi.InputType['DriverSchedulingConfig...
[ { "docid": "794c19caee503fbf75f81f1a57f4860f", "score": "0.69753313", "text": "def submit_job(self, **kwargs):\n # | - submit_job\n kwargs = merge_two_dicts(self.default_sub_params, kwargs)\n\n # | - Checking if job has already been submitted\n if \"path_i\" in kwargs:\n ...
c1df52cabfc7189ecec5abca901b75c2
Draws the bounding boxes and lines on the given image. is a list of dicts representing the people in the image, formatted like the output of sd_measure.measure_locations().
[ { "docid": "c847b55f5353e15a031ad357b5a9fb0f", "score": "0.7856473", "text": "def drawBoxesAndLines(image, people):\n for d in people:\n topLeft = (d['bbox'][3], d['bbox'][2])\n bottomRight = (d['bbox'][1], d['bbox'][0])\n center = tuple(coord // 2 for coord in tuple(map(operator...
[ { "docid": "cff4babb9963b0845d5f694602d07442", "score": "0.7160496", "text": "def draw_bounding_boxes_on_image(image,\n boxes,\n color='red',\n thickness=4,\n display_str_list_...
4d2d4a6fadcc40cdc77b1c55d2aa3696
Returns coarse grid resolution in Z direction
[ { "docid": "7058b97866df3c35a7390d99f2047246", "score": "0.82881844", "text": "def coarseResolutionZ(self):\n return self.params.coarseLengthZ/float(self.params.gridPointsZ-1)", "title": "" } ]
[ { "docid": "564e191f1313e6283343e82773a2f304", "score": "0.7533923", "text": "def fineResolutionZ(self):\n return self.params.fineLengthZ/float(self.params.gridPointsZ-1)", "title": "" }, { "docid": "2dcb68c291bb907c221b1fd53248cc41", "score": "0.695249", "text": "def coarseRe...
1c3e6eba438cb0b7f88a9298306938e7
Compress the data of the vasprun.xml file to a JSON file.
[ { "docid": "24184ad8ae62b939c1e2eb460220943b", "score": "0.0", "text": "def data(vasprun_file):\n from pybat.cli.commands.util import data\n\n data(vasprun_file=vasprun_file)", "title": "" } ]
[ { "docid": "80205bd7bb1a38c089e49e6edd257744", "score": "0.6087916", "text": "def xmltojson_cmd(infile, savedir):\n xmltojson(infile, savedir)", "title": "" }, { "docid": "6fd9ff7841d3a1c8d8e8b65fe5e9ebaa", "score": "0.58871293", "text": "def writeToJSON(portscan):\n with open(...
728861cd78198f1beb0a2d35a4cda8c4
Stream file to S3
[ { "docid": "a438e54a32e721581578a4a892c2ea3c", "score": "0.7667747", "text": "def stream_file_to_s3(upload_name, reader, is_certified=False):\n path, file_name = upload_name.rsplit('/', 1)\n logger.debug({\n 'message': 'Streaming file to S3',\n 'message_type': 'ValidatorDebug',\n ...
[ { "docid": "b5c9b9311e5316eb730da379a6a9a78e", "score": "0.80118376", "text": "def memory_to_s3(bucket, object_path, file_stream):\n s3 = boto3.resource('s3')\n object = s3.Object(bucket, object_path)\n object.put(Body=file_stream)\n print('%s uploaded' % object_path)", "title": "" }, ...
e8a02ce5f26fa8cc2d306060dd37be47
sort the car models (values) and return the resulting cars dict
[ { "docid": "404e0b2973bc4b852495dda2a2ade319", "score": "0.8415727", "text": "def sort_car_models(cars=cars):\n sorted_cars = {}\n for brand, models in cars.items():\n models.sort()\n sorted_cars[brand] = models\n return sorted_cars", "title": "" } ]
[ { "docid": "c8ac09c6b760c42b3fc69469c5426c6b", "score": "0.6511038", "text": "def sorted_model(self):\n return sorted(self.model.items(), key=operator.itemgetter(1))", "title": "" }, { "docid": "b55d91bcb4c51b57eee168deb7e6743d", "score": "0.63506234", "text": "def sort(self):\n ...
ebd980a0f02eb074c6f9f0f9147380f9
Calculate hydrophobic interactions. ODDT generates hydrophobic interactions for all pairs of atoms that are within the specification which results in multiple interactions between the same hydrophobic region of the ligand and protein. We reduce those down to a single interaction, the one that is the shortest. ODDT also...
[ { "docid": "496c4a21f0933581c691b52f4f7a00a8", "score": "0.65272385", "text": "def calc_hydrophobic_interactions(protein, mol, key_inters_defs, mol_key_inters):\n inters = {}\n protein_atoms, ligand_atoms = oddt.interactions.hydrophobic_contacts(protein, mol)\n for p, l in zip(protein_atoms, li...
[ { "docid": "d0953c0ffc6dd735c0c162d85a6996a9", "score": "0.6387586", "text": "def build_hydrogens(self):\n # TODO assumes only one continuous chain (and 1 set of N & C terminals)\n coords = coord_generator(self.coords, NUM_COORDS_PER_RES, remove_padding=True)\n new_coords = []\n ...
80d8890b2cfb3aa416f6c087e9576b4f
Find an active survey for this patient and query type. Return the survey object. If multiple found, return one of them. If not found, return None.
[ { "docid": "3980c8603b659c86e9d1c71d6e573392", "score": "0.78635794", "text": "def find_active(patient, query_type):\n surveys = PatientSurvey.objects.filter(patient=patient,\n query_type=query_type,\n sta...
[ { "docid": "b19987f4089aeada05a187bfa945b38c", "score": "0.58423394", "text": "def survey(self):\n if self._survey is None:\n raise AttributeError(\"Simulation must have a survey set\")\n return self._survey", "title": "" }, { "docid": "0905845b3ce81b84d035abf5993036...
8384be76a9abe6dd28cd5d8a5cc81821
Map a legacy Broker command to a ProtocolEngine command. A "before" message from the Broker is mapped to a ``RUNNING`` ProtocolEngine command. An "after" message from the Broker is mapped to a ``SUCCEEDED`` ProtocolEngine command. It has the same ID as the original ``RUNNING`` command, so when you send it to the Protoc...
[ { "docid": "c8bca8a292a19f41c2a3a6c0674068dc", "score": "0.6899797", "text": "def map_command( # noqa: C901\n self,\n command: legacy_command_types.CommandMessage,\n ) -> List[pe_actions.Action]:\n command_type = command[\"name\"]\n\n if command_type in _HIGHER_ORDER_COMM...
[ { "docid": "c6a69c15ffe15ed753ebb81596aff1e5", "score": "0.5849269", "text": "def apply_command(cmd):\n engine = cmd.engine\n engine.receive([cmd])", "title": "" }, { "docid": "e6b0287b396bfd7da5b1fd186c729b89", "score": "0.51245576", "text": "def _map_module_load(\n sel...
a126d70679d5ec5f9ed98706600eff52
Calls the admin/getdata endpoint.
[ { "docid": "39058c1a3e6b1ac687799b0c85a84b93", "score": "0.0", "text": "def get_data(server, experiment_id, participant_id, key, table=None, fmt=\"JSON\", version=cur_version):\n if table:\n server = \"%s/red-api/%s/admin/get-data/%s/%s/%s\" %(server, version, experiment_id, participant_id, ta...
[ { "docid": "4f15b4d47d7933e98acb489bd88a4210", "score": "0.6539754", "text": "def get_data(request):", "title": "" }, { "docid": "d837cc205318cee308e989ecee49c2df", "score": "0.64337784", "text": "def get_data(self, request=None):", "title": "" }, { "docid": "3399d8a3276a...
9acd87d0c5a1d50924a4858d5678a70a
Progress to the next task.
[ { "docid": "33a243f132a60ac649dcb76eae7d60aa", "score": "0.5585365", "text": "def next_task(self, indices=None):\n \n if indices is None:\n self.r_ind, self.c_ind = next(self.coarse_ind)\n else:\n self.r_ind, self.c_ind = indices", "title": "" } ]
[ { "docid": "174e212eb780bb121a7557b0ced88659", "score": "0.7682763", "text": "def advance(self):\r\n self._progress.update(self._task, advance=1)", "title": "" }, { "docid": "7725f6395dd670053c4e38b89900d66c", "score": "0.70731795", "text": "def step(self):\n self.progr...