text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def is _ locked ( self ) : return false | [
-1.0418163537979126,
-0.0744861587882042,
0.3889675438404083,
1.1583232879638672,
0.42833662033081055,
0.4680359959602356,
0.058544497936964035,
-0.3967202305793762,
0.48299819231033325,
-0.7528015971183777,
-0.21729174256324768,
0.08510097116231918,
-1.2380083799362183,
-0.335766404867172... |
def calcconecenters ( frame, natoms = 6 ) : vectors = [ ] imp = np. zeros ( natoms ) ang = np. zeros ( natoms ) for i in xrange ( natoms ) : if np. any ( frame. atoms [ i ]. dipole ) : tmp = planeangles. conecenter ( frame. atoms [ i ], frame. atoms [ ( i + 1 ) % natoms ], frame. atoms [ ( i + 5 ) % natoms ], float ( -... | [
-0.26069962978363037,
-0.3677782416343689,
0.44721564650535583,
-1.05161714553833,
0.22764387726783752,
-0.6211990714073181,
0.5343237519264221,
-0.19792485237121582,
0.8087952733039856,
1.4155206680297852,
-0.4279109835624695,
-0.3974108099937439,
-0.39210572838783264,
-0.2076645940542221... |
def radius _ of _ gyration ( coords, mass, coord _ loc = [ 3, 6 ] ) : rog = [ none ] * len ( coords ) index = 0 for key in coords : rg = [ ] for chain in list ( coords [ key ]. mol. unique ( ) ) : coord _ curr = coords [ key ] [ coords [ key ] ['mol'] = = chain ]. iloc [ :, coord _ loc [ 0 ] : coord _ loc [ 1 ] ]. valu... | [
0.1147572323679924,
-0.3295744061470032,
0.565041720867157,
-0.9271993637084961,
0.4746125638484955,
-0.5575538277626038,
0.2991733253002167,
0.21574653685092926,
-0.6498227715492249,
1.061367154121399,
0.08807031810283661,
0.5817219018936157,
-0.5282052159309387,
0.0005095888045616448,
... |
def query _ this _ region ( self, region _ to _ check ) : if self. check _ all : return true if region _ to _ check in self. region _ cache : return true if self. include! = none : if region _ to _ check in self. include : self. region _ cache [ region _ to _ check ] = true return true if self. exclude! = none : if reg... | [
-0.5681264400482178,
0.10993096977472305,
0.8552606105804443,
-0.3629470467567444,
-0.682813823223114,
0.5743290185928345,
-0.23895831406116486,
0.5763641595840454,
0.623649537563324,
-0.38436567783355713,
0.01901480183005333,
0.11359312385320663,
-1.0621583461761475,
0.16626539826393127,
... |
def get _ filename ( station, year, month ) : if month < 10 : fname ='station _ data / { } / { } _ { } _ comprehensiveformat / { } _ 01 _ { } - 0 { }. csv '. format ( station, station, year, station, year, str ( month ) ) else : fname ='station _ data / { } / { } _ { } _ comprehensiveformat / { } _ 01 _ { } - { }. csv ... | [
0.45379844307899475,
-1.1302027702331543,
1.024223804473877,
-0.19658179581165314,
-0.4514743983745575,
0.3918214440345764,
0.2261144518852234,
0.3704225420951843,
-0.9174532890319824,
0.015608699060976505,
0.8867722749710083,
-0.023312123492360115,
0.4540657699108124,
0.2446100115776062,
... |
def add _ fragment ( self, fragment ) : return uribuilder ( scheme = self. scheme, userinfo = self. userinfo, host = self. host, port = self. port, path = self. path, query = self. query, fragment = normalizers. normalize _ fragment ( fragment ), ) | [
-0.6567484736442566,
0.15173888206481934,
0.586001992225647,
0.460007905960083,
-0.2483740746974945,
0.05861251428723335,
-0.09779388457536697,
0.6862670183181763,
1.0903255939483643,
-1.8065615892410278,
0.4272608160972595,
-0.9132616519927979,
-1.5188957452774048,
-0.9122519493103027,
... |
def social _ login _ complete ( self, provider _ name ) : if not settings. get ('enable _ federated _ login') : message ='federated login is disabled.'self. components. flash _ messages. flash ( message,'warning') return self. redirect _ to ('user : login') continue _ url = self. request. get ('continue _ url') if prov... | [
-0.39122727513313293,
-0.20195229351520538,
0.852303147315979,
0.8035852909088135,
0.3622273802757263,
-0.22565801441669464,
1.0654104948043823,
0.09667517244815826,
0.9372027516365051,
0.22382718324661255,
-0.6122906804084778,
0.19878068566322327,
0.11458541452884674,
0.5715903043746948,
... |
def autolabel ( rects ) : for rect in rects : height = rect. get _ height ( ) ax. annotate ('{ } '. format ( height ), xy = ( rect. get _ x ( ) + rect. get _ width ( ) / 2, height ), xytext = ( 0, 3 ), # 3 points vertical offset textcoords = " offset points ", ha ='center ', va ='bottom') | [
0.603294849395752,
-0.8815188407897949,
0.7011322975158691,
-0.32962432503700256,
-0.24466493725776672,
0.8604520559310913,
0.302025705575943,
0.20759613811969757,
0.19238297641277313,
0.4817773997783661,
-0.2704603672027588,
0.17433710396289825,
1.1150219440460205,
-0.5183075666427612,
... |
def addmodelfromfile ( database _ name, model _ file, source _ name, description ='' ) : conn = sqlite3. connect ( database _ name ) cursor = conn. execute ('select id from model _ sources where name = "'+ str ( source _ name ) +'"') source _ id = cursor. fetchone ( ) if source _ id is none : conn. execute ('insert int... | [
0.03765052556991577,
-0.031353071331977844,
0.8188003301620483,
-0.2064976692199707,
0.3551624119281769,
1.0850154161453247,
-0.05254087969660759,
0.5809544920921326,
-0.9835413694381714,
0.8046459555625916,
-0.47162890434265137,
-0.6222236752510071,
-0.32892581820487976,
0.406922966241836... |
def remove _ monitor ( monitor ) : try : box. remove ( monitor ) monitors. remove ( monitor ) if not monitors : box. hide ( ) except : logger. error ( " error removing monitor " ) | [
-0.33897095918655396,
0.4916483163833618,
0.4142760932445526,
0.43325433135032654,
-0.45025262236595154,
-0.3028433620929718,
-0.09539827704429626,
-0.31964534521102905,
0.9428632855415344,
-0.33579686284065247,
-0.6094244718551636,
-0.3816410005092621,
-1.111211895942688,
0.75548100471496... |
def atonpatch ( ) : import htoa. object. rop import htoa. session # only monkey patch once - - the arnold. py soho script from htoa can and # typically will be called many times. only monkey patch ( decorate ) the # generate method once. if htoa. object. rop. harop. generate. _ _ name _ _ = = " generate " : htoa. sessi... | [
-0.2900662422180176,
-0.8670558333396912,
0.6288270354270935,
0.5389308929443359,
-0.10271977633237839,
0.05152927711606026,
0.3578793704509735,
-0.0036380565725266933,
1.3310332298278809,
-0.24194562435150146,
0.46036240458488464,
-0.281459778547287,
0.8206708431243896,
0.0566401034593582... |
def schemaspace _ exists ( self ) - > bool : pass | [
-0.5377370119094849,
-0.23992638289928436,
0.5305895209312439,
0.5466316342353821,
0.9391162991523743,
0.47542330622673035,
-0.6542219519615173,
0.8636736273765564,
0.6898817420005798,
-1.0843806266784668,
-0.453631192445755,
0.2612512409687042,
0.01835974119603634,
0.6531211733818054,
-... |
def predict ( self, test _ df ) : if self. _ verbosity = = 2 : print ( " prediction started " ) predictions = self. adas _ smnsr. predict ( test _ df, target = " adas13 ", forecast _ start = " 2018 - 01 - 01 ", forecast _ end = " 2022 - 12 - 01 ", ) predictions = predictions. sort _ values ( tadpoledata. rid ) rdelta =... | [
0.45453521609306335,
-0.04976355656981468,
0.7784985303878784,
-0.11538321524858475,
-0.8647317290306091,
0.05817169323563576,
0.17157089710235596,
0.07416246831417084,
-0.4028502404689789,
0.9679481387138367,
0.49664464592933655,
0.7422626614570618,
0.18335115909576416,
-0.100181460380554... |
def _ type _ check _ command ( command ) : if type ( command )! = command : raise commanderror ( " command must be of type commandlib. command " ) | [
0.345619797706604,
0.31012219190597534,
0.45788130164146423,
0.9396836757659912,
0.7846099138259888,
0.6443265080451965,
0.05462588742375374,
-0.6984407901763916,
0.722395658493042,
0.411776602268219,
0.9865785241127014,
1.263235330581665,
-1.2710610628128052,
1.3654475212097168,
0.51606... |
def _ _ repr _ _ ( self ) : return f'< { self. _ _ class _ _. _ _ name _ _ } type = { self. type } id = { self. id } name = { self. name! r } > ' | [
-0.7719107866287231,
-1.851157546043396,
0.6686940789222717,
-0.8454322814941406,
0.04029424488544464,
0.49285849928855896,
-0.5793605446815491,
-0.6129595041275024,
0.7627584338188171,
0.0013456030283123255,
-0.18310321867465973,
0.9923039674758911,
0.07410045713186264,
-0.160075142979621... |
def sum ( self, sum ) : self. _ sum = sum | [
-0.5475329756736755,
-0.5020535588264465,
0.22396042943000793,
0.5267995595932007,
0.11953477561473846,
0.6157509684562683,
0.8091337084770203,
-0.14065544307231903,
-0.0389435775578022,
-0.11891768127679825,
-1.4445089101791382,
-0.0348692387342453,
0.16377809643745422,
-0.496288925409317... |
def get _ head _ commit _ cr _ position ( git _ repo : optional [ pathstr ] = none ) - > str : description : str = get _ head _ commit _ format ( git _ repo,'% b') # will capture from # the string #'123456 '. # examine lines from the description in reverse order since for reverts, we # want to match the last cr - commi... | [
0.982369601726532,
-0.1333848237991333,
0.6533427238464355,
0.05850987508893013,
-0.0622963085770607,
-0.12396734952926636,
0.3097221553325653,
-0.3619025647640228,
-0.6392353773117065,
-0.021829722449183464,
0.2349773496389389,
0.2794896066188812,
-0.7514286637306213,
-0.7916980981826782,... |
def winbio _ winbioenumenrollments ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " sessionhandle ", " unitid ", " identity ", " subfactorarray ", " subfactorcount " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value ) | [
-0.46374669671058655,
0.07440289109945297,
0.41646867990493774,
0.7822145223617554,
0.04751374572515488,
1.1775128841400146,
1.400999903678894,
-0.0763903558254242,
0.3316093683242798,
0.41753584146499634,
-0.5184939503669739,
0.6708936095237732,
-1.120787262916565,
0.7480916976928711,
-... |
def insert _ table ( self, conn, record, insert _ record _ sql ) : cur = conn. cursor ( ) cur. execute ( insert _ record _ sql, record ) conn. commit ( ) logger. info ( " insert record successfully " ) return cur. lastrowid | [
0.371022492647171,
0.5186195969581604,
0.8573439717292786,
0.7026057243347168,
0.08833429962396622,
-0.13386011123657227,
0.1841607391834259,
0.8368512392044067,
-0.751979410648346,
0.3086385726928711,
-0.24349497258663177,
-0.7921331524848938,
-1.2199969291687012,
0.2970935106277466,
-0... |
def tstamp ( timestamp ) : # let python determine the month and year date = datetime. date. fromtimestamp ( timestamp ) # determine season if date. month < = 4 : season = seasons. index ('w') elif date. month < = 8 : season = seasons. index ('s') else : season = seasons. index ('f') return ( date. year - epoch ) * len ... | [
-0.08465114235877991,
-0.103846974670887,
0.6902337670326233,
-0.43284282088279724,
-0.510617733001709,
-0.35033416748046875,
0.06284202635288239,
-0.27039530873298645,
1.5487364530563354,
0.49416685104370117,
-0.28412729501724243,
0.36756911873817444,
0.7360160946846008,
-0.99960982799530... |
def _ generate ( mu, v, dt, z, j = 0. 0, grid ='euler ', dv = 0. 0 ) : if grid = ='euler': return mu * dt + v * np. sqrt ( dt ) * z + j elif grid = ='milstein': return mu * dt + v * np. sqrt ( dt ) * z + v * dv * dt * ( z * z - 1 ) / 2 + j else : raise valueerror ('method does not exist.') | [
-0.3220122456550598,
0.6545491814613342,
0.5264862179756165,
0.45107948780059814,
-0.4350734055042267,
-0.2584366798400879,
0.11438766866922379,
-0.44338080286979675,
-0.1532740294933319,
0.40075093507766724,
0.3281102776527405,
0.19794659316539764,
0.2758428454399109,
0.5875675678253174,
... |
def color _ text ( self, strtocolor, priority ) : prdict = { " 1 " : " # ef5350 ", " 2 " : " # ff8f00 ", " 3 " : " # 9e9d24 ", " 0 " : " # 78909c ", " 9 " : " # 42a5f5 ", " normal " : " # 9e9e9e " } text = text ( ) text. append ( str ( strtocolor ), style = prdict [ str ( priority ) ] ) return text | [
0.09260990470647812,
-0.3773067593574524,
0.783624529838562,
-1.3501489162445068,
-0.23949295282363892,
-0.08950605988502502,
-1.5832172632217407,
0.7430851459503174,
0.5235295295715332,
0.46364060044288635,
-0.2537814676761627,
0.056803010404109955,
-0.14257590472698212,
0.065905071794986... |
def new ( * args, * * kargs ) : obj = itksmoothingrecursivegaussianimagefilterif2if2. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj | [
0.31634393334388733,
0.2077168971300125,
0.005278215277940035,
0.24623960256576538,
-0.9157203435897827,
-0.559787929058075,
0.5013529658317566,
-0.9592692852020264,
-1.3033709526062012,
-0.6971515417098999,
-0.30534422397613525,
0.5255882740020752,
-0.010311751626431942,
1.859412431716919... |
def sort _ tasks ( self, key1 = " is _ completed ", key2 = " due _ date ", is _ reversed = false ) : self. tasks. sort ( key = attrgetter ( key1, key2, " priority " ), reverse = is _ reversed ) | [
-0.7393068075180054,
0.4365714490413666,
0.6771439909934998,
0.5000316500663757,
-0.45027583837509155,
0.4366144835948944,
-0.18466860055923462,
0.16488303244113922,
-1.6368345022201538,
0.40263599157333374,
-0.24725787341594696,
0.04872887581586838,
0.4315284788608551,
0.34438320994377136... |
def _ setup _ table ( self ) : # todo : missing id? self. cursor. execute ( " create table dunkelziffer _ radar ( " " uuid uuid, " " entry _ date date, " " first _ time boolean, " " gender varchar, " " age integer, " " zip _ code integer, " " cough boolean, " " cough _ dry boolean, " " cough _ productive boolean, " " c... | [
0.08034984767436981,
-0.12165046483278275,
0.7716293334960938,
-0.4172877371311188,
0.6237955093383789,
-0.035800717771053314,
-0.15718373656272888,
0.4522465765476227,
-0.6224203109741211,
0.07175806164741516,
-0.033007100224494934,
-0.49844372272491455,
-0.1446329802274704,
0.44156935811... |
def remove _ attribute ( self, attribute : str ) - > none : attr _ index = self. _ _ attr _ index ( attribute ) if attr _ index is not none : self. yaml _ node. value. pop ( attr _ index ) | [
-0.2500256896018982,
-0.17568080127239227,
0.2991439402103424,
-1.0237579345703125,
-0.5044794678688049,
-0.4709647595882416,
0.44628748297691345,
1.5681309700012207,
0.09719935059547424,
0.268830806016922,
0.17013880610466003,
0.3746315538883209,
0.44657662510871887,
0.42623981833457947,
... |
async def list _ rooms ( self, request : smart _ device _ management _ service. listroomsrequest = none, *, retry : retries. retry = gapic _ v1. method. default, timeout : float = none, metadata : sequence [ tuple [ str, str ] ] = ( ), ) - > pagers. listroomsasyncpager : # create or coerce a protobuf request object. re... | [
-1.1388822793960571,
0.9479043483734131,
0.7786284685134888,
0.1294052004814148,
-0.049788180738687515,
-0.6000592708587646,
-0.35213419795036316,
-0.9026789665222168,
0.26262539625167847,
0.344675213098526,
0.7412490248680115,
0.8519096374511719,
-0.2316911816596985,
0.7492696642875671,
... |
def update _ endpoint ( self, endpoint, config = none ) : raise notimplementederror ( " this function is not implemented yet. " ) | [
-1.3099491596221924,
-0.8232591152191162,
0.48831114172935486,
0.9578239917755127,
-0.335002064704895,
0.3051379323005676,
0.16568969190120697,
0.5837961435317993,
0.0763515830039978,
0.7949826121330261,
-0.6813778281211853,
0.2910681962966919,
-0.5508397221565247,
-0.039339400827884674,
... |
def forget ( self, key ) : return self. _ memcache. delete ( self. _ prefix + key ) | [
-0.32138222455978394,
0.2988013029098511,
0.5458021759986877,
-0.7817097902297974,
-1.1047050952911377,
-0.33803609013557434,
-0.9074238538742065,
-0.4109012186527252,
0.2567429840564728,
0.8210474252700806,
-0.5366809368133545,
0.2841598391532898,
-0.9842215180397034,
-0.05140814930200577... |
def initialize ( self ) : self. unique _ id _ base = [ self. tmp _ ntuple ] self. unique _ id _ name = " _ ". join ( self. unique _ id _ base ) self. unique _ id _ path = " / ". join ( self. unique _ id _ base ) self. unique _ id _ batch _ path = " { 0 } / batch / { 1 } ". format ( self. basedir, self. unique _ id _ pa... | [
-0.8131750226020813,
-0.2629214823246002,
0.39756351709365845,
-0.023579835891723633,
0.7265741229057312,
0.12825575470924377,
0.37808555364608765,
0.789019763469696,
-0.5024418830871582,
0.2889504134654999,
-1.110262393951416,
-0.6695573329925537,
-0.025071432814002037,
0.6024554967880249... |
def _ _ str _ _ ( self ) : with self. _ lock : names = sorted ( [ key for key in self. keys ( ) ] ) maxlen = max ( [ len ( name ) for name in names ] ) objects = [ self. get ( name, extract = false ) for name in names ] obj _ reprs = [ ( f " < numpy. ndarray shape = { obj. shape } type = { obj. dtype } at { id ( obj ) ... | [
-0.22838491201400757,
-1.1103345155715942,
0.810357928276062,
-0.7773445248603821,
-0.19154781103134155,
0.08937899023294449,
-0.05522327870130539,
-0.7091273665428162,
-0.07443836331367493,
0.8320183753967285,
0.0367458276450634,
0.6421984434127808,
0.24484480917453766,
0.1081985235214233... |
def all _ components ( self ) : for name, component in self. _ components. items ( ) : yield name, component | [
-0.8730336427688599,
-1.5007612705230713,
0.3854776918888092,
-1.1497070789337158,
-0.47245973348617554,
0.7100308537483215,
-1.4014320373535156,
-0.499094158411026,
0.7414765954017639,
-0.3884558081626892,
-0.2103251814842224,
0.08055167645215988,
0.2925555109977722,
0.6995388269424438,
... |
def _ _ init _ _ ( self, options _ posed : list [ optionresults ] = none ) : # noqa : e501 self. swagger _ types = {'options _ posed': list [ optionresults ] } self. attribute _ map = {'options _ posed':'options _ posed'} self. _ options _ posed = options _ posed | [
-0.2648710012435913,
-0.2687559425830841,
0.4133158326148987,
0.3565494120121002,
0.6848950386047363,
0.17554688453674316,
0.4807506799697876,
-0.15386679768562317,
0.4680596888065338,
-0.35371240973472595,
-1.18257474899292,
-0.40207070112228394,
0.011330954730510712,
0.21840891242027283,... |
def click _ edit _ name ( self ) : webdriverwait ( self. driver, 10 ). until ( ec. visibility _ of _ element _ located ( ( by. css _ selector, self. css _ editoption ) ) ) edit = self. driver. find _ element _ by _ css _ selector ( self. css _ editoption ) action = touchactions ( self. driver ) action. tap ( edit ). pe... | [
-0.4249761402606964,
0.28169259428977966,
0.723956286907196,
0.1843322515487671,
0.7384376525878906,
0.14061370491981506,
1.0345509052276611,
-0.6343011260032654,
0.45247840881347656,
1.106273889541626,
-0.5506194233894348,
-0.38273656368255615,
-0.00501452200114727,
-0.0939711481332779,
... |
def get _ next _ signal ( self ) : if self. override _ signal is not none : return self. override _ signal else : self. keypad. get _ next _ signal ( ) | [
-0.9473778605461121,
0.317989319562912,
0.5636283159255981,
0.9303826689720154,
-0.8523547649383545,
-0.17216315865516663,
-0.04407322034239769,
-0.9141663908958435,
-0.10535231232643127,
-0.4269404709339142,
-0.6932153105735779,
0.25813573598861694,
-0.5754551887512207,
0.5896208882331848... |
def to _ dict ( self ) : result = { } for attr, _ in six. iteritems ( self. swagger _ types ) : value = getattr ( self, attr ) if isinstance ( value, list ) : result [ attr ] = list ( map ( lambda x : x. to _ dict ( ) if hasattr ( x, " to _ dict " ) else x, value ) ) elif hasattr ( value, " to _ dict " ) : result [ att... | [
-0.10714126378297806,
0.1874007135629654,
0.9206011295318604,
-0.6524505019187927,
-0.7734692096710205,
-0.4284813702106476,
-0.06113363429903984,
-0.5910963416099548,
-0.6786068677902222,
-0.47382357716560364,
-0.3224876821041107,
-0.3296939432621002,
-0.4738692045211792,
0.46878084540367... |
def fitgraphtoviewerlater ( self ) - > none :... | [
0.29854461550712585,
0.16631367802619934,
0.1390864998102188,
0.2787362337112427,
-0.0012876854743808508,
-0.036916255950927734,
1.4690076112747192,
-0.42276984453201294,
-0.3668701946735382,
-0.9708235859870911,
-0.23411771655082703,
0.8020941019058228,
-0.5026304721832275,
0.161319151520... |
def getduplicatelumis ( lumisdict ) : doublelumis = set ( ) for run, lumis in lumisdict. items ( ) : seen = set ( ) doublelumis. update ( set ( ( run, lumi ) for lumi in lumis if ( run, lumi ) in seen or seen. add ( ( run, lumi ) ) ) ) doublelumis = lumilist ( lumis = doublelumis ) return doublelumis. getcompactlist ( ... | [
0.3085051476955414,
-0.8516509532928467,
0.6929741501808167,
-0.28743135929107666,
-0.07431476563215256,
0.5486708879470825,
-0.25457072257995605,
-0.12552900612354279,
0.8090450167655945,
0.41513726115226746,
-0.2992765009403229,
0.47774261236190796,
0.2271641045808792,
0.5251638889312744... |
def drop _ duplicates ( self, maintain _ order = true, subset : " optional [ list [ str ] ] " = none ) - > " dataframe " : if subset is not none and not isinstance ( subset, list ) : subset = [ subset ] return wrap _ df ( self. _ df. drop _ duplicates ( maintain _ order, subset ) ) | [
-0.9982145428657532,
0.37046098709106445,
0.5141968727111816,
1.1169735193252563,
0.006459050811827183,
-0.6925439834594727,
-0.15326300263404846,
-0.566903293132782,
-0.1996774971485138,
-0.025106040760874748,
-0.25120124220848083,
0.7560608983039856,
0.16391125321388245,
-0.4438823759555... |
def _ _ init _ _ ( self, namespace _ uri, localname ) : if namespace _ uri is none : namespace _ uri = " " self. _ config = {'namespace - uri': namespace _ uri,'localname': localname } | [
0.48095959424972534,
-0.13110725581645966,
0.25572916865348816,
0.09274560958147049,
-0.5824282169342041,
-0.47275838255882263,
-1.2046085596084595,
1.0563503503799438,
0.32152384519577026,
-0.3897356688976288,
-0.2829010784626007,
0.2915390133857727,
-0.11863205581903458,
0.71705484390258... |
def _ fetchoriginresult ( self ) - > optional [ dict ] : localfile = define. outputdirpath / f'remote. { self. taskid }. origin. json'if localfile. exists ( ) : text = localfile. read _ text ( encoding ='utf - 8') return json. loads ( text ) else : return none | [
0.21333104372024536,
-1.1612881422042847,
0.519867479801178,
-0.714250385761261,
-1.3172575235366821,
0.10833702236413956,
-0.7610418200492859,
-0.4929247796535492,
-0.8156346082687378,
0.39301955699920654,
-0.2288576066493988,
0.22473521530628204,
-0.41853296756744385,
-0.5412640571594238... |
def test _ custom _ separator ( config ) : config. separator = ". " config. set ( " path. test ", " yay " ) assert config. data [ " path " ] [ " test " ] = = " yay " assert config. get ( " path. test " ) = = " yay " assert ( config. get ( " test / spam " ) is none ), " config should no longer recognize default path sep... | [
-0.09779135882854462,
-0.18603654205799103,
0.46538418531417847,
-0.12856100499629974,
-0.5355333089828491,
-0.23039676249027252,
-0.23038281500339508,
0.6250556707382202,
0.5315210819244385,
-0.4178873300552368,
-1.0486969947814941,
-0.33367303013801575,
0.17789743840694427,
0.54129147529... |
def test _ check _ chains ( protprot _ caprimodule ) : obs _ ch = [ [ " a ", " c " ], [ " a ", " b " ], [ " s ", " e ", " b ", " a " ], [ " c ", " d " ] ] # assuming exp chains are a and b exp _ ch = [ [ " a ", " c " ], [ " a ", " b " ], [ " a ", " b " ], [ " c ", " d " ] ] for n in range ( len ( obs _ ch ) ) : obs _ r... | [
-0.04880588874220848,
-0.25282004475593567,
0.6755217909812927,
-0.13850386440753937,
0.642650842666626,
0.4355771839618683,
-0.21086908876895905,
-0.4725508391857147,
-0.05861282721161842,
-0.1196458637714386,
0.005728236399590969,
0.26803138852119446,
-0.383707195520401,
0.33291050791740... |
def describe ( cli _ context, cluster _ name, master _ hostname _ only, ec2 _ region ) : if cli _ context. obj ['provider'] = ='ec2': describe _ ec2 ( cluster _ name = cluster _ name, master _ hostname _ only = master _ hostname _ only, region = ec2 _ region ) else : # todo : create unsupportedproviderexception. (? ) r... | [
-0.20509031414985657,
0.5713128447532654,
0.5141484141349792,
0.11481048166751862,
0.12463250011205673,
-0.10103186219930649,
-0.701790452003479,
0.5141612887382507,
0.2750411033630371,
0.6628940105438232,
0.30817845463752747,
1.7058112621307373,
0.16995282471179962,
-0.08762868493795395,
... |
def test _ check _ no _ basevalues _ error ( ) : with pytest. raises ( valueerror ) : mob. check _ inputs ( chmask, window _ idx ='invalid') | [
0.4320589005947113,
0.5897619128227234,
0.164170041680336,
1.2437034845352173,
1.1705299615859985,
0.4204055666923523,
0.08934542536735535,
0.04906371235847473,
-0.7039607763290405,
-0.8248599767684937,
-0.0238083153963089,
0.7433906197547913,
-0.8458818197250366,
1.1770416498184204,
0.1... |
def load _ vocabulary ( f ) : with codecs. open ( f,'r ','utf - 8') as f : return _ load _ vocabulary ( f ) | [
-0.3164820969104767,
-0.05789927393198013,
0.3196164667606354,
-0.111015684902668,
-1.251076102256775,
-0.5626988410949707,
-0.2701563537120819,
-0.3121945261955261,
-0.47373390197753906,
0.5868514180183411,
-0.24313655495643616,
-0.24344198405742645,
0.20938649773597717,
-0.70398944616317... |
def create ( self, trans, payload, * * kwd ) : log. info ( " groups payload % s \ n " % ( payload ) ) if not trans. user _ is _ admin : trans. response. status = 403 return " you are not authorized to create a new group. " name = payload. get ('name ', none ) if not name : trans. response. status = 400 return " enter a... | [
-0.5176877379417419,
0.2410547137260437,
0.574947714805603,
-0.1969222128391266,
-0.0959256961941719,
0.09901192784309387,
-0.07995102554559708,
-0.7896930575370789,
-0.09397962689399719,
0.34016942977905273,
-0.4038086235523224,
-0.5394827127456665,
-0.24519027769565582,
0.187272354960441... |
def _ decimal _ to _ gbase ( self, value ) : if isinstance ( value, decimal ) : return str ( value ) return none | [
-0.13852562010288239,
0.34154820442199707,
0.5906081199645996,
-0.028706125915050507,
0.062248263508081436,
0.3780673146247864,
-0.7112232446670532,
-1.7919352054595947,
0.24996626377105713,
0.43146422505378723,
0.5546157360076904,
0.06009494513273239,
-0.8486937880516052,
-0.0717245787382... |
def _ whctrs ( anchor ) : w = anchor [ 2 ] - anchor [ 0 ] + 1 h = anchor [ 3 ] - anchor [ 1 ] + 1 x _ ctr = anchor [ 0 ] + 0. 5 * ( w - 1 ) y _ ctr = anchor [ 1 ] + 0. 5 * ( h - 1 ) return w, h, x _ ctr, y _ ctr | [
0.05058058351278305,
0.023644287139177322,
0.3858078718185425,
-0.8112744688987732,
0.1345468908548355,
-0.8870971202850342,
0.542462944984436,
-0.6359918117523193,
0.4294898211956024,
0.08535055816173553,
-0.010372978635132313,
-0.30020347237586975,
0.4855705201625824,
-0.6724773049354553... |
def _ f _ eff _ helper ( self, model, fs, mode = " quad " ) : # center of mass energy vx = self. vx _ cmb ( model. mx, self. x _ kd ) * * 2 e _ cm = 2. 0 * model. mx * ( 1. 0 + 0. 5 * vx * * 2 ) if fs = = " g g " : f _ eff _ base = f _ eff _ g lines = model. gamma _ ray _ lines ( e _ cm ) def spec _ fn ( es, e _ cm ) :... | [
0.21461708843708038,
-0.22076204419136047,
0.7090440988540649,
-0.6491937637329102,
-0.05545531585812569,
-0.4570009708404541,
0.1748354732990265,
0.4797970652580261,
-0.4572325348854065,
-0.08176261931657791,
-0.10759800672531128,
-0.777298629283905,
0.23931199312210083,
0.199022024869918... |
def sortbyvalue ( statelist ) : statelist. sort ( key = lambda neigh : neigh. getvalue ( ), reverse = true ) | [
-0.5562165975570679,
-0.13138450682163239,
0.5405086874961853,
0.38399791717529297,
-0.2599422335624695,
0.4120415449142456,
-0.28589242696762085,
-1.0521488189697266,
-0.536712110042572,
0.3994598388671875,
-0.45636746287345886,
-0.27707332372665405,
0.004918133374303579,
0.81827086210250... |
def get _ skin ( self, context ) : # back - office hostname = context. uri. authority if hostname [ : 3 ] in ['bo. ','bo -'] : return self. get _ resource ('/ ui / aruni') # front - office return self. get _ resource ( self. class _ skin ) | [
-0.09038469940423965,
0.43314534425735474,
0.443673700094223,
0.5358557105064392,
0.22400715947151184,
0.11399537324905396,
-0.0885976180434227,
-0.7319890856742859,
-0.4509052634239197,
-0.433395117521286,
1.5492870807647705,
1.4448866844177246,
-0.0691232979297638,
0.38949766755104065,
... |
def professors _ info ( professors : list ) - > str ( ) : begin _ row ='< div class = " w3 - container w3 - row - padding " >'card ='''< div class = " w3 - quarter w3 - center w3 - container w3 - margin - top " > % s < br > % s < br > < a target = " _ blank " href = " % s " > auto < / a > & nbsp ; | & nbsp ; < a target... | [
-0.7976613640785217,
0.42552298307418823,
0.986045777797699,
-0.31661245226860046,
-0.4038037061691284,
-0.28349393606185913,
-0.5120959281921387,
-0.1560942381620407,
0.135077565908432,
0.5701771974563599,
0.5470459461212158,
-0.41308507323265076,
0.3067215085029602,
0.22144268453121185,
... |
def avg _ best _ fitness ( self, list ) : mean = sum ( list ) / len ( list ) return mean | [
-1.1632651090621948,
-0.20185652375221252,
0.3839406371116638,
0.7714160084724426,
0.06874386966228485,
0.48223739862442017,
-0.10846156626939774,
0.6610130071640015,
0.22344152629375458,
0.9989032745361328,
-1.0976159572601318,
0.5946565866470337,
-0.26896604895591736,
0.9206758141517639,... |
def generate _ cim _ fields _ tests ( self ) : logger. info ( " generating cim fields tests " ) for tag _ stanza, dataset _ list in self. get _ mapped _ datasets ( ) : test _ dataset = dataset _ list [ - 1 ] logger. info ( " generating cim tests for tag _ stanza = % s, dataset _ list = % s ", tag _ stanza, test _ datas... | [
0.23396243155002594,
-0.11606054753065109,
0.5511199235916138,
-1.1892499923706055,
0.9074895977973938,
0.5094666481018066,
0.4815117120742798,
0.22046774625778198,
-0.5339646935462952,
-0.8220328092575073,
-0.45420292019844055,
-0.13330195844173431,
0.11219046264886856,
0.1391804069280624... |
def test _ hash _ int ( new _ hash _ table ) : val = new _ hash _ table. to _ insert assert isinstance ( new _ hash _ table. instance. _ hash ( val ), int ) | [
0.2012450248003006,
0.9234969019889832,
0.1779656559228897,
0.044430993497371674,
0.14515568315982819,
0.5693739652633667,
0.28443822264671326,
-0.652006208896637,
-0.9156802892684937,
-0.2278473824262619,
-0.550804615020752,
-0.48531225323677063,
-0.2494475394487381,
0.09778750687837601,
... |
def _ _ parse _ sysargs ( self ) : # create parser object parser = argparse. argumentparser ( description ='heatmap generation on stream and event history.') # get utc time now now = ( datetime. datetime. utcnow ( ). replace ( microsecond = 0 ) ). isoformat ( ) +'z'# general arguments parser. add _ argument ('- - layou... | [
0.04684629291296005,
-0.39860889315605164,
0.9954943060874939,
-0.4369649291038513,
-0.11705989390611649,
0.1386614590883255,
0.19082880020141602,
0.1822517067193985,
-1.0383638143539429,
0.3569034934043884,
-0.39017194509506226,
0.2771703898906708,
-0.04484090581536293,
1.6483460664749146... |
def parse _ fighter ( self, response, first _ name, last _ name, nickname, height, weight, reach, stance, wins, losses, draws, belt, fighter _ id, today ) : boxes = response. css ( '. b - list _ _ box - list') [ 0 ] # box _ 1 boxes _ text = boxes. xpath ('/ / ul / / li / text ( )'). getall ( ) try : dob = datetime. dat... | [
-0.39700591564178467,
-0.3453868329524994,
0.9313618540763855,
-0.2838684022426605,
0.48718324303627014,
-0.3247133195400238,
-0.9470369219779968,
-0.14019350707530975,
-0.40015462040901184,
-0.6373729109764099,
-0.6506915092468262,
-0.9391116499900818,
0.736358642578125,
0.828094005584716... |
def globalarray ( self ) : return list ( zip ( self. ar, self. ct ) ) | [
-0.4321632385253906,
-0.9183682799339294,
0.361665278673172,
0.22729843854904175,
0.6571317315101624,
1.308684229850769,
0.4059116244316101,
-0.1956527829170227,
0.47330549359321594,
0.9014850854873657,
-0.3748824894428253,
1.0133432149887085,
-0.5151481628417969,
1.1385364532470703,
0.1... |
def fireplace ( name : str ) : return { " name " : name, " type " : devicetypes. fireplace } | [
-0.8754005432128906,
0.25447437167167664,
0.3188251852989197,
-0.2663652002811432,
-1.4108338356018066,
-0.5886793732643127,
-0.38679030537605286,
0.012217186391353607,
-0.33597028255462646,
-0.24961329996585846,
-1.371817708015442,
0.2776838541030884,
-0.5686725378036499,
0.74485367536544... |
def checkpalindrome ( str ) : l = len ( str ) for i in xrange ( l / 2 ) : if not ( str [ i ] = = str [ l - i - 1 ] ) : return false return true | [
-0.21829131245613098,
-0.2255718857049942,
0.5840438604354858,
0.6856964230537415,
-0.5168994665145874,
1.0437984466552734,
-0.18746024370193481,
0.3417815864086151,
-0.10411541908979416,
-0.10423670709133148,
-0.06522177904844284,
-0.25228673219680786,
-2.2645740509033203,
-0.595724046230... |
def destroy _ instances ( self, instance _ list ) : raise notimplementederror | [
-1.8917125463485718,
0.08901466429233551,
0.4324786067008972,
0.7625818252563477,
0.7322927117347717,
0.7596251964569092,
0.252206027507782,
0.6794863939285278,
-0.01890159584581852,
1.1136386394500732,
-0.6169527769088745,
-0.279118150472641,
-0.7017782330513,
1.5693169832229614,
-0.996... |
def run _ ann _ full ( x _ train, y _ train, x _ test, y _ test, randseed, i, param _ grid, n _ trials, timeout, do _ plot, full _ path, training _ subsample, use _ uniform _ fi, primary _ metric ) : # check whether hyperparameters are fixed ( i. e. no hyperparameter sweep required ) or whether a set / range of values ... | [
0.25741270184516907,
0.7798714637756348,
1.001551628112793,
0.7259748578071594,
-0.4153715670108795,
0.5056607723236084,
0.7202591300010681,
0.7100323438644409,
-0.47607794404029846,
0.5986946225166321,
0.16827033460140228,
0.9972625374794006,
0.5134271383285522,
0.09811431169509888,
-0.... |
def get _ anagrams ( self ) : self. anagrams = self. map [''. join ( sorted ( self. challenge ) ) ] | [
-0.08656063675880432,
0.06441240757703781,
0.2390330731868744,
0.2025558352470398,
-0.6691215634346008,
-0.044099848717451096,
-0.41057512164115906,
-0.13104115426540375,
-0.004374061711132526,
0.9679069519042969,
-0.7008846998214722,
0.23359952867031097,
0.2209405153989792,
0.043119732290... |
def test _ callback _ error ( self ) - > none : request = mock ( args = { } ) request. args [ b " error " ] = [ b " invalid _ client " ] self. get _ success ( self. handler. handle _ oidc _ callback ( request ) ) self. assertrenderederror ( " invalid _ client ", " " ) request. args [ b " error _ description " ] = [ b "... | [
-0.0237305648624897,
0.9058788418769836,
0.43710610270500183,
-0.1827927678823471,
0.9531990885734558,
0.35175955295562744,
-0.1571216583251953,
-0.050342705100774765,
0.862896740436554,
-0.5731030702590942,
0.13087166845798492,
0.0500803142786026,
-0.497761070728302,
0.48662298917770386,
... |
def get _ text _ objects ( layout, ltype = " char ", t = none ) : if ltype = = " char " : ltobject = ltchar elif ltype = = " image " : ltobject = ltimage elif ltype = = " horizontal _ text " : ltobject = lttextlinehorizontal elif ltype = = " vertical _ text " : ltobject = lttextlinevertical if t is none : t = [ ] try :... | [
-0.33616793155670166,
-0.9015618562698364,
0.5424336791038513,
0.12494834512472153,
-0.2525198459625244,
-0.19748227298259735,
-0.030266139656305313,
-0.36810505390167236,
-0.023757794871926308,
-0.24702349305152893,
-0.8696767091751099,
-0.41705211997032166,
0.015063703060150146,
-0.06975... |
def update _ pending ( self ) : # get finished tasks states states = self. get _ tasks _ state ( self. running ) for task _ id, result in states. items ( ) : if not result. is _ done ( ) : self. logger. debug ( " task % s is still running ", task _ id ) continue # mitigation for celery bug if not result. is _ final ( )... | [
-0.5356366634368896,
-0.5125471353530884,
0.5962545871734619,
0.3378957509994507,
-0.3935922682285309,
-0.15652403235435486,
0.20447991788387299,
0.5295558571815491,
-0.7486633062362671,
-0.18985722959041595,
0.2547089457511902,
-0.199663907289505,
0.23298555612564087,
0.4701921045780182,
... |
def runconfig ( cfg ) : config = configparser. configparser ( ) die = 0 if cfg is none : print ( " info : reading configuration from config. ini " ) # try : config. read ('config. ini') # except : # print ( " error : unable to read config. ini dying. " ) # sys. exit ( 1 ) else : config = cfg try : os = config ['os'] ['... | [
-0.4060302674770355,
-0.9215019941329956,
1.2360562086105347,
1.1009808778762817,
-0.14499877393245697,
-0.22373655438423157,
0.7214040756225586,
-0.3941148817539215,
-0.5308289527893066,
0.33008548617362976,
-0.6532069444656372,
-0.09101025015115738,
-0.6959963440895081,
0.699805140495300... |
def startswith ( self, other : " importstring " ) - > bool : for part _ index, part in enumerate ( other. parts ) : try : self _ part = self. parts [ part _ index ] except indexerror : return false if self _ part! = part : return false return true | [
0.30093786120414734,
-1.1283130645751953,
0.8540031313896179,
0.10898607969284058,
-0.16285403072834015,
0.4320716857910156,
-0.672033429145813,
-1.300896406173706,
0.26324138045310974,
0.2834054231643677,
-0.39944565296173096,
0.46401044726371765,
-0.8848756551742554,
-0.4279005825519562,... |
def to _ representation ( self, instance ) : request = self. context. get ( " request ", none ) ret = ordereddict ( ) ret [ " id " ] = instance. id ret [ " basename " ] = instance. basename ret [ " created " ] = instance. created ret [ " datatypes " ] = self. get _ file _ datatypes ( instance ) ret [ " download _ url "... | [
-1.2159148454666138,
-0.671774685382843,
0.4184870421886444,
-2.459336519241333,
0.20237088203430176,
0.00665369862690568,
-0.17735899984836578,
-0.4020335376262665,
0.08132956922054291,
0.28530988097190857,
-0.985593318939209,
0.545868992805481,
0.3803651034832001,
0.43069976568222046,
... |
def _ find _ new _ commits ( self, refs, ref _ branches ) : self. ensure _ one ( ) branch = self. env ['runbot. branch'] build = self. env ['runbot. build'] icp = self. env ['ir. config _ parameter'] max _ age = int ( icp. get _ param ('runbot. runbot _ max _ age ', default = 30 ) ) self. env. cr. execute ( " " " selec... | [
-0.17413726449012756,
-0.26595017313957214,
0.5954956412315369,
0.12045039981603622,
0.377340167760849,
0.3270069658756256,
-0.35035058856010437,
-0.8094585537910461,
-1.0576499700546265,
-0.3532463610172272,
0.2932199537754059,
-0.14066201448440552,
-0.4244312345981598,
0.6877791881561279... |
async def test _ turn _ on _ fireplace ( hass : core. homeassistant ) : await setup _ platform ( hass, light _ domain, fireplace ( " name - 1 " ), bond _ device _ id = " test - device - id " ) with patch ( " homeassistant. components. bond. bond. turnon " ) as mock _ turn _ on, patch ( " homeassistant. components. bond... | [
-0.03447960317134857,
0.41670241951942444,
0.42338550090789795,
0.3822087049484253,
0.5136338472366333,
-0.3793177306652069,
-0.3848107159137726,
0.0038008498959243298,
0.29403796792030334,
-0.5921090841293335,
-1.140148401260376,
0.9349509477615356,
-0.7995719313621521,
0.9203259348869324... |
def recv ( self, data ) : msg = usbmessagedevice ( data ) if msg. type = = 0 : # data self. recv _ usb ( msg. content ) elif msg. type = = 1 : # ack self. recv _ ack ( msg. content ) elif msg. type = = 2 : # management self. recv _ management ( msg. content ) | [
-0.22700932621955872,
0.4738568365573883,
0.7292024493217468,
0.3986363410949707,
0.11514338850975037,
0.24662627279758453,
-0.006287727039307356,
-0.4857381582260132,
-0.24844388663768768,
-0.4299978017807007,
0.06338242441415787,
0.4333759844303131,
-0.72442626953125,
0.48363766074180603... |
def generate _ hash ( self, attack _ type ='default') : return hashlib. md5 ( str ( datetime. datetime. now ( ) ) + attack _ type ). hexdigest ( ) | [
-0.09684193879365921,
-0.21088817715644836,
0.61784827709198,
0.4772254526615143,
0.3897344768047333,
0.9806872606277466,
-0.4296576976776123,
-0.04659955948591232,
-0.7027463316917419,
0.25620919466018677,
-0.024940792471170425,
-0.11266133934259415,
-0.09018789976835251,
-0.2897135615348... |
def _ recvall ( self, nbytes ) : buf ='' while len ( buf ) < nbytes : data = self. recv ( nbytes - len ( buf ) ) if data = ='' : raise runtimeerror ('socket connection broken') buf = buf + data return buf | [
0.058498166501522064,
0.35748937726020813,
0.5057919025421143,
-1.1959037780761719,
-0.8973643183708191,
0.1423702836036682,
-1.6087950468063354,
-1.081887125968933,
-0.11119889467954636,
0.11760308593511581,
-0.1223856583237648,
0.2670597732067108,
-0.4331326186656952,
0.31882244348526,
... |
def topods _ edge ( * args ) : return _ topods. topods _ edge ( * args ) | [
-0.8597485423088074,
0.7698311805725098,
0.5297459363937378,
0.268807590007782,
0.2244744449853897,
0.0863712951540947,
0.0524136982858181,
-0.3563067615032196,
-0.44831517338752747,
0.4549697935581207,
0.31105169653892517,
-1.1443215608596802,
-1.0957340002059937,
0.0869092270731926,
0.... |
def is _ opening ( self ) : return self. state = = opener _ state. opening | [
-1.0076916217803955,
-0.37040016055107117,
0.3434278070926666,
1.0101327896118164,
-0.6886268258094788,
0.13094429671764374,
0.320364385843277,
1.0630584955215454,
1.3884714841842651,
-0.6140913963317871,
-0.015222546644508839,
-0.07217472791671753,
-0.2637366056442261,
-0.5075197815895081... |
def task _ action ( ser, model, sample _ rate, cmd _ table, d, chunk ) : logger. info ( " act " ) action _ listen ( ser = ser, model = model, sample _ rate = sample _ rate, cmd _ table = cmd _ table, d = d, chunk = chunk ) | [
0.4898078739643097,
-0.8894541263580322,
0.5546184182167053,
0.5968887805938721,
0.564471960067749,
0.11519013345241547,
1.708914041519165,
-0.21517926454544067,
-0.4267594814300537,
0.6081448793411255,
-0.4856325387954712,
0.8579148054122925,
0.8989461064338684,
-0.001086213975213468,
-... |
def game ( self, gsis _ id ) : url = " http : / / www. nfl. com / liveupdate / game - center / { 0 } / { 0 } _ gtd. json " return self. get ( url. format ( gsis _ id ) ) | [
-0.06115330755710602,
-0.1992862969636917,
0.5168576836585999,
-0.6613895297050476,
-0.09091681987047195,
-0.014121470041573048,
-2.061760187149048,
-1.0404843091964722,
0.21781298518180847,
1.37778902053833,
0.6539920568466187,
0.09275972843170166,
-0.5682095885276794,
-0.1610158234834671... |
def _ _ init _ _ ( self, model, flen, ori _ video _ shape, sensor _ size, infer _ gaze _ flag = true ) : # assertion of shape try : assert ( ( isinstance ( flen, int ) or isinstance ( flen, float ) ) ) assert ( isinstance ( ori _ video _ shape, tuple ) or isinstance ( ori _ video _ shape, list ) or isinstance ( ori _ v... | [
0.1457126885652542,
-0.2529129683971405,
0.5974553823471069,
0.9285980463027954,
-0.19850991666316986,
0.09816183894872665,
0.3217819333076477,
0.22794462740421295,
0.7866660952568054,
0.0436004102230072,
-0.6551358699798584,
0.7854019999504089,
-0.15225544571876526,
1.1092957258224487,
... |
def press _ to _ continue ( ) : input ('\ npresione enter para continuar') | [
1.226060390472412,
-0.47305336594581604,
0.5046027302742004,
1.2296075820922852,
-0.5213853716850281,
1.4090505838394165,
0.7881263494491577,
-0.47375214099884033,
-0.7016384601593018,
-0.062476202845573425,
0.1399693340063095,
-0.11384072154760361,
-0.8712458610534668,
-0.8935514092445374... |
def most _ frequent ( data ) : d = dict ( ) i = 0 for d in data : if d in d : i + = 1 d [ d ] = i print ( d ) l = sorted ( d. items ( ), key = lambda x : x [ 1 ], reverse = true ) print ( l ) return l [ 0 ] [ 0 ] | [
0.3050423562526703,
-0.03903019428253174,
0.6276176571846008,
-0.266356885433197,
-0.5259782671928406,
-0.3335513472557068,
0.1539110690355301,
0.04343516007065773,
-0.26684629917144775,
-0.7882673740386963,
0.2974172532558441,
0.5362967848777771,
-0.02104579657316208,
0.07232630252838135,... |
def test _ get _ agent _ requirements ( self ) : pass | [
-0.3462360203266144,
-0.8747678995132446,
0.3733472228050232,
1.3999639749526978,
0.5688202977180481,
0.3169223666191101,
0.2198183834552765,
-0.37675613164901733,
0.6476607918739319,
-0.4139750599861145,
-0.5653776526451111,
0.09945984184741974,
-0.19437305629253387,
0.5040615797042847,
... |
def clearstats ( self ) : try : return self. _ clearstats except exception as e : raise e | [
0.6228116154670715,
1.6439419984817505,
0.31971868872642517,
0.07977265864610672,
-0.2363002449274063,
0.7966898083686829,
0.2610759437084198,
-1.3793538808822632,
0.409883588552475,
-0.03051895461976528,
0.5236943364143372,
0.8698239326477051,
0.02433316595852375,
-0.31432202458381653,
... |
def test _ entity _ attr _ funcs _ itbl ( mock _ asn _ whois _ query, create _ pivot, test _ case ) : mock _ asn _ whois _ query. return _ value = asn _ response respx. get ( re. compile ( r " http : / / rdap \. arin \. net /. * " ) ). respond ( 200, json = rdap _ response ) ent _ cls = getattr ( entities, test _ case.... | [
-0.9372108578681946,
-0.05145536735653877,
0.4923109710216522,
0.11983292549848557,
1.1921403408050537,
0.416081964969635,
0.6389442682266235,
-0.2730973958969116,
0.3382638692855835,
0.36552152037620544,
0.3700585961341858,
-0.36408761143684387,
0.29592713713645935,
-0.03066159039735794,
... |
def noclook _ node _ to _ url ( context, handle _ id ) : if handle _ id and not isinstance ( handle _ id, int ) : if hasattr ( handle _ id,'handle _ id') : handle _ id = handle _ id. handle _ id if'handle _ id'in handle _ id : handle _ id = handle _ id ['handle _ id'] # handle fallback urls = context. get ('urls') if u... | [
0.17601853609085083,
0.23574450612068176,
0.4956241250038147,
-0.7437710165977478,
1.1724157333374023,
0.25168129801750183,
0.24234451353549957,
-0.21880491077899933,
0.029966827481985092,
-0.49696922302246094,
0.8861299157142639,
0.8125160336494446,
0.12203396111726761,
0.4150046110153198... |
def test _ full2d _ in3d ( ) : ll = list ( ldom ) ll [ 0 ] = 0. print ll, xdom topo, cub = check _ subset ( discr3d, xdom, ll ) print'dims s, s, s ', cub. origin, cub. length velo = field ( domain = topo. domain, is _ vector = true, formula = v3d, name ='velo') vd = velo. discretize ( topo ) velo. initialize ( topo = t... | [
1.275213599205017,
0.7056041359901428,
0.6912530064582825,
0.4314129650592804,
-0.14074327051639557,
0.801624059677124,
0.34444841742515564,
0.6045181751251221,
0.13382285833358765,
-0.5583369135856628,
-0.5202727913856506,
0.5001400709152222,
-0.4810675084590912,
0.01686910353600979,
0.... |
def parse _ transaction _ form ( request ) : t = transaction. objects. filter ( user = request. user ) form = transactionform ( request. user, data = request. get ) if form. is _ valid ( ) : date _ from = form. cleaned _ data ['date _ from'] if date _ from is not none : t = t. filter ( date _ _ gte = date _ from ) date... | [
-0.1073734387755394,
-0.6996327638626099,
0.8358284831047058,
-0.8023706078529358,
-0.37995341420173645,
-0.28851211071014404,
-0.06350215524435043,
-0.2691633105278015,
-0.04026883468031883,
-0.3804103434085846,
-0.48328304290771484,
-0.6635831594467163,
1.076910376548767,
0.0723550170660... |
def remaining _ time ( self, log = none ) : return self. start _ time + self. timeout - time. time ( ) | [
0.41833990812301636,
-0.403005987405777,
0.6987672448158264,
0.006226737052202225,
-0.40436598658561707,
0.5123729705810547,
-0.23463031649589539,
-0.1737671196460724,
0.10169609636068344,
0.6057336330413818,
-0.5377375483512878,
-0.7845069766044617,
-1.1882456541061401,
0.2315850853919983... |
def test _ contains _ not _ in ( ) - > none : lst = linkedlist ( ) node1 = _ node ( 1 ) node2 = _ node ( 2 ) node3 = _ node ( 3 ) node1. next = node2 node2. next = node3 lst. _ first = node1 assert ( 4 in lst ) is false | [
-0.5337815880775452,
0.22827105224132538,
0.2157793790102005,
-0.2934066653251648,
0.050804536789655685,
0.5262054800987244,
0.06263859570026398,
-0.47852998971939087,
-0.7591593265533447,
-0.5421685576438904,
-0.6363052725791931,
-0.00009669128485256806,
-1.601436734199524,
0.656628072261... |
def count ( self, count ) : self. _ count = count | [
0.13051632046699524,
0.38002559542655945,
0.08393897116184235,
0.3689388632774353,
0.3027328848838806,
0.9674021005630493,
-0.14083704352378845,
0.46501630544662476,
-1.6759636402130127,
-0.07178646326065063,
-1.2710436582565308,
-1.4048868417739868,
0.06060340628027916,
0.6466816067695618... |
def from _ utma ( self, value ) : parts = value. split ( '.') if len ( parts )! = 6 : raise valueerror ('the given " _ _ utma " cookie value is invalid') # return self self. unique _ id = parts [ 1 ] self. first _ visit _ time = datetime. fromtimestamp ( parts [ 2 ] ) self. previous _ visit _ time = datetime. fromtimes... | [
-0.6033698320388794,
-0.08113878965377808,
0.638679563999176,
-0.14827921986579895,
-0.6627172827720642,
-0.4664982557296753,
0.7134658694267273,
0.12325087934732437,
0.39477062225341797,
0.5232301354408264,
0.37316733598709106,
0.053738392889499664,
0.5204861760139465,
-0.7575405240058899... |
def set _ written ( self, * refs ) : self. assert _ writeable ( * refs ) self. set _ touched ( * refs ) self. set _ meaningful ( * refs ) | [
-1.2490363121032715,
-0.5402588248252869,
0.2881871163845062,
-0.22859662771224976,
1.1505022048950195,
0.4208453893661499,
0.7294743657112122,
-0.558503270149231,
-0.273425430059433,
0.014075162820518017,
-0.05971888080239296,
0.1192183569073677,
-0.5177479386329651,
0.31737351417541504,
... |
def breadth _ first _ traversal ( self ) : node = self. _ root q = queue ( ) q. enqueue ( node ) traversed = [ ] while len ( traversed ) < self. size ( ) : try : node = q. dequeue ( ) traversed. append ( node ) children = self. _ nodes [ node ] [ 0 : 2 ] for child in children : if child is not none and child! = float (... | [
0.39024606347084045,
0.31097573041915894,
0.8157776594161987,
0.6514297723770142,
0.7795941829681396,
-0.6854055523872375,
-0.0976167619228363,
-0.07159994542598724,
-0.307034969329834,
0.24986907839775085,
-0.37555137276649475,
0.008470196276903152,
-0.2632468342781067,
1.0002378225326538... |
def alloc _ inode ( i ) : rinodes [ i ] = len ( rinodes ) + 1 # + 1 because llfuse. root _ inode = 1 inodes [ rinodes [ i ] ] = i return rinodes [ i ] | [
-0.22445300221443176,
0.31953608989715576,
0.4288839101791382,
-0.12647274136543274,
-0.0042884801514446735,
-0.2728674113750458,
0.749357283115387,
0.16608747839927673,
0.6973701119422913,
0.1780114620923996,
-0.3175854980945587,
0.6869313716888428,
-1.3103828430175781,
-0.803351044654846... |
async def remove _ operator _ from _ operation ( self, operation : operation, operator : operator ) - > mythicresponse : resp = await self. get _ operation ( operation ) if resp. status = = " success " : operation = resp. response else : raise exception ( " failed to get operation in remove _ operator _ for _ operation... | [
-0.8342995643615723,
-0.23134425282478333,
0.8350546360015869,
-0.01878490298986435,
-0.511198103427887,
-0.8064233064651489,
0.04612063616514206,
0.45348089933395386,
0.28216877579689026,
0.6398941278457642,
-0.5863196849822998,
-0.003522008890286088,
-1.0098259449005127,
-0.9832798242568... |
def gen _ target ( self, arm ) : self. target = np. random. random ( size = ( 1, ) ) * \ self. target _ gain + self. target _ bias if self. control _ type = ='osc _ x': return ( self. target, 0 ) elif self. control _ type = ='osc _ y': return ( 0, self. target ) return arm. position ( self. target ) | [
-1.310024619102478,
-0.49335774779319763,
0.513835072517395,
-0.5139669179916382,
1.216397762298584,
0.030088266357779503,
-0.03300243243575096,
-0.6131241917610168,
-0.020526714622974396,
-0.3712899684906006,
0.5527951121330261,
0.4688148498535156,
-0.22085444629192352,
-0.052723955363035... |
def addenumdescriptor ( self, * args, * * kwargs ) : # real signature unknown pass | [
-0.6629458069801331,
-0.1313718855381012,
0.5672232508659363,
0.26479828357696533,
0.9267865419387817,
0.6529569029808044,
0.32185715436935425,
0.1808927208185196,
0.6958104372024536,
-0.4321124255657196,
-0.41174906492233276,
0.4407123327255249,
-0.36016175150871277,
1.304557204246521,
... |
def create _ links _ file ( cities, app _ type ) : for city _ key, city in cities. items ( ) : for app _ key, app in app _ type. items ( ) : url = f " https : / / www. realtymag. ru / { city } / { app } / prodazha /? type = 1 & currency = rur & price _ type = all " offers _ link _ list = [ ] if app _ key = = " new " an... | [
-0.4588378965854645,
-0.44089481234550476,
0.7404367923736572,
0.18798673152923584,
0.5078083276748657,
0.8928229808807373,
0.2076437920331955,
0.9119817018508911,
-0.3187885284423828,
-0.20236453413963318,
0.31322529911994934,
0.5525025725364685,
-0.04906991869211197,
0.6518796682357788,
... |
def test _ response _ uri _ is _ properly _ constructed ( self ) : data = {'client _ id': self. client. client _ id,'redirect _ uri': self. client. default _ redirect _ uri,'response _ type':'code ','scope':'openid email ','state': self. state,'allow':'accept ', } response = self. _ auth _ request ('post ', data, is _ ... | [
-0.6911190152168274,
-0.51109778881073,
0.6129987835884094,
-0.28883591294288635,
0.5790855288505554,
0.3263944983482361,
0.3359757959842682,
0.017387259751558304,
0.7677063345909119,
-0.8556931018829346,
0.01199920941144228,
-0.4624503552913666,
-0.17937305569648743,
-0.2699376344680786,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.