query
stringlengths
9
3.4k
document
stringlengths
9
87.4k
metadata
dict
negatives
listlengths
4
101
negative_scores
listlengths
4
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Create the reference file of a test using the response received. The file will be created in the git references folder provided in the settings file
def create_reference( self, response_checker=default_checker.default_journey_checker ): # Check that the file doesn't already exist filename = self.get_file_name() filepath = os.path.join(config["REFERENCE_FILE_PATH"], filename) if os.path.isfile(filepath): logger.warning( "NO REF FILE CREATED - {} is already present".format(filepath) ) else: # Concatenate reference file info reference_text = OrderedDict() reference_text["query"] = self.query.replace( config["URL_JORMUN"][7:], "localhost" ) logger.warning("Query: {}".format(self.query)) reference_text["response"] = response_checker.filter( json.loads(self.full_resp) ) reference_text["full_response"] = json.loads( self.full_resp.replace(config["URL_JORMUN"][7:], "localhost") ) # Write reference file directly in the references folder with open(filepath, "w") as ref: ref.write(json.dumps(reference_text, indent=4)) logger.info("Created reference file : {}".format(filepath))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ref(request):\n r = referencepytest.ref(request)\n this_dir = os.path.abspath(os.path.dirname(__file__))\n r.set_data_location(os.path.join(this_dir, '..', 'reference'))\n return r", "def test_with_new_file(self):\n repository = self.create_repository(tool_name='Test')\n review_requ...
[ "0.65603554", "0.62640995", "0.62635124", "0.62011635", "0.6008765", "0.5936762", "0.5884765", "0.5857535", "0.5827133", "0.5797445", "0.5793405", "0.5725234", "0.57189417", "0.571022", "0.5687655", "0.5664678", "0.5638524", "0.56348014", "0.5630147", "0.5594338", "0.55792326...
0.70232326
0
Compare the response (which is a dictionary) to the reference First, the function retrieves the reference then filters both ref and resp Finally, it compares them
def compare_with_ref( self, response, response_checker=default_checker.default_journey_checker ): def ref_resp2files(output_file, output_json): """ Create a file for the filtered response and for the filtered reference """ with open(output_file, "w") as reference_text: reference_text.write(output_json) def print_diff(ref_file, resp_file): """ Print differences between reference and response in console """ # open reference with open(ref_file) as reference_text: reference = reference_text.readlines() # open response with open(resp_file) as response_text: response = response_text.readlines() # Print failed test name print_color("\n\n" + str(file_name) + " failed :" + "\n\n", Colors.PINK) symbol2color = {"+": Colors.GREEN, "-": Colors.RED} for line in difflib.unified_diff(reference, response): print_color(line, symbol2color.get(line[0], Colors.DEFAULT)) # Filtering the answer. (We compare to a reference also filtered with the same filter) filtered_response = response_checker.filter(response) # Get the reference # Create the file name filename = self.get_file_name() filepath = os.path.join(config["REFERENCE_FILE_PATH"], filename) assert os.path.isfile(filepath), "{} is not a file".format(filepath) with open(filepath, "r") as f: raw_reference = f.read() # Transform the string into a dictionary dict_ref = json.loads(raw_reference) # Get only the full_response part from the ref ref_full_response = dict_ref["full_response"] # Filtering the reference filtered_reference = response_checker.filter(ref_full_response) # Compare response and reference try: response_checker.compare(filtered_response, filtered_reference) except AssertionError as e: # print the assertion error message logging.error("Assertion Error: %s" % str(e)) # find name of test file_name = filename.split("/")[-1] file_name = file_name[:-5] # create a folder dir_path = config["RESPONSE_FILE_PATH"] if not os.path.exists(dir_path): os.makedirs(dir_path) # create path to ref and resp full_file_name_ref = dir_path + "/reference_" + file_name + ".txt" full_file_name_resp = dir_path + "/response_" + file_name + ".txt" json_filtered_reference = json.dumps(filtered_reference, indent=4) json_filtered_response = json.dumps(filtered_response, indent=4) # Save resp and ref as txt files in folder named outputs ref_resp2files(full_file_name_ref, json_filtered_reference) ref_resp2files(full_file_name_resp, json_filtered_response) # Print difference in console print_diff(full_file_name_ref, full_file_name_resp) raise
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compare_original_response_with_copy(context):\n original = context.response.json()\n copy = context.response_copy\n\n def compare_top_level_values():\n # get the list of fields that are JSON values not arrays\n keys = [val for val in original.iterkeys() if not isinstance(original[val], (...
[ "0.6025328", "0.57968277", "0.57027745", "0.56979775", "0.5373415", "0.532791", "0.5307729", "0.52962", "0.52779275", "0.5272271", "0.51982015", "0.5154221", "0.514683", "0.5144544", "0.51169497", "0.5078921", "0.5072906", "0.5058429", "0.5058264", "0.505702", "0.5056039", ...
0.7237854
0
Create a file for the filtered response and for the filtered reference
def ref_resp2files(output_file, output_json): with open(output_file, "w") as reference_text: reference_text.write(output_json)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def export_file(self):\n if self.args.keyfilter:\n self.filter_keys()\n if self.args.datafilter:\n self.filter_values()\n json.dump(self.outputdata, self.outfile, indent=self.args.indent)\n self.outfile.write('\\n')", "def create_reference(\n self, respons...
[ "0.602621", "0.59944147", "0.5985722", "0.5863088", "0.5780173", "0.5737445", "0.5735932", "0.5701409", "0.56273806", "0.5584363", "0.5571645", "0.55378807", "0.551075", "0.54842454", "0.5458675", "0.5398169", "0.5377229", "0.5367841", "0.5365113", "0.5354977", "0.5352039", ...
0.631874
0
Print differences between reference and response in console
def print_diff(ref_file, resp_file): # open reference with open(ref_file) as reference_text: reference = reference_text.readlines() # open response with open(resp_file) as response_text: response = response_text.readlines() # Print failed test name print_color("\n\n" + str(file_name) + " failed :" + "\n\n", Colors.PINK) symbol2color = {"+": Colors.GREEN, "-": Colors.RED} for line in difflib.unified_diff(reference, response): print_color(line, symbol2color.get(line[0], Colors.DEFAULT))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def compare_with_ref(\n self, response, response_checker=default_checker.default_journey_checker\n ):\n\n def ref_resp2files(output_file, output_json):\n \"\"\"\n Create a file for the filtered response and for the filtered reference\n \"\"\"\n with open...
[ "0.6958349", "0.6202376", "0.6095348", "0.5904432", "0.5885077", "0.5830992", "0.5810929", "0.57152325", "0.5700688", "0.5698527", "0.56759423", "0.56628805", "0.56229484", "0.55711806", "0.55609244", "0.55433357", "0.5525367", "0.549411", "0.5481868", "0.5465276", "0.5456778...
0.73701763
0
Generate a rightclick menu for the items
def context_menu(self, treeview, position): all_item = get_current_item(self,treeview,single=False) if len(all_item) == 1: item = all_item[0] list_operations = ['Print attrs','-','Plot Hist', 'Plot 2D'] action,actions = get_actions(treeview,position,list_operations) if action == actions['Print attrs']: send_dict_to_console(self,item,treeview) #print_attributes(self,item,treeview) if action == actions['Plot Hist']: plot_histogram(self,item,treeview) if action == actions['Plot 2D']: plot2d(self,item,treeview) elif len(all_item) == 2: item0,item1 = all_item list_operations = ['Plot Scatter','Plot Line'] action,actions = get_actions(treeview,position,list_operations) if action == actions['Plot Scatter']: plot1D(self,item0,item1,treeview,plot='scatter') if action == actions['Plot Line']: plot1D(self,item0,item1,treeview,plot='line')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_menus( self ):", "def create_menu():", "def addContextMenuItems(*args):", "def rightClickMenu(controlparent,control,qp,menuarray,rightclickfunction,added_arg):\r\n if menuarray == []:\r\n return 0;\r\n Rmnu = QtGui.QMenu(controlparent)\r\n for i, itm in enumerate(menuarray):\r\n ...
[ "0.7842248", "0.7701151", "0.72885704", "0.7128372", "0.7125885", "0.70448405", "0.70315874", "0.6985604", "0.68939555", "0.68497425", "0.6840268", "0.67227817", "0.6722002", "0.67210567", "0.6720659", "0.67192984", "0.6679403", "0.6652344", "0.6647002", "0.6645112", "0.66284...
0.65835065
25
Do something to the input and put the result in the output_quueue.
def process(self, input_element: Any) -> None: raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def output(self):\r\n self.logic ( )\r\n return self.output", "def run(self, input):\n print self.print_meep(input)", "def process(self, inputs):\n output = None\n return output", "def handle_output(self, workunit, label, s):\r\n pass", "def handle_output(self, workunit, label...
[ "0.62992793", "0.621587", "0.6168", "0.60797054", "0.60797054", "0.60701555", "0.6039619", "0.6010388", "0.6008327", "0.5957112", "0.59085846", "0.590205", "0.5835123", "0.5788597", "0.57883525", "0.5769604", "0.57273495", "0.57041085", "0.56851864", "0.56530696", "0.56336266...
0.0
-1
Proces elements from the input queue until empty.
def run(self) -> None: while True: try: input_element = self.input_queue.get_nowait() self.process(input_element) except Empty: return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def process_queue_fast(self):\n while self.queue:\n self.queue.popleft()()", "def _wait_empty(self):\n while True:\n if self.queue.empty():\n # We still have to wait for the last queue item being processed\n # (queue.empty() returns True before qu...
[ "0.7123321", "0.6928471", "0.6863272", "0.68230313", "0.681069", "0.67634106", "0.6683323", "0.6645927", "0.66053593", "0.66042024", "0.65760016", "0.65450245", "0.65428", "0.65332437", "0.64878625", "0.6477527", "0.6431174", "0.63786554", "0.6355708", "0.6354153", "0.6338230...
0.71853554
0
Download a single file from the web, singlethreaded.
def single_file_download(url: str, encoding: str = "utf-8") -> str: recipient = BytesIO() # the stream we will write into # print("Opening %r . . ." % url) curl = pycurl.Curl() curl.setopt(curl.URL, url) curl.setopt(curl.WRITEDATA, recipient) curl.perform() curl.close() # print("Closed %r." % url) return recipient.getvalue().decode(encoding)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _download_single(url, to, id):\n if os.path.exists(to):\n error_flags[id] = 1\n return\n\n try:\n request = rq.Request(url=url, headers=forge_agent_header)\n info = rq.urlopen(request).read()\n\n except urllib.error.URLError as e:\n print(url, 'urllib error')\n ...
[ "0.7207766", "0.7165215", "0.71526456", "0.7114009", "0.7071731", "0.70129436", "0.6987536", "0.6952817", "0.6934653", "0.6932239", "0.6927163", "0.6924666", "0.6897304", "0.68810105", "0.68735075", "0.68536335", "0.6847325", "0.68178904", "0.681241", "0.6794002", "0.6791782"...
0.6760712
23
Get the contents of the file at the given url.
def process(self, url: str) -> None: text = single_file_download(url, encoding="utf-8") self.output_queue.put(text)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def web_get_file(self, url):\n try:\n print(url)\n response = requests.get(url, verify=False)\n file_buffer = BytesIO(response.content)\n file_buffer.seek(0)\n return file_buffer\n except:\n print(traceback.print_exc())\n re...
[ "0.7789234", "0.7628709", "0.7561159", "0.75399375", "0.7516315", "0.73461986", "0.73405373", "0.7318421", "0.7309704", "0.7293151", "0.72760564", "0.71967506", "0.7170775", "0.71379685", "0.713316", "0.7123545", "0.71138036", "0.70557725", "0.7036462", "0.70032036", "0.69976...
0.0
-1
Pop all elements out of a queue using .get_nowait().
def get_all_nowait(queue: Queue) -> list: results = [] while True: try: result = queue.get_nowait() results.append(result) except Empty: break return results
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def use_queue():\n q = queue.Queue()\n for i in range(10):\n q.put_nowait(i)\n while q.qsize() > 0:\n element = q.get_nowait()\n sys.stdout.write(\"poping out from queue: {0}\\n\".format(element))", "def process_queue_fast(self):\n while self.queue:\n self.queue.po...
[ "0.7690526", "0.7386941", "0.73390293", "0.730532", "0.7302115", "0.71763545", "0.71752375", "0.714329", "0.70479155", "0.70476866", "0.7042465", "0.7022835", "0.7013579", "0.7004436", "0.6989313", "0.69627863", "0.6954468", "0.6933592", "0.6921749", "0.69049203", "0.6895917"...
0.7315528
3
Process every input using the given worker class.
def multiprocess(inputs: list, worker_class: Any, num_threads: int = 40): input_queue = Queue() # type: ignore output_queue = Queue() # type: ignore for input_elm in inputs: input_queue.put(input_elm) threads = [worker_class(input_queue, output_queue) for _ in range(num_threads)] for thread in threads: thread.start() for thread in threads: thread.join() return get_all_nowait(output_queue)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def processInputs(self):", "def process_inputs(self, inputs):", "def run(self):\n self.class_inst_obj.processor(self.msg)", "def process(self):\n raise NotImplementedError", "def run(self) -> None:\n\n while True:\n try:\n input_element = self.input_queue.get_...
[ "0.62040085", "0.6178794", "0.5952422", "0.59248585", "0.5817719", "0.56970406", "0.5652122", "0.56006", "0.5596137", "0.555472", "0.555472", "0.555472", "0.55169404", "0.54495186", "0.5403452", "0.5399591", "0.5373088", "0.5360921", "0.5338759", "0.53068113", "0.53002506", ...
0.64647937
0
Read a file from the internet, and put it in a folder on disk.
def download(urls: List[str], num_threads: int = 40) -> List[str]: num_files = len(urls) start = perf_counter() print("Starting download of %s files . . ." % num_files) results = multiprocess(urls, Downloader, num_threads=num_threads) dur = perf_counter() - start print("Completed download of %s files after %.3f seconds." % (num_files, dur)) return results
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def download(self, url):\n try:\n webFile = urllib.urlopen(url)\n localFile = open(self.workdir + \"/\" + url.split('/')[-1], 'w')\n localFile.write(webFile.read())\n webFile.close()\n localFile.close()\n except IOError:\n print(\"coul...
[ "0.6463796", "0.6256494", "0.61775124", "0.6177211", "0.60822904", "0.5990596", "0.5944307", "0.59229976", "0.589575", "0.58864975", "0.5879225", "0.58666736", "0.58587056", "0.5850899", "0.5834173", "0.5821299", "0.5803716", "0.5792066", "0.5764819", "0.5752733", "0.5699436"...
0.0
-1
Simple time series forecaster class
def __init__(self, cfg=None): if cfg is None: cfg = (1, 1, "persist") self.cfg = cfg self.shift, self.offset, self.avg_type = cfg self.forecast = self.average_forecast self.averager = None if self.avg_type == "mean": self.averager = np.mean elif self.avg_type == "median": self.averager = np.median elif self.avg_type == "persist": self.forecast = self.persistence_forecast elif self.avg_type == "drift": self.forecast = self.drift_forecast
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def model():\n return TimeSeriesMultiReg()", "def _build_forecast_series(self,\n points_preds: np.ndarray) -> TimeSeries:\n\n time_index = self._generate_new_dates(len(points_preds))\n\n return TimeSeries.from_times_and_values(time_index, points_preds, freq=self.tra...
[ "0.6148477", "0.59344846", "0.5870157", "0.58571", "0.5753403", "0.57533115", "0.57117873", "0.5679154", "0.56493205", "0.56239253", "0.56217587", "0.55675584", "0.5516488", "0.55088216", "0.5477455", "0.54756147", "0.5470915", "0.54526985", "0.54525316", "0.5447155", "0.5422...
0.0
-1
return info about recently modified events
def __init__(self, eventRegistry, maxCount = 500, mandatoryLang = None, mandatoryLocation = True, returnInfo = ReturnInfo()): QueryParamsBase.__init__(self) assert maxCount <= 500, "Maximum number of events returned per call is 500" self._er = eventRegistry self._setVal("addEvents", True) self._setVal("addArticles", False) self._setVal("recentActivityEventsMaxEventCount", maxCount) self._setVal("recentActivityEventsMandatoryLocation", mandatoryLocation) # return only events that have at least a story in the specified language if mandatoryLang != None: self._setVal("recentActivityEventsMandatoryLang", mandatoryLang) self._update(returnInfo.getParams("recentActivityEvents"))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getChanges():", "def modified_stats(self):\n return self._counts_per_month('last_modified')", "def updated_on(self):\n return self.get_time(\"updated_on\")", "def getLastModifiedTime(self): #$NON-NLS-1$\r", "def _get_changes_metadata(document):\n return ((el.get(author_attrib),\n ...
[ "0.6769352", "0.64247614", "0.6342947", "0.63398314", "0.6318615", "0.63153297", "0.6308564", "0.6271734", "0.6271734", "0.6271734", "0.6271734", "0.6255355", "0.62016386", "0.62016386", "0.61900157", "0.6164317", "0.6164317", "0.61549234", "0.61546636", "0.6148851", "0.60952...
0.0
-1
Get the latest new or updated events from Event Registry
def getUpdates(self): # execute the query ret = self._er.execQuery(self) if ret and ret.get("recentActivity") and ret["recentActivity"].get("events"): # return the updated information return ret["recentActivity"]["events"] # or empty return {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_events() -> list[Event]:\n g.ledger.changed()\n return [e for e in g.filtered.entries if isinstance(e, Event)]", "def get_events():\n url = app.config['EVENTS_ENDPOINT']\n response = requests.get(url, params={})\n if response.status_code == 200:\n return parse_events(response.json()...
[ "0.64524996", "0.63650477", "0.6306866", "0.62387884", "0.6169891", "0.6169891", "0.6113987", "0.6093191", "0.60880923", "0.5969866", "0.5965109", "0.59017813", "0.5898376", "0.5892461", "0.58733714", "0.58715504", "0.5857285", "0.5807864", "0.5802426", "0.5778328", "0.575562...
0.5839551
17
return info about recently added articles
def __init__(self, eventRegistry, maxCount = 500, mandatorySourceLocation = False, articleLang = None, returnInfo = ReturnInfo()): QueryParamsBase.__init__(self) assert maxCount <= 500, "Maximum number of articles returned per call is 500" self._er = eventRegistry self._setVal("addEvents", False) self._setVal("addArticles", True) self._setVal("recentActivityArticlesMaxArticleCount", maxCount) self._setVal("recentActivityArticlesMandatorySourceLocation", mandatorySourceLocation) if articleLang != None: self._setVal("recentActivityArticlesLang", articleLang) self._update(returnInfo.getParams("recentActivityArticles"))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_recently_articles(cls, num):\n return cls.objects.values('title', 'view_times', 'update_time', 'author')\\\n .filter(status=0).order_by('-update_time')[:num]", "def latest_content(request):\n latest_articles = Article.published_articles()[:5]\n latest_comments = Comment.objects.al...
[ "0.686497", "0.62624764", "0.6229607", "0.6219513", "0.61116755", "0.60870814", "0.6046967", "0.60119355", "0.5992242", "0.5978869", "0.5909099", "0.58944285", "0.58672863", "0.58509743", "0.5836655", "0.5833346", "0.578833", "0.5772408", "0.5724148", "0.5714202", "0.57078743...
0.0
-1
Get the latest new or updated events articles Event Registry.
def getUpdates(self): # execute the query ret = self._er.execQuery(self) if ret and ret.get("recentActivity") and ret["recentActivity"].get("articles"): # return the latest articles return ret["recentActivity"]["articles"]["activity"] # or empty return []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_events():\n url = app.config['EVENTS_ENDPOINT']\n response = requests.get(url, params={})\n if response.status_code == 200:\n return parse_events(response.json())\n raise RuntimeError('Error in retrieving events.')", "def _get_persistent_events(self) -> Dict[uuid.UUID, CronEvent]:\n ...
[ "0.6143702", "0.6038302", "0.6023639", "0.58556026", "0.58545154", "0.57816315", "0.5745347", "0.5734352", "0.5734352", "0.5719633", "0.5719397", "0.5698083", "0.5681828", "0.5623633", "0.56198883", "0.5609583", "0.5598598", "0.5597717", "0.5596118", "0.5584513", "0.55138314"...
0.5413742
32
Basic landing page for unauthenticated users
def login(): if current_user.is_authenticated: return redirect(url_for('main.home')) form = LoginForm() if form.validate_on_submit(): user = User.query.filter_by(email=form.email.data).first() if user and bcrypt.check_password_hash(user.password, form.password.data): login_user(user, remember=form.remember_me.data) next_page = request.args.get('next') # get next url parameter and after login redirect to requested page flash("Login Successful", 'success') # if there was request for specific page that needs authorization, then that argument assigned in # variable `next_page` keeps that and after login automatically user is redirect to that page return redirect(next_page) if next_page else redirect(url_for('main.home')) else: flash("Login Unsuccessful. Please check email and password", "danger") return redirect(url_for('users.login')) return render_template('login.html', title='Log In', form=form)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def landing():\n if g.user:\n return render_template('landing.html', user=g.user)\n return redirect(url_for('login'))", "def home_page():\n if not g.user:\n flash(\"Please login to view.\", \"warning\")\n return redirect('/login')\n return render_template('index.html')", "def h...
[ "0.7869509", "0.766923", "0.7648024", "0.76207626", "0.75354123", "0.7504049", "0.74748087", "0.73743373", "0.72935927", "0.7250666", "0.72364444", "0.7209014", "0.71815675", "0.71794057", "0.7173211", "0.7159091", "0.7151061", "0.71451926", "0.70916605", "0.7072187", "0.7066...
0.0
-1
Function allows for current user information modification. There is feature for change of default picture that is assigned during registration of new user. Part of change user picture is connected with save_image() function located in `utils.py` where name of original picture file is processing and then saved new_project_form in render_template() return is intentionally located here to allow for rendering tasks.new_project_2 function
def account(): form = UpdateAccountForm() new_project_form = ProjectForm() if form.validate_on_submit(): if form.picture.data: # if statement responsible for change of default picture picture_file = save_image(form.picture.data) current_user.img_file = picture_file current_user.user_name = form.user_name.data current_user.email = form.email.data db.session.commit() flash("Changes saved", "success") return redirect(url_for('users.account')) elif request.method == "GET": form.user_name.data = current_user.user_name form.email.data = current_user.email img_file = url_for('static', filename='images/' + current_user.img_file) return render_template('account.html', title="Account", form=form, img_file=img_file, new_project_form=new_project_form)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def account():\n\n form = UpdateUserForm()\n\n if form.validate_on_submit():\n print(form)\n if form.picture.data:\n username = current_user.username\n pic = add_profile_pic(form.picture.data,username)\n current_user.profile_image = pic\n\n current_user.u...
[ "0.63029945", "0.6147011", "0.60409224", "0.5987003", "0.5972466", "0.59428054", "0.5842993", "0.5805387", "0.5803387", "0.5779269", "0.57783127", "0.5758194", "0.57569313", "0.5720132", "0.57105464", "0.57057136", "0.56755704", "0.56709665", "0.56596", "0.56305", "0.5622149"...
0.6888967
0
Function that render form for email input that is destination of utils.send_reset_email function responsible for sending email to user with token that is available for specific period of time and reset user's password
def reset_password(): if current_user.is_authenticated: return redirect(url_for('main.home')) form = RequestResetForm() if form.validate_on_submit(): user = User.query.filter_by(email=form.email.data).first() send_reset_email(user) # located in utils.py flash('An email has been sent with instruction to reset your password', 'info') return redirect(url_for('users.login')) return render_template('reset_password_request.html', form=form)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset_password_request():\n form = ResetPasswordRequestForm()\n if form.validate_on_submit():\n try:\n user = User.query.filter_by(email=form.email.data).first_or_404()\n except Exception:\n flash('This Email ID is Not Registered', 'error')\n return render_t...
[ "0.7280214", "0.7197617", "0.7117962", "0.7043637", "0.704304", "0.6989297", "0.6984096", "0.69258046", "0.6875457", "0.6868493", "0.6868304", "0.6856506", "0.6787877", "0.6750242", "0.67212576", "0.6699849", "0.66945165", "0.66842115", "0.6680731", "0.66321975", "0.6630563",...
0.7324574
0
Routes handling reset password token (logic is coded in models.py), if token is valid user has chance to change his password and that change is committed to database, but when token is not valid or expired note is rendering to user
def reset_token(token): if current_user.is_authenticated: return redirect(url_for('users.home')) user = User.verify_secret_token(token) if user is None: flash('That is invalid or expired token', 'warning') return redirect(url_for('users.reset_password')) form = ResetPasswordForm() if form.validate_on_submit(): hashed_password = bcrypt.generate_password_hash(form.password.data).decode('utf-8') user.password = hashed_password db.session.commit() return redirect(url_for('users.login')) return render_template('reset_token.html', form=form)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def password_resetenter(request, uidb64=None, token=None):\n\n\tcontext_dict = {}\n\tif request.method == 'POST':\n\t\tassert uidb64 is not None and token is not None\n\t\tuid = urlsafe_base64_decode(uidb64)\n\t\tuser = models.Teacher.objects.get(\n\t\t\tsoft_delete=False, pk=uid\n\t\t)\n\t\tdb_user = user.user\n\...
[ "0.77497625", "0.7739758", "0.7730872", "0.77258337", "0.76405317", "0.75555956", "0.74249434", "0.7417758", "0.7381122", "0.7303035", "0.7288763", "0.72742236", "0.7218797", "0.713395", "0.7124694", "0.70419747", "0.69283503", "0.6910953", "0.69020367", "0.6885189", "0.68811...
0.73993194
8
Everything important about the chip
def __init__(self, channel=None, bpe=None, reservoir=None, electrodes=None, fluid_handling_system=None, material_in_optical_path=None, thickness_in_optical_path=None): #self.material = material # deprecated so the channel class can hold this information self.channel = channel self.bpe = bpe self.electrodes = electrodes self.fluid_handling_system = fluid_handling_system self.material_in_optical_path = material_in_optical_path self.thickness_in_optical_path = thickness_in_optical_path
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n ChipData.ChipData.__init__(self)", "def read_chip_info(self):\n return [self.read_chip_type(), self.read_chip_revision()]", "def support(self):", "def show(self):\n # Disable IRQ to improve speed\n with NoIRQ():\n for chip in range(NB_CHIPS):\n ...
[ "0.67811126", "0.6066584", "0.5964433", "0.59339035", "0.589296", "0.58123773", "0.58010674", "0.57554996", "0.5728705", "0.56449646", "0.56439716", "0.56414634", "0.56379575", "0.56379575", "0.5594598", "0.55358076", "0.5497361", "0.54925936", "0.5483349", "0.5473763", "0.54...
0.0
-1
Everything important about the chip
def __init__(self, length=None, width=None, height=None, material_bottom_wall_surface=None, material_top_wall_surface=None, material_fluid=None): self.length = length self.width = width self.height = height self.material_bottom_wall_surface = material_bottom_wall_surface # material should only hold relevant electrokinetic data self.material_top_wall_surface = material_top_wall_surface # material should only hold relevant elect self.material_fluid = material_fluid # could be a mixture of liquid materials + fluorescent particles
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n ChipData.ChipData.__init__(self)", "def read_chip_info(self):\n return [self.read_chip_type(), self.read_chip_revision()]", "def support(self):", "def show(self):\n # Disable IRQ to improve speed\n with NoIRQ():\n for chip in range(NB_CHIPS):\n ...
[ "0.67811126", "0.6066584", "0.5964433", "0.59339035", "0.589296", "0.58123773", "0.58010674", "0.57554996", "0.5728705", "0.56449646", "0.56439716", "0.56414634", "0.56379575", "0.56379575", "0.5594598", "0.55358076", "0.5497361", "0.54925936", "0.5483349", "0.5473763", "0.54...
0.0
-1
Everything important about the chip
def __init__(self, length=None, width=None, height=None, material=None, adhesion_material=None, dielectric_coating=None): self.length = length self.linspace_x = np.linspace(-length/2, length/2, num=100) self.width = width self.height = height self.material = material if self.material.thickness: if self.material.thickness != self.height: raise ValueError("BPE height must equal BPE material thickness") # adhesion layer used for thin metal film BPE self.adhesion_material = adhesion_material # dielectric coating on top of BPE if dielectric_coating: self.dielectric_coating = dielectric_coating else: self.dielectric_coating = material_solid(name='no_dielectric', permittivity=1, thickness=1e-12, Ka=6, Kb=2, reaction_site_density=5)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n ChipData.ChipData.__init__(self)", "def read_chip_info(self):\n return [self.read_chip_type(), self.read_chip_revision()]", "def support(self):", "def show(self):\n # Disable IRQ to improve speed\n with NoIRQ():\n for chip in range(NB_CHIPS):\n ...
[ "0.67811126", "0.6066584", "0.5964433", "0.59339035", "0.589296", "0.58123773", "0.58010674", "0.57554996", "0.5728705", "0.56449646", "0.56439716", "0.56414634", "0.56379575", "0.56379575", "0.5594598", "0.55358076", "0.5497361", "0.54925936", "0.5483349", "0.5473763", "0.54...
0.0
-1
details about the optical setup
def __init__(self, basePath=None, source=None, excitation=None, emission=None, dichroic=None, illumination_distribution=None, calculate_illumination_distribution=False, illumPath=None, illumSavePath=None, illumSaveName=None, showIllumPlot=False, save_txt=False, save_plot=False, save_image=False): self.basePath = basePath # this should come from CurlypivTestCollection self.source = source self.excitation_wavelength = excitation self.emission_wavelength = emission self.dichroic = dichroic if illumination_distribution is not None: self.illumination_distribution = illumination_distribution elif illumPath is not None: flatfield = io.imread(illumPath, plugin='tifffile') if len(np.shape(flatfield)) > 2: flatfield = np.asarray(np.rint(np.mean(flatfield, axis=0)), dtype='uint16') self.illumination_distribution = flatfield elif calculate_illumination_distribution and illumination_distribution is None: self.illumination_distribution = measureIlluminationDistributionXY(basePath=self.basePath, illumPath=illumPath, show_image=showIllumPlot, save_image=save_image, save_img_type='.tif', save_txt=save_txt, show_plot=showIllumPlot, save_plot=save_plot, savePath=illumSavePath, savename=illumSaveName) else: self.illumination_distribution = illumination_distribution self.flatfield = self.illumination_distribution if self.flatfield is not None: self.flatfield_mean = np.mean(self.flatfield) self.flatfield_std = np.std(self.flatfield)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def print_help(self):\r\n\t\ttext = \"\\tName: ml_scikit_OPTICS\"\r\n\t\ttext += \"\\n\\t\\tThis machine learning plugin uses scikit-learn's OPTICS algorithm.\\n\"\r\n\t\ttext += \"\\n\\t\\tOptional Parameters:\"\r\n\t\ttext += \"\\n\\t\\t\\tOPTICS_skip_normalization: Do NOT perform normalization (scaling) of dat...
[ "0.6185093", "0.60498106", "0.60332525", "0.6013268", "0.59627753", "0.592616", "0.5911552", "0.58811486", "0.58507645", "0.58053464", "0.5802036", "0.5802036", "0.5802036", "0.5802036", "0.57227117", "0.56944853", "0.56828725", "0.56805164", "0.5645888", "0.56457156", "0.564...
0.0
-1
details about dark field image
def __init__(self, basePath, darkframePath=None, flip_image_across_axis=None, show_image=False, save_image=False, save_img_type='.tif', savePath=None, savename=None, save_plot=False): self.basePath = basePath img, mean, std = calculate_darkfield(self.basePath, darkframePath=darkframePath, flip_image_axes=flip_image_across_axis, show_image=show_image, save_image=save_image, save_img_type=save_img_type, savePath=savePath, savename=savename, save_plot=save_plot) self.img = img self.mean = mean self.std = std
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dark(s='dark'):\n s = s.strip()[:80] #truncate to 80 char to fit in FITS header\n print camera.SetShutter(2)\n camera.status.imgtype = 'DARK'\n camera.status.object = s\n camera.status.update()", "def im_show(image_path):\n img = cv.imread(image_path, cv.IMREAD_ANYDEPTH)\n cv.namedWindo...
[ "0.6423711", "0.6173894", "0.6126788", "0.61006874", "0.60167235", "0.5981014", "0.58750916", "0.5868398", "0.58221865", "0.57751364", "0.57402325", "0.567587", "0.56675595", "0.566325", "0.5617019", "0.55742323", "0.5573085", "0.5560732", "0.5554698", "0.5546894", "0.5545018...
0.57655007
10
describes the micrscope setup
def __init__(self, type, objective, illumination, ccd): self.type = type # e.g. Olympus iX73 self.objective = objective self.illumination = illumination self.ccd = ccd
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup(self):\n pass", "def setup(self):\n pass", "def setup(self):\n pass", "def setup(self):\n pass", "def setup(self):\n pass", "def setup(self):\n pass", "def setup(self):\n pass", "def setup(self):\n pass", "def setup(self):\n p...
[ "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6309029", "0.6301397", "0.6280084", "0.62563354", "0.6255936", "0.6254392", "0.62412417", "0.6226122", "0.6226122", ...
0.0
-1
describe the CCD class
def __init__(self, exposure_time, img_acq_rate, EM_gain, name='iXon Ultra 897', img_acq_type='emcdd', darkfield=None, binning=None, vertical_pixel_shift_speed=0.5e-6, horizontal_pixel_shift_speed=0.1e-6, horizontal_pixel_shift_rate_bits=14, frame_transfer=True, crop_mode=False, acquisition_mode='kinetic', triggering='internal', readout_mode='image', pixels=512, pixel_size=16e-6): self.name = name self.img_acq_type = img_acq_type self.exposure_time = exposure_time self.img_acq_rate = img_acq_rate self.em_gain = EM_gain self.darkfield = darkfield self.binning = binning # supporting camera acquisition settings self.vpss = vertical_pixel_shift_speed self.hpss = horizontal_pixel_shift_speed self.hpss_bits = horizontal_pixel_shift_rate_bits self.frame_transfer = frame_transfer self.crop_mode = crop_mode self.acquisition_mode = acquisition_mode self.triggering = triggering self.readout_mode = readout_mode if isinstance(pixels, int): self.pixels = (pixels, pixels) else: self.pixels = pixels self.pixel_size = pixel_size self.image_area = (self.pixels[0]*pixel_size, self.pixels[1]*pixel_size)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def describe(self) -> str:", "def describe(self):\n raise NotImplementedError()", "def describe(self):\n raise NotImplementedError()", "def description(self):\n return '%s and a CD' % self.component.description()", "def describe(self):\n print(self.description)", "def describe...
[ "0.6843358", "0.68146247", "0.68146247", "0.671449", "0.66597164", "0.66597164", "0.6572881", "0.6530383", "0.6361396", "0.6335927", "0.6335927", "0.6249203", "0.6237307", "0.6237307", "0.6230096", "0.6198816", "0.61736053", "0.6132944", "0.6123131", "0.6112898", "0.6087091",...
0.0
-1
this class holds images for the microgrid and performs pixel to micron scaling calculations
def __init__(self, gridPath=None, center_to_center_spacing=None, feature_width=None, grid_type='grid', show_grid=False): if gridPath is not None: self.gridPath = gridPath self.spacing = center_to_center_spacing self.width = feature_width self.grid_type = grid_type # find files in directory file_list = glob.glob(join(self.gridPath, 'grid*.tif')) if len(file_list) < 1: raise ValueError("No grid*.tif files found in {}".format(self.gridPath)) img_grid = np.zeros(shape=(512,512)) for f in file_list: img = io.imread(f, plugin='tifffile') if len(np.shape(img)) > 2: img = np.mean(img, axis=0) img_grid += img img_grid = img_grid / len(file_list) self.img_grid = img_grid if show_grid is True: fig, ax = plt.subplots() ax.imshow(img_grid, cmap='gray') ax.set_xlabel('pixels') ax.set_ylabel('pixels') plt.title('grid: 10 um Lines; 50 um Spacing') plt.show()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def run(self):\n #calculate platescale of first input image\n try:\n det = np.linalg.det(wcs.WCS(self.datain[0].header).wcs.cd)\n pscale = np.sqrt(np.abs(det))*3600.\n except:\n try:\n det = np.linalg.det(wcs.WCS(self.datain[0].header).wcs.pc)\n ...
[ "0.69724894", "0.6320908", "0.63168067", "0.6197034", "0.61356825", "0.60902923", "0.60631675", "0.6053572", "0.6046153", "0.60447425", "0.6000556", "0.5958693", "0.5948496", "0.59227127", "0.59221554", "0.59041744", "0.5895156", "0.5886209", "0.58859426", "0.58822227", "0.58...
0.0
-1
the details of the fluroescent particles used
def __init__(self, name=None, materials=None,diameter=None,fluorescence_spectra=None, concentration=None, electrophoretic_mobility=None, zeta=None): self.name = name self.materials=materials self.concentration=concentration self.electrophoretic_mobility=electrophoretic_mobility self.zeta=zeta self.diameter=diameter if diameter: k_b = 1.3806e-23 T=298 mu=0.001 self.diffusivity = k_b*T/(6*np.pi*mu*diameter/2) self.fluorescence_spectra=fluorescence_spectra
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, particles):\n self.particles = particles", "def __len__(self):\n return self.nparticles", "def particles(self):\n if self.data_section is None:\n return None\n data_keys = self.data_section.keys()\n if bool(data_keys)==False:\n return ...
[ "0.62281686", "0.6164579", "0.6101659", "0.6095347", "0.6041156", "0.6022373", "0.59413975", "0.5927904", "0.5923357", "0.59131575", "0.5900847", "0.5889833", "0.5871284", "0.58277595", "0.5819351", "0.5806105", "0.57995564", "0.5764965", "0.5761083", "0.5722828", "0.56739026...
0.0
-1
describes the micrscope setup
def __init__(self, diameter, height, height_of_reservoir=None, material=None): g = 9.81 # m/s**2 self.material = material self.diameter = diameter self.height = height self.volume = np.pi*self.diameter**2/4 self.height_of_reservoir = height_of_reservoir if material and height_of_reservoir: self.hydrostatic_pressure = material.density*g*self.height_of_reservoir
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup(self):\n pass", "def setup(self):\n pass", "def setup(self):\n pass", "def setup(self):\n pass", "def setup(self):\n pass", "def setup(self):\n pass", "def setup(self):\n pass", "def setup(self):\n pass", "def setup(self):\n p...
[ "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6317719", "0.6309029", "0.6301397", "0.6280084", "0.62563354", "0.6255936", "0.6254392", "0.62412417", "0.6226122", "0.6226122", ...
0.0
-1
describes the fluid handling system
def __init__(self, fluid_reservoir=None, all_tubing=None, onchip_reservoir=None): self.fluid_reservoir=fluid_reservoir self.all_tubing = all_tubing self.onchip_reservoir = onchip_reservoir
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def system_fleet_dimensioning(self):", "def define_forms(self):\n\n # Define UFL objects corresponding to the local acceleration\n # if problem is unsteady.\n self.define_ufl_local_inertia()\n self.define_ufl_local_inertia_diff()\n\n # Define UFL objects corresponding to the co...
[ "0.55242515", "0.5524179", "0.5290922", "0.52189064", "0.51642203", "0.5117331", "0.5084165", "0.50247896", "0.49878523", "0.49760827", "0.49751097", "0.49734625", "0.49661058", "0.4918144", "0.49163127", "0.49124214", "0.4886242", "0.4886242", "0.48820427", "0.48705277", "0....
0.0
-1
describes each segment of tubing
def __init__(self, inner_diameter=None, length=None, material=None): self.inner_diameter = inner_diameter self.length = length self.material = material
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def segment(data):", "def info(self):\n c = 0\n for s in self.segments:\n c+= len(s.points)\n return \"Nodes : %5i\\nSegments : %5i\\nPoints : %5i\" % (len(self.nodes), len(self.segments), c)", "def test_getting_segments(self):\n pass", "def _get_seg_repr(self, se...
[ "0.65298843", "0.6119681", "0.5801361", "0.57355803", "0.573119", "0.56613064", "0.56600964", "0.55376303", "0.5510109", "0.5501271", "0.5472551", "0.5463381", "0.5461672", "0.5427262", "0.5396404", "0.5374486", "0.5335036", "0.5311621", "0.53089184", "0.5294616", "0.52887076...
0.0
-1
this class describes the optical characteristics of any material or element
def __init__(self, passing_wavelengths=None, reflectivity=None): self.passing_wavelengths=passing_wavelengths self.reflectivity=reflectivity
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getAllAttribute(self):\n\n self.shape_type = OpenMaya.MPlug(self.thisObj, self.iShapeType).asShort()\n self.draw_type = OpenMaya.MPlug(self.thisObj, self.iDrawingType).asShort()\n self.up_axis = OpenMaya.MPlug(self.thisObj, self.iUpAxis).asShort()\n self.xRay = OpenMaya.MPlug(self.t...
[ "0.6058424", "0.5873271", "0.5822662", "0.57114613", "0.5669548", "0.5591406", "0.55108035", "0.5495015", "0.54344803", "0.54193187", "0.5389301", "0.5373029", "0.5358729", "0.5333054", "0.5332131", "0.5322646", "0.53215945", "0.5312435", "0.52957547", "0.52953637", "0.529432...
0.0
-1
what value was measured and when
def __init__(self, reference_value=None, measured_value=None): self.reference_value = reference_value self.measured_value = measured_value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calc_stat_values(self):", "def measure(self):\n pass", "def observation_value(self):\n pass", "def state(self):\n return self._measure", "def t_measure_estimate(self):\n ho = self.humidity_oversampling\n to = self.temperature_oversampling\n po = self.pressure_overs...
[ "0.66767734", "0.6539252", "0.64366204", "0.6429938", "0.64134157", "0.63915974", "0.63749766", "0.6278977", "0.6275547", "0.61454076", "0.61454076", "0.61454076", "0.61224276", "0.6064027", "0.6003514", "0.59992427", "0.59715676", "0.5941743", "0.58559453", "0.58508056", "0....
0.0
-1
Object for storing measurements
def __init__(self, value=None, date=None): self.value = value self.date = date
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def measurements(self) -> NONEARRAY:\n pass", "def measurements(self):\n return self._measurements", "def measurements(self):\n return self.config['measurements']", "def getMeasures():", "def getMeasurements(self):\n return self._Measurements", "def _measure():\n return {\n...
[ "0.7203409", "0.6870602", "0.68244916", "0.6779195", "0.6685213", "0.6621161", "0.65731907", "0.6567633", "0.656311", "0.65522236", "0.653955", "0.65327895", "0.6467614", "0.6393451", "0.6393451", "0.63583064", "0.6340271", "0.6315247", "0.6288799", "0.62670773", "0.62450945"...
0.0
-1
Object for holding electrode configuration details
def __init__(self, material=None, length=None, entrance_length=None): self.material = material self.length = length self.entrance_length = entrance_length
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def configuration():", "def config(self):\n raise NotImplementedError", "def _est_config(self):\n return self._est_method.config", "def config(self):\n pass", "def config(self):\n pass", "def config(self):\n return None", "def get_config(self):\n return {\"name...
[ "0.70692134", "0.6935257", "0.6863148", "0.68504906", "0.68504906", "0.68297553", "0.6823189", "0.6751167", "0.6721291", "0.6666818", "0.65857863", "0.65857863", "0.6573653", "0.6544272", "0.65333617", "0.65164155", "0.6505307", "0.65036625", "0.64881974", "0.64446115", "0.64...
0.0
-1
everything about a material
def __init__(self, name=None, zeta=None, concentration=None, index_of_refraction=None, transparency=None, fluorescence_spectra=None, permittivity=None, conductivity=None, thickness=None, youngs_modulus=None, poissons_ratio=None, density=None, dielectric_strength=None, reaction_site_density=None, Ka=None, Kb=None, width=None, length=None): # identity self.name = name # geometry self.length = length self.width = width self.thickness = thickness # mechanical self.density = density self.concentration = concentration # For a solid, this is % by volume. self.youngs_modulus = youngs_modulus self.poissons_ratio = poissons_ratio # optical self.index_of_refraction = index_of_refraction self.fluorescence_spectra = fluorescence_spectra self.transparency = transparency if self.transparency: self.reflectivity = 1 / self.transparency # electrochemical self.conductivity = conductivity if permittivity: self.permittivity = permittivity self.zeta = zeta self.dielectric_strength = dielectric_strength if reaction_site_density: self.reaction_site_density = reaction_site_density*1e18 # (#/nm2) surface density of reaction sites: accepts nm2 and converts to m2 (see Squires) self.Ka = Ka # reaction equilibrium constant - upper bound self.Kb = Kb # reaction equilibrium constant - lower bound
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def material(self):\n return self._F_Mstr", "def show_materials(self):\n print('\\nThe materials with known dielectric properties are:\\n')\n pprint.pprint(mats.Electrical.props)\n# pprint.pprint(mats.Electrical.DIELECTRIC)\n print('\\nThe materials with known loss tangents ar...
[ "0.70637417", "0.6998246", "0.6904607", "0.6898203", "0.6760521", "0.6738587", "0.66976964", "0.663665", "0.65911734", "0.6587051", "0.6576873", "0.6487353", "0.64594245", "0.63723415", "0.6360623", "0.63506037", "0.63310814", "0.631915", "0.62650704", "0.62001616", "0.619735...
0.0
-1
everything about a liquid
def __init__(self, name=None, species=None, concentration=None, conductivity=None, pH=None, density=None, viscosity=None, permittivity=None, temperature=None, valence=1.0): # identity self.name = name # electro/chemical self.species = species self.concentration = concentration # (mmol) = (mmol/L) = (mol/m3) self.conductivity = conductivity if permittivity: self.permittivity = permittivity if pH: self.pH = pH self.c_H = 10**-pH * 1e3 # (mmol) = (mmol/L) = (mol/m3); (concentration of Hydrogen ions (H+) self.valence = valence # mechanical self.density = density self.viscosity = viscosity self.temperature = temperature self.diffusivity = 2e-9 # (m^2/s) Diffusivity of KCl in DI water [Soni]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def on_received_liquidation(self, liquidation):\n pass", "def liquid_viscosity(id, temperature=298.15, pressure=constants.atm): # noqa: A002\n return rx._misc._get_chemical(id, temperature, pressure).mul # noqa: SLF001", "def vault(self):", "def main():\n ## real SWAT tags", "def capteur_inf...
[ "0.5671805", "0.5175566", "0.5175554", "0.516426", "0.50640386", "0.50614387", "0.50591075", "0.49937275", "0.4983017", "0.49820462", "0.49783403", "0.49738714", "0.49507678", "0.4948753", "0.4924024", "0.48813003", "0.4849777", "0.48445272", "0.483933", "0.48176083", "0.4808...
0.0
-1
Telt de lijst op.
def som(getallenlijst): total = sum(getallenlijst) return total
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _ltz(self):\n raise NotImplementedError(\"_ltz is not implemented\")", "def LDLT(self):\n\t\tpass", "def l_un_degenerate(self):\n self.right = self.tmp", "def l_degenerate(self):\n self.tmp = self.right\n self.right = self.left", "def tilt(self) -> int:", "def dl2(vec):\n ...
[ "0.54447126", "0.53171045", "0.53147423", "0.5244896", "0.5144233", "0.51063067", "0.50482875", "0.5036076", "0.49402636", "0.49142268", "0.49142268", "0.48477957", "0.48162255", "0.47698143", "0.47529215", "0.47407043", "0.47301647", "0.46932566", "0.46881244", "0.46654546", ...
0.0
-1
Tests that 1 + 1 always equals 2.
def test_basic_addition(self): self.assertEqual(1 + 1, 2)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_sanity(self):\n self.assertEquals(2 + 2, 4)", "def test_basic_addition(self):\n self.failUnlessEqual(1 + 1, 2)", "def test_basic_addition(self):\n self.failUnlessEqual(1 + 1, 2)", "def test_basic_addition(self):\n self.failUnlessEqual(1 + 1, 2)", "def test_basic_additio...
[ "0.700804", "0.69351697", "0.69351697", "0.69351697", "0.688757", "0.688757", "0.666264", "0.64881384", "0.64450884", "0.64153033", "0.6410425", "0.6410405", "0.6379688", "0.6379688", "0.63732797", "0.6352445", "0.6350113", "0.6348631", "0.6348631", "0.6348631", "0.6348631", ...
0.63992167
31
Test the flow for 3.6 and up, async generators are not supported in 3.5.
async def test_tornado_list_tables(self): tables = self.r.table_list().run(self.conn) assert isinstance(tables, list)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def test2(self):\n return True", "def test_future_event(self):\n pass", "def test_annotated_async_from_coro(dut):\n v = yield produce.async_annotated(Value(1))\n assert v == 1\n\n try:\n yield produce.async_annotated(Error(SomeException))\n except SomeException:\n...
[ "0.61319363", "0.59815097", "0.5970306", "0.5963432", "0.59373856", "0.58596766", "0.58034384", "0.5793992", "0.5694973", "0.56823844", "0.5653525", "0.5652958", "0.56505305", "0.5636267", "0.55687475", "0.5558097", "0.54776096", "0.5461566", "0.54609054", "0.5459655", "0.545...
0.0
-1
Returns pandas dataframe which has latest record for each manual id after merging all "sheet_name" in the previously indexed_files which are present in "indexed_files_dir"
def zeta0_creation(self, indexed_files_dir, merge_columns): indexed_files = [file for file in os.listdir(indexed_files_dir) if not file.startswith("~")] indexed_files_dict = {} indexed_files_dict.clear() dateList = [] del dateList[:] for file in indexed_files: dated = file.split('_')[-1].split('.')[0] dated = dated[4:] + dated[:4] dateList.append(dated) indexed_files_dict[dated] = file dataframes = {} for dated, file in indexed_files_dict.items(): file_name = indexed_files_dir + '\\' + file dataframes[dated] = pd.read_excel(file_name, sheet_name=0) dataframes[dated]['file_date'] = dated dataframes[dated]['mid'] = [int(elem.split('_')[-1]) for elem in dataframes[dated]['manual_id']] merged_df = pd.concat([dataframes[dated] for dated in dateList], ignore_index=True) merged_df = merged_df.sort_values('file_date', ascending=False) zeta0 = merged_df.drop_duplicates(subset='manual_id', keep='first') pd.set_option('mode.chained_assignment', None) for col in zeta0.columns: zeta0[col] = zeta0[col].astype('str') zeta0 = zeta0.apply(lambda x: x.str.strip() if x.dtype == "object" else x) zeta0 = zeta0.sort_values('mid', ascending=True) if "manual_id" not in merge_columns: merge_columns.append("manual_id") zeta0 = zeta0[merge_columns] # print(zeta0) return zeta0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def merge_walkupseq_files(latest_tsca_id):\n paths = glob.glob('walkupseq_files/*sample_info*')\n\n dfs = []\n for f in paths:\n tmp = pd.read_table(f, encoding='latin1')\n dfs.append(tmp)\n\n df = pd.concat(dfs, axis=0)\n df.to_csv('walkupseq_files/walkupseq_all_combined_%s.txt'%lates...
[ "0.5289423", "0.52650183", "0.52591753", "0.52265924", "0.51847774", "0.5076782", "0.5037608", "0.50096446", "0.5009643", "0.5001173", "0.4953621", "0.494462", "0.493642", "0.49348438", "0.49298787", "0.48461", "0.48410356", "0.48382828", "0.4834661", "0.48010856", "0.4796004...
0.63463265
0
Attempts to parse a surt string into its component parts.
def __init__(self, surt): self._surt = surt try: self.protocol, surt = surt.split('://(') except ValueError: self.protocol = surt surt = '' try: self.domain, surt = surt.split('/', 1) except ValueError: self.domain = surt surt = '' try: self.path, surt = surt.split('?') except ValueError: self.path = surt self.query = '' surt = '' try: self.query, self.hash = surt.split('#') except ValueError: if surt != '': self.query = surt self.hash = '' surt = '' if self.path: self.path_parts = self.path.split('/') self.path_parts = [part for part in self.path_parts if part != ''] else: self.path_parts = [] if self.domain: self.domain_parts = self.domain.replace(')', '').split(',') self.domain_parts = [ part for part in self.domain_parts if part != ''] else: self.domain_parts = [] self.parts = [] self.parts.append(self.protocol + '://(') for domain_part in self.domain_parts: self.parts.append('{},'.format(domain_part)) self.parts[-1] = '{})'.format(self.parts[-1]) for path_part in self.path_parts: self.parts.append('/{}'.format(path_part)) self.parts.append(self.query) self.parts.append(self.hash) self.parts = [part for part in self.parts if part != '']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse(s):\n return s", "def parseString(self, s):\n pass", "def parse(cls, s):\n raise NotImplementedError", "def parse_string(self, in_str):\n match = MAIN_REGEX.search(in_str)\n if not match:\n err_str = \"Unable to parse string: %s\" % in_str\n ...
[ "0.60741115", "0.60195297", "0.59897935", "0.5646392", "0.5526063", "0.5425705", "0.5401909", "0.5301537", "0.52829874", "0.52163225", "0.5190413", "0.5171466", "0.5171442", "0.5124075", "0.50967103", "0.5088532", "0.5067676", "0.50537384", "0.50519437", "0.50450486", "0.5031...
0.55399895
4
UCB1 algorithm ucb1 = winrate + sqrt(2lnn / ni)
def ucbScore(self,totalPlayedTimes): winRate = self.winRate() #print totalPlayedTimes #print self.playedTimes confidenceInterval = math.sqrt(2 * math.log(totalPlayedTimes,math.e) / self.playedTimes) return winRate + confidenceInterval
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def algo_UCB(mu, Na):\n i = 0\n while i < Na.size:\n if Na[i] < 1:\n return i\n else:\n i+= 1\n t = Na.sum()\n return np.argmax(mu + np.sqrt(2*np.log(t)/Na))", "def _ucb(self, s, k):\n if self.confidence_method == 'ucb-standard':\n ucb_factor = self._ucb_st...
[ "0.63876575", "0.633093", "0.6154798", "0.6075605", "0.5960223", "0.58998066", "0.58998066", "0.5878511", "0.582961", "0.5794877", "0.5789813", "0.5785925", "0.57034636", "0.5690178", "0.5688557", "0.56797487", "0.56768996", "0.5637333", "0.5628463", "0.56043136", "0.5594184"...
0.55336875
25
Custom displayhook for the exec in default(), which prevents assignment of the _ variable in the builtins.
def displayhook(self, obj): # reproduce the behavior of the standard displayhook, not printing None if obj is not None: print >> self.stdout, repr(obj)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def displayhook(arg):\n if arg is not None:\n __builtin__._ = None\n print stringify_func(arg)\n __builtin__._ = arg", "def __displayhook__(*args, **kwargs): # real signature unknown\n pass", "def displayhook(p_object): # real signature unknown; restored from __doc__\...
[ "0.7744383", "0.6542661", "0.6142525", "0.58426565", "0.578165", "0.5749669", "0.55891895", "0.55188674", "0.550801", "0.5497482", "0.54949677", "0.54631275", "0.53636926", "0.5337594", "0.53103167", "0.53094953", "0.52910274", "0.5272987", "0.5272368", "0.52542436", "0.52296...
0.56435174
6
Produce a reasonable default.
def defaultFile(self): filename = _odb.getCurrentFrame().filename if filename == '<string>' and self.mainpyfile: filename = self.mainpyfile return filename
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getDefault():", "def Default():\n return _DEFAULT", "def default():", "def f_default(self, default = 1) :\n pass", "def default():\n return DefaultSwh.default()", "def _defaulted(cls, value, default):\n return default if value is None else value", "def default(str):\n ret...
[ "0.77582496", "0.7588288", "0.7476828", "0.7380406", "0.7205692", "0.70597076", "0.6892593", "0.686635", "0.68469757", "0.6833807", "0.67760617", "0.67025155", "0.6625156", "0.65530145", "0.65388095", "0.65117794", "0.65041345", "0.64939255", "0.64847153", "0.64734393", "0.64...
0.0
-1
Helper function for break/clear parsing may be overridden. lookupmodule() translates (possibly incomplete) file or module name into an absolute file name.
def lookupmodule(self, filename): if os.path.isabs(filename) and os.path.exists(filename): return filename f = os.path.join(sys.path[0], filename) if os.path.exists(f) and self.canonic(f) == self.mainpyfile: return f root, ext = os.path.splitext(filename) if ext == '': filename = filename + '.py' if os.path.isabs(filename): return filename for dirname in sys.path: while os.path.islink(dirname): dirname = os.readlink(dirname) fullname = os.path.join(dirname, filename) if os.path.exists(fullname): return fullname return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lookup_module(filename):\r\n\r\n # stolen from pdb\r\n import os\r\n import sys\r\n\r\n if os.path.isabs(filename) and os.path.exists(filename):\r\n return filename\r\n f = os.path.join(sys.path[0], filename)\r\n if os.path.exists(f): # and self.canonic(f) == self.mainpyfile:\r\n ...
[ "0.6935571", "0.6808267", "0.62503785", "0.620861", "0.60548043", "0.5981422", "0.59169036", "0.58730257", "0.58359164", "0.5832401", "0.58213973", "0.5811231", "0.5761079", "0.5698767", "0.5639836", "0.5639836", "0.56236005", "0.55848193", "0.5536372", "0.5535091", "0.550816...
0.7024272
0
Pure implement of heap sort algorithm in Python
def heap_sort(collection): n = len(collection) for i in range(n // 2 - 1, -1, -1): heapify(collection, i, n) for i in range(n - 1, 0, -1): collection[0], collection[i] = collection[i], collection[0] heapify(collection, 0, i) return collection
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def heap_sort(list):\n pass", "def heap_sort(arr):\n if not isinstance(arr, list) or len(arr) == 0:\n return\n for i in range(len(arr) // 2 - 1, -1, -1):\n heapify(arr, i, len(arr))\n for i in range(len(arr) - 1, 0, -1):\n arr[0], arr[i] = arr[i], arr[0]\n heapify(arr, 0, ...
[ "0.82783955", "0.8089301", "0.8086552", "0.8035019", "0.8015355", "0.7985793", "0.7985793", "0.7959204", "0.7954446", "0.7736345", "0.7736345", "0.7707003", "0.77046126", "0.77045786", "0.7695088", "0.7671767", "0.76464075", "0.7600847", "0.75952286", "0.7574346", "0.7545443"...
0.7628612
17
Wait n seconds before returning ok
def timeout(n): time.sleep(int(n)) return 'ok', 200
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wait(n=3):\n sleep(n)", "def waitUntilSuccess():", "def functionThatWillTimeOut():\n time.sleep(5)", "def wait_for(test, timeout_seconds=DEFAULT_TIMEOUT):\n start = time.time()\n while True:\n if test():\n return True\n if time.time() - start > timeout_seconds...
[ "0.71733505", "0.7147747", "0.68212134", "0.6718219", "0.6702025", "0.6661689", "0.6661689", "0.6661689", "0.6635981", "0.65762943", "0.65646064", "0.6553791", "0.65345186", "0.649197", "0.6484155", "0.64481616", "0.6447762", "0.6443559", "0.6374297", "0.63630664", "0.6290266...
0.8150463
0
/menu should return information about accesible menu elements
def test_normal(self, fake_app): result = fake_app.get(self.url) assert result.json == { 'menu': [{ 'elements': [{ 'is_active': False, 'name': 'not_logged_home', 'text': 'Home', 'url': '#/' }], 'name': 'Menu' }] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_menu_items():\n\n pass", "def get_menus():\n\n pass", "def get_all_menu():", "def get_menu(menu_name):\n\n pass", "def present_menu (self, menu, groupName = 'main'):\n \n if not hasattr (cherrypy.request, 'nav'):\n cherrypy.request.nav = {}\n\n if not groupName in ch...
[ "0.76196367", "0.75381", "0.7521898", "0.74221736", "0.70497966", "0.6988888", "0.67294633", "0.6726015", "0.66863775", "0.66313416", "0.6611032", "0.66060996", "0.658206", "0.6521646", "0.6520005", "0.6460026", "0.63582134", "0.6333034", "0.6328714", "0.63178813", "0.6314692...
0.0
-1
/menu should return information about accesible menu elements for authenticated user
def test_authenticated_user(self, fake_app, authenticated_user, jwt): result = fake_app.get(self.url, headers={'JWT': jwt}) assert result.json == { 'menu': [{ 'elements': [{ 'is_active': False, 'name': 'dashboard_home', 'text': 'Wallets', 'url': '#/dashboard' }], 'name': 'Dashboard' }] }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def menu():\n user_id = session[\"user_id\"]\n if not user_id:\n session.clear()\n redirect(\"/\")\n database = db.db_connect()\n user = g.user\n return render_template(\"menu.html\", username=user[\"username\"])", "def get_menus():\n\n pass", "def menu(self):\n menu = list()...
[ "0.71579736", "0.7013057", "0.69366163", "0.6936209", "0.6905796", "0.6846141", "0.6812014", "0.6768968", "0.67572683", "0.67403543", "0.67125106", "0.65609455", "0.6558285", "0.65495783", "0.6461598", "0.64251655", "0.6414871", "0.640194", "0.6364668", "0.63646626", "0.63447...
0.0
-1
Sample pytest test function with the pytest fixture as an argument.
def test_example(decorated_example): import visual_coding_2p_analysis
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pytest(context):\n exec_cmd = \"pytest\"\n run_cmd(context, exec_cmd)", "def pytest_generate_tests(metafunc):\n if \"retrospective\" in metafunc.fixturenames:\n metafunc.parametrize(\"retrospective\", [False, True])\n if \"test_type\" in metafunc.fixturenames:\n metafunc.parametrize...
[ "0.70208406", "0.6849156", "0.6716318", "0.6693665", "0.65544575", "0.6513483", "0.64935595", "0.645806", "0.64294404", "0.6421675", "0.6402381", "0.6400902", "0.63715297", "0.63665515", "0.63603586", "0.6353915", "0.6353915", "0.6350933", "0.6348224", "0.6341979", "0.6335460...
0.0
-1
int ploidy return all possible genotypes, completely determined by ploidy
def all_genotype(ploidy): return ["".join(comb) for comb in cwr("ACGT-", ploidy)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def genotype(args) :\n from genotyper import genotype_samples\n genotype_samples(args)", "def collapse_genotypes(pL,gL):\n if len(gL) < 2:\n return gL\n else:\n uniqueL = [] # list of unique genotypes relative to ploidy\n for g in gL:\n s = ''\n for i in xra...
[ "0.69029266", "0.6711919", "0.6711495", "0.6549798", "0.5954817", "0.59225327", "0.57624036", "0.5698024", "0.56348896", "0.5612911", "0.5511534", "0.54864615", "0.5481483", "0.5451472", "0.54416704", "0.542101", "0.5358761", "0.5353916", "0.53418523", "0.53012073", "0.529263...
0.78792745
0
str genotype str base return P(base in genotype)
def prob_t_N(genotype, base): cnter = Counter(genotype) return cnter.get(base, 0) * 1/len(genotype)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_label(genotype_type):\n if genotype_type == \"Hom\":\n return 0\n elif genotype_type == \"Het\":\n return 1\n elif genotype_type == \"Hom_alt\":\n return 2", "def all_genotype(ploidy):\n return [\"\".join(comb) for comb in cwr(\"ACGT-\", ploidy)]", "def genotype(args) :...
[ "0.60589737", "0.5741285", "0.5715102", "0.5583383", "0.5533688", "0.55254024", "0.5489838", "0.5393062", "0.5336175", "0.5331854", "0.5328015", "0.5308519", "0.5293455", "0.5247759", "0.5218406", "0.5206605", "0.5196159", "0.51130825", "0.5110904", "0.50777864", "0.50563097"...
0.5752146
1
str genotype iterableobj bases_all_reads, list or np.array return P(data|genotype) == likelihood
def likelihood_genotype(genotype, bases_all_reads, error_rates): likelihood = 1 for observed_base in bases_all_reads: p = 0 for base in "ACGT-": l = prob_t_N(genotype, base) * error_rates[base][observed_base] p += l likelihood *= p return likelihood
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def genotype(args) :\n from genotyper import genotype_samples\n genotype_samples(args)", "def calculate_genotype_probabilities(self):\n for name, member in self.members.items():\n member.genotype_probabilities = self.genotype_probabilities_of(name)", "def genotypes(self):\n retur...
[ "0.58311933", "0.5258182", "0.51413745", "0.51239264", "0.50704426", "0.5054357", "0.50419044", "0.50068015", "0.49709237", "0.49687204", "0.49641567", "0.4958727", "0.4943448", "0.49398604", "0.49218807", "0.49215811", "0.4891338", "0.48754093", "0.4873586", "0.48568666", "0...
0.702063
0
The base exception class.
def __init__(self, error_msg): super(SdkException, self).__init__() self.error_msg = error_msg
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def exception(self, e):\n pass", "def exception(self, *args, **kwargs):", "def unexpectedException(self):", "def WrappedException(self) -> object:", "def throw(self):\n pass", "def create_exception(self, msg: str):", "def test_exception_class_hierarchy(self) -> None:\n\n try:\n ...
[ "0.71715826", "0.71011615", "0.6953176", "0.6914926", "0.6909566", "0.6883063", "0.68702894", "0.67892045", "0.6786502", "0.678649", "0.67474914", "0.67397016", "0.6701096", "0.67004186", "0.6674386", "0.6668861", "0.6599745", "0.658252", "0.65630275", "0.6521229", "0.6506521...
0.6374392
32
The base exception class of connection exceptions.
def __init__(self, error_msg): super(ConnectionException, self).__init__(error_msg)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, msg):\n\n super(DBConnectionError, self).__init__(msg)\n self.msg = msg", "def _create_exception(self, pgres=None, msg=None, cursor=None):\n assert pgres is None or cursor is None, \\\n \"cannot specify pgres and cursor together\"\n\n if cursor and cursor...
[ "0.6604351", "0.6386638", "0.6341203", "0.6303432", "0.62695044", "0.62493557", "0.6177012", "0.6173146", "0.6118006", "0.60822475", "0.60723776", "0.60721236", "0.6066645", "0.60590744", "0.60276735", "0.60103536", "0.59800124", "0.5904314", "0.5867853", "0.58674383", "0.586...
0.7421417
0
The base exception class of service response exceptions.
def __init__(self, status_code, sdk_error): super(ServiceResponseException, self).__init__(sdk_error.error_msg) self.status_code = status_code self.error_code = sdk_error.error_code self.request_id = sdk_error.request_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def generic_service_exception(*args):\n exception_tuple = LambdaErrorResponses.ServiceException\n\n return BaseLocalService.service_response(\n LambdaErrorResponses._construct_error_response_body(LambdaErrorResponses.SERVICE_ERROR, \"ServiceException\"),\n LambdaErrorResponses._...
[ "0.6928329", "0.6750525", "0.649088", "0.64422554", "0.6438557", "0.64162624", "0.63747215", "0.6354716", "0.63448566", "0.6343094", "0.6330691", "0.6311043", "0.6306453", "0.62536937", "0.6228462", "0.61860454", "0.61826175", "0.6169226", "0.6168609", "0.6157098", "0.6143242...
0.6739744
2
The base exception class of timeout exceptions.
def __init__(self, error_msg): super(RequestTimeoutException, self).__init__(error_msg)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_timeout_elapsed_exception(self):\n deadline = Deadline(-MS)\n with self.assertRaises(TimeoutError):\n deadline.timeout()", "def cancelled_exception_class(cls) -> type[BaseException]:", "def test_wait_timeout_inheritance():\n # confirm subclassed from pypyr root error\n e...
[ "0.69130844", "0.6805417", "0.6787926", "0.6741076", "0.6446688", "0.6242404", "0.6146727", "0.6146727", "0.6110175", "0.61099267", "0.6053876", "0.59915215", "0.5957881", "0.59220225", "0.59039843", "0.58413595", "0.58341813", "0.58033925", "0.5766664", "0.5763779", "0.57505...
0.6499626
4
Returns a string representation of a path
def render_path(path_to_item): result = "" for pth in path_to_item: if isinstance(pth, six.integer_types): result += "[{0}]".format(pth) else: result += "['{0}']".format(pth) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def path_str(path):\n\toutput = \"PATH: \"\n\tif path:\n\t\tfor i in path:\n\t\t\toutput += str(i.data) + \" -> \"\n\telse:\n\t\toutput += \"Empty\"\n\treturn output", "def path_to_str(path):\n if hasattr(path, '__fspath__'):\n path = as_str_any(path.__fspath__())\n return path", "def as_string(pa...
[ "0.79950243", "0.77772427", "0.76012766", "0.75008774", "0.7465539", "0.73858505", "0.724589", "0.7177473", "0.71564364", "0.70764357", "0.70681226", "0.70649594", "0.70468634", "0.70299315", "0.6943011", "0.69423383", "0.6906489", "0.6906489", "0.69057655", "0.68910974", "0....
0.0
-1
Raises an exception for TypeErrors
def __init__(self, msg, path_to_item=None, valid_classes=None, key_type=None): self.path_to_item = path_to_item self.valid_classes = valid_classes self.key_type = key_type full_msg = msg if path_to_item: full_msg = "%s at %s" % (msg, render_path(path_to_item)) super(ApiTypeError, self).__init__(full_msg)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_type_error(self):\n self._error_test(TypeError)", "def test__specification_type_to_python_type_unsupported_type(self):\n with self.assertRaises(TypeError):\n _specification_type_to_python_type(\"unsupported_type\")", "def throw(self, type, value=None, traceback=None):\n ...
[ "0.80643433", "0.7329728", "0.72639966", "0.7262278", "0.7229491", "0.72008634", "0.71786124", "0.6970523", "0.6896439", "0.688244", "0.6782924", "0.6753176", "0.67404634", "0.6738435", "0.67235684", "0.66774726", "0.6669857", "0.6658878", "0.6629325", "0.6617021", "0.6593539...
0.0
-1
Reloads the Polls file.
def reloadpolls(self, irc, msg, args): try: self.polls = yaml.load(open(self.pollFile, 'r'), Loader=yamlordereddictloader.Loader) except FileNotFoundError as e: log.warning("Couldn't open file: %s" % e) raise
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reloadfile(self, ):\n self.loadfile()", "def refresh(self):\n self.config.read(self.filename)\n self.loadRecentFiles()", "def reload(self):\n puts('Reloading application...')\n local('touch ../reload.txt')", "def reload(self):\n\n pass", "def reload(self):", ...
[ "0.74811375", "0.6804164", "0.6666194", "0.66235316", "0.65775543", "0.65775543", "0.65237594", "0.64763457", "0.6454685", "0.6289295", "0.62368816", "0.6080593", "0.6055079", "0.60324496", "0.5997774", "0.5995909", "0.59953433", "0.5965536", "0.5963405", "0.59284127", "0.589...
0.7334716
1
Lists current polls. For a breakdown via statuses, see ' Vote votes'
def listpolls(self, irc, msg, args, channel): if channel and msg.args[0] in irc.state.channels: if self.polls is None: self.polls = [] if self.polls is []: irc.reply("No Polls.") for idx, entry in enumerate(self.polls[channel]): entry_string = [] question = entry['question'] yays = entry['yays'] nays = entry['nays'] added_by = entry['added_by'] # concluded = entry['concluded'] entry_string.append("%d: %s" % (idx, question)) entry_string.append("Yes: %s" % (' '.join(yays) if yays != [] else 'none')) entry_string.append("No: %s" % (' '.join(nays) if nays != [] else 'none')) entry_string.append("Question asked by %s" % added_by) irc.reply(' / '.join(entry_string), notice=True, private=True, prefixNick=False) else: try: if ircdb.checkCapability(msg.prefix, 'admin') or ircdb.checkCapability(msg.prefix, 'owner'): if self.polls is None: self.polls = [] if self.polls is []: irc.reply("No Polls.") for idx, entry in enumerate(self.polls[channel]): entry_string = [] question = entry['question'] yays = entry['yays'] nays = entry['nays'] added_by = entry['added_by'] # concluded = entry['concluded'] entry_string.append("%d: %s" % (idx, question)) entry_string.append("Yays: %s" % (' '.join(yays) if yays != [] else 'none')) entry_string.append("Nays: %s" % (' '.join(nays) if nays != [] else 'none')) entry_string.append("Question asked by %s" % added_by) irc.reply(' / '.join(entry_string), notice=True, private=True, prefixNick=False) else: irc.errorInvalid('argument', channel) except KeyError: return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index(request, count=10, template_name=\"pollit/index.html\"):\n polls = Poll.objects.get_latest_polls(count=count, include_expired=True)\n \n return render_to_response(template_name,\n {'poll_list': polls},\n context_instance=RequestContext(re...
[ "0.68773824", "0.67399997", "0.63377434", "0.6063946", "0.5996496", "0.5898129", "0.5813151", "0.5798766", "0.56912804", "0.5689598", "0.5687956", "0.56795925", "0.5662718", "0.5646899", "0.5646899", "0.5614585", "0.55864877", "0.5577538", "0.55622435", "0.55242187", "0.54779...
0.66753453
2
[channel] Vote on a poll. Channel is only needed if used in a PM.
def vote(self, irc, msg, args, channel, pid, yaynay): if yaynay not in ['yay', 'nay']: irc.error("Valid Answers are 'yay' or 'nay'.") return if channel in self.polls.keys(): if self.polls[channel][pid]['concluded']: irc.reply("Poll #%s is finished, it does not accept updates." % pid) return if self._vote(irc, channel, msg.nick, pid, yaynay): irc.reply("Successfully voted on %s" % self.polls[channel][pid]['question']) else: log.debug('Not dumping due to no change.') else: irc.error("'%s' has no polls." % channel)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def votes(self, irc, msg, args, channel, pid):\n if channel and msg.args[0] in irc.state.channels:\n if msg.args[0] != channel:\n if ircdb.checkCapability(msg.prefix, 'admin') or ircdb.checkCapability(msg.prefix, 'owner'):\n irc.error(\"Not Implemented\")\n ...
[ "0.6393847", "0.6147241", "0.59954494", "0.5947859", "0.5874632", "0.5840181", "0.5776968", "0.5758922", "0.5722969", "0.57202333", "0.5576358", "0.5565325", "0.5534625", "0.548925", "0.54667646", "0.5447865", "0.539419", "0.53278154", "0.53092563", "0.53039765", "0.528682", ...
0.6149552
1
[channel] Retrieves the vote count for a poll.
def votes(self, irc, msg, args, channel, pid): if channel and msg.args[0] in irc.state.channels: if msg.args[0] != channel: if ircdb.checkCapability(msg.prefix, 'admin') or ircdb.checkCapability(msg.prefix, 'owner'): irc.error("Not Implemented") else: irc.errorInvalid('argument', channel) elif msg.args[0] == channel: irc.error("Not Implemented")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_vote_count(self, post):\n return post.vote_set.count()", "async def _vote_count(\n self, ctx: Context, *, channel: discord.TextChannel = None\n ):\n\n guild: discord.Guild = ctx.guild\n\n if not channel:\n channel = await self.get_vote_channel(guild)\n ...
[ "0.6773994", "0.6712171", "0.66255003", "0.64222467", "0.64080846", "0.6403009", "0.6307542", "0.627525", "0.62508446", "0.6187831", "0.6187831", "0.61792505", "0.6178627", "0.61383927", "0.61028653", "0.6074583", "0.60575265", "0.60141224", "0.6011861", "0.60046905", "0.6000...
0.0
-1
Marks a poll as finished. This is limited to channel ops.
def conclude(self, irc, msg, args, channel, pid): if msg.nick in irc.state.channels[channel].ops: if channel in self.polls.keys(): try: self.polls[channel][pid]['concluded'] = True self._dump(self.polls) irc.reply("Marked poll #%s (%s) as concluded." % (pid, self.polls[channel][pid]['question'])) except IndexError: irc.error("'%s' does not have a poll with that index.") except KeyError: irc.error("This may be a bug with the bot or poll file, please submit an issue at\ <https://github.com/IotaSpencer/supyplugins> with all pertinent information.") else: irc.error("Access Denied.")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def finish(self):\n self.cond.acquire()\n try:\n self.closed = True\n self.cond.notify()\n finally:\n self.cond.release()", "def finish(self):\n with self._lock: # just to be tidy; lock not really needed to set a boolean\n self._done = True...
[ "0.66311806", "0.6554593", "0.65156335", "0.6456887", "0.6304259", "0.62279236", "0.6223889", "0.6176054", "0.61735076", "0.61373097", "0.6120679", "0.60965186", "0.60947", "0.6072286", "0.5981773", "0.5979095", "0.5972629", "0.59477633", "0.5941002", "0.59198123", "0.5911216...
0.0
-1
Removes a poll entirely.
def rempoll(self, irc, msg, args, channel, pid): if msg.nick in irc.state.channels[channel].ops: del self.polls[channel][pid] self._dump(self.polls)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove(self):\n if self.removed:\n return\n self._remove()\n self.removed = True", "async def will_remove_from_hass(self) -> None:\n if self.unsub_update:\n self.unsub_update()\n self.unsub_update = None", "async def async_will_remove_from_hass(s...
[ "0.5543764", "0.55292016", "0.54858243", "0.5470905", "0.54448193", "0.54448193", "0.54448193", "0.54448193", "0.54448193", "0.54448193", "0.54448193", "0.54448193", "0.54448193", "0.54448193", "0.54448193", "0.54448193", "0.54448193", "0.54448193", "0.54426503", "0.5439495", ...
0.0
-1
Lists all the RuntimeConfig resources within project.
def ListConfigs(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list():\n project_root = get_project_root()\n config_file = os.path.join(project_root, CONFIG_DIR, CONFIG_FILE)\n if os.path.exists(config_file):\n kwargs = load_yaml_file(config_file)\n if PACKAGE_INDEX_KEY in kwargs:\n packages = load_yaml_url(kwargs[PACKAGE_INDEX_KEY])\n ...
[ "0.6564698", "0.6287851", "0.61679363", "0.6095816", "0.5989894", "0.5769178", "0.5736151", "0.57051367", "0.5691854", "0.5687537", "0.5679123", "0.5675863", "0.56112176", "0.55890656", "0.5550873", "0.5547206", "0.5533986", "0.5531299", "0.55280936", "0.5521363", "0.5520824"...
0.5060501
81
Gets information about a RuntimeConfig resource.
def GetConfig(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def runtime_config(self) -> str:\n return self._node[\"app_data\"].get(\"runtime_config\")", "def get_resource_config(target=False, force=None):\n return get_stored_property(ctx, 'resource_config', target, force)", "def config(self):\n annotations = IAnnotations(self.context)\n return a...
[ "0.7309697", "0.63536143", "0.61861", "0.61123216", "0.60506386", "0.6046548", "0.60022986", "0.59997743", "0.59895045", "0.5969095", "0.5955346", "0.5955346", "0.5955346", "0.5955346", "0.5955346", "0.5955346", "0.5955346", "0.5955346", "0.5955346", "0.5955346", "0.5955346",...
0.0
-1
Creates a new RuntimeConfig resource. The configuration name must be unique within project.
def CreateConfig(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(self, config):\n config_name = config.get(\"LaunchConfigurationName\", self._name)\n assert config_name == self._name, \"Config name mismatch {} {}\".format(config_name, self._name)\n config[\"LaunchConfigurationName\"] = self._name\n self._client.create_launch_configuration(...
[ "0.6188884", "0.6090293", "0.6090293", "0.58227265", "0.57470423", "0.57029325", "0.5658915", "0.55869395", "0.55303633", "0.5527195", "0.5509801", "0.5489197", "0.5486522", "0.544036", "0.54257023", "0.5423881", "0.54184675", "0.5381031", "0.5323874", "0.532296", "0.5305365"...
0.0
-1
Updates a RuntimeConfig resource. The configuration must exist beforehand.
def UpdateConfig(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update(name, config, backend, storage, debug):\n setup_lithops_logger(logging.DEBUG)\n\n verify_runtime_name(name)\n\n if config:\n config = load_yaml_config(config)\n\n config_ow = set_config_ow(backend, storage, runtime_name=name)\n config = default_config(config, config_ow)\n\n if c...
[ "0.66292256", "0.60551757", "0.5964276", "0.59138215", "0.5715593", "0.55989873", "0.5577988", "0.55546343", "0.5550815", "0.54435796", "0.5437534", "0.5437106", "0.5432855", "0.5415902", "0.54149926", "0.5393029", "0.5393029", "0.5380091", "0.53799874", "0.53699434", "0.5356...
0.49852085
76
Deletes a RuntimeConfig resource.
def DeleteConfig(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post_global_system_config_delete(self, resource_id, resource_dict):\n pass", "def post_global_vrouter_config_delete(self, resource_id, resource_dict):\n pass", "def delete(name, config, backend, storage, debug):\n setup_lithops_logger(logging.DEBUG)\n\n verify_runtime_name(name)\n\n ...
[ "0.63476586", "0.6339625", "0.6323798", "0.6240317", "0.62242293", "0.619534", "0.61792046", "0.61713314", "0.6144527", "0.6141145", "0.6128976", "0.60849786", "0.6033858", "0.60115296", "0.5929646", "0.57731843", "0.5771558", "0.5689029", "0.5676266", "0.5670987", "0.5560764...
0.56942225
17
Lists variables within given a configuration, matching any provided filters. This only lists variable names, not the values, unless `return_values` is true, in which case only variables that user has IAM permission to GetVariable will be returned.
def ListVariables(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_variables(self, request, context):\n response = ListVariablesResponse()\n for variable in self._delegator.list_variables(request.component):\n response.variables.append(variable)\n return response", "def Run(self, args):\n variable_client = util.VariableClient()\n m...
[ "0.6380369", "0.5820642", "0.57636815", "0.56829864", "0.5545043", "0.552599", "0.5512235", "0.54310113", "0.5424095", "0.5416049", "0.5415185", "0.5367262", "0.53486437", "0.53446084", "0.5319058", "0.52849674", "0.52658916", "0.5254456", "0.5228465", "0.520828", "0.5206558"...
0.5790898
2
Gets information about a single variable.
def GetVariable(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getVar(self, id):\n if id in self.variables:\n return self.variables[id]", "def getVariable(self, varName):\n return self[varName]", "def get_data(self, variable):\n return self.data.get(variable)", "async def getVariable(ctx, var):\n if ctx.message.channel.name != \"st...
[ "0.6939153", "0.6936482", "0.69092554", "0.68890536", "0.6884928", "0.67508674", "0.6643614", "0.65952235", "0.6536052", "0.6496712", "0.64882463", "0.6455315", "0.6429799", "0.64095783", "0.63759357", "0.63599", "0.63293916", "0.6292426", "0.6292426", "0.6292426", "0.6207993...
0.0
-1
Watches a specific variable and waits for a change in the variable's value. When there is a change, this method returns the new value or times out. If a variable is deleted while being watched, the `variableState` state is set to `DELETED` and the method returns the last known variable `value`. If you set the deadline for watching to a larger value than internal timeout (60 seconds), the current variable value is returned and the `variableState` will be `VARIABLE_STATE_UNSPECIFIED`. To learn more about creating a watcher, read the [Watching a Variable for Changes](/deploymentmanager/runtimeconfigurator/watchingavariable) documentation.
def WatchVariable(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wait_for_variable(self, name, pred, timeout=None):\n if not hasattr(pred,\"__call__\"):\n v=pred\n if isinstance(pred,(tuple,list,set,dict)):\n pred=lambda x: x in v\n else:\n pred=lambda x: x==v\n ctl=threadprop.current_controller()\...
[ "0.63492364", "0.60993075", "0.55610037", "0.5458114", "0.5403095", "0.52911294", "0.52841663", "0.5238075", "0.50422585", "0.49651515", "0.48968446", "0.48794204", "0.48586887", "0.48463622", "0.4791569", "0.4787551", "0.46988493", "0.46986935", "0.46816027", "0.46677256", "...
0.46302924
23
Creates a variable within the given configuration. You cannot create a variable with a name that is a prefix of an existing variable name, or a name that has an existing variable name as a prefix. To learn more about creating a variable, read the [Setting and Getting Data](/deploymentmanager/runtimeconfigurator/setandgetvariables) documentation.
def CreateVariable(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(self, app_id, service_name, env_var_name, value):\n\n if not _is_valid_env_var_name(env_var_name):\n raise exceptions.InvalidParameter('env_var_name', env_var_name)\n\n services = self.service.get_all_by_application(app_id)\n service_id = [i['id'] for i in services if i['...
[ "0.6057225", "0.5921494", "0.5921494", "0.5910765", "0.58916956", "0.57897204", "0.5695237", "0.5639612", "0.55724275", "0.557233", "0.55559117", "0.5538004", "0.551758", "0.55008006", "0.5477593", "0.54400873", "0.54192346", "0.5404222", "0.54034936", "0.5355584", "0.5355295...
0.48706943
78
Updates an existing variable with a new value.
def UpdateVariable(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_variable(value):\n return value", "def updateValue(self):\n self.value = self.var.get()", "def update_variable(value):\n return value + 1", "def updateVar(self, id, value, type_):\n if id in self.variables:\n symbol = self.variables[id]\n symbol = sym.Symb...
[ "0.8306532", "0.770032", "0.7636661", "0.74136305", "0.7011678", "0.68405515", "0.67276084", "0.6489138", "0.6488961", "0.64369726", "0.6304455", "0.6286994", "0.6245881", "0.6235783", "0.62295234", "0.6209103", "0.617981", "0.6172482", "0.61659956", "0.615926", "0.6130616", ...
0.6769582
6
Deletes a variable or multiple variables. If you specify a variable name, then that variable is deleted. If you specify a prefix and `recursive` is true, then all variables with that prefix are deleted. You must set a `recursive` to true if you delete variables by prefix.
def DeleteVariable(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _delete(self, variables):\n required_vars = ['container']\n variables_dict = self._get_vars(variables, required=required_vars)\n\n container_name = variables_dict.pop('container')\n object_name = variables_dict.pop('object', None)\n\n if object_name:\n self.swift.d...
[ "0.6082754", "0.5931479", "0.5894654", "0.57672286", "0.5762076", "0.566055", "0.560499", "0.545678", "0.53137845", "0.5311779", "0.52954566", "0.5270962", "0.52198213", "0.51949286", "0.5131959", "0.51042974", "0.5100813", "0.5093037", "0.5086412", "0.5080377", "0.5057334", ...
0.5528326
7
List waiters within the given configuration.
def ListWaiters(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def waiters(self):\n waiters = []\n\n for name, item in self._definition.get('waiters', {}).items():\n name = self._get_name('waiter', Waiter.PREFIX + name)\n waiters.append(Waiter(name, item))\n\n return waiters", "def get_list_of_configlets(configlets):\n\n futures...
[ "0.71054786", "0.6426477", "0.586981", "0.57586163", "0.5726431", "0.5626258", "0.55491465", "0.5529439", "0.5473015", "0.54290795", "0.5414866", "0.53946763", "0.53753406", "0.536865", "0.5325333", "0.5261703", "0.5254371", "0.5234681", "0.52307975", "0.51577234", "0.5136059...
0.6771325
1
Gets information about a single waiter.
def GetWaiter(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_waiter(waiter_name=None):\n pass", "def get_waiter(waiter_name=None):\n pass", "def get_waiter(waiter_name=None):\n pass", "def get_waiter(waiter_name=None):\n pass", "def get_waiter(waiter_name=None):\n pass", "def get_waiter(waiter_name=None):\n pass", "def get_waiter(waiter...
[ "0.732819", "0.732819", "0.732819", "0.732819", "0.732819", "0.732819", "0.732819", "0.732819", "0.732819", "0.732819", "0.732819", "0.732819", "0.7034089", "0.7034089", "0.7034089", "0.58368564", "0.5562174", "0.545833", "0.5453501", "0.5453501", "0.51552576", "0.500022", ...
0.51276976
21
Creates a Waiter resource. This operation returns a longrunning Operation resource which can be polled for completion. However, a waiter with the given name will exist (and can be retrieved) prior to the operation completing. If the operation fails, the failed Waiter resource will still exist and must be deleted prior to subsequent creation attempts.
def CreateWaiter(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_waiter(self, waiter_name: str = None) -> Waiter:\n pass", "def get_waiter(self, waiter_name: str = None) -> Waiter:\n pass", "def get_waiter(self, waiter_name: str = None) -> Waiter:\n pass", "def wait_operation(\n self,\n ) -> Callable[[operations_pb2.WaitOperationRequ...
[ "0.639531", "0.639531", "0.639531", "0.61406636", "0.5927985", "0.5927985", "0.5927985", "0.5927985", "0.5927985", "0.5927985", "0.5927985", "0.5927985", "0.5927985", "0.5927985", "0.5927985", "0.5927985", "0.573098", "0.5721729", "0.55530214", "0.5279856", "0.5229172", "0....
0.57157534
18
Deletes the waiter with the specified name.
def DeleteWaiter(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete(self, name):\n with self._lock:\n self._delete(name)", "def delete(self, name):\n\n pass", "def delete(self, name=None):\n raise NotImplementedError", "def delete(self, name):\n self.connect()\n self._write('DEL %s\\r\\n' % name)\n return self._...
[ "0.7185444", "0.69208735", "0.6794032", "0.67044383", "0.6475918", "0.62396824", "0.6199465", "0.6158003", "0.6086726", "0.60831106", "0.60684264", "0.60101855", "0.60017025", "0.597735", "0.596643", "0.5948519", "0.59348965", "0.59313756", "0.59124154", "0.5899736", "0.58956...
0.57201225
31
Save seed into temp file.
def saveseed(self, seed): savefile = gettempdir() + '/last_test_seed_fate.tmp' if args.verbose: print('Saving run into ' + savefile) with open(savefile, 'w') as f: f.write(str(seed))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save_seed(self, seed: np.ndarray):\n print(\"Reconstructed trace saved as seed to \", CONFIG_DIR)\n np.savetxt(CONFIG_DIR / self.name_seed, seed.view(float).reshape(-1, 2))", "def insert_test( hash, random, seq ):\n try:\n with open(os.path.join(SEED_DIRECTORY, \"%s_%s\" % (hash, 0)),...
[ "0.71522933", "0.6273968", "0.62532884", "0.6251843", "0.604025", "0.60345274", "0.60236645", "0.6002649", "0.5998057", "0.5997992", "0.5983726", "0.5970545", "0.5964728", "0.5925001", "0.5925001", "0.5902035", "0.5890514", "0.58809185", "0.5874178", "0.58705467", "0.5869121"...
0.8186387
0
Run the test based on given seed.
def run_test(self, seed, commands_per_run): if args.verbose: print('Sample text:\n' + str(self.document.text)) print('Starting selection: ' + str(self.document.selection)) for i in range(commands_per_run): userinput = self.document.ui.getinput() if args.verbose: try: name = userinput.__name__ except AttributeError: name = str(userinput) print('{}: Input = {}, Mode = {}'.format(i + 1, name, self.document.mode)) try: self.document.mode.processinput(self.document, userinput) except: print('Current text:\n{}'.format(self.document.text)) print('Current selection: {}'.format(self.document.selection)) print('Current pattern: {}'.format(self.document.search_pattern)) raise self.successes += 1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def random_test(self, source):\r\n ret = 1\r\n for seed in range(1, 40):\r\n if source.run(temp_params={\"fitness_function\": (lambda x: -np.sum(x)**2+10),\r\n \"population_size\": 10,\r\n \"time_constraint\": 2,\r...
[ "0.72557", "0.7165194", "0.7157774", "0.7147115", "0.71157515", "0.70374316", "0.6993909", "0.6993909", "0.6942664", "0.6942664", "0.68477833", "0.6824419", "0.6699443", "0.66688615", "0.6521962", "0.64988214", "0.64300764", "0.6428376", "0.64246386", "0.6414504", "0.6401042"...
0.656294
14
Model to embed books and wikilinks using the functional API. Trained to discern if a tag is present in a article
def anime_embedding_model(anime_index, tag_index, embedding_size=50, classification=False): # Both inputs are 1-dimensional anime = Input(name='anime', shape=[1]) tag = Input(name='tag', shape=[1]) # Embedding the anime (shape will be (None, 1, 50)) anime_embedding = Embedding(name='anime_embedding', input_dim=len(anime_index), output_dim=embedding_size)(anime) # Embedding the tag (shape will be (None, 1, 50)) tag_embedding = Embedding(name='tag_embedding', input_dim=len(tag_index), output_dim=embedding_size)(tag) # Merge the layers with a dot product along the second axis (shape will be (None, 1, 1)) merged = Dot(name='dot_product', normalize=True, axes=2)([anime_embedding, tag_embedding]) # Reshape to be a single number (shape will be (None, 1)) merged = Reshape(target_shape=[1])(merged) # If classifcation, add extra layer and loss function is binary cross entropy if classification: merged = Dense(1, activation='sigmoid')(merged) model = Model(inputs=[anime, tag], outputs=merged) model.compile(optimizer='Adam', loss='binary_crossentropy', metrics=['accuracy']) # Otherwise loss function is mean squared error else: model = Model(inputs=[anime, tag], outputs=merged) model.compile(optimizer='Adam', loss='mse') return model
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, name, isbn, author, tags=None):\n super().__init__(name, isbn, tags)\n self.author = author\n self.resource_type = \"Book\"", "def tagged(request,slug):\n\n tag = get_object_or_404(Tag, slug=slug)\n books = Book.objects.filter(tags=tag)\n \n for book in books:\...
[ "0.5442478", "0.53429097", "0.52412236", "0.51314247", "0.51292527", "0.5036361", "0.5019173", "0.49803144", "0.4961309", "0.49558708", "0.49364054", "0.49175373", "0.4890888", "0.48781618", "0.48643574", "0.48554486", "0.48543897", "0.48376718", "0.48289764", "0.48264697", "...
0.0
-1
Returns an HTML script element for including a script from the admin media url (or other location if an absolute url is given).
def include_admin_script(script_path): if not absolute_url_re.match(script_path): script_path = '%s%s' % (settings.ADMIN_MEDIA_PREFIX, script_path) return '<script type="text/javascript" src="%s"></script>' % script_path
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resource_js(self):\n \n portal_url = getSite().absolute_url()\n \n return \"\"\"\n <script type=\"text/javascript\" src=\"%s/++resource++swfobject.js\"></script>\n <script type=\"text/javascript\" src=\"%s/++resource++audio_player.js\"></script> \n <script type...
[ "0.5999079", "0.56655055", "0.5653992", "0.56134677", "0.5572652", "0.5382267", "0.5336885", "0.5328502", "0.53220886", "0.53072685", "0.5276165", "0.52621883", "0.5245122", "0.5236014", "0.523167", "0.5201591", "0.51624304", "0.51335704", "0.51318634", "0.51224566", "0.51154...
0.7652485
0
r""" Description Compute ChebNet layer.
def forward(self, graph, feat, lambda_max=None): def unnLaplacian(feat, D_invsqrt, graph): """ Operation Feat * D^-1/2 A D^-1/2 但是如果写成矩阵乘法:D^-1/2 A D^-1/2 Feat""" graph.ndata['h'] = feat * D_invsqrt graph.update_all(fn.copy_u('h', 'm'), fn.sum('m', 'h')) return graph.ndata.pop('h') * D_invsqrt with graph.local_scope(): #一点修改,这是原来的代码 if self.is_mnist: graph.update_all(fn.copy_edge('v','m'), fn.sum('m','h')) # 'v'与coordinate.py有关 D_invsqrt = th.pow(graph.ndata.pop('h').float().clamp(min=1), -0.5).unsqueeze(-1).to(feat.device) #D_invsqrt = th.pow(graph.in_degrees().float().clamp( # min=1), -0.5).unsqueeze(-1).to(feat.device) #print("in_degree : ",graph.in_degrees().shape) else: D_invsqrt = th.pow(graph.in_degrees().float().clamp(min=1), -0.5).unsqueeze(-1).to(feat.device) #print("D_invsqrt : ",D_invsqrt.shape) #print("ndata : ",graph.ndata['h'].shape) if lambda_max is None: try: lambda_max = laplacian_lambda_max(graph) except BaseException: # if the largest eigenvalue is not found dgl_warning( "Largest eigonvalue not found, using default value 2 for lambda_max", RuntimeWarning) lambda_max = th.Tensor(2).to(feat.device) if isinstance(lambda_max, list): lambda_max = th.Tensor(lambda_max).to(feat.device) if lambda_max.dim() == 1: lambda_max = lambda_max.unsqueeze(-1) # (B,) to (B, 1) # broadcast from (B, 1) to (N, 1) lambda_max = broadcast_nodes(graph, lambda_max) re_norm = 2. / lambda_max # X_0 is the raw feature, Xt refers to the concatenation of X_0, X_1, ... X_t Xt = X_0 = feat # X_1(f) if self._k > 1: h = unnLaplacian(X_0, D_invsqrt, graph) X_1 = - re_norm * h + X_0 * (re_norm - 1) # Concatenate Xt and X_1 Xt = th.cat((Xt, X_1), 1) # Xi(x), i = 2...k for _ in range(2, self._k): h = unnLaplacian(X_1, D_invsqrt, graph) X_i = - 2 * re_norm * h + X_1 * 2 * (re_norm - 1) - X_0 # Concatenate Xt and X_i Xt = th.cat((Xt, X_i), 1) X_1, X_0 = X_i, X_1 # linear projection h = self.linear(Xt) # activation if self.activation: h = self.activation(h) #print('ChebConv.py Line163 h : ',h.shape) return h
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_bisenet(inputs, num_classes):\n\n ### The spatial path\n ### The number of feature maps for each convolution is not specified in the paper\n ### It was chosen here to be equal to the number of feature maps of a classification\n ### model at each corresponding stage\n # spatial_net = fl...
[ "0.63327324", "0.62027663", "0.61002606", "0.6070533", "0.59601736", "0.59473467", "0.5912948", "0.5911498", "0.58962667", "0.58913976", "0.58264315", "0.58224165", "0.5808085", "0.58010757", "0.5788575", "0.5781931", "0.5776973", "0.57699645", "0.57483983", "0.57286537", "0....
0.0
-1
This is some other solution from codewars to test against.
def my_fizz_buzz_cuckoo_clock(time): hours, minutes = map(int, time.split(":")) sounds = {0: " ".join(["Cuckoo"] * (hours % 12 or 12)), 15: "Fizz Buzz", 30: "Cuckoo", 45: "Fizz Buzz"} if minutes in sounds: return sounds[minutes] return "Fizz" if minutes % 3 == 0 else "Buzz" if minutes % 5 == 0 else "tick"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def exercise_b2_53():\r\n pass", "def exercise_b2_106():\r\n pass", "def exercise_b2_113():\r\n pass", "def exercise_b2_107():\r\n pass", "def test_4_4_1_1(self):\n pass", "def exercise_b2_69():\r\n pass", "def exercise_b2_52():\r\n pass", "def exercise_b2_56():\r\n pass",...
[ "0.63127756", "0.6088745", "0.607841", "0.60318285", "0.5995737", "0.5885328", "0.586407", "0.577447", "0.57653236", "0.57585347", "0.57469904", "0.57358444", "0.56477886", "0.564617", "0.5639498", "0.55612564", "0.55611384", "0.5469325", "0.5427286", "0.5421196", "0.5418454"...
0.0
-1
The index view, for the home page. Shows Campaigns this UserProfile is in.
def index(request): context = dict() if request.user.is_authenticated(): context['campaigns'] = [ CampaignSerializer(c).serialize() for c in request.user.userprofile.campaigns.order_by('pk')] return render(request, 'voter_validation/index.html', context)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index(request): \n \n all_projects = models.Project.objects.all()\n projects = get_objects_for_user(request.user, 'view_project', all_projects)\n \n fbads_settings = FacebookAdsSettings.objects.first()\n return render_to_response('index.html',{\n 'projects': p...
[ "0.6278449", "0.5947191", "0.57573825", "0.57182586", "0.5707867", "0.5703257", "0.56390655", "0.5605963", "0.55317235", "0.5515906", "0.5514333", "0.5508371", "0.54833335", "0.5471401", "0.5455781", "0.54364294", "0.5406502", "0.5397928", "0.53924406", "0.53866136", "0.53479...
0.6828237
0
The logout view. Redirects to home page after.
def logout(request): if request.user.is_authenticated(): auth_logout(request) return HttpResponseRedirect(reverse("voter_validation:index"))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def logout_view(request):\n logout(request)\n return redirect('home')", "def logout_view(request):\n auth_logout(request)\n return redirect('home')", "def logout_view(request):\n \n logout(request)\n return HttpResponseRedirect(reverse(\"index\"))", "def logout_view(request):\n logout...
[ "0.8744168", "0.8659496", "0.8525579", "0.8507581", "0.8489514", "0.8458301", "0.8458301", "0.84309167", "0.84134465", "0.83970946", "0.8394286", "0.8385555", "0.83608264", "0.83608264", "0.83596367", "0.8345407", "0.8336058", "0.83315647", "0.83303416", "0.8329741", "0.83283...
0.7844669
100
Shows validation UI for a given campaign, if this UserProfile is authorized to do data entry for the specified Campaign. This is also the endpoint for searching for Voters as part of validation. If doing a search, assume that a sufficient number of the specified fields is present (taken care of in frontend form validation).
def validate(request, campaign_id): if not request.user.userprofile.in_campaign(campaign_id): return HttpResponseRedirect(reverse("voter_validation:index")) campaign_id = int(campaign_id) campaign = get_object_or_404(Campaign, id=campaign_id) # Get the number of signatures validated by the current user for this # campaign, and also for the past 24 hours. val_sigs_set = ValidationRecord.objects.filter( validator=request.user.userprofile, campaign=campaign) val_sigs_24h = val_sigs_set.filter( last_updated__gte=datetime.now(SERVER_TIME_ZONE) - timedelta(hours=24)) context = { "campaign_name": campaign.name, "campaign_id": campaign_id, "val_sigs": val_sigs_set.count(), "val_sigs_24h": val_sigs_24h.count(), } # Search if specified in POST search = request.POST.get("search", "false") if search.lower() == "true": name = request.POST.get("name", None) address = request.POST.get("address", None) res_zip = request.POST.get("zip", None) # Pass in campaign_id so we can check the Voter was previously validated voters = voter_search(name, address, res_zip, campaign_id=campaign_id) context.update({ "name": name, "address": address, "zip": res_zip, "results": voters, }) return render(request, "voter_validation/validation.html", context)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index(request):\n context = dict()\n if request.user.is_authenticated():\n context['campaigns'] = [\n CampaignSerializer(c).serialize() for c in\n request.user.userprofile.campaigns.order_by('pk')]\n return render(request, 'voter_validation/index.html', context)", "def v...
[ "0.5706519", "0.5386401", "0.5315525", "0.530953", "0.51058286", "0.51058286", "0.48647565", "0.4818601", "0.47097164", "0.46946898", "0.46497676", "0.4634922", "0.46242386", "0.45637044", "0.449959", "0.44929436", "0.44728902", "0.44613764", "0.44438702", "0.4442745", "0.443...
0.62158144
0
this test only works if ANs fall within separate bins,
def test_iter_bins_API_input_missing_bin(pqo_STRING, args_dict, foreground, background, enrichment_method): # foreground, background, enrichment_method = fixture_fg_bg_iter_bins fg = format_for_REST_API(foreground[foreground.notnull()]) bg = format_for_REST_API(background.loc[background.background.notnull(), "background"]) in_ = format_for_REST_API(background.loc[background.intensity.notnull(), "intensity"]) # ui = userinput.REST_API_input(pqo=pqo_STRING, foreground_string=fg, background_string=bg, background_intensity=in_, num_bins=NUM_BINS, enrichment_method=enrichment_method) args_dict_temp = args_dict.copy() args_dict_temp.update({"foreground":fg, "background":bg, "intensity":in_, "num_bins":NUM_BINS, "enrichment_method":enrichment_method}) ui = userinput.REST_API_input(pqo_STRING, args_dict=args_dict_temp) counter = 0 for ans, weight_fac in ui.iter_bins(): # every weighting factor is a float assert isinstance(weight_fac, float) or isinstance(weight_fac, int) counter += 1 # since integers instead of floats are being used for test data, the number of unique bins can be determined by sets num_min_iterations_expected = len({int(ele) for ele in ui.foreground["intensity"].tolist()}) assert counter >= num_min_iterations_expected
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_bins(self):\n\n \n for filename in ['data/population_padang_1.asc', \n 'data/test_grid.asc']: \n \n R = read_coverage(filename)\n \n min, max = R.get_extrema() #use_numeric=True)\n \n for N in [2,3,5,7,10,16]:\n ...
[ "0.67321396", "0.6631882", "0.612074", "0.60527307", "0.5962843", "0.5934379", "0.5913258", "0.5909307", "0.57914376", "0.5731966", "0.5723782", "0.5706618", "0.56629616", "0.5644072", "0.5630398", "0.562626", "0.562407", "0.561191", "0.5604084", "0.55954075", "0.5590886", ...
0.0
-1
This is the base Exception class for all step failures. It can be manually raised from recipe code to cause the build to turn red.
def StepFailure(self): return recipe_api.StepFailure
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def raise_step_error(self, error: Exception, step: str):\n error_message = \"{}\\nFailed: Error={}\".format(step, str(error))\n logging.error(error_message)\n self.slacker.send_thread_reply(error_message)\n raise Exception(error_message)", "def raise_on_error(self):\n if not self...
[ "0.65778327", "0.6160697", "0.6118424", "0.6045226", "0.6028757", "0.59925586", "0.59890693", "0.5984237", "0.5979543", "0.5880542", "0.58220655", "0.58042306", "0.58023226", "0.57811123", "0.57735544", "0.56904095", "0.56897426", "0.5686951", "0.56869185", "0.5652853", "0.56...
0.6969654
0
StepWarning is a subclass of StepFailure, and will translate to a yellow build.
def StepWarning(self): return recipe_api.StepWarning
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _warn(self, warning=None):\r\n debug.err('Warning: %s' % warning)\r\n\r\n if core.FW_conf['settings'].TestRun.ExecutionMode == 'Leader' and warning != None:\r\n executeInFollower(\"self.warn('%s')\" % (warning,))\r\n\r\n if type(warning) != types.ListType:\r\n warning...
[ "0.680333", "0.6467354", "0.6363371", "0.6182617", "0.6118767", "0.60774654", "0.6036392", "0.6019372", "0.6014528", "0.6010554", "0.5999503", "0.5906176", "0.5892281", "0.5887475", "0.5859568", "0.5821751", "0.5817227", "0.5793164", "0.5664179", "0.5653461", "0.5625123", "...
0.792026
0
InfraFailure is a subclass of StepFailure, and will translate to a purple build. This exception is raised from steps which are marked as `infra_step`s when they fail.
def InfraFailure(self): return recipe_api.InfraFailure
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _identify_fail(failure):\n logger.warning(failure.getErrorMessage())\n logger.warning(\"Failed to setup & obtain identity\")\n return", "def failure_exception(cls, state, exception):\r\n return PlatformMessage(method=\"__reply__\", kwargs={\"__result__\": \"fail\", \"state\": state, \"errcode...
[ "0.5803383", "0.5730745", "0.565321", "0.5649556", "0.56122845", "0.5440349", "0.5320383", "0.52736396", "0.5240046", "0.5213798", "0.5201333", "0.5083693", "0.50791305", "0.50574607", "0.5027117", "0.50205135", "0.5006612", "0.5000682", "0.49848235", "0.49722403", "0.4962557...
0.6850455
0
StepTimeout is a subclass of StepFailure and is raised when a step times out.
def StepTimeout(self): return recipe_api.StepTimeout
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def raise_timeout(self, *args, **kwargs):\n\n self.log.error(\"Task timeout encountered.\")\n raise TimeoutError", "def handler(*args, **kwargs):\n raise TimeoutException(\"Test aborted due to timeout. Test was \" +\n \"expected to finish in less than {} second(s).\".format(time_l...
[ "0.6783338", "0.6670357", "0.6458349", "0.6233549", "0.620531", "0.6151229", "0.61305606", "0.6103031", "0.59383696", "0.5915559", "0.5886344", "0.5850895", "0.58435684", "0.58397263", "0.5815907", "0.5812256", "0.576869", "0.5734896", "0.5714007", "0.56782407", "0.56605077",...
0.7499932
0
The currently active (open) result from the last step that was run. This is a `types.StepData` object.
def active_result(self): return self.step_client.previous_step_result()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def result(self):\n # most pythonic way to get last in last is -1\n return self.history[-1]", "def current_progress_data(self):\n return self._current_progress_data", "def previous_step_result(self):\n return self._previous_step_result", "def cur_step(self):\n return self._cur_...
[ "0.7012832", "0.6931432", "0.6929647", "0.67603475", "0.66973376", "0.6685482", "0.66834754", "0.66508675", "0.66325194", "0.65645987", "0.6562965", "0.65574545", "0.65385914", "0.6496028", "0.6484237", "0.6467374", "0.6467374", "0.6467374", "0.64124614", "0.6401742", "0.6391...
0.78945726
0
Nest allows you to nest steps hierarchically on the build UI. Calling ```python
def nest(self, name): step_result = self(name, []) with self.m.context(name_prefix=name, increment_nest_level=True): yield step_result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def build_step(self):\n pass", "def build_step(self):\n pass", "def test_build_page_nested(build_resources, cli):\n books, _ = build_resources\n src = books.joinpath(\"nested\")\n page = src.joinpath(\"contents\", \"markdown.md\")\n html = src.joinpath(\"_build\", \"_page\", \"content...
[ "0.5666077", "0.5666077", "0.5635756", "0.5634427", "0.53961426", "0.5334729", "0.52571476", "0.52398247", "0.5215903", "0.5194408", "0.5111144", "0.51089895", "0.505281", "0.50474066", "0.5011156", "0.50028014", "0.49496236", "0.4938487", "0.4927877", "0.48954463", "0.485139...
0.5708708
0
See recipe_api.py for docs.
def defer_results(self): return recipe_api.defer_results
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_recipe_information(self):\n pass", "def recipe(self):\n return self.__recipe", "def test_get_recipe_information_bulk(self):\n pass", "def get_recipe(self, _id):\n raise NotImplementedError()", "def test_get_random_recipes(self):\n pass", "def test_search_re...
[ "0.7399995", "0.7240145", "0.7060982", "0.69131684", "0.68955857", "0.6634333", "0.6622917", "0.6594366", "0.6353314", "0.63221014", "0.63158387", "0.6281272", "0.6268768", "0.62628794", "0.6251283", "0.6206122", "0.6205642", "0.61758476", "0.61579376", "0.6142557", "0.613580...
0.59413797
38