query stringlengths 9 9.05k | document stringlengths 10 222k | metadata dict | negatives listlengths 30 30 | negative_scores listlengths 30 30 | document_score stringlengths 4 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|
r"""Write the unique file and set its expiration time. | def _create_unique_file(self):
with open(self.uniquefile, 'w') as f:
f.write(self._uniquename)
self._uniquefile_created = True
self._extend_expiration_time()
self._p("Unique file created: %s" % self.uniquefile) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _extend_expiration_time(self, fname=None):\n if fname is None:\n fname = self.uniquefile\n future = datetime.now() + timedelta(seconds=self._lockduration)\n expires = time.mktime(future.timetuple())\n try:\n os.utime(fname, (expires, expires))\n except O... | [
"0.72610414",
"0.68992674",
"0.6856063",
"0.6721935",
"0.66598505",
"0.6431056",
"0.63633096",
"0.63134557",
"0.63002986",
"0.6250963",
"0.6236199",
"0.6217794",
"0.6212961",
"0.61899656",
"0.61899656",
"0.61498624",
"0.6145532",
"0.6142775",
"0.61408013",
"0.60953844",
"0.60... | 0.81122357 | 0 |
r"""Remove our unique file. This does nothing if there is no unique file. | def _remove_unique_file(self):
if self._uniquefile_created:
self._unlink(self.uniquefile)
self._uniquefile_created = False
self._p("Unique file deleted: %s" % self.uniquefile) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_file(self):\n if self.file_exists:\n os.remove(self.file_name)",
"def _removeFile(self, filename):\n try:\n #delete the output file\n os.remove(filename)\n except:\n #print (\"Failed to remove the file: \" + filename)\n pass",... | [
"0.7810154",
"0.7718788",
"0.76868576",
"0.7424278",
"0.7419311",
"0.73791516",
"0.72226",
"0.72049177",
"0.71626276",
"0.71499735",
"0.7092554",
"0.7078358",
"0.7047029",
"0.7025868",
"0.7025486",
"0.7008726",
"0.6991556",
"0.69750524",
"0.69455105",
"0.69396055",
"0.6937861... | 0.9151462 | 0 |
fill the data storage with the temp infoToPlot dictionnary then this temp dict is reset | def updateDataStorage(infoToPlot, directory):
dataStored=pickle.load(open(os.path.join(directory,'data.pkl'), 'rb'))
for key, value in dataStored.items():
value += infoToPlot[key]
infoToPlot[key]=[]
with open(os.path.join(directory,'data.pkl'), 'wb') as ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def reinitialiseData(self):\n if self.arrayPlotData is not None:\n self.currentPosition = 0\n self.xs = scipy.linspace(0.0, self.numberOfPoints*self.resolution, self.numberOfPoints)\n self.cursorXS = self.getCurrentPositionArray()\n self.cursorVertical = scipy.arr... | [
"0.6713211",
"0.6237609",
"0.6150051",
"0.61299485",
"0.60662746",
"0.60503095",
"0.6024916",
"0.6021965",
"0.5957284",
"0.5943105",
"0.58467066",
"0.5824629",
"0.5791654",
"0.5787501",
"0.574162",
"0.5740276",
"0.57383317",
"0.5727382",
"0.5720964",
"0.5709848",
"0.57095766"... | 0.7121907 | 0 |
An alias to anonymous_session. | def backend(anonymous_session):
return anonymous_session | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_anonymous_session(self):\r\n incookie = Cookie()\r\n incookie['trac_session'] = '123456'\r\n outcookie = Cookie()\r\n req = Mock(authname='anonymous', base_path='/', incookie=incookie,\r\n outcookie=outcookie)\r\n session = Session(self.env, req)\r\n ... | [
"0.69029796",
"0.66122967",
"0.65472907",
"0.6543792",
"0.6471124",
"0.64338195",
"0.6430179",
"0.6400435",
"0.6327718",
"0.62775767",
"0.60546386",
"0.6032422",
"0.59770226",
"0.59715074",
"0.5968541",
"0.5952792",
"0.5952479",
"0.5952204",
"0.5952042",
"0.59350955",
"0.5899... | 0.75155413 | 0 |
Takes a time series of asset returns. returns a DataFrame with columns for the wealth index, the previous peaks, and the percentage drawdown | def drawdown(return_series: pd.Series):
wealth_index = 1000*(1+return_series).cumprod()
previous_peaks = wealth_index.cummax()
drawdowns = (wealth_index - previous_peaks)/previous_peaks
return pd.DataFrame({"Wealth": wealth_index,
"Previous Peak": previous_peaks,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def drawdown(return_series: pd.Series):\n wealth_index = 1000*(1+return_series).cumprod() \n previous_peaks = wealth_index.cummax()\n drawdowns = (wealth_index - previous_peaks)/previous_peaks\n return pd.DataFrame({\"Wealth\": wealth_index, \n \"Previous Peak\": previous_peak... | [
"0.7216001",
"0.63316643",
"0.6270961",
"0.62595856",
"0.62341356",
"0.61768454",
"0.6169445",
"0.6086531",
"0.60364294",
"0.59963995",
"0.59941506",
"0.5990006",
"0.59547114",
"0.5952227",
"0.59098244",
"0.5900905",
"0.5836894",
"0.58296055",
"0.5816552",
"0.57961285",
"0.57... | 0.7140393 | 1 |
Applies the JarqueBera test to determine if a Series is normal or not Test is applied at the 1% level by default Returns True if the hypothesis of normality is accepted, False otherwise | def is_normal(r, level=0.01):
if isinstance(r, pd.DataFrame):
return r.aggregate(is_normal)
else:
statistic, p_value = scipy.stats.jarque_bera(r)
return p_value > level | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def check_normality(serie: List[float], alpha: int = 0.05) -> bool:\n stat, p = stats.shapiro(serie)\n print('Statistics=%.3f, p=%.3f' % (stat, p))\n\n if p > alpha:\n return True\n else:\n return False",
"def check_normality(df, features_to_analyse, p_value_threshold=0.05):\n \n ... | [
"0.6848478",
"0.6218248",
"0.6198352",
"0.61141384",
"0.5947175",
"0.579839",
"0.5755594",
"0.5753945",
"0.5747413",
"0.5737452",
"0.5705873",
"0.5685593",
"0.563477",
"0.55635846",
"0.553747",
"0.55317634",
"0.5524484",
"0.5524484",
"0.5524484",
"0.55031145",
"0.54755527",
... | 0.6558547 | 1 |
Returns the semideviation aka negative semideviation of r r must be a Series or a DataFrame | def semideviation(r):
is_negative = r < 0
return r[is_negative].std(ddof=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def semideviation(r):\n if isinstance(r, pd.Series):\n is_negative = r < 0\n return r[is_negative].std(ddof=0)\n elif isinstance(r, pd.DataFrame):\n return r.aggregate(semideviation)\n else:\n raise TypeError(\"Expected r to be a Series or DataFrame\")",
"def sd(vals):",
"d... | [
"0.89850384",
"0.5900426",
"0.57141435",
"0.56849366",
"0.5584214",
"0.5562805",
"0.5539477",
"0.54577833",
"0.5434664",
"0.5345503",
"0.5342989",
"0.53036183",
"0.5259895",
"0.52358663",
"0.5230201",
"0.5223249",
"0.52223957",
"0.5218931",
"0.5207287",
"0.5202162",
"0.520040... | 0.8685903 | 1 |
Returns the historic Value at Risk at a specified level i.e. returns the number such that "level" percent of the returns fall below that number, and the (100level) percent are above | def var_historic(r, level=5):
if isinstance(r, pd.DataFrame):
return r.aggregate(var_historic, level=level)
elif isinstance(r, pd.Series):
return -np.percentile(r, level)
else:
raise TypeError("Expected r to be a Series or DataFrame") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def get_rob_percentage(level):\n chance = int(6 + (level // 10)) # first 10 levels is 6 for 30% chance\n if chance > 16:\n chance = 16\n return chance",
"def var_down(self, level: float = 0.95, interpolation: str = 'lower') -> float:\n return float(self.tsdf.pct_chan... | [
"0.63155645",
"0.6244382",
"0.617673",
"0.6159459",
"0.6044839",
"0.6007634",
"0.5996861",
"0.59391034",
"0.5881631",
"0.5848179",
"0.58203423",
"0.58049905",
"0.5801862",
"0.58013344",
"0.57730204",
"0.5765701",
"0.5757469",
"0.5743746",
"0.5741191",
"0.573095",
"0.57265943"... | 0.65336573 | 0 |
Annualizes a set of returns We should infer the periods per year but that is currently left as an exercise | def annualize_rets(r, periods_per_year):
compounded_growth = (1+r).prod()
n_periods = r.shape[0]
return compounded_growth**(periods_per_year/n_periods)-1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def annual_return(returns, period=DAILY):\n\n if returns.size < 1:\n return np.nan\n\n try:\n ann_factor = ANNUALIZATION_FACTORS[period]\n except KeyError:\n raise ValueError(\n \"period cannot be '{}'. \"\n \"Must be '{}', '{}', or '{}'\".format(\n ... | [
"0.752036",
"0.71679616",
"0.64085275",
"0.63870174",
"0.63626695",
"0.6295504",
"0.62223697",
"0.62055266",
"0.6145131",
"0.6104018",
"0.58891404",
"0.586231",
"0.58114725",
"0.5797071",
"0.5769871",
"0.5763865",
"0.5750108",
"0.57492626",
"0.5741141",
"0.5724884",
"0.572163... | 0.7276214 | 1 |
Returns the semideviation aka negative semideviation of r r must be a Series or a DataFrame, else raises a TypeError | def semideviation(r):
if isinstance(r, pd.Series):
is_negative = r < 0
return r[is_negative].std(ddof=0)
elif isinstance(r, pd.DataFrame):
return r.aggregate(semideviation)
else:
raise TypeError("Expected r to be a Series or DataFrame") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def semideviation(r):\n is_negative = r < 0\n return r[is_negative].std(ddof=0)",
"def sd(vals):",
"def stdev(items):\n return Series.std(Series(items))",
"def stdev(headers, data):\n\tcolumn_matrix=data.get_data(headers)\n\tmean_values=column_matrix.std(0)\n\tstd_values=mean_values.tolist()\n\tretu... | [
"0.83797586",
"0.5809408",
"0.56568074",
"0.5603492",
"0.5557205",
"0.553498",
"0.5436987",
"0.543003",
"0.5253456",
"0.5253456",
"0.5251819",
"0.5250491",
"0.52474827",
"0.52417284",
"0.51809496",
"0.51802534",
"0.51672405",
"0.51643175",
"0.51613146",
"0.51202655",
"0.51061... | 0.8854838 | 0 |
Write out a PSLG to the gmsh .geo format | def write(geo_file, Xs, successors, dx = 1.0e+22, quad = False):
num_segments = len(Xs)
geo_file.write("cl = {0};\n".format(dx))
# Write out the PSLG points
point_count = 1
for X in Xs:
for x in X:
geo_file.write("Point({0}) = {{{1}, {2}, 0.0, cl}};\n"
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __make_geo(self):\n # gmsh freecad_part.iges -o out_iges.geo -0\n fname_list = self.__fname.split('.')\n geo_file = fname_list[0]+'.geo'\n runstr = \"%s %s -o %s -0\" % (environment.GMSH, self.__fname, geo_file)\n print(runstr)\n subprocess.call(runstr, shell=True)\n ... | [
"0.6809564",
"0.63191086",
"0.6190837",
"0.6166094",
"0.61292666",
"0.6057306",
"0.60454774",
"0.5939456",
"0.5878704",
"0.58619833",
"0.58486533",
"0.5783641",
"0.57608074",
"0.5760204",
"0.56466216",
"0.5642355",
"0.5626492",
"0.5626492",
"0.5611744",
"0.56035984",
"0.55623... | 0.6334651 | 1 |
Completely reset connection etc with option of changing add_checks setting. | def reset_default_dd(tbl=None, add_checks=False):
debug = False
dd = mg.DATADETS_OBJ
if debug:
print(f'Resetting connection to default db. Add_checks: {add_checks}')
try:
dd.cur.close()
dd.con.close()
dd.set_dbe(dbe=mg.DBE_SQLITE, db=mg.SOFA_DB, tbl=tbl,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def reset(self):\n self.reconnect()",
"def test_downgrade_control(self, ping_fixture_all_errs_disconnect):\n\n engine = ping_fixture_all_errs_disconnect\n\n conn = engine.connect()\n conn.close()",
"def reconnect(self):\n self.test_cmd()\n if not self.check_network: \n... | [
"0.63392967",
"0.60663706",
"0.6066115",
"0.5912769",
"0.58700216",
"0.5865079",
"0.58076525",
"0.57780486",
"0.5770943",
"0.57557386",
"0.57451385",
"0.5741941",
"0.573313",
"0.57314634",
"0.57213545",
"0.5685949",
"0.5685949",
"0.5669522",
"0.5669522",
"0.5667413",
"0.56614... | 0.6273605 | 1 |
Make table for purpose of forcing all data into strict type fields. Not necessary to check sofa_id field (autoincremented integer) so not included. Will be dropped when making redesigned table. If not, will not be possible to interact with database using tools like SQLite Database Browser. Make table with all the field... | def make_strict_typing_tbl(orig_tblname, oth_name_types, fld_settings):
debug = False
dd = mg.DATADETS_OBJ
if debug: print(f'DBE in make_strict_typing_tbl is: {dd.dbe}')
reset_default_dd(tbl=orig_tblname, add_checks=True) ## Can't deactivate the
## user-defined functions until the tmp table has bee... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def modify_tbl(self):\n debug = False\n dd = mg.DATADETS_OBJ\n orig_tblname = dd.tbl\n ## other (i.e. not the sofa_id) field details\n oth_name_types = getdata.get_oth_name_types(self.settings_data)\n if debug:\n print('oth_name_types to feed into '\n ... | [
"0.65089726",
"0.61502856",
"0.60279477",
"0.57969284",
"0.56662536",
"0.5624425",
"0.5602141",
"0.5584182",
"0.5539883",
"0.5532411",
"0.5505209",
"0.55041903",
"0.5501611",
"0.5487113",
"0.5467622",
"0.5462603",
"0.5439746",
"0.5420184",
"0.5413735",
"0.5407795",
"0.5343261... | 0.6664717 | 0 |
Make new table with all the fields from the tmp table (which doesn't have the sofa_id field) plus the sofa_id field. Don't want new table to have any constraints which rely on userdefined functions. | def make_redesigned_tbl(final_name, oth_name_types):
debug = False
dd = mg.DATADETS_OBJ
if debug: print(f'DBE in make_redesigned_tbl is: {dd.dbe}')
tmp_name = getdata.tblname_qtr(mg.DBE_SQLITE, mg.STRICT_TMP_TBL)
unquoted_final_name = final_name
final_name = getdata.tblname_qtr(mg.DBE_SQLITE, fi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def make_new_tbl(self):\n debug = False\n default_dd = getdata.get_default_db_dets()\n con, cur = default_dd.con, default_dd.cur\n oth_name_types = getdata.get_oth_name_types(self.settings_data)\n tblname = self.tblname_lst[0]\n if debug: print(f'DBE in make_new_tbl is: {d... | [
"0.62291384",
"0.60869086",
"0.6062933",
"0.60330915",
"0.59747726",
"0.5972121",
"0.5912538",
"0.59111637",
"0.5890867",
"0.58891773",
"0.58161986",
"0.57992613",
"0.57517534",
"0.5737276",
"0.57315296",
"0.57198197",
"0.567829",
"0.56746024",
"0.56715417",
"0.5659699",
"0.5... | 0.6127104 | 1 |
Overrides DlgSettingsEntry (only part where different is if pos == 0. Returns bolinserted, row inserted before (or None if no insertion), and row data (or None if no content added). | def insert_before(self):
selected_rows = self.tabentry.grid.GetSelectedRows()
if not selected_rows:
wx.MessageBox(
_('Please select a row first (click to the left of the row)'))
return False, None, None
pos = selected_rows[0]
if pos == 0: ## for t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def on_insert(self, event):\n bolinserted, row_before, (fldname, fldtype) = self.insert_before()\n if bolinserted:\n ## should be only change\n self.add_new_to_settings(row_before, fldname, fldtype)\n self.update_demo()\n self.tabentry.grid.SetFocus()\n ... | [
"0.6758664",
"0.5383182",
"0.5374721",
"0.53313696",
"0.50513107",
"0.50366515",
"0.502984",
"0.5013485",
"0.49981856",
"0.4948921",
"0.48207667",
"0.48027417",
"0.47860882",
"0.47579557",
"0.47436914",
"0.47220808",
"0.47149417",
"0.47026104",
"0.46901616",
"0.46734053",
"0.... | 0.6437764 | 1 |
Insert before. Overridden so we can update settings_data with details of new row. Also need overridden insert_before(). | def on_insert(self, event):
bolinserted, row_before, (fldname, fldtype) = self.insert_before()
if bolinserted:
## should be only change
self.add_new_to_settings(row_before, fldname, fldtype)
self.update_demo()
self.tabentry.grid.SetFocus()
event.Skip() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def before_insert(self, obj, st):\n pass",
"def insert_values():\n pass",
"def insert_data(self):\n\n pass",
"def before_save(self):",
"def _before_execute(self, db):\n pass",
"def _before_execute(self, db, entity):\n pass",
"def _before_execute(self, db, entity):\n ... | [
"0.6405711",
"0.6077982",
"0.58581924",
"0.5611453",
"0.5586339",
"0.55335873",
"0.55335873",
"0.5522538",
"0.5497819",
"0.54562765",
"0.5415603",
"0.5400512",
"0.5395165",
"0.5389751",
"0.5368422",
"0.5309783",
"0.52325165",
"0.5215696",
"0.52081174",
"0.51858336",
"0.518583... | 0.67992985 | 0 |
Make temp table, with strict type enforcement for all fields. Copy across all fields which remain in the original table (possibly with new names and data types) plus add in all the new fields. NB SOFA_ID must be autoincrement. If any conversion errors (e.g. trying to change a field which currently contains "fred" to a ... | def modify_tbl(self):
debug = False
dd = mg.DATADETS_OBJ
orig_tblname = dd.tbl
## other (i.e. not the sofa_id) field details
oth_name_types = getdata.get_oth_name_types(self.settings_data)
if debug:
print('oth_name_types to feed into '
f'make_s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _remake_table(self, table_name, renames={}, deleted=[], altered={}):\r\n # Dry runs get skipped completely\r\n if self.dry_run:\r\n return\r\n # Temporary table's name\r\n temp_name = \"_south_new_\" + table_name\r\n # Work out the (possibly new) definitions of eac... | [
"0.65315115",
"0.6459277",
"0.6415187",
"0.6174924",
"0.6129984",
"0.6050567",
"0.58508044",
"0.57769376",
"0.56626314",
"0.5647704",
"0.55380005",
"0.55321765",
"0.55262",
"0.5476024",
"0.54614425",
"0.54584974",
"0.54124516",
"0.54008555",
"0.539628",
"0.5388114",
"0.535783... | 0.6734855 | 0 |
NB never doing this to a readonly table. So always sofa_id, any other rows, then a new row. Called by recode because it is the only thing which changes the underlying data table prior to Update. Need to wipe all rows in the middle then insert fresh ones. Also need to update any state information the grid relies on. NB ... | def refresh_dlg(self):
dd = mg.DATADETS_OBJ
self.tabentry.any_editor_shown = False
self.tabentry.new_editor_shown = False
## Delete all rows after the first one (sofa_id) and before the new one
rows2del = self.tabentry.rows_n-2 ## less 1st and last
self.tabentry.grid.Del... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def refillCodeTable(self):\n\n tableSQL = \"\"\n sortDirection = self.pushButton_sortDirection.text()\n sortField = self.pushButton_sort.text()\n if sortDirection == \"Ascending\":\n if sortField == \"Sorted by code\":\n tableSQL = self.orderByCodeAscendSQL\n ... | [
"0.59221125",
"0.57956374",
"0.5754972",
"0.57499796",
"0.57398856",
"0.57181275",
"0.5703807",
"0.5630436",
"0.5623562",
"0.5618891",
"0.55920696",
"0.5556167",
"0.5493932",
"0.54799676",
"0.5473257",
"0.546268",
"0.5455448",
"0.545428",
"0.54493517",
"0.5443698",
"0.5440758... | 0.6149503 | 0 |
Update settings_data. Overridden so we can include original field details (needed when making new version of the original table). Fill in details of fldnames and fldtypes (leaving original versions untouched). NB do not clear it only modify. | def update_settings_data(self):
debug = False
grid_data = self.get_grid_data() ## only saved data. eol-safe inc
if debug:
print(f'grid data: {grid_data}')
print('Original settings data:')
pprint.pprint(self.settings_data)
for i, row in enumerate(grid... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _update(self, data: Dict[str, Any], fields_to_modify: List[str]):\n pass",
"def updateData(self,d):\n for f in self.fields:\n n = f.name()\n if n in d:\n f.setValue(d[n])",
"def _pd_update(pd, fields):\n pd.name = fields['name']\n pd.price = fields['... | [
"0.63273513",
"0.6323974",
"0.59970886",
"0.5945463",
"0.5900473",
"0.58765537",
"0.5871527",
"0.58258766",
"0.57310426",
"0.5678252",
"0.567463",
"0.56481576",
"0.56476474",
"0.5645932",
"0.5610677",
"0.56056607",
"0.5597866",
"0.5573039",
"0.5509385",
"0.549467",
"0.5479973... | 0.7996499 | 0 |
Overridden so we can update settings data. Delete row if a row selected and not the data entry row and put focus on new line. Return row idx deleted (or None if deletion did not occur). If it is assumed there was a row deletion attempt (e.g. clicked a delete button), then warn if no selection. If no such assumption, si... | def try_to_delete_row(self, *, assume_row_deletion_attempt=True):
debug = False
selected_rows = self.grid.GetSelectedRows()
sel_rows_n = len(selected_rows)
if sel_rows_n == 1:
row = selected_rows[0]
ok_to_delete, msg = self.ok_to_delete_row(row)
if ok_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def del_row(self, row_index):\n ...",
"def ok_to_delete_row(self, row):\n if self.is_new_row(row):\n return False, _('Unable to delete new row')\n elif row == 0:\n return False, _('Unable to delete sofa id row')\n elif self.new_is_dirty:\n return (Fals... | [
"0.6486736",
"0.6372623",
"0.6303715",
"0.6265424",
"0.6262239",
"0.61613274",
"0.606087",
"0.59785265",
"0.5827982",
"0.5803205",
"0.578936",
"0.57182044",
"0.5714173",
"0.57112676",
"0.56826293",
"0.56315863",
"0.5619918",
"0.5613179",
"0.5607574",
"0.5592045",
"0.55701697"... | 0.74219555 | 0 |
Overridden settings_grid.SettingsEntry to handle row == 0. Should be the same otherwise. Can delete any row except the new row or the SOFA_ID row Returns boolean and msg. | def ok_to_delete_row(self, row):
if self.is_new_row(row):
return False, _('Unable to delete new row')
elif row == 0:
return False, _('Unable to delete sofa id row')
elif self.new_is_dirty:
return (False, _(
'Cannot delete a row while in the mid... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DeleteRow(self, entry):\n for a_link in entry.link:\n if a_link.rel == 'edit':\n return self.Delete(a_link.href)",
"def try_to_delete_row(self, *, assume_row_deletion_attempt=True):\n debug = False\n selected_rows = self.grid.GetSelectedRows()\n sel_rows_n = len(selected_r... | [
"0.60603714",
"0.5878417",
"0.5780179",
"0.5642594",
"0.55486715",
"0.5465266",
"0.53800404",
"0.53740156",
"0.52641726",
"0.5228856",
"0.522045",
"0.52007896",
"0.51948535",
"0.51729447",
"0.515428",
"0.51461536",
"0.5142117",
"0.51297784",
"0.51244605",
"0.5119819",
"0.5076... | 0.68943965 | 0 |
Handles invalid parameters by sending an error response message. If is given, an invalid parameter message is thrown to the response if the first value is null. | def handle_invalid_parameter(message_id, *format, status = HttpStatus.BAD_REQUEST, var = (None, None)):
if (var[1] and var[0] is None):
return handle_invalid_parameter("invalid_value", var[1])
message = MSG[message_id].copy()
message["message"] = message["message"].format(*format)
return json_response(message, s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def handle_invalid_arguments(e):\n errors = e.message\n return generic_errors(errors, code=400)",
"def testInvalidParams(self):\n h = self.getHandler()\n rq = '''{\"jsonrpc\":\"2.0\", \"method\":\"myMethod\", \"params\":{\"foo\": 1}, \"id\":\"1\"}'''\n messages, dummy = h.parse_body(r... | [
"0.73719245",
"0.7010306",
"0.65496576",
"0.6477244",
"0.6454987",
"0.6198542",
"0.61437005",
"0.61073947",
"0.6094389",
"0.60882246",
"0.6085357",
"0.60809433",
"0.60703105",
"0.6047659",
"0.6020231",
"0.601528",
"0.60148275",
"0.60088027",
"0.6005154",
"0.5979936",
"0.59714... | 0.7553537 | 0 |
Get the logger object to use for the given request. This will return a metlog client if one is attached to the request, or the default mozsvc.logger object if not. | def get_logger(request):
logger = request.registry.get("metlog")
if logger is None:
logger = mozsvc.logger
return logger | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_logger(request, name=\"ot_api\"):\n\n# package_dir = os.path.dirname(module_path)\n# config_filepath = os.path.join(package_dir, _LOGGING_CONFIG_FILE)\n# if os.path.exists(config_filepath):\n# try:\n# logging.config.fileConfig(config_filepath)\n# logger_set = Tru... | [
"0.72889143",
"0.72139025",
"0.69400764",
"0.6916262",
"0.69003975",
"0.69003975",
"0.68444616",
"0.68194795",
"0.6752453",
"0.66858727",
"0.6684813",
"0.66831",
"0.66427344",
"0.6641007",
"0.65920496",
"0.65474594",
"0.65191245",
"0.6487068",
"0.6457153",
"0.6447687",
"0.643... | 0.8333438 | 0 |
Include all the mozsvc tweens into the given config. | def includeme(config):
config.add_tween("mozsvc.tweens.catch_backend_errors")
config.add_tween("mozsvc.tweens.log_uncaught_exceptions") | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def configure_servo(self, config):\n raise NotImplementedError",
"def includeme(config):\n\n import patches\n config.add_translation_dirs('kotti_multilingual:locale')\n config.scan(__name__)",
"def includeme(config):\n config.add_renderer('.pt', chameleon_zpt.renderer_factory)\n config.ad... | [
"0.48319155",
"0.48256204",
"0.45899606",
"0.45277813",
"0.44048566",
"0.43969068",
"0.4375405",
"0.43358803",
"0.43244645",
"0.43210527",
"0.43206128",
"0.43197834",
"0.4318335",
"0.43065584",
"0.42953426",
"0.42766753",
"0.42567566",
"0.4223261",
"0.4207915",
"0.42035246",
... | 0.699517 | 0 |
Get list of the anchor type of this ROI. | def get_anchor_types(self) -> list:
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def anchors(self, img_shape, dtype=np.float32):\n return np_methods.ssd_anchors_all_layers(img_shape,\n self.params.feat_shapes,\n self.params.anchor_sizes,\n self.... | [
"0.54489857",
"0.5403509",
"0.53291756",
"0.52677",
"0.51799333",
"0.5166266",
"0.5113226",
"0.5010574",
"0.5008601",
"0.5000063",
"0.49909994",
"0.4981683",
"0.49683177",
"0.49520794",
"0.4948051",
"0.49184918",
"0.4917824",
"0.49065742",
"0.49049073",
"0.49041995",
"0.48933... | 0.81732917 | 0 |
Adjust the anchor positions, after the ROI been adjusted | def adjust_anchors(self):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def adjust_regular_roi_anchors(bounds: QRectF, anchors: list):\n for point in anchors:\n off = point.boundingRect().width() / 2\n if point.position == AnchorPosition.LEFT:\n point.setPos(bounds.left() - off, bounds.top() - off + bounds.height() / 2)\n elif poi... | [
"0.7389667",
"0.6516156",
"0.6466548",
"0.6424758",
"0.6160238",
"0.61336476",
"0.61264026",
"0.6092763",
"0.60431415",
"0.5953654",
"0.58635384",
"0.58550304",
"0.5829689",
"0.58073705",
"0.57646567",
"0.57266635",
"0.5723643",
"0.5719605",
"0.56978005",
"0.56934476",
"0.568... | 0.7242288 | 1 |
Get the new bounding rectangle of a "regular" ROI (rectangle or ellipse) after dragging of anchor. | def adjust_regular_roi_bounds(rect: QRectF, point: Anchor, mouse: QPointF) -> QRectF:
if point.position == AnchorPosition.LEFT:
rect.setLeft(rect.left() + mouse.x())
elif point.position == AnchorPosition.RIGHT:
rect.setRight(rect.right() + mouse.x())
elif point.position =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def boundingRect(self):\n return self.rect().adjusted(-2, -2, 2, 2)",
"def boundingRect(self) -> QRectF:\n return self._rect.adjusted(-10, -10, 10, 10)",
"def boundingRect(self):\n return QRectF()",
"def boundingBox(self):\n minx, miny, maxx, maxy = self.substrates.bounds\n ... | [
"0.6759467",
"0.6707964",
"0.6560251",
"0.645286",
"0.64235216",
"0.6415446",
"0.6411955",
"0.6386242",
"0.6356327",
"0.63337076",
"0.6287166",
"0.6286322",
"0.6267331",
"0.62381583",
"0.62291557",
"0.6220517",
"0.6203727",
"0.61901045",
"0.61753637",
"0.6169744",
"0.61542696... | 0.69692385 | 0 |
Adjust the anchors of a "regular" ROI (rectangle or ellipse) | def adjust_regular_roi_anchors(bounds: QRectF, anchors: list):
for point in anchors:
off = point.boundingRect().width() / 2
if point.position == AnchorPosition.LEFT:
point.setPos(bounds.left() - off, bounds.top() - off + bounds.height() / 2)
elif point.positio... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def adjust_regular_roi_bounds(rect: QRectF, point: Anchor, mouse: QPointF) -> QRectF:\n if point.position == AnchorPosition.LEFT:\n rect.setLeft(rect.left() + mouse.x())\n elif point.position == AnchorPosition.RIGHT:\n rect.setRight(rect.right() + mouse.x())\n elif point.... | [
"0.62086093",
"0.6040805",
"0.60360974",
"0.60017514",
"0.58550143",
"0.5803145",
"0.5786532",
"0.57516414",
"0.5740155",
"0.57376313",
"0.5712276",
"0.5705384",
"0.5699666",
"0.56905603",
"0.5674647",
"0.5641098",
"0.5639329",
"0.5586444",
"0.5561428",
"0.55551654",
"0.55465... | 0.73049575 | 0 |
Given a possiblymultiline string representing an SSE message, parses it and returns an Event object. | def parse(cls, raw):
event = cls()
for line in raw.split('\n'):
match = cls.sse_line_pattern.match(line)
if match is None:
# Malformed line. Discard but warn.
warnings.warn('Invalid SSE line: "%s"' % line, SyntaxWarning)
continue
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def from_text(cls, text):\n raw = json.loads(text)\n event_msg = EventMessage.from_text(raw[\"event_message\"])\n msg = cls(\n uri_name=raw[\"uri_name\"],\n event_message=event_msg,\n publisher_connection_id=raw[\"publisher_connection_id\"]\n )\n ... | [
"0.64222634",
"0.6332646",
"0.621246",
"0.6205327",
"0.6104797",
"0.60060436",
"0.60059327",
"0.59509456",
"0.59425557",
"0.5838584",
"0.5825402",
"0.5786546",
"0.5757215",
"0.57030165",
"0.56334716",
"0.5631579",
"0.5606366",
"0.56038886",
"0.55945957",
"0.55473024",
"0.5540... | 0.8113382 | 0 |
Rank unlabeled training data using a model by uncertainty | def rank_unlabeled_train(model, data, indices, uncertainty_output):
model.eval()
limit = 30000
# TODO: batch here as well, memory constraint
pred = model(data[:limit], train=False)
entropy_list = Categorical(probs=pred).entropy().cpu().detach().numpy()
entropy_idx_combined = [(entropy_list[idx],... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rank_local(model, number_of_core_samples, step_size, name, threshold, output_path, top_k_to_plot):\n feature_vectors = pd.DataFrame(np.load('{}/feature_vectors_{}_{}_{}.npy'.format(output_path, number_of_core_samples, step_size, name)), index = np.arange(number_of_core_samples), columns=pd.MultiIndex.from_pro... | [
"0.62356776",
"0.5977295",
"0.595167",
"0.5865637",
"0.58462566",
"0.5793468",
"0.57673544",
"0.57632655",
"0.5760039",
"0.5742109",
"0.5719346",
"0.5715356",
"0.57101023",
"0.5708902",
"0.5678232",
"0.5670726",
"0.5660132",
"0.5658501",
"0.56150836",
"0.56074023",
"0.5603381... | 0.72460514 | 0 |
Uses MNE's Watershed algorithm to create Boundary Element Meshes (BEM) for a subject's brain, inner/outer skull, and skin. The surfaces are returned in the desired (by default, stereolithic .stl) format. Example >>> from nipype.workflows.smri.freesurfer import create_bem_flow >>> bemflow = create_bem_flow() >>> bemflow... | def create_bem_flow(name='bem', out_format='stl'):
"""
Initialize the workflow
"""
bemflow = pe.Workflow(name=name)
"""
Define the inputs to the workflow.
"""
inputnode = pe.Node(
niu.IdentityInterface(fields=['subject_id', 'subjects_dir']),
name='inputspec')
"""
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def make_bem_model(subject, ico=4, conductivity=(0.3, 0.006, 0.3),\n subjects_dir=None, verbose=None, bem_sub_path='bem'):\n import os.path as op\n from mne.io.constants import FIFF\n conductivity = np.array(conductivity, float)\n if conductivity.ndim != 1 or conductivity.size not in ... | [
"0.7241491",
"0.6157275",
"0.53613",
"0.535468",
"0.5310727",
"0.5279122",
"0.52609676",
"0.5232189",
"0.5213941",
"0.5177347",
"0.51251423",
"0.5099162",
"0.5099116",
"0.5077441",
"0.5056775",
"0.50340205",
"0.5029734",
"0.5003027",
"0.4967865",
"0.49579364",
"0.49578834",
... | 0.7251704 | 0 |
The correct number of items were loaded. | def test_item_count(self):
self.assertEqual(len(self.items), 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_num_items(self):\r\n return self.num_items",
"def items_num(self):\n\t\treturn len(self.items)",
"def items_num(self):\n\t\treturn len(self.items)",
"def items_num(self):\n return len(self.items)",
"def __len__(self):\n return self._number_of_items",
"def get_number_of_extra_... | [
"0.68374467",
"0.678528",
"0.678528",
"0.6668574",
"0.6633862",
"0.6569462",
"0.6558787",
"0.6524269",
"0.6490867",
"0.6474322",
"0.6411422",
"0.6399082",
"0.6399082",
"0.6399082",
"0.6399082",
"0.6392761",
"0.63794136",
"0.63794136",
"0.6356633",
"0.6355921",
"0.6347893",
... | 0.6899578 | 0 |
Media items have the correct types for each field. | def test_types(self):
field_types = (
('clip_id', int), ('created_at', datetime.datetime),
('description', str), ('filename', str),
('format', smscsv.MediaFormat), ('media_id', int), ('title', str)
)
for item in self.items:
for name, type_ in field... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_add_media_type(self):\n\n # check if documentalist has access to create new media-types\n self.login_documentalist()\n response = self.client.get('/multimedia/media-type/new' )\n\n # 403 = unauthorized\n self.assertEqual(response.status_code, 403)\n\n self.client.... | [
"0.61224717",
"0.6091328",
"0.60497344",
"0.60497344",
"0.6023085",
"0.59959733",
"0.59133106",
"0.5871546",
"0.58361286",
"0.58334",
"0.5817889",
"0.5817889",
"0.5817889",
"0.5817889",
"0.5808526",
"0.58047616",
"0.5751636",
"0.56931716",
"0.56752896",
"0.56695426",
"0.56489... | 0.6879165 | 0 |
Notifies the user of the availability of a certain section via email. | def notify_of_availability(
section, src_email: str, src_pass: str, dest_email: str
) -> None:
send_email(
src_email,
src_pass,
dest_email,
f"{section['courseReferenceNumber']} OPENED.",
f"{section['subjectCourse']} {section['sequenceNumber']} - CRN: {section['courseRefer... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _assert_escalation_email_available(self, available):\n func = self.assertIn if available else self.assertNotIn\n response = self.client.get(self.url)\n func('escalation-email-container', response.content.decode('utf-8'))",
"def navigate_to_email_view(self):\r\n # Pull up email vie... | [
"0.6256319",
"0.6199509",
"0.5774364",
"0.5596316",
"0.5553114",
"0.54766625",
"0.54055995",
"0.5373709",
"0.53318876",
"0.53133625",
"0.52870256",
"0.5276617",
"0.5259266",
"0.52537084",
"0.5239808",
"0.5234509",
"0.51957613",
"0.5195293",
"0.5192908",
"0.518366",
"0.5159712... | 0.7465751 | 0 |
[Merges team and fixtures onto fpl. Slightly processes data.] | def merge_fixtures(fpl_path, understat_path, data_path):
understat = pd.read_csv(understat_path + 'all_understat_players.csv')
understat['date']=pd.to_datetime(understat['date']).dt.date
fixtures = pd.read_csv(data_path + 'fixtures.csv')
fixtures = fixtures[['id', 'team_a', 'team_a_difficult... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_and_process_fixtures_data(self) -> Tuple[pd.DataFrame, pd.DataFrame, pd.DataFrame]:\n df = self._dbmanager.query_fixtures_data(self._seasons)\n if df.empty:\n raise ValueError(\"Empty fixtures dataframe.\")\n\n df = self._drop_last_season_championship_matches(df)\n\n ... | [
"0.6685395",
"0.620776",
"0.6136468",
"0.6113061",
"0.60033566",
"0.5753455",
"0.57092994",
"0.56114787",
"0.55894804",
"0.5580858",
"0.55656916",
"0.5563736",
"0.5544181",
"0.55126184",
"0.5510066",
"0.54706734",
"0.5453919",
"0.5452854",
"0.5441177",
"0.54267997",
"0.540208... | 0.74680406 | 0 |
[This function finds the intersection between two player name columns] | def intersect(a, b):
# print(len(list(set(a) & set(b))), 'unique and matching names between FPL and Understat')
return list(set(a) & set(b)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def exact_matches(understat, fpl, join = 'inner'): \n matching_names = intersect(understat['player_name'].unique(), fpl['player_name'].unique())\n fpl_matched = fpl[fpl['player_name'].isin(matching_names)]\n understat_matched = understat[understat['player_name'].isin(matching_names)]\n exact_merge =... | [
"0.61571294",
"0.5984249",
"0.5862277",
"0.57274884",
"0.56624657",
"0.563381",
"0.5630245",
"0.5613607",
"0.5591306",
"0.5582181",
"0.5557226",
"0.5550933",
"0.5512701",
"0.5490478",
"0.54730517",
"0.5426492",
"0.5389028",
"0.5259575",
"0.52207637",
"0.5204655",
"0.51939505"... | 0.66997784 | 0 |
[This function checks for similarity between understat and fpl names, and returns a dataframe with all the unique understat names with the most similarly matching FPL name.] | def get_matching_names(understat_names, fpl_names):
understat_names, fpl_names = understat_names['player_name'].unique(), fpl_names['player_name'].unique()
seq = difflib.SequenceMatcher()
understat_similar = []
fpl_similar = []
ratio = []
for i in range(len(understat_names)):
for j i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def remove_matched_names(fpl, understat, exact_merge): \n fpl_not_matched = fpl[~fpl['player_name'].isin(exact_merge['player_name'].unique())] \n understat_not_matched = understat[~understat['player_name'].isin(exact_merge['player_name'].unique())] \n return fpl_not_matched, understat_not_matched",
"... | [
"0.67464316",
"0.6070741",
"0.587723",
"0.5818824",
"0.5750044",
"0.5457883",
"0.54351366",
"0.5387454",
"0.5255924",
"0.51499546",
"0.5148366",
"0.51164156",
"0.5079236",
"0.50657415",
"0.5030209",
"0.502642",
"0.49840075",
"0.49655002",
"0.4962999",
"0.49557227",
"0.4934124... | 0.8124159 | 0 |
[This function performs the first initial match, that is the entries whos names and dates match exactly between the understat and fpl datasets] | def exact_matches(understat, fpl, join = 'inner'):
matching_names = intersect(understat['player_name'].unique(), fpl['player_name'].unique())
fpl_matched = fpl[fpl['player_name'].isin(matching_names)]
understat_matched = understat[understat['player_name'].isin(matching_names)]
exact_merge = pd.merge... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_matching_names(understat_names, fpl_names): \n understat_names, fpl_names = understat_names['player_name'].unique(), fpl_names['player_name'].unique()\n seq = difflib.SequenceMatcher()\n understat_similar = []\n fpl_similar = []\n ratio = []\n for i in range(len(understat_names)):\n ... | [
"0.6397053",
"0.5802151",
"0.5792104",
"0.57712996",
"0.5517047",
"0.5504505",
"0.5454781",
"0.5398022",
"0.53794575",
"0.5376762",
"0.53761333",
"0.537016",
"0.53400654",
"0.52894723",
"0.52661467",
"0.5265577",
"0.5264659",
"0.5263594",
"0.5219378",
"0.52153724",
"0.5202674... | 0.658244 | 0 |
[This function checks which names were matched in the first name/date match performed, removes them and returns the entries who were not matched] | def remove_matched_names(fpl, understat, exact_merge):
fpl_not_matched = fpl[~fpl['player_name'].isin(exact_merge['player_name'].unique())]
understat_not_matched = understat[~understat['player_name'].isin(exact_merge['player_name'].unique())]
return fpl_not_matched, understat_not_matched | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clean_names_list(names):\n pure_names = []\n nan = re.compile('nan', re.IGNORECASE)\n title = re.compile('surname', re.IGNORECASE)\n for name in names:\n if nan.search(name):\n continue\n elif title.search(name):\n continue\n else:\n pure_names.... | [
"0.6010415",
"0.60094184",
"0.58488077",
"0.580144",
"0.5722472",
"0.5682057",
"0.5682034",
"0.56726396",
"0.5561398",
"0.53856033",
"0.53610826",
"0.53493106",
"0.52991974",
"0.5240321",
"0.5218462",
"0.5210992",
"0.52007824",
"0.5200186",
"0.5187462",
"0.5167587",
"0.510735... | 0.6432533 | 0 |
[This function performs the second match, by usin the similarity dataframe returned from get_matching_names. It is manually encoded to identify wrongly mapped names from each season which are removed from the dataset. The remaining understat names are used to rename the understat datasets player names and acronyms to t... | def map_similar_names(similarity_matched_df, understat_not_matched, fpl_not_matched, season):
if season == '2020-21' or '2021-22':
wrongly_matched_names = ['Adrián', 'Alisson', 'Allan', 'André Gomes', 'Bernard', 'Bernardo', 'Bernardo Silva', 'David Luiz', 'Ederson', 'Emerson',
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def final_rename(understat_no_similar, fpl_no_similar, join = 'inner'): \n name_mapper = {'Adrián':'Adrián Bernabé', # Contains both seasons corrections\n 'Alisson':'Alisson Ramses Becker',\n 'Allan':'Allan Marques Loureiro',\n 'André Gomes':'André Filipe... | [
"0.7161494",
"0.7075928",
"0.5954435",
"0.58458465",
"0.5698008",
"0.5511478",
"0.54897016",
"0.5475616",
"0.540202",
"0.5360438",
"0.528384",
"0.52060795",
"0.5198034",
"0.5196268",
"0.5119858",
"0.51163924",
"0.5085745",
"0.50549984",
"0.504015",
"0.5035918",
"0.501609",
... | 0.8080455 | 0 |
[This function performs the third and final manual matching. It manually investigates those names that had no similar name, searches for the player name or nickname in the understat data, checks the team, Googles the player's true name, and finds the corresponding FPL name. The function then renames all those understat... | def final_rename(understat_no_similar, fpl_no_similar, join = 'inner'):
name_mapper = {'Adrián':'Adrián Bernabé', # Contains both seasons corrections
'Alisson':'Alisson Ramses Becker',
'Allan':'Allan Marques Loureiro',
'André Gomes':'André Filipe Tavares ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_matching_names(understat_names, fpl_names): \n understat_names, fpl_names = understat_names['player_name'].unique(), fpl_names['player_name'].unique()\n seq = difflib.SequenceMatcher()\n understat_similar = []\n fpl_similar = []\n ratio = []\n for i in range(len(understat_names)):\n ... | [
"0.665223",
"0.65517807",
"0.6522835",
"0.6154233",
"0.59590197",
"0.5948267",
"0.5781996",
"0.56547403",
"0.5565911",
"0.55446017",
"0.5517663",
"0.5509946",
"0.5465371",
"0.5411475",
"0.5391435",
"0.5369548",
"0.53666776",
"0.5358938",
"0.5351094",
"0.5322841",
"0.53216445"... | 0.6819803 | 0 |
sign using discord OAUTH | def signin():
scope = request.args.get(
'scope',
'identify')
discord = make_session(scope=scope.split(' '))
authorization_url, state = discord.authorization_url(AUTHORIZATION_BASE_URL)
session['oauth2_state'] = state
return redirect(authorization_url) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def make_login(your_username, your_password):\r\n instagram.with_credentials(your_username, your_password)\r\n instagram.login()",
"def signedOn(self):\n self.join(self.factory.channel)\n self.msg(\"Nickserv\", \"identify %s\"%base64.b64decode(self.password))",
"async def sing_in(\n emai... | [
"0.5828169",
"0.5783513",
"0.573546",
"0.5670892",
"0.5635906",
"0.56183106",
"0.5530451",
"0.54526436",
"0.54526436",
"0.5450565",
"0.54176617",
"0.540852",
"0.53579587",
"0.534584",
"0.5338089",
"0.5330914",
"0.53274006",
"0.5303847",
"0.5286445",
"0.52706015",
"0.52705985"... | 0.63219184 | 0 |
Returns centre coords of gdf. | def _get_centre(self, gdf):
bounds = gdf["geometry"].bounds
centre_x = (bounds["maxx"].max() + bounds["minx"].min()) / 2
centre_y = (bounds["maxy"].max() + bounds["miny"].min()) / 2
return centre_x, centre_y | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_centre(self):\n # just get the centroid\n # perhaps try something like:\n # https://github.com/mapbox/polylabel/blob/master/polylabel.js\n # in the future\n coords = np.array([(n.x, n.y) for n in self.nodes])\n centre_x = coords[:, 0].mean()\n centre_y = coo... | [
"0.7715724",
"0.7707327",
"0.7631616",
"0.7114601",
"0.7093066",
"0.7054684",
"0.7038717",
"0.702642",
"0.69714475",
"0.69368535",
"0.6936108",
"0.68999594",
"0.6893743",
"0.6886426",
"0.6881262",
"0.6872203",
"0.6857105",
"0.68454945",
"0.682338",
"0.6815015",
"0.68077016",
... | 0.893584 | 0 |
Returns densified geoemtry with segments no longer than `segment`. | def _densify(self, geom, segment):
# temporary solution for readthedocs fail. - cannot mock osgeo
try:
from osgeo import ogr
except ModuleNotFoundError:
import warnings
warnings.warn("OGR (GDAL) is required.")
poly = geom
wkt = geom.wkt # sh... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _calc_weight_of_segment(self, segment):\n dists_to_fitting_line = self._get_dists_to_fitting_line(segment)\n\n sum_dists = numpy.sum(dists_to_fitting_line)\n max_dist_2 = numpy.max(dists_to_fitting_line) * 2\n return max(sum_dists, max_dist_2)",
"def condition_segment(segment):\n ... | [
"0.5480468",
"0.539641",
"0.5383123",
"0.5103896",
"0.49871787",
"0.48802853",
"0.48518398",
"0.4764627",
"0.47396928",
"0.47038734",
"0.46732634",
"0.46699286",
"0.4664267",
"0.46598098",
"0.45906416",
"0.458761",
"0.4563009",
"0.44972742",
"0.44927868",
"0.44833815",
"0.447... | 0.6578143 | 0 |
Returns lists of points and ids based on geometry and unique_id. | def _point_array(self, objects, unique_id):
points = []
ids = []
for idx, row in tqdm(objects.iterrows(), total=objects.shape[0]):
if row["geometry"].type in ["Polygon", "MultiPolygon"]:
poly_ext = row["geometry"].boundary
else:
poly_ext = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def polygon_ids(self):\n return self.get_ids()",
"def split_bygeom(self, iterable, geom_getter=lambda x: x.geom):\n points, linestrings, multipoints, multilinestrings = [], [], [], []\n\n for x in iterable:\n geom = geom_getter(x)\n if geom is None:\n pas... | [
"0.62269455",
"0.6166704",
"0.61486167",
"0.6126118",
"0.5978079",
"0.59093463",
"0.58472794",
"0.578684",
"0.5783036",
"0.5758292",
"0.5748336",
"0.5747356",
"0.5734825",
"0.57110184",
"0.5699892",
"0.5697668",
"0.5645779",
"0.56358844",
"0.5623763",
"0.55869836",
"0.5568511... | 0.76032096 | 0 |
Generate GeoDataFrame of Voronoi regions from scipy.spatial.Voronoi. | def _regions(self, voronoi_diagram, unique_id, ids, crs):
# generate DataFrame of results
regions = pd.DataFrame()
regions[unique_id] = ids # add unique id
regions["region"] = voronoi_diagram.point_region # add region id for each point
# add vertices of each polygon
ve... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _regions(self, voronoi_diagram, unique_id, ids, crs):\n vertices = pd.Series(voronoi_diagram.regions).take(voronoi_diagram.point_region)\n polygons = []\n for region in vertices:\n if -1 not in region:\n polygons.append(pygeos.polygons(voronoi_diagram.vertices[reg... | [
"0.71103394",
"0.68815744",
"0.68352133",
"0.6802901",
"0.6769342",
"0.67456377",
"0.6706018",
"0.6569226",
"0.65216863",
"0.6481219",
"0.6479371",
"0.6352787",
"0.6330494",
"0.6309833",
"0.6273537",
"0.6116103",
"0.6109667",
"0.6106971",
"0.60611653",
"0.6029041",
"0.5957657... | 0.74735576 | 0 |
Cut tessellation by the limit (Multi)Polygon. | def _cut(self, tessellation, limit, unique_id):
print("Preparing limit for edge resolving...")
geometry_cut = _split_lines(limit, 100)
print("Building R-tree...")
sindex = tessellation.sindex
# find the points that intersect with each subpolygon and add them to points_within_geo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cutout(self, centre, radius):",
"def CutEdge(self, *args):\n return _BRepAlgo.BRepAlgo_Loop_CutEdge(self, *args)",
"def alternatingSlice(self,geom,polyLayer,targetArea,granularity,direction,method):\r\n global recurs\r\n recurs+=1\r\n if self.debug: print \"*********************... | [
"0.5901307",
"0.5616003",
"0.55283123",
"0.5526708",
"0.5519888",
"0.54843426",
"0.54558146",
"0.54223585",
"0.5255476",
"0.52135694",
"0.5208739",
"0.51961917",
"0.51241225",
"0.50960326",
"0.5094102",
"0.5093263",
"0.5075918",
"0.50729334",
"0.50729334",
"0.5060805",
"0.506... | 0.7127208 | 0 |
Split polygon into GeoSeries of lines no longer than `distance`. | def _split_lines(polygon, distance):
list_points = []
current_dist = distance # set the current distance to place the point
boundary = polygon.boundary # make shapely MultiLineString object
if boundary.type == "LineString":
line_length = boundary.length # get the total length of the line
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cut_linestring(line, distance):\n\n\tpd = 0\n\n\tdistance = distance % line.length\n\n\tif distance == 0.0:\n\t\treturn [line, []]\n\n\n\tcoords = list(line.coords)\n\tfor i in range(1, len(coords)):\n\t\t\n\t\tpd = LineString(coords[:i+1]).length\n\n\t\tif pd == distance:\n\t\t\treturn [\n\t\t\t\tLineString(c... | [
"0.6343244",
"0.6282328",
"0.5884445",
"0.58515394",
"0.5763222",
"0.57372653",
"0.5634179",
"0.55498743",
"0.55483675",
"0.55328226",
"0.5340017",
"0.53016627",
"0.5286101",
"0.5249922",
"0.52450776",
"0.5219392",
"0.51925206",
"0.5183216",
"0.5157625",
"0.5152608",
"0.51037... | 0.75263524 | 0 |
Generates a temporary wishlist (prjskel directory and wishlist.md) by copying a template | def gen_temp_wishlist(self, identifier: str):
tempdir_name = f"{identifier}_{randint(1000,9999)}_repo"
# for when run from wish repo's home
basedir = Path(__file__).parent.resolve()
newdir = basedir / tempdir_name
shutil.copytree(Path(basedir/"fixture_repo"), newdir)
retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_template(self):\n options = {\n 'dir': os.path.join(os.path.dirname(__file__)),\n 'template': self.template,\n 'project': self.project,\n 'answers_file': self.answers_file,\n }\n return self.env.run(\n '%(dir)s/bin/mrbob -O %(pr... | [
"0.59431726",
"0.5879916",
"0.58641183",
"0.58060956",
"0.579721",
"0.57641816",
"0.5557667",
"0.5469625",
"0.54690653",
"0.5463675",
"0.54481643",
"0.54389393",
"0.5413413",
"0.54059976",
"0.5369688",
"0.5349536",
"0.53439164",
"0.5341551",
"0.53390956",
"0.5315235",
"0.5288... | 0.641036 | 0 |
Decorator for all API call methods. | def api_method(func):
@wraps(func)
def decorator(self, return_request_args=False, *args, **kwargs):
request_args = func(self, *args, **kwargs)
request_args.update({
'method': '{module}.{method}'.format(
module=self.__class__.__name__,
method=func.__nam... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def apis(api_method, method='GET', max_retries=3, limit_rate=0.5):\n\n def decorator(func):\n \"\"\" docstring for decorator \"\"\"\n\n func_args = copy.copy(inspect.getargspec(func).args)\n func_defaults = copy.copy(inspect.getargspec(func).defaults)\n\n def decorate(*args, **kwargs... | [
"0.7027879",
"0.69807774",
"0.69160527",
"0.6836438",
"0.67601156",
"0.67366767",
"0.6693327",
"0.663813",
"0.66315186",
"0.65716857",
"0.64533156",
"0.64057857",
"0.6399333",
"0.6382286",
"0.637818",
"0.6329208",
"0.6225679",
"0.6190489",
"0.6132622",
"0.6122523",
"0.6095566... | 0.72088116 | 0 |
Operator converter for addmm. | def convert_addmm(g, op, block):
input_x = g.get_node(op.input("Input")[0])
x = g.get_node(op.input("X")[0])
y = g.get_node(op.input("Y")[0])
alpha = op.attr("Alpha")
beta = op.attr("Beta")
dtype = block.var(op.output("Out")[0]).dtype
dtype = _convert_dtype_value(dtype)
if not isinsta... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_op(self):\n raise NotImplementedError",
"def __iadd__(self, m):\n if self.__mm_type(m):\n ls=len(self)\n for i in self.desc():\n for j in range(ls):\n self.g_val(self.val(i,j)+m.val(i,j),i,j)\n return self",
"def _append_operat... | [
"0.6140067",
"0.61188394",
"0.59205574",
"0.59124947",
"0.59111226",
"0.5908205",
"0.58916867",
"0.5825562",
"0.57532173",
"0.5735073",
"0.5732617",
"0.57236373",
"0.5717919",
"0.5699422",
"0.5645393",
"0.56412226",
"0.56078166",
"0.5574943",
"0.55626017",
"0.5517843",
"0.550... | 0.67337286 | 0 |
Operator converter for arg_max and arg_min. | def convert_arg_max_min(g, op, block):
axis = op.attr("axis")
keepdims = op.attr("keepdims")
flatten = op.attr("flatten")
dtype = op.attr("dtype")
dtype = _convert_dtype_value(dtype)
func = _op.argmax if op.type == "arg_max" else _op.argmin
x = g.get_node(op.input("X")[0])
if axis is N... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def minmin_maxmax( *args ):\n rmin = min( [ mv.min() for mv in args ] )\n rmax = max( [ mv.max() for mv in args ] )\n rmv = cdms2.createVariable( [rmin,rmax] )\n return rmv",
"def convert_maximum(node, **kwargs):\n return create_basic_op_node('Max', node, kwargs)",
"def scalar_max(self, dst, src... | [
"0.6261403",
"0.62429845",
"0.5976095",
"0.59113413",
"0.5886473",
"0.5876757",
"0.5873929",
"0.5856404",
"0.5856404",
"0.5813822",
"0.57812274",
"0.5763335",
"0.57596666",
"0.57089984",
"0.5704102",
"0.56105083",
"0.55469936",
"0.5499807",
"0.54870915",
"0.54605025",
"0.5440... | 0.66465324 | 0 |
Operator converter for assign_value. | def convert_assign_value(g, op, block):
keys = ["bool_values", "fp32_values", "int32_values", "int64_values"]
dtypes = ["bool", "float32", "int32", "int64"]
for i, key in enumerate(keys):
dtype = dtypes[i]
value = np.array(op.attr(key)).astype(dtype)
if value is not None and value.s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_operator(operator):\n if isinstance(operator, str):\n return ValueConstraintOperators.STRING_OPERATOR_MAP[operator]\n else:\n return operator",
"def to_op(self):\n raise NotImplementedError",
"def convert(self, value):\r\n return value",
"def _convert_... | [
"0.6769211",
"0.62323576",
"0.6104837",
"0.60550064",
"0.6051115",
"0.60102445",
"0.5940287",
"0.58677584",
"0.58628225",
"0.58506846",
"0.5824869",
"0.5811093",
"0.5790049",
"0.5773135",
"0.5769786",
"0.5765808",
"0.57452255",
"0.57451963",
"0.57392824",
"0.56778747",
"0.565... | 0.6568552 | 1 |
Operator converter for batch_norm. | def convert_batch_norm(g, op, block):
ipt_name = op.input("X")[0]
scale_name = op.input("Scale")[0]
bias_name = op.input("Bias")[0]
mean_name = op.input("Mean")[0]
variance_name = op.input("Variance")[0]
epsilon = op.attr("epsilon")
out = _op.nn.batch_norm(
g.get_node(ipt_name),
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def batch_norm_pattern():\n pattern = is_op(\"nn.batch_norm\")(\n wildcard(), is_constant(), is_constant(), is_constant(), is_constant()\n )\n pattern = is_tuple_get_item(pattern)\n return pattern",
"def batch_norm(self, inputs):\n x = inputs\n x = self.bn(x)\... | [
"0.6982636",
"0.69211864",
"0.68181044",
"0.67032015",
"0.6617297",
"0.66106665",
"0.6570335",
"0.6542321",
"0.6402612",
"0.6364621",
"0.6355721",
"0.63416415",
"0.6328311",
"0.6319964",
"0.629555",
"0.6281287",
"0.6274673",
"0.61825275",
"0.6162421",
"0.6154659",
"0.615054",... | 0.710314 | 0 |
Operator converter for bmm. | def convert_bmm(g, op, block):
x = g.get_node(op.input("X")[0])
y = g.get_node(op.input("Y")[0])
y = _op.transpose(y, [0, 2, 1])
out = _op.nn.batch_matmul(x, y)
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_operator(self) -> Operator:\n return Operator(self.to_instruction())",
"def _BinOp(self, t):\n op_name = t.op.__class__.__name__\n # translate pow into function call (no float version)\n if op_name == \"Pow\":\n self.write(\"pow(\")\n self.dispatch(t.left)... | [
"0.5955149",
"0.58979887",
"0.5873754",
"0.58347094",
"0.5712791",
"0.56937337",
"0.56255466",
"0.5584031",
"0.55615526",
"0.5533709",
"0.55168194",
"0.5513458",
"0.5504117",
"0.54535127",
"0.5451999",
"0.53963786",
"0.53576374",
"0.53101814",
"0.5304903",
"0.5278561",
"0.523... | 0.6634985 | 0 |
Operator converter for clip. | def convert_clip(g, op, block):
x = g.get_node(op.input("X")[0])
dtype = infer_type(x).checked_type.dtype
# if the min/max value is a tensor
min_max_is_tensor = False
if op.input("Min"):
min_value = g.get_node(op.input("Min")[0])
min_value, infered = try_infer_value(min_value, g.get... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_clip(node, **kwargs):\n name, input_nodes, attrs = get_inputs(node, kwargs)\n\n a_min = np.float(attrs.get('a_min', -np.inf))\n a_max = np.float(attrs.get('a_max', np.inf))\n\n clip_node = onnx.helper.make_node(\n \"Clip\",\n input_nodes,\n [name],\n name=name,\n... | [
"0.58585644",
"0.5828423",
"0.57943875",
"0.560246",
"0.55928254",
"0.55256546",
"0.55154014",
"0.55012953",
"0.54022205",
"0.53420806",
"0.5307061",
"0.5291567",
"0.5281222",
"0.52759486",
"0.52745783",
"0.5268508",
"0.5258731",
"0.5202985",
"0.51438415",
"0.5129863",
"0.510... | 0.5851859 | 1 |
Operator converter for conv2d. | def convert_conv2d(g, op, block):
dilations = op.attr("dilations")
groups = op.attr("groups")
paddings = op.attr("paddings")
padding_algorithm = op.attr("padding_algorithm")
strides = op.attr("strides")
kernel = g.get_node(op.input("Filter")[0])
input_x = g.get_node(op.input("Input")[0])
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_depthwise_conv2d(self, op):\n return self.convert_conv(op, \"depthwise\")",
"def cast(*args):\n return _itkScalarConnectedComponentImageFilterPython.itkScalarConnectedComponentImageFilterIUL2IUL2_cast(*args)",
"def cast(*args):\n return _itkScalarConnectedComponentImageFilterPy... | [
"0.77124536",
"0.6659152",
"0.66298926",
"0.66006505",
"0.6547993",
"0.6544018",
"0.65421",
"0.6529408",
"0.64761746",
"0.64688337",
"0.6439539",
"0.64111936",
"0.6385079",
"0.6316574",
"0.628645",
"0.6282204",
"0.62778354",
"0.62658465",
"0.62658465",
"0.62357426",
"0.623200... | 0.67047113 | 1 |
Operator converter for conv3d. | def convert_conv3d(g, op, block):
dilations = op.attr("dilations")
groups = op.attr("groups")
paddings = op.attr("paddings")
padding_algorithm = op.attr("padding_algorithm")
strides = op.attr("strides")
kernel = g.get_node(op.input("Filter")[0])
input_x = g.get_node(op.input("Input")[0])
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkScalarConnectedComponentImageFilterIUL3IUL3_cast(*args):\n return _itkScalarConnectedComponentImageFilterPython.itkScalarConnectedComponentImageFilterIUL3IUL3_cast(*args)",
"def cast(*args):\n return _itkScalarConnectedComponentImageFilterPython.itkScalarConnectedComponentImageFilterIUL3IUL3_cast(... | [
"0.6859782",
"0.6835417",
"0.68006456",
"0.67527854",
"0.6750266",
"0.6737496",
"0.66440094",
"0.6570769",
"0.6542995",
"0.65286976",
"0.6474901",
"0.64694494",
"0.646473",
"0.6462924",
"0.64120245",
"0.6361748",
"0.6354526",
"0.63530177",
"0.63488555",
"0.6339379",
"0.631805... | 0.7081379 | 0 |
Operator converter for dist. | def convert_dist(g, op, block):
x = g.get_node(op.input("X")[0])
y = g.get_node(op.input("Y")[0])
z = _op.abs(_op.subtract(x, y))
dtype = infer_type(x).checked_type.dtype
p = op.attr("p")
if p == np.inf:
out = _op.reduce.max(z)
elif p == np.NINF:
out = _op.reduce.min(z)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_op(self):\n raise NotImplementedError",
"def distmod2dist(distmod):\n return 10.**(distmod/5.-2.)",
"def to_operator(operator):\n if isinstance(operator, str):\n return ValueConstraintOperators.STRING_OPERATOR_MAP[operator]\n else:\n return operator",
"def... | [
"0.6339641",
"0.58407134",
"0.5719981",
"0.55249023",
"0.55137885",
"0.5484184",
"0.5455077",
"0.5454385",
"0.5448707",
"0.54449403",
"0.5438097",
"0.5403102",
"0.5321066",
"0.53005666",
"0.52721924",
"0.5269971",
"0.5256855",
"0.52475345",
"0.5199331",
"0.5192369",
"0.517775... | 0.6126183 | 1 |
Operator converter for cumsum. | def convert_cumsum(g, op, block):
axis = op.attr("axis")
exclusive = op.attr("exclusive")
flatten = op.attr("flatten")
reverse = op.attr("reverse")
x = g.get_node(op.input("X")[0])
if axis is None or flatten:
x = _op.reshape(x, [-1])
if reverse:
x = _op.reverse(x, axis=axis... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cumsum(x, axis=None):\r\n return CumsumOp(axis=axis)(x)",
"def cumsum(self):\n return self._lift(lambda c: c.cumsum)",
"def cumulate(tobject):\n # forward suffix\n return asrootpy(tobject.GetCumulative(True, uuid.uuid4().get_hex()))",
"def c... | [
"0.62076956",
"0.6049224",
"0.5957883",
"0.5800795",
"0.5667561",
"0.5646679",
"0.5610813",
"0.5589475",
"0.5546619",
"0.55434215",
"0.55169725",
"0.5458345",
"0.53710157",
"0.53252155",
"0.5311559",
"0.5297256",
"0.5297256",
"0.5297256",
"0.52477044",
"0.52477044",
"0.524770... | 0.6736564 | 0 |
Operator converter for linspace. | def convert_linspace(g, op, block):
start = g.get_node(op.input("Start")[0])
stop = g.get_node(op.input("Stop")[0])
num = g.get_node(op.input("Num")[0])
dtype = _convert_dtype_value(op.attr("dtype"))
start = _op.cast(start, dtype)
stop = _op.cast(stop, dtype)
num = _op.cast(num, dtype)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def linspace(start, stop, num=50, include_endpoint=True, dtype=None, constant=False):\n return Tensor(np.linspace(start, stop, num, include_endpoint, dtype=dtype), constant=constant)",
"def linspace(start, stop, num=50):\n\n # work around for quantities v0.10.1 and NumPy\n unit = unit_of(start)\n sta... | [
"0.66301775",
"0.633205",
"0.618943",
"0.6140632",
"0.6097895",
"0.6035607",
"0.59877616",
"0.5912523",
"0.568614",
"0.5672774",
"0.5551735",
"0.5398387",
"0.53707683",
"0.5364246",
"0.5330155",
"0.5314898",
"0.52932686",
"0.522057",
"0.52183074",
"0.51965505",
"0.5195219",
... | 0.658162 | 1 |
Operator converter for fill_any_like. | def convert_fill_any_like(g, op, block):
dtype = op.attr("dtype")
dtype = _convert_dtype_value(dtype)
x = g.get_node(op.input("X")[0])
value = _expr.const(op.attr("value"), dtype=dtype)
out = _op.transform.full_like(x, value).astype(dtype)
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _op1(self: 'SampledFieldType', operator: Callable) -> 'SampledFieldType':\n values = operator(self.values)\n extrapolation_ = operator(self._extrapolation)\n return self.with_values(values).with_extrapolation(extrapolation_)",
"def apply_rule(operator, pattern, replacement):\n new_op ... | [
"0.5616769",
"0.5486912",
"0.54180455",
"0.5414949",
"0.535939",
"0.5240275",
"0.51659304",
"0.51326084",
"0.50377",
"0.5030992",
"0.50016916",
"0.49707153",
"0.49463615",
"0.49286476",
"0.49285066",
"0.4906725",
"0.4864339",
"0.4844045",
"0.47973564",
"0.47752708",
"0.476564... | 0.7293306 | 0 |
Operator converter for fill_constant. | def convert_fill_constant(g, op, block):
value = op.attr("value")
shape = block.var(op.output("Out")[0]).shape
dtype = op.attr("dtype")
dtype = _convert_dtype_value(dtype)
value = _expr.const(value).astype(dtype)
if "ValueTensor" in op.input_names and op.input("ValueTensor"):
shape = g.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_identity(node, **kwargs):\n return create_basic_op_node('ConstantFill', node, kwargs)",
"def on_constant(self, node):\n if node.is_constant(Primitive):\n return self.convert_func(\n get_prim_graph({}, node.value, node.abstract))\n return self.make_const(node... | [
"0.70990324",
"0.6030638",
"0.5743218",
"0.5708666",
"0.56673795",
"0.5635013",
"0.5507181",
"0.55013335",
"0.5461051",
"0.54267126",
"0.53893894",
"0.53808427",
"0.5360184",
"0.53533846",
"0.5340008",
"0.5330984",
"0.5328292",
"0.5297096",
"0.52946055",
"0.52735186",
"0.5270... | 0.70311314 | 1 |
Operator converter for fill_constant_batch_size_like. | def convert_fill_constant_batch_size_like(g, op, block):
x = g.get_node(op.input("Input")[0])
value = op.attr("value")
shape = op.attr("shape")
input_dim_idx = op.attr("input_dim_idx")
output_dim_idx = op.attr("output_dim_idx")
dtype = op.attr("dtype")
dtype = _convert_dtype_value(dtype)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def configure_minibatch_by_padded_size(\n *,\n size: Sizing,\n buffer: int,\n discard_oversize: bool,\n get_length: Optional[Callable[[ItemT], int]] = None\n) -> BatcherT:\n # Avoid displacing optional values from the underlying function.\n optionals = {\"get_length\": get_length} if get_lengt... | [
"0.57659185",
"0.5654751",
"0.5606056",
"0.55047905",
"0.5385269",
"0.53614193",
"0.53388697",
"0.5337751",
"0.5335689",
"0.5321426",
"0.52608454",
"0.5225976",
"0.52146417",
"0.5205681",
"0.5176107",
"0.5139736",
"0.51184815",
"0.5111997",
"0.50526845",
"0.50503075",
"0.5044... | 0.75238425 | 0 |
Operator converter for fill_zeros_like. | def convert_fill_zeros_like(g, op, block):
x = g.get_node(op.input("X")[0])
dtype = op.attr("dtype")
dtype = _convert_dtype_value(dtype)
value = _expr.const(0, dtype=dtype)
out = _op.transform.full_like(x, value).astype(dtype)
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zeroslike_op(node, ctx=None):\n return ZerosLikeOp(node, ctx=ctx)",
"def zeros_like(data):\n return _make.zeros_like(data)",
"def zeros_like(self):\n raise NotImplementedError",
"def zeros_like(tensor):\n raise NotImplementedError",
"def zeros_like(a):\n if isinstance(a, np.ndarr... | [
"0.6772258",
"0.656745",
"0.6498684",
"0.60529685",
"0.60235626",
"0.59927624",
"0.5982763",
"0.57816917",
"0.5781454",
"0.5781454",
"0.5764004",
"0.5742571",
"0.57026017",
"0.5686652",
"0.56723756",
"0.5666808",
"0.5660543",
"0.56434464",
"0.56319684",
"0.56217784",
"0.56033... | 0.7635424 | 0 |
Operator converter for flip. | def convert_flip(g, op, block):
x = g.get_node(op.input("X")[0])
axis = op.attr("axis")
for i, ax in enumerate(axis):
if i == 0:
out = _op.reverse(x, ax)
else:
out = _op.reverse(out, ax)
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __invert__(self) -> Operators:\n return self.operate(inv)",
"def flip(self):",
"def _convert_operator(\n self, op_name, node_name, inputs, attrs, identity_list=None, convert_map=None\n ):\n identity_list = identity_list if identity_list else _identity_list\n convert_map = con... | [
"0.6534184",
"0.625451",
"0.62468517",
"0.6027492",
"0.6015491",
"0.5974365",
"0.5929532",
"0.5919581",
"0.5894662",
"0.5827291",
"0.5807849",
"0.57965827",
"0.5752107",
"0.57154334",
"0.56868166",
"0.5685613",
"0.5685318",
"0.56431323",
"0.56397843",
"0.5603897",
"0.5594422"... | 0.6944533 | 0 |
Operator converter for gather. | def convert_gather(g, op, block):
x = g.get_node(op.input("X")[0])
index = g.get_node(op.input("Index")[0])
axis = op.attr("axis")
out = _op.take(x, index, axis)
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_op(self):\n raise NotImplementedError",
"def _to_ops(from_op):\n\n for to_op in OPERATORS:\n if to_op and isinstance(from_op, ast.Not):\n # 'not' can only be removed but not replaced with\n # '+', '-' or '~' b/c that may lead to strange results\n pass\n ... | [
"0.68306834",
"0.59387356",
"0.5889097",
"0.5842645",
"0.58200556",
"0.581269",
"0.57886297",
"0.5705462",
"0.55957973",
"0.5466446",
"0.53973234",
"0.53622824",
"0.5341744",
"0.5338845",
"0.53274375",
"0.53254366",
"0.5316216",
"0.52995783",
"0.529585",
"0.52606606",
"0.5246... | 0.6088883 | 1 |
Operator converter for gather_nd. | def convert_gather_nd(g, op, block):
x = g.get_node(op.input("X")[0])
index = g.get_node(op.input("Index")[0])
shape = infer_shape(index)
perm = list(range(0, len(shape) - 1))
perm.insert(0, len(shape) - 1)
index = _op.transpose(index, axes=perm)
out = _op.gather_nd(x, index, 0, shape[-1])
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_gather(g, op, block):\n\n x = g.get_node(op.input(\"X\")[0])\n index = g.get_node(op.input(\"Index\")[0])\n axis = op.attr(\"axis\")\n out = _op.take(x, index, axis)\n g.add_node(op.output(\"Out\")[0], out)",
"def _special_handle_gather(cls, op, X, W):\n tensor_list = []\n ... | [
"0.6415681",
"0.62718433",
"0.62259847",
"0.6027801",
"0.57915795",
"0.56961256",
"0.5635632",
"0.5554525",
"0.5510923",
"0.540909",
"0.5385487",
"0.5384087",
"0.53793013",
"0.5341738",
"0.5336763",
"0.5301359",
"0.5278369",
"0.52602386",
"0.5254259",
"0.5254013",
"0.5253978"... | 0.6945044 | 0 |
Operator converter for convert_gaussian_random. | def convert_gaussian_random(g, op, block):
mean = op.attr("mean")
std = op.attr("std")
shape = op.attr("shape")
seed = op.attr("seed")
dtype = op.attr("dtype")
dtype = _convert_dtype_value(dtype)
out = _op.random.normal(key=seed, shape=shape, dtype=dtype, mean=mean, scale=std)
g.add_nod... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_gaussian_random(self):\n u1 = generateRandom()\n u2 = generateRandom()\n if u1 < 1e-6:\n u1 = 1e-6\n return sqrt(-2 * log(u1)) * cos(2 * pi * u2)",
"def generate_gaussian():\n amp = 10 * numpy.random.chisquare(3)\n width = numpy.random.chisquare(3)\n mean ... | [
"0.6146113",
"0.5859517",
"0.56807953",
"0.56442684",
"0.5561129",
"0.54634964",
"0.53823406",
"0.5368267",
"0.53507274",
"0.53507274",
"0.5339759",
"0.53022546",
"0.529752",
"0.52907133",
"0.52850515",
"0.5277355",
"0.52668256",
"0.5251527",
"0.52423066",
"0.52212864",
"0.52... | 0.7103649 | 0 |
Operator converter for gelu. | def convert_gelu(g, op, block):
x = g.get_node(op.input("X")[0])
out = x * (
_expr.const(0.5, dtype="float32")
+ _op.erf(x * _expr.const(0.5**0.5, dtype="float32")) * _expr.const(0.5, dtype="float32")
)
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gelu(input):\n return FunctionLib.apply('Gelu', input.device, [input], approximate=False)",
"def to_operator(operator):\n if isinstance(operator, str):\n return ValueConstraintOperators.STRING_OPERATOR_MAP[operator]\n else:\n return operator",
"def to_op(self):\n ... | [
"0.64732295",
"0.63900864",
"0.62682927",
"0.61840063",
"0.60999125",
"0.6083547",
"0.5979249",
"0.5979249",
"0.59066993",
"0.58161",
"0.57840157",
"0.57709426",
"0.5756592",
"0.5717447",
"0.5710821",
"0.56317306",
"0.561339",
"0.55851364",
"0.5584833",
"0.5584833",
"0.558483... | 0.6726542 | 0 |
Operator converter for group_norm. | def convert_group_norm(g, op, block):
x = g.get_node(op.input("X")[0])
num_groups = op.attr("groups")
epsilon = op.attr("epsilon")
gamma = g.get_node(op.input("Scale")[0])
beta = g.get_node(op.input("Bias")[0])
out = _op.nn.group_norm(
x,
gamma=gamma,
beta=beta,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def group_norm(input, num_groups, weight, bias, eps=1e-5):\n return FunctionLib.apply(\n 'GroupNorm', input.device, [input, weight, bias],\n axis=1, group=num_groups, epsilon=eps)",
"def GroupNormWrapper(generated, *args, **kwargs):\n if generated:\n return GroupNormGenerated(*args)\n ... | [
"0.6755691",
"0.63837314",
"0.60799557",
"0.587989",
"0.57478404",
"0.5674036",
"0.562378",
"0.55935955",
"0.55220914",
"0.54879874",
"0.5294782",
"0.52873045",
"0.52807015",
"0.5280255",
"0.5254464",
"0.5253726",
"0.52532184",
"0.5205319",
"0.518886",
"0.51788175",
"0.514121... | 0.7385738 | 0 |
Operator converter for hard_shrink. | def convert_hard_shrink(g, op, block):
x = g.get_node(op.input("X")[0])
dtype = infer_type(x).checked_type.dtype
threshold = op.attr("threshold")
threshold = _op.const(threshold, dtype)
out = _op.logical_or(x < _op.const(-1.0, dtype) * threshold, x > threshold)
out = _op.cast(out, dtype) * x
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_softshrink(g, op, block):\n\n x = g.get_node(op.input(\"X\")[0])\n dtype = infer_type(x).checked_type.dtype\n threshold = _expr.const(op.attr(\"lambda\"), dtype=dtype)\n zeros = _op.zeros_like(x)\n out = _op.where(x < -threshold, x + threshold, zeros) + _op.where(\n x > threshold,... | [
"0.6010667",
"0.5997167",
"0.53039765",
"0.5279862",
"0.52582633",
"0.5167166",
"0.5161279",
"0.50434566",
"0.5023915",
"0.5019135",
"0.4942735",
"0.49359447",
"0.4897563",
"0.48182574",
"0.4779877",
"0.47418684",
"0.47401118",
"0.47281516",
"0.47234067",
"0.471314",
"0.46824... | 0.64734906 | 0 |
Operator converter for index_select. | def convert_index_select(g, op, block):
x = g.get_node(op.input("X")[0])
index = g.get_node(op.input("Index")[0])
axis = op.attr("dim")
out = _op.transform.take(x, index, axis, mode="wrap")
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_operator_adapt(self):\n\n # test string concatenation\n expr = test_table.c.data + \"somedata\"\n assert testing.db.execute(select([expr])).scalar() == \"somedatasomedata\"\n\n expr = test_table.c.id + 15\n assert testing.db.execute(select([expr])).scalar() == 16\n\n ... | [
"0.60425293",
"0.5963527",
"0.59590966",
"0.59337676",
"0.5736297",
"0.5692899",
"0.5567844",
"0.54539305",
"0.5438634",
"0.5395624",
"0.5371194",
"0.5371194",
"0.5371194",
"0.5356206",
"0.5356206",
"0.53442585",
"0.5316892",
"0.52802706",
"0.5264962",
"0.5203228",
"0.5195657... | 0.61819863 | 0 |
Operator converter for instance_norm. | def convert_instance_norm(g, op, block):
x = g.get_node(op.input("X")[0])
gamma = g.get_node(op.input("Scale")[0])
beta = g.get_node(op.input("Bias")[0])
epsilon = op.attr("epsilon")
scale = center = True
out = _op.nn.instance_norm(x, gamma, beta, axis=1, epsilon=epsilon, center=center, scale=... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_norm(g, op, block):\n\n x = g.get_node(op.input(\"X\")[0])\n axis = op.attr(\"axis\")\n axis_l = [axis]\n epsilon = op.attr(\"epsilon\")\n out = _op.nn.l2_normalize(x, epsilon, axis_l)\n g.add_node(op.output(\"Out\")[0], out)",
"def instance_norm_model():\n inputs = tf.keras.Inpu... | [
"0.63742834",
"0.6301268",
"0.62416226",
"0.61739326",
"0.61723346",
"0.6117578",
"0.6069247",
"0.598634",
"0.594244",
"0.59322286",
"0.5724885",
"0.5702405",
"0.5687457",
"0.55661756",
"0.5558667",
"0.5555875",
"0.554079",
"0.55372286",
"0.5529466",
"0.5505687",
"0.5436952",... | 0.761585 | 0 |
Operator converter for layer_norm. | def convert_layer_norm(g, op, block):
begin_norm_axis = op.attr("begin_norm_axis")
epsilon = op.attr("epsilon")
x = g.get_node(op.input("X")[0])
bias_input = op.input("Bias")
scale_input = op.input("Scale")
x_shape = infer_shape(x)
assert begin_norm_axis in (
len(x_shape) - 1,
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def layer_norm(input, normalized_shape, weight, bias, eps=1e-5):\n return FunctionLib.apply(\n 'LayerNorm', input.device, [input, weight, bias],\n axis=input.ndimension() - len(normalized_shape), epsilon=eps)",
"def convert_norm(g, op, block):\n\n x = g.get_node(op.input(\"X\")[0])\n axis ... | [
"0.71611047",
"0.7023088",
"0.69635206",
"0.6894904",
"0.6882009",
"0.68079406",
"0.6755471",
"0.6411293",
"0.6352709",
"0.63346183",
"0.63338774",
"0.63256377",
"0.6300222",
"0.6299137",
"0.626027",
"0.6193084",
"0.61820924",
"0.6180466",
"0.6179965",
"0.6158545",
"0.6152687... | 0.72570556 | 0 |
Operator converter for log1p. | def convert_log1p(g, op, block):
x = g.get_node(op.input("X")[0])
dtype = infer_type(x).checked_type.dtype
one = _expr.const(1, dtype=dtype)
out = _op.log(x + one)
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def log1p(x):\n return Log1p().apply((x,))[0]",
"def convert_log(node, **kwargs):\n return create_basic_op_node('Log', node, kwargs)",
"def log1p(x):\n return 0.0",
"def log1p(x):\r\n # see decorator for function body\r",
"def on_L1(self):\r\n self.log()",
"def operator_1_to_01(ope... | [
"0.6751545",
"0.62168634",
"0.6168674",
"0.60308063",
"0.570318",
"0.56732893",
"0.5644703",
"0.5622072",
"0.5622072",
"0.56150734",
"0.5563466",
"0.53755",
"0.5370566",
"0.5338191",
"0.5325464",
"0.52764845",
"0.52360386",
"0.5223938",
"0.5184546",
"0.51638156",
"0.5141699",... | 0.74281895 | 0 |
Operator converter for logsigmoid. | def convert_logsigmoid(g, op, block):
x = g.get_node(op.input("X")[0])
out = _op.log(_op.tensor.sigmoid(x))
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_sigmoid(node, **kwargs):\n return create_basic_op_node('Sigmoid', node, kwargs)",
"def get_sigmoid(arg):\n\n if arg >= 0:\n z = np.exp(-arg)\n return 1. / (1. + z)\n else:\n z = np.exp(arg)\n return z / (1 + z)",
"def _tanh_to_sigmoid(x):\n return x * 0.5 + 0... | [
"0.76032346",
"0.70990795",
"0.6969098",
"0.69575626",
"0.68987423",
"0.68571717",
"0.6832141",
"0.6832141",
"0.68300146",
"0.68188673",
"0.68188673",
"0.6813658",
"0.6809938",
"0.6804544",
"0.6792052",
"0.6792052",
"0.67841154",
"0.67658395",
"0.67627764",
"0.67627764",
"0.6... | 0.7840095 | 0 |
Operator converter for logsoftmax. | def convert_logsoftmax(g, op, block):
x = g.get_node(op.input("X")[0])
axis = op.attr("axis")
ndim = len(infer_shape(x))
if axis < 0:
axis += ndim
m = _op.max(x, [axis], keepdims=True)
e = _op.exp(x - m)
s = _op.sum(e, [axis], keepdims=True)
out = x - m - _op.log(s)
g.add_no... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_logsoftmax(node, **kwargs):\n name, input_nodes, attrs = get_inputs(node, kwargs)\n\n # Converting to int\n axis = int(attrs.get(\"axis\", -1))\n temp = attrs.get(\"temperature\", 'None')\n if temp != 'None':\n raise AttributeError(\"LogSoftMax: ONNX supports only temperature=None... | [
"0.6718519",
"0.63641274",
"0.61128604",
"0.60407716",
"0.5981333",
"0.5973454",
"0.59326655",
"0.59160435",
"0.58667946",
"0.58667946",
"0.5826851",
"0.5803342",
"0.57010716",
"0.56901884",
"0.56540316",
"0.5629949",
"0.5570143",
"0.5570123",
"0.5566498",
"0.55638343",
"0.55... | 0.6963494 | 0 |
Operator converter for logsumexp. | def convert_logsumexp(g, op, block):
input_x = g.get_node(op.input("X")[0])
axis = op.attr("axis")
if op.attr("reduce_all"):
axis = None
keepdims = op.attr("keepdim")
out = get_relay_op("logsumexp")(input_x, axis=axis, keepdims=keepdims)
if not axis and not keepdims:
out = _op.e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_log(node, **kwargs):\n return create_basic_op_node('Log', node, kwargs)",
"def logarithmic():\n return Equivalency(\n [(dimensionless_unscaled, function_units.dex, np.log10, lambda x: 10.0**x)],\n \"logarithmic\",\n )",
"def logsumexp(x, axis=None):\n raise NotImplemen... | [
"0.67168427",
"0.5727276",
"0.5680145",
"0.5654816",
"0.56497747",
"0.56452084",
"0.56452084",
"0.5629238",
"0.5578657",
"0.55726445",
"0.5559736",
"0.55538785",
"0.5529562",
"0.5506391",
"0.54890704",
"0.5408773",
"0.53263056",
"0.52986073",
"0.52911454",
"0.52888656",
"0.52... | 0.6413503 | 1 |
Operator converter for lookup_table_v2. | def convert_lookup_table(g, op, block):
indices = g.get_node(op.input("Ids")[0])
padding_idx = op.attr("padding_idx")
weights = g.get_node(op.input("W")[0])
if padding_idx != -1:
if op.input("W")[0] in g.get_params():
weights = g.get_params(op.input("W")[0])
weights[padd... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_prep_lookup(self, lookup_type, value):\n raise TypeError('Lookup not supported on matrix values')",
"def lookup_table():\n datapackage = {\n 'resources': [\n {\n 'schema': {\n 'fields': [\n {\n ... | [
"0.5774422",
"0.54987967",
"0.5331097",
"0.53112423",
"0.53097",
"0.5222232",
"0.50881207",
"0.5052206",
"0.5036541",
"0.4921918",
"0.4903777",
"0.48848626",
"0.4867108",
"0.48498118",
"0.48461452",
"0.48450089",
"0.47992828",
"0.47905344",
"0.47610113",
"0.4752206",
"0.47332... | 0.62242955 | 0 |
Operator converter for meshgrid. | def convert_meshgrid(g, op, block):
inputs = op.input("X")
x = [g.get_node(i) for i in inputs]
outs = _op.meshgrid(x, indexing="ij")
for i, out in enumerate(outs):
g.add_node(op.output("Out")[i], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def patterning(mesh, operator):\n\n\n operators = {\n 'conway_dual': conway_dual,\n 'conway_join': conway_join,\n 'conway_ambo': conway_ambo,\n 'conway_kis': conway_kis,\n 'conway_needle': conway_needle,\n 'conway_zip': conway_zip,\n 'conway_truncate': conway_tru... | [
"0.60268074",
"0.5832767",
"0.56312937",
"0.5470359",
"0.54649115",
"0.54418176",
"0.5400534",
"0.53117245",
"0.5303619",
"0.5240746",
"0.5198527",
"0.5197365",
"0.5190599",
"0.51801056",
"0.5153184",
"0.5153184",
"0.5152655",
"0.51187336",
"0.50965446",
"0.5085644",
"0.50754... | 0.6721741 | 0 |
Operator converter for one_hot_v2. | def convert_one_hot_v2(g, op, block):
x = g.get_node(op.input("X")[0])
depth = op.attr("depth")
dtype = op.attr("dtype")
dtype = _convert_dtype_value(dtype)
ndim = len(infer_shape(x))
on_value = _op.const(1)
off_value = _op.const(0)
axis = ndim
out = _op.one_hot(x, on_value, off_val... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def To1hot(label,num_class):\n onehot = np.zeros(num_class)\n onehot[label] = 1\n return onehot",
"def label_to_one_hot(label, num_of_class=2):\r\n import numpy as np\r\n one_hot = np.zeros((len(label), num_of_class), dtype=np.uint8)\r\n for i in range(len(label)):\r\n one_hot[i, int(lab... | [
"0.7422477",
"0.71809745",
"0.7080891",
"0.70075864",
"0.6995401",
"0.6995261",
"0.69743097",
"0.6960048",
"0.6932142",
"0.69192666",
"0.69171506",
"0.6915693",
"0.6878101",
"0.68749493",
"0.68658847",
"0.6831783",
"0.68246114",
"0.68231636",
"0.6814825",
"0.6811426",
"0.6793... | 0.78160447 | 0 |
Operator converter for p_norm. | def convert_p_norm(g, op, blcok):
x = g.get_node(op.input("X")[0])
axis = op.attr("axis")
p = op.attr("porder")
keepdim = op.attr("keepdim")
p_node = _expr.const(p, dtype="float32")
abs_node = _op.abs(x)
pow_node = _op.power(abs_node, p_node)
reduce_sum = _op.sum(pow_node, axis=[axis], ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def p_to_norm(p, higher):\n scaled = np.power(p, 0.3)\n return (0.5 + (1-scaled)/2) if higher else scaled/2",
"def convert_norm(g, op, block):\n\n x = g.get_node(op.input(\"X\")[0])\n axis = op.attr(\"axis\")\n axis_l = [axis]\n epsilon = op.attr(\"epsilon\")\n out = _op.nn.l2_normalize(x, e... | [
"0.65807647",
"0.65279526",
"0.64314675",
"0.6353075",
"0.6138509",
"0.6118347",
"0.6118347",
"0.6114513",
"0.6095061",
"0.6083731",
"0.6056826",
"0.6005455",
"0.59998155",
"0.5998918",
"0.5940116",
"0.5916723",
"0.58574075",
"0.5807905",
"0.578085",
"0.5747963",
"0.57092005"... | 0.7338868 | 0 |
Operator converter for pixel_shuffle. | def convert_pixel_shuffle(g, op, block):
x = g.get_node(op.input("X")[0])
upscale_factor = op.attr("upscale_factor")
data_format = op.attr("data_format")
out = _op.nn.depth_to_space(x, block_size=upscale_factor, layout=data_format, mode="CRD")
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def forward(self, x):\n y = pixel_shuffle_1d(x, 2)\n return y",
"def dimshuffle(self, *pattern):\r\n if (len(pattern) == 1) and (isinstance(pattern[0], (list, tuple))):\r\n pattern = pattern[0]\r\n op = theano.tensor.basic.DimShuffle(list(self.type.broadcastable),\r\n ... | [
"0.545927",
"0.53992134",
"0.53599024",
"0.52810615",
"0.5202479",
"0.51826876",
"0.51717865",
"0.5161898",
"0.5074902",
"0.50666165",
"0.50223243",
"0.5020171",
"0.49806452",
"0.49765718",
"0.4957045",
"0.49190286",
"0.49157622",
"0.4907426",
"0.49008116",
"0.48984328",
"0.4... | 0.62132937 | 0 |
Operator converter for pool3d. | def convert_pool3d(g, op, block):
adaptive = op.attr("adaptive")
ceil_mode = op.attr("ceil_mode")
global_pooling = op.attr("global_pooling")
ksize = op.attr("ksize")
paddings = op.attr("paddings")
padding_algorithm = op.attr("padding_algorithm")
pooling_type = op.attr("pooling_type")
da... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(*args):\n return _itkScalarConnectedComponentImageFilterPython.itkScalarConnectedComponentImageFilterIUS3IUS3_cast(*args)",
"def itkScalarConnectedComponentImageFilterIUS3IUS3_cast(*args):\n return _itkScalarConnectedComponentImageFilterPython.itkScalarConnectedComponentImageFilterIUS3IUS3_cast(... | [
"0.64802796",
"0.634125",
"0.6329923",
"0.62835914",
"0.6072355",
"0.600861",
"0.5975352",
"0.5970682",
"0.5958929",
"0.5951508",
"0.59156597",
"0.5907593",
"0.5903646",
"0.59001213",
"0.5845868",
"0.5841345",
"0.5837835",
"0.583599",
"0.5832108",
"0.58082217",
"0.58035505",
... | 0.63981235 | 1 |
Operator converter for range. | def convert_range(g, op, block):
start = g.get_node(op.input("Start")[0])
stop = g.get_node(op.input("End")[0])
step = g.get_node(op.input("Step")[0])
dtype = infer_type(start).checked_type.dtype
params = []
for param in (start, stop, step):
param, infered = try_infer_value(param, g.ge... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def expand_range(txt, range_operator='~'):\n if range_operator not in txt:\n return txt\n\n result = []\n index_pattern = r'(\\D*)(\\d+)'\n pair = txt.split(range_operator)\n result.append(pair[0])\n\n # Find start/end points\n match1 = re.search(index_pattern, pair[0])\n match2 = re.s... | [
"0.634039",
"0.5999258",
"0.59668106",
"0.5909389",
"0.5903821",
"0.58703095",
"0.5806058",
"0.57892925",
"0.5776787",
"0.5775462",
"0.57224923",
"0.5702344",
"0.5679967",
"0.5651023",
"0.5640041",
"0.5610475",
"0.5572009",
"0.556349",
"0.55569667",
"0.55463535",
"0.5542517",... | 0.6679994 | 0 |
Operator converter for reciprocal. | def convert_reciprocal(g, op, block):
x = g.get_node(op.input("X")[0])
dtype = infer_type(x).checked_type.dtype
out = _expr.const(1.0, dtype) / x
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_reciprocal(node, **kwargs):\n return create_basic_op_node('Reciprocal', node, kwargs)",
"def reciprocal(self):\n return Rational(self.denominator, self.numerator)",
"def reciprocal(self):\r\n s, e = self.share\r\n s = 0.5*(1/s) # TODO: no normalization for 1/s as 1/2<=abs(s)<=1... | [
"0.7403436",
"0.6360563",
"0.6277235",
"0.60619205",
"0.60127646",
"0.5968653",
"0.5964228",
"0.58926874",
"0.58694315",
"0.58335966",
"0.58111376",
"0.5801372",
"0.57882774",
"0.57847327",
"0.57204145",
"0.56861347",
"0.56750584",
"0.5622476",
"0.5578201",
"0.5574296",
"0.55... | 0.6730765 | 1 |
Operator converter for roi_align. | def convert_roi_align(g, op, block):
rois = g.get_node(op.input("ROIs")[0])
spatial_scale = op.attr("spatial_scale")
if op.attr("aligned"):
offset = _expr.const(0.5, dtype="float32")
roi_offset = _op.divide(offset, _expr.const(spatial_scale, dtype="float32"))
rois = _op.subtract(roi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def apply_roi(args, what_roi, img):\n if what_roi == \"Fractions\":\n roi = split_roi(args.roi_frac, True)\n img = img[int(img.shape[0] * roi[2]):\n int(img.shape[0] * roi[3]),\n int(img.shape[1] * roi[0]):\n int(img.shape[1] * roi[1])]\n elif ... | [
"0.5578017",
"0.5545378",
"0.53002715",
"0.52833134",
"0.52719736",
"0.5229873",
"0.52246124",
"0.5214217",
"0.5203006",
"0.51702946",
"0.5151823",
"0.5094765",
"0.5070865",
"0.5068249",
"0.5053306",
"0.5044194",
"0.5040412",
"0.502999",
"0.5025092",
"0.49983588",
"0.49500635... | 0.74761134 | 0 |
Operator converter for scale. | def convert_scale(g, op, block):
scale = op.attr("scale")
bias = op.attr("bias")
bias_after_scale = op.attr("bias_after_scale")
x = g.get_node(op.input("X")[0])
if np.isclose(scale, 1.0) and np.isclose(bias, 0.0):
out = x
else:
if np.isclose(bias, 0.0):
out = x * _ex... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_scale_op(self):\n\t\treturn self.variables.get('scale')",
"def get_converter(self, parameter):\n if parameter not in self._converters:\n param = self.get_parameter(parameter)\n try:\n scale = float(param['Scale'])\n except KeyError:\n ... | [
"0.7507955",
"0.64522433",
"0.63874114",
"0.6371098",
"0.63329124",
"0.6306815",
"0.6191109",
"0.6178112",
"0.61010736",
"0.59873635",
"0.59688044",
"0.59567827",
"0.5931339",
"0.59079313",
"0.5905838",
"0.5900644",
"0.58905166",
"0.58885634",
"0.58822054",
"0.5851107",
"0.58... | 0.69917214 | 1 |
Operator converter for scatter_nd_add. | def convert_scatter_nd_add(g, op, block):
x = g.get_node(op.input("X")[0])
index = g.get_node(op.input("Index")[0])
updates = g.get_node(op.input("Updates")[0])
indices_dim = len(infer_shape(index))
axes = list(range(indices_dim))
index = _op.transpose(index, axes[-1:] + axes[:-1])
out = _o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def covert_broadcast_add(node, **kwargs):\n return create_basic_op_node('Add', node, kwargs)",
"def convert_elementwise_add(node, **kwargs):\n return create_basic_op_node('Add', node, kwargs)",
"def convert_addn(node, **kwargs):\n return create_basic_op_node('Sum', node, kwargs)",
"def scatter_add(m... | [
"0.6498951",
"0.61894053",
"0.59556687",
"0.592422",
"0.57876265",
"0.57705116",
"0.57371104",
"0.5727643",
"0.5696288",
"0.5682642",
"0.56769985",
"0.5595918",
"0.5593405",
"0.5569061",
"0.5505429",
"0.54623306",
"0.5460031",
"0.54405534",
"0.5420279",
"0.54102105",
"0.53995... | 0.7416501 | 0 |
Operator converter for size. | def convert_size(g, op, block):
input_x = g.get_node(op.input("Input")[0])
out = _op.ndarray_size(input_x, dtype="int64")
out = _op.expand_dims(out, axis=0)
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_size(node, **kwargs):\n return create_basic_op_node('Size', node, kwargs)",
"def calc_size(cls) -> int:\n return calcsize('<' + cls.fmt)",
"def gen_sizeof(self, expr: expressions.Sizeof):\n if isinstance(expr.sizeof_typ, types.CType):\n # Get size of the given type:\n ... | [
"0.7711492",
"0.6060689",
"0.57974154",
"0.57858944",
"0.57434505",
"0.57390225",
"0.5618522",
"0.56181705",
"0.56119776",
"0.56061363",
"0.5605334",
"0.55538976",
"0.55410606",
"0.5476461",
"0.5418435",
"0.5411751",
"0.53720766",
"0.5353014",
"0.5350651",
"0.53427",
"0.52968... | 0.6135477 | 1 |
Operator converter for softmax. | def convert_softmax(g, op, block):
axis = op.attr("axis")
input_shape = block.var(op.input("X")[0]).shape
if axis < 0:
axis = len(input_shape) + axis
x = g.get_node(op.input("X")[0])
m = _op.max(x, axis, keepdims=True)
e = _op.exp(x - m)
out = e / _op.sum(e, axis, keepdims=True)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _create_softmax(cls, op, op_t):\n node = cls._common_singa_tensor_to_onnx_node(op, op_t)\n\n node.attribute.extend([\n helper.make_attribute('axis', op.axis),\n ])\n return node",
"def _create_softmax(cls, onnx_node, inputs, opset_version):\n factor = onnx_node.g... | [
"0.64913285",
"0.64781654",
"0.6419903",
"0.6419903",
"0.63959384",
"0.6354198",
"0.6307182",
"0.629241",
"0.62803423",
"0.6260943",
"0.6226556",
"0.62239",
"0.6220813",
"0.6220813",
"0.6134256",
"0.6113583",
"0.60977525",
"0.60738033",
"0.60657024",
"0.60635906",
"0.6058736"... | 0.66949296 | 0 |
Operator converter for softmax_with_cross_entropy. | def convert_softmax_with_cross_entropy(g, op, block):
logits = g.get_node(op.input("Logits")[0])
labels = g.get_node(op.input("Label")[0])
ignore_index = op.attr("ignore_index")
axis = op.attr("axis")
if axis < 0:
axis = len(infer_shape(logits)) + axis
softmax = _op.nn.softmax(logits, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def softmax_cross_entropy(inputs, axis=1, reduction='mean', **kwargs):\n args = ArgHelper.parse(locals())\n args['reduction'] = reduction.upper()\n op_lib = loss_ops_lib.SoftmaxCrossEntropy\n if context.executing_eagerly():\n return op_lib \\\n .instantiate(\n axis=axis... | [
"0.64137816",
"0.6352757",
"0.63304996",
"0.6288456",
"0.6251121",
"0.62245667",
"0.61739784",
"0.6161671",
"0.6141829",
"0.61134845",
"0.6104285",
"0.6102624",
"0.60936904",
"0.60571945",
"0.5995504",
"0.5986937",
"0.5984326",
"0.59788394",
"0.59710175",
"0.5968684",
"0.5946... | 0.6448857 | 0 |
Operator converter for softsign. | def convert_softsign(g, op, block):
x = g.get_node(op.input("X")[0])
dtype = infer_type(x).checked_type.dtype
out = x / (_op.const(1.0, dtype) + _op.abs(x))
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def to_op(self):\n raise NotImplementedError",
"def to_operator(operator):\n if isinstance(operator, str):\n return ValueConstraintOperators.STRING_OPERATOR_MAP[operator]\n else:\n return operator",
"def sign(tensor):\n raise NotImplementedError",
"def _get_s... | [
"0.60805744",
"0.6074153",
"0.60536754",
"0.6046379",
"0.5936065",
"0.57856554",
"0.5749952",
"0.5749952",
"0.56807107",
"0.5619427",
"0.5603946",
"0.5603946",
"0.5603946",
"0.55929106",
"0.5591519",
"0.55702126",
"0.55640054",
"0.55177474",
"0.55177474",
"0.55090773",
"0.550... | 0.7195741 | 0 |
Operator converter for softshrink. | def convert_softshrink(g, op, block):
x = g.get_node(op.input("X")[0])
dtype = infer_type(x).checked_type.dtype
threshold = _expr.const(op.attr("lambda"), dtype=dtype)
zeros = _op.zeros_like(x)
out = _op.where(x < -threshold, x + threshold, zeros) + _op.where(
x > threshold, x - threshold, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_hard_shrink(g, op, block):\n\n x = g.get_node(op.input(\"X\")[0])\n dtype = infer_type(x).checked_type.dtype\n threshold = op.attr(\"threshold\")\n threshold = _op.const(threshold, dtype)\n out = _op.logical_or(x < _op.const(-1.0, dtype) * threshold, x > threshold)\n out = _op.cast(ou... | [
"0.65026414",
"0.577002",
"0.54811186",
"0.52285105",
"0.52283525",
"0.5220927",
"0.5206747",
"0.50266504",
"0.50163966",
"0.50134104",
"0.49183387",
"0.4913384",
"0.49048072",
"0.49048072",
"0.48885062",
"0.4887106",
"0.48591813",
"0.48530793",
"0.4853046",
"0.4850403",
"0.4... | 0.66945577 | 0 |
Operator converter for square. | def convert_square(g, op, block):
x = g.get_node(op.input("X")[0])
dtype = block.var(op.output("Out")[0]).dtype
dtype = _convert_dtype_value(dtype)
out = _op.power(x, _expr.const(2, dtype))
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sqrty():\n return Operator([[(1.+1.j)/2,(-1-1.j)/2],[(1.+1.j)/2,(1.+1.j)/2]])",
"def applyOperator(self, operand1, operand2, operator):\n\n if operator == \"*\":\n return operand1 * operand2\n elif operator == \"/\":\n return operand1 / operand2\n elif operator =... | [
"0.66512764",
"0.6315961",
"0.6215341",
"0.6198324",
"0.61630064",
"0.61558384",
"0.60706353",
"0.6068672",
"0.605998",
"0.5936077",
"0.59243846",
"0.5911677",
"0.5902512",
"0.58336496",
"0.58297116",
"0.5827617",
"0.577833",
"0.574983",
"0.5742669",
"0.5740575",
"0.57302254"... | 0.6545428 | 1 |
Operator converter for take_along_axis. | def convert_take_along_axis(g, op, block):
x = g.get_node(op.input("Input")[0])
idx = g.get_node(op.input("Index")[0])
axis = op.attr("Axis")
out = _op.gather(x, axis, idx)
g.add_node(op.output("Result")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def take_along_axis(module, x, indices, axis):\n if module in [np, ma]:\n return np.take_along_axis(x, indices, axis)\n elif module == torch:\n return torch.gather(x, axis, indices)\n elif module == tf:\n return tf.gather(x, indices, axis=axis)\n elif module == jnp:\n return... | [
"0.60613686",
"0.5825135",
"0.5557381",
"0.5504101",
"0.5453003",
"0.54450935",
"0.53369266",
"0.5333037",
"0.5325084",
"0.52878755",
"0.5253225",
"0.52008206",
"0.5159457",
"0.5156909",
"0.5117813",
"0.500615",
"0.49649787",
"0.4961193",
"0.4926329",
"0.49202973",
"0.4904256... | 0.6652812 | 0 |
Operator converter for tanhshrink. | def convert_tanhshrink(g, op, block):
x = g.get_node(op.input("X")[0])
out = x - _op.tanh(x)
g.add_node(op.output("Out")[0], out) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_tanh(node, **kwargs):\n return create_basic_op_node('Tanh', node, kwargs)",
"def _255_to_tanh(x):\n return (x - 127.5) / 127.5",
"def tanh_inplace(a):",
"def tanh(a):",
"def tanh(self):\t\t\t\t\n\t\tval = np.tanh(self.val)\n\t\tif len(self.der.shape):\n\t\t\tto_multiply = 1 / np.power(np.... | [
"0.68237334",
"0.62174433",
"0.6169689",
"0.6150189",
"0.6055774",
"0.6047441",
"0.5998708",
"0.5984056",
"0.593681",
"0.593681",
"0.593681",
"0.5936295",
"0.5907128",
"0.5907128",
"0.5857891",
"0.58383167",
"0.5813798",
"0.57725644",
"0.5668529",
"0.5645125",
"0.56403744",
... | 0.710742 | 0 |
Operator converter for thresholded_relu. | def convert_thresholded_relu(g, op, block):
x = g.get_node(op.input("X")[0])
dtype = infer_type(x).checked_type.dtype
threshold = op.attr("threshold")
threshold = _expr.const(threshold, dtype)
zero = _expr.const(0, dtype=dtype)
out = tvm.relay.where(x > threshold, x, zero)
g.add_node(op.out... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_relu(node, **kwargs):\n return create_basic_op_node('Relu', node, kwargs)",
"def __relu(x):\n return x if x > 0 else 0",
"def to_op(self):\n raise NotImplementedError",
"def convert_broadcast_lesser(node, **kwargs):\n return create_basic_op_node('Less', node, kwargs)",
"def _con... | [
"0.6601652",
"0.59161276",
"0.5867969",
"0.5807259",
"0.5798324",
"0.5790616",
"0.5768523",
"0.57549673",
"0.5741801",
"0.57358277",
"0.5733944",
"0.5733944",
"0.56448823",
"0.56272215",
"0.56133",
"0.56133",
"0.557728",
"0.5555194",
"0.5531945",
"0.55261135",
"0.5512407",
... | 0.6844376 | 0 |
Operator converter for topk. | def convert_topk(g, op, block):
data = g.get_node(op.input("X")[0])
if op.input("K"):
k = g.get_node(op.input("K")[0])
else:
k = op.attr("k")
largest = True
axis = -1
if op.has_attr("axis"):
axis = op.attr("axis")
if op.has_attr("largest"):
largest = op.attr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_topk(node, **kwargs):\n name, input_nodes, attrs = get_inputs(node, kwargs)\n\n axis = int(attrs.get('axis', '-1'))\n k = int(attrs.get('k', '1'))\n ret_type = attrs.get('ret_typ')\n dtype = attrs.get('dtype')\n outputs = [name + '_output0']\n\n if ret_type and ret_type == 'both':\... | [
"0.6484652",
"0.63059014",
"0.5944628",
"0.59052175",
"0.5884074",
"0.5842197",
"0.5824639",
"0.5824639",
"0.5772058",
"0.5750794",
"0.5750794",
"0.5750794",
"0.57162213",
"0.56519246",
"0.5605655",
"0.5605655",
"0.5605655",
"0.5605655",
"0.5605655",
"0.5605655",
"0.5605655",... | 0.67537606 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.