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 |
|---|---|---|---|---|---|---|
return a list of launchctl jobs | def jobs():
result = []
out = subprocess.check_output(["/bin/launchctl", "list"]).decode()
for row in out.splitlines()[1:]:
result.append(Job(row))
return result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def list_jobs():\n\n name_to_job_details = redis_controller.get_name_to_job_details()\n return list(name_to_job_details.values())",
"def get_job_list(self):\n job_list = []\n if mysql.job_list() == None:\n return job_list\n return mysql.job_list()",
"def get_job_list(self)... | [
"0.75268865",
"0.74177295",
"0.7316447",
"0.7316447",
"0.7287438",
"0.72692484",
"0.7171846",
"0.7167475",
"0.70733964",
"0.70607454",
"0.70535725",
"0.6998129",
"0.6989889",
"0.6981516",
"0.69562024",
"0.6879983",
"0.68787724",
"0.6878676",
"0.6867623",
"0.6864786",
"0.68424... | 0.90767395 | 0 |
return launchctl Job by label | def job(label):
args = ["/bin/launchctl", "list", label]
try:
out = subprocess.check_output(args, stderr=subprocess.PIPE).decode()
except subprocess.CalledProcessError:
return {}
result = dict()
for l in out.splitlines():
if '" =' in l:
key = l.split('"')[1]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_label(self):\n return self.job[self.label_key]",
"def get_job(arn=None):\n pass",
"def describe_labeling_job(LabelingJobName=None):\n pass",
"def getJob(workload):\n job = Job()\n job[\"task\"] = workload.getTask(\"reco\").getPathName()\n job[\"workflow\"] = workload.name()\n ... | [
"0.6574482",
"0.6400362",
"0.6297643",
"0.62283015",
"0.60707647",
"0.6054989",
"0.5987776",
"0.5968032",
"0.5896753",
"0.58894867",
"0.58527464",
"0.5774539",
"0.576838",
"0.5759949",
"0.5696377",
"0.56816596",
"0.5640152",
"0.5618625",
"0.55981123",
"0.55924726",
"0.5580069... | 0.69620067 | 0 |
`launchctl load args ...` | def load(args):
subprocess.check_call(["/bin/launchctl", "load"] + values.get(args)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def command_load(interface,command,args):\n try:\n modules.add_module(args)\n interface.reply(\"Loaded %s\"%args)\n except ImportError, e:\n interface.reply(str(e))\n except modules.ModuleAlreadyLoaded, e:\n interface.reply(str(e))",
"def load(config, args):\n if not confi... | [
"0.6184129",
"0.61021316",
"0.6064692",
"0.5866353",
"0.58628905",
"0.57692635",
"0.5754486",
"0.5707438",
"0.5625865",
"0.55694574",
"0.54974216",
"0.547894",
"0.54693526",
"0.54135334",
"0.54077977",
"0.54077977",
"0.54077977",
"0.54077977",
"0.54077977",
"0.54077977",
"0.5... | 0.9238946 | 0 |
`launchctl unload args ...` | def unload(args):
subprocess.check_call(["/bin/launchctl", "unload"] + values.get(args)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def command_unload(interface,command,args):\n if modules.unload_module(args):\n interface.reply(\"Unloaded %s\"%args)\n else:\n interface.reply(\"No module called \"+args)",
"def unload(ctx):\n if not is_owner(ctx.update):\n return\n global cmds\n\n cmds.unload_ext(ctx.args[0]... | [
"0.6935878",
"0.6486568",
"0.62760407",
"0.62271893",
"0.6086",
"0.6053234",
"0.6049581",
"0.6018258",
"0.6013652",
"0.5982204",
"0.5973928",
"0.5954333",
"0.591681",
"0.5778235",
"0.5767804",
"0.5752143",
"0.5750813",
"0.572042",
"0.5687898",
"0.56791425",
"0.5668594",
"0.... | 0.9356745 | 0 |
Print Structured Attributes List | def ListAttributes(self):
print("\n")
print("Attributes List of: " + repr(self.__dict__["name"]) + " - " + self.__class__.__name__ + " Instance\n")
self_keys = self.__dict__.keys()
self_keys.sort()
for key in self_keys:
if key != "name":
print(str(key) + " : " + repr(self.__dict... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def print_attribute(attributes):\n for attribute in attributes:\n print ' ',\n change_color_by_tag(attribute)\n if attribute['ExtAttributes']:\n print_extattributes_of_member(attribute['ExtAttributes'])\n print attribute['Type'],\n print attribute['Name']",
"de... | [
"0.78338",
"0.7149046",
"0.70941865",
"0.7048754",
"0.700462",
"0.68649495",
"0.6854237",
"0.6829835",
"0.66025984",
"0.66025984",
"0.65633154",
"0.6545839",
"0.65184635",
"0.6487063",
"0.6401863",
"0.6369569",
"0.6275942",
"0.6246306",
"0.6239111",
"0.61983514",
"0.6197879",... | 0.71671486 | 1 |
Merge breweries whose names end in common endings | def merge_common_ending_breweries(apps, schema_editor):
mfg_model = apps.get_model("beers.Manufacturer")
mfgs = mfg_model.objects.all().prefetch_related("beers").order_by("name")
if not mfgs.exists():
return
mfg_dict = {}
for mfg in mfgs:
key = ENDINGS_REGEX.sub("", mfg.name.strip())... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def merge(decks):\n\ta = (mergesort(decks))\n\treturn ''.join([item[1] for item in a]) #if type(item[1]) == str])",
"def bridges(species1_names, species2_names):\n k12 = filter(lambda s: re.search('K-12',s)!=None, species1_names)[0]\n return [(k12, species2_names[0]), (k12, species2_names[1]), (k12, specie... | [
"0.5485078",
"0.5347831",
"0.5290579",
"0.5185859",
"0.51777345",
"0.5078765",
"0.5014106",
"0.4983085",
"0.4975127",
"0.49336234",
"0.49133992",
"0.48723274",
"0.48421687",
"0.48346683",
"0.48314896",
"0.481305",
"0.47720924",
"0.47555465",
"0.47384843",
"0.47266632",
"0.469... | 0.6973194 | 0 |
Return the value with its absolute value capped at max_abs_val. Particularly useful in passing values to trignometric functions where numerical errors may result in an argument > 1 being passed in. | def _abs_cap(val, max_abs_val=1):
return max(min(val, max_abs_val), -max_abs_val) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def absolute_value(val):\n if val < 0:\n return val * -1\n else:\n return val",
"def max_abs(self):\n\n return np.nanmax(self.abs_data)",
"def absmax(self):\n raise NotImplementedError",
"def abs(value):\n return _abs(value)",
"def absolute_value(num):\r\n\r\n\tif num >... | [
"0.8001268",
"0.7817977",
"0.75021356",
"0.7491854",
"0.7161895",
"0.71245515",
"0.6992386",
"0.6872164",
"0.6853855",
"0.6836308",
"0.68306905",
"0.6730078",
"0.67199206",
"0.6705557",
"0.66976607",
"0.6683804",
"0.6643327",
"0.6637594",
"0.66115874",
"0.65998846",
"0.653243... | 0.8387686 | 0 |
Construct cubic Lattice from lattice parameter information. | def cubic(cls, a):
return cls.from_parameters(a, a, a, 90, 90, 90) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lattice_parameters(self):\n return self.a, self.b, self.c, self.alpha, self.beta, self.gamma",
"def createFccLattice(nx, ny, nz, lat, atoms):\n nb = 4 # number of atoms in this basis\n\n basis = [ (0.25, 0.25, 0.25),\n (0.25, 0.75, 0.75),\n (0.75, 0.25, 0.75),\n ... | [
"0.5865546",
"0.5748336",
"0.5666957",
"0.55467105",
"0.5450727",
"0.5394808",
"0.5357581",
"0.53337705",
"0.532546",
"0.52853566",
"0.5280653",
"0.52546567",
"0.52398723",
"0.5231569",
"0.51963365",
"0.516324",
"0.510751",
"0.50781393",
"0.50601083",
"0.5059282",
"0.49931273... | 0.58098316 | 1 |
Return reciprocal Lattice without 2 pi. | def reciprocal_lattice_crystallographic(self):
return Latt(self.reciprocal_lattice().lattice / (2 * np.pi)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _calculate_reciprocal_lattice(self, lattice):\n self.lattice = np.array(lattice)\n self.a, self.b, self.c, self.alpha, self.beta, self.gamma = self.convert_unitcell_to_abc()\n self.volume = self.calculate_volume()\n self.inverse_lattice = np.linalg.inv(self.lattice)\n self.re... | [
"0.6434281",
"0.6356001",
"0.6325966",
"0.61993206",
"0.5955075",
"0.58499116",
"0.58014375",
"0.5687242",
"0.56742454",
"0.5637516",
"0.5507295",
"0.5504388",
"0.54821193",
"0.54796284",
"0.5474372",
"0.5442303",
"0.5441034",
"0.54020536",
"0.5396902",
"0.53720015",
"0.53711... | 0.6934199 | 0 |
__init__(itkMapContainerULLQEMPF2GQEULLULLBBT self) > itkMapContainerULLQEMPF2GQEULLULLBBT | def __init__(self, *args):
_itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_swiginit(self, _itkQuadEdgeCellTraitsInfoPython.new_itkMapContainerULLQEMPF2GQEULLULLBBT(*args)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, *args):\n _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_swiginit(self, _itkQuadEdgeCellTraitsInfoPython.new_itkMapContainerULLQEMPF3GQEULLULLBBT(*args))",
"def __init__(self):\n self.map = [None] * 103",
"def __init__(self):\n self.map = {}",
"d... | [
"0.79345864",
"0.76963794",
"0.75563055",
"0.75461316",
"0.7378565",
"0.7350856",
"0.7249768",
"0.7219285",
"0.7169072",
"0.7148481",
"0.71166354",
"0.7104695",
"0.70580196",
"0.70580196",
"0.7051695",
"0.7020639",
"0.7018949",
"0.70136887",
"0.70077914",
"0.6971941",
"0.6957... | 0.7942699 | 0 |
Clone(itkMapContainerULLQEMPF2GQEULLULLBBT self) > itkMapContainerULLQEMPF2GQEULLULLBBT_Pointer | def Clone(self) -> "itkMapContainerULLQEMPF2GQEULLULLBBT_Pointer":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_Clone(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Clone(self) -> \"itkMapContainerULLQEMPF3GQEULLULLBBT_Pointer\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_Clone(self)",
"def copy(self):\n return self.__class__(*self.maps[:-1], self.maps[-1].copy())",
"def clone(self):\n clone = super(LongObjectHa... | [
"0.86572057",
"0.6687034",
"0.6549298",
"0.64304143",
"0.641088",
"0.63915414",
"0.6387558",
"0.63794076",
"0.6363039",
"0.63559914",
"0.63504773",
"0.63419276",
"0.6325833",
"0.6322307",
"0.631916",
"0.6290998",
"0.6275416",
"0.6236284",
"0.6230293",
"0.6228181",
"0.62214595... | 0.86794245 | 0 |
ElementAt(itkMapContainerULLQEMPF2GQEULLULLBBT self, unsigned long long arg0) > itkQuadEdgeMeshPointF2GQEULLULLBBT ElementAt(itkMapContainerULLQEMPF2GQEULLULLBBT self, unsigned long long arg0) > itkQuadEdgeMeshPointF2GQEULLULLBBT | def ElementAt(self, *args) -> "itkQuadEdgeMeshPointF2GQEULLULLBBT const &":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_ElementAt(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ElementAt(self, *args) -> \"itkQuadEdgeMeshPointF3GQEULLULLBBT const &\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_ElementAt(self, *args)",
"def GetElement(self, arg0: 'unsigned long long') -> \"itkQuadEdgeMeshPointF2GQEULLULLBBT\":\n return _itkQuadEdgeCel... | [
"0.74191165",
"0.6781053",
"0.66617745",
"0.66471124",
"0.6574941",
"0.65670234",
"0.64782155",
"0.58856845",
"0.57863116",
"0.5528996",
"0.5412303",
"0.53194934",
"0.5318969",
"0.530356",
"0.518332",
"0.51121044",
"0.510326",
"0.5097565",
"0.5074448",
"0.50576",
"0.5053062",... | 0.76213014 | 0 |
CreateElementAt(itkMapContainerULLQEMPF2GQEULLULLBBT self, unsigned long long arg0) > itkQuadEdgeMeshPointF2GQEULLULLBBT | def CreateElementAt(self, arg0: 'unsigned long long') -> "itkQuadEdgeMeshPointF2GQEULLULLBBT &":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_CreateElementAt(self, arg0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CreateElementAt(self, arg0: 'unsigned long long') -> \"itkQuadEdgeMeshPointF3GQEULLULLBBT &\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_CreateElementAt(self, arg0)",
"def ElementAt(self, *args) -> \"itkQuadEdgeMeshPointF2GQEULLULLBBT const &\":\n return _it... | [
"0.83847344",
"0.7009361",
"0.6858077",
"0.68130517",
"0.6755191",
"0.6703865",
"0.66168433",
"0.66037226",
"0.6512275",
"0.6481058",
"0.6435855",
"0.6133392",
"0.60447013",
"0.60147154",
"0.59239036",
"0.59181464",
"0.58116883",
"0.53792495",
"0.52921975",
"0.5249089",
"0.52... | 0.84646785 | 0 |
GetElement(itkMapContainerULLQEMPF2GQEULLULLBBT self, unsigned long long arg0) > itkQuadEdgeMeshPointF2GQEULLULLBBT | def GetElement(self, arg0: 'unsigned long long') -> "itkQuadEdgeMeshPointF2GQEULLULLBBT":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_GetElement(self, arg0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GetElement(self, arg0: 'unsigned long long') -> \"itkQuadEdgeMeshPointF3GQEULLULLBBT\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_GetElement(self, arg0)",
"def ElementAt(self, *args) -> \"itkQuadEdgeMeshPointF2GQEULLULLBBT const &\":\n return _itkQuadEdgeCel... | [
"0.78330195",
"0.75316066",
"0.72784543",
"0.6811171",
"0.6704219",
"0.66048753",
"0.6514518",
"0.58286464",
"0.56938934",
"0.56564283",
"0.56525654",
"0.5506672",
"0.54488677",
"0.5434669",
"0.5350576",
"0.53360975",
"0.51973057",
"0.51498073",
"0.51301485",
"0.5123582",
"0.... | 0.8008034 | 0 |
SetElement(itkMapContainerULLQEMPF2GQEULLULLBBT self, unsigned long long arg0, itkQuadEdgeMeshPointF2GQEULLULLBBT arg1) | def SetElement(self, arg0: 'unsigned long long', arg1: 'itkQuadEdgeMeshPointF2GQEULLULLBBT') -> "void":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_SetElement(self, arg0, arg1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetElement(self, arg0: 'unsigned long long', arg1: 'itkQuadEdgeMeshPointF3GQEULLULLBBT') -> \"void\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_SetElement(self, arg0, arg1)",
"def ElementAt(self, *args) -> \"itkQuadEdgeMeshPointF2GQEULLULLBBT const &\":\n re... | [
"0.86885613",
"0.68152475",
"0.6771364",
"0.6717347",
"0.6654064",
"0.66424793",
"0.6563627",
"0.6431457",
"0.6408336",
"0.63440174",
"0.6277062",
"0.62232035",
"0.5867786",
"0.5786772",
"0.5682418",
"0.5620915",
"0.5620915",
"0.5591122",
"0.55885136",
"0.55104965",
"0.549495... | 0.87262183 | 0 |
InsertElement(itkMapContainerULLQEMPF2GQEULLULLBBT self, unsigned long long arg0, itkQuadEdgeMeshPointF2GQEULLULLBBT arg1) | def InsertElement(self, arg0: 'unsigned long long', arg1: 'itkQuadEdgeMeshPointF2GQEULLULLBBT') -> "void":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_InsertElement(self, arg0, arg1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def InsertElement(self, arg0: 'unsigned long long', arg1: 'itkQuadEdgeMeshPointF3GQEULLULLBBT') -> \"void\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_InsertElement(self, arg0, arg1)",
"def CreateElementAt(self, arg0: 'unsigned long long') -> \"itkQuadEdgeMeshPointF2GQ... | [
"0.8605702",
"0.7225312",
"0.72197104",
"0.701624",
"0.70085734",
"0.6389189",
"0.63034934",
"0.612048",
"0.5981063",
"0.5973373",
"0.59235734",
"0.5908893",
"0.5894219",
"0.58820474",
"0.5871272",
"0.58501714",
"0.5817643",
"0.5736825",
"0.55548435",
"0.55548435",
"0.5533144... | 0.86309063 | 0 |
IndexExists(itkMapContainerULLQEMPF2GQEULLULLBBT self, unsigned long long arg0) > bool | def IndexExists(self, arg0: 'unsigned long long') -> "bool":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_IndexExists(self, arg0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IndexExists(self, arg0: 'unsigned long long') -> \"bool\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_IndexExists(self, arg0)",
"def GetElementIfIndexExists(self, arg0: 'unsigned long long', arg1: 'itkQuadEdgeMeshPointF2GQEULLULLBBT') -> \"bool\":\n return _i... | [
"0.88625544",
"0.7550831",
"0.753056",
"0.7281839",
"0.6462592",
"0.62945217",
"0.6288564",
"0.622394",
"0.62193656",
"0.6096452",
"0.60430187",
"0.5985686",
"0.59843975",
"0.59743536",
"0.59627366",
"0.5936357",
"0.5904145",
"0.5888758",
"0.58828616",
"0.58656675",
"0.582623... | 0.888071 | 0 |
GetElementIfIndexExists(itkMapContainerULLQEMPF2GQEULLULLBBT self, unsigned long long arg0, itkQuadEdgeMeshPointF2GQEULLULLBBT arg1) > bool | def GetElementIfIndexExists(self, arg0: 'unsigned long long', arg1: 'itkQuadEdgeMeshPointF2GQEULLULLBBT') -> "bool":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_GetElementIfIndexExists(self, arg0, arg1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GetElementIfIndexExists(self, arg0: 'unsigned long long', arg1: 'itkQuadEdgeMeshPointF3GQEULLULLBBT') -> \"bool\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_GetElementIfIndexExists(self, arg0, arg1)",
"def IndexExists(self, arg0: 'unsigned long long') -> \"bool\":\... | [
"0.8525826",
"0.76058584",
"0.75158435",
"0.6311689",
"0.6181798",
"0.61169326",
"0.60863423",
"0.60497135",
"0.60346234",
"0.59825605",
"0.5749478",
"0.57098985",
"0.5639819",
"0.56377137",
"0.56080997",
"0.556437",
"0.54968363",
"0.5480079",
"0.54702467",
"0.54486114",
"0.5... | 0.85739183 | 0 |
CreateIndex(itkMapContainerULLQEMPF2GQEULLULLBBT self, unsigned long long arg0) | def CreateIndex(self, arg0: 'unsigned long long') -> "void":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_CreateIndex(self, arg0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CreateIndex(self, arg0: 'unsigned long long') -> \"void\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_CreateIndex(self, arg0)",
"def build_index():\n pass",
"def create_index():",
"def create_index(args, client):\n policy = {}\n client.index_geo2dsphere... | [
"0.8795618",
"0.6591171",
"0.65452456",
"0.64304847",
"0.62976503",
"0.6277188",
"0.6269922",
"0.6158628",
"0.61399305",
"0.61160594",
"0.61064196",
"0.60993725",
"0.5994204",
"0.5977793",
"0.5955204",
"0.595139",
"0.5921392",
"0.5805856",
"0.5781696",
"0.5781696",
"0.5749674... | 0.8792429 | 1 |
DeleteIndex(itkMapContainerULLQEMPF2GQEULLULLBBT self, unsigned long long arg0) | def DeleteIndex(self, arg0: 'unsigned long long') -> "void":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_DeleteIndex(self, arg0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DeleteIndex(self, arg0: 'unsigned long long') -> \"void\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_DeleteIndex(self, arg0)",
"def CreateIndex(self, arg0: 'unsigned long long') -> \"void\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2G... | [
"0.8935163",
"0.633808",
"0.6323656",
"0.62324727",
"0.61529815",
"0.60410875",
"0.60113585",
"0.59967685",
"0.59967685",
"0.59938633",
"0.5980689",
"0.5909244",
"0.5904543",
"0.5901702",
"0.58933794",
"0.58903575",
"0.5886875",
"0.5864534",
"0.5864161",
"0.585602",
"0.584013... | 0.8961484 | 0 |
Size(itkMapContainerULLQEMPF2GQEULLULLBBT self) > unsigned long long | def Size(self) -> "unsigned long long":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_Size(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Size(self) -> \"unsigned long long\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_Size(self)",
"def size(self):\n return len(LongObjectHashMap.self)",
"def size(self):\n return len(LongObjectHashMap.self)",
"def check_bag_size(self):\r\n ... | [
"0.7378846",
"0.6922542",
"0.6922542",
"0.6878772",
"0.669639",
"0.66959655",
"0.6692591",
"0.6666217",
"0.6628906",
"0.6627555",
"0.6627555",
"0.6627555",
"0.6627555",
"0.6627555",
"0.6627555",
"0.6627555",
"0.6627555",
"0.6627555",
"0.6617251",
"0.6593894",
"0.6585527",
"... | 0.74315673 | 0 |
Reserve(itkMapContainerULLQEMPF2GQEULLULLBBT self, unsigned long long arg0) | def Reserve(self, arg0: 'unsigned long long') -> "void":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_Reserve(self, arg0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Reserve(self, arg0: 'unsigned long long') -> \"void\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_Reserve(self, arg0)",
"def reserve(self, reserve):\n \n self._reserve = reserve",
"def base_reserve_0():\n print('Setting base reserve to 0')\n up... | [
"0.86920935",
"0.5834537",
"0.54746264",
"0.54575306",
"0.5365767",
"0.53393996",
"0.5337792",
"0.5322548",
"0.53208524",
"0.52628106",
"0.5229852",
"0.52219284",
"0.5195816",
"0.50419587",
"0.5025946",
"0.49694344",
"0.49058214",
"0.48976353",
"0.48200068",
"0.481391",
"0.47... | 0.8701403 | 0 |
cast(itkLightObject obj) > itkMapContainerULLQEMPF2GQEULLULLBBT | def cast(obj: 'itkLightObject') -> "itkMapContainerULLQEMPF2GQEULLULLBBT *":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkMapContainerULLQEMPF3GQEULLULLBBT *\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_cast(obj)",
"def itkMapContainerULLQEMPF2GQEULLULLBBT_cast(obj: 'itkLightObject') -> \"itkMapContainerULLQEMPF2GQEULLULLBBT *\":\n return _itkQua... | [
"0.8084822",
"0.80788255",
"0.80115074",
"0.6254341",
"0.6229861",
"0.62290967",
"0.621282",
"0.62121254",
"0.61977196",
"0.6187826",
"0.61861074",
"0.617687",
"0.61671036",
"0.61638296",
"0.615326",
"0.6134305",
"0.6129836",
"0.6122671",
"0.6109205",
"0.6106327",
"0.6104756"... | 0.81593674 | 0 |
New() > itkMapContainerULLQEMPF2GQEULLULLBBT Create a new object of the class itkMapContainerULLQEMPF2GQEULLULLBBT and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named pa... | def New(*args, **kargs):
obj = itkMapContainerULLQEMPF2GQEULLULLBBT.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkMapContainerULLQEMPF3GQEULLULLBBT.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def __init__(self, *args):\n _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_swiginit(self, _it... | [
"0.78790754",
"0.66339004",
"0.6603562",
"0.6318727",
"0.629391",
"0.6288954",
"0.62822986",
"0.6275764",
"0.6217556",
"0.62124485",
"0.6188122",
"0.616241",
"0.6106697",
"0.608247",
"0.60751665",
"0.60553706",
"0.60526294",
"0.6043177",
"0.6038155",
"0.6035966",
"0.60142535"... | 0.79114115 | 0 |
itkMapContainerULLQEMPF2GQEULLULLBBT_cast(itkLightObject obj) > itkMapContainerULLQEMPF2GQEULLULLBBT | def itkMapContainerULLQEMPF2GQEULLULLBBT_cast(obj: 'itkLightObject') -> "itkMapContainerULLQEMPF2GQEULLULLBBT *":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkMapContainerULLQEMPF3GQEULLULLBBT_cast(obj: 'itkLightObject') -> \"itkMapContainerULLQEMPF3GQEULLULLBBT *\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkMapContainerULLQEMPF2GQEULLULLBBT *\":\n return _itkQua... | [
"0.86143035",
"0.85710466",
"0.85231453",
"0.6663533",
"0.6580079",
"0.65773124",
"0.6542718",
"0.65136206",
"0.6509441",
"0.65042865",
"0.65000635",
"0.6490363",
"0.6483853",
"0.6468999",
"0.6454448",
"0.6448948",
"0.64392745",
"0.6436383",
"0.64240533",
"0.64200103",
"0.641... | 0.8653909 | 0 |
__init__(itkMapContainerULLQEMPF3GQEULLULLBBT self) > itkMapContainerULLQEMPF3GQEULLULLBBT | def __init__(self, *args):
_itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_swiginit(self, _itkQuadEdgeCellTraitsInfoPython.new_itkMapContainerULLQEMPF3GQEULLULLBBT(*args)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, *args):\n _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_swiginit(self, _itkQuadEdgeCellTraitsInfoPython.new_itkMapContainerULLQEMPF2GQEULLULLBBT(*args))",
"def __init__(self):\n self.map = [None] * 103",
"def __init__(self):\n self.map = {}",
"d... | [
"0.78818625",
"0.76883113",
"0.7553722",
"0.75469404",
"0.74093187",
"0.7345451",
"0.7240311",
"0.71909845",
"0.7151345",
"0.7129157",
"0.7075684",
"0.70647043",
"0.7054076",
"0.7054076",
"0.70464456",
"0.70333153",
"0.7021866",
"0.7020697",
"0.69873595",
"0.69769186",
"0.693... | 0.7897863 | 0 |
Clone(itkMapContainerULLQEMPF3GQEULLULLBBT self) > itkMapContainerULLQEMPF3GQEULLULLBBT_Pointer | def Clone(self) -> "itkMapContainerULLQEMPF3GQEULLULLBBT_Pointer":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_Clone(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Clone(self) -> \"itkMapContainerULLQEMPF2GQEULLULLBBT_Pointer\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_Clone(self)",
"def copy(self):\n return self.__class__(*self.maps[:-1], self.maps[-1].copy())",
"def clone(self):\n clone = super(LongObjectHa... | [
"0.8652012",
"0.6650122",
"0.6472001",
"0.64325726",
"0.641625",
"0.64091784",
"0.6392622",
"0.63770384",
"0.63764405",
"0.63564193",
"0.63364744",
"0.63236207",
"0.63206065",
"0.63199556",
"0.6303568",
"0.62871134",
"0.6273497",
"0.6269959",
"0.6267641",
"0.6261661",
"0.6245... | 0.866073 | 0 |
ElementAt(itkMapContainerULLQEMPF3GQEULLULLBBT self, unsigned long long arg0) > itkQuadEdgeMeshPointF3GQEULLULLBBT ElementAt(itkMapContainerULLQEMPF3GQEULLULLBBT self, unsigned long long arg0) > itkQuadEdgeMeshPointF3GQEULLULLBBT | def ElementAt(self, *args) -> "itkQuadEdgeMeshPointF3GQEULLULLBBT const &":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_ElementAt(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ElementAt(self, *args) -> \"itkQuadEdgeMeshPointF2GQEULLULLBBT const &\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_ElementAt(self, *args)",
"def GetElement(self, arg0: 'unsigned long long') -> \"itkQuadEdgeMeshPointF2GQEULLULLBBT\":\n return _itkQuadEdgeCel... | [
"0.7639986",
"0.6755474",
"0.67387486",
"0.65978765",
"0.65977854",
"0.65685743",
"0.6543242",
"0.58237135",
"0.5819068",
"0.54694414",
"0.5442698",
"0.5338921",
"0.53300875",
"0.5309065",
"0.52766144",
"0.524398",
"0.52419925",
"0.5201355",
"0.5174117",
"0.5163315",
"0.51388... | 0.7569344 | 1 |
CreateElementAt(itkMapContainerULLQEMPF3GQEULLULLBBT self, unsigned long long arg0) > itkQuadEdgeMeshPointF3GQEULLULLBBT | def CreateElementAt(self, arg0: 'unsigned long long') -> "itkQuadEdgeMeshPointF3GQEULLULLBBT &":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_CreateElementAt(self, arg0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CreateElementAt(self, arg0: 'unsigned long long') -> \"itkQuadEdgeMeshPointF2GQEULLULLBBT &\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_CreateElementAt(self, arg0)",
"def ElementAt(self, *args) -> \"itkQuadEdgeMeshPointF2GQEULLULLBBT const &\":\n return _it... | [
"0.8444978",
"0.6999368",
"0.69309753",
"0.68903315",
"0.6822138",
"0.6662955",
"0.6651361",
"0.65801334",
"0.6556418",
"0.6467336",
"0.6451951",
"0.60906166",
"0.6071555",
"0.6057239",
"0.6003315",
"0.5904454",
"0.5837313",
"0.5429335",
"0.540683",
"0.52914715",
"0.5242823",... | 0.84595853 | 0 |
GetElement(itkMapContainerULLQEMPF3GQEULLULLBBT self, unsigned long long arg0) > itkQuadEdgeMeshPointF3GQEULLULLBBT | def GetElement(self, arg0: 'unsigned long long') -> "itkQuadEdgeMeshPointF3GQEULLULLBBT":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_GetElement(self, arg0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GetElement(self, arg0: 'unsigned long long') -> \"itkQuadEdgeMeshPointF2GQEULLULLBBT\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_GetElement(self, arg0)",
"def ElementAt(self, *args) -> \"itkQuadEdgeMeshPointF2GQEULLULLBBT const &\":\n return _itkQuadEdgeCel... | [
"0.80509555",
"0.7598981",
"0.7521621",
"0.6826279",
"0.6807306",
"0.6568754",
"0.6563957",
"0.5810491",
"0.57994574",
"0.57415754",
"0.571552",
"0.55297124",
"0.5490546",
"0.5459087",
"0.545818",
"0.53026974",
"0.52970463",
"0.5276162",
"0.5165543",
"0.5143229",
"0.5128239",... | 0.8032345 | 1 |
SetElement(itkMapContainerULLQEMPF3GQEULLULLBBT self, unsigned long long arg0, itkQuadEdgeMeshPointF3GQEULLULLBBT arg1) | def SetElement(self, arg0: 'unsigned long long', arg1: 'itkQuadEdgeMeshPointF3GQEULLULLBBT') -> "void":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_SetElement(self, arg0, arg1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetElement(self, arg0: 'unsigned long long', arg1: 'itkQuadEdgeMeshPointF2GQEULLULLBBT') -> \"void\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_SetElement(self, arg0, arg1)",
"def ElementAt(self, *args) -> \"itkQuadEdgeMeshPointF2GQEULLULLBBT const &\":\n re... | [
"0.8694622",
"0.6826752",
"0.67330277",
"0.67314744",
"0.6728218",
"0.66013426",
"0.65718055",
"0.6466485",
"0.64355606",
"0.63152426",
"0.6293341",
"0.62537295",
"0.5895965",
"0.57824886",
"0.57267445",
"0.57267445",
"0.57020366",
"0.56276965",
"0.56168413",
"0.55807525",
"0... | 0.8708836 | 0 |
InsertElement(itkMapContainerULLQEMPF3GQEULLULLBBT self, unsigned long long arg0, itkQuadEdgeMeshPointF3GQEULLULLBBT arg1) | def InsertElement(self, arg0: 'unsigned long long', arg1: 'itkQuadEdgeMeshPointF3GQEULLULLBBT') -> "void":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_InsertElement(self, arg0, arg1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def InsertElement(self, arg0: 'unsigned long long', arg1: 'itkQuadEdgeMeshPointF2GQEULLULLBBT') -> \"void\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_InsertElement(self, arg0, arg1)",
"def CreateElementAt(self, arg0: 'unsigned long long') -> \"itkQuadEdgeMeshPointF3GQ... | [
"0.86065626",
"0.7216248",
"0.7174664",
"0.69985044",
"0.69442314",
"0.6377689",
"0.6355011",
"0.6194296",
"0.60387886",
"0.60342556",
"0.60073864",
"0.59357524",
"0.5898825",
"0.5893662",
"0.5869473",
"0.5838837",
"0.58292717",
"0.5742661",
"0.55909055",
"0.55909055",
"0.557... | 0.86275864 | 0 |
IndexExists(itkMapContainerULLQEMPF3GQEULLULLBBT self, unsigned long long arg0) > bool | def IndexExists(self, arg0: 'unsigned long long') -> "bool":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_IndexExists(self, arg0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IndexExists(self, arg0: 'unsigned long long') -> \"bool\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_IndexExists(self, arg0)",
"def GetElementIfIndexExists(self, arg0: 'unsigned long long', arg1: 'itkQuadEdgeMeshPointF2GQEULLULLBBT') -> \"bool\":\n return _i... | [
"0.8882458",
"0.7525758",
"0.75214994",
"0.7315188",
"0.6494606",
"0.6274545",
"0.6263357",
"0.6242124",
"0.6240773",
"0.6144864",
"0.60952055",
"0.60220706",
"0.6008735",
"0.5995702",
"0.59888893",
"0.59807265",
"0.5974947",
"0.5934245",
"0.5927301",
"0.5911092",
"0.58576715... | 0.8879613 | 1 |
GetElementIfIndexExists(itkMapContainerULLQEMPF3GQEULLULLBBT self, unsigned long long arg0, itkQuadEdgeMeshPointF3GQEULLULLBBT arg1) > bool | def GetElementIfIndexExists(self, arg0: 'unsigned long long', arg1: 'itkQuadEdgeMeshPointF3GQEULLULLBBT') -> "bool":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_GetElementIfIndexExists(self, arg0, arg1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GetElementIfIndexExists(self, arg0: 'unsigned long long', arg1: 'itkQuadEdgeMeshPointF2GQEULLULLBBT') -> \"bool\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_GetElementIfIndexExists(self, arg0, arg1)",
"def IndexExists(self, arg0: 'unsigned long long') -> \"bool\":\... | [
"0.85580194",
"0.76070154",
"0.7534228",
"0.62990755",
"0.62237656",
"0.6074933",
"0.6064689",
"0.60445875",
"0.59965026",
"0.59768057",
"0.5762163",
"0.5708033",
"0.5658248",
"0.5655965",
"0.5608069",
"0.5586376",
"0.550053",
"0.5495788",
"0.5472633",
"0.54359776",
"0.542820... | 0.85436916 | 1 |
CreateIndex(itkMapContainerULLQEMPF3GQEULLULLBBT self, unsigned long long arg0) | def CreateIndex(self, arg0: 'unsigned long long') -> "void":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_CreateIndex(self, arg0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CreateIndex(self, arg0: 'unsigned long long') -> \"void\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_CreateIndex(self, arg0)",
"def build_index():\n pass",
"def create_index():",
"def create_index(args, client):\n policy = {}\n client.index_geo2dsphere... | [
"0.8763777",
"0.66089547",
"0.65571904",
"0.64034927",
"0.6324621",
"0.62798584",
"0.6271922",
"0.6156181",
"0.614738",
"0.6122789",
"0.6102112",
"0.609192",
"0.6045345",
"0.59334993",
"0.5933303",
"0.5918128",
"0.5917142",
"0.58901435",
"0.58410317",
"0.58410317",
"0.5727363... | 0.879103 | 0 |
DeleteIndex(itkMapContainerULLQEMPF3GQEULLULLBBT self, unsigned long long arg0) | def DeleteIndex(self, arg0: 'unsigned long long') -> "void":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_DeleteIndex(self, arg0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DeleteIndex(self, arg0: 'unsigned long long') -> \"void\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_DeleteIndex(self, arg0)",
"def CreateIndex(self, arg0: 'unsigned long long') -> \"void\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3G... | [
"0.8962486",
"0.630565",
"0.63029665",
"0.62439466",
"0.6177511",
"0.6055286",
"0.6055286",
"0.6053672",
"0.6050272",
"0.60074025",
"0.5997503",
"0.59605247",
"0.59336823",
"0.5931242",
"0.59284854",
"0.59081376",
"0.59002525",
"0.5900192",
"0.5893965",
"0.5876277",
"0.584649... | 0.89518845 | 1 |
Size(itkMapContainerULLQEMPF3GQEULLULLBBT self) > unsigned long long | def Size(self) -> "unsigned long long":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_Size(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Size(self) -> \"unsigned long long\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_Size(self)",
"def size(self):\n return len(LongObjectHashMap.self)",
"def size(self):\n return len(LongObjectHashMap.self)",
"def check_bag_size(self):\r\n ... | [
"0.7430995",
"0.6925797",
"0.6925797",
"0.6909031",
"0.6743354",
"0.6698833",
"0.66851676",
"0.66840637",
"0.66794735",
"0.66759795",
"0.66759795",
"0.66759795",
"0.66759795",
"0.66759795",
"0.66759795",
"0.66759795",
"0.66759795",
"0.66759795",
"0.6667608",
"0.6628957",
"0.6... | 0.7398243 | 1 |
Reserve(itkMapContainerULLQEMPF3GQEULLULLBBT self, unsigned long long arg0) | def Reserve(self, arg0: 'unsigned long long') -> "void":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_Reserve(self, arg0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Reserve(self, arg0: 'unsigned long long') -> \"void\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_Reserve(self, arg0)",
"def reserve(self, reserve):\n \n self._reserve = reserve",
"def reserve(self, item, strict=True):\n out.info(\"Trying to r... | [
"0.867219",
"0.58884716",
"0.55455047",
"0.5511997",
"0.54289395",
"0.54222137",
"0.5305651",
"0.52937317",
"0.52744",
"0.52474177",
"0.51928306",
"0.51770806",
"0.5174293",
"0.50649244",
"0.50271297",
"0.49549177",
"0.49064896",
"0.48855042",
"0.48680383",
"0.48135114",
"0.4... | 0.8692666 | 0 |
cast(itkLightObject obj) > itkMapContainerULLQEMPF3GQEULLULLBBT | def cast(obj: 'itkLightObject') -> "itkMapContainerULLQEMPF3GQEULLULLBBT *":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkMapContainerULLQEMPF2GQEULLULLBBT *\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_cast(obj)",
"def itkMapContainerULLQEMPF2GQEULLULLBBT_cast(obj: 'itkLightObject') -> \"itkMapContainerULLQEMPF2GQEULLULLBBT *\":\n return _itkQua... | [
"0.80768454",
"0.79894507",
"0.79848903",
"0.6210267",
"0.61941546",
"0.61825395",
"0.61637414",
"0.6140377",
"0.61170834",
"0.610773",
"0.6096567",
"0.60962915",
"0.60895133",
"0.6082656",
"0.60760105",
"0.60720843",
"0.60708916",
"0.60685796",
"0.6065972",
"0.60581446",
"0.... | 0.80651575 | 1 |
New() > itkMapContainerULLQEMPF3GQEULLULLBBT Create a new object of the class itkMapContainerULLQEMPF3GQEULLULLBBT and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects the first non named pa... | def New(*args, **kargs):
obj = itkMapContainerULLQEMPF3GQEULLULLBBT.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkMapContainerULLQEMPF2GQEULLULLBBT.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def __init__(self, *args):\n _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_swiginit(self, _it... | [
"0.7910759",
"0.65510774",
"0.6544778",
"0.640306",
"0.6329771",
"0.63235146",
"0.6293532",
"0.6225159",
"0.62244755",
"0.6212976",
"0.6207842",
"0.6178287",
"0.613959",
"0.61351347",
"0.6089833",
"0.60747105",
"0.6051325",
"0.60285485",
"0.6017401",
"0.59932786",
"0.59745455... | 0.7906154 | 1 |
itkMapContainerULLQEMPF3GQEULLULLBBT_cast(itkLightObject obj) > itkMapContainerULLQEMPF3GQEULLULLBBT | def itkMapContainerULLQEMPF3GQEULLULLBBT_cast(obj: 'itkLightObject') -> "itkMapContainerULLQEMPF3GQEULLULLBBT *":
return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF3GQEULLULLBBT_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkMapContainerULLQEMPF2GQEULLULLBBT_cast(obj: 'itkLightObject') -> \"itkMapContainerULLQEMPF2GQEULLULLBBT *\":\n return _itkQuadEdgeCellTraitsInfoPython.itkMapContainerULLQEMPF2GQEULLULLBBT_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkMapContainerULLQEMPF3GQEULLULLBBT *\":\n return _itkQua... | [
"0.85524213",
"0.8530879",
"0.85012054",
"0.6676029",
"0.6610047",
"0.6598924",
"0.6585296",
"0.6577539",
"0.65381795",
"0.6525559",
"0.6516219",
"0.64921415",
"0.6490924",
"0.6486386",
"0.648307",
"0.6478202",
"0.64740264",
"0.6462398",
"0.64555895",
"0.645374",
"0.645341",
... | 0.86029065 | 0 |
__init__(itkQuadEdgeMeshCellTraitsInfo2FFULLULLUCQEMPGQEULLQEMPF2GQEULLULLBBTGQE self) > itkQuadEdgeMeshCellTraitsInfo2FFULLULLUCQEMPGQEULLQEMPF2GQEULLULLBBTGQE __init__(itkQuadEdgeMeshCellTraitsInfo2FFULLULLUCQEMPGQEULLQEMPF2GQEULLULLBBTGQE self, itkQuadEdgeMeshCellTraitsInfo2FFULLULLUCQEMPGQEULLQEMPF2GQEULLULLBBTGQE ... | def __init__(self, *args):
_itkQuadEdgeCellTraitsInfoPython.itkQuadEdgeMeshCellTraitsInfo2FFULLULLUCQEMPGQEULLQEMPF2GQEULLULLBBTGQE_swiginit(self, _itkQuadEdgeCellTraitsInfoPython.new_itkQuadEdgeMeshCellTraitsInfo2FFULLULLUCQEMPGQEULLQEMPF2GQEULLULLBBTGQE(*args)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, *args):\n _itkQuadEdgeCellTraitsInfoPython.itkQuadEdgeMeshCellTraitsInfo3FFULLULLUCQEMPGQEULLQEMPF3GQEULLULLBBTGQE_swiginit(self, _itkQuadEdgeCellTraitsInfoPython.new_itkQuadEdgeMeshCellTraitsInfo3FFULLULLUCQEMPGQEULLQEMPF3GQEULLULLBBTGQE(*args))",
"def __init__(self, *args):\n _... | [
"0.83134043",
"0.7966901",
"0.7925769",
"0.65841705",
"0.6542171",
"0.6529784",
"0.6213722",
"0.62116086",
"0.61951244",
"0.6168665",
"0.61404574",
"0.6118812",
"0.6111736",
"0.61094785",
"0.61048365",
"0.6103951",
"0.6078004",
"0.6064472",
"0.6063994",
"0.60592335",
"0.60496... | 0.8636811 | 0 |
__init__(itkQuadEdgeMeshCellTraitsInfo3FFULLULLUCQEMPGQEULLQEMPF3GQEULLULLBBTGQE self) > itkQuadEdgeMeshCellTraitsInfo3FFULLULLUCQEMPGQEULLQEMPF3GQEULLULLBBTGQE __init__(itkQuadEdgeMeshCellTraitsInfo3FFULLULLUCQEMPGQEULLQEMPF3GQEULLULLBBTGQE self, itkQuadEdgeMeshCellTraitsInfo3FFULLULLUCQEMPGQEULLQEMPF3GQEULLULLBBTGQE ... | def __init__(self, *args):
_itkQuadEdgeCellTraitsInfoPython.itkQuadEdgeMeshCellTraitsInfo3FFULLULLUCQEMPGQEULLQEMPF3GQEULLULLBBTGQE_swiginit(self, _itkQuadEdgeCellTraitsInfoPython.new_itkQuadEdgeMeshCellTraitsInfo3FFULLULLUCQEMPGQEULLQEMPF3GQEULLULLBBTGQE(*args)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, *args):\n _itkQuadEdgeCellTraitsInfoPython.itkQuadEdgeMeshCellTraitsInfo2FFULLULLUCQEMPGQEULLQEMPF2GQEULLULLBBTGQE_swiginit(self, _itkQuadEdgeCellTraitsInfoPython.new_itkQuadEdgeMeshCellTraitsInfo2FFULLULLUCQEMPGQEULLQEMPF2GQEULLULLBBTGQE(*args))",
"def __init__(self, *args):\n _... | [
"0.8492108",
"0.793401",
"0.78963774",
"0.670253",
"0.6464602",
"0.6331846",
"0.6301173",
"0.6242205",
"0.62351173",
"0.6221762",
"0.6216625",
"0.61871463",
"0.61825645",
"0.6166407",
"0.61460394",
"0.61318153",
"0.6114927",
"0.61013126",
"0.6098787",
"0.60978806",
"0.6092784... | 0.8721426 | 0 |
Read a stream of linedelimited json objects from a filelike object. | def read_objects(f):
for line in f:
j = json.loads(line)
yield j['id'], line.strip() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def stream_read_json(f):\n\n end_symbol = bytes(']', 'utf-8')\n start_pos = 1\n while True:\n try:\n obj = json.load(f)\n yield obj\n return\n except json.JSONDecodeError as e:\n f.seek(start_pos)\n json_str = f.read(e.pos)\n ... | [
"0.73883796",
"0.68908894",
"0.68014395",
"0.68014395",
"0.67715114",
"0.67601323",
"0.6722033",
"0.6672672",
"0.66279215",
"0.6448374",
"0.6409467",
"0.6395258",
"0.63899344",
"0.630852",
"0.62719464",
"0.625829",
"0.6234977",
"0.6180746",
"0.6169036",
"0.6118284",
"0.609372... | 0.7322691 | 1 |
Function to get the information from RIPE. Sends an IP Address and gets Company name behind it. Also gets an address and country of origin. Later we only allow companies from Germany, Switzerland, Austria and Netherlands. | def get_whois(ip_address):
# search the RIPE Database for the given IP
res = IPWhois(ip_address).lookup_rdap(rate_limit_timeout=30)
# get the country of the IP Address
countries = get_countries()
net = res['network']
country = countries[net['country']]
company_name = net['name']
# get ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fetch_address(cpr: str) -> str:\n\n return \"Åbogade 15, 8200 Aarhus N\"",
"def main():\n ip_obj = get_ip()\n url = (\"http://ipvigilante.com/\" + ip_obj.ip_address + \"/full\")\n response = urlopen(url)\n data_json = response.read().decode(\"utf-8\")\n geoloc = json.loads(data_json)\n\n ... | [
"0.62812287",
"0.6115626",
"0.57916176",
"0.5781599",
"0.5746938",
"0.57021904",
"0.567447",
"0.5626788",
"0.5617227",
"0.56170917",
"0.55365705",
"0.5534169",
"0.55308235",
"0.54665464",
"0.54521996",
"0.5438757",
"0.5415333",
"0.53871346",
"0.5376222",
"0.5369022",
"0.53447... | 0.71000046 | 0 |
Return only public taxonomies if the user is not the target author | def get_queryset(self):
target_author = get_object_or_404(CustomUser, username=self.kwargs.get('username', None))
if self.request.user == target_author:
return Taxonomy.objects.filter(author=target_author)
else:
return Taxonomy.objects.filter(author=target_author).filter(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_permissions(self):\n taxonomy = self.get_taxonomy()\n return True if self.request.user == taxonomy.author else taxonomy.public",
"def test_func(self):\n taxonomy = self.get_object()\n return self.request.user == taxonomy.author",
"def test_func(self):\n taxonomy = se... | [
"0.68439966",
"0.6166269",
"0.6166269",
"0.6099613",
"0.5916539",
"0.5752976",
"0.56851214",
"0.5668294",
"0.5459346",
"0.54236144",
"0.54139245",
"0.5389527",
"0.53322315",
"0.53310496",
"0.5317385",
"0.5288913",
"0.5285968",
"0.52767324",
"0.5262633",
"0.5262633",
"0.524735... | 0.7827977 | 0 |
Ensure the taxonomy is public | def test_permissions(self):
taxonomy = self.get_taxonomy()
return True if self.request.user == taxonomy.author else taxonomy.public | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_public(self) -> bool:\n if self.node.storage_class == StorageClass.STATIC:\n return False\n\n return True",
"def is_public(self) -> bool:\n if self.node.storage_class == StorageClass.STATIC:\n return False\n\n return True",
"def is_public(self):\n ... | [
"0.6177053",
"0.6177053",
"0.6170125",
"0.6143358",
"0.61267036",
"0.60680073",
"0.5972637",
"0.5912155",
"0.5908886",
"0.58877015",
"0.5776154",
"0.5725324",
"0.57150173",
"0.5704682",
"0.57041746",
"0.57041746",
"0.5634815",
"0.55775774",
"0.55706435",
"0.5560024",
"0.55456... | 0.7167404 | 0 |
Get the target taxonomy from the url | def get_taxonomy(self, **kwargs):
slug_taxonomy = self.kwargs.get('slug_taxonomy', None)
if slug_taxonomy is not None:
taxonomy = get_object_or_404(Taxonomy, slug=slug_taxonomy)
return taxonomy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_taxonomy(self, fragment):\r\n\r\n # Pass the temporary file to the taxon assigner, and get the\r\n # taxonomy and quality score back\r\n r = self._taxon_assigner(seqs=[('fragment', fragment)])['fragment']\r\n taxonomy, quality_score = r[0], r[1]\r\n\r\n # Return the taxo... | [
"0.5964273",
"0.5957123",
"0.5873207",
"0.5713378",
"0.56241417",
"0.5378401",
"0.5357582",
"0.53557116",
"0.5335379",
"0.52788633",
"0.52765286",
"0.52265376",
"0.5203007",
"0.51631707",
"0.51631707",
"0.51631707",
"0.51631707",
"0.51631707",
"0.51631707",
"0.51631707",
"0.5... | 0.6016168 | 0 |
Get the verb categories of a taxonomy ordered by level of abstraction | def get_ordered_verb_categories(self, taxonomy, **kwargs):
return [verb_cat for verb_cat in taxonomy.verb_categories.all().order_by('level')] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def categorize(self, text, taxonomy = \"dmoz\"):\n return self._er.jsonRequestAnalytics(\"/api/v1/categorize\", { \"text\": text, \"taxonomy\": taxonomy })",
"def get_taxonomy(): # noqa: E501\n return 'do some magic!'",
"def Categories():\n cat = {\n \t \"Featured\": 0,\n \t \"All... | [
"0.65374446",
"0.6352542",
"0.62456447",
"0.6015004",
"0.5965525",
"0.5927185",
"0.59015423",
"0.5854511",
"0.58434385",
"0.5823204",
"0.5805645",
"0.5788166",
"0.57607627",
"0.5745739",
"0.5743953",
"0.5719326",
"0.57062143",
"0.56853414",
"0.5674314",
"0.5672258",
"0.566170... | 0.83058274 | 0 |
Update the world by processing the move command, stepping the world and checking for final time failure. | def update_world(mv_command):
global bot_position, scan
MoveRobot(mv_command)
# ws.stepPhysics(steps=1)
if checkAtFinalTime():
return None
scan_data = scan.getLeftCenterRightScanState()
return scan_data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def run(self, **kwargs): # equivalent to step/move\n self.update_game_status()\n self.everyone_move(**kwargs)",
"def _move_and_update(self, move):\n unlocked_before_move = self.game_state.is_current_level_unlocked()\n self.rule_checker.is_valid_move(self.current_turn.entity, move, se... | [
"0.66770095",
"0.6490982",
"0.6427828",
"0.639022",
"0.6305613",
"0.623577",
"0.6188057",
"0.61808115",
"0.6166156",
"0.6150071",
"0.6145156",
"0.610702",
"0.6100843",
"0.6092829",
"0.6085584",
"0.60801214",
"0.60641676",
"0.6029677",
"0.60245556",
"0.60245556",
"0.60188776",... | 0.691671 | 0 |
Log the bot position over time for later log tracking. | def log_bot_position(id):
pass
#global bot_position
#with open("/user/moore112/bot_logging.dat","a") as f:
# for b in bot_position:
# f.write(str(id)+","+str(b[0])+","+str(b[1])+","+str(b[2])+"\n") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def log(self):\n\n\t\t# Only every 1/10 second (or so) to avoid flooding networktables\n\t\tif not self.log_timer.running or not self.log_timer.hasPeriodPassed(self.log_timer_delay):\n\t\t\treturn\n\n\t\twpilib.SmartDashboard.putString('Pressure', '{0:.2f}'.format(self.get_pressure()))\n\t\twpilib.SmartDashboard.p... | [
"0.6618642",
"0.6521412",
"0.62581116",
"0.61171186",
"0.6104708",
"0.6104433",
"0.6100502",
"0.6096707",
"0.6088605",
"0.60416317",
"0.6034466",
"0.599163",
"0.5981997",
"0.5974998",
"0.5967732",
"0.59526056",
"0.5938225",
"0.5933027",
"0.593012",
"0.5925231",
"0.59202415",
... | 0.78291446 | 0 |
Subscriber to /clock This callback is responsible for getting the current simulation time in seconds. | def clock_callback(data):
global current_second
current_second = data.clock.secs | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clock(self):\n return self._clock",
"def clock(self):\r\n return self.__clock",
"def get_clock(self):\n return self.clock",
"def getCurrentSimulationTime(self):\r\n raise NotImplementedError()",
"def getSimulationTime(self):\r\n raise NotImplementedError()",
"def cl... | [
"0.7105489",
"0.70668817",
"0.69951683",
"0.6818177",
"0.67233354",
"0.66447526",
"0.64812535",
"0.64708716",
"0.6455012",
"0.63776445",
"0.6366761",
"0.63035136",
"0.6301416",
"0.6281637",
"0.6276057",
"0.6272501",
"0.6257902",
"0.6211362",
"0.62053585",
"0.6183477",
"0.6170... | 0.76203895 | 0 |
Creates mosaic art from target image | def make_mosaic(target_im, saved_file_name):
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
color_data_file = os.path.join(BASE_DIR, 'static/images/data/average_color.csv')
color_data = materials_list_from_file(color_data_file)
target_file = os.path.join(BASE_DIR, 'static/images... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mosaic_art_file_name(target_im):\n target_file_name = extract_file_name(target_im)\n now_dt = now_datetime()\n return '{0}_mosaic_{1}.png'.format(target_file_name, now_dt)",
"def mosaic(self):\n \n if len(self.tiles) > 1:\n hdflist = sorted(glob.glob(self.fullPath + '/*.hdf'... | [
"0.68204135",
"0.66699815",
"0.6520102",
"0.62939864",
"0.6217652",
"0.62127405",
"0.61684245",
"0.6126469",
"0.6117388",
"0.60525876",
"0.59939796",
"0.59165066",
"0.5899376",
"0.5885344",
"0.58521396",
"0.5834865",
"0.58324957",
"0.5827601",
"0.57888716",
"0.5776039",
"0.57... | 0.7894239 | 0 |
Extracts file name from file path (not including extension) | def extract_file_name(file_path):
# ファイルパスからファイル名(拡張子含む)を取り出す
file_name = file_path.split('/')[-1]
# 拡張子を取り除く
return file_name.split('.')[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_file_name(path: str) -> str:\n return os.path.splitext(os.path.basename(path))[0]",
"def getfilename(path):\r\n return path.split('\\\\').pop().split('/').pop().rsplit('.', 1)[0]",
"def file_name(path):\n return os.path.basename(path).split('.')[0]",
"def get_file_name(file_path):\n full_... | [
"0.8715548",
"0.86639875",
"0.86091185",
"0.8563638",
"0.85208607",
"0.8497839",
"0.8352039",
"0.8335342",
"0.8314756",
"0.8260435",
"0.8197826",
"0.81866497",
"0.8095197",
"0.8033655",
"0.8029191",
"0.7977432",
"0.79481006",
"0.7930753",
"0.79278266",
"0.7901418",
"0.7837515... | 0.8845883 | 0 |
Returns current time as '%Y%m%d%H%M%S' string | def now_datetime():
now = datetime.datetime.now()
return now.strftime('%Y%m%d%H%M%S') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def str_current_time():\n return strftime(\"%Y_%m_%d_%H_%M_%S_%Z\", gmtime())",
"def get_current_time():\n return time.strftime(\"%Y-%m-%d-%H-%M-%S\", time.localtime())",
"def time_now():\n cur_time = str(datetime.now().strftime(\"%d-%m-%Y %H:%M:%S\"))\n return cur_time",
"def current_time():\n ... | [
"0.8493195",
"0.8434943",
"0.8412798",
"0.84043145",
"0.8325539",
"0.82955456",
"0.8203032",
"0.81751466",
"0.8141215",
"0.81292236",
"0.8083702",
"0.8069793",
"0.8033297",
"0.79770666",
"0.7951352",
"0.7935939",
"0.7892529",
"0.7859924",
"0.7855944",
"0.78430516",
"0.7841576... | 0.84515804 | 1 |
Returns name of file similar to average color Find the image with average color closest to `average_color` from `color_data` | def similar_color_filename(average_color, color_data):
distance = MAX_COLOR_DISTANCE
filename = ''
# 色の差が最小になるファイルを決定(距離に見立てている)
for color in color_data:
sample_color = (color[POS_RED], color[POS_GREEN], color[POS_BLUE])
d = color_distance(average_color, sample_color)
if d < dist... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def recognize_color(color, palette):\n min_distance = np.inf\n most_similar_color = None\n for cname, cvalue in palette.items():\n distance = np.sum(np.abs(np.array(color) - np.array(cvalue)))\n if distance < min_distance:\n min_distance = distance\n most_similar_color ... | [
"0.61027783",
"0.58116",
"0.55472213",
"0.5499508",
"0.53890276",
"0.5358996",
"0.53319323",
"0.52455115",
"0.5228001",
"0.51949656",
"0.51318926",
"0.51198316",
"0.51025784",
"0.50320137",
"0.49784997",
"0.49473655",
"0.49416104",
"0.49096173",
"0.49017453",
"0.48849252",
"0... | 0.8406941 | 0 |
Validates the unique ID of an Emprestimo, with respect to type and value. | def validate_emprestimo_identifier(emprestimo_id: int):
if not isinstance(emprestimo_id, int):
raise InvalidFieldType(code=400)
if emprestimo_id <= 0:
raise InvalidFieldValue(code=400)
return | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _validate(cls, pid_value):\n blop = re.compile('^[-\\w]+$')\n if not bool(blop.match(pid_value)):\n raise ValidationError(\n 'The ID should contain only letters with numbers or dashes.',\n field_name='id',\n )",
"def validate_user_id(self, val... | [
"0.58583015",
"0.58164454",
"0.581638",
"0.5803544",
"0.57751137",
"0.57710737",
"0.5718073",
"0.5690226",
"0.56397927",
"0.5631654",
"0.5590139",
"0.5589146",
"0.5583981",
"0.55819696",
"0.55749696",
"0.55671895",
"0.5548742",
"0.554301",
"0.5534962",
"0.5534316",
"0.5531239... | 0.75421697 | 0 |
Validates the JSON dictionary sent by the user when creating a Pagamento. | def validate_pagamento_post_body(request_body: dict):
required_fields = [
'identificador_emprestimo',
'valor_pagamento'
]
request_fields = request_body.keys()
for current_required_field in required_fields:
if current_required_field not in request_fields:
raise Missin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def validate_json(self):\n pass",
"def _validate_create_data(self, data):\n return",
"def create(self, validated_data):",
"def validate(self, data):\n # if data['is_private'] and data['contestants']:\n # raise serializers.ValidationError(\"Can not be private and compete for an... | [
"0.7068357",
"0.6141734",
"0.60594136",
"0.60030067",
"0.6002071",
"0.59264493",
"0.5910239",
"0.58622766",
"0.5812757",
"0.5808841",
"0.58040327",
"0.57736635",
"0.57449734",
"0.57398224",
"0.5738791",
"0.5735156",
"0.5733867",
"0.57307583",
"0.5697649",
"0.56958103",
"0.568... | 0.65309066 | 1 |
Validates that the debit balance of a given Emprestimo has a valid amount. | def validate_saldo_devedor(retrieved_emprestimo: Emprestimo):
saldo_devedor = Decimal(retrieved_emprestimo.saldo_devedor)
if saldo_devedor <= 0:
raise EmprestimoAlreadyPaid(code=400)
return | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clean_amount(self):\n if self.payer_channel == 2: # ignore balance check if not using wallet\n return self.cleaned_data['amount']\n else:\n pay_amount = self.cleaned_data.get('amount')*100\n payer_wallet = Wallet.objects.filter(wallet_id=self.cleaned_data.get('pa... | [
"0.63009316",
"0.614066",
"0.6098432",
"0.6083763",
"0.60808414",
"0.5989632",
"0.5976306",
"0.59607124",
"0.5939567",
"0.5887588",
"0.5802858",
"0.5802734",
"0.5797164",
"0.57809216",
"0.5778546",
"0.577021",
"0.5747786",
"0.5740866",
"0.5698561",
"0.5653559",
"0.56392777",
... | 0.6441091 | 0 |
Read and return the entire body from an incoming ASGI message. | async def read_body(receive):
body = b''
more_body = True
while more_body:
message = await receive()
body += message.get('body', b'')
more_body = message.get('more_body', False)
return body | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def body(self):\n return self.message.get_data()",
"def read_message(self):\n\n while True:\n try:\n return sirf.from_bytes(self._read_binary_sirf_msg())\n except sirf.UnrecognizedMessageException:\n pass",
"def get_body(self):\r\n fp = s... | [
"0.7171867",
"0.7002299",
"0.6945863",
"0.69443023",
"0.6765107",
"0.66191244",
"0.6526772",
"0.649252",
"0.649252",
"0.64873606",
"0.64821017",
"0.64510393",
"0.6444678",
"0.6432183",
"0.6378766",
"0.6374997",
"0.6289457",
"0.6279166",
"0.6240841",
"0.6194617",
"0.613388",
... | 0.7449023 | 0 |
Create a valid protocol message, with length field | def create_msg(data):
length = str(len(str(data))).zfill(LENGTH_FIELD_SIZE)
return length + str(data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_msg(data):\n length = str(len(str(data))).zfill(LENGTH_FIELD_SIZE)\n return length + data",
"def _pack_length(buffer: bytes) -> bytes:\n length = len(buffer)\n length_bytes = struct.pack('!Q', length)\n return length_bytes",
"def getLength(msg):\n return len(msg)",
"def encode_lendelim... | [
"0.7486528",
"0.670294",
"0.64610213",
"0.6179611",
"0.6079684",
"0.6065394",
"0.60339963",
"0.598026",
"0.59798115",
"0.59380317",
"0.59180343",
"0.58645433",
"0.58499455",
"0.58485824",
"0.58321995",
"0.58152246",
"0.5799506",
"0.57911426",
"0.57873666",
"0.57849824",
"0.57... | 0.74969906 | 0 |
This function is responsible for releasing the blocked IP by the set time. | def freeBlackList():
try:
while True:
sleep(FREE_BLACK_LIST)
t = datetime.now()
black_list_mutex.acquire()
black_list_copy = dict(black_list)
black_list_mutex.release()
for blackIp in black_list_copy:
if (t - black_list_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def blackList():\n try:\n while True:\n sleep(1)\n mutex.acquire()\n checkIP_dict_copy = dict(checkIP_dict)\n mutex.release()\n for ipList in checkIP_dict_copy:\n if len(checkIP_dict_copy[ipList]) > PACKETS_TO_BLOCK:\n ... | [
"0.61541635",
"0.59121746",
"0.5755059",
"0.57196534",
"0.56583065",
"0.5642883",
"0.5639868",
"0.56046045",
"0.5575496",
"0.5566641",
"0.55172104",
"0.5496009",
"0.5491099",
"0.54876447",
"0.54772764",
"0.5464837",
"0.5397844",
"0.53697824",
"0.5352636",
"0.53023887",
"0.527... | 0.64084935 | 0 |
Build search index for all documents | def build(self):
self.documents = self.get_items_to_index()
self.build_index() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def build_index(self):\n self.rebuild_index()",
"def build_index(self):\n\t\tix = self.create_index()\n\t\twriter = AsyncWriter(ix)\n\n\t\tfor i, document in enumerate(self.documents):\n\t\t\tif document:\n\t\t\t\twriter.add_document(**document)\n\t\t\tupdate_progress_bar(\"Building Index\", i, len(self.d... | [
"0.7510572",
"0.7441635",
"0.741455",
"0.7047663",
"0.6938286",
"0.68314415",
"0.67908615",
"0.67715424",
"0.67561007",
"0.67438495",
"0.67119575",
"0.6662606",
"0.6621225",
"0.65749675",
"0.6567103",
"0.6549415",
"0.6501347",
"0.6501347",
"0.64968705",
"0.64968073",
"0.64918... | 0.7918139 | 0 |
Wraps `update_index` method, gets the document from name and updates the index. This function changes the current user and should only be run as administrator or in a background job. | def update_index_by_name(self, doc_name):
document = self.get_document_to_index(doc_name)
if document:
self.update_index(document) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def document_update(index_name, doc_type, doc_id, doc=None, new=None):\n if doc:\n resp = es.index(index=index_name, doc_type=doc_type,\n id=doc_id, body=doc)\n print(resp)\n else:\n resp = es.update(index=index_name, doc_type=doc_type,\n id... | [
"0.6582784",
"0.6314694",
"0.61345226",
"0.5895681",
"0.58917546",
"0.5836543",
"0.57870644",
"0.57813394",
"0.5745182",
"0.5685634",
"0.5635591",
"0.56094766",
"0.54920286",
"0.54631126",
"0.5432686",
"0.5430535",
"0.54022944",
"0.5394783",
"0.53924876",
"0.5369674",
"0.5230... | 0.68843704 | 0 |
Remove document from search index | def remove_document_from_index(self, doc_name):
if not doc_name:
return
ix = self.get_index()
with ix.searcher():
writer = AsyncWriter(ix)
writer.delete_by_term(self.id, doc_name)
writer.commit(optimize=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def remove_doc(self, *args, **kwargs):\n pass",
"def _clear_document(self, docid):\n doc = self.get_document(docid)\n for term, count in doc.get_terms():\n term_entry = self.sql_session.query(Term).get(term)\n term_entry.count -= abs(count)\n term_entry... | [
"0.7311551",
"0.72264284",
"0.7104686",
"0.70181084",
"0.6967391",
"0.6967125",
"0.68808126",
"0.6798509",
"0.67698485",
"0.6751425",
"0.6734667",
"0.67052644",
"0.6686145",
"0.6654871",
"0.6604699",
"0.65923506",
"0.65571827",
"0.65482974",
"0.6533436",
"0.65313524",
"0.6530... | 0.7797478 | 0 |
Update search index for a document | def update_index(self, document):
ix = self.get_index()
with ix.searcher():
writer = AsyncWriter(ix)
writer.delete_by_term(self.id, document[self.id])
writer.add_document(**document)
writer.commit(optimize=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def document_update(index_name, doc_type, doc_id, doc=None, new=None):\n if doc:\n resp = es.index(index=index_name, doc_type=doc_type,\n id=doc_id, body=doc)\n print(resp)\n else:\n resp = es.update(index=index_name, doc_type=doc_type,\n id... | [
"0.75047535",
"0.73518085",
"0.7149946",
"0.7124623",
"0.7081882",
"0.68118674",
"0.67642194",
"0.6756572",
"0.66605294",
"0.65296227",
"0.6529148",
"0.6518043",
"0.64566094",
"0.6440681",
"0.6385249",
"0.62557346",
"0.62557346",
"0.62353283",
"0.6220174",
"0.6194292",
"0.616... | 0.81124526 | 0 |
Build index for all parsed documents | def build_index(self):
ix = self.create_index()
writer = AsyncWriter(ix)
for i, document in enumerate(self.documents):
if document:
writer.add_document(**document)
update_progress_bar("Building Index", i, len(self.documents))
writer.commit(optimize=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def build(self):\n\t\tself.documents = self.get_items_to_index()\n\t\tself.build_index()",
"def build_index():\n pass",
"def build_index(self):\n self.rebuild_index()",
"def build_index(self):\n self.create_index()\n logger.debug(f\"Building index with {self.n_trees} trees.\")\n\n ... | [
"0.83256227",
"0.77874684",
"0.7753127",
"0.7416096",
"0.73743004",
"0.7191397",
"0.7181191",
"0.714344",
"0.714344",
"0.71003264",
"0.70777225",
"0.7039015",
"0.69949883",
"0.6987209",
"0.6956354",
"0.6863639",
"0.68413687",
"0.68169665",
"0.679106",
"0.6749154",
"0.67245233... | 0.7882573 | 1 |
Runs south schemamigration on all apps returned by "get_apps_to_migrate". Each schema migration is run with "auto" flag | def create_automatic_migration():
with cd(env.SRC_PATH):
apps = run('%s fabfiles/django_scripts/get_apps_to_migrate.py' %
env.PYTHON_BIN).split('\n')
with settings(hide('warnings'), warn_only=True):
for app in apps:
output = sudo('%s manage.py schemamig... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def southify(app):\n managepy('migrate %s 0001 --fake' % app)\n managepy('migrate %s' % app)",
"def makemigrations(*apps):\n # First sync db\n print(apps)\n\n if len(apps) > 0:\n for app in apps:\n try:\n _manage('makemigrations %s' % app)\n except Excep... | [
"0.67692083",
"0.6656308",
"0.6613688",
"0.6557",
"0.6499399",
"0.64596254",
"0.6341369",
"0.6265879",
"0.6230948",
"0.6154957",
"0.6091057",
"0.5956109",
"0.59176445",
"0.57660276",
"0.5757794",
"0.5756343",
"0.56444794",
"0.5610135",
"0.5602052",
"0.55855143",
"0.55838245",... | 0.81459117 | 0 |
Gets a list of apps that doesn't yet have migration from "get_apps_without_migration" script and then initializes migration for each. | def migrate_new_apps():
new_apps = run('%s %s/fabfiles/django_scripts/get_apps_without_migration.py'
% (env.PYTHON_BIN, env.SRC_PATH))
# The script denotes the start of its output by "{% output %}" tag so we
# only take whatever's after that
new_apps = new_apps.split('{% output %}')[1... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setup_before_migration(self, apps):",
"def setUpBeforeMigration(self, apps):\n pass",
"def get_apps(exclude=(), append=(), current={'apps': INSTALLED_APPS}):\n\n current['apps'] = tuple(\n [a for a in current['apps'] if a not in exclude]\n ) + tuple(append)\n return current['apps']",... | [
"0.62361884",
"0.5982497",
"0.58385533",
"0.58330125",
"0.5788219",
"0.57620466",
"0.5741795",
"0.5650294",
"0.56121147",
"0.5555807",
"0.5535147",
"0.5530973",
"0.54305017",
"0.54124385",
"0.5388467",
"0.53878886",
"0.5378946",
"0.5378946",
"0.53379714",
"0.52789307",
"0.524... | 0.69841594 | 0 |
Get a CHECLabPy mapping dataframe from a TargetCalib Mapping class, along with the metadata | def get_clp_mapping_from_tc_mapping(tc_mapping):
df = tc_mapping.as_dataframe()
with warnings.catch_warnings():
warnings.simplefilter('ignore', UserWarning)
df.metadata = dict(
cfgfile=tc_mapping.GetCfgPath(),
is_single_module=tc_mapping.IsSingleModule(),
n_pi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_tc_mapping_from_clp_mapping(mapping):\n from target_calib import Mapping\n cfgfile = mapping.metadata.cfgfile\n is_single_module = mapping.metadata.is_single_module\n return Mapping(cfgfile, is_single_module)",
"def extract_mapping(self) -> DatasetMapping:\n # store fields\n fie... | [
"0.5879612",
"0.5849439",
"0.5698403",
"0.5464577",
"0.5324275",
"0.52263373",
"0.5191089",
"0.51603305",
"0.5159318",
"0.51573485",
"0.515009",
"0.5109067",
"0.5103742",
"0.51017255",
"0.5101156",
"0.5100191",
"0.5075891",
"0.50608844",
"0.506077",
"0.50210524",
"0.49803126"... | 0.6413704 | 0 |
Get a TargetCalib Mapping class from a CHECLabPy mapping dataframe | def get_tc_mapping_from_clp_mapping(mapping):
from target_calib import Mapping
cfgfile = mapping.metadata.cfgfile
is_single_module = mapping.metadata.is_single_module
return Mapping(cfgfile, is_single_module) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_clp_mapping_from_tc_mapping(tc_mapping):\n df = tc_mapping.as_dataframe()\n with warnings.catch_warnings():\n warnings.simplefilter('ignore', UserWarning)\n df.metadata = dict(\n cfgfile=tc_mapping.GetCfgPath(),\n is_single_module=tc_mapping.IsSingleModule(),\n ... | [
"0.55554885",
"0.54838264",
"0.5463873",
"0.5452938",
"0.5402549",
"0.5344908",
"0.5194821",
"0.5160289",
"0.5150634",
"0.5137784",
"0.49706706",
"0.49673322",
"0.4913103",
"0.49015024",
"0.48931438",
"0.48652962",
"0.48634318",
"0.48581672",
"0.4845288",
"0.48292354",
"0.482... | 0.62780577 | 0 |
Reorganise a CHECLabPy mapping dataframe to represent the positions of the superpixels on the camera | def get_superpixel_mapping(mapping):
df = mapping[['superpixel', 'slot', 'asic', 'row', 'col', 'xpix', 'ypix']]
f_rowcol = lambda v: v.values[0] // 2
f = dict(slot='first', asic='first', row=f_rowcol, col=f_rowcol,
xpix='mean', ypix='mean')
df = df.groupby('superpixel').agg(f).reset_index()... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def prepare_map(self):\n for y_coord, row in enumerate(self.contents):\n for x_coord, tile in enumerate(row):\n bit_map = self.get_tile_bitmap(tile)\n self.image[y_coord * TILE_SIZE:(y_coord+1) * TILE_SIZE,\n x_coord * TILE_SIZE:(x_coord+1) * TILE_SIZE... | [
"0.59849113",
"0.5915483",
"0.5876404",
"0.58668536",
"0.57723576",
"0.5757489",
"0.5700977",
"0.56903124",
"0.565253",
"0.55369437",
"0.54388404",
"0.54064953",
"0.53903157",
"0.53853375",
"0.5287989",
"0.5275049",
"0.5264429",
"0.5245041",
"0.5244364",
"0.5240738",
"0.52259... | 0.68559575 | 0 |
Reorganise a CHECLabPy mapping dataframe to represent the positions of the TMs on the camera | def get_tm_mapping(mapping):
df = mapping[['slot', 'row', 'col', 'xpix', 'ypix']]
f_rowcol = lambda v: v.values[0] // 8
f = dict(row=f_rowcol, col=f_rowcol, xpix='mean', ypix='mean')
df = df.groupby('slot').agg(f, as_index=False).reset_index()
with warnings.catch_warnings():
warnings.simplef... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _transform_map_data(self):\n WARD_FMT = '%s-%s'\n self.map_data_trans = []\n lookup = {i.column: ''.join(filter(lambda x: x.isdigit(), i.value)) for i in self.sht[1]}\n\n #skip over header\n rs = iter(self.sht.rows)\n next(rs)\n next(rs)\n for r in rs:\n ... | [
"0.6177589",
"0.5728555",
"0.54735",
"0.54279035",
"0.5355527",
"0.5344768",
"0.53161705",
"0.52990043",
"0.52838224",
"0.52707195",
"0.5265003",
"0.5217598",
"0.52048844",
"0.5203994",
"0.5185803",
"0.517473",
"0.5171569",
"0.51540214",
"0.5146628",
"0.51453954",
"0.51355565... | 0.65466154 | 0 |
Takes a "rank_stat" and returns the corresponding rank tier. | def stat_to_rank(stat: float) -> MatchmakingRank:
if stat < 640:
return MatchmakingRank.BRONZE
elif stat < 1205:
return MatchmakingRank.SILVER
elif stat < 1525:
return MatchmakingRank.GOLD
elif stat < 1840:
return MatchmakingRank.PLATINUM
elif stat < 2325:
re... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_rank(self, pb):\n\n for rank in self.RANKS:\n start = self.RANKS[rank][\"ProgressStart\"]\n # 1 is not subtracted as we're calling range\n end = start + self.RANKS[rank][\"Progress\"]\n if pb in range(start, end):\n return int(rank)\n ... | [
"0.6328909",
"0.63168454",
"0.6305692",
"0.6052862",
"0.6052862",
"0.6052862",
"0.5901413",
"0.5901413",
"0.5901413",
"0.5901413",
"0.58891994",
"0.5870279",
"0.57966596",
"0.578719",
"0.5786248",
"0.5762286",
"0.5722983",
"0.5714094",
"0.5696032",
"0.5685568",
"0.56809604",
... | 0.7347181 | 0 |
Return info for a older bundle with different files and case id as bundle data | def bundle_data_old(
bundle_data, second_sample_vcf, second_family_vcf, old_timestamp, other_case
) -> dict:
_bundle = deepcopy(bundle_data)
_bundle["name"] = other_case
_bundle["created_at"] = old_timestamp
_bundle["files"][0]["path"] = str(second_sample_vcf)
_bundle["files"][1]["path"] = str(s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fixture_second_bundle_data(\n bundle_data, second_sample_vcf, second_family_vcf, second_timestamp\n) -> dict:\n second_bundle = deepcopy(bundle_data)\n second_bundle[\"created_at\"] = second_timestamp\n second_bundle[\"files\"][0][\"path\"] = str(second_sample_vcf)\n second_bundle[\"files\"][1][... | [
"0.5758605",
"0.5704518",
"0.5458561",
"0.52549213",
"0.5220217",
"0.5168954",
"0.514138",
"0.50823754",
"0.5063294",
"0.5033314",
"0.50262773",
"0.4997755",
"0.49838117",
"0.4980969",
"0.4968935",
"0.4949644",
"0.49355388",
"0.49167094",
"0.49107787",
"0.4896594",
"0.4889718... | 0.7276245 | 0 |
decorator adding system environment variables as args (cae, asd and notification) to route methods. | def route_also_test_sys_env(route_path, method='GET', **route_kwargs):
test_path_prefix = '/test'
ext_path = list()
for p in makelist(route_path):
assert p.startswith("/")
ext_path.append(p)
ext_path.append(test_path_prefix + p)
assert method
def decorator(func):
@ap... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def register_environment_functions(self):\n self.environment.globals['path_join'] = path_join\n self.environment.globals['path_normalize'] = path_normalize",
"def _route(self, args, request=None):\n return self._openstack_heat_proxy, []",
"def route(self, env):\n return None",
"de... | [
"0.5968879",
"0.5868147",
"0.5812351",
"0.5365206",
"0.53630054",
"0.5333143",
"0.532401",
"0.53173923",
"0.5289022",
"0.525158",
"0.5246465",
"0.5223033",
"0.5183784",
"0.51792026",
"0.51792026",
"0.51792026",
"0.5156263",
"0.51261306",
"0.5121318",
"0.506178",
"0.5056028",
... | 0.65974593 | 0 |
Provider's certificate and private key. Your certificate will probably contain the private key. Open it with any text editor, it should be plain text (PEM format). The certificate is enclosed in ``BEGIN/END CERTIFICATE`` strings and private key is in ``BEGIN/END RSA PRIVATE KEY`` section. If you can not find the privat... | def __init__(self, cert_string=None, cert_file=None, key_string=None, key_file=None, passphrase=None):
self._context = OpenSSL.SSL.Context(OpenSSL.SSL.TLSv1_METHOD)
if cert_file:
# we have to load certificate for equality check. there is no
# other way to obtain certificate from context.
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_private(file):\n with open(file, \"rb\") as pemfile:\n key = jwk.JWK.from_pem(pemfile.read())\n\n logging.info('Loaded private key from {}'.format(file))\n return key",
"def main(key_file: Optional[str]) -> None:\n # Generate a new 256-bit private key if no key is specified.\n if n... | [
"0.6174599",
"0.6088422",
"0.604105",
"0.60326713",
"0.6022407",
"0.6015204",
"0.59857774",
"0.5915274",
"0.58814615",
"0.5870637",
"0.5864049",
"0.5835649",
"0.5823476",
"0.57848394",
"0.5759757",
"0.57294655",
"0.57290053",
"0.5713898",
"0.5687895",
"0.56763566",
"0.5669421... | 0.6177762 | 0 |
Build and return the Connection.StartOk frame. | def _build_start_ok_frame(self):
properties = {
'product': 'maxbunny',
'platform': 'Python {0.major}.{0.minor}.{0.micro}'.format(sys.version_info),
'capabilities': {'authentication_failure_close': True,
'basic.nack': True,
'connection.blocked... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FrameStart(builder):\n return Start(builder)",
"def beginMessageFrame(self, length):",
"def handshake_ok(self):\n self.logger.info(\"Handshake successful\")\n self._th.start()",
"def connectionMade (self) :\r\n self.state = 'wait_hello'\r\n self.handshake_timeout = reactor.... | [
"0.58045036",
"0.53078264",
"0.51501924",
"0.50711405",
"0.5048201",
"0.49912825",
"0.49912825",
"0.4917413",
"0.48926973",
"0.48198345",
"0.4765753",
"0.47607332",
"0.47559747",
"0.4721729",
"0.47118258",
"0.4703733",
"0.46957642",
"0.46787456",
"0.4667569",
"0.46500474",
"0... | 0.77953476 | 0 |
Build the parity check and generator matrices from parameters dictionary and add the result in this dictionary. Generator matrix is valid only for triangular systematic LDPC codes. | def build_matrix(ldpc_code_params):
n_cnodes = ldpc_code_params['n_cnodes']
cnode_deg_list = ldpc_code_params['cnode_deg_list']
cnode_adj_list = ldpc_code_params['cnode_adj_list'].reshape((n_cnodes, ldpc_code_params['max_cnode_deg']))
parity_check_matrix = sp.lil_matrix((n_cnodes, ldpc_code_params['n_v... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def construct_param_dict(params,K_RC,K_CP,m_P):\n ###scaling constants\n w=params['w']\n pd=params['pd'] # in 3D and 0.21 in 2D\n pv=params['pv']\n Er=params['Er'] ;Ek=params['Ek']\n ER=params['ER'];EC=params['EC'];EP=params['EP'];\n Eq1=params['Eq1'];Eq2=params['Eq2']\n\n\n #capture succes... | [
"0.5924104",
"0.5859595",
"0.581538",
"0.5813734",
"0.57921785",
"0.5705287",
"0.55906624",
"0.5581752",
"0.5518668",
"0.5449996",
"0.542966",
"0.54095256",
"0.53750515",
"0.531806",
"0.5298832",
"0.5294785",
"0.52842057",
"0.5280006",
"0.52593905",
"0.52276725",
"0.5195998",... | 0.67367667 | 0 |
Extract parameters from LDPC code design file and produce an parity check matrix if asked. | def get_ldpc_code_params(ldpc_design_filename, compute_matrix=False):
with open(ldpc_design_filename) as ldpc_design_file:
[n_vnodes, n_cnodes] = [int(x) for x in ldpc_design_file.readline().split(' ')]
[max_vnode_deg, max_cnode_deg] = [int(x) for x in ldpc_design_file.readline().split(' ')]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def build_matrix(ldpc_code_params):\n n_cnodes = ldpc_code_params['n_cnodes']\n cnode_deg_list = ldpc_code_params['cnode_deg_list']\n cnode_adj_list = ldpc_code_params['cnode_adj_list'].reshape((n_cnodes, ldpc_code_params['max_cnode_deg']))\n\n parity_check_matrix = sp.lil_matrix((n_cnodes, ldpc_code_p... | [
"0.6180404",
"0.6107782",
"0.5788499",
"0.5788499",
"0.5377467",
"0.5359825",
"0.53577226",
"0.5217406",
"0.5157572",
"0.515159",
"0.5149032",
"0.5126366",
"0.51083964",
"0.5108288",
"0.5094369",
"0.50801593",
"0.5078983",
"0.50694233",
"0.50590974",
"0.50589293",
"0.5052635"... | 0.6867151 | 0 |
LDPC Decoder using Belief Propagation (BP). If several blocks are provided, they are all decoded at once. | def ldpc_bp_decode(llr_vec, ldpc_code_params, decoder_algorithm, n_iters):
# Clip LLRs
llr_vec.clip(-_llr_max, _llr_max, llr_vec)
# Build parity_check_matrix if required
if ldpc_code_params.get('parity_check_matrix') is None:
build_matrix(ldpc_code_params)
# Initialization
dec_word = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def decoder_block(input, filters, block):\n\n conv_bn_name_base = 'decoder_' + str(block) + '_'\n\n i_filters, o_filters = filters\n\n x = _conv_bn(filters=i_filters//4, kernel_size=(1, 1), \n name=conv_bn_name_base + '1a')(input)\n x = Activation('relu', name= conv_bn_name_base + '1a_a... | [
"0.5866476",
"0.582692",
"0.56970245",
"0.54162115",
"0.53634036",
"0.5342792",
"0.5334444",
"0.5320899",
"0.5312362",
"0.5306843",
"0.53014386",
"0.5288399",
"0.5281557",
"0.527943",
"0.5242391",
"0.5194957",
"0.51797915",
"0.5153717",
"0.51418704",
"0.5138252",
"0.5125196",... | 0.63204 | 0 |
Write parameters from LDPC parity check matrix to a design file. | def write_ldpc_params(parity_check_matrix, file_path):
with open(file_path, 'x') as file:
file.write('{} {}\n'.format(parity_check_matrix.shape[1], parity_check_matrix.shape[0]))
file.write('{} {}\n'.format(parity_check_matrix.sum(0).max(), parity_check_matrix.sum(1).max()))
for deg in pari... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def write_param(self):\n param_file = f\"{self.name}.snapparam\"\n coeff_file = f\"{self.name}.snapcoeff\"\n model = self.model\n describer = self.model.describer\n profile = describer.element_profile\n ne = len(self.elements)\n nbc = len(describer.subscripts)\n ... | [
"0.5617393",
"0.5587787",
"0.55511326",
"0.5521288",
"0.5499419",
"0.5494021",
"0.5477036",
"0.5463275",
"0.5436061",
"0.54259026",
"0.54250026",
"0.539086",
"0.5389055",
"0.53797954",
"0.5359655",
"0.5351901",
"0.5338176",
"0.5335632",
"0.533153",
"0.5329442",
"0.53114724",
... | 0.7446344 | 0 |
Encode bits using the LDPC code specified. If the generator matrix is not computed, this function will build it and add it to the dictionary. It will also add the parity check matrix. This function work only for LDPC specified by a triangular parity check matrix. | def triang_ldpc_systematic_encode(message_bits, ldpc_code_params, pad=True):
if ldpc_code_params.get('generator_matrix') is None:
build_matrix(ldpc_code_params)
block_length = ldpc_code_params['generator_matrix'].shape[1]
modulo = len(message_bits) % block_length
if modulo:
if pad:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def build_matrix(ldpc_code_params):\n n_cnodes = ldpc_code_params['n_cnodes']\n cnode_deg_list = ldpc_code_params['cnode_deg_list']\n cnode_adj_list = ldpc_code_params['cnode_adj_list'].reshape((n_cnodes, ldpc_code_params['max_cnode_deg']))\n\n parity_check_matrix = sp.lil_matrix((n_cnodes, ldpc_code_p... | [
"0.62479126",
"0.55248183",
"0.5339862",
"0.52339995",
"0.5222241",
"0.5215075",
"0.5206439",
"0.5193585",
"0.5191156",
"0.517311",
"0.5165495",
"0.5134218",
"0.51206446",
"0.5109438",
"0.510438",
"0.50886375",
"0.5047812",
"0.50390834",
"0.5037392",
"0.49967304",
"0.49935836... | 0.66222674 | 0 |
Function to update the tygron ids of the hexagons. | def update_hexagons_tygron_id(api_key, hexagons):
buildings_json = get_buildings(api_key)
building_indices = {}
for building in buildings_json:
name = building["name"]
tygron_id = building["id"]
try:
building_indices.update({int(name): tygron_id})
except ValueErro... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hex_to_terrain(api_key, hexagons, updated_hex=[]):\n for feature in hexagons.features:\n if feature.properties[\"ghost_hexagon\"]:\n continue\n if (not feature.properties[\"landuse_changed\"] or\n feature.id not in updated_hex):\n continue\n if feature.p... | [
"0.586372",
"0.5859546",
"0.5329968",
"0.53129816",
"0.52914464",
"0.523383",
"0.52216274",
"0.5105096",
"0.50544286",
"0.50509894",
"0.49191013",
"0.48588708",
"0.48588708",
"0.4852354",
"0.48134345",
"0.48060584",
"0.4772051",
"0.4772051",
"0.4719306",
"0.47116366",
"0.4710... | 0.7587299 | 0 |
Function to set the name of a hexagon to the correct name (number). | def set_name(api_key, tygron_id, hex_id,
api_endpoint=("https://engine.tygron.com/api/session/event/"
"EditorBuildingEventType/SET_NAME/?")):
r = requests.post(url=api_endpoint+api_key, json=[tygron_id, str(hex_id)])
return | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _build_name(name_idx):\n return \"explored%s.set_%05d.xa_%08d\" % (\n ArrayParameter.IDENTIFIER,\n name_idx // 1000,\n name_idx,\n )",
"def update_hexagons_tygron_id(api_key, hexagons):\n buildings_json = get_buildings(api_key)\n building_indices = {}\n ... | [
"0.5881488",
"0.5826369",
"0.5683673",
"0.5620663",
"0.5558112",
"0.5516085",
"0.5431137",
"0.5402292",
"0.53735334",
"0.5367253",
"0.5364026",
"0.5355493",
"0.5334124",
"0.5283778",
"0.52785116",
"0.5265447",
"0.52545244",
"0.52326155",
"0.52306306",
"0.52300334",
"0.5227822... | 0.60160667 | 0 |
Function that updates terrain in Tygron. Mainly, it updates terrain from land to water and visa versa. In case of water to land, first changes the hexagon terrain to water and then adds a building to it which is subsequently updated to a specific land use. In case of land to water, first removes any building (the land ... | def set_terrain_type(api_key, hexagons):
print("Updating terrain in Tygron.")
water = []
land = []
new_land_hexagons = []
for feature in hexagons.features:
if feature.properties["ghost_hexagon"]:
continue
if (feature.properties["water"] and feature.properties["z_changed"]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update_terrain(api_key, hexagons, terrain_type=\"land\",\n api_endpoint=(\"https://engine.tygron.com/api/session/event/\"\n \"editorterraintype/add_polygons/?\")):\n #api_endpoint=(\"https://engine.tygron.com/api/session/event/\"\n ... | [
"0.7525782",
"0.6845231",
"0.6591184",
"0.5809958",
"0.5778474",
"0.56340736",
"0.52314967",
"0.5210021",
"0.52086395",
"0.5202405",
"0.5185632",
"0.51269186",
"0.51067215",
"0.50655377",
"0.5034269",
"0.50019854",
"0.49549943",
"0.49203625",
"0.4918938",
"0.48928946",
"0.487... | 0.76849604 | 0 |
Function that removes a building (land use) from a hexagon in Tygron. | def remove_polygon(api_key, hexagon_id, hexagon_shape,
api_endpoint=("https://engine.tygron.com/api/session/event/"
"editorbuilding/remove_polygons/?")):
multi = geometry.MultiPolygon([hexagon_shape])
remove = geometry.mapping(multi)
r = requests.post(url=... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def removePiece(self, address):\r\n\r\n try:\r\n del self.pieces[address]\r\n except KeyError:\r\n print(\"error removing piece!\")",
"def building_remove(self, pos):\n x, y = pos\n step = self.bmap_step[y,x]\n\n if step == 0:\n return\n\n ... | [
"0.60260516",
"0.589402",
"0.57976645",
"0.5771571",
"0.57223827",
"0.56906205",
"0.5665472",
"0.566421",
"0.56499624",
"0.5643485",
"0.56412137",
"0.5638769",
"0.5636346",
"0.5586818",
"0.55217534",
"0.5487509",
"0.54721737",
"0.54525524",
"0.5427359",
"0.5420205",
"0.540115... | 0.6158906 | 0 |
Function that adds a polygon to a building (land use) for a hexagon in Tygron. | def add_polygon(api_key, hexagon_id, hexagon_shape,
api_endpoint=("https://engine.tygron.com/api/session/event/"
"editorbuilding/add_polygons/?")):
multi = geometry.MultiPolygon([hexagon_shape])
add = geometry.mapping(multi)
r = requests.post(url=api_endpoint+ap... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_polygon(api_key, hexagon_id, hexagon_shape,\n api_endpoint=(\"https://engine.tygron.com/api/session/event/\"\n \"editorbuilding/remove_polygons/?\")):\n multi = geometry.MultiPolygon([hexagon_shape])\n remove = geometry.mapping(multi)\n r = requ... | [
"0.66903",
"0.65520537",
"0.6541646",
"0.65083295",
"0.6460481",
"0.6449254",
"0.6375598",
"0.6358973",
"0.6217814",
"0.6187657",
"0.6100013",
"0.6060723",
"0.59821373",
"0.596438",
"0.5940371",
"0.59127146",
"0.59109634",
"0.5894658",
"0.5890243",
"0.58786297",
"0.5862998",
... | 0.81500745 | 0 |
Function to update the elevation of the entire Tygron world. Uploads a new GeoTIFF and in case of the initiating the session, selects the GeoTIFF as the elevation map. On turn updates, selects the newly updated GeoTIFF as the new elevation map. | def set_elevation(tiff_file, api_key, turn=0,
api_endpoint=("https://engine.tygron.com/api/session/"
"event/editorgeotiff/add/?")):
with open(tiff_file, 'rb') as f:
heightmap = f.read()
# the "True" value in below's if statement should be "start"
jso... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update_elevation(tiff_file, api_key, heightmap_id, turn=0,\n api_endpoint=(\"https://engine.tygron.com/api/session/\"\n \"event/editorgeotiff/set_geotiff/?\")):\n json = elevation_json(heightmap_id, tiff_file)\n json.append(\"\")\n r = requests.pos... | [
"0.7342615",
"0.615945",
"0.6056372",
"0.5927916",
"0.5847036",
"0.5807111",
"0.56800777",
"0.56497514",
"0.5594766",
"0.55435115",
"0.5540588",
"0.55368257",
"0.54176605",
"0.53495723",
"0.52447486",
"0.5220828",
"0.5142897",
"0.5095652",
"0.5079855",
"0.5077316",
"0.5056361... | 0.7060468 | 1 |
This function should override the initial geotiff and therefore update the elevation in tygron. Doesn't seem to work. Workaround right now is to upload new geotiffs and set these (this method is therefore not called). | def update_elevation(tiff_file, api_key, heightmap_id, turn=0,
api_endpoint=("https://engine.tygron.com/api/session/"
"event/editorgeotiff/set_geotiff/?")):
json = elevation_json(heightmap_id, tiff_file)
json.append("")
r = requests.post(url=api_endpoi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_elevation(tiff_file, api_key, turn=0,\n api_endpoint=(\"https://engine.tygron.com/api/session/\"\n \"event/editorgeotiff/add/?\")):\n with open(tiff_file, 'rb') as f:\n heightmap = f.read()\n # the \"True\" value in below's if statement should be... | [
"0.6680141",
"0.60367554",
"0.5995463",
"0.5862422",
"0.5855857",
"0.5779428",
"0.56723416",
"0.56653994",
"0.56213546",
"0.5600229",
"0.5599685",
"0.55988145",
"0.5545286",
"0.5522815",
"0.5511892",
"0.55095816",
"0.5483317",
"0.54387504",
"0.5392006",
"0.5379154",
"0.537888... | 0.67479956 | 0 |
Function that creates a base64 string for the geotiff that can be sent to tygron to set the elevation. | def elevation_json(tiff_id, heightmap):
tiff_base64 = base64.b64encode(heightmap).decode()
uploader = "r.j.denhaan@utwente.nl"
datapackage = [tiff_id, tiff_base64, uploader]
return datapackage | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def base64_string(self) -> global___Expression:",
"def b64raster(self):\n r = self.craster()\n if r:\n if len(r) == 1:\n return r\n return b64encode(r)\n else:\n return None",
"def data64(self) -> str:\n return Image.encode64(self.data... | [
"0.63015264",
"0.6070919",
"0.6030863",
"0.5926847",
"0.5821027",
"0.57451266",
"0.5641829",
"0.5537338",
"0.5422397",
"0.539643",
"0.5336962",
"0.52937645",
"0.52591014",
"0.5249936",
"0.523852",
"0.5233775",
"0.5231762",
"0.52172726",
"0.51924545",
"0.51920223",
"0.51748586... | 0.6254466 | 1 |
Fixes indexes if they're equal to each other. (indexes need to be different so bilinear Interpolation works) | def fixIndexes(self,ind1,ind2):
if ind1 > 0:
ind1 -= 1
else:
ind2 += 1
return ind1,ind2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sgn_inplace(a):",
"def rearrange_indices(self):\n num_fixed_words = 2\n other_words = [w for w in self.word2index if w not in self.equivariant_words]\n for idx, word in enumerate(self.equivariant_words):\n w_idx = idx + num_fixed_words\n self.word2index[word] = w_id... | [
"0.5661166",
"0.56378484",
"0.5634819",
"0.56228524",
"0.56101155",
"0.56002086",
"0.55812037",
"0.5565749",
"0.5563811",
"0.5510975",
"0.55022275",
"0.5485346",
"0.5481212",
"0.5474287",
"0.5463413",
"0.54564655",
"0.54548657",
"0.54502124",
"0.5437336",
"0.54357713",
"0.542... | 0.6148261 | 0 |
A rectangular plate element | def __init__(self, name, i_node, j_node, m_node, n_node, t, material, model, kx_mod=1.0,
ky_mod=1.0):
self.name = name
self.ID = None
self.type = 'Rect'
self.i_node = i_node
self.j_node = j_node
self.m_node = m_node
self.n_node = n_node
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def plate_detection(image):\r\n # RGB to Gray scale conversion\r\n gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)\r\n\r\n # Noise removal with iterative bilateral filter(removes noise while preserving edges)\r\n gray = cv2.bilateralFilter(gray, 11, 17, 17)\r\n\r\n # Find Edges of the grayscale image... | [
"0.6470695",
"0.62726855",
"0.59432906",
"0.592026",
"0.58896947",
"0.5752291",
"0.57409763",
"0.5722156",
"0.5673757",
"0.56601447",
"0.56281257",
"0.56233495",
"0.5604032",
"0.55918354",
"0.55812657",
"0.55492693",
"0.554447",
"0.55371004",
"0.54967135",
"0.5491698",
"0.547... | 0.6404261 | 1 |
Returns the plane stress constitutive matrix for orthotropic materials [Dm] | def Dm(self):
# Apply the stiffness modification factors for each direction to obtain orthotropic
# behavior. Stiffness modification factors of 1.0 in each direction (the default) will
# model isotropic behavior. Orthotropic behavior is limited to the element's local
# coordinate system... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LEIsotropic3D(self):\n const = self.ymod / ((1+self.Nu) * (1-(2*self.Nu)))\n a = const * self.Nu\n b = const * (1-self.Nu)\n c = (a-b)/2\n Cmat = np.array(\n [\n [b, a, a, 0, 0, 0],\n [a, b, a, 0, 0, 0],\n [a, a, b, 0, 0... | [
"0.60292274",
"0.59819984",
"0.57345086",
"0.5642546",
"0.5581126",
"0.552422",
"0.5496026",
"0.5444378",
"0.53759193",
"0.53360397",
"0.53255755",
"0.5318074",
"0.5286071",
"0.52738583",
"0.5266058",
"0.52569264",
"0.52237135",
"0.52229565",
"0.5221235",
"0.52081305",
"0.519... | 0.63702923 | 0 |
Returns the bending constitutive matrix for orthotropic materials [Db] | def Db(self):
# Get the plate thickness and other material parameters
t = self.t
nu_xy = self.nu
nu_yx = self.nu
Ex = self.E*self.kx_mod
Ey = self.E*self.ky_mod
G = self.E/(2*(1 + self.nu))
# Calculate the constitutive matrix [Db]
Db = t**3/(12*(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bloch_matrix(self):\n if self.gf_r is None:\n self.gf()\n\n return -self.gf_r.dot(self.lead[1])",
"def Bmat(self):\n return inv(self.Bimat)",
"def Omat(self):\n if self.standard:\n return np.matrix(((0, -1, 0), (0, 0, 1), (-1, 0, 0)))\n else:\n ... | [
"0.69222116",
"0.609596",
"0.606137",
"0.59909445",
"0.5909125",
"0.5852386",
"0.5816244",
"0.5695768",
"0.56887794",
"0.56873435",
"0.56777513",
"0.5664199",
"0.56461006",
"0.5645297",
"0.5644592",
"0.5551383",
"0.55259997",
"0.5504064",
"0.5495027",
"0.5487847",
"0.54761744... | 0.661039 | 1 |
Returns the plate's displacement coefficient matrix [C] | def _C(self):
# Find the local x and y coordinates at each node
xi = 0
yi = 0
xj = self.width()
yj = 0
xm = xj
ym = self.height()
xn = 0
yn = ym
# Calculate the [C] coefficient matrix
C = array([[1, xi, yi, xi**2, xi*yi, yi**2, xi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m_c(self) -> np.ndarray:\n assert self._k is not None, \"camera must be calibrated\"\n return forge_projective_matrix(self._k)",
"def c_coefficients(x1,x2,x3,y1,y2,y3,initial_slope,final_slope):\n\tC = c_matrix(x1,x2,x3)\n\ty = y_vector(x1,x2,x3,y1,y2,y3,initial_slope,final_slope)\n\tCCoefficie... | [
"0.63772506",
"0.6143459",
"0.6094555",
"0.6072907",
"0.6006293",
"0.5974486",
"0.5959939",
"0.59011567",
"0.5864534",
"0.5793513",
"0.57648194",
"0.56787795",
"0.5678773",
"0.5678146",
"0.56597847",
"0.55940014",
"0.5590818",
"0.55762076",
"0.5556221",
"0.55486333",
"0.55423... | 0.6193459 | 1 |
Returns the vector of plate bending constants for the displacement function. | def _a(self, combo_name='Combo 1'):
# Get the plate's local displacement vector
# Slice out terms not related to plate bending
d = self.d(combo_name)[[2, 3, 4, 8, 9, 10, 14, 15, 16, 20, 21, 22], :]
# Return the plate bending constants
return inv(self._C()) @ d | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def beta_star(self):\n return self.reciprocal_lattice_parameters[4]",
"def f(self, combo_name='Combo 1'):\n \n # Calculate and return the plate's local end force vector\n return add(matmul(self.k(), self.d(combo_name)), self.fer(combo_name))",
"def get_ergodic_region(self):\n ... | [
"0.5608238",
"0.55710584",
"0.5550439",
"0.55046725",
"0.5482634",
"0.5433379",
"0.5390431",
"0.5379944",
"0.53250164",
"0.53131443",
"0.53029263",
"0.5290315",
"0.52844036",
"0.5267767",
"0.5265726",
"0.52587414",
"0.5240262",
"0.522192",
"0.52192664",
"0.5216871",
"0.520415... | 0.59006506 | 0 |
Returns the internal shears (Qx and Qy) at any point (x, y) in the plate's local coordinate system | def shear(self, x, y, combo_name='Combo 1'):
# Store matrices into local variables for quicker access
Db = self.Db()
a = self._a(combo_name)
# Calculate the derivatives of the plate moments needed to compute shears
dMx_dx = (Db @ array([[0, 0, 0, 0, 0, 0, -6, 0, 0, 0, -6*y, 0],... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hemisphere(self):\n return self._hemisphere",
"def shear(self, x: float, y: float):\n # Shearing is done from (0, 0), so that figure won't move after scaling\n dx = np.min(self.points[:, 0])\n dy = np.min(self.points[:, 1])\n self.points[:, 0] -= dx\n self.points[:, ... | [
"0.5938278",
"0.5917872",
"0.5848792",
"0.58379465",
"0.5744022",
"0.5606975",
"0.55739486",
"0.5521951",
"0.5515193",
"0.55012536",
"0.54883546",
"0.54812115",
"0.545093",
"0.5436025",
"0.5358641",
"0.5356636",
"0.5340698",
"0.53122556",
"0.5309303",
"0.5296767",
"0.5249037"... | 0.6757011 | 0 |
Use this with command line arguments to train your Arduino | def main():
#parse arguments (measuring data or not, name of text file, input pins, smoothing out, arduino board, usb port)
parser = argparse.ArgumentParser(description = "Train your Arduino.")
parser.add_argument('-m', dest='measuring', default='True', nargs='?',
help = 'measu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def main():\n parser = argparse.ArgumentParser()\n parser.add_argument(\"--identifier\", required=True,\n help=\"A short name/identifier for your experiment, e.g. 'ex42b'.\")\n args = parser.parse_args()\n\n train(args)",
"def main():\n parser = argparse.ArgumentParser()\n ... | [
"0.7378186",
"0.6789914",
"0.6642009",
"0.65620774",
"0.6514688",
"0.6288233",
"0.62556684",
"0.6232287",
"0.62314373",
"0.6217613",
"0.61685747",
"0.6149851",
"0.61467296",
"0.6105298",
"0.60559887",
"0.5956953",
"0.59439325",
"0.5936752",
"0.5923215",
"0.5919209",
"0.591117... | 0.7404498 | 0 |
Writes the classification Arduino script Saves it in the arduino_script folder under the predict folder (dtw, normalization is already included) | def create_classification_script(centroids, class_labels, pins, smoothing, duration=2000, pause=25):
#change directories to save script in appropriate place
os.chdir('arduino_scripts')
#read in ino script sceletons
with open('predict_1.txt') as p_1:
predict_1 = p_1.read()
with open('predi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def script_generator(self):\n py = self.global_setting.get('python', sys.executable)\n ex_options = self.global_setting.get('evaluate_options', str())\n train_py = \"/home/haihuam/Projects/RepPoints/mmdetection/tools/train.py\"\n if os.access(py, os.X_OK):\n content = \"set -... | [
"0.6173917",
"0.60106975",
"0.5999194",
"0.5992171",
"0.598734",
"0.59429455",
"0.5941721",
"0.5907915",
"0.58673376",
"0.58672464",
"0.5865854",
"0.58323",
"0.58300376",
"0.5804663",
"0.5784708",
"0.5784583",
"0.5777278",
"0.57549924",
"0.57390875",
"0.57278985",
"0.5673287"... | 0.78491086 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.