query
stringlengths
9
3.4k
document
stringlengths
9
87.4k
metadata
dict
negatives
listlengths
4
101
negative_scores
listlengths
4
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Adds founder to the project model form, saves the project in the database, calls the generate_matches() function to find & save projectuser matches, and redirects to the newly created project.
def form_valid(self, form): form.instance.founder = self.request.user print('Project Create user:', self.request.user) form.save() tc_lib.generate_user_matches(form) return super(ProjectCreate, self).form_valid(form)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def post_project():\n\n title = request.form.get('title')\n description = request.form.get('description')\n max_grade = request.form.get('max_grade')\n\n hackbright.make_new_project(title, description, max_grade)\n\n flash(\"Successfully added new project.\")\n\n return redirect(\"/project?title=...
[ "0.64061403", "0.6365428", "0.6048063", "0.602952", "0.5996432", "0.5994576", "0.5934493", "0.5910736", "0.5836684", "0.5801637", "0.5649979", "0.56395286", "0.56146103", "0.56023854", "0.55345714", "0.5534347", "0.5526762", "0.54719496", "0.5466361", "0.5405478", "0.5380776"...
0.74070966
0
Saves updated project & updates matches
def form_valid(self, form): form.save() tc_lib.generate_user_matches(form) return super(ProjectUpdate, self).form_valid(form)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_update_project(self):\n pass", "def test_update_project(self):\n pass", "def updateProjects(request):\n\n updater = ProjectUpdater()\n updater.run()\n return http.HttpResponse(\"Ok\")", "def update_project_info(data):\n\tif 'pk' in data:\n\t\tif data['pk'] is not None:\n\t\t\tprojec...
[ "0.6666862", "0.6666862", "0.64597833", "0.64008605", "0.6306303", "0.63030815", "0.6265163", "0.60814726", "0.607015", "0.60690033", "0.6031735", "0.6022908", "0.60155773", "0.59901875", "0.59319353", "0.59274477", "0.5924613", "0.58947945", "0.5891769", "0.58741504", "0.586...
0.62962663
6
Get context settings from settings file
def cont_settings_(request): return {"settings": settings}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def settings():\n return _get_settings()[1]", "def get_settings():\n with open('config/config.json') as data_file:\n settings = json.load(data_file)\n return settings", "def get_settings(self):\n return self.settings", "def settings(self) -> BaseSettings:\n return self._context.se...
[ "0.7350716", "0.70881957", "0.6939091", "0.6747737", "0.6747737", "0.6719403", "0.6695703", "0.6654436", "0.66110146", "0.6606867", "0.65870684", "0.6585609", "0.65704316", "0.6561872", "0.6488017", "0.643289", "0.642774", "0.6414869", "0.6413213", "0.6410114", "0.6381779", ...
0.6421794
17
create a database connection to the SQLite database specified by db_file
def create_connection(db_file): conn = None try: conn = sqlite3.connect(db_file) except Error as e: print(e) return conn
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_db_connection(db_file):\n\n conn = None\n try:\n conn = sqlite3.connect(db_file)\n except Exception as e:\n print(e)\n\n return conn", "def create_connection(db_file):\n conn = sqlite3.connect(db_file)\n return conn", "def create_connection(db_file):\n\n conn = Non...
[ "0.8495971", "0.8480287", "0.84048176", "0.83985376", "0.8376708", "0.836962", "0.83382237", "0.8337434", "0.83369064", "0.83178604", "0.8316169", "0.82985616", "0.8284187", "0.82726485", "0.8269472", "0.8269472", "0.8269472", "0.8269233", "0.82612914", "0.8252832", "0.824612...
0.82077783
32
Create a new project into the projects table
def create_project(conn, project): sql = ''' INSERT INTO projects(name,score) VALUES(?,?) ''' cur = conn.cursor() cur.execute(sql, project) return cur.lastrowid
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def project_create(project):\n client.project.create(project)", "def create_project(self, project):\n\n with self._transaction.cursor() as cur:\n if project.project_id is not None:\n id_ = project.project_id\n else:\n cur.execute(\"SELECT MAX(project_...
[ "0.7921659", "0.77556336", "0.7678355", "0.7580358", "0.7519418", "0.75189924", "0.74265754", "0.73507255", "0.73412985", "0.7293322", "0.7266177", "0.7233687", "0.71650076", "0.7127706", "0.6995864", "0.6994615", "0.6951834", "0.69482076", "0.6931353", "0.6914599", "0.690889...
0.75309646
4
open and read data from a ascii text file into a numpy array. The number of rows and columns in the data file will match the size of the array. sep is the character seperation between fields in the data file dtype is the how the file data is to be interpretted. skiplines = n skips the first n line(s). skipfirstcols = n...
def datafile2array (datafile=" ",sep=None, dtype="float",skiplines=0, \ skipfirstcols=0, skiplastcols=0): fid=open(datafile) data=fid.readlines() fid.close() dataarray=[] for row in range(skiplines,len(data)): data[row]=convertd2e(data[row]) data[row]=string.split(data[row],sep)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_external_data(fname,sep='\t',coma=False,bn=False,header=0):\n\tf = open(fname,\"r\")\n\tLines = f.readlines()[header:]\n\tN = len(Lines)\n\tnVal = len(Lines[N-1].split(sep)) # using last line as reference for number of cloumns\n\tA = np.zeros((N,nVal))\n\tfor line in range(N):\n\t\tif coma:\n\t\t\tLines[l...
[ "0.71633273", "0.7097063", "0.6835939", "0.67921716", "0.6781728", "0.67714864", "0.6729074", "0.66158575", "0.6595548", "0.65530527", "0.65467334", "0.65177995", "0.6492238", "0.648248", "0.64798844", "0.6477866", "0.64174914", "0.638802", "0.63857937", "0.638391", "0.637695...
0.6653626
7
Create Glue Dev Endpoint
def create_dev_endpoint(self): self.dev_endpoint = self.glue_engine.create_dev_endpoint( EndpointName=self.dev_endpoint_name, RoleArn=self.dev_endpoint_role, PublicKey=self.dev_endpoint_pub_rsa, NumberOfNodes=2, ExtraPythonLibsS3Path=self.python_libra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_endpoint(EndpointName=None, EndpointConfigName=None, Tags=None):\n pass", "def create_endpoint(path, workspace):\n client = Client()\n\n client.create_endpoint(path, workspace=workspace)", "def endpoint_create(self, endpoint_name=None, config=None):\n if config is None:\n ...
[ "0.633509", "0.6196592", "0.6004353", "0.593839", "0.5891074", "0.5852167", "0.58136016", "0.5763851", "0.57030064", "0.562547", "0.55829406", "0.55522805", "0.55486447", "0.55259037", "0.5472503", "0.54074615", "0.5405777", "0.5385364", "0.53611857", "0.5356907", "0.5353822"...
0.73661804
0
Delete Glue Dev Endpoint
def delete_dev_endpoint(self): self.glue_engine.delete_dev_endpoint(EndpointName=self.dev_endpoint_name)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def delete_endpoint(EndpointName=None):\n pass", "def delete_handler(event, context):\n delete_endpoint_config(event)", "def delete_endpoint(self):\n logger.warning(f\"Deleting hosting endpoint '{self.endpoint_name}'...\")\n self._realtime_predictor.delete_endpoint()", "def delete_endpoin...
[ "0.7355473", "0.7192038", "0.69872594", "0.6578153", "0.6334313", "0.6297704", "0.62821496", "0.61767966", "0.6053079", "0.6046499", "0.60339475", "0.6027786", "0.5983133", "0.59529054", "0.5951396", "0.5926549", "0.5921632", "0.57891357", "0.5771835", "0.576563", "0.573931",...
0.7549312
0
Connect to Glue Dev Endpoint
def connect_dev_endpoint(self): done = False while not done: endpoint = self.glue_engine.get_dev_endpoint(EndpointName=self.dev_endpoint_name) status = endpoint["DevEndpoint"]["Status"] done = status == "READY" if status == "PROVISIONING": ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_dev_endpoint(self):\n\n self.dev_endpoint = self.glue_engine.create_dev_endpoint(\n EndpointName=self.dev_endpoint_name,\n RoleArn=self.dev_endpoint_role,\n PublicKey=self.dev_endpoint_pub_rsa,\n NumberOfNodes=2,\n ExtraPythonLibsS3Path=self....
[ "0.63102233", "0.6122564", "0.6047225", "0.60375047", "0.5978164", "0.58321375", "0.5771107", "0.573747", "0.5714928", "0.5713471", "0.5713471", "0.5709945", "0.57074934", "0.5687956", "0.5638669", "0.56293046", "0.5627169", "0.5550863", "0.5526117", "0.54849017", "0.54776275...
0.6406663
0
Parent scope and symbol table name
def __init__(self, name, parent=None): self.current_scope = Scope(name, parent)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def scope(self):\n return 'global' if self.parent is None else 'local'", "def name_scope(self):\n pass", "def enterScope(self, name):", "def scope(self): # noqa: ANN201", "def scope(self, name):\r\n raise NotImplementedError", "def create_symbol_table(root):\n\n set_depth(root, 0)\n #...
[ "0.70328575", "0.68455905", "0.66242045", "0.64121795", "0.6390089", "0.63279307", "0.6215206", "0.61222845", "0.60952425", "0.5887968", "0.5884978", "0.58569854", "0.58283883", "0.58075684", "0.57997024", "0.57550865", "0.5734227", "0.5569736", "0.5549095", "0.55363774", "0....
0.62843376
6
Put variable symbol or fundef under entry
def __setitem__(self, name, symbol): self.current_scope[name] = symbol
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_got_entry(self, symbol_name, newaddr):\n\n if symbol_name not in self.imports:\n l.warning(\"Could not override the address of symbol %s: symbol entry not \"\n \"found in GOT\", symbol_name)\n return\n\n self.memory.write_addr_at(self.imports[symbol_na...
[ "0.57483673", "0.5659725", "0.5421766", "0.5333725", "0.53114116", "0.5230942", "0.5189403", "0.5175529", "0.51708925", "0.51681304", "0.51516306", "0.51408273", "0.5126233", "0.5089943", "0.5083042", "0.5082548", "0.50656974", "0.5022411", "0.5009116", "0.49597615", "0.49554...
0.46433038
40
Get variable symbol or fundef from entry
def __getitem__(self, name): return self.current_scope[name]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Var(key):\n return vars[key]", "def get_symbol_value(self, obj, name):\n # Lookup symbol:\n if obj.has_symbol(name):\n return obj.get_symbol_value(name)\n elif name in self.extra_symbols:\n return self.extra_symbols[name]\n else:\n raise Compile...
[ "0.5803726", "0.5714313", "0.56129336", "0.5610046", "0.55572444", "0.5453818", "0.54439676", "0.5438111", "0.5428706", "0.54056865", "0.5361129", "0.53353757", "0.5286807", "0.5285353", "0.52757484", "0.52757484", "0.52355003", "0.5219401", "0.5202948", "0.51684237", "0.5158...
0.0
-1
This method support to config the advance option of zd syslog feature
def _set_advance_syslog(zd, **kwargs): xlocs = LOCATOR_CFG_SYSTEM_NETWORKMGMT adv_opt = ['zd_facility_name', 'zd_priority_level', 'ap_facility_name', 'ap_priority_level'] adv_cfg = {'pause': 1} adv_cfg.update(kwargs) if zd.s.is_element_present(xlocs['syslog_advanced_setting_collapse']): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_enable_syslog(self) -> Union[bool, None]:\n # read the original value passed by the command\n enable_syslog = self.raw_param.get(\"enable_syslog\")\n\n # this parameter does not need dynamic completion\n # this parameter does not need validation\n return enable_syslog", ...
[ "0.6081552", "0.6067496", "0.6043397", "0.5979013", "0.5853631", "0.5756815", "0.5755001", "0.5656631", "0.5582538", "0.5562076", "0.5491174", "0.5480679", "0.5466313", "0.54245096", "0.5423763", "0.5375122", "0.536843", "0.53460175", "0.53303653", "0.5327427", "0.53229415", ...
0.68598795
0
Configure the country code and related option
def set_country_code(zd, option, **kwargs): cfg_option = {'country_code': '', 'channel_optimization': '', 'channel_mode':''} cfg_option.update(option) xloc = LOCATOR_CFG_SYSTEM_COUNTRY_CODE xloc_map = { 'country_code': xloc['country_code_listbox'], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def domain_settings_set_country(self, country):\n return self._request('domain/settings/set_country', inspect_args_func(inspect.currentframe()))", "def setup_plugins(self):\n super(Site, self).setup_plugins()\n self.plugins.countries.configure(hide_region=True)\n self.plugins.ledger.c...
[ "0.68588054", "0.667291", "0.64471006", "0.63912165", "0.637591", "0.63027674", "0.6246238", "0.6234282", "0.6234282", "0.6234282", "0.6234282", "0.6234282", "0.61908615", "0.61586636", "0.6097614", "0.6056722", "0.59633374", "0.5948035", "0.5808251", "0.57715803", "0.5738969...
0.7575244
0
Very unlikely case; can happen only in case of divergence of clocks between local and remote (which is simulated in this test).
def test_reset_to_remote_after_rebase(self) -> None: ( self.repo_sandbox .new_branch("branch-0") .commit() .push() .new_branch("branch-1") .commit() .push() .check_out("branch-0") .commit() ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_clock_external():\n clock = Clock(time=0.0)\n assert not clock.realtime\n assert clock.time == 0.0\n clock.update()\n assert clock.time == 0.0\n clock.update(time=0.1)\n assert clock.time == 0.1\n clock.update()\n assert clock.time == 0.1\n clock.update(time=0.0)\n assert ...
[ "0.68745613", "0.64997435", "0.6132579", "0.60734916", "0.60104746", "0.5951561", "0.59126306", "0.59090537", "0.5885051", "0.58827645", "0.5875324", "0.5810765", "0.57697845", "0.5646132", "0.5610197", "0.55758786", "0.5533635", "0.5519143", "0.5482513", "0.54629886", "0.545...
0.0
-1
Run a single iteration of MAML algorithm
def update(self, max_norm=1.0): theta_prime = [] for i, batch in enumerate(self.tasks): y_hat = self.constraint(self.theta, self.f(batch)) # gather predictions to single dimension loss = self.criteon( y_hat, self.y ) #compute gradients grad = tor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def algorithm_loop(self):", "def _run(self):\n self._algorithm(self._list, self)", "def run(self):\n self.membershipFunction()\n self.interpretingMF()\n self.rules()\n self.standardComposition_Min()\n self.standardComposition_Max()\n self.defuzzification()", "...
[ "0.64284474", "0.6224809", "0.6140049", "0.60375696", "0.59633714", "0.59292954", "0.59246325", "0.5874403", "0.5825447", "0.57913053", "0.5775217", "0.57627815", "0.5741909", "0.57050776", "0.56909686", "0.56607676", "0.5652616", "0.5651427", "0.5635535", "0.5587216", "0.553...
0.0
-1
Compute dot product of X and parameters theta
def constraint(self, theta, labels): # N = batch size ; K = batch size y = labels.to(device) # K x N dot = torch.matmul( y, theta ) # (K x N) • (N x 1) --> (K x 1) dot.requires_grad_() #bug fix to retain computational graph return dot.to(device)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xdot(self, t, x, u, w):\n a= u[0]\n thetadot = u[1]\n theta = x[2]\n v = x[3]\n w = w * self.w_scale\n return np.array([v*np.cos(theta), v*np.sin(theta), thetadot, a]) + np.array([np.cos(theta) * w[0] - np.sin(theta) * w[1], np.sin(theta) * w[0] + np.cos(theta) * w[1],...
[ "0.7065452", "0.67544985", "0.6609277", "0.651859", "0.6499192", "0.6493572", "0.6425357", "0.6369244", "0.6321881", "0.63152367", "0.6297305", "0.6279178", "0.6278761", "0.6278761", "0.6278761", "0.6278761", "0.6252927", "0.6240762", "0.6235969", "0.62354994", "0.62022895", ...
0.0
-1
Extended Euclid algorithm Return
def extended_euclid(a, b): A, B = a, b sa, sb = (1 if a >= 0 else -1), (1 if b >= 0 else -1) xp, yp = 1, 0 x, y = 0, 1 while b: assert A * xp + B * yp == a assert A * x + B * y == b r = a // b a, b = b, a % b x, xp = xp ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extEuclid(a, b):\n x = 0\n lastx = 1\n y = 1\n lasty = 0\n while b != 0:\n quotient = a // b\n a, b = b, a % b\n x, lastx = lastx - quotient * x, x\n y, lasty = lasty - quotient * y, y\n return (lastx, lasty, a)", "def extended_euclid(a: int, b: int) -> (int, int...
[ "0.7228643", "0.7153665", "0.70118415", "0.687281", "0.67860484", "0.6782806", "0.6773914", "0.6765652", "0.67297196", "0.67069113", "0.6641885", "0.6637498", "0.6619904", "0.66036296", "0.6574276", "0.6553299", "0.6512049", "0.6484865", "0.64776146", "0.6465775", "0.64624035...
0.6887075
3
Polynomial euclidian division or modular reduction
def __mod__(A, B): if isinstance(B, Polynomial): return A.euclidean_division(B)[1] else: assert isinstance(B, int) assert all(isinstance(c, int) for c in A) return A.reduceP(B)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def division_euclidienne(n1, n2):", "def PolyMulRed(multipliees, poly):\n if poly.degree() < 1:\n return poly.getRing().zero\n product = multipliees.pop()\n for factor in multipliees:\n #print type(product)\n #if factor.degree() >= poly.degree():\n #factor = PolyMod(factor, p...
[ "0.64242476", "0.63933975", "0.6354119", "0.6272182", "0.6251357", "0.6182237", "0.61773276", "0.61479014", "0.61009127", "0.60918975", "0.60858375", "0.60691077", "0.60441035", "0.6034377", "0.59729946", "0.5970433", "0.5970406", "0.5958945", "0.5954408", "0.59449774", "0.59...
0.596293
17
Outputs an element of the kernel of M zero and one are elements of the same field
def gaussianElimKer(M, zero, one): # V satisfies the invariant # M = V M_0 V = [Polynomial([zero] * i + [one]) for i in range(len(M))] pivots = [None] * (len(M) + 1) for l in range(len(M)): while M[l].deg >= 0: idp = M[l].deg if pivots[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kernel_output(self):\n\t\treturn self.kernel_shape_param('O')", "def kernel(self):\n V = self.matrix().kernel()\n D = self.domain()\n if not D.is_ambient():\n # Transform V to ambient space\n # This is a matrix multiply: we take the linear combinations of the basis...
[ "0.60628897", "0.5974397", "0.5965734", "0.58904815", "0.5837613", "0.58273166", "0.57503784", "0.57051253", "0.56991684", "0.5693178", "0.56325704", "0.5607857", "0.56029475", "0.55216193", "0.54932606", "0.54315543", "0.5401348", "0.53974634", "0.537357", "0.5362223", "0.53...
0.5934563
3
Berlekamp's algorithm only in Z/pZ
def factor_unit(P): assert all(isinstance(c, ModInt) for c in P) assert len(set(c.n for c in P)) == 1 if P.deg == 1: return defaultdict(int, {P: 1}) p = P[0].n S = Polynomial.gcd(P, P.prime()) if S.deg == P.deg: # P' = 0 so P = R^p R ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _derZ(self, w, x, y, z):\n if _isscalar(w):\n w_pos = max(min(self.wSearchFunc(self.w_list, w), self.w_n - 1), 1)\n x_pos = max(min(self.xSearchFunc(self.x_list, x), self.x_n - 1), 1)\n y_pos = max(min(self.ySearchFunc(self.y_list, y), self.y_n - 1), 1)\n z_po...
[ "0.625011", "0.6232984", "0.61854947", "0.61832255", "0.6062003", "0.6033784", "0.58743316", "0.5869196", "0.5858768", "0.5842782", "0.5830244", "0.5744559", "0.57140094", "0.5713287", "0.57087094", "0.5697169", "0.5680805", "0.56683946", "0.5666274", "0.566521", "0.5647926",...
0.0
-1
Factorization of P only in Z/pZ
def factor(P): cd = P[-1] if P.deg == 0: return (cd, defaultdict(int)) P = P * (1 / cd) return (cd, P.factor_unit())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def m_p(Z0, P0, P):\n return m(Z0) * P/P0", "def calculate_compressibility_factor(p_in, p_out, temp_in, temp_out):\n temp = np.transpose([200, 300, 400, 500, 600, 800, 1000, 2000])\n\n p = [1, 10, 20, 40, 60, 80, 100, 200, 400, 600, 800, 1000]\n\n z = [\n [1.0007, 1.0066, 1.0134, 1.0275, 1.042...
[ "0.67533255", "0.6711643", "0.63669366", "0.6281398", "0.6181369", "0.6092854", "0.6037714", "0.6024271", "0.59726965", "0.59415257", "0.5912577", "0.58988357", "0.58988357", "0.58640444", "0.5860903", "0.58504707", "0.5848791", "0.58143747", "0.5809425", "0.5775697", "0.5770...
0.64669913
2
Number of distinct real roots by Sturm's theorem. Only works on int or float coefficients
def sturm(P): inf = float('inf') assert P.isreal() A = P B = A.prime() l1 = [A(-inf)] l2 = [A(inf)] while B: l1.append(B(-inf)) l2.append(B(inf)) B, A = -A % B, B return Polynomial.sign_changes(l1) - Polynomial.sign_chan...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def count_real_roots(f, inf=None, sup=None):\n return dmp_count_real_roots(f.rep, f.lev, f.dom, inf=inf, sup=sup)", "def solve(n=5000,C=-6*10**11,a=900,b=3):\n coeffs = np.zeros(n+2)\n coeffs[0] = a-b*n\n coeffs[1] = b*(n+1) - a\n coeffs[-3] = -C\n coeffs[-2] = 2*C - a\n coeffs[-1] = a+b-C\n mp.dps = 27\n...
[ "0.6351919", "0.6320045", "0.6290037", "0.61954206", "0.61092985", "0.6081375", "0.6071471", "0.6062038", "0.6049215", "0.5948555", "0.5918897", "0.59115165", "0.5889198", "0.5887998", "0.5875352", "0.5869569", "0.58642536", "0.586371", "0.5857666", "0.5851839", "0.58490807",...
0.0
-1
Number of real roots with multiplicity
def r1(P): assert P.isreal() ans = 0 s = P.sturm() while s: ans += s P = P.gcd(P.prime()) s = P.sturm() return ans
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def count_real_roots(f, inf=None, sup=None):\n return dmp_count_real_roots(f.rep, f.lev, f.dom, inf=inf, sup=sup)", "def actual_root(x):\n root = x ** (1/n)\n\tprint(x)\n return root", "def nthRoot(x,n):\n return op.pow(x,1/n)", "def n_root_of_x(n, x):\n if n==0:\n r...
[ "0.69429535", "0.6800597", "0.65914255", "0.64846903", "0.6477586", "0.64012885", "0.6366599", "0.63052356", "0.6300037", "0.62955916", "0.62899053", "0.6287997", "0.6188318", "0.6162287", "0.6144717", "0.6116721", "0.6113149", "0.60975826", "0.6061156", "0.6012611", "0.60074...
0.5889346
31
Resultant of two real polynomials
def resultant(P, Q): return np.linalg.det(P.sylvester(Q))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def polynomial_sum(x1, x2):\n #-- convert variable to array if importing a single value\n x2 = np.atleast_1d(x2)\n return np.sum([c * (x2 ** i) for i,c in enumerate(x1)],axis=0)", "def sqrtx():\n return Operator([[(1.+1.j)/2,(1.-1.j)/2],[(1.-1.j)/2,(1.+1.j)/2]])", "def _canonical_sub(poly1, poly2):...
[ "0.6558392", "0.6205322", "0.6105909", "0.59927195", "0.5848313", "0.58337396", "0.57960296", "0.57548285", "0.5744489", "0.5712182", "0.56610626", "0.5658947", "0.56573385", "0.5656561", "0.5656128", "0.5648092", "0.56425613", "0.56347436", "0.5632483", "0.56186455", "0.5588...
0.0
-1
Discriminant of a real polynomial
def disc(P): ans = P.resultant(P.prime()) / P[-1] if P.isinteger(): ans = int(ans.round()) if P.deg % 4 in [0, 1]: return ans else: return -ans
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def discriminant(self):\r\n return self.__b**2 - (4 * self.__a * self.__c)", "def discriminant(f):\n return f.per(dmp_discriminant(f.rep, f.lev, f.dom), lower=True)", "def derivitive(x):\n return x * 1", "def _list_coefficients_by_discriminant(self, fd=True, pos=True, neg=True, printimag=Fal...
[ "0.67052084", "0.57469004", "0.57143277", "0.5695087", "0.5507396", "0.53774583", "0.53657305", "0.5324863", "0.53193444", "0.52919585", "0.52769744", "0.5238069", "0.52236104", "0.5143073", "0.5126083", "0.50868315", "0.5075893", "0.50662714", "0.50404316", "0.50376505", "0....
0.48961386
41
clear and reload the menu with a new set of options. valueList list of new options value initial value to set the optionmenu's menubutton to
def SetMenu(self,valueList,value=None): self['menu'].delete(0,'end') for item in valueList: self['menu'].add_command(label=item, command=_setit(self.variable,item,self.command)) if value: self.variable.set(value)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_values( self, values ):\n #self.listbox.configure( values )\n # clear\n #for", "def callback_ResetDropdown(window):\n # set values and value to empty to get rid of previously specified answers\n window['changeMod'].update('Change ___:')\n window['changeOptions'].update(value...
[ "0.6825974", "0.6282686", "0.6281264", "0.60528725", "0.59343994", "0.58950996", "0.58235645", "0.57722116", "0.5739688", "0.5734824", "0.57013357", "0.56410277", "0.56107605", "0.5551239", "0.5550398", "0.55394113", "0.5537057", "0.543177", "0.54266053", "0.54241765", "0.537...
0.73797125
0
Encodings for "Embarked" column 2 == "S" == Southampton == 644 people 0 == "C" == Cherbourg == 168 people 1 == "Q" == Queenstown == 77 people 3 == "Unknown" == 2 people 177 records missing age values set to the average age Missing embark_towns are set to "Other" Encodings for "Class" First class == 0 Second class == 1 ...
def prepare_titanic_data(df): df.embark_town.fillna('Other', inplace=True) # Drop deck and embarked_town df.drop(columns=['deck', 'embark_town'], inplace=True) # Encoding: Objects (Categorical Variables) to Numeric # Use sklearn's LabelEncoder encoder = LabelEncoder() # Set Unknown and e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pre_process_data(df):\n # setting `passengerID` as Index since it wont be necessary for the analysis\n df = df.set_index(\"PassengerId\")\n\n # convert 'Sex' values\n df['gender'] = df['Sex'].map({'female': 0, 'male': 1}).astype(int)\n\n # We see that 2 passengers embarked data is missing, we fi...
[ "0.585451", "0.5384007", "0.5313047", "0.53103215", "0.52985805", "0.5278899", "0.522569", "0.52152556", "0.520184", "0.51793325", "0.5156087", "0.50948936", "0.50056297", "0.49981564", "0.49954587", "0.4945608", "0.4944251", "0.49428275", "0.49331096", "0.49324706", "0.49301...
0.58713156
0
0 == 'setosa' 1 == 'versicolor' 2 == 'virginica' This function will encode the species by default, but can optionally show the species name as a string when the second argument is False. prepare_iris_data(df) returns encoded species name prepare_iris_data(df, False) returns species name
def prepare_iris_data(df, encode=True): # Drop primary/foreign keys df = df.drop(columns=["measurement_id", "species_id"]) # Rename "species_name" to species df = df.rename(columns={"species_name": "species"}) if(encode): encoder = LabelEncoder() encoder.fit(df.species) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rawSpecies(df, specie = \"Caenorhabditis elegans OX=6239\"):\n species = df[df[\"PG.Organisms\"] == specie]\n return species", "def prepare_iris_data(data):\n\n # One-Hot Encode target variable y\n \n X = data.iloc[:, 0:4]\n y = data.iloc[:,-1]\n Y = pd.get_dummies(y)\n \n # Recomb...
[ "0.5924976", "0.57568926", "0.55721927", "0.54730135", "0.5446134", "0.5353316", "0.5202682", "0.5201156", "0.515606", "0.512597", "0.5125128", "0.5123189", "0.5102725", "0.5086768", "0.50764376", "0.50676197", "0.5054898", "0.5050417", "0.5038685", "0.5023871", "0.49641922",...
0.74515724
0
Gets the snapchat IDs that have already been downloaded and returns them in a set.
def get_downloaded(): result = set() for name in os.listdir(PATH): filename, ext = name.split('.') if ext not in EXTENSIONS: continue ts, username, id = filename.split('+') result.add(id) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_id_set(self):\n s = set()\n for player in Player.select(Player.player_id):\n s.add(player.player_id)\n return s", "def filter_seen_messages(self, messages):\n seen_uids = set()\n for uid in messages:\n key = \"%s_%s_%s\" % (self.opt_pop3_server,\n ...
[ "0.61409533", "0.6138558", "0.5750224", "0.56933486", "0.5687567", "0.56794363", "0.5625306", "0.5603618", "0.5598983", "0.5564271", "0.55617774", "0.5561327", "0.55588824", "0.55514014", "0.5539512", "0.5530868", "0.55293196", "0.5450162", "0.5425994", "0.54205567", "0.53855...
0.64585745
0
Download a specific snap, given output from s.get_snaps().
def download(s, snap): id = snap['id'] name = snap['sender'] ts = str(snap['sent']).replace(':', '-') result = s.get_media(id) if not result: return False ext = s.is_media(result) filename = '{}+{}+{}.{}'.format(ts, name, id, ext) path = PATH + filename with open(path, 'w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def download_snaps(s):\n\n existing = get_downloaded()\n\n snaps = s.get_snaps()\n for snap in snaps:\n id = snap['id']\n if id[-1] == 's' or id in existing:\n print 'Skipping:', id\n continue\n\n result = download(s, snap)\n\n if not result:\n ...
[ "0.73581344", "0.6964329", "0.6664417", "0.59816575", "0.58126813", "0.58090883", "0.5769466", "0.56545335", "0.5624676", "0.562231", "0.55915815", "0.5590657", "0.5560722", "0.55601645", "0.55212283", "0.55028254", "0.5490585", "0.5475541", "0.5471203", "0.5432722", "0.54166...
0.7079678
1
Download all snaps that haven't already been downloaded.
def download_snaps(s): existing = get_downloaded() snaps = s.get_snaps() for snap in snaps: id = snap['id'] if id[-1] == 's' or id in existing: print 'Skipping:', id continue result = download(s, snap) if not result: print 'FAILED:', id...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def downloadAll(self, force=False):\n if self.minutesSinceLastUpdate() == 0 and force == False:\n self.log(\"TOO SOON SINCE LAST DOWNLOAD!\")\n return\n for grabber in self.grabbers:\n self.downloadGrab(grabber[\"url\"], grabber[\"ID\"])+\"\\n\"", "def _download_all...
[ "0.66632015", "0.60274625", "0.60035586", "0.5957198", "0.5934118", "0.5919938", "0.5897004", "0.5831177", "0.58302766", "0.5794643", "0.5774174", "0.57472575", "0.57161885", "0.566392", "0.55329263", "0.5514549", "0.54934376", "0.5476704", "0.5452481", "0.543913", "0.5403052...
0.7774038
0
Encodes a native Python value in a way that the API expects. Encodes lists and dicts to JSON and boolean values to 'true' or 'false'.
def api_encode(value): if type(value) in (dict, list): return json_encode(value) elif type(value) == bool: return str(value).lower() return value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def JsonEncode(py_value):\n return JSON_ENCODER.encode(py_value)", "def _encode_value(data):\n\n if type(data) is bool:\n return f'{_TYPE_BOOL}{str(data).lower()}'\n elif type(data) is float:\n return f'{_TYPE_DOUBLE}{str(data)}'\n elif type(data) is int:\n return f'{_TYPE_INT}{str...
[ "0.7380409", "0.73028606", "0.6974219", "0.6965896", "0.6948547", "0.69058067", "0.68838495", "0.67391557", "0.67146885", "0.67039376", "0.65755284", "0.64773065", "0.64079785", "0.64079565", "0.6391889", "0.6390388", "0.6380185", "0.63579655", "0.6314916", "0.62741226", "0.6...
0.8075695
0
Lowlevel method for making API calls. It handles encoding the parameters, constructing authentication headers, decoding the response, and converting API error responses into Python exceptions.
def call(self, api_call, **kwargs): # Encode values for the API (JSON, bools, nulls) params = dict((key, api_encode(value)) for key, value in kwargs.iteritems() if value is not None) params.update(self.defaults) if api_call[0] != "/": api_call = "/" + api_call ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _do_api_call(\n self,\n endpoint_info: tuple[str, str],\n json: dict[str, Any] | None = None,\n wrap_http_errors: bool = True,\n ):\n method, endpoint = endpoint_info\n\n # TODO: get rid of explicit 'api/' in the endpoint specification\n url = f\"https://{sel...
[ "0.67149675", "0.6664818", "0.66358113", "0.65830725", "0.6512704", "0.6511796", "0.6474514", "0.64474", "0.643962", "0.63296205", "0.6321636", "0.6317781", "0.62910086", "0.62778836", "0.6247308", "0.62412024", "0.6229673", "0.62191224", "0.6215646", "0.6215193", "0.6207017"...
0.6754091
0
Parse the response from the API, decoding the JSON and converting errors into exceptions.
def parse_response(self, response): data = json_decode(response) if data['stat'] == 'error': self.logger.debug("Response:\n" + json_encode(data, indent=4)) try: message = data['error_description'] except KeyError: message = data['messa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _parse_response(self, response, all_ops):\n try:\n parsed_response = json.loads(response)\n except Exception, e:\n raise ApiError(e)\n if 'error' in parsed_response: # needed anymore?\n raise ApiError(parsed_response['error'])\n # Return the true API return value.\n return parsed...
[ "0.8096695", "0.78386664", "0.77561957", "0.77350914", "0.7730008", "0.7284812", "0.7064459", "0.6913496", "0.68599725", "0.68185", "0.6777948", "0.6726493", "0.6713444", "0.6688297", "0.6655507", "0.66511434", "0.6546489", "0.6541335", "0.6493854", "0.6456989", "0.64395887",...
0.8244902
0
Sign the API call by generating an "Authentication" header. This method will add headers to the request object and remove auth_token, client_id, and client_secret from the parameters if they exist.
def sign_request(self, request, api_call, params): for key, value in params.items(): params[key] = value.encode('utf-8') # Do not POST authentication parameters. Use them to create an # authentication header instead. access_token = params.pop('access_token', None) cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _addAuthenticationToRequestHeader(request, client):\n request.addAuthorization(client.id, client.secret)", "def authenticate(self):\n\n headers = {\n 'Authorization': 'Bearer ' + self.access_token,\n 'ClientId': self.client_id,\n }\n self.headers.update(h...
[ "0.68053204", "0.666631", "0.62823254", "0.6111792", "0.6090263", "0.6044804", "0.60245746", "0.6016039", "0.5999951", "0.59911007", "0.5989135", "0.59618855", "0.5948747", "0.5922021", "0.59038025", "0.5902988", "0.5885357", "0.5798895", "0.57671404", "0.5763989", "0.5737275...
0.7390419
0
Returns the Rectified Linear Unit (ReLU) activation
def relu(x: jnp.DeviceArray) -> jnp.DeviceArray: return jnp.clip(x, a_min=0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_relu(self):\n activation_name = 'ReLU'\n args = {}\n\n activation = activation_factory.create(activation_name, **args)\n self.assertEqual(activation._get_name(), activation_name)\n\n x = torch.ones(10) * -1\n y = activation(x)\n self.assertEqual(len(torch.n...
[ "0.6779949", "0.66550666", "0.6524321", "0.6480041", "0.639636", "0.639636", "0.6394408", "0.6366181", "0.6363569", "0.63122356", "0.6284705", "0.62716", "0.62474895", "0.623992", "0.6230122", "0.6230122", "0.6192656", "0.61823756", "0.6163329", "0.6142856", "0.6132948", "0...
0.0
-1
Calculates softmax across a desired axis. Arguments
def softmax(x: jnp.DeviceArray, *, axis: int = 0) -> jnp.DeviceArray: return jnp.exp(x) / jnp.expand_dims(jnp.sum(jnp.exp(x), axis=axis), axis)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def softmax(x):\r\n e_x = np.exp(x - np.expand_dims(np.max(x, axis=-1), axis=-1))\r\n return e_x / np.expand_dims(e_x.sum(axis=-1), axis=-1) # only difference\r", "def softmax(x):\n \"\"\"\"\"\"\n return exp(x) / sum(exp(x), axis=0)", "def softmax(x):\n return np.exp(x)/np.sum(np.exp(x),...
[ "0.82091117", "0.8203848", "0.819648", "0.819648", "0.81928647", "0.81735945", "0.81680465", "0.8144589", "0.8144145", "0.813783", "0.8125608", "0.8100958", "0.80981773", "0.80939096", "0.80836487", "0.80836487", "0.80836487", "0.80836487", "0.80836487", "0.80836487", "0.8083...
0.8248852
0
Calculates logsoftmax across a desired axis. Arguments
def log_softmax(x: jnp.DeviceArray, *, axis: int = 0) -> jnp.DeviceArray: return x - jnp.expand_dims(jnp.log(jnp.sum(jnp.exp(x), axis=axis)), axis)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def log_softmax(input, dim, inplace=False):\n return FunctionLib.apply(\n 'LogSoftmax', input.device, [input],\n outputs=[input if inplace else None], axis=dim)", "def log_softmax_nd(logits, axes=(-1,)):\n logits -= tf.reduce_max(logits, axis=axes, keepdims=True)\n return logits - tf.reduc...
[ "0.79187274", "0.78436774", "0.78026515", "0.7745838", "0.7555003", "0.7547153", "0.7151152", "0.7116799", "0.70571184", "0.70393515", "0.7036909", "0.6993901", "0.69822043", "0.6971128", "0.6970583", "0.69682556", "0.69494355", "0.6942103", "0.6942103", "0.6929219", "0.69118...
0.8242526
0
Copy contents of one stream into another.
def copyStreamToStream(streamFrom, streamTo, input_length=sys.maxint, offset=0, buffer=2 ** 2 ** 2 ** 2): streamFrom.seek(offset, 0) nbytes = 0 while nbytes < input_length: chunk = streamFrom.read(min(input_length - nbytes, buffer)) if not chunk: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def copy_to(self, stream, bufsize=None):\n bufsize = bufsize or PRETZEL_BUFSIZE\n if isinstance(stream.write(b''), int):\n # destination stream is synchronous python stream\n try:\n while True:\n stream.write((yield self.read(bufsize)))\n ...
[ "0.6626283", "0.6452199", "0.61475044", "0.6086651", "0.5963692", "0.57964855", "0.5794431", "0.5788323", "0.5749928", "0.56529135", "0.5546919", "0.55270535", "0.5521073", "0.54890835", "0.5436751", "0.543479", "0.54131347", "0.5392881", "0.53848237", "0.53318536", "0.529196...
0.7215272
0
Printout memory usage statistics.
def print_memory_stats(location_tag="undef"): try: import psutil p = psutil.Process(os.getpid()) rm, vm = p.get_memory_info() print "MEM_STAT (%s) rm=%s, vm=%s" % (location_tag, rm, vm) except ImportError: print "psutil module not available"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def print_memory_diags(disable_print=False):\n process = psutil.Process(os.getpid())\n memory = process.memory_info().rss/1000000000.0\n if not disable_print:\n logging.info('\\tMemory usage: {:.3f} GB'.format(memory))\n return memory", "def print_current_mem_usage():\n mem = get_current_me...
[ "0.76514274", "0.7634883", "0.7584728", "0.7564569", "0.736413", "0.7283178", "0.6955679", "0.6937322", "0.6876623", "0.6779077", "0.671467", "0.6708236", "0.66627175", "0.6650455", "0.6588355", "0.6583832", "0.6578967", "0.65692943", "0.6550809", "0.65389204", "0.6524489", ...
0.7896127
0
Emulate mkdir p in Python
def mkdir_p(path): try: os.makedirs(path) except OSError as exc: # Python >2.5 if exc.errno == errno.EEXIST: pass else: raise
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mkdir(path):", "def mkdir_p(path):\n\n if os.path.exists(path):\n return\n\n par = os.path.split(path)[0]\n if os.path.exists(par):\n os.mkdir(path)\n getLogger(__name__).debug('created directory: %s' % path)\n else:\n mkdir_p(par)\n os.mkdir(path)", "def mkdi...
[ "0.85790443", "0.77274257", "0.7671787", "0.75742537", "0.7572717", "0.7570611", "0.755928", "0.7556249", "0.75514513", "0.75461435", "0.750447", "0.7490372", "0.74483955", "0.7435275", "0.7435275", "0.743021", "0.74081475", "0.7405758", "0.7395015", "0.7390141", "0.73887414"...
0.73603517
22
if one interval is present, find smallest r(i) and s(i)
def find_s_in_range(a, b, prev_s, B, c): ri = ceil(2 * (b * prev_s - 2 * B), n) while True: si_lower = ceil(2 * B + ri * n, b) si_upper = ceil(3 * B + ri * n, a) for si in range(si_lower, si_upper): attempt = (c * pow(si, e, n)) % n attempt = rsa1.integer_to_byt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def minimum_spanning_arborescence(sol):", "def minima_in_range(r, g_r, r_min, r_max):\n idx = np.where(np.logical_and(np.greater_equal(r, r_min), np.greater_equal(r_max, r)))\n g_r_slice = g_r[idx]\n g_r_min = g_r_slice[g_r_slice.argmin()]\n idx_min, _ = find_nearest(g_r, g_r_min)\n return r[idx_m...
[ "0.6389933", "0.6331365", "0.5981322", "0.58863753", "0.58531857", "0.58206385", "0.58137876", "0.57930535", "0.57775366", "0.5772619", "0.5735956", "0.5718602", "0.57072574", "0.5689339", "0.56750435", "0.56286925", "0.5615468", "0.56097", "0.5596637", "0.55935144", "0.55795...
0.5192781
73
Cambiamos la potencia de disparo
def cambiar_potencia(self, potencia): self.potencia += potencia self.partida.actualizar_marcador()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mover_bm_derecha(self):\n self.nueva_posicion_posible_parte_superior = self.mapa.consultar_casilla_por_movimiento([self.casilla[0] + 1,\n self.casilla[1]],\n ...
[ "0.5895572", "0.5794777", "0.56389797", "0.5613253", "0.5611132", "0.55967414", "0.55967414", "0.55967414", "0.55967414", "0.55967414", "0.54503614", "0.5439653", "0.53975016", "0.53975016", "0.53975016", "0.53975016", "0.53975016", "0.53975016", "0.5377089", "0.5350562", "0....
0.6105102
0
Comprobamos si el misil ha chocado con algo
def comprobar_colision(self): return self.comprobar_bordes() or self.comprobar_enemigos()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sobrou_pessoas(self):\n return self.counter.ja_viajaram + self.counter.capacidade_max_carro > self.counter.num_passageiros", "def sobrou_pessoas(self):\n return self.counter.ja_dancaram + self.counter.max > self.counter.num_pessoas", "def entre_primeros_cola_recurso(self, recurso):\r\n\r\n ...
[ "0.6578027", "0.64873075", "0.6212477", "0.6159775", "0.59932995", "0.5983284", "0.5980044", "0.5963471", "0.5947538", "0.59128493", "0.58813983", "0.5824275", "0.57191604", "0.5704681", "0.5687284", "0.5645464", "0.55844367", "0.55777586", "0.5577407", "0.55731505", "0.55085...
0.5421493
35
Walk Animation walk_images = os.path.join(_RESFOLDERS, 'Walk', '.gif') walk_list = glob.glob(walk_images)
def iniciar_sprites(self): res_gifs = os.path.join(_RESFOLDERS, '**', '*.gif') gifs_list = glob.glob(res_gifs, recursive=True) for gif in gifs_list: self.guardar_sprite(gif)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load_images(self):\r\n self.standing_frame = [load_image(\"cat1.png\")]\r\n self.walk_frames_r = [load_image(\"cat2.png\"), load_image(\"cat3.png\"),\r\n load_image(\"cat4.png\")]", "def load_images(self, folder):\n cwd = os.getcwd()\n dir = cwd + '/' ...
[ "0.6584038", "0.64543307", "0.6450545", "0.64224446", "0.6325395", "0.6270912", "0.6255214", "0.62539303", "0.61220104", "0.61161965", "0.60567886", "0.59772885", "0.59587044", "0.58857423", "0.5868233", "0.58653075", "0.58591115", "0.5856427", "0.5824385", "0.581767", "0.579...
0.65915805
0
Populate choices using installed apps names.
def _get_target_choices(): apps = [('public', _("Public website"))] for model, entity in registry.registry.items(): if entity.menu: appname = model._meta.app_label.lower() apps.append((appname, unicode(entity.label))) return tuple(apps)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _load_installed_applications(self):\n for application in self.settings.get('apps', None) or []:\n path = None\n if isinstance(application, six.string_types):\n application_name = application\n if application.startswith('gordon.contrib.'):\n ...
[ "0.63182974", "0.6118882", "0.61001414", "0.5881627", "0.5712084", "0.56903887", "0.56577164", "0.56141806", "0.55990887", "0.5588868", "0.5577193", "0.5558418", "0.555771", "0.55525905", "0.5540721", "0.5527112", "0.55160326", "0.5498196", "0.5469074", "0.5469074", "0.546878...
0.67037904
0
Computes the difference between nuclear luminosity and stellar luminosity. Arguments radius (scaled units) mass (scaled units) delta_m, eta, xi convergence paramters mue mean molecular weight pp_factor multiplicative factor for rate Returns Lnuc(R) 4piR2sigmaTeff4
def lum_difference(radius,mass,delta_m,eta,xi,mue,pp_factor): m,r,p,Lnuc = integrate(mass,radius,delta_m,eta,xi,mue,pp_factor,max_steps=10000) return Lnuc[-1]-surface_luminosity(Teff_for_main(m[-1]),r[-1])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_radius(mass,delta_m,eta,xi,mue,pp_factor):\n\n #range of radii; reason in detail under step 9 of report\n r_low = 0.01*Rsun # MKS\n r_high = 3*Rsun # MKS\n \n radius = brentq(lum_difference, r_low, r_high, xtol=1.0e-4, args = (mass,delta_m,eta,xi,mue,pp_factor))\n return radius", "def ...
[ "0.6105835", "0.59289014", "0.543074", "0.5385494", "0.5364295", "0.52827114", "0.52727747", "0.5263927", "0.5261019", "0.5210305", "0.5124193", "0.50878245", "0.5032547", "0.4996151", "0.49636453", "0.49624547", "0.49145013", "0.49066216", "0.48998904", "0.48876116", "0.4845...
0.7697479
0
For a given mass calls rootfind over some range of radii, integrates over the function until the difference in luminosity is zero (nuclear luminosity = surface luminosity) Arguments mass (scaled units) delta_m, eta, xi convergence paramters mue mean molecular weight pp_factor multiplicative factor for rate Returns radi...
def find_radius(mass,delta_m,eta,xi,mue,pp_factor): #range of radii; reason in detail under step 9 of report r_low = 0.01*Rsun # MKS r_high = 3*Rsun # MKS radius = brentq(lum_difference, r_low, r_high, xtol=1.0e-4, args = (mass,delta_m,eta,xi,mue,pp_factor)) return radius
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lum_difference(radius,mass,delta_m,eta,xi,mue,pp_factor):\n m,r,p,Lnuc = integrate(mass,radius,delta_m,eta,xi,mue,pp_factor,max_steps=10000)\n return Lnuc[-1]-surface_luminosity(Teff_for_main(m[-1]),r[-1])", "def omega_min(m,mu,R,epsilon):\r\n num = e**2*mu*m\r\n den = (1 + epsilon)*np.pi*epsilon...
[ "0.63628334", "0.5616132", "0.55902416", "0.5445173", "0.54239476", "0.54030454", "0.53585684", "0.5299843", "0.5293189", "0.5257939", "0.52509886", "0.52108425", "0.5198325", "0.5182825", "0.51755184", "0.5121687", "0.51188475", "0.5108264", "0.5085689", "0.5066682", "0.5065...
0.7381081
0
Fit label encoder and return encoded labels
def fit_transform(self, y): self.fit(y) y = self.transform(y) return y
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getLabelEncoder():\n classes = list(string.letters + string.digits)\n classes.append('')\n le = LabelEncoder()\n le.fit(classes)\n\n return le", "def _label_encoding(self):\n for feat in self.cat_feats:\n if self.train:\n lbl = preprocessing.LabelEncoder()\n ...
[ "0.7709245", "0.74060524", "0.7381838", "0.7095216", "0.70072573", "0.6987247", "0.6944685", "0.6939152", "0.6863985", "0.6795154", "0.6755161", "0.67467165", "0.67164683", "0.6702723", "0.6621941", "0.6621688", "0.6621625", "0.659982", "0.6598669", "0.6583024", "0.65803665",...
0.0
-1
Transform labels to normalized encoding.
def transform(self, y): encode_y = [] for l in y: encode_y.append(self.encode_dict[l]) return np.array(encode_y)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def normalize_labels(labels):\n number_of_labels = len(labels)\n number_of_species = get_number_of_species()\n labels_norm = np.zeros(shape=(number_of_labels, number_of_species))\n for i in range(number_of_labels):\n for label in labels[i]:\n labels_norm[i][label] = 1\n return labe...
[ "0.76837873", "0.7561276", "0.7327029", "0.676241", "0.67546004", "0.6745582", "0.67108583", "0.67108583", "0.66941315", "0.65565425", "0.65238434", "0.6509039", "0.6500992", "0.6406239", "0.6399369", "0.6395231", "0.6381899", "0.6275324", "0.624796", "0.6228423", "0.6221396"...
0.0
-1
Transform labels back to original encoding.
def inverse_transform(self, y): decode_y = [] for l in y: decode_y.append(self.decode_dict[l]) return np.array(decode_y)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def transform_labels(self, labels):\n # Fallback:\n # return self.encoder.transform(labels)\n classes = list(self.classes_())\n return [classes.index(label) for label in labels]", "def transform_labels(self, labels):\n # Fallback:\n # return self.encoder.transform(label...
[ "0.6882506", "0.6882506", "0.6741179", "0.6739755", "0.6735783", "0.6648344", "0.664332", "0.65740603", "0.65029955", "0.64018804", "0.6381971", "0.63109297", "0.62671286", "0.62652683", "0.62445515", "0.6223409", "0.6186954", "0.61339456", "0.6117902", "0.6102551", "0.609954...
0.0
-1
Simple function to create or load existing label encoder If mode is train, alway create new label_encder
def get_or_make_label_encoder(params, problem, mode, label_list=None, zero_class=None): problem_path = params.ckpt_dir create_path(problem_path) le_path = os.path.join(problem_path, '%s_label_encoder.pkl' % problem) if mode == 'train' and not os.path.exists(le_path): label_encoder = LabelEncode...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getLabelEncoder():\n classes = list(string.letters + string.digits)\n classes.append('')\n le = LabelEncoder()\n le.fit(classes)\n\n return le", "def load_encoder(checkpoint, encoder_cls,\n HIDDEN_SIZE, embedding, ENCODER_N_LAYERS, DROPOUT, encoder_name, bidirectional):\n mo...
[ "0.6811553", "0.6775981", "0.6624491", "0.62879103", "0.6285247", "0.6068988", "0.5997439", "0.5965343", "0.5961353", "0.59140944", "0.583923", "0.57692605", "0.576683", "0.57488394", "0.5745894", "0.57296175", "0.56971973", "0.5688705", "0.56653464", "0.5649765", "0.56185657...
0.76493424
0
Performs invalid character removal and whitespace cleanup on text.
def get_dirty_text_ind(text): text = [unicodedata.normalize("NFD", t) for t in text] output = [] for char_ind, char in enumerate(text): if len(char) > 1: output.append(char_ind) continue cp = ord(char) if cp == 0 or cp == 0xfffd or _is_control(char): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _clean_text(self, text):\n output = []\n for char in text:\n cp = ord(char)\n if cp == 0 or cp == 0xFFFD or _is_control(char):\n continue # pragma: no cover\n if _is_whitespace(char):\n output.append(\" \")\n else:\n ...
[ "0.7920124", "0.77979094", "0.7784351", "0.76178944", "0.7598873", "0.7598873", "0.7573618", "0.75095785", "0.74881583", "0.747133", "0.74298596", "0.74298596", "0.74298596", "0.74298596", "0.74298596", "0.74298596", "0.73999673", "0.73868436", "0.7347915", "0.73460495", "0.7...
0.0
-1
Truncates a sequence pair in place to the maximum length.
def _truncate_seq_pair(tokens_a, tokens_b, max_length, rng): # This is a simple heuristic which will always truncate the longer sequence # one token at a time. This makes more sense than truncating an equal percent # of tokens from each, since if one sequence is very short then each token # that's trun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _truncate_seq_pair(tokens_a, tokens_b, max_length):\r\n # This is a simple heuristic which will always truncate the longer sequence\r\n # one token at a time. This makes more sense than truncating an equal percent\r\n # of tokens from each, since if one sequence is very short then each token\r\n # ...
[ "0.76212525", "0.76170105", "0.76076597", "0.76076597", "0.76076597", "0.76075923", "0.7606589", "0.76057845", "0.75904346", "0.75837094", "0.75837094", "0.75500643", "0.7543641", "0.75427634", "0.7526222", "0.7523697", "0.7523697", "0.7523697", "0.7523697", "0.7523697", "0.7...
0.7088472
44
Function to create iterator for single problem
def create_single_problem_generator(problem, inputs_list, target_list, label_encoder, params, tokenizer, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oneIteration(self):\n\t\traise NotImplementedError", "def __iter__(self):\n from sage.combinat.posets.posets import FinitePosets_n\n n = 0\n while True:\n for P in FinitePosets_n(n):\n yield P\n n += 1", "def Iterator():\n return _table.Iterator(...
[ "0.65719175", "0.6319974", "0.620476", "0.6198677", "0.6147318", "0.61301696", "0.6115067", "0.61056054", "0.61056054", "0.61056054", "0.61056054", "0.607066", "0.60035604", "0.5987718", "0.59777164", "0.59777164", "0.59745365", "0.59093684", "0.5884969", "0.5877081", "0.5862...
0.0
-1
Slight modification of original code
def create_pretraining_generator(problem, inputs_list, target_list, label_encoder, params, tokenizer ): if not isinst...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def exo2():", "def regular(self):", "def substantiate():", "def _regr_basic():", "def degibber(self):", "def preprocess(self):", "def apply(self) -> None:", "def apply(self) -> None:", "def apply(self):", "def transform(self):", "def support(self):", "def mezclar_bolsa(self):", "def cx():",...
[ "0.63281816", "0.6115186", "0.60874236", "0.5918467", "0.58835804", "0.58594084", "0.5858156", "0.5858156", "0.58342165", "0.57593906", "0.5706519", "0.5698401", "0.56787497", "0.5618752", "0.5618752", "0.56039673", "0.5594747", "0.55909866", "0.5544119", "0.55239135", "0.552...
0.0
-1
Function to create iterator for multiple problem
def create_generator(params, mode, epoch): # example # problem_list: ['NER', 'CWS', 'WeiboNER', 'WeiboSegment'] # problem_chunk: [['NER'], ['CWS'], ['WeiboNER', 'WeiboSegment']] problem_list = [] problem_chunk = [] for problem_dict in params.run_problem_list: problem_list += list(problem...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __iter__(self):\n from sage.combinat.posets.posets import FinitePosets_n\n n = 0\n while True:\n for P in FinitePosets_n(n):\n yield P\n n += 1", "def simple_given(self):\n for start in self.starts:\n for goal in self.goals:\n ...
[ "0.6440583", "0.63931966", "0.62250286", "0.61782104", "0.61782104", "0.61782104", "0.61782104", "0.61695623", "0.6140463", "0.6036765", "0.6026875", "0.5958148", "0.59446055", "0.5883977", "0.58600575", "0.5824451", "0.5823682", "0.581549", "0.5802804", "0.57958794", "0.5795...
0.0
-1
Creates `TrainingInstance`s for a single document.
def create_instances_from_document( all_documents, document_index, max_seq_length, short_seq_prob, masked_lm_prob, max_predictions_per_seq, vocab_words, rng): document = all_documents[document_index] # Account for [CLS], [SEP], [SEP] max_num_tokens = max_seq_length - 3 # We *usually* w...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def newInstance(self, isTraining):\r\n #-------------------------------------------------------\r\n # Training Data\r\n #-------------------------------------------------------\r\n if isTraining: \r\n if self.dataRef < (self.formatData.numTrainInstances-1):\r\n ...
[ "0.6337999", "0.5772448", "0.5744293", "0.5704514", "0.5674898", "0.5643472", "0.5635663", "0.5591661", "0.55411315", "0.5539144", "0.55102694", "0.5499025", "0.5431758", "0.5427773", "0.5420405", "0.5412793", "0.54060507", "0.5362147", "0.5353257", "0.5305506", "0.52734894",...
0.5607226
7
Creates the predictions for the masked LM objective.
def create_masked_lm_predictions(tokens, masked_lm_prob, max_predictions_per_seq, vocab_words, rng): cand_indexes = [] for (i, token) in enumerate(tokens): if token == "[CLS]" or token == "[SEP]": continue cand_indexes.append(i) rng.shuffle(cand...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_masked_lm_predictions(self,tokens, masked_lm_prob,\n max_predictions_per_seq, vocab_words, rng):\n\n cand_indexes = []\n for (i, token) in enumerate(tokens):\n if token == \"[CLS]\" or token == \"[SEP]\":\n continue\n # Whole Word Mask...
[ "0.708775", "0.70780325", "0.6892917", "0.68383676", "0.68308634", "0.6462661", "0.6367643", "0.60959226", "0.6052701", "0.60371643", "0.594428", "0.5870433", "0.58480185", "0.5783353", "0.5715435", "0.570337", "0.5646313", "0.5646313", "0.5643666", "0.5643666", "0.5643666", ...
0.7008829
2
Given an input string, returns it as the body of an html document. Adapted from example.py included in docutils distribution.
def rst_to_html(input_string, source_path=None, destination_path=None, input_encoding='unicode', doctitle=1, initial_header_level=1): overrides = {'input_encoding': input_encoding, 'doctitle_xform': doctitle, 'initial_header_level': initial_header_level, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rest2html(s):\n return core.publish_string(s, writer=html_fragment_writer)", "def htmlFormat( body = 'No text supplied', title = 'CS 5 project page' ):\n startString = \"\"\"\\\nContent-Type: text/html;\n\n<html>\n<head>\n<title>\n\"\"\"\n afterTitle = \"\"\"\\\n</title>\n</head>\n\n<body>\n\"\"\"\n...
[ "0.66641665", "0.6609217", "0.6305159", "0.6242836", "0.6172251", "0.60931087", "0.6054476", "0.6012877", "0.60044134", "0.59778404", "0.59670067", "0.59541255", "0.5941216", "0.5902097", "0.5884714", "0.588471", "0.583694", "0.57947314", "0.5752858", "0.57214975", "0.5713764...
0.7353787
0
Runs this transform over the given content. We return a new string that is the result of this transform.
def run(self, content): parts = [] offset = 0 for match in self.regexp.finditer(content): parts.append(content[offset:match.start(0)]) parts.append(self.replace(match)) offset = match.end(0) parts.append(content[offset:]) return ''.join(parts)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def transform(self, data, input_content_type, output_content_type):\n return self.transform_fn(data, input_content_type, output_content_type)", "def transform(self, stdout):\n return stdout", "def postprocess(self, text):\r\n return text", "def render(*content, **context):\n return u'...
[ "0.63454944", "0.6209116", "0.6048773", "0.5973691", "0.5906884", "0.5887378", "0.5827559", "0.58250016", "0.57623434", "0.5721566", "0.56885874", "0.5667268", "0.56144154", "0.5599922", "0.5597909", "0.5460976", "0.5453108", "0.5448828", "0.54400074", "0.5394049", "0.5382979...
0.69993293
0
Returns a list of roots of a linear polynomial.
def roots_linear(f): r = -f.nth(0)/f.nth(1) dom = f.get_domain() if not dom.is_Numerical: if dom.is_Composite: r = factor(r) else: from sympy.simplify.simplify import simplify r = simplify(r) return [r]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def realpolyroots(*cs):\n if not cs:\n return [0]\n try:\n f = 1.0/cs[0]\n cs = [f*c for c in cs[1:]]\n except ArithmeticError:\n return realpolyroots(*cs[1:])\n else:\n n = len(cs)\n if n == 0:\n return []\n elif n == 1:\n return [...
[ "0.699301", "0.68372566", "0.6812553", "0.6778328", "0.6580493", "0.6448303", "0.64083934", "0.62958246", "0.6221394", "0.6214463", "0.6213689", "0.620138", "0.60809135", "0.6045944", "0.59933275", "0.59385794", "0.5924114", "0.5923547", "0.5893801", "0.58751374", "0.58578867...
0.70028156
0
Returns a list of roots of a quadratic polynomial. If the domain is ZZ then the roots will be sorted with negatives coming before positives. The ordering will be the same for any numerical coefficients as long as the assumptions tested are correct, otherwise the ordering will not be sorted (but will be canonical).
def roots_quadratic(f): a, b, c = f.all_coeffs() dom = f.get_domain() def _sqrt(d): # remove squares from square root since both will be represented # in the results; a similar thing is happening in roots() but # must be duplicated here because not all quadratics are binomials ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def realpolyroots(*cs):\n if not cs:\n return [0]\n try:\n f = 1.0/cs[0]\n cs = [f*c for c in cs[1:]]\n except ArithmeticError:\n return realpolyroots(*cs[1:])\n else:\n n = len(cs)\n if n == 0:\n return []\n elif n == 1:\n return [...
[ "0.6991081", "0.66013086", "0.6572299", "0.64108765", "0.6325812", "0.622283", "0.6209877", "0.60898906", "0.60380316", "0.6003445", "0.5981374", "0.586234", "0.58222187", "0.578813", "0.5718339", "0.56710905", "0.5663383", "0.5659498", "0.56578946", "0.56165165", "0.55916184...
0.6343662
4
Returns a list of roots of a cubic polynomial. References ==========
def roots_cubic(f, trig=False): if trig: a, b, c, d = f.all_coeffs() p = (3*a*c - b**2)/(3*a**2) q = (2*b**3 - 9*a*b*c + 27*a**2*d)/(27*a**3) D = 18*a*b*c*d - 4*b**3*d + b**2*c**2 - 4*a*c**3 - 27*a**2*d**2 if (D > 0) == True: rv = [] for k in range(3):...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def realpolyroots(*cs):\n if not cs:\n return [0]\n try:\n f = 1.0/cs[0]\n cs = [f*c for c in cs[1:]]\n except ArithmeticError:\n return realpolyroots(*cs[1:])\n else:\n n = len(cs)\n if n == 0:\n return []\n elif n == 1:\n return [...
[ "0.72847307", "0.69765097", "0.6849717", "0.6685287", "0.6681207", "0.6605116", "0.6580563", "0.6523035", "0.6504476", "0.6415777", "0.63756144", "0.6231512", "0.618943", "0.6134347", "0.61263305", "0.61130077", "0.61078966", "0.60973203", "0.6050598", "0.6036552", "0.6032446...
0.6838107
3
DescartesEuler solution of the quartic equation
def _roots_quartic_euler(p, q, r, a): # solve the resolvent equation x = Dummy('x') eq = 64*x**3 + 32*p*x**2 + (4*p**2 - 16*r)*x - q**2 xsols = list(roots(Poly(eq, x), cubics=False).keys()) xsols = [sol for sol in xsols if sol.is_rational and sol.is_nonzero] if not xsols: return None ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def quartic_potential(x):\n k1=1\n k2=10\n return (k1*x**4)-(k2*x**2)", "def Q2euler(self, q):\n\n\tphi = mt.atan2(2.0*((q[2]*q[3])+(q[0]*q[1])), (q[0]**2.0)-(q[1]**2.0)-(q[2]**2.0)+(q[3]**2.0));\n\tpsi = mt.atan2(2.0*((q[1]*q[2])+(q[0]*q[3])), (q[0]**2.0)+(q[1]**2.0)-(q[2]**2.0)-(q[3]**2.0));\n ...
[ "0.67260116", "0.6540913", "0.65225554", "0.6502808", "0.632549", "0.62925756", "0.6266957", "0.6238196", "0.6199439", "0.6162603", "0.61590874", "0.61235034", "0.6091966", "0.6090082", "0.60746473", "0.6042428", "0.60011595", "0.5984001", "0.5966663", "0.5959113", "0.5934722...
0.62704515
6
r""" Returns a list of roots of a quartic polynomial. There are many references for solving quartic expressions available [15]. This reviewer has found that many of them require one to select from among 2 or more possible sets of solutions and that some solutions work when one is searching for real roots but do not wor...
def roots_quartic(f): _, a, b, c, d = f.monic().all_coeffs() if not d: return [S.Zero] + roots([1, a, b, c], multiple=True) elif (c/a)**2 == d: x, m = f.gen, c/a g = Poly(x**2 + a*x + b - 2*m, x) z1, z2 = roots_quadratic(g) h1 = Poly(x**2 - z1*x + m, x) h2...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _realroots_quartic(a3, a2, a1, a0):\n # see http://mathworld.wolfram.com/QuarticEquation.html for details\n ys = _realroots_cubic(-a2, a1*a3 - 4*a0, 4*a0*a2 - a1*a1 - a0*a3*a3)\n ys = [y for y in ys if a3*a3-4*a2+4*y >= 0 and y*y-4*a0 >= 0]\n if not ys:\n return []\n y1 = min(ys)\n if...
[ "0.7691381", "0.70223194", "0.67854947", "0.6726414", "0.6687224", "0.66422635", "0.66170025", "0.6552937", "0.63935107", "0.63915175", "0.6389726", "0.6380986", "0.62318456", "0.6211318", "0.61140424", "0.60838556", "0.60170877", "0.5920878", "0.58423185", "0.57521677", "0.5...
0.7383764
1
Returns a list of roots of a binomial polynomial. If the domain is ZZ then the roots will be sorted with negatives coming before positives. The ordering will be the same for any numerical coefficients as long as the assumptions tested are correct, otherwise the ordering will not be sorted (but will be canonical).
def roots_binomial(f): n = f.degree() a, b = f.nth(n), f.nth(0) base = -cancel(b/a) alpha = root(base, n) if alpha.is_number: alpha = alpha.expand(complex=True) # define some parameters that will allow us to order the roots. # If the domain is ZZ this is guaranteed to return roots...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def almost_positive_roots(self):\n assert self.cartan_type().is_finite()\n return sorted([ -beta for beta in self.simple_roots() ] + list(self.positive_roots()))", "def realpolyroots(*cs):\n if not cs:\n return [0]\n try:\n f = 1.0/cs[0]\n cs = [f*c for c in cs[1:...
[ "0.63752747", "0.6269281", "0.6176525", "0.6108229", "0.6071052", "0.6057403", "0.5983822", "0.5921927", "0.5852689", "0.58482456", "0.57848656", "0.5704563", "0.5699721", "0.56636614", "0.56186897", "0.54831684", "0.54757977", "0.54500794", "0.54273564", "0.5352519", "0.5346...
0.7264747
0
Find ``(L, U)`` such that ``L >> from sympy.polys.polyroots import _inv_totient_estimate >>> _inv_totient_estimate(192) (192, 840) >>> _inv_totient_estimate(400) (400, 1750)
def _inv_totient_estimate(m): primes = [ d + 1 for d in divisors(m) if isprime(d + 1) ] a, b = 1, 1 for p in primes: a *= p b *= p - 1 L = m U = int(math.ceil(m*(float(a)/b))) P = p = 2 primes = [] while P <= U: p = nextprime(p) primes.append(p) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def findPotential(L, boundaryConditions, Minv = None):\n\tX = findStableState(L, boundaryConditions, Minv)\n\treturn np.trace(X.T.dot(L).dot(X))", "def Findlt(l,sp,rhs):\n m = sp.M(l)\n return (m / l**3) - rhs", "def linear_inv_state_estimate(results: List[ExperimentResult],\n ...
[ "0.5654112", "0.5446574", "0.5408425", "0.5286101", "0.5229726", "0.5152003", "0.51416683", "0.5085175", "0.5065494", "0.5054303", "0.5050599", "0.50233173", "0.5016458", "0.5014176", "0.49979034", "0.49948668", "0.49875477", "0.49864754", "0.49744186", "0.4971717", "0.495969...
0.6683084
0
Compute roots of cyclotomic polynomials.
def roots_cyclotomic(f, factor=False): L, U = _inv_totient_estimate(f.degree()) for n in range(L, U + 1): g = cyclotomic_poly(n, f.gen, polys=True) if f.expr == g.expr: break else: # pragma: no cover raise RuntimeError("failed to find index of a cyclotomic polynomial")...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def solve(n=5000,C=-6*10**11,a=900,b=3):\n coeffs = np.zeros(n+2)\n coeffs[0] = a-b*n\n coeffs[1] = b*(n+1) - a\n coeffs[-3] = -C\n coeffs[-2] = 2*C - a\n coeffs[-1] = a+b-C\n mp.dps = 27\n roots = polyroots(coeffs)\n for root in roots:\n print root", "def realpolyroots(*cs):\n if not cs:\n return [0]...
[ "0.70689356", "0.69686234", "0.68325675", "0.67937875", "0.67128944", "0.66578436", "0.64154166", "0.6385554", "0.6357789", "0.63397557", "0.62621146", "0.6260496", "0.6242663", "0.6239509", "0.62384343", "0.6155965", "0.6068166", "0.60675794", "0.605851", "0.60174245", "0.60...
0.6625059
6
Calculate exact roots of a solvable irreducible quintic with rational coefficients. Return an empty list if the quintic is reducible or not solvable.
def roots_quintic(f): result = [] coeff_5, coeff_4, p_, q_, r_, s_ = f.all_coeffs() if not all(coeff.is_Rational for coeff in (coeff_5, coeff_4, p_, q_, r_, s_)): return result if coeff_5 != 1: f = Poly(f / coeff_5) _, coeff_4, p_, q_, r_, s_ = f.all_coeffs() # Cancel coe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _realroots_quartic(a3, a2, a1, a0):\n # see http://mathworld.wolfram.com/QuarticEquation.html for details\n ys = _realroots_cubic(-a2, a1*a3 - 4*a0, 4*a0*a2 - a1*a1 - a0*a3*a3)\n ys = [y for y in ys if a3*a3-4*a2+4*y >= 0 and y*y-4*a0 >= 0]\n if not ys:\n return []\n y1 = min(ys)\n if...
[ "0.6811202", "0.6796312", "0.6786293", "0.6716183", "0.66416746", "0.65845186", "0.65421104", "0.65183496", "0.65000635", "0.6442644", "0.64239186", "0.63015795", "0.6251539", "0.62388915", "0.62045044", "0.6190044", "0.61316377", "0.60060287", "0.5985993", "0.58836967", "0.5...
0.7315998
0
Compute coefficient basis for a polynomial over integers. Returns the integer ``div`` such that substituting ``x = divy`` ``p(x) = mq(y)`` where the coefficients of ``q`` are smaller than those of ``p``. For example ``x5 + 512x + 1024 = 0`` with ``div = 4`` becomes ``y5 + 2y + 1 = 0`` Returns the integer ``div`` or ``N...
def _integer_basis(poly): monoms, coeffs = list(zip(*poly.terms())) monoms, = list(zip(*monoms)) coeffs = list(map(abs, coeffs)) if coeffs[0] < coeffs[-1]: coeffs = list(reversed(coeffs)) n = monoms[0] monoms = [n - i for i in reversed(monoms)] else: return None ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def divisor_num(x):\n factor_pow = map(lambda y: y + 1, factorint(x).values())\n div_num = reduce(mul, factor_pow)\n return div_num", "def integerpolynomialfactorization(f):\n cont = f.content()\n prim = f.primitive_part()\n F = [prim]\n G = prim\n c = 0\n one = G.getRing().one\n wh...
[ "0.5803568", "0.5495862", "0.53540903", "0.5195812", "0.5137353", "0.50611347", "0.5049097", "0.49525103", "0.48945084", "0.4893453", "0.48900345", "0.48405665", "0.48327824", "0.47568256", "0.47512928", "0.4697377", "0.46737888", "0.46663266", "0.46649405", "0.4663487", "0.4...
0.73283625
0
Try to get rid of symbolic coefficients from ``poly``.
def preprocess_roots(poly): coeff = S.One poly_func = poly.func try: _, poly = poly.clear_denoms(convert=True) except DomainError: return coeff, poly poly = poly.primitive()[1] poly = poly.retract() # TODO: This is fragile. Figure out how to make this independent of constr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def linear_simplify_poly(poly):\n if len(poly) < 4:\n return poly\n\n q = Queue()\n for v in poly:\n q.put(v)\n\n new_poly = []\n a = q.get()\n b = q.get()\n while True:\n if q.empty():\n new_poly += [a,b]\n break\n c = q.get()\n e1 = (b...
[ "0.62805736", "0.6251077", "0.61265767", "0.6063948", "0.59309864", "0.58919007", "0.5861226", "0.58583367", "0.58181924", "0.58060616", "0.5801948", "0.5798098", "0.5743815", "0.5664095", "0.5663453", "0.56335896", "0.5619114", "0.56125027", "0.56103873", "0.55965537", "0.55...
0.6638182
0
Computes symbolic roots of a univariate polynomial. Given a univariate polynomial f with symbolic coefficients (or a list of the polynomial's coefficients), returns a dictionary with its roots and their multiplicities. Only roots expressible via radicals will be returned. To get a complete set of roots use RootOf class...
def roots(f, *gens, auto=True, cubics=True, trig=False, quartics=True, quintics=False, multiple=False, filter=None, predicate=None, strict=False, **flags): from sympy.polys.polytools import to_rational_coeffs flags = dict(flags) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def roots_cubic(f, trig=False):\n if trig:\n a, b, c, d = f.all_coeffs()\n p = (3*a*c - b**2)/(3*a**2)\n q = (2*b**3 - 9*a*b*c + 27*a**2*d)/(27*a**3)\n D = 18*a*b*c*d - 4*b**3*d + b**2*c**2 - 4*a*c**3 - 27*a**2*d**2\n if (D > 0) == True:\n rv = []\n for k...
[ "0.6896479", "0.6696928", "0.65651536", "0.6392125", "0.6328955", "0.6318705", "0.63019294", "0.623209", "0.6114012", "0.5993156", "0.5949037", "0.5923371", "0.5701059", "0.5666536", "0.5619273", "0.5569309", "0.54927284", "0.5336779", "0.52657783", "0.52145165", "0.5202273",...
0.70961726
0
Find roots using functional decomposition.
def _try_decompose(f): factors, roots = f.decompose(), [] for currentroot in _try_heuristics(factors[0]): roots.append(currentroot) for currentfactor in factors[1:]: previous, roots = list(roots), [] for currentroot in previous: g = currentf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _rootsFinder(self, fun, jac, bounds, npoints, method):\n if method == \"regular\":\n step = (bounds[1] - bounds[0]) / (npoints + 1)\n try:\n X0 = np.arange(bounds[0] + step, bounds[1], step)\n except:\n X0 = np.random.uniform(bounds[0], boun...
[ "0.7212848", "0.6876271", "0.6740831", "0.6719536", "0.6675296", "0.65922093", "0.655151", "0.6544043", "0.64960366", "0.6459886", "0.6407978", "0.6385199", "0.6366508", "0.63274616", "0.6307746", "0.6299097", "0.62931216", "0.6259802", "0.62244785", "0.6164925", "0.6157183",...
0.55606747
73
Find roots using formulas and some tricks.
def _try_heuristics(f): if f.is_ground: return [] if f.is_monomial: return [S.Zero]*f.degree() if f.length() == 2: if f.degree() == 1: return list(map(cancel, roots_linear(f))) else: return roots_binomial(f) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_roots_slow():\n a, b, c, d, x = symbols(\"a,b,c,d,x\")\n\n f1 = x ** 2 * c + (a / b) + x * c * d - a\n f2 = x ** 2 * (a + b * (c - d) * a) + x * a * b * c / (b * d - d) + (a * d - c / d)\n\n assert list(roots(f1, x).values()) == [1, 1]\n assert list(roots(f2, x).values()) == [1, 1]\n\n (...
[ "0.69819534", "0.67669433", "0.6643975", "0.6496962", "0.6462578", "0.6433321", "0.64333093", "0.6350197", "0.627354", "0.6264782", "0.61711496", "0.61164635", "0.61066484", "0.6072518", "0.6070093", "0.6002449", "0.5987918", "0.597196", "0.58858424", "0.58769155", "0.5864796...
0.6046924
15
Returns all factors of a univariate polynomial. Examples ======== >>> from sympy.abc import x, y >>> from sympy.polys.polyroots import root_factors >>> root_factors(x2 y, x) [x sqrt(y), x + sqrt(y)]
def root_factors(f, *gens, filter=None, **args): args = dict(args) F = Poly(f, *gens, **args) if not F.is_Poly: return [f] if F.is_multivariate: raise ValueError('multivariate polynomials are not supported') x = F.gens[0] zeros = roots(F, filter=filter) if not zeros: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _compute_factors(roots, multiplicity, include_powers=False):\n current = cupy.array([1])\n suffixes = [current]\n for pole, mult in zip(roots[-1:0:-1], multiplicity[-1:0:-1]):\n monomial = cupy.r_[1, -pole]\n for _ in range(int(mult)):\n current = cupy.polymul(current, monomia...
[ "0.7069163", "0.6946843", "0.6769513", "0.6616636", "0.6602128", "0.65511125", "0.65452355", "0.64717513", "0.63566077", "0.6323654", "0.6308325", "0.62574553", "0.62244284", "0.6213336", "0.6190737", "0.6173634", "0.6167063", "0.61606395", "0.6150739", "0.61217386", "0.61190...
0.7182827
0
Render the homepage template on the / route
def homepage(): form = LoginForm() return render_template("admin/index.html", title="Admin", form=form)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def homepage():\n return render_template(\"home/index.html\")", "def home():\n return render_template('homepage.html')", "def homepage():\n return render_template('homepage.html')", "def homepage():\n return render_template(\"home/index.html\", title=\"Welcome\")", "def render_home():\r\n\treturn...
[ "0.8597299", "0.8569112", "0.85272837", "0.8474665", "0.8474087", "0.8451808", "0.8424757", "0.8424757", "0.84213376", "0.8389955", "0.83125323", "0.8266481", "0.8266481", "0.8266481", "0.8266481", "0.8266481", "0.8266481", "0.82651", "0.8260553", "0.8250731", "0.8250731", ...
0.0
-1
Render the dashboard template on the /dashboard route
def dashboard(): return render_template("admin/dashboard.html", title="Dashboard")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dashboard():\n return render_template('home/dashboard.html')", "def dashboard():\n return render_template(\"home/dashboard.html\", title=\"Dashboard\")", "def dashboard():\n return render_template('home/dashboard.html', title=\"Dashboard\")", "def dashboard():\r\n return render_template('{}/d...
[ "0.8749161", "0.86622834", "0.8603136", "0.8325471", "0.815551", "0.7847244", "0.78405416", "0.7524586", "0.7319234", "0.7226246", "0.71941286", "0.7147105", "0.7105316", "0.7096847", "0.7092405", "0.7006355", "0.70027596", "0.6961756", "0.69428045", "0.6938962", "0.68855274"...
0.835672
3
Modify the land cover to create rocks in the large gradient pixels (large steepness)
def set_rocks_in_grad(self, elevation, landcover): # Compute the steepness of each pixel grad = gaussian_gradient_magnitude(elevation, 1.0) grad /= self.mercator.Resolution(self.__zoom) # Get the mask of rock (with a smooth transition) mask = (grad >= ROCK_STEEPNESS).astype(np.fl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def preprocess_land_cover(\n src_files, dst_raster, dst_crs, dst_bounds, dst_res, geom=None, overwrite=False\n):\n if os.path.isfile(dst_raster) and not overwrite:\n log.info(\"Land cover data already preprocessed. Skipping.\")\n return\n log.info(\"Starting preprocessing of land cover data....
[ "0.5887975", "0.5787736", "0.57740206", "0.56503314", "0.5611882", "0.55984235", "0.55739576", "0.5566662", "0.5542999", "0.55224055", "0.551903", "0.5480114", "0.5477756", "0.5398472", "0.53926384", "0.53850454", "0.5373012", "0.53565186", "0.53404105", "0.53380716", "0.5336...
0.71222955
0
Process the arguments passed to the add command and execute the fitting function on each of them.
def add_lgit(args, parent_dir): # Convert all the name from the arguments to relative path path_list = [handle_path(name) for name in args.filenames[::-1]] # Get the infos from the index file index_dict = get_index_dictionary(parent_dir) if index_dict is None: return # Create a file desc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add(self, script, inputs, outputs):", "def main():\n print('')\n start = timeit.default_timer()\n errorCount = 0\n\n parser = argparse.ArgumentParser(description='Extra data from .fit files')\n\n # Arguments and help\n parser.add_argument('-f', '--folder', nargs='+',\n ...
[ "0.6106922", "0.600218", "0.59749186", "0.58315104", "0.58102316", "0.5778356", "0.57766235", "0.57535434", "0.57082295", "0.5690233", "0.568555", "0.56600577", "0.56387025", "0.5636905", "0.5630787", "0.56013405", "0.55926496", "0.5588567", "0.5584911", "0.5584555", "0.55751...
0.0
-1
Add or update the sha1 hash of the file and its timestamp in the index file
def add_file(current_path, parent_dir, descriptor, index_dict): # Get the relative path from the repository rel_path_from_repository = relpath(abspath(current_path), parent_dir) # If the file is outside the repository, print error, return if rel_path_from_repository.startswith(".."): print("fata...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def update_info_when_add(descriptor, rel_path_from_repository,\n mtime, file_sha1_hash, index_dict):\n # If the file is already tracked, update it\n if rel_path_from_repository in index_dict.keys():\n # If the file is already up to date, no need to rewrite.\n if (mtime =...
[ "0.7084141", "0.6394814", "0.63262385", "0.6278804", "0.6129608", "0.612322", "0.60952777", "0.60914016", "0.6002303", "0.59676296", "0.59608597", "0.5931763", "0.59291625", "0.59242475", "0.5919051", "0.5902812", "0.5893473", "0.5888924", "0.5888628", "0.588432", "0.58710116...
0.52638847
89
Update the index file when adding file
def update_info_when_add(descriptor, rel_path_from_repository, mtime, file_sha1_hash, index_dict): # If the file is already tracked, update it if rel_path_from_repository in index_dict.keys(): # If the file is already up to date, no need to rewrite. if (mtime == index_di...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _update_index(self):\n start_time = datetime.datetime.now()\n sys.stdout.write(\"Updating index. Depending on the size of your music \"\n \"collection this may take some time, so please be patient. \"\n \"(Update started at %s)\\n\" % start_time)\n ...
[ "0.74659985", "0.7315754", "0.72076917", "0.71731734", "0.71103555", "0.67958295", "0.6753167", "0.6662963", "0.66050005", "0.65423447", "0.654069", "0.6499218", "0.6428421", "0.6422", "0.6397996", "0.6384639", "0.6380059", "0.636271", "0.63614804", "0.6352889", "0.6351816", ...
0.66944355
7
Make the object directory and file for the adding file.
def make_directory_and_object_file(file_sha1_hash, file_content, parent_dir): try: # Create a path for the new directory, which is the first 2 characters # of the hash. new_dir_path = join(parent_dir, ".lgit/objects", file_sha1_hash[:2]) # Create the directory try: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def makeLibrary(self):\n #------------------------------------------ Instance for the output file\n outputFile = open(\"%s/%s\" % (self.sceneryPath,self.libTxtFileName),\"w\")\n #------------------------------------------------------ write the header\n for line in self.header:\n ...
[ "0.67735976", "0.6593304", "0.6487546", "0.6399611", "0.62541074", "0.6146902", "0.6131344", "0.6102639", "0.6092799", "0.6058326", "0.60511124", "0.60165167", "0.60149306", "0.59659183", "0.59595376", "0.59442127", "0.59324336", "0.5891388", "0.58593774", "0.58547544", "0.58...
0.67971694
0
Walk through the directory and add all of its childs to the path list
def add_directory(current_path, parent_dir, path_list): try: for item in scandir(current_path): path_list.append(join(current_path, item.name)) except PermissionError: pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_dir(self, path):", "def __walk_tree(self):\n for root, dirnames, files in os.walk(self.path, topdown=True):\n self.dirCount += 1\n # Create a tuple with the file size, the file name and the files inode (for tracking hard links).\n files = [\n (os.lstat(os.path.join(root, fi)).st_s...
[ "0.68662155", "0.6828967", "0.67772067", "0.6730999", "0.6632383", "0.6570988", "0.6564505", "0.65216494", "0.64688367", "0.64547265", "0.63866526", "0.6383479", "0.6368905", "0.6368785", "0.6357661", "0.63549685", "0.63523936", "0.6342488", "0.6338093", "0.6279808", "0.62372...
0.6658234
4
Load the conf sub and run the integrate sequence.
def integrate( hub: "pop.hub.Hub", imports: List[str] or str, override: Dict[str, Any] = None, cli: str = None, roots: bool = None, loader: str = "json", logs: bool = True, ): hub.pop.sub.add("pop.mods.conf") hub.conf.integrate.load( imports, override, cli=cli, roots=roots, l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def integrate(self):\n print \"\\033[95mStarted Integration Engine on \" + unicode(datetime.datetime.now()) + \"\\033[0m\"\n # Creating the patient array\n print \"Processing the root folder structure ...\"\n patients = FileProcessor().make_patients(self.root_path)\n # Generating...
[ "0.5769145", "0.56140506", "0.54853654", "0.5410306", "0.54022765", "0.5398145", "0.5355247", "0.534902", "0.5324859", "0.5314495", "0.5312353", "0.53098476", "0.5309834", "0.5290296", "0.52873266", "0.527563", "0.5271352", "0.52673334", "0.52663267", "0.5255587", "0.5253821"...
0.5352253
7
UpdateVehicleRequest a model defined in OpenAPI
def __init__(self, attributes=None, aux_input_type1=None, aux_input_type10=None, aux_input_type2=None, aux_input_type3=None, aux_input_type4=None, aux_input_type5=None, aux_input_type6=None, aux_input_type7=None, aux_input_type8=None, aux_input_type9=None, engine_hours=None, external_ids=None, gateway_serial=None, hars...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def put(self, request, pk=None):\n vehicletype = VehicleType.objects.get(pk=pk)\n\n vehicletype.body_type = request.data[\"body_type\"]\n vehicletype.make = request.data[\"make\"]\n vehicletype.model = request.data[\"model\"]\n\n vehicletype.save()\n\n return Response({}, ...
[ "0.6813063", "0.6655575", "0.6524145", "0.6463527", "0.6266706", "0.5853268", "0.57560915", "0.5716814", "0.5683704", "0.56298107", "0.5599313", "0.55283904", "0.55123216", "0.5477006", "0.5456173", "0.54552305", "0.5445631", "0.54352313", "0.54323834", "0.54289734", "0.54046...
0.0
-1
Sets the attributes of this UpdateVehicleRequest.
def attributes(self, attributes): self._attributes = attributes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_attributes(self):\n s = _setter(oself=self, e1=NameError, e2=AttributeError)\n\n s('oself.coef_ = oself.model.coef_')\n s('oself.intercept_ = oself.model.intercept_')\n\n self.time_prepare = None\n s('oself.time_prepare = oself.model.time_prepare')\n self.time_uplo...
[ "0.63268507", "0.57194734", "0.56321687", "0.5631556", "0.56012726", "0.55542994", "0.5492757", "0.535222", "0.5329307", "0.53005254", "0.53005254", "0.53005254", "0.5275813", "0.52673084", "0.5234841", "0.522085", "0.5148755", "0.5144536", "0.5144536", "0.5139643", "0.513053...
0.50296897
29
Sets the aux_input_type1 of this UpdateVehicleRequest.
def aux_input_type1(self, aux_input_type1): allowed_values = ["none", "emergencyLights", "emergencyAlarm", "stopPaddle", "powerTakeOff", "plow", "sweeper", "salter", "reefer", "door", "boom", "auxiliaryEngine", "generator", "eightWayLights"] # noqa: E501 if self.local_vars_configuration.client_side_val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aux_input_type2(self, aux_input_type2):\n allowed_values = [\"none\", \"emergencyLights\", \"emergencyAlarm\", \"stopPaddle\", \"powerTakeOff\", \"plow\", \"sweeper\", \"salter\", \"reefer\", \"door\", \"boom\", \"auxiliaryEngine\", \"generator\", \"eightWayLights\"] # noqa: E501\n if self.local...
[ "0.6881577", "0.6247039", "0.61682045", "0.6168174", "0.61245406", "0.6103021", "0.59515715", "0.57475", "0.55829304", "0.526451", "0.48469332", "0.47708565", "0.47298566", "0.4703361", "0.46092513", "0.45240486", "0.44671947", "0.44662634", "0.439882", "0.4355716", "0.434613...
0.8198986
0
Sets the aux_input_type10 of this UpdateVehicleRequest.
def aux_input_type10(self, aux_input_type10): allowed_values = ["none", "emergencyLights", "emergencyAlarm", "stopPaddle", "powerTakeOff", "plow", "sweeper", "salter", "reefer", "door", "boom", "auxiliaryEngine", "generator", "eightWayLights"] # noqa: E501 if self.local_vars_configuration.client_side_v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aux_input_type9(self, aux_input_type9):\n allowed_values = [\"none\", \"emergencyLights\", \"emergencyAlarm\", \"stopPaddle\", \"powerTakeOff\", \"plow\", \"sweeper\", \"salter\", \"reefer\", \"door\", \"boom\", \"auxiliaryEngine\", \"generator\", \"eightWayLights\"] # noqa: E501\n if self.local...
[ "0.6725952", "0.610575", "0.5790601", "0.5682387", "0.56456137", "0.54830354", "0.5383829", "0.53816664", "0.53323066", "0.440578", "0.43797588", "0.4314514", "0.43111408", "0.42576176", "0.4198845", "0.4124491", "0.41100422", "0.4049688", "0.40081385", "0.40019417", "0.39651...
0.8267368
0
Sets the aux_input_type2 of this UpdateVehicleRequest.
def aux_input_type2(self, aux_input_type2): allowed_values = ["none", "emergencyLights", "emergencyAlarm", "stopPaddle", "powerTakeOff", "plow", "sweeper", "salter", "reefer", "door", "boom", "auxiliaryEngine", "generator", "eightWayLights"] # noqa: E501 if self.local_vars_configuration.client_side_val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aux_input_type1(self, aux_input_type1):\n allowed_values = [\"none\", \"emergencyLights\", \"emergencyAlarm\", \"stopPaddle\", \"powerTakeOff\", \"plow\", \"sweeper\", \"salter\", \"reefer\", \"door\", \"boom\", \"auxiliaryEngine\", \"generator\", \"eightWayLights\"] # noqa: E501\n if self.local...
[ "0.67737305", "0.60007954", "0.5945109", "0.5709236", "0.5614584", "0.55712336", "0.5553947", "0.54106337", "0.52731603", "0.5124387", "0.5114672", "0.46984407", "0.469242", "0.46270508", "0.46270508", "0.45326632", "0.4530033", "0.45260003", "0.45230535", "0.4521897", "0.450...
0.8351475
0
Sets the aux_input_type3 of this UpdateVehicleRequest.
def aux_input_type3(self, aux_input_type3): allowed_values = ["none", "emergencyLights", "emergencyAlarm", "stopPaddle", "powerTakeOff", "plow", "sweeper", "salter", "reefer", "door", "boom", "auxiliaryEngine", "generator", "eightWayLights"] # noqa: E501 if self.local_vars_configuration.client_side_val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aux_input_type9(self, aux_input_type9):\n allowed_values = [\"none\", \"emergencyLights\", \"emergencyAlarm\", \"stopPaddle\", \"powerTakeOff\", \"plow\", \"sweeper\", \"salter\", \"reefer\", \"door\", \"boom\", \"auxiliaryEngine\", \"generator\", \"eightWayLights\"] # noqa: E501\n if self.local...
[ "0.60051674", "0.59958714", "0.59745276", "0.5884165", "0.573058", "0.55547076", "0.5548062", "0.5489199", "0.54143596", "0.5395056", "0.5113174", "0.5069129", "0.49999794", "0.49934226", "0.49783775", "0.49597377", "0.49532253", "0.48770082", "0.48317355", "0.4767722", "0.47...
0.833222
0
Sets the aux_input_type4 of this UpdateVehicleRequest.
def aux_input_type4(self, aux_input_type4): allowed_values = ["none", "emergencyLights", "emergencyAlarm", "stopPaddle", "powerTakeOff", "plow", "sweeper", "salter", "reefer", "door", "boom", "auxiliaryEngine", "generator", "eightWayLights"] # noqa: E501 if self.local_vars_configuration.client_side_val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aux_input_type6(self, aux_input_type6):\n allowed_values = [\"none\", \"emergencyLights\", \"emergencyAlarm\", \"stopPaddle\", \"powerTakeOff\", \"plow\", \"sweeper\", \"salter\", \"reefer\", \"door\", \"boom\", \"auxiliaryEngine\", \"generator\", \"eightWayLights\"] # noqa: E501\n if self.local...
[ "0.6177032", "0.6103347", "0.5953408", "0.5917011", "0.58011657", "0.5769559", "0.5681293", "0.56600946", "0.53610873", "0.4841803", "0.45973018", "0.4593053", "0.45379746", "0.45276865", "0.45267612", "0.44020706", "0.4333473", "0.4321829", "0.4218026", "0.42120838", "0.4156...
0.82154655
0
Sets the aux_input_type5 of this UpdateVehicleRequest.
def aux_input_type5(self, aux_input_type5): allowed_values = ["none", "emergencyLights", "emergencyAlarm", "stopPaddle", "powerTakeOff", "plow", "sweeper", "salter", "reefer", "door", "boom", "auxiliaryEngine", "generator", "eightWayLights"] # noqa: E501 if self.local_vars_configuration.client_side_val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aux_input_type6(self, aux_input_type6):\n allowed_values = [\"none\", \"emergencyLights\", \"emergencyAlarm\", \"stopPaddle\", \"powerTakeOff\", \"plow\", \"sweeper\", \"salter\", \"reefer\", \"door\", \"boom\", \"auxiliaryEngine\", \"generator\", \"eightWayLights\"] # noqa: E501\n if self.local...
[ "0.6735667", "0.61671937", "0.6084544", "0.60733855", "0.6030134", "0.57733315", "0.57299143", "0.56766456", "0.5534028", "0.5277805", "0.50033385", "0.45613086", "0.45503688", "0.44486523", "0.43939793", "0.43528506", "0.4218385", "0.41903195", "0.41550255", "0.41463068", "0...
0.84810084
0
Sets the aux_input_type6 of this UpdateVehicleRequest.
def aux_input_type6(self, aux_input_type6): allowed_values = ["none", "emergencyLights", "emergencyAlarm", "stopPaddle", "powerTakeOff", "plow", "sweeper", "salter", "reefer", "door", "boom", "auxiliaryEngine", "generator", "eightWayLights"] # noqa: E501 if self.local_vars_configuration.client_side_val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aux_input_type7(self, aux_input_type7):\n allowed_values = [\"none\", \"emergencyLights\", \"emergencyAlarm\", \"stopPaddle\", \"powerTakeOff\", \"plow\", \"sweeper\", \"salter\", \"reefer\", \"door\", \"boom\", \"auxiliaryEngine\", \"generator\", \"eightWayLights\"] # noqa: E501\n if self.local...
[ "0.6811139", "0.6711326", "0.6464062", "0.61897624", "0.60081035", "0.59919214", "0.5962499", "0.58940566", "0.5785702", "0.50470114", "0.49827394", "0.4801943", "0.4498699", "0.44764334", "0.43467817", "0.431762", "0.42938703", "0.42625344", "0.4177838", "0.4142461", "0.4113...
0.8384907
0
Sets the aux_input_type7 of this UpdateVehicleRequest.
def aux_input_type7(self, aux_input_type7): allowed_values = ["none", "emergencyLights", "emergencyAlarm", "stopPaddle", "powerTakeOff", "plow", "sweeper", "salter", "reefer", "door", "boom", "auxiliaryEngine", "generator", "eightWayLights"] # noqa: E501 if self.local_vars_configuration.client_side_val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aux_input_type6(self, aux_input_type6):\n allowed_values = [\"none\", \"emergencyLights\", \"emergencyAlarm\", \"stopPaddle\", \"powerTakeOff\", \"plow\", \"sweeper\", \"salter\", \"reefer\", \"door\", \"boom\", \"auxiliaryEngine\", \"generator\", \"eightWayLights\"] # noqa: E501\n if self.local...
[ "0.737313", "0.70987934", "0.68551147", "0.6368619", "0.6157716", "0.61507314", "0.61456496", "0.60045", "0.5644334", "0.46709234", "0.4624464", "0.45685434", "0.4289816", "0.420974", "0.41962048", "0.41751334", "0.41050494", "0.40700984", "0.39788634", "0.39388323", "0.38861...
0.818187
0
Sets the aux_input_type8 of this UpdateVehicleRequest.
def aux_input_type8(self, aux_input_type8): allowed_values = ["none", "emergencyLights", "emergencyAlarm", "stopPaddle", "powerTakeOff", "plow", "sweeper", "salter", "reefer", "door", "boom", "auxiliaryEngine", "generator", "eightWayLights"] # noqa: E501 if self.local_vars_configuration.client_side_val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aux_input_type9(self, aux_input_type9):\n allowed_values = [\"none\", \"emergencyLights\", \"emergencyAlarm\", \"stopPaddle\", \"powerTakeOff\", \"plow\", \"sweeper\", \"salter\", \"reefer\", \"door\", \"boom\", \"auxiliaryEngine\", \"generator\", \"eightWayLights\"] # noqa: E501\n if self.local...
[ "0.6755058", "0.633114", "0.629067", "0.62043154", "0.58486116", "0.5745061", "0.56476486", "0.55395204", "0.54535085", "0.5100648", "0.48467347", "0.4543333", "0.4463553", "0.44145846", "0.4389607", "0.43863967", "0.43651605", "0.42814347", "0.4237928", "0.42126638", "0.4205...
0.8293582
0
Sets the aux_input_type9 of this UpdateVehicleRequest.
def aux_input_type9(self, aux_input_type9): allowed_values = ["none", "emergencyLights", "emergencyAlarm", "stopPaddle", "powerTakeOff", "plow", "sweeper", "salter", "reefer", "door", "boom", "auxiliaryEngine", "generator", "eightWayLights"] # noqa: E501 if self.local_vars_configuration.client_side_val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def aux_input_type10(self, aux_input_type10):\n allowed_values = [\"none\", \"emergencyLights\", \"emergencyAlarm\", \"stopPaddle\", \"powerTakeOff\", \"plow\", \"sweeper\", \"salter\", \"reefer\", \"door\", \"boom\", \"auxiliaryEngine\", \"generator\", \"eightWayLights\"] # noqa: E501\n if self.loc...
[ "0.6592232", "0.6393137", "0.6386548", "0.6197008", "0.59048843", "0.57917714", "0.5618292", "0.5533515", "0.5376587", "0.46700698", "0.45658058", "0.4494469", "0.43490845", "0.4330773", "0.43188262", "0.4283189", "0.4261341", "0.41801286", "0.40957448", "0.40957448", "0.4087...
0.81162375
0
Sets the engine_hours of this UpdateVehicleRequest.
def engine_hours(self, engine_hours): self._engine_hours = engine_hours
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def work_hours_setting(self, work_hours_setting):\n\n self._work_hours_setting = work_hours_setting", "def active_hours(self, active_hours):\n\n self._active_hours = active_hours", "def obd_engine_seconds(self, obd_engine_seconds):\n\n self._obd_engine_seconds = obd_engine_seconds", "def...
[ "0.55531627", "0.51219904", "0.5094751", "0.48254585", "0.4715887", "0.46753588", "0.46118993", "0.459567", "0.45515487", "0.4540938", "0.45212317", "0.45212197", "0.44924808", "0.44742528", "0.4456462", "0.4445044", "0.44345856", "0.44310075", "0.44294956", "0.44075277", "0....
0.8141102
0
Sets the external_ids of this UpdateVehicleRequest.
def external_ids(self, external_ids): self._external_ids = external_ids
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def external_ids(self, **kwargs):\n path = self._get_movie_id_path('external_ids')\n resp = self._get_method(path, kwargs)\n return resp", "def external_id(self, external_id):\n\n self._external_id = external_id", "def external_id(self, external_id):\n\n self._external_id = e...
[ "0.5645812", "0.56326723", "0.56326723", "0.56326723", "0.55220467", "0.5430042", "0.5307687", "0.5243291", "0.5185779", "0.51405275", "0.51405275", "0.5116388", "0.508638", "0.5023836", "0.49995106", "0.49790815", "0.49639636", "0.4961317", "0.49294525", "0.49190345", "0.489...
0.7786375
0