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
returns the topological height at (x, y)
def getHeight(self, x, y): if x > self.maxX or y > self.maxY or x < 0 or y < 0: return 10000000 # effectively infinity return self.data[y][x][0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def height(self):\n return self.i_node.distance(self.n_node)", "def _height1(self): #works but n^2 time\n return max(self.depth(p) for p in self.positions() if self.is_leaf(p))", "def height(self):\n return self.upper_right.y - self.lower_left.y", "def _height1(self): # w...
[ "0.6800607", "0.65334195", "0.65241534", "0.6479777", "0.6462834", "0.63903254", "0.6358888", "0.6354578", "0.6334228", "0.63333184", "0.62644345", "0.6259376", "0.62438977", "0.62394667", "0.6223324", "0.6222117", "0.62176883", "0.6216847", "0.62075406", "0.6189507", "0.6180...
0.7280083
0
returns the level of water at the point (x, y)
def getWater(self, x, y): if x > self.maxX or y > self.maxY or x < 0 or y < 0: raise Exception("accessed an invalid position in method getWater") return self.data[y][x][1]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_water_level(self):\n return self.water_level", "def get_current_water_level(self):\n \n url = f'http://waterservices.usgs.gov/nwis/iv/?format=json&sites={self.site_number}&parameterCd=00060,00065&siteStatus=all'\n\n response = requests.request(\"GET\", url)\n data = jso...
[ "0.7158327", "0.67313606", "0.661933", "0.65803623", "0.65341234", "0.63737684", "0.59729874", "0.5847632", "0.58334917", "0.5827491", "0.58220893", "0.58033043", "0.57986677", "0.5751506", "0.56921387", "0.56882936", "0.5679975", "0.5662248", "0.56592685", "0.56507444", "0.5...
0.74286795
0
Function to check if a number is very small.
def isSmall(number): return abs(number) < epsilon
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_small(a:int, b:int) -> bool:\n return a <= b", "def dangerouslySmall(c, e):\n return e < -limit and e < (-integerLog10(abs(c))) - 1", "def is_large(a:int, b:int) -> bool:\n return a>=b", "def has_small_digits(n,maxdigit):\n digits = [int(num) for num in str(n)]\n return all([num <= maxd...
[ "0.71358377", "0.70233357", "0.6894309", "0.64070696", "0.6313465", "0.623198", "0.62296844", "0.6060151", "0.605466", "0.6032642", "0.5905205", "0.58516663", "0.58045554", "0.571476", "0.5698064", "0.56735736", "0.5664453", "0.5655646", "0.5649527", "0.5642045", "0.5599978",...
0.81616944
0
Compute the crossProduct of the vectors p2 p1 and p3 p1.
def crossProduct(p1, p2, p3): return ( -(p1[1]*p2[0]) + p1[0]*p2[1] + p1[1]*p3[0] - p2[1]*p3[0] - p1[0]*p3[1] + p2[0]*p3[1] )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cross_product(p0,p1,p2):\n\treturn (((p1[0]-p0[0])*(p2[1]-p0[1]))-((p2[0]-p0[0])*(p1[1]-p0[1])))", "def cross_product(v1, v2):\n return cg3d_vector.CG3dVector(\n v1[1] * v2[2] - v2[1] * v1[2],\n v1[2] * v2[0] - v2[2] * v1[0],\n v1[0] * v2[1] - v2[0] * v1[1]\n )", "def crossProduc...
[ "0.7840646", "0.7627517", "0.7564835", "0.75022256", "0.7371499", "0.716658", "0.7165488", "0.71437544", "0.7071827", "0.69996214", "0.6967165", "0.69446385", "0.6910858", "0.6805146", "0.67996776", "0.67702717", "0.67530876", "0.6737045", "0.6727149", "0.6688273", "0.6610096...
0.92136556
0
Update employment history for given profile id.
def update_work_history(work_history_list, profile_id): saved_work_history_ids = set() for work_history in work_history_list: work_history_id = work_history.get("id") work_history_instance = None if work_history_id: try: work_history_instance = Employment.obje...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_profits(self, next_profit):\n self.profit = next_profit\n self.profit_history.append(next_profit)", "def update_profile(profile_id):\n \n profile = mongo.db.profiles\n profile.find_one_and_update({'_id': ObjectId(profile_id)},\n {'$set': {'date': d...
[ "0.5801277", "0.57033116", "0.55727786", "0.5357609", "0.5347083", "0.52954924", "0.529461", "0.5294242", "0.52700007", "0.5151352", "0.5092951", "0.5087638", "0.5076853", "0.5068695", "0.5017037", "0.50102806", "0.50093156", "0.5007281", "0.50012374", "0.5000325", "0.4986342...
0.6740493
0
Iterate through fields in serializer and set all to required except ignore_fields
def set_fields_to_required(serializer, ignore_fields=None): if ignore_fields is None: ignore_fields = [] for field in serializer.fields.values(): if field.field_name not in ignore_fields: field.required = True field.allow_null = False field.allow_blank = False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_required_fields(self) -> Iterable[fields.Field]:\n for model_field in self.get_fields():\n if model_field.required:\n yield model_field", "def clean_fields(self, instance, exclude=None):\n errors = {}\n exclude = exclude or []\n for name, f in self.pr...
[ "0.64765036", "0.6341806", "0.63284636", "0.6283481", "0.62026083", "0.6162853", "0.6133982", "0.6094568", "0.5909462", "0.5858007", "0.58525836", "0.58163685", "0.5798981", "0.5755898", "0.5753509", "0.5744149", "0.57343006", "0.5726579", "0.57135725", "0.57066965", "0.56978...
0.87516534
0
Returns an instance for a given Jenkins URL. The returned instance is usually a instance of a PlatformJenkins subclass (this allows to switch to a different Jenkins API.
def get_jenkins(cls, url, template_dir=None): return PlatformJenkinsJavaCLI(template_dir, url)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, baseurl, nodename, jenkins_obj):\n self.name = nodename\n self.jenkins = jenkins_obj\n JenkinsBase.__init__(self, baseurl)", "def fromurl(cls, url: str):\n return cls.parse_obj(requests.get(url).json())", "async def from_url(cls) -> \"AocPrivateLeaderboard\":\n ...
[ "0.5845707", "0.55609673", "0.52667314", "0.51818883", "0.5164338", "0.5137516", "0.5066826", "0.5053414", "0.5036196", "0.49901026", "0.49768355", "0.49687746", "0.4964062", "0.49446085", "0.49446085", "0.48970905", "0.48545104", "0.48198324", "0.48110753", "0.48049742", "0....
0.7511691
0
Returns true if a given view exists.
def view_exists(self, view): with open("/dev/null", "w") as devnull: call = subprocess.Popen(self.cli + [PlatformJenkinsJavaCLI.GET_VIEW, view], stdout=devnull, stderr=devnull) call.wait() return call.returncode == 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def exists_for_view(self, view_id):\n raise NotImplementedError(\"calling abstract method\")", "def has_debug_view(name=None):\r\n for view in sublime.active_window().views():\r\n if is_debug_view(view):\r\n if name is not None:\r\n if view.name() == name:\r\n ...
[ "0.8074527", "0.70116293", "0.68193936", "0.66889185", "0.660105", "0.6589236", "0.6287463", "0.6287463", "0.6283923", "0.6276442", "0.62659264", "0.6244167", "0.623865", "0.6238351", "0.6232471", "0.6214478", "0.61842877", "0.6141818", "0.61366314", "0.6128516", "0.612039", ...
0.76935965
1
Creates a View, defined by XML in view_xml_filename. If the file exists, it will be update using the provided definition.
def set_view(self, view, view_xml_filename): if self.view_exists(view): command = PlatformJenkinsJavaCLI.UPDATE_VIEW else: command = PlatformJenkinsJavaCLI.CREATE_VIEW with open(view_xml_filename) as view_xml_file: view_xml = view_xml_file.read() cal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_view(name, fields=''):\n if '/' in name:\n blueprint_name, model_name = name.split('/')\n output_file = 'blueprints/%s/views.py' % blueprint_name\n else:\n model_name = name\n output_file = 'views.py'\n file_exists = os.path.exists(output_file)\n form_data = []\n ...
[ "0.59218645", "0.5722048", "0.5537454", "0.5507403", "0.54620814", "0.54460394", "0.5323818", "0.53216887", "0.5261694", "0.52564645", "0.5204779", "0.5170237", "0.5099098", "0.5052455", "0.50478405", "0.50409013", "0.50351095", "0.50225526", "0.50119054", "0.49706888", "0.49...
0.74085957
0
Returns True if the given job exists.
def job_exists(self, job): with open(os.devnull, 'w') as devnull: result = subprocess.call(self.cli + [PlatformJenkinsJavaCLI.GET_JOB, job.name], stdout=devnull) return result == 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def job_exists(self, job_id):\n\n return True if self.get_status(job_id) else False", "def exists(cls, job_id: str, connection: Optional['Redis'] = None) -> bool:\n if not connection:\n connection = resolve_connection()\n job_key = cls.key_for(job_id)\n job_exists = connect...
[ "0.8646111", "0.80569893", "0.69944775", "0.6987492", "0.6604774", "0.654603", "0.6538874", "0.65194386", "0.6514213", "0.6511255", "0.64722615", "0.64207816", "0.6419019", "0.6390656", "0.63874865", "0.63817424", "0.6360946", "0.63050056", "0.63043344", "0.62540364", "0.6230...
0.85490435
1
Deletes a given job from Jenkins.
def delete_job(self, job): subprocess.call(self.cli + [PlatformJenkinsJavaCLI.DELETE_JOB, job.name])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_job(self, job, context=None):\n return self._client.call_method(\n 'UserAndJobState.delete_job',\n [job], self._service_ver, context)", "def delete(job_id):\n job = JobModel.get_one_job(job_id)\n if not job:\n return custom_response({'Error':'Job Not Found'}, ...
[ "0.7612383", "0.75631183", "0.75325656", "0.7520281", "0.74776965", "0.7339835", "0.73373073", "0.73164237", "0.7306595", "0.71888834", "0.70548284", "0.6966155", "0.69645363", "0.69290483", "0.6865273", "0.6846396", "0.682398", "0.6734061", "0.6658749", "0.6615366", "0.65832...
0.87232506
0
Triggers given job, providing a set of parameters to it.
def trigger_job(self, job, parameters=None): parameters = parameters or {} parameter_list = [] for key in parameters: parameter_list.append("-p") parameter_list.append("%s=%s" % (key, parameters[key])) if subprocess.call(self.cli + [PlatformJenkinsJavaCLI.BUILD_JO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def trigger(builder, revision, files=[], dry_run=False, extra_properties=None):\n repo_name = query_repo_name_from_buildername(builder)\n return buildapi.trigger_arbitrary_job(repo_name, builder, revision, files, dry_run,\n extra_properties)", "def trigger_labeling_...
[ "0.6365271", "0.6245668", "0.62099326", "0.61203486", "0.588978", "0.5762087", "0.5737363", "0.56618714", "0.5655177", "0.55685776", "0.5567557", "0.55617213", "0.5506177", "0.5457874", "0.5420332", "0.5409931", "0.53858936", "0.5350611", "0.53456885", "0.5329666", "0.5314936...
0.7157829
0
Enables given job on Jenkins.
def enable_job(self, job): if subprocess.call(self.cli + [PlatformJenkinsJavaCLI.ENABLE_JOB, job.name]) != 0: raise PlatformJenkinsException("Enabling job failed: " + job.name)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def EnableJob(self, job_urn, token=None):\n cron_job = aff4.FACTORY.Open(job_urn, mode=\"rw\", aff4_type=\"CronJob\",\n token=token)\n cron_job.Set(cron_job.Schema.DISABLED(0))\n cron_job.Close()", "def disable_job(self, job):\n if subprocess.call(self.cli + [Platf...
[ "0.6508622", "0.640465", "0.6054045", "0.589058", "0.5827825", "0.55788094", "0.5573359", "0.5561993", "0.5552079", "0.5471112", "0.54423046", "0.5440283", "0.543312", "0.5425502", "0.5387053", "0.53846234", "0.5364459", "0.5362083", "0.5344735", "0.53233784", "0.52979136", ...
0.85384786
0
Disables given job on Jenkins.
def disable_job(self, job): if subprocess.call(self.cli + [PlatformJenkinsJavaCLI.DISABLE_JOB, job.name]) != 0: raise PlatformJenkinsException("Disabling job failed: " + job.name)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DisableJob(self, job_urn, token=None):\n cron_job = aff4.FACTORY.Open(job_urn, mode=\"rw\", aff4_type=\"CronJob\",\n token=token)\n cron_job.Set(cron_job.Schema.DISABLED(1))\n cron_job.Close()", "def deactivate_job(job_name):\n job = Job.from_name(job_name)\n jo...
[ "0.7047712", "0.66080946", "0.6542796", "0.61389357", "0.61290914", "0.6022472", "0.6003207", "0.596457", "0.59564406", "0.5941506", "0.59358865", "0.59051114", "0.58281994", "0.58168745", "0.5810319", "0.5772574", "0.57711303", "0.57645935", "0.57537967", "0.5739578", "0.572...
0.8205387
0
Create a given job on Jenkins.
def create_job(self, job): call = subprocess.Popen(self.cli + [PlatformJenkinsJavaCLI.CREATE_JOB, job.name], stdin=subprocess.PIPE) out, err = call.communicate(input=platform_ci.jjb.get_job_as_xml(job, self.template_dir)) call.wait() if call.returncode != 0: logging.info(out)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create(cfg, jobs):\n server = jenkins_utils.server_factory(cfg)\n libjobs.createJobs(server, jobs)", "def create_job(api_instance, job):\n api_response = api_instance.create_namespaced_job(\n body=job, namespace=\"default\", pretty=True\n )\n logger.info(\"Job created with status='%s'\"...
[ "0.7520048", "0.7107826", "0.7052509", "0.70495903", "0.7000261", "0.6887487", "0.68790656", "0.6827953", "0.6707598", "0.66782993", "0.6650939", "0.6482045", "0.6402906", "0.63344806", "0.6322465", "0.62909174", "0.6267784", "0.62481385", "0.6242675", "0.6240722", "0.6237485...
0.82524973
0
Update a given job on Jenkins.
def update_job(self, job): call = subprocess.Popen(self.cli + [PlatformJenkinsJavaCLI.UPDATE_JOB, job.name], stdin=subprocess.PIPE) call.communicate(input=platform_ci.jjb.get_job_as_xml(job, self.template_dir)) call.wait() if call.returncode != 0: raise PlatformJenkinsExcepti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update(cfg, jobs):\n server = jenkins_utils.server_factory(cfg)\n libjobs.updateJobs(server, jobs)", "def update(self, job_name, param_name, value, description=None):\n if job_name in self._jobs:\n getattr(self._jobs[job_name], param_name).update(value, description)\n else:\n ...
[ "0.7519566", "0.7305608", "0.72748035", "0.67824453", "0.67824453", "0.67824453", "0.67824453", "0.65911585", "0.6502356", "0.64618725", "0.6382063", "0.6357814", "0.6337168", "0.6310358", "0.63080525", "0.63080525", "0.63080525", "0.62912005", "0.6251998", "0.61053956", "0.6...
0.8326795
0
Updates a job build description.
def set_build_description(self, job_name, build, description): try: subprocess.check_call(self.cli + [PlatformJenkinsJavaCLI.SET_DESCRIPTION, job_name, build, description]) except subprocess.CalledProcessError: message = "Setting build description failed (job={0}, build={1}, desc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_current_build_description(self, description):\n job_name = os.environ.get(\"JOB_NAME\", None)\n build_id = os.environ.get(\"BUILD_NUMBER\", None)\n if job_name is not None and build_id is not None:\n self.set_build_description(job_name, build_id, description)", "def update...
[ "0.72318727", "0.60756296", "0.60743475", "0.6020576", "0.5999859", "0.59925103", "0.59728664", "0.5708703", "0.5699203", "0.56206816", "0.55843204", "0.55488455", "0.55029446", "0.548009", "0.5469594", "0.5459312", "0.54585123", "0.5456848", "0.5452424", "0.54208547", "0.538...
0.7354544
0
Updates a job build description for the current build. This method is intended to be run in an environment where JOB_NAME and BUILD_NUMBER are set in the environment, such as from within the job build itself. If either of the environment variables is not set, setting the description is not attempted at all.
def set_current_build_description(self, description): job_name = os.environ.get("JOB_NAME", None) build_id = os.environ.get("BUILD_NUMBER", None) if job_name is not None and build_id is not None: self.set_build_description(job_name, build_id, description)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_build_description(self, job_name, build, description):\n try:\n subprocess.check_call(self.cli + [PlatformJenkinsJavaCLI.SET_DESCRIPTION, job_name, build, description])\n except subprocess.CalledProcessError:\n message = \"Setting build description failed (job={0}, build...
[ "0.77581465", "0.58388937", "0.55399406", "0.5432845", "0.5427102", "0.5406418", "0.5297104", "0.524192", "0.5240581", "0.5238138", "0.519109", "0.51833254", "0.5152861", "0.5104744", "0.5102506", "0.50946575", "0.50842863", "0.50842136", "0.5079061", "0.50598854", "0.5059168...
0.8271981
0
Loop through the exposure list and construct an observation table.
def _buildtable(self): tabrows = [] for i, (expid, exfiles) in enumerate(self._exposure_files.items()): specflux_b, specflux_r, specflux_z = [], [], [] tab = None if len(exfiles) == 0: continue print(expid) for exfile in exf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def buildExposureTable(exposures, fields, instruments):\n name = []\n ra = []\n dec= []\n field= []\n inst = []\n airmass = []\n mjd = []\n exptime = []\n epoch = []\n apcorr = []\n index = 0\n for k,e in exposures.items():\n name.append(e.name)\n ra.append(getDegr...
[ "0.70176095", "0.6014823", "0.5961176", "0.5897251", "0.5735278", "0.57064164", "0.5697232", "0.5609351", "0.5595745", "0.5515109", "0.5511498", "0.5509595", "0.5412777", "0.5358326", "0.52642626", "0.5259989", "0.52551216", "0.5245346", "0.5239172", "0.52262944", "0.52035564...
0.7040096
0
String representation of the exposure sequence.
def __str__(self): output = ['Tile ID {}'.format(self._tileid)] for ex, files in self._exposure_files.items(): filenames = '- exposure {:08d}\n'.format(ex) for f in files: filenames = '{} + {}\n'.format(filenames, f) output.append(filenames) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def to_string(self):\n return self.sequence", "def __str__(self):\n string = 'input dim: {} \\noutput dim: {} \\n'.format(\n self.dim_inputs, self.dim_outputs\n )\n string += 'sequence length: {} \\n'.format(\n self.tensors[0].shape[1]\n )\n key = '...
[ "0.72283626", "0.7040741", "0.67555356", "0.6664315", "0.6626783", "0.6547962", "0.65409464", "0.65346056", "0.6483022", "0.64496106", "0.6439818", "0.633267", "0.6277435", "0.62634873", "0.62428826", "0.6218749", "0.620363", "0.61781204", "0.6177901", "0.61686456", "0.615419...
0.70447665
1
Returns source that matches the user provided source_id or display_name.
def ExtractMatchingSourceFromResponse(response, args): for source in response: if ((args.source and source.name.endswith(args.source)) or (args.source_display_name and source.displayName == args.source_display_name)): return source raise core_exceptions.Error( "Source: %s not found....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_source(self, name):\n t = filter( lambda x: x.name==name, self.point_sources+self.extended_sources)\n return t[0] if len(t)==1 else None", "def get_source(source_name):\n if source_name == \"SCHOLAR_CENSUS\":\n from mec_data.source.scholar import ScholarSource\n\n return S...
[ "0.6412398", "0.6283802", "0.62611306", "0.6204275", "0.6198703", "0.6188179", "0.608557", "0.5972765", "0.5959811", "0.59588695", "0.594499", "0.58315796", "0.5799471", "0.57752895", "0.57598245", "0.57466704", "0.5684819", "0.5638011", "0.561176", "0.5592158", "0.55663866",...
0.64637303
0
Make sure that the specified node is visible.
def ensure_visible(self, node): try: components = node.namespace_name.split('/') # Make sure that the tree is expanded down to the context that # contains the node. binding = self.root for atom in components[:-1]: binding = binding.ob...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ensure_visible(self):\n self.set_visible(True)", "def test_visibility(self):\r\n self.assertFalse(self.net.environment\\\r\n .are_visible(self.net.pos[self.node1],\r\n self.net.pos[self.node2]))\r\n self.assertTrue(self...
[ "0.6804122", "0.6494671", "0.6356905", "0.6340063", "0.63099027", "0.6276163", "0.62759423", "0.61556643", "0.61556643", "0.61108905", "0.6087162", "0.6059026", "0.6036995", "0.6013018", "0.5971871", "0.59257257", "0.58930624", "0.58760315", "0.58694416", "0.58317655", "0.578...
0.7291304
0
Method test the endpoint for getting bucketlist items
def test_get_bucketlist_items(self): email = "test@test.com" _pword = "test" user = User.query.filter_by(email=email).first() bucketlist = BucketList.query.filter_by(user_id=user.id, id=1).first() items_no = len(bucketlist.bucketlist_items) headers = self.authentica...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_bucketlist_items(self):\n resp = self.client.post('/bucketlists',\n data=json.dumps(self.bucketlist),\n content_type=\"application/json\", headers={\n \"Authorization\": self.token\n ...
[ "0.8520477", "0.8132996", "0.7968485", "0.79678524", "0.7939482", "0.791598", "0.76777196", "0.76503426", "0.760791", "0.75708175", "0.7465317", "0.7436615", "0.7426375", "0.74000996", "0.7353851", "0.73192596", "0.73068476", "0.725187", "0.72268575", "0.7211199", "0.71193653...
0.84309566
1
Method test the endpoint for adding bucketlist item
def test_add_bucketlist_items(self): email = "test@test.com" _pword = "test" user = User.query.filter_by(email=email).first() bucketlist = BucketList.query.filter_by(user_id=user.id, name="test bucketlist").first() item_no = BucketListItem.query.filter_by(bucketlist_id=bucke...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_bucketlist_item(self):\n resp = self.client.post('/bucketlists',\n data=json.dumps(self.bucketlist),\n content_type=\"application/json\", headers={\n \"Authorization\": self.token\n ...
[ "0.8470567", "0.8040441", "0.76671934", "0.7665731", "0.75571686", "0.7541412", "0.73769414", "0.7354037", "0.735012", "0.73247266", "0.73235244", "0.7313603", "0.7295238", "0.71595377", "0.7149308", "0.7145139", "0.71401936", "0.71109724", "0.7093405", "0.70680696", "0.69463...
0.84557176
1
Method tests that there can not be more than one bucketlist item added with the same name. We will use one of the already existing bucketlist names 'test item'
def test_fail_repeated_buckelist_item(self): user = User.query.filter_by(email="test@test.com").first() bucketlist = BucketList.query.filter_by(user_id=user.id, name="test bucketlist").first() item_no = BucketListItem.query.filter_by(bucketlist_id=bucketlist.id).count() response = se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_duplicate_bucketlist_item(self):\n resp = self.client.post('/bucketlists',\n data=json.dumps(self.bucketlist),\n content_type=\"application/json\", headers={\n \"Authorization\": self.token\n ...
[ "0.8174513", "0.74510795", "0.74059886", "0.7099884", "0.7079807", "0.6917014", "0.68960243", "0.68957806", "0.6796505", "0.67483217", "0.6740296", "0.66837454", "0.66416943", "0.66326", "0.6624022", "0.65148836", "0.65080565", "0.64689416", "0.64585537", "0.6440524", "0.6424...
0.80040896
1
Method tests the end point for updating a bucket list item using put
def test_put_bucketlist_item(self): data = {"name": "bucketlist item name", "completed": "true"} email = "test@test.com" _pword = "test" user = User.query.filter_by(email=email).first() bucketlist = BucketList.query.filter_by(user_id=user.id, name="test bucketlist").first() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_edit_bucketlist(self):\n post_data = self.post_a_bucket()\n self.assertEqual(post_data.status_code, 201)\n result_of_put_method = self.client().put(\n '/bucketlists/1',\n headers=dict(Authorization='Bearer '\n + self.token()\n ...
[ "0.8058875", "0.80090237", "0.7962996", "0.7944334", "0.7826577", "0.7747739", "0.7705827", "0.74234086", "0.7353868", "0.72529393", "0.7214844", "0.72071826", "0.7201491", "0.7160625", "0.71453685", "0.7111688", "0.71060103", "0.70663935", "0.69522905", "0.69248813", "0.6919...
0.8477841
0
Method tests the error raised when end point for updating a bucket list item using put contains the wrong id
def test_put_item_wrong_id(self): data = {"name": "bucketlist item name", "completed": "true"} email = "test@test.com" _pword = "test" user = User.query.filter_by(email=email).first() bucketlist = BucketList.query.filter_by(user_id=user.id, name="test bucketlist").first() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_id_of_bucket_to_be_edited_is_invalid(self):\n with self.client:\n # Get an auth token\n token = self.get_user_token()\n # Update the bucket name\n res = self.client.put(\n '/bucketlists/bucketid',\n headers=dict(Authorization...
[ "0.8020481", "0.7893578", "0.78514856", "0.7821233", "0.769216", "0.74274623", "0.74184465", "0.74172276", "0.7320262", "0.7253771", "0.7236808", "0.7163079", "0.7149734", "0.7134282", "0.7058692", "0.701769", "0.69915277", "0.6915926", "0.691373", "0.6895343", "0.68850976", ...
0.85060626
0
Method tests the request to delete a bucketlist item
def test_delete_bucketlist_item(self): email = "test@test.com" _pword = "test" user = User.query.filter_by(email=email).first() bucketlist = BucketList.query.filter_by(user_id=user.id, name="test bucketlist").first() item = BucketListItem.query.filter_by(bucketlist_id=bucket...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_bucketlist_item(self):\n self.register_user()\n result = self.login_user()\n access_token = json.loads(result.data.decode())['access_token']\n\n # create a bucketlist by making a POST request\n res = self.client().post(\n '/api/v1/bucketlists/',\n ...
[ "0.8505305", "0.83253217", "0.82858104", "0.8246607", "0.82087", "0.81654054", "0.8043401", "0.78209937", "0.77620775", "0.76105493", "0.7587545", "0.75202996", "0.7477461", "0.7458294", "0.73910975", "0.7342991", "0.73347974", "0.7244719", "0.7221748", "0.7206562", "0.710843...
0.8602903
0
Method tests the error raised when end point for delete a bucket list item contains the wrong id
def test_delete_item_wrong_id(self): email = "test@test.com" _pword = "test" user = User.query.filter_by(email=email).first() bucketlist = BucketList.query.filter_by(user_id=user.id, name="test bucketlist").first() item = BucketListItem.query.filter_by(bucketlist_id=bucketli...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_deletion_handles_no_bucket_found_by_id(self):\n with self.client:\n response = self.client.delete(\n '/bucketlists/1',\n headers=dict(Authorization='Bearer ' + self.get_user_token())\n )\n data = json.loads(response.data.decode())\n ...
[ "0.8280715", "0.81965166", "0.8153652", "0.80517626", "0.7886369", "0.7813242", "0.7694013", "0.76679814", "0.76200867", "0.74761516", "0.7440213", "0.74288243", "0.74263364", "0.7391026", "0.73868865", "0.7326834", "0.7310586", "0.72898954", "0.72570956", "0.7218091", "0.721...
0.864614
0
Method is used to send request for put for the bucketlist item to the api
def put_bucketlist_item(self, email, password, bucketlist_id, item_id, data): headers = self.authentication_headers(email=email, password=password) return self.client.put( '/api/v1/bucketlist/{}/items/{}'.format(bucketlist_id, item_id), content_type="application/json", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_put_bucketlist_item(self):\r\n data = {\"name\": \"bucketlist item name\", \"completed\": \"true\"}\r\n email = \"test@test.com\"\r\n _pword = \"test\"\r\n user = User.query.filter_by(email=email).first()\r\n bucketlist = BucketList.query.filter_by(user_id=user.id, name=...
[ "0.77104014", "0.75837624", "0.73698086", "0.7226279", "0.7216704", "0.71507794", "0.702163", "0.68962586", "0.6804519", "0.67802167", "0.6777862", "0.66020447", "0.6598506", "0.65621024", "0.64808017", "0.64796245", "0.64737403", "0.64593357", "0.6454596", "0.645011", "0.640...
0.7592196
1
Check if model uses submodules
def defined_submodule(arr): return any([el.endswith('_module]') for el in arr])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_submodule(submodule):\n is_correct_subclass = issubclass(submodule, AnalysisModule)\n # Ensure submodule is defined within the package we are inspecting (and not 'base')\n is_correct_module = package.__name__ in submodule.__module__\n return is_correct_subclass and is_correct_m...
[ "0.66678244", "0.6193898", "0.6127741", "0.6090915", "0.60585386", "0.5981495", "0.5975656", "0.59688056", "0.58849907", "0.5884931", "0.5833496", "0.5831226", "0.58079565", "0.5742593", "0.5681119", "0.5659924", "0.56587225", "0.56485283", "0.56155103", "0.5606545", "0.56036...
0.6265166
1
Fills up the ReplayBuffer memory with PRETRAIN_LENGTH number of experiences before training begins.
def initialize_memory(self, pretrain_length, env): if self.memlen >= pretrain_length: print("Memory already filled, length: {}".format(len(self.memory))) return interval = max(10, int(pretrain_length/25)) print("Initializing memory buffer.") obs = env.states ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def populate_buffer(self, num_transitions):\n while len(self.replay_buffer) < self.buffer_sample_size:\n self.play(num_transitions)", "def collect_samples(self):\n self.replay_buffer = self.collect_initial_batch(\n self.replay_buffer, self.acm_pre_train_samples\n )", ...
[ "0.7086755", "0.634814", "0.62348205", "0.61094946", "0.6062285", "0.601058", "0.59450614", "0.59385663", "0.59318626", "0.5931236", "0.5920841", "0.591392", "0.59087026", "0.5903313", "0.58007306", "0.57563967", "0.5704546", "0.56222826", "0.5611808", "0.56116015", "0.559233...
0.6525008
1
Representation of a circuit as "Rotation list". On top of the structure (see Structured script representation), 1Q layers are compiled to the corresponding rotations. The 1Q layers are now represented with a rotation vector. rotations_1Q = [layer, qubit, rotation_vector] rotation_vector = [axis_of_rotation (3 numbers),...
def __init__(self, rotations_1Q, lines_2Q, n_qubits): self.rotations_1Q = rotations_1Q self.lines_2Q = lines_2Q self.n_qubits = n_qubits dim_depth, dim_qubits, dim_rot = self.rotations_1Q.shape self.depth = 1+2*len(lines_2Q) # 1Q rotations vector does not match the depth ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def two_qubit_rotation(self, bits, symbols):\n circuit = cirq.Circuit()\n circuit += cirq.Circuit(self.one_qubit_rotation(bits[0], symbols[0:3]))\n circuit += cirq.Circuit(self.one_qubit_rotation(bits[1], symbols[3:6]))\n circuit += [cirq.ZZ(*bits)**symbols[6]]\n circuit += [cirq...
[ "0.63733256", "0.6243695", "0.61284345", "0.59969985", "0.59389025", "0.5919403", "0.5793986", "0.5788567", "0.57774144", "0.5774565", "0.57473123", "0.57306886", "0.5724324", "0.57041705", "0.5641081", "0.56394804", "0.5630439", "0.5608946", "0.5591003", "0.55356807", "0.550...
0.62612224
1
Representation of a circuit as "XY list". On top of the Euler list (see Euler list representation), The euler angles are compiled into a single MW gate (rotation around axis in the azimutal plane) through virtual phase updates. The 1Q layers are now represented with an XY vector. rotations_1Q = [layer, qubit, XY_vector...
def __init__(self, XY_rotations, lines_2Q, n_qubits): self.XY_rotations = XY_rotations self.lines_2Q = lines_2Q self.n_qubits = n_qubits dim_depth, dim_qubits, dim_XY = self.XY_rotations.shape self.depth = 1+2*len(lines_2Q) # XY rotations vector does not match the depth ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getEllipsYZRotMatrix(a1, a2):\n adir = a2 - a1\n amid = a1 + 0.5 * adir\n kath = np.sqrt((adir[0] * adir[0] + adir[1] * adir[1]) / 4.0)\n octantA2 = octant(a2)\n theta = np.arctan( abs( (adir[2]/2) / kath) )\n #[1, 4, 6, 7 ] => left rotation\n #[2, 3, 5, 8 ] => right rotation\n if oct...
[ "0.5938358", "0.5937187", "0.59367967", "0.5919371", "0.57940376", "0.56724787", "0.5659674", "0.5651457", "0.5649507", "0.55863035", "0.55385494", "0.5521582", "0.5468761", "0.5432579", "0.5426138", "0.5414661", "0.5390122", "0.5376509", "0.5373534", "0.5363947", "0.53566766...
0.60099
0
Checks that X is transposed to [Lat, Lon, Sample, Feature] order
def check_transposed(X, x_lat_dim, x_lon_dim, x_sample_dim, x_feature_dim): assert list(X.dims).index(x_lat_dim) == 0, 'XCast requires a dataset to be transposed to LAT x LON x SAMPLE x FEATURE' assert list(X.dims).index(x_lon_dim) == 1, 'XCast requires a dataset to be transposed to LAT x LON x SAMPLE x FEATURE' ass...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_input_transposed_vector(multiple_linear_regression_data):\n X, y = multiple_linear_regression_data\n x = X.copy().T\n y = pd.DataFrame(y)\n\n # There is a difference with a transposed array\n with pytest.raises(\n AssertionError, match=r\"N >= K: You need at least as many rows .*\"\n...
[ "0.60901403", "0.6069965", "0.57867116", "0.57052827", "0.56909966", "0.5635825", "0.5586665", "0.54974854", "0.54878813", "0.5452838", "0.5424291", "0.54226655", "0.54185116", "0.5416405", "0.5388056", "0.5387666", "0.53499806", "0.5334254", "0.5315664", "0.5304115", "0.5288...
0.7853445
0
Checks that X is 4D, with Dimension Names as specified by x_lat_dim, x_lon_dim, x_sample_dim, and x_feature_dim
def check_dimensions(X, x_lat_dim, x_lon_dim, x_sample_dim, x_feature_dim): assert 4 <= len(X.dims) <= 5, 'XCast requires a dataset to be 4-Dimensional' assert x_lat_dim in X.dims, 'XCast requires a dataset_lat_dim to be a dimension on X' assert x_lon_dim in X.dims, 'XCast requires a dataset_lon_dim to be a dimensio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_coords(X, x_lat_dim, x_lon_dim, x_sample_dim, x_feature_dim):\n\tassert x_lat_dim in X.coords.keys(), 'XCast requires a dataset_lat_dim to be a coordinate on X'\n\tassert x_lon_dim in X.coords.keys(), 'XCast requires a dataset_lon_dim to be a coordinate on X'\n\tassert x_sample_dim in X.coords.keys(), 'X...
[ "0.6943855", "0.6864585", "0.6622508", "0.6591821", "0.647431", "0.63964295", "0.6374549", "0.6134668", "0.6122223", "0.5947658", "0.583848", "0.57911134", "0.57625794", "0.565753", "0.56400055", "0.5597365", "0.5592346", "0.5584553", "0.55217546", "0.5503743", "0.54942316", ...
0.7832379
0
Checks that X has coordinates named as specified by x_lat_dim, x_lon_dim, x_sample_dim, and x_feature_dim
def check_coords(X, x_lat_dim, x_lon_dim, x_sample_dim, x_feature_dim): assert x_lat_dim in X.coords.keys(), 'XCast requires a dataset_lat_dim to be a coordinate on X' assert x_lon_dim in X.coords.keys(), 'XCast requires a dataset_lon_dim to be a coordinate on X' assert x_sample_dim in X.coords.keys(), 'XCast requir...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_all(X, x_lat_dim, x_lon_dim, x_sample_dim, x_feature_dim):\n\tcheck_dimensions(X, x_lat_dim, x_lon_dim, x_sample_dim, x_feature_dim)\n\tcheck_coords(X, x_lat_dim, x_lon_dim, x_sample_dim, x_feature_dim)\n\tcheck_consistent(X, x_lat_dim, x_lon_dim, x_sample_dim, x_feature_dim)\n\tcheck_type(X, x_lat_dim, ...
[ "0.77260077", "0.7620336", "0.7221872", "0.6576378", "0.6310555", "0.6308388", "0.6186717", "0.608041", "0.58673334", "0.5852697", "0.5782202", "0.5687635", "0.5607326", "0.5584896", "0.55696183", "0.5523855", "0.5504535", "0.5483882", "0.54531854", "0.54332227", "0.5432066",...
0.8039974
0
Checks that X's Coordinates are the same length as X's Dimensions
def check_consistent(X, x_lat_dim, x_lon_dim, x_sample_dim, x_feature_dim): assert X.shape[list(X.dims).index(x_lat_dim)] == len(X.coords[x_lat_dim].values), "XCast requires a dataset's x_lat_dim coordinate to be the same length as its x_lat_dim dimension" assert X.shape[list(X.dims).index(x_lon_dim)] == len(X.coords...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_dimensions(self) -> None:\n dims = (self.y_dim, self.x_dim)\n da = self._obj[self.vars[0]] if isinstance(self._obj, xr.Dataset) else self._obj\n extra_dims = [dim for dim in da.dims if dim not in dims]\n if len(extra_dims) == 1:\n dims = tuple(extra_dims) + dims\n ...
[ "0.7469548", "0.7054452", "0.7046964", "0.6944492", "0.66742504", "0.6647212", "0.6620178", "0.6618185", "0.6572067", "0.6569208", "0.65156883", "0.6446175", "0.6434718", "0.64269143", "0.64210254", "0.6420011", "0.64147735", "0.6348928", "0.6343616", "0.6322013", "0.63205206...
0.7488213
0
Checks that X is an Xarray.DataArray
def check_type(X, x_lat_dim, x_lon_dim, x_sample_dim, x_feature_dim): assert type(X) == xr.DataArray, 'XCast requires a dataset to be of type "Xarray.DataArray"'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __check_is_xarray(self, data):\n if type(data) is xr.core.dataarray.DataArray or \\\n type(data) is xr.core.dataarray.Dataset:\n\n return True\n else:\n msg = \"Variable {data} is not an xarray DataArray/Dataset\"\n raise Exception(msg)", "def is_dataa...
[ "0.86942047", "0.71866673", "0.7029208", "0.69669193", "0.6887847", "0.67700577", "0.66643125", "0.6535942", "0.63918483", "0.63843584", "0.636618", "0.63450086", "0.63026375", "0.6252001", "0.6233888", "0.6226298", "0.6150564", "0.61219764", "0.6118666", "0.6112856", "0.6090...
0.8198799
1
Return a new ObjectChange representing a change made to this object. This will typically be called automatically by ChangeLoggingMiddleware.
def to_objectchange(self, action): return ObjectChange( changed_object=self, object_repr=str(self), action=action, object_data=serialize_object(self), )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def updated_object(self):\n o = deepcopy(self.object)\n o[\"name\"] += \"-copy\"\n return o", "def change_object(self, new_object):\n raise NotImplementedError", "def __call__(self, change: ChangeDict) -> None:\n old = None\n new = None\n ctype = change[\"type\"...
[ "0.61876494", "0.5870512", "0.56965613", "0.5530178", "0.55052364", "0.54316956", "0.54316956", "0.54316956", "0.53980166", "0.5397867", "0.5397867", "0.5397867", "0.5333922", "0.53334", "0.531325", "0.5294916", "0.5289745", "0.528219", "0.5259374", "0.5217978", "0.52005905",...
0.73542356
0
Publisher unique service advertise identifier. Getter only
def advertise_id(self): return self._advertise_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def advertisement_id(self):\n return uuid.uuid4()", "def service_id(self) -> str:\n return pulumi.get(self, \"service_id\")", "def service_id(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"service_id\")", "def service_id(self) -> pulumi.Output[str]:\n return pulumi.get(s...
[ "0.6714376", "0.67001706", "0.65665245", "0.65665245", "0.6548375", "0.65236896", "0.6251711", "0.6107556", "0.60676295", "0.60120785", "0.5996947", "0.59193593", "0.59193593", "0.5900588", "0.5853006", "0.5787707", "0.57624674", "0.57600904", "0.5751242", "0.5715866", "0.570...
0.73240006
0
Publishing latch status. Getter only property
def latch(self): return self._latch
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def monitor(self):", "def _get_status(self):\n return self.__status", "def status(self):\n raise NotImplementedError()", "def power_status(self):\n raise NotImplementedError(\"ERROR: Unimplemented function.\")", "def set_On(self):\n if not(self._locked):\n self.__dict__['...
[ "0.60354245", "0.5962349", "0.5958736", "0.59539264", "0.5925358", "0.59236515", "0.5900095", "0.57918376", "0.57918376", "0.5746601", "0.5694383", "0.56685543", "0.56662333", "0.5662871", "0.56223184", "0.5591586", "0.5569208", "0.5568028", "0.556712", "0.5565975", "0.556073...
0.73604715
0
Getter only property. Returns publishing topic name.
def topic(self): return self._topic_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def topic(self) -> str:\n return self._topic", "def pubsub_topic(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"pubsub_topic\")", "def topic(self):\n return self.config.get('topic', f'{NAMESPACE}/{self.id}')", "def get_topic(self):\n return self.topic", "def pubsub_top...
[ "0.7873912", "0.77815044", "0.7672942", "0.7589836", "0.7427634", "0.73527247", "0.7141051", "0.7079695", "0.70687497", "0.70312816", "0.7003432", "0.6849306", "0.6837315", "0.6716", "0.66638047", "0.6615674", "0.65900433", "0.6494008", "0.6449045", "0.6389532", "0.6370327", ...
0.8160925
0
Transforms single row of pandas `original_tweets_with_lemmas.p` to graph. Suffixes in node names are needed due to intersection between hashtags and user names.
def _transform_single_row(self, hashtag_agg: Dict, row: pd.Series): user_name = row["username"] + "_user" tweet_id = str(row["id"]) + "_tweet" tags = row["hashtags"] self._users_labels.add(user_name) self._tweet_labels.add(tweet_id) if not self.graph.has_node(user_name)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset_node_ids(df):\n le = LabelEncoder()\n all_node_names = list(set(df['from_name'].values.tolist() + df['to_name'].values.tolist()))\n le.fit(all_node_names)\n df['from_id'] = le.transform(df['from_name'])\n df['to_id'] = le.transform(df['to_name'])\n return df, le", "def lemmatize(data:...
[ "0.53392446", "0.53363657", "0.53016007", "0.52973044", "0.5226778", "0.5155888", "0.51276714", "0.5085444", "0.4898099", "0.4861826", "0.48439053", "0.481717", "0.48156443", "0.4814153", "0.47771806", "0.4760283", "0.475947", "0.47401556", "0.47281075", "0.46995685", "0.4695...
0.58514464
0
Creates sparse matrix of preference vectors for each of N samples to recommend which are used to initialize random walk algorithm. If a query hashtag for a particular tweet is given, then it is used to create preference vector. The most similar hashtag is used otherwise.
def _get_preference_vectors(self, tweet_content_similarities: np.ndarray, query_hashtags: Optional[Tuple[str]]) -> sps.csr_matrix: def _get_using_similarities(similarity_vector): query_hashtag_index = np.argmax(similarity_vector) vec = np.zeros((len(self....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _initialize(self):\n for doc_index, doc in enumerate(self.document):\n temp_word_topic_matrix = []\n for word in doc:\n if word in self.word2id.keys():\n start_topic_index = np.random.randint(0, self.K)\n temp_word_topic_matrix.a...
[ "0.58001864", "0.56129664", "0.54644907", "0.54111147", "0.54101944", "0.53472745", "0.5298088", "0.52882266", "0.52852654", "0.52436393", "0.5239852", "0.52355725", "0.5232348", "0.5206258", "0.5178139", "0.51459336", "0.51324886", "0.51294774", "0.51167494", "0.51034796", "...
0.6474532
0
activates mujoco with license at `file_path` this does not check the return code, per usage example at simulate.cpp and test.cpp.
def register_license(file_path): result = mjlib.mj_activate(file_path) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def upload_license(self):\n param = self.module.params[\"param\"]\n license_file_path = param['license_file_path']\n if license_file_path and os.access(license_file_path, os.F_OK) and os.access(license_file_path, os.R_OK):\n self.client.upload_license(license_file_path)\n ...
[ "0.6253657", "0.6131019", "0.5873717", "0.56893003", "0.5666623", "0.56539637", "0.5633931", "0.5633391", "0.5620481", "0.56039864", "0.56034553", "0.5600046", "0.5559953", "0.55529106", "0.5540216", "0.55401397", "0.5527236", "0.5520839", "0.5341878", "0.53384465", "0.529629...
0.7091268
0
Return (qposadr, qveladr, dof) for the given joint name. If dof is 4 or 7, then the last 4 degrees of freedom in qpos represent a unit quaternion.
def joint_adr(self, joint_name): jntadr = mjlib.mj_name2id(self.ptr, C.mjOBJ_JOINT, joint_name) assert (jntadr >= 0) dofmap = {C.mjJNT_FREE: 7, C.mjJNT_BALL: 4, C.mjJNT_SLIDE: 1, C.mjJNT_HINGE: 1} qposadr = self.jnt_qposadr[jntadr][0]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getWireframeJoints(self, q):\n xline = [0. for _ in self.Joints]\n yline = [0. for _ in self.Joints]\n zline = [0. for _ in self.Joints]\n for cnt, jnt in enumerate(self.Joints.keys()):\n xyz = self.joint_syms[jnt][\"func_xyz_coj\"](*q)\n xline[cnt] = xyz[0, 0]...
[ "0.5734758", "0.5489396", "0.5309817", "0.5117031", "0.50999624", "0.5072133", "0.50482094", "0.50176036", "0.4997793", "0.49432415", "0.4891485", "0.4865569", "0.47592014", "0.47541997", "0.4749527", "0.47479632", "0.47286186", "0.4689717", "0.4671337", "0.46211225", "0.4620...
0.6961554
0
Reencode phylogeny_df to facilitate efficient analysis and transformation operations. The returned phylogeny dataframe will be topologically sorted (i.e., organisms appear after all ancestors), have contiguous ids (i.e., organisms' ids correspond to row number), contain an integer datatype `ancestor_id` column if the p...
def alifestd_to_working_format( phylogeny_df: pd.DataFrame, mutate: bool = False, ) -> pd.DataFrame: if not mutate: phylogeny_df = phylogeny_df.copy() phylogeny_df = alifestd_try_add_ancestor_id_col(phylogeny_df, mutate=True) if not alifestd_is_topologically_sorted(phylogeny_df): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_tree(tree, subtree_hierarchy):\n new_tree = subtree_hierarchy.copy()\n for bg_pop, row in subtree_hierarchy.iterrows():\n # Remove not showing pops from new_tree\n if row['To_show'] == 'no':\n new_tree = new_tree.drop(bg_pop)\n continue\n\n # Find Parent\...
[ "0.54605395", "0.52514964", "0.52182794", "0.51729226", "0.5131557", "0.4997631", "0.49200213", "0.49033338", "0.47637245", "0.47538468", "0.4739272", "0.46873105", "0.46594372", "0.4646138", "0.46402073", "0.4636189", "0.4631968", "0.46285406", "0.46198457", "0.46106067", "0...
0.8255052
0
Provides list of github organization urls based on authenticated user.
def get_orgs(): url = "https://api.github.com/user/orgs" org_urls = [] orgs = utils.get_json(url) for org in orgs: org_urls.append(org["url"]) return org_urls
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def urls(gh, user):\n return [repo.url for repo in getuserrepos(gh, user)]", "def get_organization_links(self):\n yield from self.get_resource_by_item(\"/orgs\")", "def repositories(self, user_name=None):\n user_name = user_name if user_name else self._auth[0]\n data = self._request('GE...
[ "0.77288854", "0.6896512", "0.6850855", "0.6795222", "0.6704334", "0.6566785", "0.64914256", "0.64815396", "0.64218557", "0.6373243", "0.6368361", "0.6260303", "0.6226184", "0.62181467", "0.6191352", "0.61800104", "0.61728805", "0.6149173", "0.6129998", "0.61161196", "0.61137...
0.7619069
1
Provides a list of Member urls per organizations. param orgs either a list of urls pointing to organizations or a single org name return list of member urls
def list_members(orgs): members =[] if isinstance(orgs, list): #if list of orgs for each org get members list for url in orgs: #append /member to url - member_url is not valid canidate without a member list url = url + "/members" print("Checking " + url) members_data = utils.ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_orgs():\n \n url = \"https://api.github.com/user/orgs\"\n \n org_urls = []\n orgs = utils.get_json(url)\n \n for org in orgs:\n org_urls.append(org[\"url\"])\n \n return org_urls", "def organizations(self):\n return self.get('{}/orgs'.format(ApiVersion.A1.value))", "def get_organizatio...
[ "0.73141086", "0.6856046", "0.6766409", "0.66456306", "0.6501711", "0.64493275", "0.6426517", "0.62708795", "0.6261771", "0.6171711", "0.6152523", "0.605219", "0.6030204", "0.6027043", "0.60185575", "0.60124224", "0.5963386", "0.58976614", "0.5893394", "0.5823597", "0.5802018...
0.7285096
1
Provides a list of Member urls that have [attribute] is null. param attribute to check for null value params memberUrls List of member urls to check return list of member urls with null [attribute] field
def check_for_null(attribute, memberUrls): attributeNotFound =[] for url in memberUrls: member_data = utils.get_json(url) if member_data[attribute] is None: #TODO: TBD Could grab email here if speed was an issue attributeNotFound.append(url) return attributeNotFound
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_should_pass_when_list_of_url_are_not_empty(self):\n self.ebooksPage = EbooksPage(self.driver)\n list_of_links = self.ebooksPage.get_all_links()\n\n assert (isinstance(list_of_links, list) and (len(list_of_links) > 0 ))", "def get_parliament_members_urls(self) -> list:\n direc...
[ "0.5205275", "0.51647687", "0.4913061", "0.49125162", "0.49111745", "0.4911004", "0.48863113", "0.4880418", "0.48025796", "0.47962448", "0.47788674", "0.47781992", "0.47770363", "0.47515574", "0.47040161", "0.46784464", "0.45712367", "0.4568166", "0.45629707", "0.45522118", "...
0.841574
0
Get loan originations for a given lender, county combination. This ignores year for the moment.
def loan_originations(request_dict): state_fips = request_dict.get('state_fips', '') county_fips = request_dict.get('county_fips', '') lender = request_dict.get('lender', '') if state_fips and county_fips and lender: records = HMDARecord.objects.filter( countyfp=county_fips, lender...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_land_conso_per_year(self, level, group_name=None):\n fields = Cerema.get_art_field(self.analyse_start_date, self.analyse_end_date)\n qs = self.get_cerema_cities(group_name=group_name)\n qs = qs.values(level)\n qs = qs.annotate(**{f\"20{field[3:5]}\": Sum(field) / 10000 for field...
[ "0.54118204", "0.5000237", "0.4949208", "0.4931147", "0.4911661", "0.4811012", "0.47071233", "0.47071233", "0.47031814", "0.4534821", "0.45185816", "0.45088586", "0.45060778", "0.44371125", "0.4435685", "0.44336432", "0.4428876", "0.44172257", "0.44085371", "0.43731523", "0.4...
0.6544321
0
Loads branch data from Derek.
def _load(self): context = { "username": self.username, "reponame": self.reponame, "name": self.name } LOG.debug("Loading %s" % self.branch_id) doc = self._client.getjson(path="/users/%(username)s/repos/%(reponame)s" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_data(self) -> None:", "def load_data(self):", "def branches(self):\r\n url = self.base_url + 'branches/'\r\n return json.loads(self.bb.load_url(url))", "def _finish_init(self):\n\n # This is usually done in set_other(), but we already set it as part of\n # the constructor...
[ "0.6128238", "0.592409", "0.57337046", "0.5703952", "0.56251985", "0.56168956", "0.5596647", "0.55911064", "0.5567281", "0.5439576", "0.5429689", "0.54277277", "0.5410592", "0.5379778", "0.5364775", "0.53645855", "0.53460085", "0.53446186", "0.5340837", "0.5321691", "0.531625...
0.64722985
0
Upload packages to branch.
def upload_packages(self, packages): context = { "username": self.username, "reponame": self.reponame, "name": self.name } filepaths = [os.path.join(os.path.dirname(path), pfile['filename']) for path in packages ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def upload_package(self, __contents):\n raise NotImplementedError", "def deploy():\n build()\n collect()\n commit()\n push()", "def push(self, base_repo, branch=\"master\"):\n base_repo.push_to(self, branch)", "def push(self):\n out, err, code = self.command( [\"git\", \"push...
[ "0.6992921", "0.65332377", "0.6517984", "0.64805365", "0.6429827", "0.6415388", "0.64010024", "0.6369851", "0.6338582", "0.62850165", "0.6262531", "0.6237359", "0.6235568", "0.6226121", "0.61871606", "0.6132188", "0.60597724", "0.60434294", "0.60356283", "0.6010991", "0.59812...
0.6928756
1
Look up package ID from list of package infos.
def get_pkg_id(pkgs, name, version): for pinfo in pkgs: if pinfo["name"] == name and pinfo["version"] == version: return "%(name)s/%(version)s/%(id)s" % pinfo raise DerekError("No package %s %s in the branch" % (name, version))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bd_selectPackageList_byID(self, _c, _pckgID):\n\n result = {}\n\n _c.execute(\"SELECT id, num, desc, status, source_env, dest_env, app, last_rev FROM package WHERE id=? ORDER BY num DESC\", [_pckgID]) \n data = _c.fetchone()\n\n if data:\n result['id'] = data[0] ...
[ "0.6142764", "0.59174037", "0.5913275", "0.58575547", "0.5794914", "0.57480824", "0.5745953", "0.56321526", "0.5583289", "0.55084556", "0.5450892", "0.5416782", "0.5412792", "0.5388353", "0.5381202", "0.5359032", "0.5345228", "0.5315372", "0.5281844", "0.5267592", "0.5251155"...
0.6708183
0
test upsert user template as anonymous raises access control error
def test_upsert_user_template_as_anonymous_raises_access_control_error( self, ): mock_request = create_mock_request(user=self.anonymous_user) with self.assertRaises(AccessControlError): template_api.upsert( self.fixture.user1_template, request=mock_request ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_upsert_user_template_as_anonymous_with_access_right_raises_access_control_error(\n self,\n ):\n mock_request = create_mock_request(user=self.anonymous_user)\n with self.assertRaises(AccessControlError):\n template_api.upsert(\n self.fixture.user1_template,...
[ "0.79757524", "0.78699815", "0.77971363", "0.7779306", "0.7315423", "0.7268201", "0.72340584", "0.71491605", "0.711088", "0.70220673", "0.66764414", "0.6670372", "0.66626596", "0.6651719", "0.656055", "0.65165913", "0.6485727", "0.64777356", "0.64196575", "0.6418435", "0.6411...
0.81394374
0
test upsert user template as anonymous with access right raises access control error
def test_upsert_user_template_as_anonymous_with_access_right_raises_access_control_error( self, ): mock_request = create_mock_request(user=self.anonymous_user) with self.assertRaises(AccessControlError): template_api.upsert( self.fixture.user1_template, request=mo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_upsert_user_template_as_anonymous_raises_access_control_error(\n self,\n ):\n mock_request = create_mock_request(user=self.anonymous_user)\n with self.assertRaises(AccessControlError):\n template_api.upsert(\n self.fixture.user1_template, request=mock_requ...
[ "0.80965334", "0.7977133", "0.7963794", "0.7793425", "0.7664125", "0.7498813", "0.72754526", "0.7163729", "0.71102697", "0.708983", "0.6803297", "0.6699159", "0.6673843", "0.6615065", "0.66076845", "0.66003054", "0.6594539", "0.65447944", "0.6544686", "0.65272033", "0.6497763...
0.82011104
0
test upsert global template as anonymous raises access control error
def test_upsert_global_template_as_anonymous_raises_access_control_error( self, ): mock_request = create_mock_request(user=self.anonymous_user) with self.assertRaises(AccessControlError): template_api.upsert( self.fixture.global_template, request=mock_request ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_upsert_global_template_as_anonymous_with_access_right_raises_access_control_error(\n self,\n ):\n mock_request = create_mock_request(user=self.anonymous_user)\n with self.assertRaises(AccessControlError):\n template_api.upsert(\n self.fixture.global_templa...
[ "0.7650722", "0.756786", "0.73319674", "0.72709674", "0.71599734", "0.6970519", "0.68684846", "0.67423", "0.65906715", "0.6536628", "0.64568055", "0.64072675", "0.6396326", "0.6376108", "0.6357626", "0.63539773", "0.6263191", "0.6222696", "0.6143397", "0.6139016", "0.6118972"...
0.7757241
0
test upsert global template as anonymous raises access control error
def test_upsert_global_template_as_anonymous_with_access_right_raises_access_control_error( self, ): mock_request = create_mock_request(user=self.anonymous_user) with self.assertRaises(AccessControlError): template_api.upsert( self.fixture.global_template, request...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_upsert_global_template_as_anonymous_raises_access_control_error(\n self,\n ):\n mock_request = create_mock_request(user=self.anonymous_user)\n with self.assertRaises(AccessControlError):\n template_api.upsert(\n self.fixture.global_template, request=mock_r...
[ "0.7756423", "0.75673836", "0.7331551", "0.7270877", "0.7159347", "0.6970686", "0.6868954", "0.6742805", "0.65919876", "0.6536369", "0.6457105", "0.6407503", "0.6395695", "0.63756883", "0.6357793", "0.6353528", "0.62642133", "0.6223189", "0.6144017", "0.61375785", "0.61193377...
0.76497203
1
test upsert own template as user saves
def test_upsert_own_template_as_user_saves(self): mock_request = create_mock_request(user=self.user1) template_api.upsert(self.fixture.user1_template, request=mock_request)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_upsert_own_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self.superuser1)\n template_api.upsert(self.fixture.user1_template, request=mock_request)", "def test_upsert_own_template_as_staff_saves(self):\n mock_request = create_mock_request(user=self.staf...
[ "0.8351025", "0.80516064", "0.8045996", "0.8009917", "0.7813934", "0.6972186", "0.678505", "0.6546894", "0.63948953", "0.63871586", "0.6360882", "0.6320311", "0.63129383", "0.61979985", "0.6153889", "0.61455595", "0.61436296", "0.6135426", "0.6107875", "0.6063069", "0.6057141...
0.866422
0
test upsert other users template as user raises access control error
def test_upsert_other_users_template_as_user_raises_access_control_error( self, ): mock_request = create_mock_request(user=self.user1) with self.assertRaises(AccessControlError): template_api.upsert( self.fixture.user2_template, request=mock_request )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_upsert_other_users_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self.superuser1)\n template_api.upsert(self.fixture.user2_template, request=mock_request)", "def test_upsert_own_template_as_user_saves(self):\n mock_request = create_mock_request(user=se...
[ "0.820034", "0.8083881", "0.8039612", "0.80145544", "0.80041873", "0.76042765", "0.7525442", "0.7524677", "0.7430861", "0.7153691", "0.7078404", "0.69165915", "0.67743903", "0.6736194", "0.6717341", "0.6690355", "0.6580235", "0.65308565", "0.6507076", "0.6504665", "0.6474388"...
0.82194316
0
test upsert global template as user raises access control error
def test_upsert_global_template_as_user_raises_access_control_error(self): mock_request = create_mock_request(user=self.user1) with self.assertRaises(AccessControlError): template_api.upsert( self.fixture.global_template, request=mock_request )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_upsert_global_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self.superuser1)\n template_api.upsert(self.fixture.global_template, request=mock_request)", "def test_upsert_own_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=s...
[ "0.8106673", "0.76909196", "0.7503215", "0.7482491", "0.7482349", "0.747998", "0.74361557", "0.7395664", "0.7269864", "0.72538686", "0.72130823", "0.7131496", "0.701815", "0.6556384", "0.65447783", "0.6527001", "0.64378923", "0.6381135", "0.6367743", "0.6320074", "0.63030666"...
0.82474107
0
test upsert own template as staff saves
def test_upsert_own_template_as_staff_saves(self): mock_request = create_mock_request(user=self.staff_user1) template_api.upsert(self.fixture.user1_template, request=mock_request)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_upsert_global_template_as_staff_saves(self):\n mock_request = create_mock_request(user=self.staff_user1)\n template_api.upsert(self.fixture.global_template, request=mock_request)", "def test_upsert_own_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self...
[ "0.8371305", "0.80961037", "0.8029739", "0.7766117", "0.7704741", "0.70811933", "0.6713066", "0.648494", "0.64786816", "0.6461537", "0.6387213", "0.638419", "0.63225466", "0.6304995", "0.63047177", "0.62928706", "0.62527716", "0.6247133", "0.6220966", "0.62020767", "0.6166314...
0.85387015
0
test upsert other users template as staff raises access control error
def test_upsert_other_users_template_as_staff_raises_access_control_error( self, ): mock_request = create_mock_request(user=self.staff_user1) with self.assertRaises(AccessControlError): template_api.upsert( self.fixture.user2_template, request=mock_request ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_upsert_other_users_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self.superuser1)\n template_api.upsert(self.fixture.user2_template, request=mock_request)", "def test_upsert_own_template_as_staff_saves(self):\n mock_request = create_mock_request(user=s...
[ "0.8093766", "0.80680555", "0.80376196", "0.7835847", "0.77455807", "0.7744498", "0.76982164", "0.76218945", "0.736171", "0.7214227", "0.7022283", "0.6874125", "0.68300915", "0.68178946", "0.68173504", "0.6804541", "0.67034173", "0.66750884", "0.6632048", "0.6587507", "0.6538...
0.82656085
0
test upsert global template as staff saves
def test_upsert_global_template_as_staff_saves(self): mock_request = create_mock_request(user=self.staff_user1) template_api.upsert(self.fixture.global_template, request=mock_request)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_upsert_global_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self.superuser1)\n template_api.upsert(self.fixture.global_template, request=mock_request)", "def test_upsert_own_template_as_staff_saves(self):\n mock_request = create_mock_request(user=self....
[ "0.817305", "0.8163642", "0.78363234", "0.76788574", "0.7538798", "0.72347766", "0.6604227", "0.64778715", "0.6405772", "0.6319687", "0.62832665", "0.6279908", "0.6232745", "0.62278795", "0.6200194", "0.61855614", "0.6185184", "0.61763513", "0.61297494", "0.6127971", "0.61237...
0.86477035
0
test upsert own template as superuser saves
def test_upsert_own_template_as_superuser_saves(self): mock_request = create_mock_request(user=self.superuser1) template_api.upsert(self.fixture.user1_template, request=mock_request)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_upsert_global_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self.superuser1)\n template_api.upsert(self.fixture.global_template, request=mock_request)", "def test_upsert_other_users_template_as_superuser_saves(self):\n mock_request = create_mock_reques...
[ "0.83650684", "0.8313205", "0.83011836", "0.7990907", "0.77972287", "0.69682634", "0.6701379", "0.6564317", "0.64938676", "0.64082444", "0.63623893", "0.6311204", "0.6286057", "0.6261494", "0.6255452", "0.62456673", "0.6227969", "0.61704993", "0.61659986", "0.6132771", "0.611...
0.86755675
0
test upsert other users template as superuser saves
def test_upsert_other_users_template_as_superuser_saves(self): mock_request = create_mock_request(user=self.superuser1) template_api.upsert(self.fixture.user2_template, request=mock_request)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_upsert_own_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self.superuser1)\n template_api.upsert(self.fixture.user1_template, request=mock_request)", "def test_upsert_own_template_as_user_saves(self):\n mock_request = create_mock_request(user=self.user1...
[ "0.8743067", "0.8495421", "0.82973075", "0.80561215", "0.77087814", "0.6882263", "0.67282534", "0.6710842", "0.6694126", "0.66577846", "0.66266376", "0.65471303", "0.63964623", "0.6395424", "0.6271223", "0.62125725", "0.6190717", "0.61589557", "0.6157732", "0.6142412", "0.609...
0.88003814
0
test upsert global template as superuser saves
def test_upsert_global_template_as_superuser_saves(self): mock_request = create_mock_request(user=self.superuser1) template_api.upsert(self.fixture.global_template, request=mock_request)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_upsert_own_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self.superuser1)\n template_api.upsert(self.fixture.user1_template, request=mock_request)", "def test_upsert_other_users_template_as_superuser_saves(self):\n mock_request = create_mock_request(us...
[ "0.8367511", "0.80747837", "0.8019871", "0.7914993", "0.75762117", "0.7137918", "0.68105483", "0.6717558", "0.64962363", "0.6318845", "0.62885976", "0.62019926", "0.62019926", "0.61965513", "0.6134998", "0.61280674", "0.61277187", "0.61214155", "0.61206126", "0.6063399", "0.6...
0.8720903
0
test set display name user template as anonymous raises access control error
def test_set_display_name_user_template_as_anonymous_raises_access_control_error( self, ): mock_request = create_mock_request(user=self.anonymous_user) with self.assertRaises(AccessControlError): template_api.set_display_name( self.fixture.user1_template, "new_nam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_display_name_user_template_as_anonymous_with_access_right_access_raises_control_error(\n self,\n ):\n mock_request = create_mock_request(user=self.anonymous_user)\n with self.assertRaises(AccessControlError):\n template_api.set_display_name(\n self.fix...
[ "0.7858779", "0.78346056", "0.7798927", "0.7767267", "0.7345611", "0.7203787", "0.7118784", "0.69429713", "0.6838001", "0.6815123", "0.65575707", "0.64346975", "0.6426258", "0.64122313", "0.6399105", "0.6327164", "0.6311326", "0.62794083", "0.62768495", "0.62200284", "0.62012...
0.79632276
0
test set display name user template as anonymous with right access raises access control error
def test_set_display_name_user_template_as_anonymous_with_access_right_access_raises_control_error( self, ): mock_request = create_mock_request(user=self.anonymous_user) with self.assertRaises(AccessControlError): template_api.set_display_name( self.fixture.user1_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_display_name_global_template_as_user_raises_access_control_error(\n self,\n ):\n mock_request = create_mock_request(user=self.user1)\n with self.assertRaises(AccessControlError):\n template_api.set_display_name(\n self.fixture.global_template, \"new_na...
[ "0.7932997", "0.7856808", "0.7826848", "0.7630959", "0.75949347", "0.7490484", "0.7073472", "0.68847364", "0.6830498", "0.6753237", "0.6647094", "0.65420926", "0.6539563", "0.6489039", "0.6448539", "0.6360224", "0.63581413", "0.63525265", "0.6342854", "0.6306662", "0.6250822"...
0.7989204
0
test set display name global template as anonymous raises access control error
def test_set_display_name_global_template_as_anonymous_raises_access_control_error( self, ): mock_request = create_mock_request(user=self.anonymous_user) with self.assertRaises(AccessControlError): template_api.set_display_name( self.fixture.global_template, "new_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_display_name_global_template_as_anonymous_with_access_right_access_raises_control_error(\n self,\n ):\n mock_request = create_mock_request(user=self.anonymous_user)\n with self.assertRaises(AccessControlError):\n template_api.set_display_name(\n self.f...
[ "0.75897294", "0.7537711", "0.71880955", "0.7096142", "0.70061153", "0.6705285", "0.6676191", "0.66185564", "0.6505029", "0.6454833", "0.64344525", "0.64255494", "0.64228266", "0.637963", "0.6351018", "0.6320668", "0.6286474", "0.627791", "0.6211061", "0.6122106", "0.6110267"...
0.7648022
0
test set display name global template as anonymous with right access raises access control error
def test_set_display_name_global_template_as_anonymous_with_access_right_access_raises_control_error( self, ): mock_request = create_mock_request(user=self.anonymous_user) with self.assertRaises(AccessControlError): template_api.set_display_name( self.fixture.glob...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_display_name_global_template_as_user_raises_access_control_error(\n self,\n ):\n mock_request = create_mock_request(user=self.user1)\n with self.assertRaises(AccessControlError):\n template_api.set_display_name(\n self.fixture.global_template, \"new_na...
[ "0.7787586", "0.7674045", "0.7377819", "0.7261662", "0.6899707", "0.68808687", "0.6835308", "0.66616756", "0.665786", "0.659236", "0.64996874", "0.64823717", "0.6461565", "0.64222765", "0.6356866", "0.63562834", "0.6349354", "0.62561953", "0.62519723", "0.6238655", "0.6195329...
0.781777
0
test set display name own template as user saves
def test_set_display_name_own_template_as_user_saves(self): mock_request = create_mock_request(user=self.user1) template_api.set_display_name( self.fixture.user1_template, "new_name", request=mock_request )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_display_name_own_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self.superuser1)\n template_api.set_display_name(\n self.fixture.user1_template, \"new_name\", request=mock_request\n )", "def test_set_display_name_global_template_as_superu...
[ "0.8407966", "0.80694634", "0.8063102", "0.80549467", "0.7798652", "0.66668653", "0.6442892", "0.6430442", "0.64100146", "0.6407068", "0.6372801", "0.6296744", "0.62810963", "0.6225347", "0.62165725", "0.6200509", "0.614207", "0.6102368", "0.60813653", "0.606519", "0.6063235"...
0.85820955
0
test set display name other users template as user raises access control error
def test_set_display_name_other_users_template_as_user_raises_access_control_error( self, ): mock_request = create_mock_request(user=self.user1) with self.assertRaises(AccessControlError): template_api.set_display_name( self.fixture.user2_template, "new_name", req...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_display_name_global_template_as_user_raises_access_control_error(\n self,\n ):\n mock_request = create_mock_request(user=self.user1)\n with self.assertRaises(AccessControlError):\n template_api.set_display_name(\n self.fixture.global_template, \"new_na...
[ "0.781667", "0.76295245", "0.7623421", "0.7554093", "0.7485875", "0.7380692", "0.7249136", "0.72226626", "0.7183608", "0.71021247", "0.690039", "0.68378454", "0.6738137", "0.6521974", "0.65130067", "0.64845836", "0.6419813", "0.6398974", "0.62798584", "0.6274754", "0.6272008"...
0.7761642
1
test set display name global template as user raises access control error
def test_set_display_name_global_template_as_user_raises_access_control_error( self, ): mock_request = create_mock_request(user=self.user1) with self.assertRaises(AccessControlError): template_api.set_display_name( self.fixture.global_template, "new_name", request...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_display_name_global_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self.superuser1)\n template_api.set_display_name(\n self.fixture.global_template, \"new_name\", request=mock_request\n )", "def test_set_display_name_global_template_as_an...
[ "0.7700821", "0.74678564", "0.74317616", "0.73584545", "0.71953356", "0.717542", "0.71707886", "0.7160337", "0.7133445", "0.7056015", "0.7030654", "0.6843602", "0.64356554", "0.63337344", "0.63230735", "0.6301633", "0.62698174", "0.61883277", "0.60796994", "0.6052181", "0.602...
0.8097224
0
test set display name own template as staff saves
def test_set_display_name_own_template_as_staff_saves(self): mock_request = create_mock_request(user=self.staff_user1) template_api.set_display_name( self.fixture.user1_template, "new_name", request=mock_request )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_display_name_global_template_as_staff_saves(self):\n mock_request = create_mock_request(user=self.staff_user1)\n template_api.set_display_name(\n self.fixture.global_template, \"new_name\", request=mock_request\n )", "def test_set_display_name_own_template_as_superuse...
[ "0.81686586", "0.8027379", "0.7915645", "0.7679664", "0.7588453", "0.6449392", "0.63916004", "0.6336983", "0.62684387", "0.6225523", "0.6145685", "0.6063135", "0.5971488", "0.59581083", "0.59342474", "0.5905373", "0.58907783", "0.58565784", "0.5822107", "0.5810158", "0.579604...
0.83784217
0
test set display name other users template as staff raises access control error
def test_set_display_name_other_users_template_as_staff_raises_access_control_error( self, ): mock_request = create_mock_request(user=self.staff_user1) with self.assertRaises(AccessControlError): template_api.set_display_name( self.fixture.user2_template, "new_nam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_display_name_global_template_as_user_raises_access_control_error(\n self,\n ):\n mock_request = create_mock_request(user=self.user1)\n with self.assertRaises(AccessControlError):\n template_api.set_display_name(\n self.fixture.global_template, \"new_na...
[ "0.7605984", "0.75114775", "0.7504308", "0.7466337", "0.73538816", "0.73237705", "0.72009385", "0.71532315", "0.7143435", "0.70679027", "0.7065211", "0.68900466", "0.6495203", "0.6303495", "0.62762886", "0.62031066", "0.61975324", "0.611186", "0.60808223", "0.6078109", "0.605...
0.7945389
0
test set display name global template as staff saves
def test_set_display_name_global_template_as_staff_saves(self): mock_request = create_mock_request(user=self.staff_user1) template_api.set_display_name( self.fixture.global_template, "new_name", request=mock_request )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_display_name_global_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self.superuser1)\n template_api.set_display_name(\n self.fixture.global_template, \"new_name\", request=mock_request\n )", "def test_set_display_name_own_template_as_staff...
[ "0.797732", "0.7899517", "0.7656996", "0.74912006", "0.7292097", "0.63268197", "0.63199025", "0.6077075", "0.60042024", "0.5964463", "0.5939839", "0.59352934", "0.5881993", "0.58463675", "0.5831961", "0.57987887", "0.5791329", "0.57893497", "0.5787537", "0.57783663", "0.57675...
0.83542955
0
test set display name own template as superuser saves
def test_set_display_name_own_template_as_superuser_saves(self): mock_request = create_mock_request(user=self.superuser1) template_api.set_display_name( self.fixture.user1_template, "new_name", request=mock_request )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_display_name_global_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self.superuser1)\n template_api.set_display_name(\n self.fixture.global_template, \"new_name\", request=mock_request\n )", "def test_set_display_name_other_users_template_...
[ "0.8438995", "0.83652455", "0.833537", "0.8102639", "0.78686064", "0.68850815", "0.68802756", "0.6551571", "0.6550452", "0.65084565", "0.6417714", "0.6282435", "0.6254965", "0.62019694", "0.6200222", "0.6199461", "0.6178686", "0.6174682", "0.61705583", "0.6166246", "0.6165622...
0.87443316
0
test set display name other users template as superuser saves
def test_set_display_name_other_users_template_as_superuser_saves(self): mock_request = create_mock_request(user=self.superuser1) template_api.set_display_name( self.fixture.user2_template, "new_name", request=mock_request )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_display_name_own_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self.superuser1)\n template_api.set_display_name(\n self.fixture.user1_template, \"new_name\", request=mock_request\n )", "def test_set_display_name_own_template_as_user_save...
[ "0.86954796", "0.84089637", "0.8315249", "0.81048167", "0.7789354", "0.68137443", "0.67180014", "0.671064", "0.66610336", "0.64608216", "0.64309955", "0.6357091", "0.6354265", "0.62896585", "0.6275033", "0.62726456", "0.6256851", "0.6253841", "0.6180666", "0.61602503", "0.615...
0.85619307
1
test set display name global template as superuser saves
def test_set_display_name_global_template_as_superuser_saves(self): mock_request = create_mock_request(user=self.superuser1) template_api.set_display_name( self.fixture.global_template, "new_name", request=mock_request )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_set_display_name_own_template_as_superuser_saves(self):\n mock_request = create_mock_request(user=self.superuser1)\n template_api.set_display_name(\n self.fixture.user1_template, \"new_name\", request=mock_request\n )", "def test_set_display_name_global_template_as_staff_...
[ "0.8349105", "0.8043521", "0.803114", "0.78980434", "0.76408404", "0.6944795", "0.6716076", "0.63315207", "0.6187099", "0.6185814", "0.6185624", "0.6144165", "0.6111398", "0.6052481", "0.6048025", "0.6025103", "0.6016196", "0.60104704", "0.59897846", "0.5963223", "0.59628075"...
0.8690469
0
test get user template as anonymous raises access control error
def test_get_user_template_as_anonymous_raises_access_control_error(self): mock_request = create_mock_request(user=self.anonymous_user) with self.assertRaises(AccessControlError): template_api.get_by_id( self.fixture.user1_template.id, request=mock_request )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_global_template_as_anonymous_with_access_right_returns_template(\n self,\n ):\n mock_request = create_mock_request(user=self.anonymous_user)\n template = template_api.get_by_id(\n self.fixture.global_template.id, request=mock_request\n )\n self.assertEq...
[ "0.7613135", "0.7530476", "0.74307054", "0.7373814", "0.7083884", "0.70543534", "0.68818855", "0.68209565", "0.6811224", "0.6782865", "0.67101246", "0.6708908", "0.6702115", "0.6648804", "0.6645128", "0.6643842", "0.6637662", "0.66228014", "0.6600431", "0.6600431", "0.6591543...
0.771759
0
test get user template as anonymous with access right raises access control error
def test_get_user_template_as_anonymous_with_access_right_raises_access_control_error( self, ): mock_request = create_mock_request(user=self.anonymous_user) with self.assertRaises(AccessControlError): template_api.get_by_id( self.fixture.user1_template.id, request...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_user_template_as_anonymous_raises_access_control_error(self):\n mock_request = create_mock_request(user=self.anonymous_user)\n with self.assertRaises(AccessControlError):\n template_api.get_by_id(\n self.fixture.user1_template.id, request=mock_request\n ...
[ "0.7802844", "0.761705", "0.74833226", "0.7385939", "0.73700815", "0.71119964", "0.7104591", "0.7072025", "0.70250964", "0.69441444", "0.69394386", "0.6929122", "0.6896489", "0.6861342", "0.6857833", "0.68518734", "0.68487626", "0.6787184", "0.67862386", "0.67814267", "0.6779...
0.7892447
0
test get global template as anonymous raises access control error
def test_get_global_template_as_anonymous_raises_access_control_error( self, ): mock_request = create_mock_request(user=self.anonymous_user) with self.assertRaises(AccessControlError): template_api.get_by_id( self.fixture.global_template.id, request=mock_request ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_global_template_as_anonymous_with_access_right_returns_template(\n self,\n ):\n mock_request = create_mock_request(user=self.anonymous_user)\n template = template_api.get_by_id(\n self.fixture.global_template.id, request=mock_request\n )\n self.assertEq...
[ "0.785796", "0.71265125", "0.6954985", "0.68960994", "0.6858321", "0.6774985", "0.6732087", "0.6653357", "0.6604685", "0.6559678", "0.65291065", "0.6520919", "0.6491397", "0.64557844", "0.6435501", "0.6425238", "0.6417766", "0.64098907", "0.6396767", "0.6332146", "0.63056093"...
0.71931285
1
test get global template as anonymous with access right returns template
def test_get_global_template_as_anonymous_with_access_right_returns_template( self, ): mock_request = create_mock_request(user=self.anonymous_user) template = template_api.get_by_id( self.fixture.global_template.id, request=mock_request ) self.assertEqual(template...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_register_template(self):\n pass", "def test_template(self):\n\t\tself.assertTemplateUsed(self.resp, 'inicio.html')", "def test_global_template_as_user_returns_template(self):\n mock_request = create_mock_request(user=self.user1)\n template = template_api.get_by_id(\n se...
[ "0.70452297", "0.6979728", "0.6953223", "0.6897253", "0.6785385", "0.67305106", "0.6662983", "0.6630868", "0.6611546", "0.6584987", "0.64204043", "0.6409127", "0.6400355", "0.63896936", "0.6384356", "0.6382421", "0.63582236", "0.63414955", "0.6315141", "0.63053435", "0.630063...
0.7544306
0
test get own template as user returns template
def test_get_own_template_as_user_returns_template(self): mock_request = create_mock_request(user=self.user1) template = template_api.get_by_id( self.fixture.user1_template.id, request=mock_request ) self.assertEqual(template, self.fixture.user1_template)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_global_template_as_user_returns_template(self):\n mock_request = create_mock_request(user=self.user1)\n template = template_api.get_by_id(\n self.fixture.global_template.id, request=mock_request\n )\n self.assertEqual(template, self.fixture.global_template)", "def ...
[ "0.7584183", "0.7570242", "0.72331774", "0.70984966", "0.7098218", "0.7063988", "0.7001504", "0.6864687", "0.68602484", "0.68589157", "0.68428886", "0.683652", "0.6823558", "0.6793858", "0.678562", "0.6754005", "0.67517126", "0.6653689", "0.6648483", "0.663962", "0.6636065", ...
0.804826
0
test global template as user returns template
def test_global_template_as_user_returns_template(self): mock_request = create_mock_request(user=self.user1) template = template_api.get_by_id( self.fixture.global_template.id, request=mock_request ) self.assertEqual(template, self.fixture.global_template)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_template(self):\n\t\tself.assertTemplateUsed(self.resp, 'inicio.html')", "def test_for_template(self):\n self.assertTemplateUsed(self.response, 'my_info_template.html')", "def test_register_template(self):\n pass", "def test_correct_template(self):\n self.assertCorrectTemplateUs...
[ "0.7413665", "0.71893036", "0.71573037", "0.7118237", "0.70851064", "0.70015204", "0.70013285", "0.69383097", "0.69311833", "0.6842954", "0.6815864", "0.6794427", "0.675918", "0.67283905", "0.67238855", "0.67194635", "0.67149615", "0.66608965", "0.66568184", "0.6656136", "0.6...
0.783242
0
test get other users template raises access control error
def test_get_other_users_template_raises_access_control_error(self): mock_request = create_mock_request(user=self.user1) with self.assertRaises(AccessControlError): template_api.get_by_id( self.fixture.user2_template.id, request=mock_request )
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_other_users_template_as_staff_raises_access_control_error(\n self,\n ):\n mock_request = create_mock_request(user=self.staff_user1)\n with self.assertRaises(AccessControlError):\n template_api.get_by_id(\n self.fixture.user2_template.id, request=mock_r...
[ "0.77614397", "0.744975", "0.7427578", "0.74270964", "0.73795503", "0.7345958", "0.7273537", "0.71408963", "0.70783716", "0.70651674", "0.7050977", "0.7047117", "0.7017474", "0.6984865", "0.69814235", "0.6955635", "0.69546133", "0.6926745", "0.691739", "0.68871033", "0.688575...
0.7893574
0
test get any template as superuser returns template
def test_get_any_template_as_superuser_returns_template(self): mock_request = create_mock_request(user=self.superuser1) template = template_api.get_by_id( self.fixture.user1_template.id, request=mock_request ) self.assertEqual(template, self.fixture.user1_template) te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_own_template_as_user_returns_template(self):\n mock_request = create_mock_request(user=self.user1)\n template = template_api.get_by_id(\n self.fixture.user1_template.id, request=mock_request\n )\n self.assertEqual(template, self.fixture.user1_template)", "def t...
[ "0.7339057", "0.7293115", "0.72650164", "0.7177737", "0.71384394", "0.7035053", "0.69855136", "0.6984406", "0.69122374", "0.68956125", "0.6870337", "0.6849097", "0.68091345", "0.6803988", "0.6782561", "0.6699082", "0.6676653", "0.66753626", "0.6625917", "0.6607886", "0.659822...
0.8227463
0
test get other users template as staff raises access control error
def test_get_other_users_template_as_staff_raises_access_control_error( self, ): mock_request = create_mock_request(user=self.staff_user1) with self.assertRaises(AccessControlError): template_api.get_by_id( self.fixture.user2_template.id, request=mock_request ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_all_as_staff_returns_accessible_templates(self):\n mock_request = create_mock_request(user=self.staff_user)\n templates = template_api.get_all(request=mock_request)\n self.assertEqual(templates.count(), 2)\n self.assertTrue(self.fixture.user2_template in list(templates))\n ...
[ "0.7629151", "0.7563176", "0.7399048", "0.7349483", "0.7239654", "0.72377974", "0.71758187", "0.7138686", "0.7097173", "0.70346177", "0.69860995", "0.69852465", "0.6982948", "0.6961766", "0.69112176", "0.68938357", "0.6879274", "0.68733513", "0.68609065", "0.6852134", "0.6851...
0.7947971
0
test get all accessible by id list as user returns accessible templates
def test_get_all_accessible_by_id_list_as_user_returns_accessible_templates( self, ): mock_request = create_mock_request(user=self.user1) templates = template_api.get_all_accessible_by_id_list( self.template_id_list, request=mock_request ) self.assertTrue(self.fix...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_all_accessible_by_id_list_as_superuser_returns_accessible_templates(\n self,\n ):\n mock_request = create_mock_request(user=self.superuser1)\n templates = template_api.get_all_accessible_by_id_list(\n self.template_id_list, request=mock_request\n )\n se...
[ "0.8352081", "0.80351096", "0.79949486", "0.7815422", "0.7592258", "0.7508703", "0.74799454", "0.74594754", "0.73707", "0.73137105", "0.7222853", "0.72029865", "0.7198696", "0.7193153", "0.7169572", "0.71223384", "0.7113321", "0.7107858", "0.7107429", "0.7094072", "0.7044061"...
0.8439678
0
test get all accessible by id list as staff returns accessible templates
def test_get_all_accessible_by_id_list_as_staff_returns_accessible_templates( self, ): mock_request = create_mock_request(user=self.staff_user1) templates = template_api.get_all_accessible_by_id_list( self.template_id_list, request=mock_request ) self.assertTrue(s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_all_accessible_by_id_list_as_superuser_returns_accessible_templates(\n self,\n ):\n mock_request = create_mock_request(user=self.superuser1)\n templates = template_api.get_all_accessible_by_id_list(\n self.template_id_list, request=mock_request\n )\n se...
[ "0.82006174", "0.8090239", "0.77482426", "0.75997865", "0.7364636", "0.7320834", "0.7100239", "0.709316", "0.70638084", "0.6977362", "0.6968302", "0.6900248", "0.6848204", "0.68399364", "0.6752305", "0.67282224", "0.66968644", "0.6675989", "0.6672316", "0.6604715", "0.6595715...
0.8391006
0
test get all accessible by id list as superuser returns accessible templates
def test_get_all_accessible_by_id_list_as_superuser_returns_accessible_templates( self, ): mock_request = create_mock_request(user=self.superuser1) templates = template_api.get_all_accessible_by_id_list( self.template_id_list, request=mock_request ) self.assertTru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_all_accessible_by_id_list_as_user_returns_accessible_templates(\n self,\n ):\n mock_request = create_mock_request(user=self.user1)\n templates = template_api.get_all_accessible_by_id_list(\n self.template_id_list, request=mock_request\n )\n self.assertT...
[ "0.8283416", "0.8071495", "0.7812368", "0.7686281", "0.7590276", "0.7461408", "0.73253256", "0.7286531", "0.72477025", "0.7221876", "0.7189584", "0.7163987", "0.71550506", "0.7076607", "0.70374113", "0.7007362", "0.6996137", "0.6994254", "0.69909936", "0.6976883", "0.6971435"...
0.848242
0
test get all accessible by hash as anonymous with access right does not return user template
def test_get_all_accessible_by_hash_as_anonymous_with_access_right_does_not_return_user_template( self, ): mock_request = create_mock_request(user=self.anonymous_user) templates = template_api.get_all_accessible_by_hash( self.fixture.user1_template.hash, request=mock_request ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_all_accessible_by_hash_as_user_returns_user_template(self):\n mock_request = create_mock_request(user=self.user1)\n templates = template_api.get_all_accessible_by_hash(\n self.fixture.user1_template.hash, request=mock_request\n )\n self.assertTrue(self.fixture.us...
[ "0.8095653", "0.806779", "0.80041444", "0.7907132", "0.78913945", "0.7886816", "0.78815126", "0.78513587", "0.7806266", "0.78028685", "0.77374506", "0.7678337", "0.7658116", "0.7651516", "0.764455", "0.76145715", "0.76107323", "0.75198156", "0.74943686", "0.74373174", "0.7349...
0.8092452
1
test get all accessible by hash as anonymous with access right returns global
def test_get_all_accessible_by_hash_as_anonymous_with_access_right_returns_global( self, ): mock_request = create_mock_request(user=self.anonymous_user) templates = template_api.get_all_accessible_by_hash( self.fixture.global_template.hash, request=mock_request ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_all_accessible_by_hash_list_as_anonymous_with_access_right_returns_global(\n self,\n ):\n mock_request = create_mock_request(user=self.anonymous_user)\n templates = template_api.get_all_accessible_by_hash_list(\n [self.fixture.global_template.hash], request=mock_requ...
[ "0.73483837", "0.689207", "0.67723614", "0.670583", "0.6545129", "0.65434605", "0.6489687", "0.6428047", "0.6337772", "0.6308074", "0.62926304", "0.6243798", "0.62265044", "0.6103865", "0.60600764", "0.59886754", "0.5965506", "0.5956311", "0.58755183", "0.5861098", "0.5853029...
0.74907875
0
test get all accessible by hash as user returns user template
def test_get_all_accessible_by_hash_as_user_returns_user_template(self): mock_request = create_mock_request(user=self.user1) templates = template_api.get_all_accessible_by_hash( self.fixture.user1_template.hash, request=mock_request ) self.assertTrue(self.fixture.user1_templa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_all_accessible_by_hash_list_as_user_returns_user_template(\n self,\n ):\n mock_request = create_mock_request(user=self.user1)\n templates = template_api.get_all_accessible_by_hash_list(\n [self.fixture.user1_template.hash], request=mock_request\n )\n se...
[ "0.8098597", "0.8081005", "0.7892589", "0.78061783", "0.7657671", "0.7553108", "0.75217694", "0.7494131", "0.74738395", "0.7454518", "0.74189186", "0.7417", "0.7356148", "0.7336483", "0.7324792", "0.7279816", "0.72666675", "0.709681", "0.70890576", "0.7072468", "0.70683414", ...
0.82444835
0
test get all accessible by hash as user returns global template
def test_get_all_accessible_by_hash_as_user_returns_global_template(self): mock_request = create_mock_request(user=self.user1) templates = template_api.get_all_accessible_by_hash( self.fixture.global_template.hash, request=mock_request ) self.assertTrue(self.fixture.user1_tem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_all_accessible_by_hash_as_superuser_returns_global_template(\n self,\n ):\n mock_request = create_mock_request(user=self.superuser1)\n templates = template_api.get_all_accessible_by_hash(\n self.fixture.global_template.hash, request=mock_request\n )\n s...
[ "0.78114414", "0.7711554", "0.7618051", "0.7576764", "0.7534922", "0.7504542", "0.7402011", "0.7372285", "0.7325458", "0.73088026", "0.72421944", "0.7232947", "0.7059146", "0.69722897", "0.6888439", "0.6876363", "0.6872592", "0.6841043", "0.6835622", "0.6817873", "0.6812515",...
0.78586036
0
test get all accessible by hash as staff returns user template
def test_get_all_accessible_by_hash_as_staff_returns_user_template(self): mock_request = create_mock_request(user=self.staff_user1) templates = template_api.get_all_accessible_by_hash( self.fixture.user1_template.hash, request=mock_request ) self.assertTrue(self.fixture.user1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_all_accessible_by_hash_list_as_staff_returns_user_template(\n self,\n ):\n mock_request = create_mock_request(user=self.staff_user1)\n templates = template_api.get_all_accessible_by_hash_list(\n [self.fixture.user1_template.hash], request=mock_request\n )\n ...
[ "0.8139061", "0.8013623", "0.7913836", "0.79138297", "0.78755826", "0.76368785", "0.7610415", "0.7501855", "0.74841386", "0.748", "0.7479454", "0.7447994", "0.7435938", "0.7394545", "0.7359369", "0.7324257", "0.7323782", "0.730924", "0.73041713", "0.727378", "0.7266767", "0...
0.8235352
0
test get all accessible by hash as staff returns global template
def test_get_all_accessible_by_hash_as_staff_returns_global_template(self): mock_request = create_mock_request(user=self.staff_user1) templates = template_api.get_all_accessible_by_hash( self.fixture.global_template.hash, request=mock_request ) self.assertTrue(self.fixture.us...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_all_accessible_by_hash_as_superuser_returns_global_template(\n self,\n ):\n mock_request = create_mock_request(user=self.superuser1)\n templates = template_api.get_all_accessible_by_hash(\n self.fixture.global_template.hash, request=mock_request\n )\n s...
[ "0.7497486", "0.74746835", "0.7385293", "0.7356151", "0.73261195", "0.72790205", "0.7225152", "0.71621686", "0.7087019", "0.7080861", "0.7057837", "0.7043345", "0.6963795", "0.678838", "0.66819537", "0.6676437", "0.6665664", "0.66606534", "0.66260237", "0.65794927", "0.655635...
0.7554428
0
test get all accessible by hash as superuser returns user template
def test_get_all_accessible_by_hash_as_superuser_returns_user_template( self, ): mock_request = create_mock_request(user=self.superuser1) templates = template_api.get_all_accessible_by_hash( self.fixture.user1_template.hash, request=mock_request ) self.assertTrue(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_all_accessible_by_hash_list_as_superuser_returns_user_template(\n self,\n ):\n mock_request = create_mock_request(user=self.superuser1)\n templates = template_api.get_all_accessible_by_hash_list(\n [self.fixture.user1_template.hash], request=mock_request\n )\n...
[ "0.8170202", "0.80604655", "0.7951915", "0.7856463", "0.7822592", "0.7790313", "0.7743123", "0.7713884", "0.76898307", "0.7519109", "0.74388695", "0.74056834", "0.7391", "0.7362122", "0.72886634", "0.72467566", "0.72302586", "0.72219735", "0.7183007", "0.7155218", "0.7108288"...
0.8338196
0