query stringlengths 10 2k | document stringlengths 20 51.2k | metadata dict | negatives listlengths 0 101 | negative_scores listlengths 0 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Displays statistics on the most popular stations and trip. | def station_stats(df):
print('\nCalculating The Most Popular Stations and Trip...\n')
start_time = time.time()
# display most commonly used start station
most_common_start_station = df.groupby('Start Station').sum()
print('The most common start station is: ', most_common_start_station)
# disp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def station_stats(df):\n\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n start_time = time.time()\n\n # display most commonly used start station\n print(popular_start_station(df))\n\n # display most commonly used end station\n print(popular_end_station(df))\n\n # display m... | [
"0.7815675",
"0.7662213",
"0.7553417",
"0.74914914",
"0.74748665",
"0.7446617",
"0.7428588",
"0.74237514",
"0.74177027",
"0.7400495",
"0.7387161",
"0.7385634",
"0.73647535",
"0.735934",
"0.73566747",
"0.73548365",
"0.7351854",
"0.7351274",
"0.735057",
"0.73421645",
"0.7340198... | 0.71163297 | 63 |
Displays statistics on the total and average trip duration. | def trip_duration_stats(df):
print('\nCalculating Trip Duration...\n')
start_time = time.time()
total_travel_time = df['Trip Duration'].sum()
print("The total time traveled is: ", total_travel_time)
# TO DO: display mean travel time
mean_travel_time = df['Trip Duration'].mean()
print("The... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def trip_duration_stats(data):\n print('\\nCalculating Trip Duration...\\n')\n start_time = time.time()\n # display total travel time\n total_trip_time= data['Trip Duration'].sum()\n print('The Total Travel Time is {} Hours'. format(total_trip_time/3600))\n # display mean travel time\n avg_tri... | [
"0.8145283",
"0.80273277",
"0.800625",
"0.79516613",
"0.79394716",
"0.7933188",
"0.79289365",
"0.7917429",
"0.79167455",
"0.79100615",
"0.79077137",
"0.7902854",
"0.7893696",
"0.7891645",
"0.7888904",
"0.7887135",
"0.78862405",
"0.7884963",
"0.78764445",
"0.7870734",
"0.78687... | 0.7800591 | 47 |
Return the response codes that this view is expected to return, and the serializer for each response body. The return value should be a dict where the keys are possible status codes, and values are either strings, | def get_response_serializers(self):
manual_responses = self.overrides.get('responses', None) or {}
manual_responses = OrderedDict((str(sc), resp) for sc, resp in manual_responses.items())
responses = {}
if not any(is_success(int(sc)) for sc in manual_responses if sc != 'default'):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_response_serializers(self):\n responses = OrderedDict({\n '400': 'Invalid arguments',\n '401': 'Not authenticated',\n '403': \"You don't have access to do this operation on this company\",\n 'error': ErrorSerializer,\n })\n\n responses.update... | [
"0.7411322",
"0.6437743",
"0.6276065",
"0.6112738",
"0.59847903",
"0.59730846",
"0.5926698",
"0.58970106",
"0.58745575",
"0.58067584",
"0.58057344",
"0.57580894",
"0.57580894",
"0.5732054",
"0.572993",
"0.57060593",
"0.5684074",
"0.56831545",
"0.5658758",
"0.565382",
"0.56441... | 0.707732 | 1 |
Return the query parameters accepted by this view. | def get_query_parameters(self):
natural_parameters = self.get_filter_parameters() + self.get_pagination_parameters()
query_serializer = self.get_query_serializer()
serializer_parameters = []
if query_serializer is not None:
serializer_parameters = self.serializer_to_paramete... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def query_params(self):\n return self.request._request.GET",
"def query_params(self):\n path = self._get_id_path('query_params')\n \n response = self._GET(path)\n self._set_attrs_to_values({'query_params': response})\n return response",
"def query(self):\n retur... | [
"0.869741",
"0.7851013",
"0.74791056",
"0.74084884",
"0.74084884",
"0.7396826",
"0.7362296",
"0.73570704",
"0.73570704",
"0.73570704",
"0.7300934",
"0.7296543",
"0.7296543",
"0.7296543",
"0.7262002",
"0.7147985",
"0.7147985",
"0.7147985",
"0.71081084",
"0.71081007",
"0.709410... | 0.7271268 | 14 |
Find the first occurrence of chars if exist and return the chars with the character before and the character after, if they exist if they don't, add a space before, or after | def wrappedchars(string,chars):
index = string.index(chars)
if index != 0:
chars = string[index-1] + chars
else:
chars = " " + chars
if index + len(chars) + 1 <= len(chars):
chars += string[index + len(chars) + 1]
else:
chars += " "
return chars | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def look_and_say(s):\n pass\n lst = list(s)\n groups = []\n for char in lst:\n if groups and groups[-1] and groups[-1][0] == char:\n groups[-1].append(char)\n else:\n groups.append([char])\n ret = []\n for group in groups:\n ret.append(str(len(group)))\n... | [
"0.62590635",
"0.5992708",
"0.5858168",
"0.5843641",
"0.5817827",
"0.5800164",
"0.5793517",
"0.57550496",
"0.56936496",
"0.5626888",
"0.5614143",
"0.5591036",
"0.5579517",
"0.55751765",
"0.5571339",
"0.5537843",
"0.5528029",
"0.5522431",
"0.55101305",
"0.5499881",
"0.54109955... | 0.6213393 | 1 |
Find all characters or string of characters contained in string. Return a list of indexes | def findall(string,chars):
nb = len(chars)
return [ pos for pos, c in enumerate(string)
if pos + nb <= len(string) and string[pos:pos + nb] == chars] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def find(string:str, char:str) -> List[int]:\n return [i for i, ltr in enumerate(string) if ltr == char]",
"def locate_char(c, s):\n return [i for i, l in enumerate(s) if l == c]",
"def getIndexes(string1,string2):\n ret = []\n ind = string1.find(string2)\n \n while (ind > -1 and ind < len(st... | [
"0.77193403",
"0.7239308",
"0.7151862",
"0.6856872",
"0.67061144",
"0.66688484",
"0.66615635",
"0.66504526",
"0.66333586",
"0.6596803",
"0.65704924",
"0.6555119",
"0.65478075",
"0.65024734",
"0.64243186",
"0.62479097",
"0.61808586",
"0.61747456",
"0.6171822",
"0.61531454",
"0... | 0.78490067 | 0 |
Keep only unique elements of list | def make_unique(lista):
f = []
for it in lista:
if it not in f:
f.append(it)
return f | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unique(li):\r\n seen = set()\r\n seen_add = seen.add\r\n return [x for x in li if not (x in seen or seen_add(x))]",
"def remove_identical(list):\n seen = set()\n seen_add = seen.add\n return [x for x in list if not (x in seen or seen_add(x))]",
"def unique(input_list):\n output = []\n ... | [
"0.82646006",
"0.79736817",
"0.7937629",
"0.7901865",
"0.78807014",
"0.7879034",
"0.78507924",
"0.78489506",
"0.781787",
"0.77705806",
"0.7742602",
"0.7704376",
"0.7665599",
"0.7662332",
"0.7597177",
"0.75347334",
"0.75302196",
"0.7476177",
"0.746925",
"0.74655926",
"0.744204... | 0.7338565 | 30 |
Capitalizes a string preserving character that are between braces | def capitalizestring(data):
ss_list = capitalize_rex.split(data)
ss = ''
count = 0
for phrase in ss_list:
check = phrase.lstrip()
# keep phrase's capitalization the same
if check.find('{') == 0:
ss += cap_rex.sub(r'\1', phrase)
else:
# first word --> capitalize first letter (after s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _braceUppercase(text):\n for uc in string.uppercase:\n text = text.replace(uc, r'{%s}' % uc)\n return text",
"def capify(text):\n return text[0].upper() + text[1:]",
"def capitalcase(string):\n\n string = str(string)\n if not string:\n return string\n return uppercase(string... | [
"0.7995002",
"0.7524983",
"0.7379402",
"0.7224115",
"0.72104824",
"0.7017911",
"0.6987737",
"0.6987104",
"0.6941207",
"0.68921924",
"0.6873718",
"0.68582934",
"0.68566465",
"0.68292934",
"0.68228275",
"0.6790309",
"0.6781024",
"0.67756605",
"0.67600167",
"0.6756065",
"0.67475... | 0.7306085 | 3 |
Adds font size configuration | def set_style_size_options(f, description, variable_label, node_label):
f.write(" #description { font-size : " + description + "px; }\n")
f.write(" .domain_label { font-size : " + variable_label + "px; }\n")
f.write(" .sideLabels, .nodeLabel, .nodeName, .edgeLabels { font-size : " + node_label + "p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_font_size(*args):\n size = font_size.get()\n message_inp.configure(font=f'TKDefault {size}')",
"def font_size(self, font_size):\n\n self._font_size = font_size",
"def set_font_size():\n SMALLER_SIZE = 10\n MED_SIZE = 12\n BIG_SIZE = 18\n\n # plt.rc('font', size=SMALL_SIZE) ... | [
"0.77315545",
"0.7595717",
"0.7341403",
"0.73336494",
"0.7303013",
"0.72488606",
"0.6950736",
"0.68941057",
"0.6809179",
"0.6674214",
"0.6653169",
"0.6617833",
"0.65303475",
"0.64896756",
"0.6408654",
"0.6399192",
"0.6371999",
"0.63511246",
"0.6313599",
"0.63050276",
"0.62872... | 0.73313725 | 4 |
Display site main page | def index(request):
form = SearchForm()
form2 = SearchFormMini(request=request)
objects = Apartament.objects.filter(show_on_start_page=True, is_published=True).all()
return direct_to_template(request, 'start_page.html', {
'form': form,
'form2': form2,
'objects':objects,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def display():\n\n #still needs some cleanup on imagry and what the site is about. \n\n return render_template(\"index.html\")",
"def show_homepage():\n\n return render_template(\"blank-slate.html\")",
"def main_page():\n return render_template(\"main_page.html\")",
"def main_page():\n return ... | [
"0.79647166",
"0.76633286",
"0.76428115",
"0.76252854",
"0.7461642",
"0.73282254",
"0.7260859",
"0.722763",
"0.721454",
"0.7202993",
"0.71980697",
"0.7145743",
"0.7088011",
"0.70787907",
"0.7077309",
"0.70772713",
"0.703919",
"0.7032113",
"0.7028662",
"0.7028662",
"0.6996529"... | 0.0 | -1 |
Helper function for DotDict class. For a given dict and compound key, e.g. a.b.c, extract and yield next key and its object(s). | def yield_obj(rdict, ckey):
keys = ckey.split('.')
key = keys[0]
if len(keys) > 1:
next_key = '.'.join(keys[1:])
else:
next_key = None
if rdict.has_key(key):
obj = rdict[key]
if isinstance(obj, list) or isinstance(obj, GeneratorType):
for item in obj:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _descend(obj, key):\n tokens = key.split('.')\n if len(tokens) < 2:\n raise ValueError(key)\n value = obj\n for token in tokens[:-1]:\n value = _get(value, token)\n return value, tokens[-1]",
"def package_dict_items():\n for idx, (key, py_subobj) in enumerate(py_obj.items(... | [
"0.64987785",
"0.6493679",
"0.63452303",
"0.61791205",
"0.615944",
"0.6097026",
"0.60505444",
"0.60205084",
"0.5988109",
"0.5961915",
"0.5948322",
"0.5931192",
"0.5917404",
"0.58958656",
"0.5873644",
"0.58020407",
"0.576417",
"0.5761078",
"0.5737799",
"0.5688018",
"0.5682703"... | 0.73341715 | 0 |
Generator which yields values for any compound key. It works up to three level deep in DotDict structure. | def get_values(self, ckey):
for next_key, item in yield_obj(self, ckey):
if isdictinstance(item):
for final, elem in yield_obj(item, next_key):
if isdictinstance(elem) and elem.has_key(final):
yield elem[final]
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_keys(self, ckey):\n if self.has_key(ckey):\n doc = self[ckey]\n else:\n doc = [o for o in self.get_values(ckey)]\n if isinstance(doc, dict):\n for key in doc.keys():\n if ckey.rfind('%s.' % key) == -1:\n combo = '%s... | [
"0.6522738",
"0.64557797",
"0.61686635",
"0.6134019",
"0.5988754",
"0.59835076",
"0.5891883",
"0.5886842",
"0.5840769",
"0.581902",
"0.5762607",
"0.57358396",
"0.5721755",
"0.56967807",
"0.5682856",
"0.5657293",
"0.55935186",
"0.5585116",
"0.5581267",
"0.55804133",
"0.5570956... | 0.697924 | 0 |
Performs nonmaximum suppression (NMS) on the boxes according to their intersectionoverunion (IoU). NMS iteratively removes lower scoring boxes which have an IoU greater than iou_threshold with another (higher scoring) box. If multiple boxes have the exact same score and satisfy the IoU criterion with respect to a refer... | def nms_3d(boxes: torch.Tensor, scores: torch.Tensor, iou_threshold: float) -> torch.Tensor:
return _C.nms_3d(boxes, scores, iou_threshold) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def non_max_suppression(bboxes, iou_threshold, threshold, box_format=\"corners\"):\n\n # 49 x 6 \n assert type(bboxes) == list\n # print(bboxes)\n bboxes = [box for box in bboxes if box[1] > threshold]\n bboxes = sorted(bboxes, key=lambda x: x[1], reverse=True)\n bboxes_after_nms = []\n # prin... | [
"0.7570105",
"0.7152874",
"0.70773184",
"0.7055614",
"0.70391864",
"0.70345724",
"0.6899316",
"0.6898768",
"0.6834971",
"0.68220407",
"0.6783307",
"0.66752917",
"0.66528916",
"0.6635085",
"0.657536",
"0.6459089",
"0.6426493",
"0.63928497",
"0.63651747",
"0.6334231",
"0.628472... | 0.0 | -1 |
cb algorithm for numba jit. | def nb_clementsbekkers(data, template):
## Prepare a bunch of arrays we'll need later
n_template = len(template)
# if n_template <= 1:
# raise ValueError("nb_clementsbekkers: Length of template must be useful, and > 1")
n_data = data.shape[0]
n_dt = n_data - n_template
# if n_dt < 10:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def njit(func):\n return func",
"def jit(func):\n return func",
"def test01b(self):\n a = np.arange(101)\n b = bcolz.carray(a, chunklen=2, rootdir=self.rootdir)\n # print \"sum iter->\", sum(b.iter(-3))\n self.assertTrue(sum(a[-3:]) == sum(b.iter(-3)), \"Sums are not e... | [
"0.63839674",
"0.6148364",
"0.60980713",
"0.5959978",
"0.59363645",
"0.59282655",
"0.59189016",
"0.5818277",
"0.57670933",
"0.5753508",
"0.5678179",
"0.5657881",
"0.56423277",
"0.56224024",
"0.55882907",
"0.5577173",
"0.5571148",
"0.55520236",
"0.5532763",
"0.55320287",
"0.55... | 0.0 | -1 |
Checks if the element v is in the value list | def has(self, v):
return v in self.values | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __contains__(self, v):\n for i in self:\n if v in i:\n return True\n False",
"def list_should_contain_value(self,list_,value,msg=None):\r\n\r\n default =\"%s contains value '%s'\" %(seq2str(list_),value)\r\n _verify_condition(vlaue not in list_,default,ms... | [
"0.75342125",
"0.7265375",
"0.72228837",
"0.7014459",
"0.7003731",
"0.69314307",
"0.6909197",
"0.66716605",
"0.6669751",
"0.66067266",
"0.65595186",
"0.6550804",
"0.6500757",
"0.64757943",
"0.64757943",
"0.6469786",
"0.6463366",
"0.6461458",
"0.6461458",
"0.64530325",
"0.6453... | 0.7750248 | 0 |
Search for the first defined of possibly many env vars. Returns the first environment variable defined in vars, or returns the default defined in kwargs. | def env(*_vars, **kwargs):
for v in _vars:
value = os.environ.get(v, None)
if value:
return value
return kwargs.get('default', '') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def env(*vars, **kwargs):\r\n for v in vars:\r\n value = os.environ.get(v)\r\n if value:\r\n return value\r\n return kwargs.get('default', '')",
"def env(*vars, **kwargs):\n for v in vars:\n value = os.environ.get(v)\n if value:\n return value\n retur... | [
"0.81394947",
"0.81302315",
"0.8084469",
"0.8084469",
"0.80680776",
"0.71090394",
"0.67128295",
"0.6539029",
"0.62821037",
"0.62746394",
"0.6236671",
"0.6195001",
"0.6173632",
"0.6140279",
"0.6014012",
"0.59941554",
"0.5993419",
"0.59607166",
"0.59213907",
"0.5894428",
"0.584... | 0.8052557 | 5 |
load requirements from a pip requirements file | def parse_requirements(filename):
lineiter = (line.strip() for line in open(filename))
return [line for line in lineiter if line and not line.startswith(("#", "--"))] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def read_requirements():\n reqs_path = path.join('.', 'requirements.txt')\n with open(reqs_path, 'r') as f:\n requirements = [line.rstrip() for line in f]\n return requirements",
"def parse_requirements_from_pipfile():\n lineiter = (line.strip() for line in open('Pipfile'))\n requirements_p... | [
"0.7206639",
"0.7191491",
"0.7187297",
"0.7138445",
"0.7138277",
"0.70911366",
"0.70401156",
"0.70233893",
"0.70084476",
"0.69288045",
"0.6917543",
"0.69035953",
"0.69035953",
"0.6900558",
"0.6823832",
"0.6820074",
"0.6802556",
"0.67198455",
"0.6716624",
"0.6715886",
"0.66736... | 0.0 | -1 |
Pull all values of specified key from nested JSON. | def find_keys(obj, key):
arr = []
def extract(obj, arr, key):
"""Recursively search for values of key in JSON tree."""
if isinstance(obj, dict):
for k, v in obj.items():
if isinstance(v, (dict, list)):
extract(v, arr, key)
elif k =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def extract_values(obj, key): \n arr = [] \n def extract(obj, arr, key): \n \"\"\"Recursively search for values of key in JSON tree.\"\"\" \n if isinstance(obj, dict): \n for k, v in obj.items(): \n if isinstance(v, (dict, list)): \n extract(v, arr, ... | [
"0.74648917",
"0.7444366",
"0.73705596",
"0.7368153",
"0.7368153",
"0.7285902",
"0.727525",
"0.6437676",
"0.61487424",
"0.6105954",
"0.6105954",
"0.6105954",
"0.6105954",
"0.6105954",
"0.60910684",
"0.60794175",
"0.6049894",
"0.5951372",
"0.58265185",
"0.5794768",
"0.57896966... | 0.6016613 | 17 |
Submit a request to the geoprocessing service. Returns its result. | def geoprocess(data, retry=None):
host = settings.GEOP['host']
port = settings.GEOP['port']
geop_url = 'http://{}:{}/run'.format(host, port)
try:
response = requests.post(geop_url,
data=json.dumps(data),
headers={'Content-Type':... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Submit(self, request, global_params=None):\n config = self.GetMethodConfig('Submit')\n return self._RunMethod(\n config, request, global_params=global_params)",
"def Submit(self, request, global_params=None):\n config = self.GetMethodConfig('Submit')\n return self._RunMethod(\n ... | [
"0.63600194",
"0.63600194",
"0.6222496",
"0.56417257",
"0.55597377",
"0.5537752",
"0.5537752",
"0.55043817",
"0.54149646",
"0.53958243",
"0.53226876",
"0.5318665",
"0.52539593",
"0.52303064",
"0.5217417",
"0.51944584",
"0.5180131",
"0.516187",
"0.5161826",
"0.51577336",
"0.51... | 0.6698195 | 0 |
Computes the precision for the specified values of k | def accuracy(output, target, topk=(1,)):
with torch.no_grad():
maxk = max(topk)
batch_size = target.size(0)
_, pred = output.topk(maxk, 1, True, True)
pred = pred.t()
correct = pred.eq(target.view(1, -1).expand_as(pred).type(torch.cuda.LongTensor))
res = []
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def precision(gt, pred, k):\n k = min(len(pred), k)\n den = min(len(gt), k)\n return sum([int(pred[i] in gt) for i in range(k)]) / den",
"def precision_at_k(r, k):\n assert k >= 1\n r = np.asarray(r)[:k] != 0\n if r.size != k:\n raise ValueError('Relevance score length < k')\... | [
"0.76427615",
"0.74189496",
"0.7418079",
"0.72710466",
"0.72456723",
"0.72446615",
"0.7237539",
"0.72213703",
"0.7210107",
"0.7058935",
"0.6852219",
"0.6786084",
"0.67836976",
"0.6768417",
"0.67273885",
"0.67181736",
"0.67181736",
"0.67181736",
"0.67181736",
"0.67181736",
"0.... | 0.0 | -1 |
Due to numerical instability, entries in both matrices might be different, when the distance of atoms is almost equal to the cutoff distance of the matrix. This function checks, whether two atoms with unequal entries in the matrices are near the cutoff distance. | def assert_equal_matrices(array, matrix1, matrix2, periodic):
nonlocal CUTOFF
indices = np.where(matrix1 != matrix2)
for index in range(len(indices[0])):
if len(indices) == 2:
# multi_model = False -> AtomArray
m = None
i = indices[0][i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CompareMatrices(mat1, mat2, tol):\n # just going to assume they are the same size...\n for i in range(len(mat1)):\n for j in range(len(mat1)):\n if abs(mat1[i][j] - mat2[i][j]) > tol:\n return False\n return True",
"def check_matrix_equality(A,B, tol=None):\n if l... | [
"0.7025378",
"0.65624166",
"0.6261318",
"0.62328076",
"0.61973923",
"0.61929286",
"0.61877394",
"0.61740816",
"0.61727494",
"0.617016",
"0.614235",
"0.6119403",
"0.60732275",
"0.6058398",
"0.6037377",
"0.6036731",
"0.6027876",
"0.6013238",
"0.60039455",
"0.6002197",
"0.599582... | 0.65872705 | 1 |
plot tsne embeddings with label colors | def viz_tsne(face_crops, face_encodings, labels = []):
tsne_output = get_tsne(face_encodings)
colors = None
if len(labels) > 0:
if len(set(labels)) <= 13:
colors_set = [ "red", "blue", "green", "yellow", "purple", "orange",
"black", "gray", "magenta", "cyan",... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def plot_t_sne(embedding, labels, info, color='black'):\n mpl.rcParams['text.color'] = color\n mpl.rcParams['axes.labelcolor'] = color\n mpl.rcParams['xtick.color'] = color\n mpl.rcParams['ytick.color'] = color\n\n tsne = TSNE(n_components=2).fit_transform(embedding)\n plt.figure(figsize=(20, 12)... | [
"0.77376676",
"0.7260055",
"0.71225566",
"0.69355965",
"0.6883696",
"0.68008494",
"0.65583277",
"0.6488028",
"0.6480558",
"0.6369802",
"0.6355062",
"0.6340152",
"0.6309201",
"0.6144756",
"0.6144143",
"0.6020024",
"0.6018562",
"0.59271747",
"0.5854735",
"0.5825205",
"0.5749593... | 0.63953114 | 9 |
create an interactive plot visualizing the clusters hovering over a point shows the corresponding face crop | def visualize_clusters(x, y, imgs, colors=None):
# create figure and plot scatter
fig = plt.figure()
ax = fig.add_subplot(111)
ax.tick_params(axis='x', which='both', bottom=False, top=False, labelbottom=False)
ax.tick_params(axis='y', which='both', left=False, right=False, labelleft=False)
if co... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def plot_clusters(self):\n pass",
"def cluster_plot(self):\r\n train = StandardScaler().fit_transform(self.X)\r\n pca = PCA(n_components=3)\r\n pca_component = pca.fit_transform(self.X)\r\n fig = plt.figure(figsize=(10,8))\r\n sns.set_palette(sns.col... | [
"0.6986265",
"0.6796038",
"0.66492635",
"0.6521962",
"0.634341",
"0.63366455",
"0.61402047",
"0.61319834",
"0.6113822",
"0.6109929",
"0.6108117",
"0.60475594",
"0.6006367",
"0.5999693",
"0.59867465",
"0.5944816",
"0.593256",
"0.5923711",
"0.5912567",
"0.5902684",
"0.5893791",... | 0.7030225 | 0 |
Gets the name of this AnalyticsLicenseUpdateRequest. | def name(self):
# type: () -> string_types
return self._name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def name(self) -> pulumi.Input['SkuName']:\n return pulumi.get(self, \"name\")",
"def get_name_request_revision(filing):\n return filing.json['filing']['incorporationApplication'].get('nameRequest', {})",
"def name(self):\n return _version._NAME # pylint: disable=protected-access",
"def... | [
"0.59164786",
"0.5766035",
"0.57354945",
"0.5627991",
"0.56149423",
"0.5585953",
"0.5579015",
"0.5579015",
"0.5579015",
"0.5579015",
"0.5579015",
"0.5579015",
"0.5579015",
"0.5579015",
"0.5579015",
"0.5579015",
"0.556848",
"0.5564185",
"0.5561272",
"0.55293643",
"0.55219054",... | 0.0 | -1 |
Sets the name of this AnalyticsLicenseUpdateRequest. | def name(self, name):
# type: (string_types) -> None
if name is not None:
if not isinstance(name, string_types):
raise TypeError("Invalid type for `name`, type has to be `string_types`")
self._name = name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_lic_name(self, doc, name):\n if self.has_extr_lic(doc):\n if not self.extr_lic_name_set:\n self.extr_lic_name_set = True\n if validations.validate_extr_lic_name(name):\n self.extr_lic(doc).full_name = name\n return True\n... | [
"0.6665256",
"0.664816",
"0.6376218",
"0.6376218",
"0.6365713",
"0.63299406",
"0.6328418",
"0.6269308",
"0.6260905",
"0.6224232",
"0.62020284",
"0.61878204",
"0.6174002",
"0.6169859",
"0.6169859",
"0.6169859",
"0.6169859",
"0.6160473",
"0.6160473",
"0.6136912",
"0.6136912",
... | 0.0 | -1 |
Gets the ignore_dnt of this AnalyticsLicenseUpdateRequest. | def ignore_dnt(self):
# type: () -> bool
return self._ignore_dnt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ignore_dnt(self, ignore_dnt):\n # type: (bool) -> None\n\n if ignore_dnt is not None:\n if not isinstance(ignore_dnt, bool):\n raise TypeError(\"Invalid type for `ignore_dnt`, type has to be `bool`\")\n\n self._ignore_dnt = ignore_dnt",
"def getIgnoredDict(self)... | [
"0.6091787",
"0.5355327",
"0.5207233",
"0.5137594",
"0.5062952",
"0.50531566",
"0.5050368",
"0.50071526",
"0.49622416",
"0.48724544",
"0.48617172",
"0.48480454",
"0.4838947",
"0.4838947",
"0.48378474",
"0.4809277",
"0.47980335",
"0.47980335",
"0.4765155",
"0.47625178",
"0.476... | 0.6283908 | 0 |
Sets the time_zone of this AnalyticsLicenseUpdateRequest. | def time_zone(self, time_zone):
# type: (string_types) -> None
if time_zone is not None:
if not isinstance(time_zone, string_types):
raise TypeError("Invalid type for `time_zone`, type has to be `string_types`")
self._time_zone = time_zone | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def time_zone(self, time_zone):\n\n self._time_zone = time_zone",
"def timezone(self, timezone):\n\n self._timezone = timezone",
"def timezone(self, timezone):\n\n self._timezone = timezone",
"def timezone(self, timezone):\n\n self._timezone = timezone",
"def timezone(self, time... | [
"0.7073458",
"0.65011835",
"0.65011835",
"0.65011835",
"0.65011835",
"0.65011835",
"0.57701576",
"0.5690587",
"0.56070334",
"0.5533416",
"0.5492156",
"0.5453784",
"0.5441058",
"0.53512836",
"0.53512836",
"0.52416354",
"0.5200398",
"0.51382184",
"0.51236904",
"0.5048147",
"0.5... | 0.5792831 | 6 |
Gets the custom_data_field_labels of this AnalyticsLicenseUpdateRequest. Labels for CustomData fields | def custom_data_field_labels(self):
# type: () -> AnalyticsLicenseCustomDataFieldLabels
return self._custom_data_field_labels | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def custom_data_field_labels(self, custom_data_field_labels):\n # type: (AnalyticsLicenseCustomDataFieldLabels) -> None\n\n if custom_data_field_labels is not None:\n if not isinstance(custom_data_field_labels, AnalyticsLicenseCustomDataFieldLabels):\n raise TypeError(\"Inva... | [
"0.7172554",
"0.6207562",
"0.57151574",
"0.55312467",
"0.536233",
"0.52215195",
"0.5145729",
"0.5110321",
"0.5049598",
"0.5039753",
"0.5012015",
"0.49937102",
"0.49743798",
"0.49375936",
"0.49375936",
"0.49375936",
"0.49375936",
"0.49375936",
"0.49300128",
"0.4913554",
"0.489... | 0.8463659 | 0 |
Sets the custom_data_field_labels of this AnalyticsLicenseUpdateRequest. Labels for CustomData fields | def custom_data_field_labels(self, custom_data_field_labels):
# type: (AnalyticsLicenseCustomDataFieldLabels) -> None
if custom_data_field_labels is not None:
if not isinstance(custom_data_field_labels, AnalyticsLicenseCustomDataFieldLabels):
raise TypeError("Invalid type fo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def custom_data_field_labels(self):\n # type: () -> AnalyticsLicenseCustomDataFieldLabels\n return self._custom_data_field_labels",
"def custom_data(self, custom_data):\n\n self._custom_data = custom_data",
"def custom_fields(self, custom_fields):\n\n self._custom_fields = custom_fi... | [
"0.72949785",
"0.62286794",
"0.6143926",
"0.6143926",
"0.6143926",
"0.6143926",
"0.6143926",
"0.5670801",
"0.53138393",
"0.5307917",
"0.50558656",
"0.50375986",
"0.502854",
"0.50094116",
"0.49992955",
"0.4994995",
"0.49763665",
"0.49695814",
"0.49650443",
"0.4930813",
"0.4921... | 0.8085914 | 0 |
Returns true if both objects are equal | def __eq__(self, other):
if not isinstance(other, AnalyticsLicenseUpdateRequest):
return False
return self.__dict__ == other.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False",
"def __eq__(self, other):\n if i... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def __ne__(self, other):
return not self == other | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)",
"def __eq__(self, other):\n ... | [
"0.84568954",
"0.83923674",
"0.81447554",
"0.81407183",
"0.81326675",
"0.80941343",
"0.8092415",
"0.8092415",
"0.8092415",
"0.8085536",
"0.8085536",
"0.8076502",
"0.8076502",
"0.8066026"
] | 0.0 | -1 |
Returns the current state flag of the pipeline. | def _get_state(self):
# gst's get_state function returns a 3-tuple; we just want the
# status flag in position 1.
return self.pipeline.get_state(Gst.CLOCK_TIME_NONE)[1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def state(self):\n return self.get_state()",
"def get_state(self):\n return self.state",
"def get_state(self):\n return self.state",
"def state(self):\n return self.__state",
"def state(self):\n return self.__state",
"def state(self):\r\n return self._state",
"... | [
"0.76588523",
"0.7545959",
"0.7545959",
"0.7480028",
"0.7480028",
"0.7452053",
"0.7452053",
"0.7452053",
"0.7425399",
"0.7421212",
"0.74065465",
"0.74034715",
"0.73972505",
"0.73972505",
"0.73972505",
"0.73972505",
"0.73972505",
"0.73972505",
"0.73972505",
"0.73972505",
"0.73... | 0.7824631 | 0 |
f(x) = 1 / (1 + e^(x)) | def __sig(x):
return 1 / (1 + exp**(-x)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F(x):\n return math.exp(-0.5 * (x ** 2))",
"def f(x):\n return math.exp(-x**2)/(1+x**2)+(2*math.cos(x)**2)/(1+(x-4)**2)",
"def f(x):\n\treturn (sc.log(x**2+5)*sc.cos(0.8*x)+3.5*x)/(sc.e**(x/10))",
"def f(x):\n return -math.exp(x[0]**3/-3 + x[0] - x[1]**2)",
"def f(x):\n return -math.exp(x[0... | [
"0.83172673",
"0.802787",
"0.7814821",
"0.75021565",
"0.75021565",
"0.74634004",
"0.7452841",
"0.7414336",
"0.74074775",
"0.73928523",
"0.73513615",
"0.7347474",
"0.7343961",
"0.7341394",
"0.73134655",
"0.7273912",
"0.7273076",
"0.7271252",
"0.7256826",
"0.72481036",
"0.72428... | 0.72433156 | 20 |
f'(x) = f(x) (1 f(x)) | def __dsig(x):
return x * (1 - x) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g(f, x: float):\n return lambda x: f(x + f(x)) / f(x) - 1",
"def f1(x):\n return x**3 - 2*x + 2",
"def f2(x):\n return x**2 + 2 * x + 1",
"def f3(x):\n return 1 / (1 + x**2)",
"def f(x):\n return x**2",
"def F(x):\n return math.exp(-0.5 * (x ** 2))",
"def f(x0: float, x1: float) -... | [
"0.7518321",
"0.73327893",
"0.7101694",
"0.6937239",
"0.69335705",
"0.6841227",
"0.6805316",
"0.6753438",
"0.6752895",
"0.6726434",
"0.6708879",
"0.66472054",
"0.66256493",
"0.66054755",
"0.65221304",
"0.64994895",
"0.64963657",
"0.6436217",
"0.64258677",
"0.6406867",
"0.6378... | 0.0 | -1 |
Method to restore ratings from previous sessions, if any. | def restore_ratings(self):
# making a copy
self.incomplete_list = list(self.id_list)
if self.screenshot_only:
# processing every available subject
return
print('\nRestoring ratings from previous session(s), if they exist ..')
prev_done = [] # empty lis... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def restore(self):\n self.igate.restore()\n self.fgate.restore()\n self.ogate.restore()\n super(LSTM, self).restore()",
"def restore_session(self, dir_model):\n self.logger.info(\"Reloading the latest trained model...\")\n self.saver.restore(self.sess, dir_model)",
"de... | [
"0.62234616",
"0.6185038",
"0.6161462",
"0.60261446",
"0.5955378",
"0.5942109",
"0.59327364",
"0.5816332",
"0.5785859",
"0.5773203",
"0.57489634",
"0.56833947",
"0.5672056",
"0.5619765",
"0.5594357",
"0.5551118",
"0.55357856",
"0.55231506",
"0.5520708",
"0.5492582",
"0.548966... | 0.82886946 | 0 |
take 1D float array of rewards and compute discounted reward | def loss_rewards(r):
discounted_r = np.zeros_like(r)
running_add = 0
for t in reversed(range(0, r.size)):
#running_add = running_add * gamma + r[t]
#discounted_r[t] = running_add
discounted_r[t] = 0
return discounted_r | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def discount_rewards(rewards):\r\n discounted_r = np.zeros_like(rewards)\r\n running_add = 0\r\n for t in reversed(range(0, len(rewards))): \r\n running_add = running_add * reward_discount + rewards[t]\r\n discounted_r[t] = running_add\r\n return discounted_r",
"def discoun... | [
"0.8100923",
"0.78397125",
"0.7792625",
"0.7742053",
"0.7653779",
"0.75987715",
"0.7583268",
"0.75820553",
"0.7579539",
"0.7536054",
"0.7519005",
"0.75047183",
"0.7467692",
"0.7456702",
"0.7433794",
"0.7426565",
"0.74062765",
"0.73950297",
"0.7370545",
"0.7328519",
"0.7201842... | 0.73564714 | 19 |
Creates a new empty ``DataContext``. | def __init__(self):
self._data = dict() # stores the data in the context
self._last_context = None # stores previous context if the current one is used in a with block
self._thread_id = self._get_thread_id() # the ID of the thread that context lives in | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_context(cls):\n # create context for current thread if there is none yet\n thread_id = cls._get_thread_id()\n if thread_id not in cls._current_context:\n cls._current_context[thread_id] = DataContext()\n \n # return the requested DataContext\n return cls... | [
"0.51709545",
"0.4948234",
"0.49352062",
"0.48919976",
"0.48733893",
"0.48285112",
"0.4818874",
"0.48050424",
"0.47993302",
"0.47652182",
"0.47637522",
"0.47535202",
"0.47446477",
"0.47309837",
"0.46889806",
"0.46875274",
"0.46598434",
"0.46514702",
"0.46179917",
"0.45966282",
... | 0.0 | -1 |
Retrieves a unique identifier for the thread that the object that invokes this method lives in. | def _get_thread_id() -> int:
# NOTICE:
# we do not use threading.get_ident() to identify a thread, as Python recycles these identifiers
return id(threading.current_thread()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def thread_id(self):\n return self._thread_id",
"def get_id(self):\n if hasattr(self, \"_thread_id\"):\n return self._thread_id\n for id, thread in threading._active.items():\n if thread is self:\n return id",
"def get_id(self):\n if hasattr(self... | [
"0.8300705",
"0.7864314",
"0.7864314",
"0.77574456",
"0.75394636",
"0.7490027",
"0.7473744",
"0.7468488",
"0.7463764",
"0.738426",
"0.7320531",
"0.701216",
"0.6967438",
"0.69338375",
"0.68415505",
"0.679425",
"0.67869544",
"0.6770116",
"0.6713111",
"0.6713111",
"0.6585432",
... | 0.7983437 | 1 |
Get all Summoners currently in the DB. | def get_all_summoners(self):
self.logger.info("returning all summoners")
q = self.db.session.query(Summoner).all()
self.logger.debug(q)
return q | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_all_summoners(self):\n return [self.user_values['Summoner Name'][row].get().lower()\n for row, obj in enumerate(self.user_values['Summoner Name'])]",
"def get_all_players(self):\n\n self._logger.debug(\"Getting player list\")\n\n try:\n self.check_if_db_con... | [
"0.6991721",
"0.6549706",
"0.6317691",
"0.62092054",
"0.6072106",
"0.6042007",
"0.60337526",
"0.5976743",
"0.59065413",
"0.58716565",
"0.58291966",
"0.57973903",
"0.5772415",
"0.57708454",
"0.57581306",
"0.57533514",
"0.57392716",
"0.57348067",
"0.572466",
"0.57192624",
"0.57... | 0.80764276 | 0 |
Gets the set of numbers that aren't the sum of two abundant numbers from 1 to n | def solution(n: int = 28123) -> int:
nums = range(1, n+1)
abundant = list(filter(is_abundant, nums))
abundant_sums = set(all_sums(abundant, n))
fit = set(nums) - abundant_sums
return fit | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def non_mcnugget():\n nugget = [0, 6, 9, 20]\n mcnugget = set([6, 9, 20])\n\n while True:\n mcnugget = set([m+n for m in mcnugget for n in nugget])\n\n for m in mcnugget:\n found = all([m+j in mcnugget for j in range(6)])\n if found:\n return [k for k in ... | [
"0.70441407",
"0.6689597",
"0.6552181",
"0.6430486",
"0.63608056",
"0.6335024",
"0.63308936",
"0.63154817",
"0.6303677",
"0.6238193",
"0.6213411",
"0.6165881",
"0.61582273",
"0.61573374",
"0.61489123",
"0.614201",
"0.60895276",
"0.6085722",
"0.60673255",
"0.60167104",
"0.6005... | 0.73069 | 0 |
List all of the courses associated with the user. | def index():
user, user_id = get_user()
# Get this user's course with their roles
my_courses = []
if user:
my_courses = user.get_courses()
# Get all public courses
public_courses = Course.get_public()
return render_template('courses/index.html',
user=user,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_user_courses(user_id):\n user = _get_user_require_auth(user_id)\n\n courses = list(m.Course.objects(id__in=set(user.course_ids)))\n course_dicts, user_course_dicts, _ = (\n m.Course.get_course_and_user_course_dicts(courses, user))\n\n return api_util.jsonify({\n 'courses': cou... | [
"0.7610165",
"0.74557495",
"0.7439157",
"0.74148434",
"0.7345282",
"0.729715",
"0.72908974",
"0.7270145",
"0.7238988",
"0.7150204",
"0.71428335",
"0.7072123",
"0.70482576",
"0.7046931",
"0.6889699",
"0.68785244",
"0.6851538",
"0.68493396",
"0.68193054",
"0.66444564",
"0.66064... | 0.72801024 | 7 |
Sets the deployment_versions of this ResourceUsage. | def deployment_versions(self, deployment_versions):
if (self.local_vars_configuration.client_side_validation and
deployment_versions is not None and not isinstance(deployment_versions, int)):
raise ValueError("Parameter `deployment_versions` must be an integer") # noqa: E501
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_versions(self, consumer, versions):\n for resource_type, resource_version in versions.items():\n self._set_version(consumer, resource_type,\n resource_version)\n\n if versions:\n self._cleanup_removed_versions(consumer, versions)\n els... | [
"0.64934814",
"0.64490896",
"0.5601959",
"0.55884963",
"0.53879",
"0.53563505",
"0.5117721",
"0.49248746",
"0.49198318",
"0.48892248",
"0.4873934",
"0.4862174",
"0.48040587",
"0.48040587",
"0.47527963",
"0.47380602",
"0.4691568",
"0.46727967",
"0.46466923",
"0.46119726",
"0.4... | 0.7492107 | 0 |
Returns true if both objects are equal | def __eq__(self, other):
if not isinstance(other, ResourceUsage):
return False
return self.to_dict() == other.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self, other):\n return are_equal(self, other)",
"def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False",
"def __eq__(self, other):\n if i... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def __ne__(self, other):
if not isinstance(other, ResourceUsage):
return True
return self.to_dict() != other.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True",
"def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)",
"def __ne__(self, other) -> bool:\n return not self.__eq__(other)",
"def __eq__(self, other):\n ... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
... | 0.0 | -1 |
This method takes a date and returns a string representing the date in the date_format | def date2str(date, date_format):
return date.strftime(date_format) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def format_date(self, date):\n return date.strftime('%Y-%m-%d')",
"def date_string(date):\n day = date.day\n month = date.month\n year = date.year\n formatted_string = str(month) + \"/\"\n formatted_string += str(day) + \"/\"\n formatted_string += str(year)\n return formatted_string",... | [
"0.84162986",
"0.83022296",
"0.82976544",
"0.8198582",
"0.80031884",
"0.79143465",
"0.78484905",
"0.77212054",
"0.76927245",
"0.75311947",
"0.75155324",
"0.750266",
"0.7495061",
"0.7490155",
"0.7470398",
"0.7469103",
"0.74664026",
"0.7455211",
"0.74403626",
"0.7431248",
"0.74... | 0.82215464 | 3 |
This method converts local python datetime to utc python datetime | def localtime2utc(date):
return date + (datetime.utcnow() - datetime.now()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def local_to_utc(local_dt: datetime) -> datetime:\n if local_dt is None:\n return None\n utc_dt = local_dt.astimezone(tz.UTC)\n return utc_dt",
"def local_to_utc(local_dt):\n local_dt = local_dt.replace(tzinfo=tz.tzlocal())\n return local_dt.astimezone(tz.tzlocal())",
"def utc_to_... | [
"0.7989077",
"0.79834026",
"0.766294",
"0.7638362",
"0.7635371",
"0.7635371",
"0.7635371",
"0.74387735",
"0.7404547",
"0.73918414",
"0.73233396",
"0.73006016",
"0.72767216",
"0.7267833",
"0.72290444",
"0.7198934",
"0.70908713",
"0.70432836",
"0.7038063",
"0.7022701",
"0.70180... | 0.7399117 | 9 |
This method converts utc python datetime to local python datetime | def utc2localtime(date):
return date - (datetime.utcnow() - datetime.now()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def utc_to_local_datetime(dt):\n return dt.astimezone(LOCAL)",
"def utc_to_local(utc_dt: datetime) -> datetime:\n if utc_dt is None:\n return None\n local_dt = utc_dt.astimezone(tz.tzlocal())\n return local_dt",
"def utc_to_local(t):\n # set utc tzinfo\n t = t.replace(tzinfo=tz.tzu... | [
"0.80741155",
"0.7821422",
"0.7722433",
"0.7676239",
"0.7647801",
"0.75086486",
"0.7433977",
"0.73694956",
"0.73509055",
"0.7346955",
"0.73454505",
"0.7278814",
"0.71962696",
"0.71636236",
"0.71103483",
"0.71103483",
"0.71103483",
"0.696878",
"0.6892363",
"0.68644905",
"0.685... | 0.6634898 | 23 |
This method return the day of month as string. The result is padded or unpadded based on the value of 2nd argument | def get_day_of_month(date, padded_or_unpadded):
if padded_or_unpadded == constants.str_padded:
return date.strftime('%d')
elif padded_or_unpadded == constants.str_unpadded:
return str(int(date.strftime('%d')))
else:
err_msg = str_possible_values('padded_or_unpadded',
[con... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def format_month_day(time):\n month = [\"january\", \"february\", \"march\", \"april\",\n \"may\", \"june\", \"july\", \"august\",\n \"september\", \"october\", \"november\", \"december\"\n ][time.month - 1]\n day = str(time.day)\n return month + \" :n:\" + day",
"def... | [
"0.73267955",
"0.714449",
"0.6948678",
"0.6948678",
"0.6948678",
"0.67423797",
"0.6713465",
"0.66712683",
"0.6644109",
"0.65987533",
"0.6547236",
"0.6506575",
"0.6482969",
"0.6469716",
"0.6428099",
"0.64275724",
"0.6362431",
"0.63612616",
"0.6335898",
"0.6308074",
"0.629018",... | 0.71699643 | 1 |
This method return month for a python datetime object. | def get_month_name(date, abbreviated_or_full):
if abbreviated_or_full == constants.str_abbreviated:
return date.strftime('%b')
elif abbreviated_or_full == constants.str_full:
return date.strftime('%B')
else:
err_msg = str_possible_values('abbreviated_or_full',
[constants.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MONTH(date):\n return _make_datetime(date).month",
"def date_month(date):\n return date.month",
"def get_month(self, indate):\n return indate.strftime(\"%B\") + \"-\" + indate.strftime(\"%Y\")",
"def month(self):\n return gocept.month.Month(self.calendar_month, self.calendar_year)",
"... | [
"0.8037816",
"0.7985934",
"0.76727575",
"0.7646965",
"0.7458971",
"0.7396659",
"0.7396659",
"0.7351498",
"0.7260674",
"0.7212397",
"0.71604156",
"0.71604156",
"0.7089671",
"0.7012984",
"0.69334626",
"0.69158274",
"0.6806697",
"0.6801778",
"0.67845184",
"0.67535657",
"0.669535... | 0.0 | -1 |
This method return the month numberas string. The result is padded or unpadded based on the value of 2nd argument | def get_month_number(date, padded_or_unpadded):
if padded_or_unpadded == constants.str_padded:
return date.strftime('%m')
elif padded_or_unpadded == constants.str_unpadded:
return str(int(date.strftime('%m')))
else:
err_msg = str_possible_values('padded_or_unpadded', [
co... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mm(self):\n return '%02d' % self._month",
"def year_month(cls,\n year: typing.Union[int, str],\n month: typing.Union[int, str])->str:\n yearstr: str\n if isinstance(year, int):\n yearstr = str(year)\n else:\n yearstr = year... | [
"0.7790636",
"0.71067667",
"0.7035777",
"0.6992651",
"0.69207543",
"0.6884193",
"0.6875795",
"0.68408686",
"0.6818609",
"0.67527074",
"0.6751845",
"0.6698467",
"0.6683747",
"0.6619897",
"0.6613329",
"0.6601899",
"0.65393746",
"0.65393746",
"0.65205765",
"0.65173954",
"0.64313... | 0.73265547 | 1 |
This method return the hour as string. The result is padded or unpadded based on the value of 2nd argument | def get_hour(date, padded_or_unpadded):
if padded_or_unpadded == constants.str_padded:
return date.strftime('%H')
elif padded_or_unpadded == constants.str_unpadded:
return str(int(date.strftime('%H')))
else:
err_msg = str_possible_values('padded_or_unpadded', [
constants.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hour(self):\n return \"%s:00:00\" % self.timestamp[:13]",
"def _hour_to_time(num: int):\n return datetime.datetime.now().replace(hour=num).strftime(\"%-I %p\")",
"def format(cls):\n return super().format() + 'Hhiihh'",
"def get_hour_today() -> str:\n return datetime.now().strftime... | [
"0.7744247",
"0.71348584",
"0.70965725",
"0.68444365",
"0.68241227",
"0.6820921",
"0.67855716",
"0.6659488",
"0.6624371",
"0.66207045",
"0.66179514",
"0.65968895",
"0.65490043",
"0.6547163",
"0.65385807",
"0.65287304",
"0.6485818",
"0.64566064",
"0.6419547",
"0.640939",
"0.63... | 0.70549864 | 3 |
This method return the minute as string. The result is padded or unpadded based on the value of 2nd argument | def get_minute(date, padded_or_unpadded):
if padded_or_unpadded == constants.str_padded:
return date.strftime('%M')
elif padded_or_unpadded == constants.str_unpadded:
return str(int(date.strftime('%M')))
else:
err_msg = str_possible_values('padded_or_unpadded', [
constant... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_minute(self):\n\n # First we get the first 8 bits stored in the minute register\n # and translate it to an integer\n minute_bcd = self.__read_register(_REGISTER_MINUTE)\n\n # We separate the tens from the digits\n\n tens = (minute_bcd & 0x70) >> 4 # 0x70 = 0b01110000\n ... | [
"0.72024834",
"0.7138573",
"0.69704217",
"0.69431496",
"0.6864884",
"0.67932063",
"0.6728817",
"0.66987157",
"0.65811217",
"0.65658313",
"0.6559152",
"0.65452987",
"0.6452082",
"0.62903845",
"0.6283221",
"0.6271147",
"0.6268617",
"0.62615746",
"0.6254522",
"0.6236791",
"0.620... | 0.6757045 | 6 |
This method return the microsecond as string. The result is padded or unpadded based on the value of 2nd argument | def get_microsecond(date, padded_or_unpadded):
if padded_or_unpadded == constants.str_padded:
return date.strftime('%f')
elif padded_or_unpadded == constants.str_unpadded:
return str(int(date.strftime('%f')))
else:
err_msg = str_possible_values('padded_or_unpadded', [
con... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def time_to_string(value):\n if value == gst.CLOCK_TIME_NONE:\n return \"--:--:--.---\"\n ms = value / gst.MSECOND\n sec = ms / 1000\n ms = ms % 1000\n mins = sec / 60\n sec = sec % 60\n hours = mins / 60\n mins = mins % 60\n return \"%02d:%02d:%02d.%03d\" % (hours, mins, sec, ms)... | [
"0.7004854",
"0.6931594",
"0.69189197",
"0.6756812",
"0.6692232",
"0.6642887",
"0.6592342",
"0.658775",
"0.6574913",
"0.6486888",
"0.64361775",
"0.64136505",
"0.6370646",
"0.6339585",
"0.62347764",
"0.61607003",
"0.61518013",
"0.6129622",
"0.6122454",
"0.6113869",
"0.61132205... | 0.72716767 | 0 |
This method return the day of year as string. The result is padded or unpadded based on the value of 2nd argument | def get_day_of_year(date, padded_or_unpadded):
if padded_or_unpadded == constants.str_padded:
return date.strftime('%j')
elif padded_or_unpadded == constants.str_unpadded:
return str(int(date.strftime('%j')))
else:
err_msg = str_possible_values('padded_or_unpadded', [
con... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def day_of_year(date=datetime.datetime.now()):\n return date.strftime(\"Its the %j day of %Y'th year.\")",
"def string_date(mnthDay, year):\n return(mnthDay + '/' + str(year))",
"def yearMonthDay() :\n timeDateValue = time.asctime(time.gmtime()).lower().split()\n if int(timeDateValue[2]) < 10 : tim... | [
"0.73828745",
"0.73613596",
"0.7343381",
"0.6961564",
"0.6958626",
"0.69379246",
"0.69113094",
"0.6853168",
"0.6824368",
"0.67431206",
"0.6661529",
"0.663259",
"0.66266316",
"0.6569165",
"0.65582687",
"0.6517039",
"0.651164",
"0.651164",
"0.651164",
"0.64484954",
"0.6372385",... | 0.754642 | 0 |
Returns Python datetime object with today's date | def today():
return datetime.today() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def today():\n today = datetime.utcnow() \n return datetime(today.year, today.month, today.day)",
"def get_today() -> datetime.date:\n return datetime.date.today()",
"def _today() -> datetime.date:\n return datetime.today().date()",
"def get_today():\n return datetime.today()",
"def today... | [
"0.869182",
"0.8485915",
"0.8298005",
"0.8294233",
"0.8159037",
"0.80495507",
"0.8004958",
"0.792286",
"0.77201253",
"0.76761013",
"0.7575939",
"0.753641",
"0.75165707",
"0.74756926",
"0.74588066",
"0.7438827",
"0.7311564",
"0.72923964",
"0.7230888",
"0.7227588",
"0.7215841",... | 0.80991966 | 5 |
Add n_seconds to Python datetime object date1 and return resultant date. To add 1 day then n_seconds will be 246060 | def add_seconds(date1, n_seconds):
return date1 + timedelta(seconds=n_seconds) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def subtract_seconds(date1, n_seconds):\n return date1 - timedelta(seconds=n_seconds)",
"def add(dt, days=0, seconds=0):\n return dt + datetime.timedelta(days=days, seconds=seconds)",
"def dayadd(date, numdays):\n return date + datetime.timedelta(days=numdays)",
"def date_plus_seconds(init_date,... | [
"0.68539006",
"0.66536313",
"0.62895894",
"0.6226376",
"0.6012472",
"0.58980393",
"0.5820424",
"0.5739224",
"0.5739224",
"0.5720606",
"0.5601847",
"0.55643964",
"0.5538204",
"0.55357546",
"0.55214083",
"0.55192757",
"0.55146044",
"0.54819643",
"0.5448166",
"0.5412446",
"0.536... | 0.8531505 | 0 |
Set an ElinaInterval to the empty interval [1, 1]. | def elina_interval_set_bottom(interval):
try:
elina_interval_set_bottom_c = elina_auxiliary_api.elina_interval_set_bottom
elina_interval_set_bottom_c.restype = None
elina_interval_set_bottom_c.argtypes = [ElinaIntervalPtr]
elina_interval_set_bottom_c(interval)
except:
pr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def elina_interval_set(interval1, interval2):\n\n try:\n elina_interval_set_c = elina_auxiliary_api.elina_interval_set\n elina_interval_set_c.restype = None\n elina_interval_set_c.argtypes = [ElinaIntervalPtr, ElinaIntervalPtr]\n elina_interval_set_c(interval1, interval2)\n except... | [
"0.60461885",
"0.59282434",
"0.5910849",
"0.58904725",
"0.5709679",
"0.56770355",
"0.5596857",
"0.5565794",
"0.5447026",
"0.54227877",
"0.5417033",
"0.5406637",
"0.5400885",
"0.5364062",
"0.53481555",
"0.5339948",
"0.5332234",
"0.5326352",
"0.531357",
"0.52950835",
"0.5261361... | 0.5209659 | 24 |
Test if an ElinaInterval is equal to another ElinaInterval. | def elina_interval_equal(interval1, interval2):
result = None
try:
elina_interval_equal_c = elina_auxiliary_api.elina_interval_equal
elina_interval_equal_c.restype = c_bool
elina_interval_equal_c.argypes = [ElinaIntervalPtr, ElinaIntervalPtr]
result = elina_interval_equal_c(inte... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other):\n return self.semitone_interval == other.semitone_interval",
"def __eq__(self, other):\n if len(self.intervals) != len(other.intervals):\n return False\n for i in range(0, len(self.intervals)):\n if self.intervals[i] != other.intervals[i]:\n ... | [
"0.77159286",
"0.7182838",
"0.6814462",
"0.68038094",
"0.67191154",
"0.66404593",
"0.64349496",
"0.6433808",
"0.6408898",
"0.6342797",
"0.63326055",
"0.62981933",
"0.62951815",
"0.6283267",
"0.6263043",
"0.6257692",
"0.61913854",
"0.6158324",
"0.61155516",
"0.6100827",
"0.609... | 0.7357469 | 1 |
Set an ElinaInterval to the negative of another ElinaInterval. | def elina_interval_neg(interval1, interval2):
try:
elina_interval_neg_c = elina_auxiliary_api.elina_interval_neg
elina_interval_neg_c.restype = None
elina_interval_neg_c.argtypes = [ElinaIntervalPtr, ElinaIntervalPtr]
elina_interval_neg_c(interval1, interval2)
except:
pr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __neg__(self):\n return Intervalo(-self.hi, -self.lo)",
"def __neg__(self):\n retval = self.copy()\n retval._val = -retval._val\n return retval",
"def set(self, other):\n if isinstance(other, sppasInterval) is False:\n raise AnnDataTypeError(other, \"sppasInter... | [
"0.6391752",
"0.6008117",
"0.59737957",
"0.58320564",
"0.5797346",
"0.5715979",
"0.57047886",
"0.56819034",
"0.5632977",
"0.5511696",
"0.5489074",
"0.5489074",
"0.54838276",
"0.54823357",
"0.54442614",
"0.5434076",
"0.54276097",
"0.53955066",
"0.5395111",
"0.53910875",
"0.538... | 0.6928733 | 0 |
Test that the password must be at least 8 characters | def test_password_too_short(self):
payload = {
"user": {
"email": "user5@user.com",
"password": "us",
"is_doctor": False,
"is_hospital_admin": True
},
'first_name': 'Test1',
'last_name': 'JustUser2'
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def validate_password(password):\n return isinstance(password, str) and len(password) >= 8 and \\\n re.search(r'[A-Z]', password) and re.search(r'[0-9]', password)",
"def valid_password(password):\n password_regex = re.compile(r\"^.{8,20}$\")\n return password and password_regex.match... | [
"0.834034",
"0.8077524",
"0.8001976",
"0.7976036",
"0.78512824",
"0.7822292",
"0.7790186",
"0.778184",
"0.77769876",
"0.77737695",
"0.7760865",
"0.77392006",
"0.7699898",
"0.76452714",
"0.75817204",
"0.75675637",
"0.75497967",
"0.754331",
"0.7540738",
"0.7517703",
"0.75163066... | 0.0 | -1 |
Test that we can create a markdown artifact using map. | async def test_create_link_artifact_using_map_succeeds(self):
# An ode to prefect issue #5309.
@task
def add_ten(x):
create_link_artifact(
# TODO: uncomment this out once unique constraint is dropped on artifact key
# key="new-markdown-artifact",
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def test_create_markdown_artifact_using_map_succeeds(self):\n\n @task\n def add_ten(x):\n create_markdown_artifact(\n # TODO: uncomment this out once unique constraint is dropped on artifact key\n # key=\"new-markdown-artifact\",\n markdow... | [
"0.75183785",
"0.65316534",
"0.60766464",
"0.5913013",
"0.5804815",
"0.5769102",
"0.5691128",
"0.5681783",
"0.5630588",
"0.5623778",
"0.55925226",
"0.5587807",
"0.55831283",
"0.5581501",
"0.55803835",
"0.55771106",
"0.55739635",
"0.55722094",
"0.5567483",
"0.555479",
"0.55326... | 0.63481134 | 2 |
Test that we can create a markdown artifact using map. | async def test_create_markdown_artifact_using_map_succeeds(self):
@task
def add_ten(x):
create_markdown_artifact(
# TODO: uncomment this out once unique constraint is dropped on artifact key
# key="new-markdown-artifact",
markdown="my markdown... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_format_map_file(self):\r\n\r\n desc_key = \"Description\"\r\n sample_id = \"SampleID\"\r\n headers = ['SampleID', 'a', 'Description', 'b']\r\n id_map = {'x': {'a': 3, 'b': 4}, 'y': {'a': 5, 'b': 6}}\r\n desc_map = {'x': 'sample x', 'y': 'sample y'}\r\n run_desc = ... | [
"0.6532908",
"0.634693",
"0.607698",
"0.5913573",
"0.5804663",
"0.5768676",
"0.56904",
"0.568153",
"0.5629953",
"0.56228894",
"0.55918086",
"0.5587839",
"0.55840844",
"0.55824846",
"0.55793035",
"0.55781525",
"0.5573195",
"0.55731773",
"0.5567621",
"0.55544263",
"0.5532185",
... | 0.75174516 | 0 |
Returns single number, if found. Else if all numbers appear twice, returns 0. | def single_number(nums):
i = 0
for num in nums:
i ^= num
return i | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def find_it(val):\n val = sorted(val, key=int)\n temp_val = val[0]\n counter = 0\n for i, number in enumerate(val):\n if not number in val:\n # number repeated odd times\n return temp_val\n else:\n if number == temp_val:... | [
"0.6894983",
"0.6781095",
"0.65482706",
"0.65375346",
"0.6404838",
"0.6275918",
"0.6262368",
"0.6210966",
"0.61769545",
"0.61671484",
"0.60221326",
"0.59485775",
"0.59123796",
"0.59047043",
"0.59019876",
"0.58981377",
"0.58834857",
"0.58096474",
"0.57998294",
"0.57841897",
"0... | 0.5748116 | 24 |
return first three characters | def sameThreeCharStartPredicate(field):
if len(field) < 3:
return ()
return (field[:3], ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def front3(str):\r\n if len(str)<4:\r\n return 3*str\r\n else:\r\n return 3*str[:3]",
"def print_third_character(text):\n third_character = [word[2] for word in text.split()]\n print(third_character)",
"def first_two(s):\n if len(s) >= 2:\n string = s[0:2]\n return st... | [
"0.77657",
"0.6840356",
"0.66136867",
"0.6529674",
"0.6153346",
"0.607873",
"0.60289335",
"0.6011704",
"0.59972364",
"0.5990348",
"0.59649134",
"0.59456074",
"0.5923997",
"0.5917582",
"0.59121597",
"0.5908646",
"0.5905611",
"0.58917016",
"0.5886052",
"0.58432496",
"0.5838651"... | 0.6380211 | 4 |
Return the MVDR (Minimum Variance Distortionless Response) vector | def get_mvdr_vector_with_rtf(
psd_n: Union[torch.Tensor, ComplexTensor],
psd_speech: Union[torch.Tensor, ComplexTensor],
psd_noise: Union[torch.Tensor, ComplexTensor],
iterations: int = 3,
reference_vector: Union[int, torch.Tensor, None] = None,
normalize_ref_channel: Optional[int] = None,
u... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_minvar_rotation(self):\n vrot, v, w = minvar(self.rdata)\n # Determinant of rotation matrix should be = 1\n self.assertTrue((np.linalg.det(v) - 1) < self.tol)",
"def test_minvar_basic(self):\n\n # Synthetic data of zeros\n data = np.zeros([2, 3])\n vrot, v, w = ... | [
"0.5757096",
"0.5689028",
"0.5615414",
"0.55406153",
"0.552362",
"0.552218",
"0.5513989",
"0.5492812",
"0.5483167",
"0.54611665",
"0.5448639",
"0.54449975",
"0.54252005",
"0.535135",
"0.53470427",
"0.532953",
"0.5328581",
"0.5318045",
"0.5316311",
"0.53133965",
"0.53059006",
... | 0.0 | -1 |
Return the WPD vector. WPD is the Weighted Power minimization Distortionless response | def get_WPD_filter(
Phi: Union[torch.Tensor, ComplexTensor],
Rf: Union[torch.Tensor, ComplexTensor],
reference_vector: torch.Tensor,
use_torch_solver: bool = True,
diagonal_loading: bool = True,
diag_eps: float = 1e-7,
eps: float = 1e-8,
) -> Union[torch.Tensor, ComplexTensor]:
if diagon... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Wp(self):\n from scipy.integrate import quad\n Eth = 1.22e-3\n\n with warnings.catch_warnings():\n warnings.simplefilter(\"ignore\")\n Wp = quad(lambda x: x * self._particle_distribution(x), Eth, np.Inf)[0]\n\n return (Wp * u.TeV).to('erg')",
"def W(self):\n ... | [
"0.70787185",
"0.6684914",
"0.64346564",
"0.6380371",
"0.627198",
"0.62442076",
"0.6239579",
"0.6220163",
"0.62147903",
"0.61796474",
"0.6166501",
"0.61270976",
"0.599128",
"0.59615237",
"0.59449816",
"0.5918644",
"0.5901797",
"0.58947134",
"0.58854395",
"0.5881746",
"0.58817... | 0.5655943 | 44 |
Return the WPD vector (v2). This implementation is more efficient than `get_WPD_filter` as it skips unnecessary computation with zeros. | def get_WPD_filter_v2(
Phi: Union[torch.Tensor, ComplexTensor],
Rf: Union[torch.Tensor, ComplexTensor],
reference_vector: torch.Tensor,
diagonal_loading: bool = True,
diag_eps: float = 1e-7,
eps: float = 1e-8,
) -> Union[torch.Tensor, ComplexTensor]:
C = reference_vector.shape[-1]
if dia... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def w(self) -> np.ndarray:\n return self.array[:, 0] if self.scalar_vector else self.array[:, 3]",
"def Wv2(z, k, c_M=0):\n k *= 0.6763 # 1/Mpc\n c = 299792458/1000 # km/s\n W = -(1 - c/(Hcal(z)*chi(z)) + alpha_M(z, c_M)/2)*f(z)*H(z)/(1+z)*1/k**2\n W *= 1/c\n return W",
"def w(self) -> fl... | [
"0.6176722",
"0.579598",
"0.573114",
"0.5680056",
"0.56454873",
"0.5634384",
"0.5586387",
"0.55445284",
"0.5503573",
"0.54831403",
"0.5445631",
"0.53896195",
"0.5366432",
"0.5341324",
"0.53273827",
"0.5325314",
"0.5322277",
"0.53039336",
"0.52969486",
"0.5295205",
"0.5295202"... | 0.63016796 | 0 |
Return the WPD vector calculated with RTF. WPD is the Weighted Power minimization Distortionless response | def get_WPD_filter_with_rtf(
psd_observed_bar: Union[torch.Tensor, ComplexTensor],
psd_speech: Union[torch.Tensor, ComplexTensor],
psd_noise: Union[torch.Tensor, ComplexTensor],
iterations: int = 3,
reference_vector: Union[int, torch.Tensor, None] = None,
normalize_ref_channel: Optional[int] = N... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_mvdr_vector_with_rtf(\n psd_n: Union[torch.Tensor, ComplexTensor],\n psd_speech: Union[torch.Tensor, ComplexTensor],\n psd_noise: Union[torch.Tensor, ComplexTensor],\n iterations: int = 3,\n reference_vector: Union[int, torch.Tensor, None] = None,\n normalize_ref_channel: Optional[int] = ... | [
"0.62324935",
"0.602385",
"0.55913043",
"0.55806017",
"0.53632337",
"0.53521687",
"0.53157026",
"0.5193453",
"0.5192421",
"0.51854646",
"0.5166411",
"0.5142323",
"0.51267654",
"0.51226324",
"0.5101357",
"0.5091785",
"0.5085019",
"0.5082297",
"0.50756097",
"0.5051238",
"0.5014... | 0.6532201 | 0 |
cast(itkLightObject obj) > itkShotNoiseImageFilterID2ID2 | def cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterID2ID2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkNotImageFilterIF2IF2_cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF2IF2 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF2IF2_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF2IF2 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF2IF2_cast(obj)",
"def... | [
"0.80226314",
"0.7992127",
"0.788654",
"0.78590524",
"0.78163844",
"0.780687",
"0.77701086",
"0.77316844",
"0.76993674",
"0.76921725",
"0.76831234",
"0.7682341",
"0.76586556",
"0.76536316",
"0.76395696",
"0.7622749",
"0.76102656",
"0.7605775",
"0.75835186",
"0.7583408",
"0.75... | 0.73702115 | 40 |
New() > itkShotNoiseImageFilterID2ID2 Create a new object of the class itkShotNoiseImageFilterID2ID2 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 parameter in the... | def New(*args, **kargs):
obj = itkShotNoiseImageFilterID2ID2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkSpeckleNoiseImageFilterID2ID2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkShotNoiseImageFilterIF2IF2.__New_orig__()\n import itkTemplate\n itkTem... | [
"0.7888801",
"0.7772306",
"0.7611354",
"0.76009446",
"0.7582525",
"0.7463011",
"0.7452805",
"0.74157935",
"0.73886883",
"0.7357494",
"0.7333795",
"0.73072463",
"0.728906",
"0.7287465",
"0.7267969",
"0.7248618",
"0.7235668",
"0.7204026",
"0.71984035",
"0.7183234",
"0.7167821",... | 0.8074975 | 0 |
itkShotNoiseImageFilterID2ID2_cast(itkLightObject obj) > itkShotNoiseImageFilterID2ID2 | def itkShotNoiseImageFilterID2ID2_cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterID2ID2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkNotImageFilterIF2IF2_cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF2IF2 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF2IF2_cast(obj)",
"def itkShotNoiseImageFilterIF2IF2_cast(*args):\n return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIF2IF2_cast(*args)",
"def itkNotImag... | [
"0.82859683",
"0.8194112",
"0.81867635",
"0.818208",
"0.8115907",
"0.8096947",
"0.80934685",
"0.8087512",
"0.8060013",
"0.80290115",
"0.79955244",
"0.797266",
"0.7937439",
"0.79291326",
"0.79280066",
"0.79117596",
"0.7901736",
"0.7896917",
"0.78956723",
"0.7887808",
"0.787997... | 0.8392188 | 0 |
cast(itkLightObject obj) > itkShotNoiseImageFilterID3ID3 | def cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterID3ID3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF3IF3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF3IF3_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkNotImageFilterISS3ISS3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterISS3ISS3_cast(obj)",
"def itkNotImageFilt... | [
"0.8027327",
"0.7953889",
"0.793949",
"0.79040086",
"0.78886706",
"0.7876508",
"0.7855039",
"0.78514475",
"0.7850107",
"0.77901053",
"0.77583826",
"0.77580553",
"0.7719031",
"0.77124745",
"0.77099174",
"0.7699822",
"0.76302654",
"0.76272124",
"0.76252234",
"0.75925934",
"0.75... | 0.7236883 | 69 |
New() > itkShotNoiseImageFilterID3ID3 Create a new object of the class itkShotNoiseImageFilterID3ID3 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 parameter in the... | def New(*args, **kargs):
obj = itkShotNoiseImageFilterID3ID3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkSpeckleNoiseImageFilterID3ID3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkShotNoiseImageFilterIF3IF3.__New_orig__()\n import itkTemplate\n itkTem... | [
"0.78605896",
"0.77720606",
"0.771852",
"0.7644988",
"0.76307464",
"0.7562838",
"0.74948484",
"0.7479652",
"0.74772066",
"0.74225605",
"0.74037075",
"0.73961437",
"0.7380508",
"0.7380101",
"0.73741424",
"0.73656607",
"0.7327228",
"0.7325737",
"0.7291905",
"0.7284564",
"0.7282... | 0.80106413 | 0 |
itkShotNoiseImageFilterID3ID3_cast(itkLightObject obj) > itkShotNoiseImageFilterID3ID3 | def itkShotNoiseImageFilterID3ID3_cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterID3ID3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkNotImageFilterIF3IF3_cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF3IF3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF3IF3_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF3IF3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF3IF3_cast(obj)",
"def... | [
"0.8321933",
"0.8320343",
"0.82831055",
"0.82294846",
"0.82175666",
"0.81982666",
"0.81980014",
"0.8172938",
"0.8172747",
"0.81413966",
"0.8116449",
"0.8113713",
"0.8111712",
"0.8100703",
"0.8060904",
"0.8059042",
"0.805699",
"0.8046885",
"0.8035965",
"0.80291414",
"0.8026727... | 0.82660663 | 3 |
cast(itkLightObject obj) > itkShotNoiseImageFilterIF2IF2 | def cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIF2IF2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkNotImageFilterIF2IF2_cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF2IF2 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF2IF2_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF2IF2 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF2IF2_cast(obj)",
"def... | [
"0.81718284",
"0.8098629",
"0.7873874",
"0.7792644",
"0.7787245",
"0.7722525",
"0.7689091",
"0.768698",
"0.76687974",
"0.7646785",
"0.7622298",
"0.76069105",
"0.75982153",
"0.75769705",
"0.7541857",
"0.75404096",
"0.75022745",
"0.7494828",
"0.74869",
"0.7475599",
"0.7470706",... | 0.7305681 | 30 |
New() > itkShotNoiseImageFilterIF2IF2 Create a new object of the class itkShotNoiseImageFilterIF2IF2 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 parameter in the... | def New(*args, **kargs):
obj = itkShotNoiseImageFilterIF2IF2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkShotNoiseImageFilterID2ID2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkSpeckleNoiseImageFilterIF2IF2.__New_orig__()\n import itkTemplate\n itkTem... | [
"0.7899147",
"0.7788778",
"0.7722894",
"0.768624",
"0.76782376",
"0.75961614",
"0.75876486",
"0.7523276",
"0.7511629",
"0.7461423",
"0.7459965",
"0.7444072",
"0.73845065",
"0.7377687",
"0.73629194",
"0.73514086",
"0.73323894",
"0.72926193",
"0.7289623",
"0.72499824",
"0.72333... | 0.80526483 | 0 |
itkShotNoiseImageFilterIF2IF2_cast(itkLightObject obj) > itkShotNoiseImageFilterIF2IF2 | def itkShotNoiseImageFilterIF2IF2_cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIF2IF2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkNotImageFilterIF2IF2_cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF2IF2 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF2IF2_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF2IF2 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF2IF2_cast(obj)",
"def... | [
"0.86068475",
"0.8472663",
"0.8249504",
"0.8240187",
"0.8185973",
"0.8180045",
"0.8175697",
"0.81513083",
"0.80936795",
"0.80695224",
"0.8060924",
"0.8046158",
"0.80248123",
"0.7967083",
"0.79593533",
"0.7958694",
"0.79553103",
"0.79351634",
"0.7934103",
"0.7926746",
"0.79056... | 0.8440361 | 2 |
cast(itkLightObject obj) > itkShotNoiseImageFilterIF3IF3 | def cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIF3IF3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkNotImageFilterIF3IF3_cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF3IF3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF3IF3_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF3IF3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF3IF3_cast(obj)",
"def... | [
"0.80233794",
"0.80206466",
"0.78460705",
"0.7821067",
"0.7809762",
"0.7797605",
"0.7731515",
"0.7715701",
"0.7706963",
"0.7704333",
"0.7702359",
"0.7661764",
"0.76529175",
"0.7636606",
"0.7629285",
"0.7601203",
"0.75879234",
"0.75629246",
"0.7552689",
"0.7545657",
"0.7540664... | 0.71850806 | 52 |
New() > itkShotNoiseImageFilterIF3IF3 Create a new object of the class itkShotNoiseImageFilterIF3IF3 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 parameter in the... | def New(*args, **kargs):
obj = itkShotNoiseImageFilterIF3IF3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkSpeckleNoiseImageFilterIF3IF3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkShotNoiseImageFilterID3ID3.__New_orig__()\n import itkTemplate\n itkTem... | [
"0.7850017",
"0.78187287",
"0.7758805",
"0.7736923",
"0.7671411",
"0.76543635",
"0.7648227",
"0.75830865",
"0.7572486",
"0.7549996",
"0.7546201",
"0.753433",
"0.7518242",
"0.74722433",
"0.7454137",
"0.7448331",
"0.741978",
"0.7410095",
"0.7392789",
"0.738735",
"0.7378907",
... | 0.8024199 | 0 |
itkShotNoiseImageFilterIF3IF3_cast(itkLightObject obj) > itkShotNoiseImageFilterIF3IF3 | def itkShotNoiseImageFilterIF3IF3_cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIF3IF3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkNotImageFilterIF3IF3_cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF3IF3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF3IF3_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF3IF3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF3IF3_cast(obj)",
"def... | [
"0.8486299",
"0.8424807",
"0.828012",
"0.82664275",
"0.8261093",
"0.8225871",
"0.8186781",
"0.8170046",
"0.81654286",
"0.81411105",
"0.8122618",
"0.8084053",
"0.80746543",
"0.8070061",
"0.8068037",
"0.8054173",
"0.80534875",
"0.80336636",
"0.8024837",
"0.8023276",
"0.79974854... | 0.83057743 | 2 |
cast(itkLightObject obj) > itkShotNoiseImageFilterIUC2IUC2 | def cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIUC2IUC2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkNotImageFilterIUC2IUC2_cast(obj: 'itkLightObject') -> \"itkNotImageFilterIUC2IUC2 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIUC2IUC2_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkNotImageFilterIUC2IUC2 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIUC2IUC2_cast(obj... | [
"0.8264606",
"0.81753004",
"0.81152385",
"0.81041485",
"0.80579334",
"0.8023014",
"0.8012319",
"0.7981387",
"0.79772276",
"0.797223",
"0.79448473",
"0.7931789",
"0.792509",
"0.79166883",
"0.78643656",
"0.7862963",
"0.783347",
"0.78322023",
"0.78156394",
"0.781414",
"0.7811942... | 0.7336831 | 80 |
New() > itkShotNoiseImageFilterIUC2IUC2 Create a new object of the class itkShotNoiseImageFilterIUC2IUC2 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 parameter in... | def New(*args, **kargs):
obj = itkShotNoiseImageFilterIUC2IUC2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkSpeckleNoiseImageFilterIUC2IUC2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkSquaredDifferenceImageFilterIUC2IUC2IUC2.__New_orig__()\n import itkTemplate... | [
"0.78035945",
"0.778486",
"0.7781035",
"0.7746704",
"0.77010125",
"0.76741093",
"0.7659904",
"0.7659282",
"0.763556",
"0.76161605",
"0.76096666",
"0.75969267",
"0.75932455",
"0.7585146",
"0.75812787",
"0.75714076",
"0.75642455",
"0.7492152",
"0.7440896",
"0.744072",
"0.743293... | 0.8030436 | 0 |
itkShotNoiseImageFilterIUC2IUC2_cast(itkLightObject obj) > itkShotNoiseImageFilterIUC2IUC2 | def itkShotNoiseImageFilterIUC2IUC2_cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIUC2IUC2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkNotImageFilterIUC2IUC2_cast(obj: 'itkLightObject') -> \"itkNotImageFilterIUC2IUC2 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIUC2IUC2_cast(obj)",
"def itkHuangThresholdImageFilterIUC2IUC2_cast(obj: 'itkLightObject') -> \"itkHuangThresholdImageFilterIUC2IUC2 *\":\n return _itkHuangThresh... | [
"0.8775747",
"0.8687628",
"0.8614926",
"0.86041147",
"0.85721654",
"0.8535217",
"0.85332257",
"0.852538",
"0.8474413",
"0.8458851",
"0.8454475",
"0.83788663",
"0.8373096",
"0.8342416",
"0.83233243",
"0.8322261",
"0.8315306",
"0.82890713",
"0.8283263",
"0.82734334",
"0.8230657... | 0.830621 | 17 |
cast(itkLightObject obj) > itkShotNoiseImageFilterIUC3IUC3 | def cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIUC3IUC3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkNotImageFilterIUC3IUC3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIUC3IUC3_cast(obj)",
"def itkNotImageFilterIUC3IUC3_cast(obj: 'itkLightObject') -> \"itkNotImageFilterIUC3IUC3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIUC3IUC3_cast(obj... | [
"0.8138344",
"0.81367564",
"0.8049426",
"0.8038714",
"0.80078644",
"0.79940885",
"0.7977058",
"0.79725164",
"0.7970673",
"0.79480314",
"0.79287535",
"0.79164535",
"0.7893407",
"0.78793454",
"0.7866284",
"0.7853583",
"0.7848804",
"0.7845495",
"0.7840345",
"0.7837506",
"0.78340... | 0.0 | -1 |
New() > itkShotNoiseImageFilterIUC3IUC3 Create a new object of the class itkShotNoiseImageFilterIUC3IUC3 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 parameter in... | def New(*args, **kargs):
obj = itkShotNoiseImageFilterIUC3IUC3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkHuangThresholdImageFilterIUS3IUC3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkSpeckleNoiseImageFilterIUC3IUC3.__New_orig__()\n import itkTemplate\n ... | [
"0.7908675",
"0.78906745",
"0.7852845",
"0.78514844",
"0.7846594",
"0.78135085",
"0.7798135",
"0.77733964",
"0.7765226",
"0.77539295",
"0.77532715",
"0.77471757",
"0.7722811",
"0.7697012",
"0.7696045",
"0.7694739",
"0.7669954",
"0.7653707",
"0.76442623",
"0.7631827",
"0.75991... | 0.8071799 | 0 |
itkShotNoiseImageFilterIUC3IUC3_cast(itkLightObject obj) > itkShotNoiseImageFilterIUC3IUC3 | def itkShotNoiseImageFilterIUC3IUC3_cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIUC3IUC3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkNotImageFilterIUC3IUC3_cast(obj: 'itkLightObject') -> \"itkNotImageFilterIUC3IUC3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIUC3IUC3_cast(obj)",
"def itkHuangThresholdImageFilterIUC3IUC3_cast(obj: 'itkLightObject') -> \"itkHuangThresholdImageFilterIUC3IUC3 *\":\n return _itkHuangThresh... | [
"0.8653519",
"0.8558994",
"0.85204387",
"0.8508406",
"0.85042846",
"0.8491727",
"0.8482324",
"0.8471883",
"0.8435606",
"0.84318274",
"0.84307534",
"0.8426645",
"0.8379568",
"0.837656",
"0.83359784",
"0.83330184",
"0.8305985",
"0.8291611",
"0.8288314",
"0.82709515",
"0.8256625... | 0.8238092 | 21 |
cast(itkLightObject obj) > itkShotNoiseImageFilterIUL2IUL2 | def cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIUL2IUL2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkHuangThresholdImageFilterIF2IUS2 *\":\n return _itkHuangThresholdImageFilterPython.itkHuangThresholdImageFilterIF2IUS2_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF2IF2 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF2IF2_cas... | [
"0.79967034",
"0.79783356",
"0.7976483",
"0.7935227",
"0.7898128",
"0.7875261",
"0.78698534",
"0.783808",
"0.78326064",
"0.7822588",
"0.7802335",
"0.777386",
"0.774507",
"0.77431595",
"0.77422404",
"0.7734773",
"0.77245355",
"0.77232426",
"0.7721262",
"0.77055633",
"0.769312"... | 0.71419114 | 98 |
New() > itkShotNoiseImageFilterIUL2IUL2 Create a new object of the class itkShotNoiseImageFilterIUL2IUL2 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 parameter in... | def New(*args, **kargs):
obj = itkShotNoiseImageFilterIUL2IUL2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkSpeckleNoiseImageFilterIUL2IUL2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkShotNoiseImageFilterIUC2IUC2.__New_orig__()\n import itkTemplate\n it... | [
"0.7777173",
"0.77646387",
"0.75783724",
"0.75581783",
"0.75536823",
"0.74314946",
"0.738588",
"0.7379253",
"0.73716086",
"0.73515064",
"0.73440284",
"0.73415303",
"0.733961",
"0.7335793",
"0.73301613",
"0.73136044",
"0.7310348",
"0.73101294",
"0.7294963",
"0.7283825",
"0.727... | 0.800222 | 0 |
itkShotNoiseImageFilterIUL2IUL2_cast(itkLightObject obj) > itkShotNoiseImageFilterIUL2IUL2 | def itkShotNoiseImageFilterIUL2IUL2_cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIUL2IUL2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkHuangThresholdImageFilterIF2IUS2 *\":\n return _itkHuangThresholdImageFilterPython.itkHuangThresholdImageFilterIF2IUS2_cast(obj)",
"def itkHuangThresholdImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> \"itkHuangThresholdImageFilterIF2IUS2 *\":\n return _itkHuan... | [
"0.83224314",
"0.8320037",
"0.82857555",
"0.82464886",
"0.82275206",
"0.8226993",
"0.8201983",
"0.81706095",
"0.81624514",
"0.81448466",
"0.8142716",
"0.8127869",
"0.8126322",
"0.81253123",
"0.81203234",
"0.81083727",
"0.8102148",
"0.8078779",
"0.8075477",
"0.80722976",
"0.80... | 0.8085496 | 17 |
cast(itkLightObject obj) > itkShotNoiseImageFilterIUL3IUL3 | def cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIUL3IUL3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkNotImageFilterIF3IF3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIF3IF3_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkHuangThresholdImageFilterIF3IUS3 *\":\n return _itkHuangThresholdImageFilterPython.itkHuangThresholdImageFilterIF3IUS3_cas... | [
"0.78893113",
"0.78808254",
"0.7849592",
"0.7835997",
"0.7830967",
"0.7818131",
"0.7809381",
"0.7798626",
"0.7792483",
"0.7776447",
"0.77361685",
"0.77265805",
"0.7721059",
"0.7682974",
"0.767896",
"0.767859",
"0.7667877",
"0.7665976",
"0.7653476",
"0.76501507",
"0.7640461",
... | 0.0 | -1 |
New() > itkShotNoiseImageFilterIUL3IUL3 Create a new object of the class itkShotNoiseImageFilterIUL3IUL3 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 parameter in... | def New(*args, **kargs):
obj = itkShotNoiseImageFilterIUL3IUL3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkSpeckleNoiseImageFilterIUL3IUL3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkShotNoiseImageFilterIUC3IUC3.__New_orig__()\n import itkTemplate\n it... | [
"0.78867114",
"0.783596",
"0.7782664",
"0.77021295",
"0.7650439",
"0.7610059",
"0.7582911",
"0.75565344",
"0.75464284",
"0.75340384",
"0.7531177",
"0.75245106",
"0.7520967",
"0.75070703",
"0.7506765",
"0.75054806",
"0.7486634",
"0.74776167",
"0.74484193",
"0.74297386",
"0.742... | 0.80507916 | 0 |
itkShotNoiseImageFilterIUL3IUL3_cast(itkLightObject obj) > itkShotNoiseImageFilterIUL3IUL3 | def itkShotNoiseImageFilterIUL3IUL3_cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIUL3IUL3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkHuangThresholdImageFilterIF3IUS3 *\":\n return _itkHuangThresholdImageFilterPython.itkHuangThresholdImageFilterIF3IUS3_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkHuangThresholdImageFilterIUS3ISS3 *\":\n return _itkHuangThresholdImageFilterPython.itk... | [
"0.83484733",
"0.8321941",
"0.8282533",
"0.82797414",
"0.82724416",
"0.8268308",
"0.82657117",
"0.82630575",
"0.82390183",
"0.82328343",
"0.82288957",
"0.8220584",
"0.8218298",
"0.82064927",
"0.8205189",
"0.82045007",
"0.82043076",
"0.8172881",
"0.8148171",
"0.8137382",
"0.81... | 0.80594134 | 27 |
cast(itkLightObject obj) > itkShotNoiseImageFilterIUS2IUS2 | def cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIUS2IUS2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkNotImageFilterIUS2IUS2_cast(obj: 'itkLightObject') -> \"itkNotImageFilterIUS2IUS2 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIUS2IUS2_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkHuangThresholdImageFilterIUS2IUS2 *\":\n return _itkHuangThresholdImageFilterPython.itkHuangThre... | [
"0.8110734",
"0.8080281",
"0.80693674",
"0.8053436",
"0.80498385",
"0.7999965",
"0.7927531",
"0.7913791",
"0.7902071",
"0.78212595",
"0.78000325",
"0.77981955",
"0.77925336",
"0.77579725",
"0.77566564",
"0.76578474",
"0.76340103",
"0.7631746",
"0.7606459",
"0.7596177",
"0.758... | 0.7215003 | 65 |
New() > itkShotNoiseImageFilterIUS2IUS2 Create a new object of the class itkShotNoiseImageFilterIUS2IUS2 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 parameter in... | def New(*args, **kargs):
obj = itkShotNoiseImageFilterIUS2IUS2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkSpeckleNoiseImageFilterIUS2IUS2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkSquaredDifferenceImageFilterIUS2IUS2IUS2.__New_orig__()\n import itkTemplate... | [
"0.79014516",
"0.77926236",
"0.76994854",
"0.76315504",
"0.7585535",
"0.7571985",
"0.7569898",
"0.75604475",
"0.7553401",
"0.7531628",
"0.7482496",
"0.74819136",
"0.74760807",
"0.74717546",
"0.7457131",
"0.74386793",
"0.74276733",
"0.74265105",
"0.7381966",
"0.73601836",
"0.7... | 0.81010866 | 0 |
itkShotNoiseImageFilterIUS2IUS2_cast(itkLightObject obj) > itkShotNoiseImageFilterIUS2IUS2 | def itkShotNoiseImageFilterIUS2IUS2_cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIUS2IUS2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkNotImageFilterIUS2IUS2_cast(obj: 'itkLightObject') -> \"itkNotImageFilterIUS2IUS2 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIUS2IUS2_cast(obj)",
"def itkHuangThresholdImageFilterIUS2IUS2_cast(obj: 'itkLightObject') -> \"itkHuangThresholdImageFilterIUS2IUS2 *\":\n return _itkHuangThresh... | [
"0.86212033",
"0.8499531",
"0.8450209",
"0.84361523",
"0.84218866",
"0.83130586",
"0.83007956",
"0.8219345",
"0.82029885",
"0.8188085",
"0.8184211",
"0.817805",
"0.81686276",
"0.81544995",
"0.8139021",
"0.8137558",
"0.8133938",
"0.81072164",
"0.80968565",
"0.8005626",
"0.8004... | 0.82674485 | 7 |
cast(itkLightObject obj) > itkShotNoiseImageFilterIUS3IUS3 | def cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIUS3IUS3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkNotImageFilterIUS3IUS3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIUS3IUS3_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkHuangThresholdImageFilterIUS3IUS3 *\":\n return _itkHuangThresholdImageFilterPython.itkHuangThresholdImageFilterIUS3IU... | [
"0.79237145",
"0.7914144",
"0.78609633",
"0.7800903",
"0.7796873",
"0.77852875",
"0.7780874",
"0.77751684",
"0.77607286",
"0.77371144",
"0.764309",
"0.76394343",
"0.76267415",
"0.7625958",
"0.7619485",
"0.7614783",
"0.7603291",
"0.75720006",
"0.7564167",
"0.7550445",
"0.75194... | 0.71452206 | 78 |
New() > itkShotNoiseImageFilterIUS3IUS3 Create a new object of the class itkShotNoiseImageFilterIUS3IUS3 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 parameter in... | def New(*args, **kargs):
obj = itkShotNoiseImageFilterIUS3IUS3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkSpeckleNoiseImageFilterIUS3IUS3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkNotImageFilterIUS3IUS3.__New_orig__()\n import itkTemplate\n itkTempl... | [
"0.79904294",
"0.78510237",
"0.7715534",
"0.7699715",
"0.769461",
"0.7693518",
"0.76576966",
"0.7638428",
"0.7632234",
"0.7610086",
"0.76057404",
"0.758904",
"0.7583241",
"0.7577353",
"0.7568069",
"0.755682",
"0.75360537",
"0.7533014",
"0.7494803",
"0.7478487",
"0.74751216",
... | 0.8155241 | 0 |
itkShotNoiseImageFilterIUS3IUS3_cast(itkLightObject obj) > itkShotNoiseImageFilterIUS3IUS3 | def itkShotNoiseImageFilterIUS3IUS3_cast(*args):
return _itkShotNoiseImageFilterPython.itkShotNoiseImageFilterIUS3IUS3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkNotImageFilterIUS3IUS3_cast(obj: 'itkLightObject') -> \"itkNotImageFilterIUS3IUS3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIUS3IUS3_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkNotImageFilterIUS3IUS3 *\":\n return _itkNotImageFilterPython.itkNotImageFilterIUS3IUS3_cast(obj... | [
"0.8359991",
"0.8267146",
"0.8228796",
"0.82170564",
"0.81167054",
"0.80885315",
"0.8077649",
"0.8075798",
"0.80410385",
"0.803394",
"0.8011941",
"0.79931086",
"0.79757625",
"0.7940714",
"0.7914697",
"0.7887688",
"0.7871627",
"0.7870444",
"0.7870241",
"0.7861048",
"0.78295827... | 0.81728405 | 4 |
Indicates whether or not this value has changed. | def changed(self):
return self.value != self.previous_value | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def has_changed(self):\n return self.get_old_value() != self.get_current_value()",
"def changed(self) -> bool:\n return self._changed",
"def has_changed(self):\n return bool(self.changed_data)",
"def has_been_changed(self):\n return self._changed",
"def hadChanged(self):\n ... | [
"0.86142427",
"0.816901",
"0.8071975",
"0.805341",
"0.7941922",
"0.7728461",
"0.75874346",
"0.75270766",
"0.739678",
"0.7290487",
"0.7249361",
"0.7113504",
"0.7100091",
"0.6916172",
"0.6916172",
"0.6910426",
"0.68938136",
"0.68845683",
"0.6875068",
"0.68413186",
"0.6837444",
... | 0.8450471 | 2 |
Returns the name of the cql name of this column | def db_field_name(self):
return self.db_field or self.column_name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_name(self):\n return self.col_name",
"def columnName(self):\n return self.__column",
"def column_name(self) -> Optional[str]:\n return pulumi.get(self, \"column_name\")",
"def column_name(self) -> pulumi.Input[str]:\n return pulumi.get(self, \"column_name\")",
"def colum... | [
"0.8465627",
"0.7806263",
"0.7726513",
"0.76495045",
"0.76495045",
"0.7547678",
"0.726682",
"0.72207654",
"0.7194899",
"0.70599407",
"0.7010549",
"0.68956107",
"0.68956107",
"0.6836819",
"0.68103147",
"0.6733797",
"0.67332226",
"0.67332226",
"0.67332226",
"0.67332226",
"0.671... | 0.705218 | 11 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.