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
assert that calling func(args, kwargs) triggers a DeprecationWarning.
def deprecated_call(func, *args, **kwargs): warningmodule = py.std.warnings l = [] oldwarn_explicit = getattr(warningmodule, 'warn_explicit') def warn_explicit(*args, **kwargs): l.append(args) oldwarn_explicit(*args, **kwargs) oldwarn = getattr(warningmodule, 'warn') def warn(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_deprecate_args(self):\n @deprecate(arguments={\"bar\": \"use foo instead\"})\n def foo(a, foo=None, bar=None):\n return 2*a\n\n with warnings.catch_warnings(record=True) as w:\n self.assertEqual(foo(1, bar=True), 2,\n \"Decorated funct...
[ "0.76134264", "0.7457519", "0.69317734", "0.68314976", "0.6774156", "0.67599773", "0.6758293", "0.6725724", "0.67210484", "0.6709473", "0.66816026", "0.6671405", "0.6668715", "0.66650754", "0.65562075", "0.6553829", "0.6536344", "0.6527607", "0.6516987", "0.6516459", "0.64884...
0.7718524
0
Guess the bean name from a WSDL type. Assume the bean name is equal to the type having the first letter capitalized.
def guessbeanname(self): t = self.name return t[0].upper() + t[1:]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def service_type_name(self) -> Optional[pulumi.Input[str]]:\n return pulumi.get(self, \"service_type_name\")", "def get_type_name(type):\n name = type.name\n if type.is_simple:\n return _get_simple_type_mapping(name)\n elif type.is_enum:\n return _get_simple_type_mapping('str')\n ...
[ "0.6055587", "0.59900916", "0.5906633", "0.5842989", "0.5832207", "0.57966083", "0.5786233", "0.5717361", "0.56284714", "0.56159526", "0.54767513", "0.5473429", "0.5454887", "0.5423297", "0.5414507", "0.5383779", "0.5352961", "0.5352691", "0.5325332", "0.5307059", "0.52658063...
0.6790827
0
Return the many to one relations (relType == ONE).
def getrelations(self): return self.getfieldnames('ONE')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _filter_related_one2one(self, rel):\n field = rel.field\n if isinstance(field, models.OneToOneField):\n if self._join_allowed(rel.parent_model, rel.model, field):\n return rel", "def relationship(cls):\n return relationship.many_to_one(cls, 'relationship')", "...
[ "0.67867416", "0.6581883", "0.60937566", "0.6083249", "0.6047415", "0.603017", "0.58113414", "0.5705639", "0.55900675", "0.55657053", "0.5440979", "0.54282725", "0.5387697", "0.53740245", "0.5348175", "0.5317037", "0.53037167", "0.5272414", "0.5238443", "0.51848626", "0.51807...
0.7039067
0
Return the one to many relations (relType == MANY).
def getmanyrelations(self): return self.getfieldnames('MANY')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getrelations(self):\n return self.getfieldnames('ONE')", "def relations(self):\n return set(self.triples()[\"relation\"])", "def relationships(self):", "def get_relations(self):\n triples = list(self.get_triples())\n\n for s, p, o in triples:\n if not p.startswith(\...
[ "0.7096476", "0.655924", "0.6366319", "0.61227846", "0.60044825", "0.5877629", "0.58542055", "0.5840653", "0.5739393", "0.5713277", "0.56678456", "0.56351084", "0.56170446", "0.55665904", "0.54818785", "0.5468127", "0.5463287", "0.5452604", "0.54127836", "0.53986883", "0.5376...
0.72177327
0
Check whether the entity is consistent with this entity info. The entity is supposed to be a subclass of Entity. Report any abnormalities as warnings to the logger. Return the number of warnings emitted.
def check(self, entity): nwarn = 0 if entity is None: return nwarn if not issubclass(entity, Entity): raise TypeError("invalid argument %s, expect subclass of Entity" % entity) cname = entity.__name__ beanname = self.beanna...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check(self):\n\n nwarn = 0\n\n # Check that the set of entity types is the same as in the\n # schema.\n schemanames = set(self.schema.keys())\n clientnames = set(self.client.typemap.keys())\n missing = schemanames - clientnames\n if missing:\n log.war...
[ "0.7488003", "0.59518033", "0.5554449", "0.5366329", "0.5356038", "0.52137417", "0.51991415", "0.5177108", "0.51752853", "0.51362544", "0.5122849", "0.5115364", "0.5110129", "0.5092445", "0.5081767", "0.5057919", "0.50373167", "0.50053465", "0.4978771", "0.49643213", "0.49566...
0.7879822
0
Search for entities defined at the server. Return a dict with type names as keys and EntityInfo objects as values.
def getentities(self): entities = {} # The following will create lots of errors in suds.client, one # for every type that is not an entity. Disable their logger # temporarily to avoid cluttering the log. sudslog = logging.getLogger('suds.client') sudssav = sudslog.disab...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def readEntities(self):\r\n entities = {}\r\n \r\n # Regexes must be greedy to prevent matching outer entity and end_entity strings\r\n # Regexes have re.DOTALL to match newlines\r\n for m in re.finditer(\"ENTITY (.*?)END_ENTITY;\", self.data, re.DOTALL):\r\n entity = ...
[ "0.654492", "0.63510257", "0.6295548", "0.61492395", "0.5928663", "0.58731294", "0.581502", "0.580751", "0.579876", "0.5771325", "0.57671726", "0.5759269", "0.57302684", "0.5673989", "0.5636686", "0.55597204", "0.55591005", "0.5551724", "0.55411315", "0.55391514", "0.55371106...
0.7634091
0
Check consistency of the ICAT client with the server schema. Report any abnormalities as warnings to the logger. Returns the number of warnings emitted.
def check(self): nwarn = 0 # Check that the set of entity types is the same as in the # schema. schemanames = set(self.schema.keys()) clientnames = set(self.client.typemap.keys()) missing = schemanames - clientnames if missing: log.warning("missing e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def checkExceptions(self):\n\n nwarn = 0\n\n icatExceptionType = self.client.factory.create('icatExceptionType')\n schemaexceptions = set(icatExceptionType.__keylist__)\n clientexceptions = set(icat.exception.IcatExceptionTypeMap.keys())\n missing = schemaexceptions - clientexcep...
[ "0.62300956", "0.5898869", "0.5719125", "0.5677171", "0.56404877", "0.5635841", "0.56192327", "0.55733836", "0.5571429", "0.551054", "0.54961216", "0.54919946", "0.54901636", "0.54901636", "0.54901636", "0.54901636", "0.54901636", "0.54901636", "0.54901636", "0.54901636", "0....
0.6281774
0
Check consistency of exceptions. Check that all icatExceptionTypes defined in the WSDL have a corresponding exception class defined in icat.exception. Report missing exceptions as a warning to the logger. Return the number of warnings emitted.
def checkExceptions(self): nwarn = 0 icatExceptionType = self.client.factory.create('icatExceptionType') schemaexceptions = set(icatExceptionType.__keylist__) clientexceptions = set(icat.exception.IcatExceptionTypeMap.keys()) missing = schemaexceptions - clientexceptions ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def count_error_types(graph: BELGraph) -> typing.Counter[str]:\n return Counter(exc.__class__.__name__ for _, exc, _ in graph.warnings)", "def check(self):\n\n nwarn = 0\n\n # Check that the set of entity types is the same as in the\n # schema.\n schemanames = set(self.schema.keys(...
[ "0.6489571", "0.5932624", "0.57542944", "0.5629398", "0.54877156", "0.53069246", "0.52667695", "0.52545625", "0.51867276", "0.5141248", "0.5109995", "0.5093013", "0.50528795", "0.5051258", "0.50483483", "0.5048305", "0.50454915", "0.5043633", "0.50357765", "0.50357765", "0.50...
0.8771143
0
Generate Python source code matching the ICAT schema. Generate source code for a set of classes that match the entity info found at the server. The source code is returned as a string. The Python classes are created as a hierarchy. It is assumed that there is one abstract base type which is the root of the genealogy tr...
def pythonsrc(self, genealogyrules=None, baseclassname='Entity'): if genealogyrules is None: genealogyrules = [(r'','entityBaseBean')] tree = self._genealogy(genealogyrules) base = [t for t in tree if tree[t]['base'] is None][0] self.schema[base].classname = baseclassname ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pythonsrc(self, baseclass=None):\n\n classname = self.classname\n baseclassname = 'object'\n classcomment = getattr(self.info, 'classComment', None)\n beanname = self.beanname\n addbeanname = True\n constraint = self.getconstraint()\n attrs = self.getattrs()\n ...
[ "0.6546843", "0.6342097", "0.61589974", "0.61360514", "0.58900464", "0.55907094", "0.55879545", "0.5527749", "0.54475427", "0.54270315", "0.540438", "0.53865635", "0.535935", "0.52980083", "0.52552074", "0.5254086", "0.5237905", "0.5225976", "0.5212285", "0.5208125", "0.51882...
0.68348277
0
updates .coveralls.yml file to allow upload of coverage report
def update_coveralls_config( path_to_coverage, coveralls_token, token_key='repo_token', ): try: with open(path_to_coverage, 'r') as cover_fh: raw_file = cover_fh.read() except FileNotFoundError: raw_file = '' # check if repo_token is already in .coveralls...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cover(ctx, html=False):\n header(cover.__doc__)\n extra = \"--cov-report html\" if html else \"\"\n with ctx.cd(ROOT):\n ctx.run(\n \"pytest --benchmark-skip --cov flask_restx --cov-report term --cov-report xml {0}\".format(\n extra\n ),\n pty=Tru...
[ "0.57402664", "0.55637956", "0.5521971", "0.5499088", "0.54615265", "0.5441391", "0.54214483", "0.5401124", "0.53201175", "0.51842374", "0.5157459", "0.51465404", "0.5143215", "0.5136255", "0.5116265", "0.5108954", "0.506716", "0.49769455", "0.49514818", "0.49292338", "0.4919...
0.7289181
0
turn multiline config entry into a list of commands
def parse_command_list(config_str): return [command for command in config_str.splitlines() if command]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def config_changes(cli):\n result = []\n in_config = False\n for line in cli.splitlines():\n if not in_config and line == 'Building configuration...':\n in_config = True\n elif in_config:\n result.append(line)\n\n return '\\n'.join(result)", "def get_commands_list(...
[ "0.64328206", "0.6407235", "0.6104706", "0.6073341", "0.5869535", "0.5853029", "0.57613", "0.5759418", "0.568729", "0.56760406", "0.5661332", "0.56305355", "0.5599522", "0.5569513", "0.55690366", "0.5557906", "0.55198437", "0.54839694", "0.5481613", "0.5474146", "0.5458116", ...
0.7687394
0
atexit handler for deactivating and removing local venv even if tools crash
def atexit_deactivate_venv( venv_name, cwd, logger=p_logging.DEFAULT_LOGGER ): # pragma: no cover logger.info('Cleaning up venv post-test') logger.info('--removing venv') try: rm_log = local['rm']('-rf', path.join(cwd, venv_name)) logger.debug(rm_log) except Exc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def env_cleanup(self):\n pass", "def tear_down(self):\n self.destroy_env()\n self.dut.kill_all()", "def teardown(self):\n self.logger.info('Tearing down file server vm')\n self.local_env.execute('uninstall', task_retries=40,\n task_retry_interval...
[ "0.6747679", "0.6670127", "0.66516036", "0.6634058", "0.6194183", "0.6155125", "0.6096577", "0.6070269", "0.6064456", "0.60605145", "0.6057598", "0.60506946", "0.6045445", "0.6012506", "0.6011123", "0.59959084", "0.598898", "0.5965664", "0.59515667", "0.5941659", "0.59395814"...
0.7242372
0
Test that the extension validation is working properly
def test_extensions(self): field = TypedFileField(required=False, ext_whitelist=self.good_extensions) for ext in self.good_extensions: name = 'somefooname.%s' % ext file = UploadedFile(name=name, size=1) assert field.clean(file) is file for ext in self.bad_e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_validate(self):\n pass", "def test_validators():", "def validate_extension(extension):\n\n error_flag = 0\n error_string = ''\n\n if isinstance(extension, dict):\n try:\n schema = jsonref.load_uri(extension['extension_schema'])\n try:\n print...
[ "0.7298474", "0.69515324", "0.6950843", "0.68759197", "0.68593514", "0.68426394", "0.6806111", "0.6804598", "0.6562722", "0.65436846", "0.65347743", "0.65035516", "0.6489072", "0.6402878", "0.6388997", "0.6346691", "0.63387173", "0.6312984", "0.62796175", "0.62742496", "0.625...
0.75316143
0
Test that the mimetypes are validate correctly
def test_mimetypes(self): field = TypedFileField(required=False, type_whitelist=self.good_types, use_magic=False) for t in self.good_types: name = 'somefooname' file = UploadedFile(name=name, size=1, content_type=t) assert field.clean(file) is file for t in ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_mimetypes_magic(self, mock_get_content_type):\n\n def get_content_type(value):\n return value.content_type\n\n mock_get_content_type.side_effect = get_content_type\n\n field = TypedFileField(required=False, type_whitelist=self.good_types, use_magic=True)\n\n for t in...
[ "0.7667273", "0.763851", "0.75550187", "0.75023365", "0.7006191", "0.69769895", "0.69073343", "0.69062054", "0.6781376", "0.67640036", "0.67325264", "0.6723504", "0.6719304", "0.6687197", "0.6671605", "0.66456544", "0.66422045", "0.66077816", "0.65924525", "0.65606976", "0.65...
0.82419276
0
Test that the mimetypes are validate correctly
def test_mimetypes_magic(self, mock_get_content_type): def get_content_type(value): return value.content_type mock_get_content_type.side_effect = get_content_type field = TypedFileField(required=False, type_whitelist=self.good_types, use_magic=True) for t in self.good_typ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_mimetypes(self):\n field = TypedFileField(required=False, type_whitelist=self.good_types, use_magic=False)\n\n for t in self.good_types:\n name = 'somefooname'\n file = UploadedFile(name=name, size=1, content_type=t)\n assert field.clean(file) is file\n\n ...
[ "0.82419276", "0.763851", "0.75550187", "0.75023365", "0.7006191", "0.69769895", "0.69073343", "0.69062054", "0.6781376", "0.67640036", "0.67325264", "0.6723504", "0.6719304", "0.6687197", "0.6671605", "0.66456544", "0.66422045", "0.66077816", "0.65924525", "0.65606976", "0.6...
0.7667273
1
Make sure ``ValidationError`` is raised if uploaded file has no mimetype
def test_no_mimetype(self): field = TypedFileField(required=False, type_whitelist=self.good_types, use_magic=False) for t in self.good_types: name = 'somefooname' file = UploadedFile(name=name, size=1, content_type=t) del file.content_type with pytest.rai...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_no_mimetype_magic(self, mock_get_content_type):\n mock_get_content_type.side_effect = ValueError\n\n field = TypedFileField(required=False, type_whitelist=self.good_types)\n\n for t in self.good_types:\n name = 'somefooname'\n file = UploadedFile(name=name, size=...
[ "0.7776475", "0.72709423", "0.7118607", "0.7027781", "0.7002521", "0.69914484", "0.694859", "0.68884635", "0.686069", "0.6736035", "0.6707866", "0.66616106", "0.66365695", "0.66283804", "0.6582579", "0.6581422", "0.6486669", "0.64784694", "0.6478206", "0.6458501", "0.632179",...
0.79070336
0
Make sure ``ValidationError`` is raised if uploaded file has no mimetype
def test_no_mimetype_magic(self, mock_get_content_type): mock_get_content_type.side_effect = ValueError field = TypedFileField(required=False, type_whitelist=self.good_types) for t in self.good_types: name = 'somefooname' file = UploadedFile(name=name, size=1, content_t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_no_mimetype(self):\n field = TypedFileField(required=False, type_whitelist=self.good_types, use_magic=False)\n\n for t in self.good_types:\n name = 'somefooname'\n file = UploadedFile(name=name, size=1, content_type=t)\n del file.content_type\n wit...
[ "0.7906906", "0.7269755", "0.7116972", "0.7030246", "0.7002452", "0.69941306", "0.6949124", "0.6888954", "0.6862505", "0.67371505", "0.6708364", "0.6663474", "0.66362625", "0.66306883", "0.658149", "0.65809655", "0.64851123", "0.647826", "0.64769727", "0.64585227", "0.6320358...
0.7776174
1
Initialize class with lfp data
def __init__(self, lfp_data): self.lfp_data = lfp_data
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n \n self.load_PSF_data()", "def __init__(self, *args, **kwargs):\n super(AbsLoopinData, self).__init__(\n # All set outside\n ('linl_lis', LinlLis()),\n ('linh', Byte()),\n *args, **kwargs\n )", "def __init__(self, fea...
[ "0.75963", "0.67351204", "0.6706532", "0.66661716", "0.6611448", "0.6609953", "0.66079646", "0.66079646", "0.66079646", "0.66079646", "0.6534196", "0.6520125", "0.65192205", "0.650805", "0.6506647", "0.6488057", "0.6477326", "0.6463792", "0.64620787", "0.64137286", "0.6397195...
0.88286996
0
Remove temporal mean from each trial
def remove_temporal_mean(self): if not hasattr(self, 'detrended_data'): self.detrend_data() self.mean_removed_data = self.detrended_data - \ np.mean(self.detrended_data, axis=-1, keepdims=True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def subtract_mean_across_trials(self):\n if not hasattr(self, 'std_divided_data'):\n self.divide_by_temporal_std()\n self.mean_across_trials_subtracted_data = \\\n self.std_divided_data - \\\n np.mean(self.std_divided_data, axis=1, keepdims=True)", "def divide_by_te...
[ "0.7029652", "0.62682873", "0.598299", "0.5920819", "0.5916785", "0.58507323", "0.5822636", "0.5814729", "0.5688639", "0.5680869", "0.5662162", "0.5650724", "0.5647669", "0.55737066", "0.5537115", "0.55138284", "0.55138284", "0.5509475", "0.5509475", "0.54969525", "0.54960907...
0.7598146
0
Divide by temporal standard deviation
def divide_by_temporal_std(self): if not hasattr(self, 'mean_removed_data'): self.remove_temporal_mean() self.std_divided_data = self.mean_removed_data / \ np.std(self.mean_removed_data, axis=-1, keepdims=True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stdev(values):\n mean = avg(values)\n diffs = [(value - mean) ** 2 for value in values]\n return avg(diffs) ** 0.5", "def stdev(items):\n return Series.std(Series(items))", "def stdev_from_mean(x):\r\n x = array(x)\r\n return (x - mean(x)) / std(x)", "def _std(self, data):\n var ...
[ "0.70303154", "0.70081013", "0.6894062", "0.68192405", "0.680471", "0.67917585", "0.67652786", "0.6757293", "0.6757293", "0.6733499", "0.671972", "0.6718157", "0.67139", "0.6705973", "0.6677462", "0.6677462", "0.66751814", "0.6662546", "0.6652855", "0.66227466", "0.66132027",...
0.8091293
0
Subtract mean across trials from each trial (for each timepoint)
def subtract_mean_across_trials(self): if not hasattr(self, 'std_divided_data'): self.divide_by_temporal_std() self.mean_across_trials_subtracted_data = \ self.std_divided_data - \ np.mean(self.std_divided_data, axis=1, keepdims=True)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def avgtr(self):\n return np.diff(self.trtimes).mean()", "def trial_atr(trial, omit_missing_frames=True):\n frames = trial.HMM_MLE\n if omit_missing_frames:\n frames = frames[frames >= 0]\n\n runs = calc_run_lengths(trial.HMM_MLE)\n return_times = []\n current_return_time = 0\n for run in runs:\n...
[ "0.6891229", "0.6561155", "0.6152613", "0.61516047", "0.6104623", "0.60979486", "0.60725135", "0.6048731", "0.598965", "0.5979206", "0.59755933", "0.5951833", "0.5951288", "0.5923516", "0.58769214", "0.58767086", "0.5859882", "0.5859882", "0.5859882", "0.584206", "0.5766064",...
0.759768
0
Divide by standard deviation across trials (for each timepoint)
def divide_by_std_across_trials(self): if not hasattr(self, 'mean_across_trials_subtracted_data'): self.subtract_mean_across_trials() self.std_across_trials_divided_data = \ self.mean_across_trials_subtracted_data / \ np.std(self.mean_across_trials_subtracted_data, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stdev(items):\n return Series.std(Series(items))", "def calc_standard_deviation(data: list) -> float:\n mean = calc_mean(data)\n acc = 0.0\n for n in data:\n acc += (n - mean) ** 2\n acc /= len(data) - 1\n return math.sqrt(acc)", "def stdDev(data):\r\n sum = 0\r\n ave = avera...
[ "0.7041086", "0.6919613", "0.6913145", "0.6878369", "0.68775237", "0.6814619", "0.67827666", "0.67530537", "0.67530537", "0.67328584", "0.6639971", "0.6564795", "0.6559348", "0.65451086", "0.65384686", "0.65182203", "0.64876235", "0.64876235", "0.64549816", "0.6444664", "0.64...
0.7416995
0
alpha = threshold for single test (will be Bonferroni corrected internally) wanted_fraction = minimum fraction of tests that should be significant (stationary)
def run_adfuller_test(preprocessed_data, alpha=0.05, wanted_fraction=0.95): inds = list(np.ndindex(preprocessed_data.shape[:-1])) def return_adfuller_pval(this_ind): return adfuller( preprocessed_data[this_ind])[1] pval_list = np.array(parallelize(return_adfuller_pval, inds, n_jobs=30)) alpha =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pvalue_test(self, alpha=0.01):\n CL = int((1-alpha)*100) # confidence level\n \n if self.p_value < alpha:\n print(\"Null hypothesis rejected at {:d}%CL => distributions are different\".format(CL))\n else:\n print(\"Null hypothesis NOT rejected => distr...
[ "0.59391797", "0.58778065", "0.5851814", "0.58380985", "0.57947487", "0.579216", "0.57526", "0.5734187", "0.56922245", "0.56904244", "0.56162506", "0.5595958", "0.5584986", "0.5574947", "0.5539639", "0.5525329", "0.5498995", "0.5490676", "0.5487545", "0.54838616", "0.5480658"...
0.6295856
0
Calculate granger causality time_series = time x trials x channels
def calc_granger(time_series, time_halfbandwidth_product=1, sampling_frequency=1000, time_window_duration=0.3, time_window_step=0.05, ): m = Multitaper( time_series, sampling_frequency=sampling_frequency, # in Hz ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def graphite_cracking_rate_Ai2020(T_dim):\n k_cr = 3.9e-20\n Eac_cr = 0 # to be implemented\n arrhenius = np.exp(Eac_cr / pybamm.constants.R * (1 / T_dim - 1 / 298.15))\n return k_cr * arrhenius", "def calc_granger_actual(self):\n if not hasattr(self, 'input_data'):\n self.preproce...
[ "0.5973435", "0.5885312", "0.5802749", "0.574831", "0.56886405", "0.55259013", "0.54229647", "0.5363545", "0.53522897", "0.5351203", "0.53407997", "0.53008807", "0.5212511", "0.51963246", "0.51937586", "0.51852894", "0.5148304", "0.5119841", "0.51136154", "0.5099041", "0.5090...
0.61610305
0
preprocessed_data = (n_channels, n_trials, n_timepoints) sampling_frequency = in Hz n_shuffles = number of shuffles to perform wanted_window = window to calculate granger causality in alpha = significance level multitaper_time_window_duration = duration of time window for multitaper multitaper_time_window_step = step o...
def __init__(self, good_lfp_data, # preprocessed_data, sampling_frequency=1000, n_shuffles=500, wanted_window=[1500, 4000], alpha=0.05, multitaper_time_halfbandwidth_product=1, multita...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cubetest_per_topic(topic_truth, topic_result, gamma, max_height, cutoff):\n subtopic_num = topic_truth[1]\n topic_truth = topic_truth[0]\n\n subtopic_height = Counter() # current height of every subtopic\n subtopic_count = Counter() # #docs found relevant to every subtopic (nrels)\n\n weight_p...
[ "0.57132494", "0.5595162", "0.5551956", "0.5525474", "0.5525352", "0.55149806", "0.5493697", "0.54556054", "0.5432164", "0.5368782", "0.53298104", "0.53258", "0.53194267", "0.53181934", "0.5303471", "0.5290147", "0.52515495", "0.5232192", "0.52276266", "0.52183676", "0.520918...
0.68344384
0
Calculate bootstrapped actual granger causality to allow for estimation of error
def calc_granger_actual(self): if not hasattr(self, 'input_data'): self.preprocess_and_check_stationarity() # input_data shape = (n_timepoints, n_trials, n_channels) # Calculate as many bootstrapped samples as n_shuffles trial_inds = np.random.randint( 0, self...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def binom_bca_bootstrap_err(k, n, B=10000, CL=[0.025, 0.975], acceleration=True, return_full=False):\n theta_MLE = k/n\n k_i = bootstrap_sample_binomial(k, n, B)\n\n # Bootstrap estimates of the parameter\n theta_i = k_i / n\n theta0_star = np.sum(theta_i) / B\n print(f'theta_MLE = {theta_MLE}, t...
[ "0.62454176", "0.6181481", "0.5973252", "0.58579695", "0.5794351", "0.57939696", "0.57455033", "0.57455033", "0.5720694", "0.57071906", "0.5694225", "0.5676966", "0.56485546", "0.56252354", "0.56042624", "0.55519134", "0.55401033", "0.55351764", "0.5533983", "0.55071896", "0....
0.63861793
0
Calculate shuffled granger causality
def calc_granger_shuffle(self): if not hasattr(self, 'input_data'): self.preprocess_and_check_stationarity() temp_series = [np.stack([np.random.permutation(x) for x in self.input_data.T]).T for i in trange(self.n_shuffles)] outs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calc_granger_actual(self):\n if not hasattr(self, 'input_data'):\n self.preprocess_and_check_stationarity()\n # input_data shape = (n_timepoints, n_trials, n_channels)\n # Calculate as many bootstrapped samples as n_shuffles\n trial_inds = np.random.randint(\n ...
[ "0.62754345", "0.62195766", "0.60361123", "0.5824733", "0.58219045", "0.563918", "0.5584704", "0.5575912", "0.5573002", "0.55611855", "0.54603237", "0.54584056", "0.5441802", "0.5441032", "0.5434684", "0.5428206", "0.5410833", "0.54057086", "0.54057086", "0.53993386", "0.5378...
0.6487357
0
Mask is True when granger causality is NOT SIGNIFICANT
def get_granger_sig_mask(self): if not hasattr(self, 'percentile_granger'): self.calc_shuffle_threshold() if not hasattr(self, 'granger_actual'): self.calc_granger_actual() mean_granger_actual = np.mean(self.granger_actual, axis=0) self.masked_granger = np.ma.mask...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mask(self):", "def cmask(self):\n mask = np.zeros(18)\n if 'full' in self.CONS: mask[:] = 1\n if 'f0' in self.CONS: mask[0] = 1\n if 'f1' in self.CONS: mask[1:4] = 1\n if 'f2' in self.CONS: mask[4:10] = 1\n if 'vx' in self.CONS: mask[10] = 1\n if 'vy' in self....
[ "0.6703793", "0.63538605", "0.63142383", "0.6256875", "0.61741894", "0.6091233", "0.60839707", "0.6051521", "0.5936672", "0.59186983", "0.5887224", "0.58444947", "0.57600707", "0.5741366", "0.57228017", "0.5708867", "0.5700054", "0.5693821", "0.56917423", "0.56917423", "0.568...
0.66818357
1
A list of return codes of all processes launched by the pipe
def returncodes(self): for p in self.processes: p.wait() codes = [p.poll() for p in self.processes] if set(codes) == set([0]): return [] return codes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ListProcesses(self):\n stdout, stderr = self.RunCmdOnDevice(\n ['/bin/ps', '--no-headers', '-A', '-o', 'pid,ppid,args:4096,state'],\n quiet=True)\n assert stderr == '', stderr\n procs = []\n for l in stdout.split('\\n'):\n if l == '':\n continue\n m = re.match(r'^\\s*...
[ "0.6246769", "0.6245669", "0.6231879", "0.6155173", "0.61222064", "0.6060783", "0.5963847", "0.5958712", "0.59503996", "0.5923416", "0.59230506", "0.5919986", "0.59160084", "0.58853406", "0.58609474", "0.58411664", "0.5837716", "0.5834148", "0.5834146", "0.58337736", "0.58334...
0.7935474
0
combined stderr of all processes
def stderr(self): if self._stderr is None: stderr = [p.stderr.read() for p in self.processes if p.stderr] output = b'\n'.join(stderr).strip() if not isinstance(output, str): output = output.decode(self.encoding, 'ignore') self._stderr = output ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nostderr():\n save_stderr = sys.stderr\n sys.stderr = cStringIO.StringIO()\n yield\n sys.stderr = save_stderr", "def stderr(self, stderr: str) -> Tuple[List[Message], List[AnnotateCode], str]:\n return [], [], stderr", "def result_stderr(result):\n return result[1][1]", "def get_std...
[ "0.6715245", "0.66839", "0.6574798", "0.65431535", "0.6496524", "0.64380735", "0.63869214", "0.6328884", "0.62826824", "0.6277269", "0.6198289", "0.6133846", "0.60173345", "0.5962739", "0.5962001", "0.5930159", "0.59266466", "0.5872949", "0.58673817", "0.5847088", "0.5786829"...
0.68787926
0
Run processes in background. Return the last piped Popen object
def bg(self): p = None self.processes = [] self._stderr = None stdin = sys.stdin cmds = self.commands if [c for c in cmds if c._cmd_args[:1] == ['sudo']]: check_sudo() for cmd in cmds: if isinstance(cmd, Stdin): stdin = cm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def call(*args, **kwargs):\n return Popen(*args, **kwargs).wait()", "def start(self):\n last_stdout = None\n self.processes = []\n for cmd in self.cmds:\n # TODO: handle exceptions raised by Popen\n p = subprocess.Popen(cmd, stdin=last_stdout, stdout=subprocess.PIPE,...
[ "0.6664132", "0.64688516", "0.64178354", "0.6342972", "0.6325031", "0.62582344", "0.62191474", "0.60025233", "0.5937454", "0.5910544", "0.5850933", "0.58419496", "0.584046", "0.5808457", "0.5794157", "0.5777509", "0.5762344", "0.5744797", "0.572683", "0.56833637", "0.5670176"...
0.7648508
0
Generate chut scripts contained in location
def chutifab(self, *args): ll = logging.getLogger(posixpath.basename(sys.argv[0])) level = ll.level ll.setLevel(logging.WARN) if not args: args = ['.'] for location in args: Generator(destination='.chutifab')(location) ll.setLevel(level) se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _add_scripts(prefix):\n mapping = {\"MAST_HOME\": prefix}\n if \"Windows\" in platform.system():\n script_dir = os.path.join(INSTALL_DIR, \"files\", \"windows\")\n files = [\n \"mast.bat\",\n \"mast-system.bat\",\n \"mast-accounts.bat\",\n \"mast-...
[ "0.6096537", "0.6009406", "0.59709835", "0.5967113", "0.5920322", "0.59109473", "0.58882314", "0.5841919", "0.57877", "0.5781333", "0.5743029", "0.57190037", "0.5708141", "0.5695298", "0.5688432", "0.56231797", "0.5622278", "0.55802655", "0.5565092", "0.55514556", "0.55338746...
0.67919713
0
Upload a script and run it. ``args`` are used as command line arguments. ``kwargs`` are passed to `fabric`'s `run`
def run(self, script, *args, **kwargs): return self._run('run', script, *args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def script_run(ctx: click.Context, name, script_arguments):\n subcommand_script.cmd_run(ctx.obj, name, script_arguments)", "def run(args):\n\n drive_uid = str(args[\"drive_uid\"])\n file_uid = str(args[\"file_uid\"])\n chunk_idx = int(args[\"chunk_index\"])\n secret = str(args[\"secret\"])\n da...
[ "0.6333176", "0.6069562", "0.60669595", "0.5997453", "0.5979731", "0.59490883", "0.5912231", "0.59050536", "0.59018415", "0.5843688", "0.5803377", "0.57960784", "0.5723168", "0.56878614", "0.5683986", "0.5648805", "0.5643183", "0.5575065", "0.5519657", "0.5519369", "0.5487893...
0.68447685
0
Upload a script and run it using sudo. ``args`` are used as command line arguments. ``kwargs`` are passed to `fabric`'s `sudo`
def sudo(self, script, *args, **kwargs): return self._run('sudo', script, *args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _upload_template(filename, destination, **kwargs):\n user = kwargs.pop('user')\n kwargs['use_sudo'] = True\n upload_template(filename, destination, **kwargs)\n sudo('chown %(user)s:%(user)s %(dest)s' % {'user': user, 'dest': destination})", "def run_remote_script(self, script_file, args=None, log...
[ "0.6268761", "0.589509", "0.58233005", "0.58182013", "0.5760758", "0.57154745", "0.5654159", "0.5632504", "0.5609804", "0.5580056", "0.556147", "0.5543384", "0.5473087", "0.54669285", "0.5439649", "0.5400255", "0.5376021", "0.5350383", "0.5334175", "0.5298767", "0.5295162", ...
0.6812293
0
Return a random ktuple of unique elements selected from population.
def rand_tuple(population, k, required_inds=None): if isinstance(population, int): population = xrange(population) if required_inds is None: required_inds = [] if not isinstance(required_inds, collections.Iterable): required_inds = [required_inds] t = set(random.sample(populati...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def random_sample(population, k):\r\n \r\n newpopulation = population[:]\r\n if len(population) < k:\r\n raise ValueError, \"sample larger than population\"\r\n\r\n retlist = []\r\n populationsize = len(population)-1\r\n\r\n for num in range(k):\r\n pos = random_randint(0,populationsize-num)\r\n ret...
[ "0.7027959", "0.6738937", "0.67178", "0.6524128", "0.649793", "0.6422931", "0.6414868", "0.63981503", "0.6355274", "0.63087744", "0.6304614", "0.61815244", "0.6177249", "0.6150533", "0.6144496", "0.61237365", "0.610168", "0.60970324", "0.60753673", "0.6051624", "0.6015738", ...
0.78772885
0
If a CNAME RR is present at a node, no other data should be present; this ensures that the data for a canonical name and its aliases cannot be different."
def check_for_cname(record): CNAME = cydns.cname.models.CNAME if hasattr(record, 'label'): if CNAME.objects.filter(domain=record.domain, label=record.label).exists(): raise ValidationError("A CNAME with this name already exists.") else: if CNAME.ob...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_cname_response(self):\n fqdn = \"cname.github.com\"\n answer = self.resolver.query(fqdn, \"CNAME\")\n for rr in answer:\n if rr.target.to_text() != \"github.map.fastly.net.\":\n raise TestException(\"Unexpected target for {0}: {1}\"\n ...
[ "0.66299236", "0.660377", "0.6489522", "0.6237036", "0.5940322", "0.5899176", "0.5880195", "0.5746405", "0.56934726", "0.5651654", "0.54630584", "0.5213084", "0.5147239", "0.5126222", "0.507616", "0.507153", "0.50488186", "0.50211823", "0.49776897", "0.4961214", "0.49337912",...
0.6656125
0
If an object's domain is delegated it should not be able to be changed. Delegated domains cannot have objects created in them.
def check_for_delegation(record): try: if not record.domain.delegated: return except ObjectDoesNotExist: return if not record.pk: # We don't exist yet. raise ValidationError("No objects can be created in the {0}" "domain. It is delegated." ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _adddomain(self, domain: Domain):\n\n domain = copy.deepcopy(domain)\n if self.model is not None:\n # Check that model and domain are compatible\n self._validate_model_domain(self.model, domain)\n\n # Add in domain\n self.domain = domain\n\n ...
[ "0.58941036", "0.5639527", "0.5625555", "0.5514755", "0.54754555", "0.54411316", "0.53744304", "0.5370402", "0.5310718", "0.5309314", "0.52955467", "0.5281646", "0.5263368", "0.5252164", "0.5234074", "0.5162429", "0.51530653", "0.5148863", "0.51440006", "0.5141241", "0.512088...
0.6326696
0
Return the taxicab distance between two intersections. >>> times_square = intersection(46, 7) >>> ess_a_bagel = intersection(51, 3) >>> taxicab(times_square, ess_a_bagel) 9 >>> taxicab(ess_a_bagel, times_square) 9
def taxicab(a, b): "*** YOUR CODE HERE ***" return abs(street(a)-street(b)) + abs(avenue(a)-avenue(b))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def taxicab(a, b):\n street_1, street_2 = street(a), street(b)\n avenue_1, avenue_2 = avenue(a), avenue(b)\n return abs(street_1 - street_2) + abs(avenue_1 - avenue_2)", "def taxicab(a, b):\n \"*** YOUR CODE HERE ***\"\n return abs(street(a) - street(b)) + abs(avenue(a) - avenue(b))", "def taxic...
[ "0.7120618", "0.67128575", "0.67128575", "0.65796095", "0.65704274", "0.5223073", "0.50749713", "0.5042515", "0.5000128", "0.48629433", "0.48522303", "0.4831717", "0.47960907", "0.4795959", "0.478697", "0.4773556", "0.4723682", "0.4699743", "0.46614695", "0.46481127", "0.4647...
0.68399566
1
Return the value of G(n), computed recursively. >>> g(1) 1 >>> g(2) 2 >>> g(3) 3 >>> g(4) 10 >>> g(5) 22 >>> from construct_check import check >>> check(HW_SOURCE_FILE, 'g', ['While', 'For']) True
def g(n): "*** YOUR CODE HERE ***" if n <= 3: return n else: return g(n-1) + 2*g(n-2) + 3*g(n-3)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def g(n):\n \"*** YOUR CODE HERE ***\"\n if n < 4:\n return n\n else:\n return g(n-1) + 2*g(n-2) + 3*g(n-3)", "def g(n):\n \"*** YOUR CODE HERE ***\"\n if n <=3:\n return n\n else:\n return g(n-1)+2*g(n-2)+3*g(n-3)", "def g(n):\n \"*** YOUR CODE HERE ***\"\n ...
[ "0.6509589", "0.6436936", "0.63279766", "0.63279766", "0.615563", "0.6023759", "0.5937535", "0.55640376", "0.5536395", "0.55231243", "0.54222506", "0.5410513", "0.539917", "0.53932846", "0.5342397", "0.5292581", "0.5288211", "0.52790266", "0.5253362", "0.5252296", "0.51862425...
0.65330666
0
Return the value of G(n), computed iteratively. >>> g_iter(1) 1 >>> g_iter(2) 2 >>> g_iter(3) 3 >>> g_iter(4) 10 >>> g_iter(5) 22 >>> from construct_check import check >>> check(HW_SOURCE_FILE, 'g_iter', ['Recursion']) True
def g_iter(n): if n <= 3: return n else: g_n_1, g_n_2, g_n_3 = 3, 2, 1 # always update the g_i until reach the final n for i in range(4,n+1): g_i = g_n_1 + 2*g_n_2 + 3*g_n_3 # update the g(n-1), g(n-2), g(n-3) g_n_1, g_n_2, g_n_3 = g_i, g_n_1, g_n_2 return g_i "*** YOUR CODE HERE ***"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def g_iter(n):\n \"*** YOUR CODE HERE ***\"\n if n < 4:\n return n\n else:\n g1 = 1\n g2 = 2\n g3 = 3\n i = 3\n while(i < n):\n i += 1\n t = g3 + 2*g2 + 3*g1\n g1 = g2\n g2 = g3\n g3 = t\n return g3", "de...
[ "0.71208894", "0.68869877", "0.6281551", "0.622201", "0.6130775", "0.6093902", "0.60279924", "0.5978761", "0.59504557", "0.59047425", "0.5899456", "0.5899456", "0.5845385", "0.58453226", "0.58441585", "0.583596", "0.57956004", "0.5788619", "0.570271", "0.56376046", "0.5634359...
0.73005706
0
Returns True if at least one of the digits of k is a 7, False otherwise. >>> has_seven(3) False >>> has_seven(7) True >>> has_seven(2734) True >>> has_seven(2634) False >>> has_seven(734) True >>> has_seven(7777) True
def has_seven(k): if k % 10 == 7: return True elif k < 10: return False else: return has_seven(k // 10)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_seven(k):\n if k == 0:\n return False\n else:\n if k%10 == 7:\n return True\n return has_seven(k//10)", "def has_seven(k):\n \n if k % 10 == 7:\n return True\n else:\n if k<10:\n return False\n return has_seven(k//10)", "def...
[ "0.8716564", "0.8706798", "0.8690393", "0.8690393", "0.8690393", "0.61994755", "0.58175665", "0.57838863", "0.57414204", "0.5732691", "0.55530447", "0.5547129", "0.55352366", "0.5535023", "0.5497758", "0.5434485", "0.5352723", "0.53297573", "0.5328972", "0.5325144", "0.531923...
0.8931878
0
Return the number of ways to make change for amount. >>> count_change(7) 6 >>> count_change(10) 14 >>> count_change(20) 60 >>> count_change(100) 9828
def count_change(amount): options = [2**i for i in range(amount+1) if 2**i <= amount] options = sorted(options, reverse = True) length = len(options) # print(length) def helper(remains, i, options, length): # loop until reaching the smallest coin if i >= length : return 0 # check the remains if remains...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def count_change(amount):\n def change_with_maxcoin(total, maxcoin):\n if total == 0:\n return 1\n if maxcoin == 0:\n return 0\n cnt = 0\n num_change = 0\n while cnt * maxcoin <= total:\n num_change += change_with_maxcoin(total - cnt * maxcoin,...
[ "0.7939031", "0.76921844", "0.7645819", "0.7632281", "0.751326", "0.735496", "0.7268972", "0.69675857", "0.6723433", "0.6232168", "0.6041933", "0.59812564", "0.59323406", "0.58486235", "0.5755835", "0.56916153", "0.5571448", "0.5469678", "0.54315627", "0.5374645", "0.53648406...
0.79869974
0
Implementation of Focal Loss from the paper in multiclass classification
def categorical_focal_loss(gamma=2.0, alpha=0.25): def focal_loss(y_true, y_pred): # Define epsilon so that the backpropagation will not result in NaN for 0 divisor case epsilon = backend.epsilon() # Add the epsilon to prediction value #y_pred = y_pred + epsilon # Clip the pr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def focal_loss(self,labels, logits, gamma=2):\n y_pred = tf.nn.softmax(logits, dim=-1) # [batch_size,num_classes]\n # labels = tf.one_hot(labels, depth=y_pred.shape[1])\n L = -labels * ((1 - y_pred) ** gamma) * tf.log(y_pred)\n L = tf.reduce_sum(L, axis=1)\n return L", "def fo...
[ "0.6775613", "0.6576758", "0.6491725", "0.64844924", "0.6475553", "0.64732516", "0.64350957", "0.6420379", "0.63795304", "0.6373628", "0.63676196", "0.63623226", "0.63240296", "0.63087744", "0.6286535", "0.62419695", "0.62229663", "0.6222136", "0.6222136", "0.62179106", "0.62...
0.7187947
0
Perform actions on all infected members of the population in a random order
def turn(grid): # Select infected people rows, cols = np.where(grid == 1) #print(f"Infected at {rows}, {cols}") # In random order, go through each infected idx = np.arange(len(rows)) np.random.shuffle(idx) for i in idx: # Chance to heal if np.random.binomial(1, heal_rate): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _mutate(self, individuals):\n for cur in individuals:\n if random.random() < self.mutation_probability:\n self.op.mutate(cur['individual'])\n cur['fitness'] = None", "def hesitant_action(self):\n if not self.agent.done:\n if not self.opponenet...
[ "0.6152134", "0.6125817", "0.61022955", "0.6062612", "0.5987989", "0.5987563", "0.59344083", "0.5924505", "0.5913674", "0.5815777", "0.58083546", "0.5803261", "0.5792966", "0.578544", "0.5772891", "0.5767429", "0.57490784", "0.5739122", "0.572956", "0.57269686", "0.57267815",...
0.6190832
0
removes the old repo in server and clones a new one. the configures the host.
def flush_repo(): server = get_server() run("rm -rf %(project_name)s" % env) git.clone() server.setup()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_source(self):\n cwd = None\n if os.path.exists(self.path):\n cwd = self.path\n cmd = 'git fetch && git reset --hard origin/master'\n else:\n cmd = 'git clone %s %s' % (self.repo_url, self.path)\n Command(cmd, cwd=cwd)", "def deploy_pull_mast...
[ "0.61914355", "0.61613387", "0.61292326", "0.610431", "0.6018636", "0.600334", "0.5974268", "0.59159434", "0.5908282", "0.5882658", "0.58382523", "0.5837231", "0.5782798", "0.5774126", "0.57253504", "0.56959504", "0.5688279", "0.5687978", "0.5686983", "0.56722623", "0.5639738...
0.7116184
0
return a list with items with the same student
def get_all_by_student(self, stud_id): l = [] for item in self._items: if item.get_student() == stud_id: l.append(item) return l[:]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def students(self):\n\t\treturn self.grade_set.all().distinct()", "def find_duplicate(student_list):\r\n place_holder = student_info('null', 'null', '0', '0')\r\n current = place_holder\r\n dupe = []\r\n final = []\r\n for student in student_list:\r\n previous = current\r\n current =...
[ "0.6781505", "0.65362155", "0.6199378", "0.60326993", "0.601739", "0.5969962", "0.5895063", "0.583807", "0.5774767", "0.57600665", "0.5728087", "0.57097805", "0.5650832", "0.56497097", "0.5617477", "0.560614", "0.55885255", "0.55699545", "0.55072105", "0.5501444", "0.5463087"...
0.6604642
1
return a list with items with the same discipline
def get_all_by_discipline(self, disc_id): l = [] for i in self._items: if i.get_id_disciplina() == disc_id: l.append(i) return l[:]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def deduped(items):\n \n return list(set(items))", "def Collection_select_cheap(C:list, n: float)->list:\r\n result = []\r\n for rest in C:\r\n if Restaurant_is_cheap(rest, n) == True:\r\n result.append(rest)\r\n return result", "def duplicates(items):\n duplicate_items = se...
[ "0.57249516", "0.559361", "0.54721725", "0.5366635", "0.5349736", "0.53270197", "0.532001", "0.53142184", "0.5301576", "0.5295073", "0.52504534", "0.5219532", "0.5206376", "0.5200724", "0.51740515", "0.5167879", "0.5167069", "0.514371", "0.51328325", "0.51251054", "0.51210004...
0.6530238
0
Sliding window algorithm realization Output 'segments' contains start and end indexes for each step Assumption data is contiguous data
def segment_sliding_window(data, winSizeMillisecond=1000, stepSizeMillisecond=100): logger.info("Sliding window with win size %.2f second and step size %.2f second", winSizeMillisecond, stepSizeMillisecond) if stepSizeMillisecond <= 0: raise ValueError("Step size must be larger t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _segment(data, segment_length=200,\n seq_length=None,\n stride=None,\n input_type='trials'):\n x_out = []\n if input_type == 'trials':\n seq_length = 1\n\n if not stride:\n stride = segment_length\n\n for jj, xx in enumerate(data):\n\n n_ch, ...
[ "0.67323786", "0.66023433", "0.6593062", "0.65148705", "0.6402961", "0.6359427", "0.6332763", "0.6283209", "0.6280443", "0.62024176", "0.61759365", "0.6168342", "0.6120425", "0.6099909", "0.6057716", "0.6040668", "0.5987201", "0.5953549", "0.5936035", "0.5916517", "0.5867777"...
0.7024497
0
Convert django model to geojson
def to_geojson(model, contrib_id): feature_collection = [] for record in model.objects.filter(contributer_id=contrib_id): try: properies = { "name": record.name, "address": record.address, "email": record.email, "website": recor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default(self, o): \n if isinstance(o, GEOSGeometry):\n dictval = json.loads(o.geojson)\n #raise Exception(o.ewkt)\n dictval['__GEOSGeometry__'] = ['__init__', [o.ewkt]] #json class hint; see http://json-rpc.org/wiki/specification\n return dictval\n else...
[ "0.6924277", "0.6681148", "0.6647204", "0.6602624", "0.6577234", "0.6551587", "0.6533658", "0.6529714", "0.64571106", "0.645591", "0.6319082", "0.6317624", "0.62623715", "0.6253182", "0.62173903", "0.6201155", "0.6189135", "0.61708796", "0.6170053", "0.61695904", "0.6141281",...
0.6926797
0
returns the candidates as a simple string
def cand_str(self): return "".join([str(x) for x in self.cands])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_candidates(self):\n return u', '.join([c.identifier for c in self.candidates.all()])", "def get_all_candidates(self) -> list:", "def view_candidates(self):\n items = ['id', self.filter, 'half_light', 'separation', 'P_c']\n for add_on in ['P_O', 'P_Ox']:\n if add_on in se...
[ "0.7313972", "0.634011", "0.6055387", "0.59636027", "0.5877696", "0.585959", "0.5841727", "0.5791971", "0.5778096", "0.5705545", "0.5683101", "0.56824327", "0.5674035", "0.5649382", "0.56227845", "0.5609205", "0.5592801", "0.5583754", "0.5580004", "0.55474", "0.55360365", "...
0.6516208
1
Disables provided function from one or multiple channels which are specified. A function can be any of the commands, plugins or galaxies which are allowed to be disabled.
async def disable(self, ctx, function: typing.Union[CommandConverter, PluginConverter, GalaxyConverter], *channels: discord.TextChannel): channels = channels or (ctx.channel, ) await ctx.guild_profile.permissions.disable_function(function, channels) # noinspection PyUnresol...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def disable(func):\n return func", "async def disable_channel(self, ctx, *channels: discord.TextChannel):\n channels = channels or (ctx.channel, )\n await ctx.guild_profile.permissions.disable_channels(channels)\n await ctx.send_line(f\"{ctx.emotes.web_emotion.galka} Bot commands and m...
[ "0.7478053", "0.6590839", "0.63677406", "0.61984825", "0.5935865", "0.5847337", "0.57535195", "0.5705342", "0.57022613", "0.5698396", "0.56209135", "0.5606587", "0.5573692", "0.55229694", "0.55216694", "0.5494032", "0.54801023", "0.5455171", "0.5423171", "0.5408966", "0.53884...
0.8369485
0
Enables provided function in all of the specified channels. A function can be any of the commands, plugins or galaxies.
async def enable(self, ctx, function: typing.Union[CommandConverter, PluginConverter, GalaxyConverter], *channels: discord.TextChannel): channels = channels or (ctx.channel, ) await ctx.guild_profile.permissions.enable_function(function, channels) # noinspection PyUnresolved...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def enable_channel(self, ctx, *channels: discord.TextChannel):\n channels = channels or (ctx.channel, )\n await ctx.guild_profile.permissions.enable_channels(channels)\n await ctx.send_line(f\"{ctx.emotes.web_emotion.galka} Bot commands and messages has been enabled in specified chann...
[ "0.6668181", "0.6548446", "0.6338657", "0.5989139", "0.574073", "0.56826746", "0.56814885", "0.55161613", "0.54051787", "0.5351172", "0.5333117", "0.5286296", "0.52859515", "0.52859515", "0.52859515", "0.52859515", "0.52859515", "0.52859515", "0.52859515", "0.52859515", "0.52...
0.78735584
0
Disables bot commands and most of its automatic messages in current or provided channels.
async def disable_channel(self, ctx, *channels: discord.TextChannel): channels = channels or (ctx.channel, ) await ctx.guild_profile.permissions.disable_channels(channels) await ctx.send_line(f"{ctx.emotes.web_emotion.galka} Bot commands and messages has been disabled in specified channels.")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def blacklist_commands(self, ctx):\r\n await self.amethyst.send_command_help(ctx)", "async def disable(self, ctx, function: typing.Union[CommandConverter, PluginConverter, GalaxyConverter],\n *channels: discord.TextChannel):\n channels = channels or (ctx.channel, )\n ...
[ "0.7108723", "0.7096003", "0.69496554", "0.67883027", "0.6707562", "0.6565387", "0.6368427", "0.63573396", "0.6339441", "0.6334304", "0.63192993", "0.62177265", "0.61687315", "0.61560297", "0.6059689", "0.6038491", "0.5994542", "0.59823614", "0.5947161", "0.59250474", "0.5920...
0.78277546
0
Enables back bot commands and its automatic messages in current or provided channels if it was disabled previously.
async def enable_channel(self, ctx, *channels: discord.TextChannel): channels = channels or (ctx.channel, ) await ctx.guild_profile.permissions.enable_channels(channels) await ctx.send_line(f"{ctx.emotes.web_emotion.galka} Bot commands and messages has been enabled in specified channels.")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def func(self):\n from evennia.comms.models import ChannelDB\n\n caller = self.caller\n if self.args not in (\"on\", \"off\"):\n return super(CmdArxAllCom, self).func()\n if self.args == \"on\":\n # get names of all channels available to listen to\n # an...
[ "0.67751026", "0.6625209", "0.65478224", "0.6417928", "0.6308489", "0.610151", "0.60823476", "0.5960483", "0.5899421", "0.5865763", "0.5858996", "0.58107245", "0.580726", "0.5788629", "0.56712127", "0.56574357", "0.5640026", "0.5632828", "0.56324667", "0.5491965", "0.5487777"...
0.73707277
0
Name scope. Must be defined by implementations.
def name_scope(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def scope(self, name):\r\n raise NotImplementedError", "def _set_name_scope(self):\n if self.name is None:\n self._name_scope = self.__class__.__name__\n elif self.name == '<lambda>':\n self._name_scope = 'lambda'\n else:\n # E.g. '_my_loss' => 'my_loss'\n self._name_scope = self....
[ "0.83334064", "0.78577036", "0.7441628", "0.7270988", "0.72071725", "0.71555185", "0.7115489", "0.7110687", "0.71026707", "0.7065051", "0.6968165", "0.6964567", "0.69457537", "0.69046456", "0.6899518", "0.6899518", "0.6892065", "0.6835145", "0.6835145", "0.6819266", "0.681926...
0.8675015
0
Whether to dynamically check the number of anchors generated. Can be overridden by implementations that would like to disable this behavior.
def check_num_anchors(self): return True
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def num_anchors_per_location(self):\n pass", "def adjust_anchors(self):\n pass", "def is_anchor_valid(self):\n return self.properties.get('IsAnchorValid', None)", "def _assert_correct_number_of_anchors(self, anchors_list,\n feature_map_shape_list):\n ...
[ "0.68195313", "0.6357228", "0.6135154", "0.5779674", "0.5483983", "0.54224265", "0.5373215", "0.5297422", "0.5296277", "0.5272198", "0.52359825", "0.5194844", "0.51695627", "0.51695627", "0.51695627", "0.51695627", "0.5161574", "0.51068735", "0.51042", "0.5082342", "0.507974"...
0.77952874
0
Returns the number of anchors per spatial location.
def num_anchors_per_location(self): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def num_anchors_per_localization(self):\n num_rot = len(self._rotations)\n num_size = np.array(self._sizes).reshape([-1, 3]).shape[0]\n return num_rot * num_size", "def num_locations(self):\n return len(self.locations)", "def get_location_count(self):\n return len(self.matrix...
[ "0.749816", "0.6937425", "0.66813695", "0.6656154", "0.6582445", "0.6582445", "0.6582445", "0.6580193", "0.65188473", "0.65087336", "0.6447474", "0.63943326", "0.6365181", "0.6354651", "0.6345681", "0.6322735", "0.6313625", "0.6276137", "0.62072563", "0.6178259", "0.61153775"...
0.8555305
0
Assert that correct number of anchors was generated.
def _assert_correct_number_of_anchors(self, anchors_list, feature_map_shape_list): expected_num_anchors = 0 actual_num_anchors = 0 for num_anchors_per_location, feature_map_shape, anchors in zip( self.num_anchors_per_location(), feature_map_shape_list, anchors...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_num_anchors(self):\n return True", "def test_generation_length(self):\n for i in range(1, 20, 3):\n test_obj = FakeOrderBuilder(n=i).build()\n self.assertIs(len(test_obj), i)", "def num_anchors_per_location(self):\n pass", "def test_vote_generator(self):\n ...
[ "0.7573695", "0.67272305", "0.6482859", "0.6289629", "0.6163478", "0.61331123", "0.6032624", "0.5879324", "0.5873571", "0.5858247", "0.5818788", "0.58075005", "0.57869184", "0.5784455", "0.57567227", "0.57567227", "0.5755385", "0.5755148", "0.57010067", "0.5676276", "0.567553...
0.7683266
0
run cfg2json() on a predefined list of .cfg files
def batch_run_cfg2json(): cfg_path = os.environ.get("CFG_FILE_PATH") cfg_list = ['any_n1.cfg', 'ir_grism_n2.cfg', 'ir_grism_n4.cfg', 'ir_any_n2.cfg', 'ir_any_n4.cfg', 'uvis_any_n2.cfg', 'uvis_any_n4.cfg', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cfg2json(cfgfilename, outpath=None):\n # open cfg file and load up the output dictionary\n cfg_data = teal.load(cfgfilename, strict=False)\n del cfg_data['_task_name_']\n del cfg_data['_RULES_']\n\n out_dict = {\"parameters\": cfg_data, \"default_values\": cfg_data}\n\n # build output json fi...
[ "0.725863", "0.6178261", "0.614552", "0.6062128", "0.5994763", "0.5942238", "0.57629395", "0.57319415", "0.569644", "0.5682584", "0.55984646", "0.5595738", "0.5571803", "0.55675125", "0.5555411", "0.55549204", "0.5554568", "0.5542356", "0.5514675", "0.55100006", "0.54999024",...
0.84875107
0
Reformat userspecifed input json file to use standard (indent = 4) format
def reformat_json_file(infilename, outfilename, clobber=False): # open input json file with open(infilename) as json_file: json_string = json_file.read() json_data = json.loads(json_string) # see if output file already exists and determine course of action if os.path.exists(outfilename)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def collapse_json(text, indent=4):\n initial = \" \" * indent\n out = [] # final json output\n sublevel = [] # accumulation list for sublevel entries\n pending = None # holder for consecutive entries at exact indent level\n for line in text.splitlines():\n if line.startswith(initial):\n ...
[ "0.64213634", "0.6361781", "0.6326946", "0.5934598", "0.5909397", "0.58976054", "0.5836589", "0.5784594", "0.57603955", "0.5724058", "0.5709791", "0.5688288", "0.56765765", "0.5670549", "0.5666758", "0.5661027", "0.56540006", "0.5612286", "0.5568545", "0.5535113", "0.54417205...
0.6531704
0
Parse attributes buffer into a list of (type, data) tuples.
def parse_attrs(buf): attrs = [] while buf: t = ord(buf[0]) l = ord(buf[1]) if l < 2: break d, buf = buf[2:l], buf[l:] attrs.append((t, d)) return attrs
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _read_attributes(root):\n output_list = []\n for _, value in enumerate(root[0][2]):\n attr = Attribute(value)\n output_list.append(attr)\n return output_list", "def _parse_attr(self, attr_proto):\n attrs = {}\n for a in attr_proto:\n for f i...
[ "0.6657035", "0.6440315", "0.64095205", "0.61371845", "0.6111216", "0.6109647", "0.60146755", "0.59958047", "0.59727055", "0.5928471", "0.590856", "0.5885479", "0.5834907", "0.5802745", "0.57771", "0.57714987", "0.5754614", "0.57352376", "0.57304335", "0.5678931", "0.5669214"...
0.7819394
0
Returns the current userdefined configuration from the database
def get_user_config(): config = models.Config.query.get(0) if config is None: config = models.Config() config.id = 0 config.save() return config
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def user_config(self):\n\n return self.__user_config", "def get_config():\n CONFIG.clear() #clear config\n sql=\"SELECT * FROM config\"\n conn=sqlite3.connect(CONNECTION_STRING)\n c=conn.cursor()\n c.execute(sql)\n results=c.fetchall()\n # iterate through the results now...\n for r...
[ "0.7134669", "0.69565564", "0.69028026", "0.6877286", "0.6810725", "0.6754715", "0.6690209", "0.6661265", "0.66424286", "0.6558801", "0.6545969", "0.65415466", "0.653074", "0.65302026", "0.649621", "0.64914185", "0.64679104", "0.64291793", "0.6418399", "0.64072263", "0.639988...
0.73315537
0
Get an i18ned message from the appropriate json file for the given key.
def get_json_message(message_key): file_path = (os.getcwd() + '/ufo/static/locales/' + flask.session['language_prefix'] + '/messages.json') try: with open(file_path) as json_file: messages = json.load(json_file) return messages[message_key] except: return message_key
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_localized_string(key):\n return _localized_strings[key]", "def get(self, key, domain=None, language=None, context=None):\n\n if domain is None:\n if self.default_domain is None:\n raise ValueError('No domain given!')\n domain = self.default_domain\n m...
[ "0.67976195", "0.6331842", "0.6149216", "0.61009747", "0.598111", "0.5842774", "0.5832391", "0.5799556", "0.5783316", "0.5783316", "0.56813073", "0.56516814", "0.56434065", "0.5634109", "0.56184775", "0.56084794", "0.5544183", "0.5531985", "0.5520745", "0.55069876", "0.545115...
0.8176998
0
Make the resources for the oauth configuration component.
def make_oauth_configration_resources_dict(): config = get_user_config() return { 'config': config.to_dict(), 'oauth_url': oauth.getOauthFlow().step1_get_authorize_url(), }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rest_api_config(self):\n with self.resource_lock:\n pass", "def _get_resources():\n return {\n 'searchPageUrl': flask.url_for('search_page'),\n 'searchJsonUrl': flask.url_for('search'),\n 'userAddIconUrl': flask.url_for('static', filename='img/add-users.svg'),\n 'logoutUrl': fl...
[ "0.5988237", "0.59526646", "0.5944135", "0.58898485", "0.58617234", "0.57969236", "0.5760492", "0.5743792", "0.57230693", "0.5703035", "0.5666833", "0.56545556", "0.56007504", "0.5600133", "0.5570918", "0.55624896", "0.5508373", "0.5478721", "0.5472452", "0.54713786", "0.5470...
0.7443166
0
Determine the language prefix using the language header.
def determine_language_prefix(): # TODO(eholder): Figure out a more appropriate way to map the header into # our set of prefixes. Since I don't know what those prefixes are yet, this # is intentionally very generic. I also need to decide if this should just be # done once as part of the login flow rather than c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_full_language(self, language):\n if language:\n language = pycountry.languages.get(alpha_2=language)\n if language:\n language = language.name\n return language.title()", "def language_name(value):\n return pycountry.languages.get(alpha_2=valu...
[ "0.6323368", "0.6228192", "0.6204164", "0.61662155", "0.61253226", "0.61233664", "0.6115906", "0.6019953", "0.60078716", "0.59624434", "0.58665967", "0.58177227", "0.57713544", "0.57614154", "0.5757509", "0.57491803", "0.5739453", "0.57347256", "0.5728561", "0.5721372", "0.57...
0.7839627
0
API Wrapper object which returns stats for a specific hero
def get_heroes_stats(tag, hero, platform="pc", region="eu", mode="quickplay"): try: context = ssl._create_unverified_context() hero_stats = json.load( const.codec( urlopen(const.URL + platform + "/" + region + "/" + tag + "/" + mode + "/hero/" + hero + "/", context=contex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_hero(self, uuid, hero):\n\n # I can't wait for case statements in python (3.10)\n if hero == Heroes.BULK:\n return Bulk(self.api_key, uuid)\n\n elif hero == Heroes.GENERAL_CLUCK:\n return GeneralCluck(self.api_key, uuid)\n\n elif hero == Heroes.CAKE_MONSTER...
[ "0.7338335", "0.62998796", "0.60463583", "0.5997762", "0.58266133", "0.58230054", "0.5822899", "0.5805955", "0.57567394", "0.5685973", "0.56220925", "0.55938345", "0.55732405", "0.55701035", "0.5545963", "0.5535635", "0.55352396", "0.5437361", "0.54010344", "0.53940934", "0.5...
0.72986597
1
A view to return the delivery and returns page
def delivery(request): return render(request, 'contact/delivery.html')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def view_delivery() -> str:\r\n #List with amount of bottles ready for delivery for each lsit\r\n delivery_amounts = []\r\n delivery_amounts.append(delivery_information[\"Organic Red Helles\"])\r\n delivery_amounts.append(delivery_information[\"Organic Pilsner\"])\r\n delivery_amounts.append(deliver...
[ "0.7374881", "0.6889909", "0.64783055", "0.6372336", "0.6370384", "0.6247339", "0.61653876", "0.6148517", "0.6122049", "0.6092658", "0.6068964", "0.6024294", "0.5941775", "0.58365667", "0.58189636", "0.5810076", "0.5810076", "0.5810076", "0.5810076", "0.5810076", "0.5793738",...
0.7642086
0
InvalidSegmentError should be thrown when the segment begin is greater than the segment end.
def test_validate_begin_greater_than_end(): with pytest.raises(InvalidSegmentError): _validate([[1, 2], [5, 3]])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_validate_begin_equals_end():\n with pytest.raises(InvalidSegmentError):\n _validate([[1, 2], [5, 5]])", "def parse_and_validate_num_segs(segment_str):\n # try to parse numSegments\n num_segments = 0\n try:\n num_segments = int(segment_str)\n divs = math.log(num_segments,...
[ "0.63354397", "0.56412023", "0.563701", "0.53736293", "0.5295461", "0.52742565", "0.5265137", "0.52392036", "0.5191654", "0.5060422", "0.5045406", "0.5031676", "0.49795532", "0.49658692", "0.49567848", "0.49503455", "0.4898707", "0.4897851", "0.489405", "0.48883966", "0.48655...
0.68655276
0
InvalidSegmentError should be thrown when the segment begin equals teh segment end.
def test_validate_begin_equals_end(): with pytest.raises(InvalidSegmentError): _validate([[1, 2], [5, 5]])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_validate_begin_greater_than_end():\n with pytest.raises(InvalidSegmentError):\n _validate([[1, 2], [5, 3]])", "def _invalid_section_error(self, section_name):\n msg = \"'{}' is not a subsection for the '{}' section.\".format(section_name, self._SECTION_NAME)\n raise ValueError(ms...
[ "0.6800116", "0.56447387", "0.5554494", "0.5524308", "0.55040294", "0.54933834", "0.5323259", "0.5266226", "0.52067447", "0.51706624", "0.51565564", "0.51420945", "0.5136046", "0.50560105", "0.50518936", "0.5045964", "0.50384283", "0.50205344", "0.49898636", "0.49722755", "0....
0.7078179
0
Returns a Boolean value indicating whether this skill can be used to handle the given command.
def matches_command(self, skill_input: SkillInput) -> bool: verb = (skill_input.verb or None) and skill_input.verb.lower() return verb in self._cmd_list
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def responds_to(self, command) -> bool:\n return command == self.command and self.active is True and self.command is not None", "def is_enabled(command):\n if command not in Controller.commands:\n return False\n return Controller.commands[command][2]", "def command_registered(se...
[ "0.74278367", "0.68981487", "0.66977847", "0.66707885", "0.6667942", "0.66316724", "0.6607451", "0.653622", "0.6535393", "0.6522671", "0.6496499", "0.6466457", "0.6396782", "0.63804924", "0.6377974", "0.63763314", "0.63124734", "0.63028836", "0.62900245", "0.62845373", "0.626...
0.73454964
1
Test to verify view profile button Uses TestStatus class to mark/assert test case results
def test_TC_Users_200819_3(self): self.log.info("*#" * 20) self.log.info("test_TC_Users_200819_3 started") self.log.info("*#" * 20) self.us.gotoUsers() self.us.clickViewProfile() result = self.us.verifyViewProfile() self.ts.markFinal("test_TC_Users_200819_3", resu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_view_status(self):\n self.add_testuser()\n response = self.client.get(\"/profile/testuser/edit\")\n self.assertTrue(response.status_code == 301)", "def test_view_profile(self):\n LOGGER.debug(\"Test GET /rango/view/leothelion/ for anon user\")\n anon_view_response = se...
[ "0.76108277", "0.71860087", "0.71120733", "0.6946868", "0.6848691", "0.6758389", "0.67111415", "0.66714704", "0.6667742", "0.6665116", "0.65942097", "0.65556455", "0.6552819", "0.6529676", "0.6528348", "0.6513482", "0.64930034", "0.64195246", "0.6392366", "0.6319257", "0.6274...
0.74449015
1
Test for Teams working table open/close Uses TestStatus class to mark/assert test case results
def test_TC_Users_UserProfile_200819_2(self): self.log.info("*#" * 20) self.log.info("test_TC_Users_UserProfile_200819_2 started") self.log.info("*#" * 20) self.us.gotoUsers() self.us.clickViewProfile() self.us.clickTeam() result = self.us.verifyTeamOpenClose() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test(self):\n\t\tx = Team.objects.get(short_name='SF')\n\t\tself.assertEqual(x.nick_name, '49ers')\n\n\t\tx = Game.objects.get(week_number=1,game_number=1)\n\t\tx.fav_score = 21\n\t\tx.udog_score = 14\n\t\tx.spread = 5\n\t\tself.assertEqual(x.favWins(), True)\n\t\tx.spread = 10\n\t\tself.assertEqual(x.favWins(...
[ "0.67550015", "0.6104613", "0.6035139", "0.5994046", "0.59128124", "0.5830796", "0.57443374", "0.5734942", "0.5732594", "0.57252914", "0.56904143", "0.56856155", "0.55997735", "0.55997735", "0.5592335", "0.5516779", "0.55117416", "0.55117416", "0.55117416", "0.5494369", "0.54...
0.65149
1
Test for team user details page Uses TestStatus class to mark/assert test case results
def test_TC_Users_UserProfile_200819_4(self): self.log.info("*#" * 20) self.log.info("test_TC_Users_UserProfile_200819_4 started") self.log.info("*#" * 20) self.us.gotoUsers() self.us.clickViewProfile() self.us.clickTeam() self.us.clickDetails() result = s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_TC_Users_UserProfile_200819_2(self):\n self.log.info(\"*#\" * 20)\n self.log.info(\"test_TC_Users_UserProfile_200819_2 started\")\n self.log.info(\"*#\" * 20)\n self.us.gotoUsers()\n self.us.clickViewProfile()\n self.us.clickTeam()\n result = self.us.verify...
[ "0.7014695", "0.7011689", "0.68079954", "0.67049444", "0.6703819", "0.6601137", "0.6601137", "0.6568405", "0.6561567", "0.64933634", "0.6491702", "0.64130616", "0.63558125", "0.63490254", "0.63477075", "0.6313082", "0.63112307", "0.6299645", "0.6294707", "0.62679505", "0.6266...
0.70787454
0
Build a list a list of files (and directories) by iterating recursively over the given path
def build_file_list(path): dirs = [] files = [] for x in path.iterdir(): try: if x.is_symlink(): continue elif x.is_dir(): dirs.append(x) new_dirs, new_files = build_file_list(x) dirs.extend(new_dirs) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_files(path: str) -> List[str]:\n if not isdir(path):\n return [path] # its expected to return a list each time even if its a single element\n return [file for fileOrDir in listdir(path) for file in get_files(path + '/' + fileOrDir)]\n # return list of each file returned by the recursive ca...
[ "0.7776247", "0.7598177", "0.759159", "0.75369984", "0.74048036", "0.73601836", "0.7359687", "0.7189919", "0.7168541", "0.71555066", "0.71307224", "0.71246266", "0.7100239", "0.7060658", "0.70578027", "0.70476854", "0.7047233", "0.7002175", "0.6991864", "0.6990601", "0.698908...
0.80638224
0
Implementing switch to buy functionality
def switch_to_buy(self): self.switch_to_window() self.accept_ssl_certificate()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def trade_action(self, BUY_QTY):\n BUY_QTY = 4500\n self.trade(BUY_QTY)\n #self.show()", "def buy(self, price, volume):\r\n self.order(\"bid\", price, volume)", "def purchase(self, item_type):", "def doBuyIn(self):\n self.protocol.sendPacket(networkpackets.PacketPokerBuyIn(...
[ "0.6752437", "0.66564465", "0.65131027", "0.64828473", "0.6459072", "0.641257", "0.6370881", "0.6362402", "0.6345347", "0.6336424", "0.6329178", "0.6314387", "0.6267283", "0.62372434", "0.62257135", "0.6205884", "0.6183206", "0.6168485", "0.616273", "0.61568713", "0.61563355"...
0.69311965
0
Implementing get buy page title functionality
def get_buy_page_title(self): self.wait().until(EC.visibility_of_element_located(self.default_tab_header_locator), 'default tab header not found before specified time') return self.page_title()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_title():", "def title(self):\n\t\treturn self.page_title", "def get_page_title(self):\n return self.driver.get_title()", "def page_title(self) -> str:\n return self.driver.title", "def get_title(self) -> str:\n pass", "def get_title(self):\n return self.title", "def ...
[ "0.79133", "0.73078203", "0.72166765", "0.7001976", "0.68980056", "0.6864043", "0.6864043", "0.6864043", "0.68636906", "0.6856293", "0.68401515", "0.6837087", "0.6764774", "0.6742004", "0.6720232", "0.6714058", "0.6688795", "0.66885704", "0.66017157", "0.66013813", "0.6588677...
0.7839547
1
Implementing is buy dashboard tab present functionality
def is_buy_dashboard_tab_present(self): return self.is_element_present(self.buy_dashboard_tab_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def select_buy_dashboard_tab(self):\n self.select_static_tab(self.buy_dashboard_tab_locator, True)", "def click_buy_and_sell_deal_management_link(self):\n self.select_static_tab(self.buy_and_sell_deal_management_locator, message=\"buy and sell deal management locator not found before specified time...
[ "0.7400998", "0.64810336", "0.6269928", "0.5840348", "0.57089645", "0.5598408", "0.5598408", "0.5590817", "0.5487762", "0.54867595", "0.5449592", "0.54234475", "0.54188967", "0.5388239", "0.5358356", "0.5314111", "0.5313204", "0.52993983", "0.5289306", "0.5271922", "0.5267888...
0.72802335
1
Implementing is vendors tab present functionality
def is_vendors_tab_present(self): return self.is_element_present(self.vendors_tab_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def select_vendors_tab(self):\n self.select_static_tab(self.vendors_tab_locator, 'vendors tab not found before specified time')", "def is_specific_tab_on_vendor_profile_page_present(self, tab_name):\n tab_locator = (By.XPATH, \"//div[contains(@id, 'SourceProfileTabStrip')]/descendant::a[text()='%s'...
[ "0.6874013", "0.6272529", "0.5996868", "0.5992929", "0.5748996", "0.5721711", "0.5721711", "0.55816156", "0.5517531", "0.5510303", "0.54955125", "0.54571176", "0.54381496", "0.5422301", "0.53921604", "0.53632975", "0.5273257", "0.5265792", "0.52589095", "0.52563494", "0.52551...
0.72662383
0
Implementing is country groups link present functionality
def is_country_groups_link_present(self): return self.is_element_present(self.country_groups_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def click_country_group(self):\n self.click_element(self.country_groups_locator, script_executor=True)", "def test_groups_get(self):\n pass", "def test_groups_get(self):\n pass", "def test_groups_group_ref_get(self):\n pass", "def groups_en(request, group_id = 1):\n group = g...
[ "0.6317962", "0.51911926", "0.51911926", "0.5140529", "0.50892735", "0.50562495", "0.50562495", "0.50487584", "0.502029", "0.49977654", "0.49895462", "0.49316293", "0.49196282", "0.49052003", "0.49025372", "0.48940086", "0.48776388", "0.48742306", "0.48725045", "0.48550633", ...
0.7332791
0
Implementing is reanalysis link present functionality
def is_re_analysis_link_present(self): return self.is_element_present(self.re_analysis_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def click_re_analysis_link(self):\n self.click_element(self.re_analysis_locator, True)", "def relink(self, link_id):", "def getLink(self):", "def link_residues(self) -> None:\n ...", "def add_link():\n return True", "def relink():\n _intro()\n from . import crosslink as cr\n\n c...
[ "0.6751954", "0.652153", "0.6032356", "0.5974886", "0.5958178", "0.5620203", "0.5609497", "0.55967116", "0.5590024", "0.5581713", "0.55592877", "0.55592877", "0.55334836", "0.55301785", "0.5505264", "0.542408", "0.54043347", "0.53962654", "0.5396158", "0.5350795", "0.5345842"...
0.67769605
0
Implementing select vendors tab functionality
def select_vendors_tab(self): self.select_static_tab(self.vendors_tab_locator, 'vendors tab not found before specified time')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_vendor(self, vendor_list):\n self.multiple_items_selection_from_kendo_dropdown(self.vendor_dropdown_locator, vendor_list)\n self.wait_for_ajax_spinner_load()", "def tabSelected(self):", "def tabSelected(self):", "def select_buy_dashboard_tab(self):\n self.select_static_tab(self.b...
[ "0.6188047", "0.6105495", "0.6105495", "0.5952342", "0.59404254", "0.59331214", "0.59069777", "0.5803761", "0.56433725", "0.56020993", "0.5578502", "0.55331236", "0.55300546", "0.5517784", "0.5484401", "0.5458557", "0.545534", "0.54479146", "0.54111296", "0.5366512", "0.53527...
0.73975277
0
Implementing is create vendor present functionality
def is_create_vendor_present(self): return self.is_element_present(self.create_vendor_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def onVendorCreated(self):\n\n try:\n count = len(self.actionVendor.tag._polyline._vertices)\n if count > 2:\n points = []\n for point in self.actionVendor.tag._polyline._vertices:\n points.append(QPoint(round(point[0]), round(point[1]))...
[ "0.655659", "0.6182998", "0.61777186", "0.6160204", "0.61143076", "0.6047475", "0.59969324", "0.5987495", "0.59184116", "0.5901415", "0.5901415", "0.5879579", "0.5879579", "0.5879579", "0.5856006", "0.58531314", "0.57469994", "0.57304674", "0.57168674", "0.56997466", "0.56791...
0.6788756
0
Implementing is vendor price lists present functionality
def is_vendor_price_lists_present(self): return self.is_element_present(self.vendor_price_lists_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_vendor_price_lists_details(self):\n try:\n self.vendor_price_lists_dict = self.get_grid_row_details(self.customer_price_list_grid_div_id, self.vendor_price_lists_dict)\n return True\n except:\n return False", "def verify_vendor_price_lists_details(self, row_...
[ "0.7492419", "0.63614565", "0.62272936", "0.619145", "0.6164832", "0.614131", "0.5918902", "0.58867675", "0.58189636", "0.58065224", "0.5774671", "0.5773653", "0.5753038", "0.57513326", "0.5735464", "0.5723339", "0.5710892", "0.5680941", "0.5598808", "0.55697834", "0.5557698"...
0.6822345
1
Implementing click buy page inline action button functionality
def click_buy_page_inline_action_button(self, vendor): self.click_inline_action_button(self.vendors_div_id, vendor, self.grid_column_number)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def click_buy_and_sell_deal_management_grid_first_row_inline_action_button(self):\n self.click_inline_action_button(self.buy_and_sell_management_grid_div_id, None, self.buy_and_sell_management_grid_inline_action_column_number, True)", "def click_buy_and_sell_deal_bulk_edit_button(self):\n self.clic...
[ "0.65620035", "0.63311285", "0.63300854", "0.6286846", "0.62395346", "0.6238853", "0.6130139", "0.60976636", "0.6089991", "0.60558015", "0.60558015", "0.60558015", "0.60558015", "0.6051222", "0.5989819", "0.5983532", "0.59315854", "0.58962005", "0.5894016", "0.5894016", "0.58...
0.7795137
0
Implementing is vendor profile present functionality
def is_vendor_profile_present(self): return self.is_element_present(self.vendor_profile_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_vendor_profile_page_loaded_properly(self):\n return self.is_element_present(self.save_vendor_profile_locator)", "def is_vendor(self) -> bool:\n return self._is_vendor", "def is_specific_tab_on_vendor_profile_page_present(self, tab_name):\n tab_locator = (By.XPATH, \"//div[contains(@...
[ "0.6353229", "0.6263275", "0.60498637", "0.58901536", "0.5854708", "0.5785455", "0.5775481", "0.56977445", "0.560553", "0.5575215", "0.5489019", "0.548175", "0.54198354", "0.54048556", "0.54040384", "0.53983", "0.5386571", "0.5337491", "0.5300845", "0.5284285", "0.5280889", ...
0.71709037
0
Implementing is vendor digits present functionality
def is_vendor_digits_present(self): return self.is_element_present(self.vendor_digits_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def vendor_list():\n return ['nxos', 'eos', 'cumulus']", "def get_vendor(mac):\r\n return p.get_manuf(mac) or 'None'", "def get_vendor(self, result, host, mac):\n if \"vendor\" in result['scan'][host] and mac in result['scan'][host]['vendor']:\n return result['scan'][host]['vendor'][mac...
[ "0.6032878", "0.5946633", "0.57252645", "0.5716937", "0.5711166", "0.56264675", "0.5623872", "0.5562387", "0.5555216", "0.55518043", "0.5550491", "0.55362904", "0.5514499", "0.54909575", "0.5461236", "0.5437278", "0.54319304", "0.53986394", "0.53688043", "0.5318572", "0.53183...
0.68530744
0
Implementing is vendor destination present functionality
def is_vendor_destination_present(self): return self.is_element_present(self.vendor_destination_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_vendor(self) -> bool:\n return self._is_vendor", "def is_create_vendor_present(self):\n return self.is_element_present(self.create_vendor_locator)", "def is_country_column_present_in_vendor_profile_destinations_page(self):\n return self.is_specific_column_present(self.destinations_g...
[ "0.60589635", "0.55775374", "0.5568114", "0.5536477", "0.5501193", "0.5362999", "0.5362337", "0.53581727", "0.5344341", "0.5316964", "0.52319616", "0.5189973", "0.5180029", "0.516376", "0.5160059", "0.5142233", "0.50607926", "0.50488794", "0.50478595", "0.5024202", "0.5019415...
0.74863005
0
Implementing is upload vendor price list present functionality
def is_upload_vendor_price_list_present(self): return self.is_element_present(self.upload_vendor_price_list_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def upload_products_view(request):\n curr_vendor = get_object_or_404(Vendor, user=request.user)\n if request.method == 'POST':\n form = UploadFileForm(request.POST, request.FILES)\n if form.is_valid():\n folderpath = settings.UPLOAD_DIR + \"vendor/\"\n filepath = save_file(r...
[ "0.6263099", "0.6141632", "0.6066002", "0.5928832", "0.5877911", "0.5603189", "0.55999833", "0.5502769", "0.5484664", "0.5477019", "0.5378392", "0.5263404", "0.5179111", "0.5104403", "0.5092336", "0.5042064", "0.5026895", "0.5016881", "0.5006495", "0.49896625", "0.4987563", ...
0.67144847
0
Implementing is inline action popup loaded properly functionality
def is_inline_action_popup_loaded_properly(self): return self.is_element_present(self.vendor_profile_inline_item_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def verify_popup(self, type):", "def onShowed(self):\n self.parent.actionTagTwo=\"\"\n pass", "def populating_popup(self, *args):\n return _ida_hexrays.Hexrays_Hooks_populating_popup(self, *args)", "def show_popup(self, view, docstring, location=None):", "def on_actions_list(self, e):\...
[ "0.6597915", "0.648272", "0.6258592", "0.6248072", "0.5986996", "0.59293145", "0.5862947", "0.5807013", "0.56972724", "0.55615556", "0.5549271", "0.5549271", "0.5548313", "0.55236566", "0.5493427", "0.54465926", "0.5439738", "0.5421852", "0.54136634", "0.5403886", "0.53963846...
0.71407616
0
Implementing click on tab of vendor profile page functionality
def click_on_tab_of_vendor_profile_page(self, tab_name): vendor_profile_page_tab_locator = (By.XPATH, self.vendor_profile_page_tab_locator_string + "[text()='%s']" % tab_name) self.select_static_tab(vendor_profile_page_tab_locator, 'tab locator not found')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def clickViewProfile(self):\n self.waitForElement(locator=self._viewProfileBtn, locatorType=\"xpath\")\n element = self.getElementList(locator=self._viewProfileBtn, locatorType=\"xpath\")\n self.elementClick(element=element[0])", "def tabSelected(self):", "def tabSelected(self):", "def c...
[ "0.6522478", "0.64506716", "0.64506716", "0.6187155", "0.6104637", "0.608604", "0.6002209", "0.59290266", "0.5869084", "0.5767032", "0.5752777", "0.5728779", "0.5690089", "0.56537795", "0.5647347", "0.5619931", "0.5612905", "0.5586425", "0.5546058", "0.5527586", "0.55254775",...
0.7509712
0
Implementing is vendor profile page loaded properly functionality
def is_vendor_profile_page_loaded_properly(self): return self.is_element_present(self.save_vendor_profile_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_vendor_profile_present(self):\n return self.is_element_present(self.vendor_profile_locator)", "def is_specific_tab_on_vendor_profile_page_present(self, tab_name):\n tab_locator = (By.XPATH, \"//div[contains(@id, 'SourceProfileTabStrip')]/descendant::a[text()='%s']\" % tab_name)\n retu...
[ "0.66580355", "0.6311346", "0.5826427", "0.56982046", "0.55703735", "0.5551309", "0.55296487", "0.5511999", "0.5439052", "0.54025126", "0.54020023", "0.5387055", "0.5378316", "0.5353664", "0.53376067", "0.53376067", "0.52425605", "0.5241384", "0.52211964", "0.5217143", "0.519...
0.74304616
0
Implementing is rates page loaded properly functionality
def is_rates_page_loaded_properly(self): return self.is_element_present(self.rate_catalog_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_rates_tab_loaded_properly(self):\n return self.is_element_present(self.search_rates_locator)", "def acquire_rates_data(self):\n prinf('%s params: %s', self.base_url, self.my_params)\n g_start()\n try:\n self.response_data = requests.get(self.base_url, params=self.my_...
[ "0.6668916", "0.6402403", "0.594141", "0.5868841", "0.5804853", "0.57478184", "0.5625256", "0.5612651", "0.54204524", "0.539927", "0.53936803", "0.53860724", "0.5364493", "0.53571963", "0.5312584", "0.5246278", "0.5223548", "0.52033126", "0.5198016", "0.51972485", "0.51922804...
0.7343132
0
Implementing is dial digits page loaded properly functionality
def is_dial_digits_page_loaded_properly(self): return self.is_element_present(self.dialed_digits_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_dial_digits_tab_loaded_properly(self):\n return self.is_element_present(self.search_dial_digits_locator)", "def phone_start(self) -> None:", "def select_dial_digits_tab(self):\n self.click_element(self.dial_digits_tab_locator, True, True)", "def is_incall_dialing(self) -> bool:", "def ...
[ "0.6351673", "0.6051149", "0.58823335", "0.58278865", "0.5729101", "0.569002", "0.53910416", "0.5289853", "0.51889604", "0.5184374", "0.51738495", "0.51713043", "0.516416", "0.5133655", "0.50922155", "0.50697666", "0.5032302", "0.49997136", "0.49176535", "0.4916321", "0.48991...
0.7028279
0
Implementing is destinations page loaded properly functionality
def is_destinations_page_loaded_properly(self): return self.is_element_present(self.search_destination_locator)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_link_registered(self):\n response = self.client.get(reverse('misago:admin:users:accounts:index'))\n\n response = self.client.get(response['location'])\n self.assertContains(response, reverse('misago:admin:users:bans:index'))", "def is_served_area(self, location):\n\t\tis_served = Fa...
[ "0.56053495", "0.55677485", "0.55168056", "0.547717", "0.5470642", "0.54690707", "0.54483056", "0.5434261", "0.53937316", "0.5334329", "0.5315497", "0.52834636", "0.52634895", "0.5261351", "0.5257627", "0.5223185", "0.5205327", "0.5196006", "0.5182019", "0.51654166", "0.51574...
0.73504025
0
Implementing click on vendor price lists functionality
def click_on_vendor_price_lists(self): vendor_price_lists_element = self.wait().until(EC.element_to_be_clickable(self.vendor_price_lists_locator), 'vendor price lists locator not found before specified time') self.script_executor_click(vendor_price_lists_element) self.wait_for_ajax_spinner_load(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def click_buy_page_inline_action_button(self, vendor):\n self.click_inline_action_button(self.vendors_div_id, vendor, self.grid_column_number)", "def click_vendor_price_lists_search_button(self):\n search_button_element = self.wait().until(EC.element_to_be_clickable(self.search_button_locator), 'se...
[ "0.66060024", "0.6558755", "0.62382877", "0.61915034", "0.6082665", "0.6070102", "0.6055624", "0.59267545", "0.5718903", "0.5711302", "0.5507519", "0.5475869", "0.5474474", "0.54237473", "0.5406867", "0.5405167", "0.53965765", "0.53871065", "0.53813577", "0.53805524", "0.5328...
0.74880445
0
Implementing set to date functionality
def set_to_date(self): self.set_value_into_input_field(self.set_to_date_locator, self.get_current_date())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setDate(self, p_int, p_int_1, p_int_2): # real signature unknown; restored from __doc__\r\n return False", "def set_date(self, date):\n self.date = date", "def date(self, value):\n self.date_value = value", "def _date(self, _date):\n\n self.__date = _date", "def _date(self, ...
[ "0.7597517", "0.7108432", "0.70938134", "0.7081148", "0.7081148", "0.7057913", "0.7012738", "0.6949188", "0.6927733", "0.6875525", "0.6873057", "0.6810564", "0.67987144", "0.6746936", "0.6733423", "0.67172575", "0.6710233", "0.6599115", "0.6569132", "0.6557032", "0.6553031", ...
0.76180005
0
Implementing click vendor price lists search button functionality
def click_vendor_price_lists_search_button(self): search_button_element = self.wait().until(EC.element_to_be_clickable(self.search_button_locator), 'search button not found before specified time') self.script_executor_click(search_button_element) self.wait_for_ajax_spinner_load(300)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def click_on_vendor_price_list_upload_search_button(self):\n vendor_price_list_upload_search_button_element = self.wait().until(EC.element_to_be_clickable(self.vendor_price_list_upload_search_button_locator), 'vendor price list upload search button locator not found before specified time')\n vendor_p...
[ "0.67439646", "0.66573006", "0.6485732", "0.634402", "0.6308638", "0.6296258", "0.61310154", "0.6101929", "0.60976154", "0.6091547", "0.60725826", "0.5917563", "0.58863914", "0.58090204", "0.57779515", "0.57762134", "0.57505846", "0.57471293", "0.5746761", "0.57103413", "0.57...
0.79111916
0
Implementing verify price list item functionality
def verify_price_list_item(self, price_list_item): self.single_selection_from_kendo_dropdown(self.price_list_kendo_dropdown_locator, price_list_item)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_LinkedPriceCheck(self):\n # Basic price check\n self.log.info(\"Price checking Linked Item 1 via PLU\")\n pos.click(\"Price Check\")\n pos.enter_keypad(\"014\", after=\"enter\")\n \n # Confirm the right item, at the right price\n self.read_price_check(\"Lin...
[ "0.69587696", "0.69523215", "0.6614124", "0.65662354", "0.6559915", "0.65482956", "0.63033843", "0.6295743", "0.61983514", "0.61921096", "0.6160937", "0.6149853", "0.6114186", "0.58709925", "0.57739615", "0.5763249", "0.57321095", "0.5725347", "0.57172257", "0.57046336", "0.5...
0.7701968
0
Implementing click view price list detail page inline action button functionality
def click_view_price_list_detail_page_inline_action_button(self, price_list_item): self.click_inline_action_button(self.view_price_list_div_id, price_list_item, self.view_price_list_column_number) self.wait_for_ajax_spinner_load()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def click_view_price_list_detail_first_row_inline_action_button(self):\n self.click_inline_action_button(self.view_price_list_div_id, None, self.view_price_list_column_number, True)\n self.wait_for_ajax_spinner_load()", "def click_vendor_price_list_grid_first_row_inline_action_button(self):\n ...
[ "0.7218018", "0.6463628", "0.6188844", "0.6057789", "0.58169675", "0.57019943", "0.56886107", "0.5678829", "0.55927885", "0.55755067", "0.55638826", "0.5536148", "0.5473998", "0.5421182", "0.5421182", "0.5421182", "0.5421182", "0.5415894", "0.5382531", "0.5321642", "0.5321642...
0.79761547
0
Implementing click create vendor button functionality
def click_create_vendor_button(self): create_vendor_element = self.wait().until(EC.element_to_be_clickable(self.create_vendor_locator), "create vendor locator not found before specified time out") create_vendor_element.click() self.wait_for_ajax_spinner_load()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def click_buy_and_sell_deal_create_button(self):\n self.click_element(self.save_vendor_profile_locator)", "def test_create_custom_button(self):\n pass", "def goto_create(self):\n\n self.create.click()", "def generate_buttons(self):\n raise Exception('Implement me!')", "def creat...
[ "0.71414775", "0.6954892", "0.6602717", "0.64814246", "0.6473455", "0.628929", "0.6244608", "0.6196933", "0.61187863", "0.60596347", "0.6059178", "0.5956047", "0.59116757", "0.5863656", "0.5848215", "0.5848059", "0.58261234", "0.5824615", "0.58196187", "0.58189887", "0.579978...
0.7178269
0