query
stringlengths
9
9.05k
document
stringlengths
10
222k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
4
10
document_rank
stringclasses
2 values
Retorna listagem dos arquivos
def lista_arquivos(self): if self.ftp is None: return [] else: resultado = [] retorno = [] self.ftp.retrlines('MLSD', resultado.append) for cada_linha in resultado: entrada = EntradaFtp(cada_linha) if entrada.is_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def obter_lista_arquivos(self):\n if os.path.exists(self.caminho):\n return [arq for arq in self.obter_lista_conteudo() \\\n if os.path.isfile(arq)]\n else:\n return []", "def list_files():\n try:\n return jsonify(os.listdir(env(\"FILES_DIRECTORY\"...
[ "0.7673516", "0.68084085", "0.66956854", "0.66277117", "0.6626192", "0.65281373", "0.6487204", "0.647799", "0.64605755", "0.645598", "0.639651", "0.63295627", "0.63275343", "0.63147396", "0.6298549", "0.6294696", "0.6282167", "0.6255143", "0.6253172", "0.62249583", "0.6201873...
0.7286968
1
Retorna true se for arquivo
def is_file(self): return self.tipo == 'file' or self.tipo is None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isfile(self):\n return os.path.isfile(self.path)", "def isfile (self, path):\r\n pass", "def file_exist() -> bool:\n pass", "def check_file_exist(self):\n return False", "def is_file(self):\n return self.type == \"file\"", "def _existFile(f):\n\treturn os.path.isfil...
[ "0.70813614", "0.69079167", "0.6852577", "0.6793995", "0.6690304", "0.66858846", "0.66646284", "0.6651858", "0.66033655", "0.66000664", "0.6589394", "0.6538725", "0.65283275", "0.6499795", "0.6478022", "0.64681", "0.64333916", "0.6427967", "0.6415164", "0.6413019", "0.6402336...
0.6958971
1
Helper function for williams_pp1(). Multiplies along a Lucas sequence modulo n.
def mlucas(v, a, n): v1, v2 = v, (v**2 - 2) % n for bit in bin(a)[3:]: v1, v2 = ((v1**2 - 2) % n, (v1*v2 - v) % n) if bit == "0" else ((v1*v2 - v) % n, (v2**2 - 2) % n) return v1
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Lucas(input) :\n\n # if input == 0 :\n\n # return 2\n # elif input == 1 :\n\n # return 1\n\n # else :\n\n # return Lucas(input-1) + Lucas(input-2)\n\n\n return sum_series(input,2,1)", "def permute(n, r):\n\n product = 1\n for i in range(n - r + 1, n + 1):\n ...
[ "0.66517645", "0.64554316", "0.63680744", "0.63165027", "0.6310212", "0.6276614", "0.6265264", "0.62147874", "0.6200079", "0.619955", "0.6188208", "0.6180368", "0.6138546", "0.6102861", "0.60983324", "0.60866094", "0.6060417", "0.6048757", "0.6048757", "0.6030923", "0.6030454...
0.7033545
0
Setting two important vars base_prompt textual prompt in CLI (usually hostname) base_pattern regexp for finding the end of command. IT's platform specific parameter For Fujitsu devices base_pattern is "(prompt) (\(.?\))?[>|]"
async def _set_base_prompt(self): logger.info("Host {}: Setting base prompt".format(self._host)) prompt = await self._find_prompt() # Strip off trailing terminator self._base_prompt = prompt[1:-3] delimeter1 = self._get_default_command('delimeter1') delimeter2 = self._get...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def _set_base_prompt(self):\n logger.info(\"Host {}: Setting base prompt\".format(self._host))\n prompt = await self._find_prompt()\n context = 'system'\n # Cut off prompt from \"prompt/context\"\n if '/' in prompt:\n prompt, context = prompt[:-1].split('/')\n ...
[ "0.75031126", "0.67398006", "0.66210955", "0.5923364", "0.55624795", "0.5529208", "0.5523461", "0.53942394", "0.5393195", "0.5328136", "0.52355623", "0.5156721", "0.51549697", "0.5142357", "0.5130616", "0.5094846", "0.50937337", "0.507974", "0.50694937", "0.5042605", "0.50368...
0.77697486
0
A decorator that expect check response of RPC calls and throw BigflowRPCException if any error happened.
def check_response(func): def _wrapper(*args, **kw): with _mutex: _message[:] = [] # why Python list has no clear() ?? result, status = func(*args, **kw) if not status.success: err_msg = "Error running command [%s], reason: %s" % (func.__name__, status.reason) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_result(fn):\n @wraps(fn)\n def wrapper(res):\n result = res.pop('result', None)\n if not result:\n raise KeyError(\n 'The response did not return a \"result\" field'\n )\n status = result.pop('status', None)\n if not status:\n ...
[ "0.6700183", "0.63918424", "0.63207376", "0.63045555", "0.6206757", "0.6102142", "0.6077344", "0.604801", "0.6037033", "0.5984617", "0.59692925", "0.59659195", "0.59565717", "0.59407496", "0.5910053", "0.5878751", "0.58729017", "0.58632493", "0.58285916", "0.57804686", "0.577...
0.7254948
0
unregister pipeline to backend
def unregister_pipeline(pipeline_id): request = service_pb2.UnRegisterPipelineRequest() request.pipeline_id = pipeline_id response = _service.request(request, "unregister_pipeline") import google.protobuf.json_format as json_format res = json_format.Parse(response, service_pb2.VoidResponse()) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unregisterProducer():", "def unregister(self):\n self._executor.unregister_publisher(self)", "def unregister(self):\r\n self._unregister()", "def _unregister_from_server(self):\n self.remote_controller.unregister()", "def deregister() -> None:\n plot_backend = _get_plot_backend(...
[ "0.6604423", "0.65468335", "0.65117574", "0.63674676", "0.6346202", "0.6305482", "0.63015515", "0.6297421", "0.6242873", "0.6228829", "0.6207954", "0.61655986", "0.61009914", "0.60882753", "0.60332674", "0.5996058", "0.58897746", "0.5888465", "0.58726144", "0.5857079", "0.583...
0.6977402
0
request default fs.defaultFS from hadoop config
def default_fs_defaultfs(hadoop_config_path=None): if hadoop_config_path is None: hadoop_config_path = default_hadoop_config_path() request = service_pb2.SingleStringRequest() request.request = hadoop_config_path response = _service.request(request, "default_fs_defaultfs") import google.pro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_default(self, fs_path):\n if os.path.isdir(fs_path):\n default = None\n for name in self.defaults:\n _path = os.path.join(fs_path, name)\n if os.path.isfile(_path):\n default = _path\n break\n if de...
[ "0.7099347", "0.6072627", "0.6032008", "0.5718299", "0.57107574", "0.5691225", "0.55974066", "0.55155534", "0.54611903", "0.5432128", "0.5379513", "0.5376095", "0.53721523", "0.5333084", "0.5302819", "0.5302819", "0.5282178", "0.5261153", "0.52520853", "0.52518415", "0.518448...
0.8243632
0
request default hadoop.job.ugi from hadoop config
def default_hadoop_job_ugi(hadoop_config_path=None): if hadoop_config_path is None: hadoop_config_path = default_hadoop_config_path() request = service_pb2.SingleStringRequest() request.request = hadoop_config_path response = _service.request(request, "default_hadoop_job_ugi") import google...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def uge(jobs, threads, tmp_dir):\n # NOTE: add later for LOCUS cluster \n pass", "def get_job(arn=None):\n pass", "def hadoop_config(self) -> pulumi.Output[Optional['outputs.JobHadoopConfig']]:\n return pulumi.get(self, \"hadoop_config\")", "def describe_labeling_job(LabelingJobName=None):\n ...
[ "0.57051575", "0.5538002", "0.5263799", "0.5253511", "0.5190973", "0.5114444", "0.50716823", "0.50423837", "0.5012213", "0.48823687", "0.48512137", "0.48354277", "0.48348206", "0.4818911", "0.48125398", "0.48005927", "0.47900203", "0.4767044", "0.46932414", "0.46913677", "0.4...
0.8138352
0
request toft style path from flume
def get_toft_style_path(input_path, hadoop_config_path=None, \ fs_defaultfs=None, hadoop_job_ugi=None): if hadoop_config_path is None: hadoop_config_path = default_hadoop_config_path() request = service_pb2.GetToftStylePathRequest() request.input_path = input_path request.hadoop_conf_path =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def path(self):\n ...", "def pathfor( request, *args, **kwargs ):", "def get_short_path(content):", "def get_plato_path():\n\treturn \"/tsi/\"", "def __fspath__(self):\n raise NotImplementedError", "def select_path(self):\r\n pass", "def get_path(self):\n return self.path", "...
[ "0.5960278", "0.57768184", "0.55061525", "0.5421259", "0.5418336", "0.54118496", "0.53816795", "0.53617346", "0.5278431", "0.52770036", "0.5262675", "0.5178031", "0.51775694", "0.5150275", "0.5100286", "0.5100286", "0.5059569", "0.5045037", "0.50438774", "0.5034783", "0.50258...
0.59020686
1
Tests registration functionality of User model
def test_register(self): User.register( email="test2@test.com", password="password2", first_name="user2", last_name="name2" ) response = User.login("test2@test.com", "password2") self.assertIsInstance(response, User) self.assertEqual(len(User.query.all())...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_user_registration(self):\r\n result=self.user.get_user_register(\"Stephen\",\" Ochieng\",\"stephenochieng955@mail.com\",\"stephenochieng\",\"eat\")\r\n self.assertEqual(1,result,\"User registration successful\")", "def test_user_can_register(self):\n response = self.client.p...
[ "0.8235095", "0.819919", "0.8189244", "0.81847775", "0.8164212", "0.81477773", "0.7992161", "0.794759", "0.78918475", "0.78745383", "0.78745383", "0.78745383", "0.78316367", "0.7818895", "0.7805848", "0.77991885", "0.7746685", "0.7688674", "0.7641509", "0.7630688", "0.7617234...
0.82563204
0
Generate predictions for the given year and round number. Params
def make_predictions( year_range: YearRange, round_number: Optional[int] = None, ml_model_names: Optional[List[str]] = None, train=False, ) -> ApiResponse: session = get_current_session() assert session is not None context = session.load_context() if ml_model_names is None: ml_m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_predictions(year, month):\n \n start_date = str(year)+\"-\"+str(month)+\"-01\"\n end_date = str(year)+\"-\"+str(month)+\"-\"+str(monthrange(year, month)[1])\n\n date_range = pd.date_range(start_date,end_date, freq='D').strftime(\"%Y-%m-%d\").tolist()\n\n # predictfunction \n # do predict...
[ "0.64896595", "0.5926483", "0.59193724", "0.5809263", "0.57112885", "0.5694651", "0.5675027", "0.5655163", "0.5405746", "0.5379481", "0.5379472", "0.5378412", "0.5371388", "0.53511566", "0.5350496", "0.5339288", "0.53294235", "0.53246045", "0.52632165", "0.5262513", "0.525586...
0.6721136
0
Fetch fixture data (doesn't include match results) from afl_data service. Params
def fetch_fixture_data( start_date: str, end_date: str, data_import=match_data, verbose: int = 1 ) -> ApiResponse: return _api_response( pd.DataFrame( data_import.fetch_fixture_data( start_date=start_date, end_date=end_date, verbose=verbose ) ).pipe(match....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fixture_info_singel(self, fixture_id):\n ds = load_match_data(f'https://footballapi.pulselive.com/football/fixtures/{fixture_id}')\n return ds", "def fixture_example_data():\n import_example_data()", "def fixture_stats_singel(self, fixture):\n ds = load_match_data(f'https://football...
[ "0.60492456", "0.59769773", "0.5971131", "0.59660256", "0.59453607", "0.5938839", "0.5911953", "0.578639", "0.5748903", "0.5733067", "0.5704167", "0.5673164", "0.5668032", "0.5658829", "0.5654134", "0.56433135", "0.56352216", "0.5612837", "0.55896604", "0.5586649", "0.5583608...
0.6456919
0
Fetch general info about all saved ML models.
def fetch_ml_model_info() -> ApiResponse: return _api_response(settings.ML_MODELS)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fetch_models(self):\n if self.model_pool is None:\n print(\"Please train a model first.\", file=STDE)\n EXIT(1)\n else:\n return [copy.deepcopy(m.steps[-1][-1]) for m in self.model_pool]", "def download_all_models() -> None:\n model_keys = ModelInfo.get_all_m...
[ "0.65717435", "0.64941037", "0.6279719", "0.62791824", "0.6134426", "0.6077706", "0.6033436", "0.59957504", "0.59844786", "0.59277683", "0.59214056", "0.58992034", "0.58709365", "0.5870019", "0.58051854", "0.58033586", "0.57702273", "0.5753244", "0.569892", "0.5690191", "0.56...
0.7074658
0
Check if this is the next run after the provided time.
def is_next_run(self, local_time): return local_time <= self.stop_time
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def checkAtFinalTime():\n global final_time\n if final_time <= current_second:\n return True\n return False", "def after(self, time2):\r\n return self.to_seconds() > time2.to_seconds()", "def after(self, time2):\n return self.to_seconds() > time2.to_seconds()", "def check_timer(...
[ "0.7293386", "0.72567403", "0.72395235", "0.70334125", "0.6916088", "0.6906378", "0.68740577", "0.6783346", "0.6469555", "0.6455581", "0.64483917", "0.64370835", "0.6414599", "0.63907135", "0.6384521", "0.63736683", "0.6356017", "0.6342384", "0.62845945", "0.62581104", "0.624...
0.74888444
0
Prints the tensor t with preceding message msg.
def log(msg, t): print_op = tf.print(msg, t) with tf.control_dependencies([print_op]): t = tf.identity(t) return t
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_print(self, t, message):\n if self.config['debug']:\n return tf.Print(t, (t,), message=message+\": \", summarize=10)\n return t", "def tprint(msg, indent=0):\n\n print(\" \" * indent + \n \" \" * (indent+1) + \n \"'-- \" + msg)", "def tprint(msg):\n ...
[ "0.74767315", "0.668424", "0.6668774", "0.6668774", "0.65578055", "0.651654", "0.6516538", "0.6291423", "0.6276846", "0.6208279", "0.6134321", "0.6100165", "0.60034364", "0.5947219", "0.5933501", "0.586149", "0.5843865", "0.5751779", "0.5738122", "0.57358336", "0.5668699", ...
0.7679175
0
Creates a new tensor axis and tiles it to a specified length.
def tile_new_axis(t, axis, length): t = tf.expand_dims(t, axis=axis) cur_shape = t.get_shape().as_list() tile_shape = [1] * len(cur_shape) tile_shape[axis] = length return tf.tile(t, tile_shape)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _set_and_permute_time_axis(tensor, sequence_length, axis=-3):\n shape = tensor.shape.as_list()\n shape[0] = sequence_length\n tensor.set_shape(shape)\n\n # in the original tensor the first axis is always the time axis.\n permutation = list(range(tensor.shape.ndims))\n permutation[0] = permutation[axis]\n...
[ "0.6480759", "0.6409938", "0.6055184", "0.6055184", "0.5978806", "0.58723545", "0.5797694", "0.579023", "0.5745332", "0.57359654", "0.569535", "0.5675055", "0.56415784", "0.562487", "0.5613713", "0.5598268", "0.5557938", "0.5546641", "0.5530259", "0.55118066", "0.5508421", ...
0.86206746
0
Removes the eltth element from the axisth axis of a tensor t. For example, remove_element([[1, 2], [3, 4]], Tensor(0), 0) > [[3, 4]].
def remove_element(t, elt, axis): elt = tf.cast(elt, dtype=tf.int32) t_shape = t.get_shape().as_list() elt_tensor = tf.constant(list(range(t.shape[axis].value)), dtype=tf.int32) num_dims_before_axis = axis num_dims_after_axis = len(t.shape) - axis - 1 elt_tensor = tf.logical_not(tf.equal(elt_tensor, tf.resh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def remove_element(self, element=None):\n pass", "def Remove(self, element):\r\n position = self.FindPositonOfElement(element)\r\n del self.__listOfElements[position]", "def remove(self, elt):\n if self.get(elt, 0) <= 0:\n raise ValueError, \"not enough occurrences\"\n ...
[ "0.66206175", "0.5904721", "0.5829151", "0.56832397", "0.5564529", "0.5551533", "0.54908854", "0.54632276", "0.53851146", "0.53682333", "0.5340721", "0.5312596", "0.5299521", "0.5270173", "0.52255553", "0.5221951", "0.52091503", "0.5205296", "0.5203277", "0.5177385", "0.51413...
0.8022103
0
Returns the edit width of the column.
def get_edit_width ( self, object ): return self.edit_width
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def width(self):\n return self.col", "def get_column_width(self, index):\n return self.colwid[index]", "def get_column_width(self):\n return \"%.2f\\\\locallinewidth\" % self._col_width[self._cell_in_row-1]", "def GetWidth(self):\r\n\r\n return self._total_col_width", "def GetCo...
[ "0.80929536", "0.7804587", "0.74727774", "0.7396021", "0.711259", "0.7029836", "0.7003335", "0.7002492", "0.69799286", "0.6937083", "0.6937083", "0.6925785", "0.69248134", "0.69010425", "0.69010425", "0.69010425", "0.69010425", "0.69010425", "0.69010425", "0.69010425", "0.690...
0.81786096
0
Returns the height of the column cell's row while it is being edited.
def get_edit_height ( self, object ): return self.edit_height
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def height(self):\n return self.row", "def height(self):\n return len(self.rows)", "def get_grid_height(self):\r\n return self.height", "def height(self):\n return len(self._rows)", "def get_grid_height(self):\n # replace with your code\n return self._height", "d...
[ "0.8035072", "0.72411776", "0.7180565", "0.71582407", "0.7148934", "0.7112864", "0.70668644", "0.7054299", "0.7054299", "0.70108306", "0.70071125", "0.70071125", "0.7004636", "0.70033884", "0.70033884", "0.6998274", "0.6998274", "0.6943957", "0.6937389", "0.69369316", "0.6936...
0.73265344
1
Returns the text color for the column for a specified object.
def get_text_color ( self, object ): return self.text_color_
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetTextColour(self):\r\n \r\n return self._colText", "def get_text_color ( self, object ):\n if self._is_selected( object ):\n return self.selected_text_color_\n return self.text_color_", "def get_cell_color ( self, object ):\n if self.is_editable( object ):\n ...
[ "0.7614782", "0.7188343", "0.65197384", "0.6363163", "0.617479", "0.6021967", "0.599909", "0.59637135", "0.59488773", "0.58404547", "0.5838818", "0.58345515", "0.5815001", "0.577195", "0.5756744", "0.57249033", "0.56711125", "0.56531864", "0.5608158", "0.5579932", "0.55746275...
0.77662975
0
Returns the text font for the column for a specified object.
def get_text_font ( self, object ): return self.text_font
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GetColumnFont(self, column):\r\n\r\n return self._header_win.GetColumn(column).GetFont()", "def get_text_font ( self, object ):\n if self._is_selected( object ):\n return self.selected_text_font\n return self.text_font", "def font(self):\n return self[\"font\"]", "d...
[ "0.7343984", "0.73432946", "0.64068705", "0.64068705", "0.64068705", "0.6281582", "0.6243418", "0.62036645", "0.6183562", "0.61154807", "0.61154807", "0.60570663", "0.5856995", "0.5856995", "0.5856995", "0.583874", "0.58335286", "0.58137065", "0.58137065", "0.58137065", "0.58...
0.78598624
0
Returns the cell background color for the column for a specified object.
def get_cell_color ( self, object ): if self.is_editable( object ): return self.cell_color_ return self.read_only_cell_color_
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cell_color ( self, object ):\n if self.is_editable( object ):\n if self._is_selected( object ):\n return self.selected_cell_color_\n return self.cell_color_\n return self.read_only_cell_color_", "def background_color(self) -> BoxColor:\n return ge...
[ "0.68345994", "0.6281526", "0.6057362", "0.5913437", "0.5886267", "0.5784454", "0.5756031", "0.5750721", "0.5694421", "0.5671432", "0.561941", "0.561755", "0.5564679", "0.5548145", "0.55429244", "0.5522229", "0.54416186", "0.5405656", "0.53389734", "0.52914613", "0.52597046",...
0.69000113
0
Returns the horizontal alignment for the column for a specified object.
def get_horizontal_alignment ( self, object ): return self.horizontal_alignment
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def horizontal_alignment(self):\n self.update()\n return self._horizontal_alignment", "def GetColumnAlignment(self, column):\r\n \r\n return self._header_win.GetColumn(column).GetAlignment()", "def get_vertical_alignment ( self, object ):\n return self.vertical_alignment", ...
[ "0.71596956", "0.66888165", "0.66678", "0.66678", "0.6576033", "0.6463146", "0.6463146", "0.6463146", "0.63887215", "0.60205996", "0.5945853", "0.59434193", "0.5925244", "0.5801299", "0.5712342", "0.5712342", "0.5664853", "0.5608494", "0.56003577", "0.5562215", "0.55023766", ...
0.80969995
1
Returns the vertical alignment for the column for a specified object.
def get_vertical_alignment ( self, object ): return self.vertical_alignment
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vertical_alignment(self):\n self.update()\n return self._vertical_alignment", "def vertical_align(self, vertical_align=None):\n if vertical_align is None:\n return self._vertical_align\n else:\n if not isinstance(vertical_align, str):\n raise T...
[ "0.7223343", "0.672058", "0.64171994", "0.6382543", "0.63440526", "0.63440526", "0.625835", "0.625835", "0.625835", "0.59206295", "0.5761124", "0.56917906", "0.5639802", "0.5639802", "0.5541542", "0.5504931", "0.5481873", "0.5302524", "0.52992725", "0.5296362", "0.52353233", ...
0.84600127
1
Returns whether the column is editable for a specified object.
def is_editable ( self, object ): return self.editable
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_editable(obj, request):\n if hasattr(obj, \"is_editable\"):\n return obj.is_editable(request)\n else:\n perm = obj._meta.app_label + \".\" + obj._meta.get_change_permission()\n return request.user.is_authenticated() and request.user.has_perm(perm)", "def is_editable(self) -> boo...
[ "0.8036126", "0.77918744", "0.7699945", "0.75353354", "0.7532661", "0.7500328", "0.7448334", "0.74188906", "0.7051106", "0.7037737", "0.70039374", "0.67446613", "0.6712406", "0.6641292", "0.6572272", "0.6529064", "0.6424833", "0.64131635", "0.63626796", "0.63386875", "0.62997...
0.8471644
1
Returns whether the column is automatically edited/viewed for a specified object.
def is_auto_editable ( self, object ): return self.auto_editable
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_editable ( self, object ):\n return self.editable", "def is_editable ( self, object ):\n return self.editable", "def is_editable(obj, request):\n if hasattr(obj, \"is_editable\"):\n return obj.is_editable(request)\n else:\n perm = obj._meta.app_label + \".\" + obj._meta...
[ "0.76972604", "0.76972604", "0.7520525", "0.6930102", "0.69168395", "0.6909266", "0.6866577", "0.68585646", "0.67663133", "0.66491926", "0.66394746", "0.6545253", "0.65424633", "0.6512989", "0.63376826", "0.62885433", "0.62718624", "0.6237914", "0.6211956", "0.61737317", "0.6...
0.79319084
0
Returns the tooltip to display when the user mouses over the column for a specified object.
def get_tooltip ( self, object ): return self.tooltip
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tooltip(self) -> str:\n return self._tooltip", "def mouseover_timeplot(self):\n return str(self.mouseover).lower()", "def on_mouse_over(self, event):\n # This method was suggested by none other than Robin Dunn\n # http://www.blog.pythonlibrary.org/2010/04/04/wxpython-grid-tips-a...
[ "0.64052784", "0.61276644", "0.6049563", "0.60280234", "0.6004581", "0.59218913", "0.5912486", "0.5831216", "0.57802105", "0.5775897", "0.5726448", "0.56410205", "0.55914676", "0.5504774", "0.55010265", "0.54704416", "0.54245305", "0.54206836", "0.5413765", "0.5377842", "0.53...
0.7423093
0
Gets the formatted value of the column for a specified object.
def get_value ( self, object ): try: if self.format_func is not None: return self.format_func( self.get_raw_value( object ) ) return self.format % ( self.get_raw_value( object ), ) except: logger.exception( 'Error occurred trying to format a %s value'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_value ( self, object ):\n try:\n value = getattr( object, self.name )\n try:\n return self.format % ( value, )\n except:\n return 'Format!'\n except:\n return 'Undefined!'", "def get_data_column ( self, object ):\n ...
[ "0.71020174", "0.65151936", "0.63993406", "0.63993406", "0.63993406", "0.63993406", "0.63885236", "0.6360088", "0.6301943", "0.6292844", "0.6256722", "0.62438214", "0.6239413", "0.6205446", "0.6177672", "0.60743415", "0.60743415", "0.60743415", "0.60582256", "0.60566145", "0....
0.7407414
0
Returns the drag value for the column.
def get_drag_value ( self, object ): return self.get_raw_value( object )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _drag_col(self, event):\n x = self._dx + event.x # get dragged column new left x coordinate\n self._visual_drag.place_configure(x=x) # update column preview position\n # if one border of the dragged column is beyon the middle of the\n # neighboring column, swap them\n if (s...
[ "0.6463829", "0.63733226", "0.637148", "0.63159084", "0.6196246", "0.6183008", "0.6142504", "0.6055594", "0.60543144", "0.6047095", "0.59826267", "0.59033227", "0.58998364", "0.5870958", "0.58179945", "0.58167654", "0.58156073", "0.5809952", "0.5798979", "0.57964015", "0.5742...
0.7649346
0
Gets the editor for the column of a specified object.
def get_editor ( self, object ): if self.editor is not None: return self.editor target, name = self.target_name( object ) return target.base_trait( name ).get_editor()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_editor ( self, object ):\n return super( NumericColumn, self ).get_editor( object )", "def get_editor ( self, object ):\n return None", "def editor(self):\n return self._editor", "def get_data_column ( self, object ):\n return getattr( object, self.name )", "def get_edit...
[ "0.7736865", "0.6847517", "0.62578267", "0.6037094", "0.5778927", "0.5654012", "0.56333137", "0.560536", "0.5563185", "0.55332774", "0.5499682", "0.54986906", "0.5476404", "0.53061664", "0.5272211", "0.52221936", "0.5216628", "0.5214872", "0.52039963", "0.51888514", "0.518130...
0.72835356
1
Gets the editor style for the column of a specified object.
def get_style ( self, object ): return self.style
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_cell_style(self, row: int, column: int):\n style = None\n if 'STYLE' in self._source.columns:\n style = self._source.loc[self.get_source_row(row), 'STYLE']\n column_name = self._dataframe.columns[column]\n if f'STYLE_{column_name}' in self._source.columns:\n ...
[ "0.681116", "0.66179705", "0.65270686", "0.6340773", "0.60804594", "0.601501", "0.5947503", "0.5778554", "0.5778554", "0.5593435", "0.5577242", "0.5540711", "0.5402539", "0.5243572", "0.52218306", "0.51929045", "0.5146163", "0.5135001", "0.51014274", "0.5091314", "0.5056963",...
0.6718743
1
Returns whether a specified value is valid for dropping on the column for a specified object.
def is_droppable ( self, object, value ): if self.droppable: try: target, name = self.target_name( object ) target.base_trait( name ).validate( target, name, value ) return True except: pass return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_droppable ( self, object, row, value ):\n return self.droppable", "def is_droppable ( self, object, value ):\n return self.droppable", "def should_drop(self):\n # type: () -> bool\n if self._drop_if_none and self.value is None:\n return True\n if self._drop_if_default and sel...
[ "0.64878917", "0.61651295", "0.6101049", "0.54825044", "0.54343235", "0.5418674", "0.5370877", "0.53256834", "0.53118193", "0.5264375", "0.5242839", "0.5237769", "0.522537", "0.51548845", "0.5152624", "0.5147691", "0.51406544", "0.51149774", "0.5077441", "0.5057825", "0.50472...
0.6920237
0
Returns the target object and name for the column.
def target_name ( self, object ): object = self.get_object( object ) name = self.name col = name.rfind( '.' ) if col < 0: return ( object, name ) return ( xgetattr( object, name[ :col ] ), name[ col + 1: ] )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_data_column ( self, object ):\n return getattr( object, self.name )", "def get_name(self):\n return self.col_name", "def process_source(self):\n source_col = getattr(self.model_cls, self.source)\n return source_col", "def columnName(self):\n return self.__column", ...
[ "0.72194386", "0.6865489", "0.67463326", "0.6739004", "0.66785336", "0.65485865", "0.6540359", "0.65365505", "0.63675463", "0.6321004", "0.62596166", "0.6224228", "0.617772", "0.6166086", "0.6120911", "0.61080205", "0.61018", "0.6067682", "0.6064286", "0.60361964", "0.6012437...
0.7848668
0
Gets the unformatted value of the column for a specified object.
def get_raw_value ( self, object ): try: return eval( self.expression_, self.globals, { 'object': object } ) except: logger.exception( 'Error evaluating table column expression: %s' % self.expression ) return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_value ( self, object ):\n try:\n if self.format_func is not None:\n return self.format_func( self.get_raw_value( object ) )\n\n return self.format % ( self.get_raw_value( object ), )\n except:\n logger.exception( 'Error occurred trying to format...
[ "0.6904193", "0.66996723", "0.66036606", "0.64744294", "0.6443742", "0.62569445", "0.62569445", "0.62569445", "0.62285745", "0.61766744", "0.61464137", "0.6130707", "0.6120383", "0.6120383", "0.6120383", "0.6120383", "0.6100271", "0.60768753", "0.60460687", "0.60009694", "0.5...
0.69216186
0
Returns the cell background color for the column for a specified object row.
def get_cell_color ( self, object ): if self.is_editable( object ): if self._is_selected( object ): return self.selected_cell_color_ return self.cell_color_ return self.read_only_cell_color_
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cell_color ( self, object ):\n if self.is_editable( object ):\n return self.cell_color_\n return self.read_only_cell_color_", "def GetBackgroundColour(self):\r\n\r\n return self._colBack", "def _get_cell_style(self, row: int, column: int):\n style = None\n ...
[ "0.65797424", "0.60449946", "0.5811809", "0.57736534", "0.57585245", "0.57136506", "0.567724", "0.5561861", "0.5518657", "0.55150086", "0.54836965", "0.5456312", "0.5450515", "0.5440606", "0.54206413", "0.54044914", "0.53747666", "0.528467", "0.5278225", "0.52495706", "0.5246...
0.6549076
1
Returns the horizontal alignment for the column for a specified object row.
def get_horizontal_alignment ( self, object ): return self.horizontal_alignment
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def horizontal_alignment(self):\n self.update()\n return self._horizontal_alignment", "def GetColumnAlignment(self, column):\r\n \r\n return self._header_win.GetColumn(column).GetAlignment()", "def get_horizontal(self, row):\n start = self.HORIZONTAL_GROUP[row]\n end =...
[ "0.6685467", "0.6620425", "0.6472826", "0.6220936", "0.6108616", "0.6108616", "0.60954803", "0.60380316", "0.5980269", "0.59591275", "0.59591275", "0.59591275", "0.59015685", "0.5730585", "0.57073325", "0.56525975", "0.54857033", "0.5475834", "0.5449732", "0.53637564", "0.529...
0.7387041
0
Returns the vertical alignment for the column for a specified object row.
def get_vertical_alignment ( self, object ): return self.vertical_alignment
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vertical_alignment(self):\n self.update()\n return self._vertical_alignment", "def GetColumnAlignment(self, column):\r\n \r\n return self._header_win.GetColumn(column).GetAlignment()", "def vertical_align(self, vertical_align=None):\n if vertical_align is None:\n ...
[ "0.6709595", "0.6226034", "0.5891693", "0.58855855", "0.5677167", "0.5677167", "0.56288296", "0.56288296", "0.56288296", "0.5566138", "0.5482898", "0.5447256", "0.54423386", "0.5441789", "0.542882", "0.53785", "0.50378126", "0.5026324", "0.5024285", "0.5018575", "0.5005334", ...
0.7624583
0
Returns whether the column is editable for a specified object row.
def is_editable ( self, object ): return self.editable
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsColumnEditable(self, column):\r\n\r\n return self._header_win.GetColumn(column).IsEditable()", "def IsColumnEditable(self, column):\r\n\r\n if column < 0 or column >= self.GetColumnCount():\r\n raise Exception(\"Invalid column\")\r\n \r\n return self._columns[column]....
[ "0.7662414", "0.7371423", "0.73709977", "0.71733326", "0.7105093", "0.70972407", "0.7062453", "0.70296574", "0.6991427", "0.6914872", "0.6680477", "0.6525289", "0.6519814", "0.6347295", "0.63279206", "0.632701", "0.6305613", "0.6218226", "0.61912227", "0.6187087", "0.6173658"...
0.7756578
0
Returns whether a specified value is valid for dropping on the column for a specified object row.
def is_droppable ( self, object, row, value ): return self.droppable
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ok_to_delete_row(self, row):\n if self.is_new_row(row):\n return False, _('Unable to delete new row')\n elif row == 0:\n return False, _('Unable to delete sofa id row')\n elif self.new_is_dirty:\n return (False, _(\n 'Cannot delete a row whil...
[ "0.6073959", "0.60088974", "0.59215873", "0.5790832", "0.5785787", "0.5694746", "0.5676449", "0.5639749", "0.5609281", "0.5594955", "0.5576055", "0.5543754", "0.55127364", "0.542477", "0.540413", "0.5380293", "0.5355496", "0.5353818", "0.53468966", "0.53028846", "0.5299161", ...
0.6675972
0
Returns the context menu to display when the user rightclicks on the column for a specified object row.
def get_menu ( self, object, row ): return self.menu
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def OnLabelRightClick(self, evt):\n \n self.actRow = evt.Row\n self.actCol = evt.Col\n \n if evt.Row<0 and evt.Col>=0: #right click on column label\n\n menu = wx.Menu()\n \n miX = menu.Append(self.ID_popup_Column_SetX,\n ...
[ "0.63320315", "0.60743284", "0.6026695", "0.6015952", "0.5881344", "0.5881344", "0.5759186", "0.5736317", "0.5717631", "0.5715322", "0.570313", "0.5697393", "0.56804633", "0.565332", "0.56356126", "0.5610479", "0.5600209", "0.5596086", "0.5590415", "0.55813175", "0.55645055",...
0.7243171
0
Sets the value of the column for a specified object row.
def set_value ( self, object, row, value ): column = self.get_data_column( object ) column[ row ] = type( column[ row ] )( value )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_value(self, row, colName, value):\n\t\tself[row][self._columns[colName]] = value", "def setRow(self, row): \n self.row = row", "def SetValue(self, row, col, value):\n try:\n self.data[row, self.colsel[col]] = value\n except IndexError:\n while self.GetN...
[ "0.8300984", "0.75176555", "0.7473368", "0.733832", "0.72795653", "0.70879006", "0.7076263", "0.70726997", "0.7040989", "0.6942974", "0.69129324", "0.68377095", "0.6772081", "0.6717399", "0.66172254", "0.65897125", "0.6587395", "0.6572576", "0.65365976", "0.6533701", "0.65043...
0.87199926
0
Gets the editor for the column of a specified object row.
def get_editor ( self, object ): return super( NumericColumn, self ).get_editor( object )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_editor_row(editable_property):\n try:\n editor = editable_property.args[EDITOR]\n except KeyError:\n editor = SLIDER #default, if editor not specified\n \n create_func = EDITOR_ROW_CREATORS[editor]\n return create_func(editable_property)", "def get_editor ( self, object ):\n ...
[ "0.6708982", "0.63182646", "0.60418475", "0.58705795", "0.582339", "0.57156456", "0.5626795", "0.5623236", "0.5578205", "0.55349874", "0.55187184", "0.5493587", "0.5486184", "0.54861456", "0.54533494", "0.544203", "0.5428219", "0.54095453", "0.5408204", "0.54041564", "0.54038...
0.7125642
0
Gets the entire contents of the specified object column.
def get_data_column ( self, object ): return getattr( object, self.name )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getColumn(self, column):\n returnvalue = list()\n for row in self._value:\n returnvalue.append(row[column])\n return returnvalue", "def contentForColumn(self, column):\n if current.session.avaliacao and column in current.session.avaliacao and current.session.avaliacao[c...
[ "0.6574598", "0.6481264", "0.6405304", "0.6304054", "0.62746763", "0.62708586", "0.6166778", "0.61511713", "0.60954064", "0.60452986", "0.6024281", "0.60194963", "0.601706", "0.6007796", "0.59354424", "0.58936477", "0.5869084", "0.58479387", "0.58136773", "0.579271", "0.57779...
0.65387875
1
Returns whether a specified object row is selected.
def _is_selected ( self, object ): if hasattr(object, 'model_selection') \ and object.model_selection is not None: return True return False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IsObjectSelected(object_id):\n rhobj = rhutil.coercerhinoobject(object_id, True, True)\n return rhobj.IsSelected(False)", "def is_selected(self) -> bool:\r\n return self.selected", "def IsSelected(self, item):\r\n\r\n return item.IsSelected()", "def is_selected(self):\n return ...
[ "0.72017807", "0.6870384", "0.6837284", "0.67328167", "0.67328167", "0.6723938", "0.66021824", "0.65325785", "0.64263475", "0.6371268", "0.6346885", "0.6279871", "0.62348795", "0.6076872", "0.60306394", "0.60086066", "0.59902656", "0.5912277", "0.58754724", "0.58754724", "0.5...
0.76381314
0
Sets the value of the column for a specified object.
def set_value ( self, object, value ): object[ self.index ] = value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_value ( self, object, row, value ):\n column = self.get_data_column( object )\n column[ row ] = type( column[ row ] )( value )", "def __set__(self, instance, value):\r\n if instance:\r\n return instance._values[self.column.column_name].setval(value)\r\n else:\r\n ...
[ "0.8151175", "0.7241931", "0.7206155", "0.7179882", "0.69967765", "0.6885749", "0.6606071", "0.6422484", "0.64063424", "0.6385849", "0.6382012", "0.6369049", "0.63424414", "0.6314007", "0.63119334", "0.62879497", "0.6277313", "0.62759095", "0.62614375", "0.62551206", "0.62551...
0.7529195
1
Takes the plaintext and encodes it into unicode, hashes a PW, then passes the decoded hash to database.
def passwd(self, plaintext): self._password = bcrypt.generate_password_hash(plaintext.encode('utf8')).decode('utf8')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def password (string):\n\t\n\treturn hexdigest_mySQL41plus (string)", "def old_password (string):\n\t\n\treturn hexdigest_mySQL41prior (string)", "def encode(string, password):\r\n\r\n print(\"Calling encode...\")\r\n\r\n password = [p for p in password] # Set the password as an array\r\n encrypted_s...
[ "0.66521853", "0.61405796", "0.5994734", "0.5986745", "0.59714735", "0.59560364", "0.5941288", "0.59282947", "0.59214574", "0.5915878", "0.59009856", "0.5883217", "0.5868101", "0.5800395", "0.57574606", "0.5751219", "0.5732574", "0.57244116", "0.56992215", "0.5677442", "0.564...
0.6442206
1
First checks if user has old SHA256 password. If a SHA256 pw returns as anything besides null, then we check if the password was valid. If it is valid we convert the plaintext into bcrypt PW, remove the old password, and commit the user to DB. Then we allow the Bcrypt pw hash comparison.
def check_password(self, password): check = False if self.password is not None: logger.critical('Old style password exists.') if check_password_hash(self.password, password): self.passwd = password self.password = None db.session.ad...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def old_password_check(form, field):\n old_password = field.data\n password = current_user.password\n r = pwd_context.verify(old_password, current_user.password)\n if not r:\n raise validators.ValidationError('old password is wrong')", "def __is_correct_password(salt: bytes, pw_hash: bytes, pa...
[ "0.6957514", "0.69238627", "0.6763713", "0.67592585", "0.6738218", "0.66951346", "0.66834366", "0.65960836", "0.65084743", "0.6442836", "0.64326787", "0.6427476", "0.6390737", "0.63809144", "0.63685524", "0.6346269", "0.63041514", "0.6302455", "0.6296736", "0.62635005", "0.62...
0.7017114
0
Make sure that symfit.distributions.Gaussians produces the expected sympy expression.
def test_gaussian(): x0 = Parameter('x0') sig = Parameter('sig', positive=True) x = Variable('x') new = sympy.exp(-(x - x0)**2/(2*sig**2))/sympy.sqrt((2*sympy.pi*sig**2)) assert isinstance(new, sympy.Expr) g = Gaussian(x, x0, sig) assert issubclass(g.__class__, sympy.Expr) assert new ==...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_ln_gauss(self):\n Q = likelihood()\n test_object = test_values_for_likelihood()\n experimental_values = [0.9,2.1,3.2]\n errors = [0.5,0.4,0.3]\n reference_q_value = 0.27347222222222267\n reference_q_derivative = np.array([-3.75833333, -3.75833333])\n Q.add_...
[ "0.58845526", "0.5704611", "0.5513407", "0.54449564", "0.54421055", "0.54047245", "0.5311852", "0.529523", "0.5256945", "0.52331537", "0.5224623", "0.5196203", "0.5194813", "0.5165842", "0.5157111", "0.51552755", "0.5154017", "0.51534283", "0.514364", "0.5114567", "0.51137024...
0.6460979
0
Make sure that symfit.distributions.Exp produces the expected sympy expression.
def test_exp(): l = Parameter('l', positive=True) x = Variable('x') new = l * sympy.exp(- l * x) assert isinstance(new, sympy.Expr) e = Exp(x, l) assert issubclass(e.__class__, sympy.Expr) assert new == e # A pdf should always integrate to 1 on its domain assert sympy.integrate(e, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def exp(x):\n raise NotImplementedError", "def test_exp():\n x = np.linspace(-3,3,13)\n\n default_use_numexpr = accel_math._USE_NUMEXPR\n\n accel_math._USE_NUMEXPR = True\n r1 = accel_math._exp(x)\n\n accel_math._USE_NUMEXPR = False\n r2 = accel_math._exp(x)\n\n np.testing.assert_almo...
[ "0.6702245", "0.6690548", "0.6529956", "0.6446913", "0.6150321", "0.60528123", "0.59719956", "0.5947475", "0.5865199", "0.58573824", "0.58488023", "0.5810286", "0.5806817", "0.58056766", "0.57667303", "0.5749579", "0.57366955", "0.57136726", "0.57097775", "0.56992024", "0.567...
0.7502871
0
Return a string representing the form data.
def __str__(self): # Build a list of lists, each containing "lines" of the # request. Each part is separated by a boundary string. # Once the list is built, return a string where each # line is separated by '\r\n'. parts = [] part_boundary = '--' + self.boundary ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_form_data(self) -> dict:\n with logging.LogCall(__file__, \"get_form_data\", self.__class__):\n return self.serialize()", "def __str__(self):\n # Build a list of lists, each containing \"lines\" of the\n # request. Each part is separated by a boundary string.\n # O...
[ "0.7273378", "0.71321625", "0.6953017", "0.65891045", "0.63832957", "0.6348148", "0.6289229", "0.6177742", "0.61625254", "0.60297143", "0.60297143", "0.59900874", "0.59858704", "0.5927323", "0.5914867", "0.586893", "0.58647084", "0.58482695", "0.5834162", "0.58206624", "0.579...
0.73298573
0
Position window to mouse cursor
def position_window(window): pos = QtGui.QCursor.pos() window.move(pos.x(), pos.y())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _positionWindow(self):\n\t\tif sys.platform=='win32':\n\t\t\tself.setGeometry(1050, 30, 375, 220)\n\t\telse:\n\t\t\tself.setGeometry(1050, 0, 375, 220)\n\t\t# self.move( (-screen.width()/2)+200, -screen.height()/2 )", "def _positionWindow(self):\n\t\tscreen = QtGui.QDesktopWidget().screenGeometry()\n\t\tself...
[ "0.75968504", "0.757273", "0.7156599", "0.71541", "0.70881915", "0.7055314", "0.69924456", "0.6984391", "0.6893064", "0.67951316", "0.67546415", "0.6716224", "0.6676272", "0.6675499", "0.66593456", "0.660215", "0.6595766", "0.65905315", "0.6569758", "0.6569121", "0.65055114",...
0.82786864
0
sh('c') Close EH & Fast Shutter
def shclose(): sh('c')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cehs():\n\tcloseEHShutter()", "def shcloseall():\n\tsh('ca')", "def shopen():\n\tsh('o')", "def term():\n curses.endwin()\n unicornhathd.off()", "def w():\n system_command('w')", "def abortAndHiZ(self):\n return self.set_command(\"z\")", "def stop():\n\n crate = get_crate()\n ...
[ "0.73668784", "0.6942107", "0.6526975", "0.63943535", "0.59655714", "0.57374847", "0.57342607", "0.5720664", "0.5705237", "0.567663", "0.56705004", "0.5643914", "0.5634455", "0.56342745", "0.5624075", "0.5605736", "0.5560058", "0.55517954", "0.55496544", "0.55302966", "0.5518...
0.8400957
0
Short for closeEHShutter closeExperimentalHutchShutter 1. Closes the experimental hutch shutter. 2. Waits for it to close. 3. Checks the shutter status.
def cehs(): closeEHShutter()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def test_window_shuttler(\n hass: HomeAssistant, cube: MaxCube, windowshutter: MaxWindowShutter\n) -> None:\n entity_registry = er.async_get(hass)\n assert entity_registry.async_is_registered(ENTITY_ID)\n entity = entity_registry.async_get(ENTITY_ID)\n assert entity.unique_id == \"AABBCCDD03\"...
[ "0.6053095", "0.58187467", "0.55433863", "0.53070635", "0.5196472", "0.5188765", "0.51873684", "0.5121143", "0.5115263", "0.50999457", "0.507522", "0.5075031", "0.50664747", "0.5058458", "0.5046472", "0.5044765", "0.5033802", "0.50096506", "0.499969", "0.49993432", "0.4984786...
0.7035265
0
move diode 4 in
def d4in(): d4x.moveTo(d4x_in) d4y.moveTo(d4y_in)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def move_to_position2(self):", "def move_to_position1(self):", "def move(self):\n self.pos += self.direc\n self.nearest_node = self.pixel_to_node()", "def move_start_node(self, x, y):", "def move(self):\n pass", "def d4out():\n\td4x.moveTo(d4x_out)\n\td4y.moveTo(d4y_out)", "def mov...
[ "0.6583794", "0.6458055", "0.6420315", "0.6280515", "0.6253529", "0.62491584", "0.621527", "0.6140933", "0.6072347", "0.5996268", "0.5946558", "0.5938227", "0.5899737", "0.58858013", "0.58858013", "0.5882726", "0.5873361", "0.5869248", "0.58613205", "0.5857096", "0.58421713",...
0.66837436
0
move diode 4 out
def d4out(): d4x.moveTo(d4x_out) d4y.moveTo(d4y_out)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def d4in():\n\td4x.moveTo(d4x_in)\n\td4y.moveTo(d4y_in)", "def relmoveto(self, x = 0, y = 0):\n self.cur_x += x\n self.cur_y += y\n if x < 0:\n self.out.write(self.csi + \"%sD\" % -x)\n elif x > 0:\n self.out.write(self.csi + \"%sC\" % x)\n if y < 0:\n ...
[ "0.6271154", "0.5760165", "0.54888725", "0.5468118", "0.5463421", "0.5398631", "0.53697866", "0.53672224", "0.5363434", "0.53320515", "0.53091586", "0.52807957", "0.5232787", "0.5224809", "0.52242", "0.5206081", "0.51894414", "0.51409787", "0.510281", "0.50837106", "0.5067960...
0.68448377
0
close mar, move d2 and d3 in and reset and open EH & Fast shutter.
def align(): # open EH and fast shutter #marAuxiliary.closeMarShield() d2in() d3in() sh('o')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cehs():\n\tcloseEHShutter()", "def tearDowm(self):\n print(\"\\nIn tearDowm()...\")", "def shut_down():\n #return_to_center()\n stop_move()\n qpt.close()", "def _reset_anim(self):\n self._visualization.reset()", "def main():\n # background\n background = backgro...
[ "0.5485598", "0.54847914", "0.5471726", "0.52344465", "0.518403", "0.51617116", "0.51544815", "0.5129853", "0.51048666", "0.50901294", "0.50493586", "0.5045887", "0.501864", "0.4990433", "0.49360096", "0.491087", "0.49088418", "0.4906058", "0.4905119", "0.4885183", "0.4882403...
0.6535526
0
Do align(), then a cscan e.g. cscanChecks( testLinearDOF1, 0.1, 0.02 ,dummyDiode) cscanChecks( testLinearDOF1, 0.1, 0.02, w, 0.2 ,dummyDiode)
def cscanChecks(motor, start, step, param1, param2=-1, param3=-1): genericScanChecks(True, True, motor, start, -1, step, param1, param2, param3)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def genericScanChecks(alignFlag, cscanFlag, motor, start, stop, step, param1, param2, param3):\n\tif (alignFlag):\n\t\talign()\n\n\tinitialPosition = motor.getPosition()\n\n\targs = []\n\ttry:\n\t\tif (cscanFlag):\n\t\t\tif (param2 == -1 and param3 == -1):\n\t\t\t\targs = [motor, start, step, param1]\n\t\t\telse:\...
[ "0.6146796", "0.55974543", "0.52206314", "0.5213531", "0.5194686", "0.5165955", "0.51563734", "0.51547307", "0.5149034", "0.5034642", "0.50318193", "0.4968647", "0.49547148", "0.49492306", "0.49362814", "0.48785752", "0.48765796", "0.4875365", "0.48742354", "0.486245", "0.485...
0.66802275
0
Do align(), then a scan, returning motor to initial position if there's an interrupt
def genericScanChecks(alignFlag, cscanFlag, motor, start, stop, step, param1, param2, param3): if (alignFlag): align() initialPosition = motor.getPosition() args = [] try: if (cscanFlag): if (param2 == -1 and param3 == -1): args = [motor, start, step, param1] else: args = [motor, start, step, pa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _scan_alignment(self,handle, consumer):\n while 1:\n line = handle.readline()\n if not line:\n break\n if is_blank_line(line):\n continue\n else:\n consumer.query_alignment(line)\n read_and_call(handl...
[ "0.62006766", "0.5827975", "0.5769164", "0.57052195", "0.5675847", "0.56151927", "0.5577898", "0.5515346", "0.5508553", "0.54853374", "0.5466716", "0.5464011", "0.5442844", "0.540303", "0.53662705", "0.5337073", "0.5318814", "0.52972066", "0.5205495", "0.52052313", "0.5190232...
0.65959114
0
if dkappa and dktheta are at 134.76 and 34.197 respectively then move them to the home position of 0
def minusToHome(): if (not checkMotorsInPosition(-134.76, -34.197)): return moveMotor(dktheta, 0) moveMotor(dkappa, 0) simpleLog("Done")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def homeToMinus57():\n\tif (not checkMotorsInPosition(0, 0)):\n\t\treturn\n\n\tmoveMotor(dkappa, 134.65)\n\tmoveMotor(dktheta, 31.785)\n\tsimpleLog(\"Done\")", "def homeToMinus():\n\tif (not checkMotorsInPosition(0, 0)):\n\t\treturn\n\n\tmoveMotor(dkappa, -134.76)\n\tmoveMotor(dktheta, -34.197)\n\tsimpleLog(\"Do...
[ "0.6791526", "0.66906905", "0.63822174", "0.6340242", "0.6002488", "0.60010505", "0.594386", "0.5943573", "0.58975935", "0.5826378", "0.58197486", "0.58081627", "0.5746735", "0.57180834", "0.57091963", "0.5695404", "0.5691753", "0.568841", "0.56812173", "0.56804836", "0.56624...
0.6962872
0
if dkappa and dktheta are at the home positions of 0 then move them to 134.65 and 31.785 respectively
def homeToMinus57(): if (not checkMotorsInPosition(0, 0)): return moveMotor(dkappa, 134.65) moveMotor(dktheta, 31.785) simpleLog("Done")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def minusToHome():\n\tif (not checkMotorsInPosition(-134.76, -34.197)):\n\t\treturn\n\n\tmoveMotor(dktheta, 0)\n\tmoveMotor(dkappa, 0)\n\tsimpleLog(\"Done\")", "def homeToMinus():\n\tif (not checkMotorsInPosition(0, 0)):\n\t\treturn\n\n\tmoveMotor(dkappa, -134.76)\n\tmoveMotor(dktheta, -34.197)\n\tsimpleLog(\"Do...
[ "0.66853374", "0.64792114", "0.6142617", "0.611055", "0.5923883", "0.58117926", "0.5781675", "0.5766006", "0.57603294", "0.569241", "0.5625517", "0.5602293", "0.5561793", "0.5538675", "0.55356115", "0.5508359", "0.5503162", "0.55022436", "0.54622334", "0.5454025", "0.5451588"...
0.6753821
0
r"""Rate (/s) counter for auditportallocfail.
def auditportallocfailrate(self) : try : return self._auditportallocfailrate except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auditnsballocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditnsballocfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditmemallocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditmemallocfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditlog32errsyslogallocnsbfailrate(self)...
[ "0.8075037", "0.79047513", "0.73235726", "0.7154797", "0.7101495", "0.6988462", "0.6877671", "0.6513703", "0.6413118", "0.6281075", "0.62673044", "0.62623996", "0.6250019", "0.6120083", "0.61187863", "0.59565264", "0.5942954", "0.5835563", "0.58007777", "0.5736784", "0.570547...
0.85847336
0
r"""Rate (/s) counter for auditnsballocfail.
def auditnsballocfailrate(self) : try : return self._auditnsballocfailrate except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auditmemallocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditmemallocfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditportallocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditportallocfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditlog32errsyslogallocnsbfailrate(sel...
[ "0.7996536", "0.7916041", "0.7777702", "0.7737904", "0.7149099", "0.67544043", "0.6536813", "0.64961576", "0.6384526", "0.6319666", "0.6275078", "0.62597287", "0.624988", "0.60116935", "0.5978309", "0.59175634", "0.58831286", "0.58655065", "0.5838528", "0.5770605", "0.5765062...
0.8806544
0
r"""Rate (/s) counter for auditcontextnotfound.
def auditcontextnotfoundrate(self) : try : return self._auditcontextnotfoundrate except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tick_bad_request_counter(self, request):\r\n self.cache_incr(self.get_cache_key(request))", "def auditnsballocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditnsballocfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditportallocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditpor...
[ "0.61050826", "0.6061778", "0.58120435", "0.57535326", "0.5684874", "0.56782866", "0.5638363", "0.56113803", "0.5582129", "0.55236346", "0.5433009", "0.5433009", "0.53931767", "0.5375995", "0.53672886", "0.5335734", "0.532594", "0.53128415", "0.53111506", "0.5302208", "0.5290...
0.84164774
0
r"""Rate (/s) counter for auditlog32errsyslogallocnsbfail.
def auditlog32errsyslogallocnsbfailrate(self) : try : return self._auditlog32errsyslogallocnsbfailrate except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auditnsballocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditnsballocfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditmemallocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditmemallocfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditportallocfailrate(self) :\n\t\ttry :...
[ "0.80729777", "0.75165784", "0.73282856", "0.7112501", "0.67532635", "0.6533146", "0.65175813", "0.6487147", "0.63722444", "0.62202984", "0.61229265", "0.59308493", "0.58322364", "0.57629365", "0.57513314", "0.57192886", "0.56785977", "0.56320524", "0.56062144", "0.5591542", ...
0.84992826
0
r"""Rate (/s) counter for auditsyslogmsgsent.
def auditsyslogmsgsentrate(self) : try : return self._auditsyslogmsgsentrate except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auditsyslogmsggenrate(self) :\n\t\ttry :\n\t\t\treturn self._auditsyslogmsggenrate\n\t\texcept Exception as e:\n\t\t\traise e", "def pressed():\n global rate_cnt\n rate_cnt += 1\n # print(rate_cnt) # CAN REMOVE THIS - USED TO DEBUG", "def _tally(self, user_gpio, level, tick):\n self.count +=...
[ "0.7494881", "0.5994364", "0.59287447", "0.5922406", "0.5900549", "0.58639413", "0.5857709", "0.58549404", "0.5784412", "0.5766961", "0.5738028", "0.57340676", "0.5700955", "0.5677708", "0.5648466", "0.5602302", "0.5597829", "0.55784994", "0.5534056", "0.54885095", "0.5485008...
0.7269543
1
r"""Rate (/s) counter for clientconnfail.
def clientconnfailrate(self) : try : return self._clientconnfailrate except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def systcpconnfailrate(self) :\n\t\ttry :\n\t\t\treturn self._systcpconnfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def clientconnfail(self) :\n\t\ttry :\n\t\t\treturn self._clientconnfail\n\t\texcept Exception as e:\n\t\t\traise e", "def counter(self) -> int:\n return self._fail_counter", ...
[ "0.7089334", "0.6273955", "0.6177701", "0.60949063", "0.6022888", "0.60025513", "0.59857553", "0.59772414", "0.59736204", "0.5957234", "0.5945412", "0.59223485", "0.5920233", "0.58177185", "0.57899076", "0.57570326", "0.5731963", "0.5726615", "0.5717304", "0.57051855", "0.567...
0.8253758
0
r"""Rate (/s) counter for auditmemallocfail.
def auditmemallocfailrate(self) : try : return self._auditmemallocfailrate except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auditnsballocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditnsballocfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditportallocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditportallocfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditlog32errsyslogallocnsbfailrate(sel...
[ "0.8068763", "0.783151", "0.74155265", "0.7341465", "0.6976561", "0.6803633", "0.6563137", "0.65608644", "0.61448264", "0.60709137", "0.60354775", "0.60214967", "0.58634245", "0.5838845", "0.5830125", "0.5820312", "0.5776488", "0.57128614", "0.5683377", "0.56408036", "0.56365...
0.87094843
0
r"""Rate (/s) counter for logsdropped.
def logsdroppedrate(self) : try : return self._logsdroppedrate except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def logsdroppedtxminnsbsrate(self) :\n\t\ttry :\n\t\t\treturn self._logsdroppedtxminnsbsrate\n\t\texcept Exception as e:\n\t\t\traise e", "def get_sample_rate(self):\n return 1", "def stamp_rate(self):\n raise NotImplementedError()", "def auditsyslogmsggenrate(self) :\n\t\ttry :\n\t\t\treturn s...
[ "0.6316892", "0.5914881", "0.58913445", "0.57878757", "0.5705163", "0.5699889", "0.56989527", "0.5688319", "0.5658942", "0.5620974", "0.5615874", "0.56153494", "0.5535975", "0.5534177", "0.5524861", "0.5523994", "0.55104476", "0.54866046", "0.54790324", "0.5456982", "0.541900...
0.7713121
0
r"""Number of times the NetScaler failed to allocate a port when sending a syslog message to the syslog server(s).
def auditportallocfail(self) : try : return self._auditportallocfail except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auditlog32errsyslogallocnsbfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditlog32errsyslogallocnsbfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditportallocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditportallocfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def gridftperr(...
[ "0.6184888", "0.59176797", "0.5632763", "0.5620827", "0.55553705", "0.54400504", "0.5421594", "0.5364284", "0.53605914", "0.5358822", "0.5357882", "0.53570634", "0.53211534", "0.5308538", "0.5300056", "0.5265288", "0.52404094", "0.521591", "0.5215803", "0.5211703", "0.5191784...
0.62297505
0
r"""Nsb Chain allocation failed.
def nsbchainallocfail(self) : try : return self._nsbchainallocfail except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nsbchainallocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._nsbchainallocfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditportallocfail(self) :\n\t\ttry :\n\t\t\treturn self._auditportallocfail\n\t\texcept Exception as e:\n\t\t\traise e", "def _check(self,err):\r\n if err < 0:\r\n ...
[ "0.7138911", "0.5845635", "0.56735384", "0.56539214", "0.5508214", "0.5470361", "0.53369534", "0.53106433", "0.5218499", "0.5205782", "0.5134341", "0.51230186", "0.5112062", "0.5099325", "0.5092145", "0.50832343", "0.5078792", "0.50608534", "0.50375694", "0.50064206", "0.5002...
0.8340579
0
r"""Rate (/s) counter for systcpconnfail.
def systcpconnfailrate(self) : try : return self._systcpconnfailrate except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clientconnfailrate(self) :\n\t\ttry :\n\t\t\treturn self._clientconnfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditnsballocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditnsballocfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditportallocfailrate(self) :\n\t\ttry :\n\t\t...
[ "0.754353", "0.6975679", "0.6925964", "0.6778605", "0.65881455", "0.6531757", "0.64951843", "0.64767915", "0.6334867", "0.633461", "0.6302237", "0.6289329", "0.62115526", "0.6200005", "0.6199192", "0.61551446", "0.6154282", "0.60758346", "0.6046474", "0.59252715", "0.5736574"...
0.82421345
0
r"""Failures in establishment of a connection between the NetScaler and the syslog server.
def systcpconnfail(self) : try : return self._systcpconnfail except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _connect_failed(self):\n\t\tself.root.stdout.write(\"Error: Connection Failed!\\n\")\n\t\tself.client = False", "def test_connection_failure(aggregator, check, bad_instance):\n instance_tags = [\"supervisord_server:travis\"]\n with pytest.raises(Exception):\n check.check(bad_instance)\n a...
[ "0.6399809", "0.61779016", "0.5970819", "0.59587526", "0.5955786", "0.59543186", "0.59459734", "0.59243447", "0.58480173", "0.5818615", "0.5815102", "0.5808048", "0.5801829", "0.57391316", "0.5738104", "0.5732482", "0.56937796", "0.56898856", "0.5664933", "0.56604487", "0.562...
0.63524663
1
r"""Rate (/s) counter for logunsentlbsys.
def logunsentlbsysrate(self) : try : return self._logunsentlbsysrate except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auditsyslogmsggenrate(self) :\n\t\ttry :\n\t\t\treturn self._auditsyslogmsggenrate\n\t\texcept Exception as e:\n\t\t\traise e", "def _tally(self, user_gpio, level, tick):\n self.count += 1", "def rate(self) -> float:\n return self.success_cnt / self.total_cnt if self.total_cnt > 0 else 1.0", ...
[ "0.6601397", "0.62387353", "0.5988067", "0.5923995", "0.5876049", "0.58532727", "0.58123964", "0.5778166", "0.5755984", "0.5723208", "0.5717802", "0.5631809", "0.56116414", "0.55921257", "0.5591179", "0.557769", "0.5569437", "0.5554129", "0.55300283", "0.551952", "0.55047035"...
0.7407916
0
r"""Rate (/s) counter for auditsyslogmsggen.
def auditsyslogmsggenrate(self) : try : return self._auditsyslogmsggenrate except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auditsyslogmsgsentrate(self) :\n\t\ttry :\n\t\t\treturn self._auditsyslogmsgsentrate\n\t\texcept Exception as e:\n\t\t\traise e", "def _tally(self, user_gpio, level, tick):\n self.count += 1", "def pressed():\n global rate_cnt\n rate_cnt += 1\n # print(rate_cnt) # CAN REMOVE THIS - USED TO D...
[ "0.6373932", "0.61723685", "0.6063536", "0.60169584", "0.595914", "0.5924709", "0.5841221", "0.58117735", "0.5802213", "0.57628006", "0.57432413", "0.5742064", "0.5724136", "0.57064927", "0.5661392", "0.56556356", "0.5647174", "0.56448716", "0.5644096", "0.5624166", "0.561645...
0.7614956
0
r"""Rate (/s) counter for logsdroppedtxminnsbs.
def logsdroppedtxminnsbsrate(self) : try : return self._logsdroppedtxminnsbsrate except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def logsdroppedrate(self) :\n\t\ttry :\n\t\t\treturn self._logsdroppedrate\n\t\texcept Exception as e:\n\t\t\traise e", "def get_sample_rate(self):\n return 1", "def auditsyslogmsggenrate(self) :\n\t\ttry :\n\t\t\treturn self._auditsyslogmsggenrate\n\t\texcept Exception as e:\n\t\t\traise e", "def sta...
[ "0.7124976", "0.6180632", "0.6169861", "0.59809357", "0.59293014", "0.5887344", "0.5836971", "0.57718533", "0.56874335", "0.5627495", "0.56254166", "0.5620439", "0.5601032", "0.559304", "0.55547494", "0.55547494", "0.5544338", "0.55389553", "0.5525584", "0.5511883", "0.549720...
0.76420957
0
r"""Rate (/s) counter for nsbchainallocfail.
def nsbchainallocfailrate(self) : try : return self._nsbchainallocfailrate except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def auditnsballocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditnsballocfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditmemallocfailrate(self) :\n\t\ttry :\n\t\t\treturn self._auditmemallocfailrate\n\t\texcept Exception as e:\n\t\t\traise e", "def auditportallocfailrate(self) :\n\t\ttry :...
[ "0.78719795", "0.73311913", "0.7229754", "0.72252744", "0.71438396", "0.71098334", "0.7033346", "0.6509076", "0.63396686", "0.6245924", "0.60962987", "0.60858864", "0.6063761", "0.6022524", "0.60209405", "0.59556437", "0.589965", "0.58593607", "0.58308464", "0.57815915", "0.5...
0.8530498
0
r""" Use this API to fetch the statistics of all audit_stats resources that are configured on netscaler. set statbindings=True in options to retrieve bindings.
def get(cls, service, name="", option_="") : try : obj = audit_stats() if not name : response = obj.stat_resources(service, option_) return response except Exception as e: raise e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_all_stats(self) -> Dict[str, Any]:\n return self.http.get(self.config.paths.stat)", "def GetStats(self):\r\n\t\tArg1 = self.href\r\n\t\treturn self._execute('GetStats', payload=locals(), response_object=None)", "def get_statistics(self):\n url = \"https://api.imgur.com/3/account/{0}/stats...
[ "0.6390616", "0.6169838", "0.59652346", "0.5913674", "0.5781315", "0.5778938", "0.57677054", "0.57400894", "0.56506306", "0.5640072", "0.5600202", "0.5575357", "0.5574187", "0.5519036", "0.5482368", "0.54483205", "0.5443767", "0.5408055", "0.54054", "0.53537035", "0.5350846",...
0.6334347
1
Returns a series based on `results` from timeline
def create_series(self): series = [] for timeline_object in self.timeline['results']: count = timeline_object["count"] series.insert(0, count) self.query_total = self.query_total + count label = self.query[0:30] if len(self.query) > 30: lab...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_result_series(result):\n if isinstance(result, np.ndarray):\n return result\n\n if result is None or not len(result):\n return None\n\n dates, values = result\n return pd.DataFrame({0:dates.astype(int)/1000,1:values})", "def series(self):\n path = self._get_path('query'...
[ "0.6465132", "0.6191924", "0.5985995", "0.5971343", "0.5971", "0.5919172", "0.5859853", "0.5856085", "0.58351666", "0.581759", "0.580518", "0.5773052", "0.57582974", "0.57270366", "0.5726739", "0.5697676", "0.56586367", "0.5655721", "0.56513155", "0.56083643", "0.55918044", ...
0.702959
0
Returns xAxis for timeseries
def create_x_axis(self, xAxis): if not xAxis: xAxis = [] for t in self.timeline['results']: time_period = t["timePeriod"] day = str(time_period[0:4] + "-" + time_period[4:6] + "-" + time_period[6:8] + " "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xaxis ( self ) :\n return self.__xaxis", "def xaxis ( self ) :\n return self.__xaxis", "def xaxis ( self ) :\n return self.__xaxis", "def xaxis(self):\n return self._xaxis", "def timeseries(self, x, y, srs=\"EPSG:4326\") -> Dict:\n return self.connection.point_times...
[ "0.6789649", "0.6789649", "0.67526054", "0.6608017", "0.6294307", "0.62614495", "0.62508464", "0.61250657", "0.601405", "0.59759533", "0.59582734", "0.59037954", "0.5901365", "0.58425146", "0.5783832", "0.5691791", "0.56335205", "0.55635273", "0.55475825", "0.5526007", "0.544...
0.75200075
0
Test case for companies_company_id_connections_connection_id_data_commerce_transactions_get
def test_companies_company_id_connections_connection_id_data_commerce_transactions_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_companies_company_id_connections_connection_id_data_commerce_transactions_transaction_id_get(self):\n pass", "def test_companies_company_id_connections_connection_id_data_bank_accounts_account_id_bank_transactions_get(self):\n pass", "def test_companies_company_id_connections_connection_...
[ "0.88759744", "0.87740797", "0.8395689", "0.7969675", "0.7661881", "0.7465753", "0.71288896", "0.66230047", "0.63927174", "0.6226342", "0.6123085", "0.5936743", "0.5917438", "0.58366996", "0.57407004", "0.57258075", "0.5653295", "0.5651618", "0.5628853", "0.55778646", "0.5558...
0.9486118
0
Test case for companies_company_id_connections_connection_id_data_commerce_transactions_transaction_id_get
def test_companies_company_id_connections_connection_id_data_commerce_transactions_transaction_id_get(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_companies_company_id_connections_connection_id_data_commerce_transactions_get(self):\n pass", "def test_companies_company_id_connections_connection_id_data_bank_accounts_account_id_bank_transactions_get(self):\n pass", "def test_companies_company_id_connections_connection_id_data_bank_ac...
[ "0.8764232", "0.815842", "0.7903535", "0.7854782", "0.7478691", "0.7470014", "0.67616326", "0.6452738", "0.64001125", "0.6327346", "0.62113565", "0.6146317", "0.6136389", "0.612447", "0.59929025", "0.597675", "0.59088373", "0.59030306", "0.5851902", "0.5806389", "0.57971066",...
0.95370865
0
Notify subscribers that packet was routed.
def packet_routed(self, packet, node, booked_route, best_route, transmission_start_time): for subscriber in self.subscribers: subscriber.packet_routed(packet, node, booked_route, best_route, transmission_start_time)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def notify(self, packet):\n\t\tself.update_listeners(packet)", "def handle_rx (self, packet, port):\n \n #self.log(\"RX %s on %s (%s)\", packet, port, api.current_time())\n if isinstance(packet, basics.RoutePacket):\n\n dest = packet.destination\n newLatency = self.neighbours[port] + packet.la...
[ "0.6241506", "0.62194586", "0.59977967", "0.5766884", "0.57409143", "0.56938356", "0.56672317", "0.5638158", "0.55995244", "0.55957735", "0.5498381", "0.5470436", "0.5449105", "0.5449105", "0.5449105", "0.5441699", "0.54024255", "0.538473", "0.535201", "0.53487927", "0.531881...
0.67149043
0
Notify subscribers that Packet reached it's destination node.
def packet_destination_reached(self, packet, node): for subscriber in self.subscribers: subscriber.packet_destination_reached(packet, node)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def notify(self, packet):\n\t\tself.update_listeners(packet)", "def packet_transmitted(self, packet, node):\n for subscriber in self.subscribers:\n subscriber.packet_transmitted(packet, node)", "def handle_link_up (self, port, latency):\n self.neighbours[port] = latency\n for dest in se...
[ "0.65753996", "0.6534593", "0.61414987", "0.60351276", "0.600556", "0.59978586", "0.58527756", "0.5782971", "0.5771437", "0.5654677", "0.5617729", "0.5468393", "0.5451094", "0.54178435", "0.53577065", "0.53488827", "0.534355", "0.5336957", "0.5303999", "0.5265787", "0.5163849...
0.7818634
0
Notify subscribers that Packet was transmitted to next hop.
def packet_transmitted(self, packet, node): for subscriber in self.subscribers: subscriber.packet_transmitted(packet, node)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def notify(self, packet):\n\t\tself.update_listeners(packet)", "def callback(self, packet, sender=None):\n pass", "def before_resend(self, packet):\n pass", "def packet_routed(self, packet, node, booked_route, best_route,\n transmission_start_time):\n for subscriber ...
[ "0.68250823", "0.6083623", "0.59753215", "0.5965418", "0.58581716", "0.5835427", "0.5772324", "0.5754642", "0.5740659", "0.5720189", "0.55486083", "0.5522936", "0.5518575", "0.5497018", "0.54591024", "0.54520714", "0.5404759", "0.53980625", "0.53823835", "0.53796196", "0.5355...
0.66178405
1
Notify subscribers that Packet was injected.
def packet_injected(self, packet, node): for subscriber in self.subscribers: subscriber.packet_injected(packet, node)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def notify(self, packet):\n\t\tself.update_listeners(packet)", "def callback(self, packet, sender=None):\n pass", "def packet_transmitted(self, packet, node):\n for subscriber in self.subscribers:\n subscriber.packet_transmitted(packet, node)", "def update_listeners(self, packet):\n\...
[ "0.7369817", "0.6079344", "0.6077938", "0.6054952", "0.5920954", "0.58642733", "0.5799921", "0.5764139", "0.5764139", "0.57329875", "0.57036823", "0.56953007", "0.5645225", "0.55770266", "0.54916406", "0.54335785", "0.5427746", "0.5427746", "0.54179376", "0.53552514", "0.5355...
0.76266456
0
Notify subscribers that the contact plan object of a node changed.
def node_contact_plan_changed(self, node, contact_plan): for subscriber in self.subscribers: subscriber.node_contact_plan_changed(node, contact_plan)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def contact_reactivated(self, node, contact):\n for subscriber in self.subscribers:\n subscriber.contact_reactivated(node, contact)", "def contact_ended(self, node, contact):\n for subscriber in self.subscribers:\n subscriber.contact_ended(node, contact)", "def node_local_co...
[ "0.6718506", "0.587194", "0.57505924", "0.5744354", "0.5689725", "0.56046444", "0.55814886", "0.5447785", "0.5437114", "0.54337686", "0.53639054", "0.52950794", "0.52924806", "0.5267624", "0.5257211", "0.52551544", "0.5242685", "0.52037907", "0.51713127", "0.51341426", "0.512...
0.8523258
0
Notify subscribers that no route could be found. Packet will be dropped.
def node_no_route_found_for_packet(self, node, packet): for subscriber in self.subscribers: subscriber.node_no_route_found_for_packet(node, packet)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def route_rejected(self, prefix, next_hop, as_path):", "def handle_rx(self, packet, port):\n route_info = None\n\n if isinstance(packet, basics.RoutePacket):\n latency = min(self.ports_to_latencies[port] + packet.latency, INFINITY)\n time_to_live = api.current_time() + 15 \n ...
[ "0.5644505", "0.5622455", "0.5611421", "0.5464891", "0.53144085", "0.52718145", "0.52543235", "0.52259994", "0.5225226", "0.52157944", "0.5196687", "0.51941377", "0.5191951", "0.51873016", "0.5148739", "0.5142436", "0.51091903", "0.50973666", "0.50963783", "0.5088708", "0.505...
0.72090024
0
Notify subscribers that contact ended.
def contact_ended(self, node, contact): for subscriber in self.subscribers: subscriber.contact_ended(node, contact)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def simulation_ended(self):\n for subscriber in self.subscribers:\n subscriber.simulation_ended()", "def tellIfEnded(self):\n self.congratulate()", "def notify_finish_event(self):\n self.notify(self._finish_event_type())", "def notify_end(self, status, objective):\n pas...
[ "0.6479856", "0.63154787", "0.62397194", "0.6169898", "0.61038345", "0.5936206", "0.58844686", "0.5790107", "0.57417214", "0.57400024", "0.57019657", "0.5683313", "0.56735384", "0.56700456", "0.5644234", "0.5622203", "0.5603734", "0.56021786", "0.55602705", "0.5550579", "0.55...
0.77824354
0
Notify subscribers that contact was suspended. The queue of scheduled packets for the contact is depleted (i.e. all scheduled packets were transmitted) and the contact will suspend until the contact ends or a new packet is scheduled.
def contact_suspended(self, node, contact): for subscriber in self.subscribers: subscriber.contact_suspended(node, contact)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def suspend(self):\n\n LOG.info(_(\"Suspending DM device %r ...\"), self.dm_name)\n cmd = [self.dmsetup_cmd, 'suspend', self.dm_name]\n start_time = time.time()\n (ret_code, std_out, std_err) = self.call(cmd, quiet=True, sudo=True)\n if ret_code:\n raise DmSuspendError...
[ "0.5497786", "0.5320827", "0.52839017", "0.52606255", "0.523245", "0.5196256", "0.51661557", "0.51642215", "0.51369655", "0.50556755", "0.49808592", "0.49791482", "0.4954255", "0.48824334", "0.48310417", "0.47894195", "0.47381556", "0.47214797", "0.47188124", "0.47156793", "0...
0.7166446
0
Notify subscribers that contact was continued. While the contact being suspended, a new packet was scheduled for the contact and the contact was therefore reactivated.
def contact_reactivated(self, node, contact): for subscriber in self.subscribers: subscriber.contact_reactivated(node, contact)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def contact_suspended(self, node, contact):\n for subscriber in self.subscribers:\n subscriber.contact_suspended(node, contact)", "def contact_ended(self, node, contact):\n for subscriber in self.subscribers:\n subscriber.contact_ended(node, contact)", "def contact_started(s...
[ "0.7106155", "0.64064926", "0.5538767", "0.51897347", "0.5167382", "0.5149809", "0.51394165", "0.51212883", "0.50894564", "0.5088863", "0.49440217", "0.49360913", "0.49195248", "0.4919304", "0.49064034", "0.4892485", "0.4871565", "0.48701683", "0.48566332", "0.4847335", "0.48...
0.6536691
1
Notify subscribers that simulation started.
def simulation_started(self): for subscriber in self.subscribers: subscriber.simulation_started()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def notify_started(self):\n raise NotImplementedError", "def notify(self) -> None:\n for s in self.subscribers:\n s()", "def simulation_ended(self):\n for subscriber in self.subscribers:\n subscriber.simulation_ended()", "def start(self):\n self.observer.star...
[ "0.6956172", "0.68621546", "0.6630205", "0.64534247", "0.62784004", "0.62235814", "0.60904706", "0.6076866", "0.5932235", "0.5911029", "0.5900924", "0.58880734", "0.5853872", "0.585225", "0.585225", "0.58448714", "0.5843907", "0.5808867", "0.57869345", "0.5782219", "0.5759164...
0.8487525
0
Notify subscribers that simulation terminated.
def simulation_ended(self): for subscriber in self.subscribers: subscriber.simulation_ended()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def notify(self) -> None:\n for s in self.subscribers:\n s()", "def notify_end(self, status, objective):\n pass # pragma: no cover", "def notify_stop(self):\n self._notify_stop()", "def stop_notify(self):\n raise NotImplementedError", "def registration_ended(self):\n...
[ "0.6106583", "0.6088992", "0.60477346", "0.60229033", "0.592416", "0.59137446", "0.59054786", "0.59010744", "0.5849561", "0.5849561", "0.58428603", "0.58412564", "0.5840492", "0.5813568", "0.58121353", "0.5772825", "0.57492185", "0.5740457", "0.5727322", "0.57194245", "0.5708...
0.77252316
0
Initialize the DBConnection. Creates a connection pool using aiomysql and initializes the database if necessary.
async def initialize(self, *, only_init_tables: bool=False): self.pool = await aiomysql.create_pool( host=self.host, user=self.user, password=self.passwd, loop=self.loop) db_exists = await self._check_db_exists() if not db_exists: await self._create_db() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def initDbConnection():\n try:\n db_user = os.environ[\"BDB_DB_USER\"]\n db_pass = os.environ[\"BDB_DB_PASS\"]\n db_name = os.environ[\"BDB_DB_NAME\"]\n db_host = os.environ[\"BDB_DB_HOST\"]\n db_port = os.environ[\"BDB_DB_PORT\"]\n except Exception as e:\n logger.cr...
[ "0.7574838", "0.7303747", "0.7255738", "0.72152877", "0.7188156", "0.7109827", "0.7029962", "0.70258003", "0.6982963", "0.6967214", "0.69423187", "0.6931232", "0.68752575", "0.6871446", "0.6863597", "0.68499124", "0.68470895", "0.6836942", "0.6816406", "0.6812347", "0.6797703...
0.815378
0
Check if the database exists.
async def _check_db_exists(self) -> bool: q = """SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = %s""" res = await self.fetch_single(q, (self.dbname,)) if not res: return False return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def db_exists(self):\r\n conf = self.func.config_info()\r\n return self.func.file_exists(conf[\"path_to_database\"])", "def database_exists(self):\n return self._get_storage().database_exists()", "def check_database_exists(self, **kwargs):\n database = kwargs.get('database', self.DA...
[ "0.87382203", "0.85844076", "0.8380993", "0.83205503", "0.83126396", "0.8295066", "0.8270473", "0.8220309", "0.8093324", "0.8070339", "0.8035073", "0.79397523", "0.79392874", "0.7705544", "0.7630636", "0.75776213", "0.7419363", "0.73730904", "0.7278642", "0.72714466", "0.7115...
0.86295485
1
Check if the database has been initialized.
async def _check_db_initialized(self) -> bool: q = """SELECT count(*) FROM information_schema.TABLES WHERE (TABLE_SCHEMA = %s) AND (TABLE_NAME = %s)""" res = await self.fetch_single(q, (self.dbname, 'version')) if res == 0: return False return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def validate_db():\n if not os.path.exists(app.config['DATABASE']):\n print(\"Init database!\")\n init()", "def is_init(self):\n cur = self.connection.cursor()\n masterdata = list(cur.execute(\n 'SELECT * FROM sqlite_master WHERE name=\"metadata\"'\n ))\n i...
[ "0.81699234", "0.7590803", "0.72737527", "0.723975", "0.722947", "0.72039676", "0.71670395", "0.70850277", "0.7081184", "0.7078637", "0.70258087", "0.6988316", "0.6946724", "0.6941559", "0.6926183", "0.6888612", "0.68860316", "0.6885884", "0.68145055", "0.6777418", "0.6735093...
0.8705486
0
Upgrade to a newer database version if required. Loops through the commands in sql_data.SQL_UPGRADES and runs them.
async def _upgrade_db(self) -> None: cur_version = await self._get_db_version() for n in range(cur_version + 1, sql_data.CUR_VERSION + 1): log.msg('Upgrading database to version %d' % n) if n in sql_data.SQL_UPGRADES: for command in sql_data.SQL_UPGRADES[n]: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def db_upgrade():\n generate_migration_file()\n dbu_query = anosql.from_path(MIGRATION_FILE, 'psycopg2')\n\n for time_step in [_.strip('.sql') for _ in migration_files()]:\n decide = MySQLScheme.fetch_one(REVISION_EXISTS,\n **{\"args\": {'revision': time_step}}...
[ "0.75229275", "0.7479897", "0.7071788", "0.702868", "0.6905668", "0.6843411", "0.6830616", "0.6729255", "0.67114204", "0.66870415", "0.65705454", "0.6563804", "0.65611815", "0.6537268", "0.6329094", "0.62312853", "0.62200016", "0.61216587", "0.6064846", "0.60435486", "0.60261...
0.8466509
0
Get the class used by this port. Returns Type[``rill.engine.port.BasePort``]
def get_port_type(self): raise NotImplementedError
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_class(self):\n return devices.get_class(self.type)", "def get_class(self, name):\n return self.host.get_class(name)", "def get_class(self):\n\t\treturn self.CLASS", "def _next_base_class(self) -> type:\n\n self._next_worker = self._next_from_pool\n return self.base_class",...
[ "0.7191821", "0.6706152", "0.6478912", "0.643127", "0.63230187", "0.6287657", "0.6280232", "0.62013924", "0.61664385", "0.61664385", "0.61664385", "0.61363554", "0.605837", "0.605837", "0.605837", "0.605837", "0.605837", "0.6024051", "0.6010654", "0.59945494", "0.5967625", ...
0.6810254
1
Return the date of the oldest allowed article
def get_oldest_article_date(): # date = datetime.datetime.strptime(date, "%m/%d/%Y") today_date = datetime.date.today() last_week = today_date-timedelta(days=2) search_date = last_week.isoformat() return search_date
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _earliest_allowed_date(cls):\r\n DAYS_GOOD_FOR = settings.VERIFY_STUDENT[\"DAYS_GOOD_FOR\"]\r\n allowed_date = (\r\n datetime.now(pytz.UTC) - timedelta(days=DAYS_GOOD_FOR)\r\n )\r\n return allowed_date", "def oldest(self):\n # Your implementation here", "def Ea...
[ "0.708524", "0.6534356", "0.6451726", "0.61729324", "0.6030196", "0.59486586", "0.5908863", "0.58564085", "0.5827465", "0.5738781", "0.56833375", "0.5679787", "0.55771357", "0.555833", "0.55394906", "0.55308074", "0.5525716", "0.5483771", "0.5477488", "0.54661536", "0.5466153...
0.6624895
1
Retrun a url to search in Google News that includes the desired news search parameters.
def create_search_url(): search_url = 'http://newsapi.org/v2/everything?' # A date and optional time for the oldest article allowed. This should be in ISO 8601 format. oldest_article = get_oldest_article_date() payload = { "q":"solar+energy+utility", "from":oldest_article, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def google_scraper(key_words, date_upper, date_lower, site, check = None): \n try:\n key_words = [word for word in key_words if '&' not in word]\n search_terms = ' '.join(key_words)\n search_terms = search_terms.replace(' ', '%20')\n\n #month of upper date\n mu = date_upper[:2]...
[ "0.6775592", "0.66557556", "0.65486044", "0.6524161", "0.64110744", "0.631908", "0.6305185", "0.62631506", "0.6254901", "0.6251872", "0.61682576", "0.6150028", "0.6137365", "0.6052258", "0.6045331", "0.60424167", "0.5901516", "0.5876301", "0.5870085", "0.58471936", "0.5821237...
0.7466877
0
The instance we're associated with.
def instance(self): return self.__instance
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def instance(self):\n return self._instance", "def _get_instance(self):", "def _get_instance(self):", "def get_instance(self, instance):\n return self._get(_instance.Instance, instance)", "def target_instance(self):\n return self._target_instance", "def instance(cls):\n if not...
[ "0.88691366", "0.785514", "0.785514", "0.78508335", "0.77624816", "0.770128", "0.7645111", "0.7645111", "0.7642357", "0.76150155", "0.76020646", "0.7512844", "0.74194866", "0.738277", "0.73397136", "0.7291502", "0.7277345", "0.72052103", "0.71594113", "0.7144629", "0.7122096"...
0.88074553
1