text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def preico _ token _ allocation ( token ) - > int : return int ( token. call ( ). totalsupply ( ) * 0. 1 ) | [
0.31634992361068726,
0.3089202642440796,
0.36182859539985657,
-0.6179859638214111,
-0.03648442029953003,
-0.9760681986808777,
0.8142623901367188,
-0.5066317319869995,
0.33520323038101196,
0.13526177406311035,
0.2970939874649048,
-0.5167551040649414,
0.5355613827705383,
-0.5210304856300354,... |
def transform ( self, usage _ info, block _ structure ) : for block _ key in block _ structure : if block _ key. block _ type! ='library _ content': continue library _ children = block _ structure. get _ children ( block _ key ) if library _ children : state _ dict = get _ student _ module _ as _ dict ( usage _ info. u... | [
-0.628940224647522,
-1.0180883407592773,
0.5209138989448547,
-0.30441635847091675,
0.3490932285785675,
-0.38019123673439026,
0.7372926473617554,
-0.507468581199646,
-0.1670599728822708,
0.3503399193286896,
-0.6766487956047058,
-0.09944018721580505,
-0.2885041832923889,
0.1671184003353119,
... |
def error _ is _ saved ( error, app _ name = none ) : error _ name = callable _ name ( error ) stats = core _ application _ stats _ engine ( app _ name ) errors = stats. error _ data ( ) return error _ name in [ e. type for e in errors if e. type = = error _ name ] | [
-0.3167229890823364,
0.35376784205436707,
0.3652016520500183,
1.4431846141815186,
0.49543899297714233,
-0.14919818937778473,
-0.3811296820640564,
-0.09988792985677719,
1.0173345804214478,
0.6819429993629456,
-0.3419632613658905,
0.22755227982997894,
0.0940999910235405,
0.5452187657356262,
... |
def get _ private _ data _ folder ( form, subfolder _ tag ) : dir _ list = _ get _ dir _ structure ( os. path. join ( settings. data _ dir,'private'), form ) return dir _ list [ subfolder _ tag ] | [
-0.8761448264122009,
0.6346232295036316,
0.4470604658126831,
-0.2908584475517273,
0.12314344942569733,
0.30205237865448,
0.26673004031181335,
-0.7302423119544983,
-0.40583688020706177,
-1.3057801723480225,
-0.3638138473033905,
1.17949640750885,
0.4769117832183838,
0.4067188501358032,
0.4... |
def _ _ init _ _ ( self, zone : list [ zoneinfo ] = none, resource _ url : resourceurl = none ) : # noqa : e501 self. swagger _ types = {'zone': list [ zoneinfo ],'resource _ url': resourceurl } self. attribute _ map = {'zone':'zone ','resource _ url':'resourceurl'} self. _ zone = zone self. _ resource _ url = resource... | [
0.14425334334373474,
-0.6556704044342041,
0.3435167670249939,
0.3938133120536804,
-0.33854058384895325,
0.22267083823680878,
0.7737049460411072,
0.7197551131248474,
0.7451367974281311,
-0.34779784083366394,
-0.9153128862380981,
-0.29659730195999146,
0.21898290514945984,
0.3526635766029358,... |
def multiplicativemodularcausalattention ( d _ feature, n _ heads = 1, sparsity = none, dropout = 0. 0, max _ inference _ length = 2048, mode ='train') : sparsity = n _ heads if sparsity is none else sparsity return tl. configurableattention ( multiplicativemodularsparsedense ( sparsity, d _ feature ), multiplicativemo... | [
0.3437449038028717,
0.065271757543087,
0.7835880517959595,
-0.4256470501422882,
-0.9071491956710815,
-0.2783396244049072,
0.6328281760215759,
0.7443355321884155,
1.319846510887146,
0.3473556637763977,
0.05558525770902634,
0.2597920298576355,
0.2911248505115509,
0.33873000741004944,
0.561... |
def test _ get _ delete _ booking _ page ( self ) : event = baker. make _ recipe ('booking. future _ ev') booking = baker. make _ recipe ('booking. booking ', event = event, user = self. user ) url = reverse ('booking : delete _ booking ', args = [ booking. id ] ) self. client. login ( username = self. user. username, ... | [
-0.3275238275527954,
1.2670849561691284,
0.6192474365234375,
1.2883193492889404,
0.11342591047286987,
0.43545737862586975,
-0.20524869859218597,
1.3042833805084229,
0.25686725974082947,
-0.3654754161834717,
0.47436970472335815,
-0.03424166887998581,
-0.04679391533136368,
0.1546480059623718... |
def exe _ sql _ many ( self, sql, vals ) : try : cursor = self. db. cursor ( ) cursor. executemany ( sql, vals ) cursor. close ( ) self. db. commit ( ) except exception as e : raise e | [
-0.3534528613090515,
0.5729449987411499,
0.854510486125946,
1.5089571475982666,
0.30995917320251465,
0.07411199808120728,
-1.2942556142807007,
-0.035443030297756195,
-0.4954815208911896,
0.22481736540794373,
0.37835025787353516,
-1.058258056640625,
0.28841739892959595,
0.8678115606307983,
... |
def _ has _ docstring ( node ) : return get _ docstring ( node ) is not none and get _ docstring ( node ). strip ( )! = " " | [
0.5550392866134644,
0.7199103236198425,
0.40152207016944885,
-1.0892000198364258,
-0.5398580431938171,
0.22135572135448456,
-0.8227415084838867,
-0.01159947831183672,
-0.20068101584911346,
0.27219557762145996,
0.1084957867860794,
-0.4114803373813629,
1.0695552825927734,
0.6567838788032532,... |
def render ( self, name, value, attrs = none, * args, * * kwargs ) : if self. is _ localized : for widget in self. widgets : widget. is _ localized = self. is _ localized if not isinstance ( value, list ) : value = self. decompress ( value ) output = [ ] final _ attrs = self. build _ attrs ( attrs ) id _ = final _ attr... | [
-1.1633830070495605,
0.25980523228645325,
0.6895604729652405,
-0.867499828338623,
-0.3442125618457794,
-0.5010710954666138,
-0.9389951825141907,
0.8538378477096558,
-0.25864481925964355,
0.2710557281970978,
-0.6788355112075806,
-0.5521367192268372,
0.13408152759075165,
0.48790839314460754,... |
def _ _ init _ _ ( self, d _ ff, n _ elements _ in _ block, d _ lowrank, quant _ prob, use _ bfloat16, big _ weights _ in _ bfloat16, mode, kernel _ initializer, bias _ initializer, multiply _ by _ controller _ output, kernel _ scaling ) : n _ in = 3 if mode = ='train'or multiply _ by _ controller _ output else 2 super... | [
0.7461619973182678,
0.6814087629318237,
0.8484722971916199,
0.6321130394935608,
-0.03804443031549454,
-0.7482239603996277,
0.5173674821853638,
0.21549881994724274,
-0.1878737211227417,
-0.7320058941841125,
-0.5237370133399963,
0.10772562772035599,
0.14628128707408905,
1.2490711212158203,
... |
def getobjectfiles ( build _ dir ) : object _ files = [ ] for root, _, files in os. walk ( build _ dir ) : # strip leading build _ dir from root. root = root [ len ( build _ dir ) : ] for name in files : _, ext = os. path. splitext ( name ) if ext = = '. o': name = normalizefilename ( os. path. join ( root, name ) ) ob... | [
-0.06498312205076218,
-0.6565324068069458,
0.9326230883598328,
0.8521197438240051,
-0.4294354021549225,
0.3395441472530365,
0.9136669635772705,
-0.21680057048797607,
0.5133242607116699,
0.48274916410446167,
-0.6954906582832336,
0.21753665804862976,
0.2894023656845093,
-0.05521678179502487,... |
def householder ( a ) : nf = len ( a ) nc = len ( a [ 0 ] ) r = [ i [ : ] for i in a ] q = [ [ 0. 0 ] * nf for i in range ( nf ) ] for k in range ( nf - 1 ) : i = [ [ float ( i = = j ) for i in range ( nf ) ] for j in range ( nf ) ] # se crea los vectores x, e y un escalar alpha x = [ row [ k ] for row in r [ k : ] ] e... | [
0.3602299094200134,
-0.3866393566131592,
0.9766824841499329,
0.47705745697021484,
-0.3146970868110657,
0.20870383083820343,
0.2886919379234314,
0.2280336320400238,
0.6418197154998779,
0.3480466306209564,
-0.0505608506500721,
-0.6121220588684082,
0.03833867236971855,
0.7813939452171326,
-... |
def control ( self, num _ ctrl _ qubits = 1, label = none, ctrl _ state = none ) : if ctrl _ state is none : if num _ ctrl _ qubits = = 1 : return crxgate ( self. params [ 0 ] ) return super ( ). control ( num _ ctrl _ qubits = num _ ctrl _ qubits, label = label, ctrl _ state = ctrl _ state ) | [
1.1665557622909546,
0.8208827376365662,
0.5357487797737122,
0.7578139305114746,
0.3369147777557373,
0.11543598026037216,
-0.42936742305755615,
0.08762505650520325,
1.0671043395996094,
-0.3336498439311981,
0.18120108544826508,
0.07719463109970093,
-0.646845817565918,
-0.4708225727081299,
... |
def get _ current _ price ( self, ticker : ticker ) - > float : raise notimplementederror | [
-0.6201455593109131,
-0.5522820949554443,
0.4713866412639618,
0.898163378238678,
-0.08574918657541275,
-0.06732895225286484,
0.3670027554035187,
-1.1491007804870605,
-0.6234676241874695,
1.0032289028167725,
0.17055228352546692,
-0.08147700875997543,
-0.09259604662656784,
0.6726374626159668... |
def train _ url ( self, url ) : if self. tokenization = = tokenization. none : raise trainingerrorexception ( " train _ url only supported if the tokenization mode is not none. " ) try : infile = urllib. request. urlopen ( url ) # data = ( str ( line, encoding ='utf8') for line in infile. readlines ( ) ) data = str ( i... | [
-1.3510817289352417,
0.0022427437361329794,
0.49980634450912476,
0.21709412336349487,
0.31019604206085205,
-0.08417338877916336,
-0.24114878475666046,
1.312020182609558,
-1.136624813079834,
0.04800143465399742,
-0.27623987197875977,
0.3301384747028351,
-0.24999327957630157,
0.0240470543503... |
def change ( self, old : namedtuple, new : namedtuple ) - > none : # not implemented. i'm feeling lazy. anyway, the change # operation is mainly a convenience. the same result can be # obtained with a delete followed by an add. pass | [
-1.5537424087524414,
0.7143910527229309,
0.7676474452018738,
-0.45815518498420715,
-0.4357253313064575,
-0.4291565716266632,
-0.6618403792381287,
-0.0936163067817688,
-0.02202874980866909,
0.47462618350982666,
-0.8019662499427795,
0.5668898820877075,
0.19975697994232178,
-0.116197749972343... |
def _ initialize _ out _ arrays _ if _ necessary _ and _ check _ sizes ( writer, parameters ) : # first, get every array parameter array _ params = [ param for param in parameters if param. is _ array ] # get the list of parameters with the same size ( list of arrayssamesize objects ) arrays _ same _ sizes _ list = _ g... | [
-0.3967883586883545,
-0.6823874711990356,
0.9201193451881409,
0.3774723708629608,
0.5546863675117493,
-0.3340447247028351,
0.9902206063270569,
0.10716090351343155,
0.371713787317276,
0.7243339419364929,
0.12442121654748917,
0.3800683617591858,
-0.09995204955339432,
1.4052146673202515,
0.... |
def run ( self, tasks _ provided = none, * * kwargs ) : if not tasks _ provided : run ( list ( self. tasks. values ( ) ), * * kwargs ) else : tasks _ provided = tasks _ provided if isinstance ( tasks _ provided, list ) else [ tasks _ provided ] run ( [ self. tasks [ task ] for task in self. tasks if task in tasks _ pro... | [
-0.09854787588119507,
0.5701448321342468,
0.28736981749534607,
0.9519757628440857,
0.0831681489944458,
0.3289051055908203,
-0.04562675207853317,
0.9227775931358337,
0.15494605898857117,
-0.5074862837791443,
-0.6903353333473206,
0.0722346156835556,
-0.07782870531082153,
1.18390691280365,
... |
def load _ state ( self, filename ) : with open ( filename, " rb " ) as in _ file : self. isles, self. pareto _ isle, self. age = pickle. load ( in _ file ) | [
-0.2293912172317505,
-0.577053427696228,
0.29239389300346375,
-0.7624046206474304,
0.10471176356077194,
1.073366641998291,
-0.4590740203857422,
1.2898039817810059,
-0.5550285577774048,
0.04163480922579765,
-0.9502924084663391,
-0.5004708170890808,
0.335831880569458,
-0.05546414852142334,
... |
def adjust _ learning _ rate ( opt, epoch ) : lr = args. lr * ( 0. 5 * * ( epoch / / args. decay _ epoch ) ) for param _ group in opt. param _ groups : param _ group ['lr'] = lr | [
0.14603865146636963,
-0.33834415674209595,
0.4457831084728241,
-0.14619708061218262,
0.13635697960853577,
0.18352332711219788,
-0.01603802479803562,
0.5077722668647766,
-0.4060153067111969,
0.42348337173461914,
0.6754962205886841,
0.5994284749031067,
-0.19949498772621155,
1.276844382286071... |
def _ as _ category ( self ) : for i in ['marital _ status ','acceptedcmp3 ','acceptedcmp4 ','acceptedcmp5 ','acceptedcmp1 ','acceptedcmp2 ','complain ','response'] : self. rm _ df [ i ] = self. rm _ df [ i ]. astype ('category') | [
-0.28320416808128357,
0.3257797956466675,
0.43339911103248596,
-0.35813501477241516,
0.28844916820526123,
-0.23244068026542664,
0.4706532657146454,
-0.31004947423934937,
0.04522709921002388,
-0.5064452886581421,
0.6910133957862854,
0.33531251549720764,
-0.007849778048694134,
0.609807431697... |
def test _ get _ module _ non _ exosims _ error _ modtype _ mismatch ( self ) : module = " tests. testmodules. planetpopulation. planetpopulationmodified " modtype = " timekeeping " # note : timekeeping vs. planetpopulation with self. assertraises ( assertionerror ) : m = get _ module ( module, modtype ) | [
-0.4780680537223816,
-0.0657336413860321,
0.27876755595207214,
0.8045171499252319,
1.1617408990859985,
1.1555750370025635,
0.08794569224119186,
-0.707946240901947,
0.6447597146034241,
0.7580858469009399,
0.1503368467092514,
0.599007785320282,
-0.21617552638053894,
1.0656954050064087,
0.8... |
def x _ min ( self ) - > float : return 0 | [
0.764060914516449,
0.02779959701001644,
0.23163826763629913,
0.8385375142097473,
0.25246161222457886,
0.4031422734260559,
-1.1490613222122192,
-0.640425443649292,
0.20357650518417358,
-0.6364659667015076,
-0.10180218517780304,
-0.39869382977485657,
-0.2878548204898834,
-0.1980060189962387,... |
def xyxy _ 2 _ xywh ( boxes ) : return torch. cat ( ( ( boxes [ :, 2 : ] + boxes [ :, : 2 ] ) / 2, boxes [ :, 2 : ] - boxes [ :, : 2 ] ), dim = 1 ) | [
-0.5514965653419495,
-0.4974035918712616,
0.6747235059738159,
0.3906359374523163,
-0.3814985156059265,
0.020212415605783463,
0.23135200142860413,
-0.6696696281433105,
-0.871618390083313,
0.7845292687416077,
-0.5592576861381531,
-0.8025497198104858,
0.6557641625404358,
-0.9633057117462158,
... |
def _ initialize _ one _ out _ array ( writer, arr _ out _ param, decisive _ param _ name ) : writer. write _ line ('# procedure to check if out array'+ arr _ out _ param. name +'is passed correctly :') with writer. write _ if ('len ('+ arr _ out _ param. name +')! = len ('+ decisive _ param _ name +')') : writer. writ... | [
-0.28865543007850647,
-0.9667648673057556,
0.643375813961029,
-0.1418275684118271,
-0.08213857561349869,
-0.3092902898788452,
1.1312981843948364,
-0.32246410846710205,
-0.26592952013015747,
0.4023068845272064,
-0.02390703745186329,
1.0575300455093384,
0.30594581365585327,
0.650869369506835... |
def get _ sim _ data ( ) : # # - - - get data # datafile = data _ dir +'sim _ data. out'data = mcf. read _ data _ file ( datafile ) stime = [ ] tsc _ mm = [ ] fa _ mm = [ ] prev ='' for ent in data : # # - - - skip the data line which is same as one before # # # if ent = = prev : # # continue # # else : # # prev = ent ... | [
0.8673906922340393,
0.07363444566726685,
0.926039457321167,
0.453119695186615,
-0.3387603163719177,
0.4140203893184662,
0.5325250625610352,
0.28875863552093506,
-0.3504624664783478,
0.45026129484176636,
-0.06909363716840744,
0.5882746577262878,
0.1410512924194336,
0.5897440314292908,
0.0... |
def get _ type ( cls ) - > type [ propertytemplate ] : return propertytemplate | [
0.12069305032491684,
-0.5083786845207214,
0.4376324713230133,
0.6942474246025085,
0.3401015102863312,
-0.3176175653934479,
-0.4968542456626892,
-0.25688910484313965,
0.5458452105522156,
-0.7225136756896973,
-0.19073885679244995,
-0.04654769226908684,
-0.8476969599723816,
-0.706779599189758... |
def xavier _ init ( fan _ in, fan _ out, constant = 1 ) : # https : / / stackoverflow. com / questions / 33640581 / how - to - do - xavier - initialization - on - tensorflow low = - constant * np. sqrt ( 6. 0 / ( fan _ in + fan _ out ) ) high = constant * np. sqrt ( 6. 0 / ( fan _ in + fan _ out ) ) return tf. random _... | [
0.7495403289794922,
0.08878760039806366,
0.4526562988758087,
-0.32111823558807373,
0.039046239107847214,
0.41957616806030273,
-0.024469943717122078,
0.4361274838447571,
-0.5639853477478027,
-0.5463228821754456,
-1.147254228591919,
0.4869745373725891,
0.03974428027868271,
-1.305430650711059... |
def plot _ test _ b ( self, a = 0. 02, b = 5. 0e - 6, size = ( 10, 6 ), gtype ='vor ', print _ errors = true ) : # xo = self. tri _ verts [ :, 0 ] # yo = self. tri _ verts [ :, 1 ] if gtype = ='tri': xo = self. tri _ verts [ :, 0 ] yo = self. tri _ verts [ :, 1 ] opgtype ='vor'# opposite ( dual ) grid elif gtype = ='vo... | [
0.9460189938545227,
0.039838556200265884,
0.7102224230766296,
-0.2493361085653305,
-0.026479646563529968,
0.17549926042556763,
0.8960686922073364,
-0.29444512724876404,
-0.08152955025434494,
0.2804754078388214,
0.29583877325057983,
1.142677664756775,
-0.4532715678215027,
0.1617354899644851... |
def graphemes ( self ) - > sequence [ text ] : return " ". split ( self. word ) | [
-0.774909496307373,
0.7104987502098083,
0.4378937780857086,
-0.04402141645550728,
-0.21864919364452362,
-0.1870102733373642,
-0.3014023005962372,
-0.24905610084533691,
0.04755657911300659,
0.6264870762825012,
-0.7315447926521301,
0.5071313381195068,
-0.9420323371887207,
-0.7844076156616211... |
def table ( title, headers, data _ node ) : tb = {'type':'table ','title': title,'headers': headers,'data': data _ node, } return tb | [
0.267096608877182,
0.3777150511741638,
0.5625802874565125,
-0.6770955324172974,
-0.09183795005083084,
-0.0745406225323677,
-1.0309261083602905,
-0.21998849511146545,
-1.139294981956482,
-0.07770828902721405,
-0.29180270433425903,
0.23735244572162628,
0.23486705124378204,
-0.659816980361938... |
def get _ time _ interval ( starttime, endtime ) : nowtime = time. time ( ) if not endtime : endtime = min ( starttime + 24 * 3600 if starttime else nowtime, nowtime ) if not starttime : starttime = endtime - 24 * 3600 return starttime, endtime | [
-1.1918987035751343,
-0.8123296499252319,
0.6195106506347656,
0.3015631139278412,
-0.25252145528793335,
0.39239752292633057,
-1.2509870529174805,
0.20097492635250092,
-0.8975659012794495,
1.0291833877563477,
-0.20067767798900604,
0.08393683284521103,
-1.715206265449524,
0.47774428129196167... |
def conditional _ cpu _ profile ( sort, max _ rows ) : def profile _ decorator ( func ) : " " " decorator function with required function signature " " " @ wraps ( func ) def wrapped ( * args, * * kwargs ) : " " " allows us to wrap the call we want in other functions " " " import cprofile import pstats from io import s... | [
0.9882670044898987,
0.607961118221283,
0.6467913389205933,
0.48726576566696167,
-0.9707091450691223,
0.25544798374176025,
0.035933613777160645,
-0.49362537264823914,
0.3915714919567108,
0.3200497031211853,
0.6331921219825745,
0.23759867250919342,
-0.29720428586006165,
0.4568580687046051,
... |
def test _ simplify _ constraints _ constraints _ with _ simplification ( self ) : parameters = [ 3, 3, 3, 3 ] constraints = { ( pair ( 0, 0 ), pair ( 2, 0 ) ), ( pair ( 0, 1 ), pair ( 2, 0 ), pair ( 1, 1 ) ), ( pair ( 0, 2 ), pair ( 2, 0 ) ), ( pair ( 2, 0 ), ) } solver = solver ( [ ], [ ] ) solver. data = parameters ... | [
-0.3282391130924225,
0.21816979348659515,
0.41719314455986023,
0.20134244859218597,
-0.16998794674873352,
-0.4107421636581421,
0.210838183760643,
0.8616812229156494,
0.508352518081665,
0.09354028850793839,
-1.2402716875076294,
-0.705826461315155,
-0.5185958743095398,
-0.09736786037683487,
... |
def ssh _ setup ( ) : c = sshclient ( ) c. set _ missing _ host _ key _ policy ( autoaddpolicy ( ) ) return c | [
1.0278829336166382,
-0.4075864851474762,
0.2804970443248749,
0.34387287497520447,
0.03319081664085388,
0.7132492065429688,
-0.11862481385469437,
0.2509395480155945,
-0.6074559092521667,
-0.2278144806623459,
-0.37743857502937317,
0.27656063437461853,
-0.2170271873474121,
-0.7192567586898804... |
def test _ get _ textures _ location _ same ( dummy, data _ dir ) : d = dummy. get _ textures _ location ( ) loc = os. path. join ( data _ dir,'dummy') assert d = = loc | [
0.2964920699596405,
-0.21936343610286713,
0.4067826569080353,
-0.9069947600364685,
0.6715809106826782,
-0.016648974269628525,
2.070408821105957,
-0.8841201066970825,
0.9537172317504883,
-0.6683537364006042,
-0.7328457236289978,
0.9205983877182007,
0.5769625902175903,
-0.47081878781318665,
... |
def get _ 5gnr _ bwp _ ch _ ptrs _ re _ offset ( self ) : rdstr = " < tbs > " return rdstr | [
0.4409676194190979,
-0.5405167937278748,
0.3532012701034546,
-1.2729108333587646,
-0.27105778455734253,
0.6698020696640015,
0.3962588608264923,
-0.7528586983680725,
0.3000704050064087,
0.2224631905555725,
0.42867159843444824,
0.8479940891265869,
-1.5613445043563843,
-0.6229865550994873,
... |
def pingtest ( conffilename ) : from twisted. web. soap import proxy from twisted. internet import reactor import time c = config ( conffilename ) c. read ( ) url = " http : / / % s : % d / % s " % ( c. slavehostname, c. slaveport, c. slavesoappath ) print " using url ", url proxy = proxy ( url ) t = time. time ( ) cal... | [
-0.29012224078178406,
0.14264298975467682,
0.9121550917625427,
-0.04297708719968796,
0.4621916115283966,
0.47791430354118347,
0.6275637745857239,
0.7206336855888367,
-0.09069511294364929,
0.5869566202163696,
-1.0816997289657593,
0.009111777879297733,
-0.8505021333694458,
0.0250654611736536... |
def do _ func ( fname ) : print ('testing { } - " { } " '. format ( fname, os. path. join ( get _ spec _ suite _ dir ( ), fname ) ) ) for text in get _ test _ script _ parts ( fname ) : sexpr = parse _ sexpr ( text ) # assert that the toplevel expression makes sense assert sexpr [ 0 ] in ('module ','invoke ','register ... | [
-0.09515848755836487,
-0.2727571129798889,
0.7585298418998718,
-0.07276095449924469,
0.12218913435935974,
-0.07286102324724197,
0.7902074456214905,
0.21944747865200043,
-0.25727522373199463,
-0.26916325092315674,
-0.0751711055636406,
0.6684362292289734,
0.12427456676959991,
0.8554068803787... |
def _ neutron _ unused _ port _ cleanup ( context ) : log. debug ('pvc _ nova. compute. manager. powervccomputemanager'' _ neutron _ unused _ port _ cleanup : cleaning up unused neutron'' ports...') # get all the running instances from the db which aren't deleted. ports _ ids _ to _ delete = [ ] try : # expensive! db _... | [
0.018738945946097374,
-0.36783847212791443,
0.5578408241271973,
-0.9948645830154419,
0.8984402418136597,
-0.41464748978614807,
0.5874708890914917,
-0.027113454416394234,
0.16223885118961334,
0.09896967560052872,
0.42407456040382385,
0.8078767657279968,
-0.31006738543510437,
0.2108958214521... |
def test _ table _ rendering ( self ) : us = updatestatement ('table') self. asserttrue ( six. text _ type ( us ). startswith ('update table set'), six. text _ type ( us ) ) self. asserttrue ( str ( us ). startswith ('update table set'), str ( us ) ) | [
-0.15261924266815186,
0.10062045603990555,
0.4187126159667969,
0.4256206750869751,
-0.777450442314148,
0.024837546050548553,
-0.4323439300060272,
-0.22309789061546326,
0.35355132818222046,
0.4392159581184387,
0.12607844173908234,
-0.04286457970738411,
-0.3708147704601288,
0.049110021442174... |
def has _ flag ( self, target _ object, flag ) : content _ flag _ object = self. get _ flag _ object ( flag ) content _ type _ object, object _ id = contenttype. objects. get _ for _ model ( target _ object. _ _ class _ _ ), target _ object. id return contentflaginstance. objects. filter ( content _ type = content _ ty... | [
0.6985034942626953,
-0.7480192184448242,
0.5165196061134338,
0.24853244423866272,
0.3295190930366516,
0.10682013630867004,
-0.7068322896957397,
-0.15550753474235535,
-0.9922288656234741,
0.0938199907541275,
-0.39224258065223694,
1.0726701021194458,
-0.3534044027328491,
0.2920864522457123,
... |
def retrain ( self ) : for parameter, values in self. best _ parameters. iteritems ( ) : self. classifier. set _ params ( * * { parameter : values } ) self. classifier. fit ( self. x _ train, self. y _ train ) logging. info ('training performance') predictions = self. classifier. predict ( self. x _ train ) log _ repor... | [
-0.5808923840522766,
-0.41013655066490173,
0.20236384868621826,
0.08622858673334122,
1.406329870223999,
-0.27863794565200806,
0.6366233825683594,
0.6848742365837097,
-1.2634035348892212,
-0.2442815750837326,
0.06367156654596329,
0.9771500825881958,
-0.11948498338460922,
0.5215256214141846,... |
def assign _ send _ receive ( pop _ size1, pop _ size2 ) : tot _ pop = pop _ size1 + pop _ size2 pop _ shuffle = list ( range ( tot _ pop ) ) random. shuffle ( pop _ shuffle ) indvs _ to _ send = [ ] indvs _ to _ receive = [ ] for i, indv in enumerate ( pop _ shuffle ) : my _ new = ( i < tot _ pop / 2 ) my _ old = ( in... | [
-1.5136183500289917,
-0.07952788472175598,
0.6072725057601929,
-0.45343366265296936,
-0.5811627507209778,
-0.14817535877227783,
0.573085606098175,
-0.2534075081348419,
-0.21240872144699097,
1.45964515209198,
-0.3763813078403473,
0.5858979225158691,
-0.03253611549735069,
0.1328755021095276,... |
def _ parse _ source _ responses _ entities ( self, responses : responses ) - > entities : def entity ( case _ node, case _ result : str ) - > entity : " " " transform a test case into a test case entity. " " " name = case _ node. get ( " name ", " < nameless test case > " ) return dict ( key = name, name = name, class... | [
-0.39242032170295715,
-1.1504080295562744,
0.3618469536304474,
-0.69334477186203,
0.4044578969478607,
0.5082393288612366,
0.7359455823898315,
-0.1733916997909546,
0.7200449109077454,
-0.3073881268501282,
0.13559676706790924,
-1.0501880645751953,
0.3750068247318268,
0.5773230791091919,
-0... |
def maximal _ rectangle ( matrix : list [ list [ str ] ] ) - > int : def largest _ rectangle _ at _ position ( x : int, y : int ) - > int : if matrix [ x ] [ y ] = ='0': return 0 max _ ones = 0 while y + max _ ones < num _ cols and matrix [ x ] [ y + max _ ones ] = ='1': max _ ones + = 1 max _ size = 0 rows _ seen = 0 ... | [
-0.14732728898525238,
0.32842180132865906,
0.9747627377510071,
0.39232364296913147,
-0.8882081508636475,
-0.8083997368812561,
0.24423091113567352,
0.3998587727546692,
0.7442685961723328,
0.2673319876194,
0.24672390520572662,
-0.6225067973136902,
-0.14274699985980988,
0.5816354155540466,
... |
def get _ settings ( backend _ key, use _ default = true ) : notification _ settings = getattr ( settings,'notifications ', none ) if not backend _ classes. get ( backend _ key, none ) : raise environmenterror ('invalid backend : % s'% ( backend _ key ) ) if not notification _ settings : raise environmenterror ('notifi... | [
-0.0653226375579834,
0.7297356128692627,
0.6182057857513428,
-0.11847653985023499,
0.6654461622238159,
-0.9784890413284302,
-0.06301403790712357,
-1.1502124071121216,
-0.9133565425872803,
1.9887256622314453,
-0.558373212814331,
-0.18622437119483948,
-0.7160037159919739,
0.6449071764945984,... |
def empty _ cache ( ) - > none : torch. _ c. _ mps _ emptycache ( ) | [
0.39835721254348755,
0.2903936505317688,
0.22129610180854797,
0.15436798334121704,
0.9023255109786987,
0.71674644947052,
0.6439685225486755,
0.35358569025993347,
-0.5443695187568665,
0.31315070390701294,
-0.45281708240509033,
0.7742292881011963,
-0.2664520740509033,
-0.5560476183891296,
... |
def getlivegame ( self, id ) : base _ live = self. getgame ( id, self. game _ type _ live ) match = re. search ( '. * / tsn / (. *? ) /. * ', base _ live, re. ignorecase ) if match! = none : try : hd = base _ live. replace ('android. m3u8 ','s _'+ match. group ( 1 ) +'_ live _ game _ hd. m3u8') req = urllib2. request (... | [
0.2508676052093506,
-0.6636360883712769,
0.9614832997322083,
0.5153149962425232,
-0.15198123455047607,
0.2571179270744324,
-1.2731947898864746,
-0.43307191133499146,
0.32837212085723877,
0.79603511095047,
0.5901973843574524,
-0.6046242713928223,
-0.5616329312324524,
-0.18928977847099304,
... |
def fill _ data _ gaps _ with _ nans ( timestamps, data, sampling _ rate, max _ jitter = 0. 00001 ) : sampling _ period = 1. / float ( sampling _ rate ) # find indices with gaps and gap sizes gaps = list ( np. where ( np. diff ( timestamps ) > ( sampling _ period + max _ jitter ) ) [ 0 ] ) gap _ lengths = [ float ( tim... | [
0.25561603903770447,
0.7288992404937744,
0.7252205610275269,
-0.26830366253852844,
-0.21138806641101837,
0.520311176776886,
0.42886707186698914,
0.3227621018886566,
0.8907531499862671,
0.3675835132598877,
0.12569837272167206,
0.3454008400440216,
0.3953101933002472,
0.4946933686733246,
-0... |
def entity _ label ( obj ) : return entity _ ref ( obj, incomplete = true ) [ 0 ] | [
-0.027154557406902313,
-1.1954606771469116,
0.7317913174629211,
-0.7614807486534119,
0.19720159471035004,
0.9405855536460876,
0.7085989117622375,
-0.8087250590324402,
0.9721691012382507,
1.1429568529129028,
0.9536202549934387,
-0.4543522298336029,
0.3965992033481598,
0.059945981949567795,
... |
def with _ format ( self, type : optional [ str ] = none, columns : optional [ list ] = none, output _ all _ columns : bool = false, * * format _ kwargs, ) : dataset = copy. deepcopy ( self ) dataset. set _ format ( type = type, columns = columns, output _ all _ columns = output _ all _ columns, * * format _ kwargs ) r... | [
-0.25085243582725525,
-0.5386605858802795,
0.41788411140441895,
0.37205561995506287,
-0.9429519176483154,
-0.4486102759838104,
-0.7999441623687744,
-0.2574087977409363,
0.2898304760456085,
-0.5028323531150818,
1.089124083518982,
1.0413930416107178,
0.5046610832214355,
0.24901871383190155,
... |
def amount ( self ) : return string _ to _ float ( self. _ dict. get ('amount') ) | [
0.659889817237854,
-0.4334087073802948,
0.4132494628429413,
-0.8426023721694946,
0.15351952612400055,
0.17704881727695465,
0.20856794714927673,
-0.03365522250533104,
0.33436599373817444,
0.5950713157653809,
0.576088011264801,
-0.02707970142364502,
0.19308313727378845,
-0.0784694105386734,
... |
def polyarr2pix ( polyarr, header ) : w = mkwcsdict ( header ) wcs = pw. wcs ( w ['header2d'] ) return wcs. wcs _ sky2pix ( polyarr, 0 ) | [
-0.4972822666168213,
-0.7310553193092346,
0.5047229528427124,
-0.8018392324447632,
-1.855987787246704,
0.8971226215362549,
-0.8827615976333618,
-0.5026559233665466,
1.4068994522094727,
0.4006527364253998,
-0.2973006069660187,
0.6893515586853027,
-0.21867364645004272,
0.07822339981794357,
... |
def _ transact _ buy ( self, quantity, price, commission ) : self. avg _ bought = ( ( self. avg _ bought * self. buy _ quantity ) + ( quantity * price ) ) / ( self. buy _ quantity + quantity ) self. buy _ quantity + = quantity self. buy _ commission + = commission | [
0.0890638455748558,
-0.25484827160835266,
0.5419707894325256,
-0.2844682037830353,
1.3516006469726562,
-0.24616505205631256,
0.013250712305307388,
0.27066299319267273,
-0.4737073481082916,
1.1311674118041992,
-0.20367179811000824,
0.6988162398338318,
0.2439488172531128,
-1.0600496530532837... |
def sor ( a, b, prec = 1e - 7, w = 1. 5 ) : n = len ( a ) xk = [ 0. 0 ] * n sumation = 0. 0 # garantizar que los elementos de la diagonal principal sean distintos de cero for i in range ( n ) : if a [ i ] [ i ] = = 0 : exit ('los elementos a [ i ] [ i ] deben ser diferentes de 0') xk1 = [ b [ i ] / float ( a [ i ] [ i ... | [
0.8417059779167175,
0.6042645573616028,
1.0902278423309326,
0.00024518027203157544,
-1.1529362201690674,
-0.5544648766517639,
0.21769213676452637,
-0.13134638965129852,
0.09161883592605591,
1.0472254753112793,
0.5978369116783142,
-0.09087377786636353,
-0.41056424379348755,
0.12359397858381... |
def service _ search ( request ) : if request. method = ='post': # get search key data from search form search _ value = request. post. get ('search _ value') print ( " = = = = = = = = = = = = = = = = = = = = = = = = " ) # get all requirements in service status if request. user. has _ perm ('customer. customer _ view _... | [
0.04258831962943077,
-0.10464075207710266,
0.9817013144493103,
0.15218670666217804,
-0.21645838022232056,
0.5738447308540344,
0.2833252251148224,
-0.05210845172405243,
-0.9058815836906433,
0.33319419622421265,
0.930242657661438,
0.40310853719711304,
0.12019132822751999,
1.1410648822784424,... |
def generate _ randomness ( bytes = 32 ) : return base64. encode ( bytearray ( random. getrandbits ( 8 ) for i in range ( bytes ) ) ) | [
-0.7260388135910034,
-0.05760474130511284,
0.5057868957519531,
-0.3747808337211609,
0.333678662776947,
0.939511775970459,
-0.3925902247428894,
0.6071258783340454,
1.18950617313385,
0.3699387311935425,
-0.728857696056366,
0.18219415843486786,
-1.1995012760162354,
0.07828769832849503,
-0.9... |
def _ getststoken ( self ) - > tuple [ bosclient, str ] : config = _ invokebackend ( " circuit / gensts ", { " token " : define. hubtoken } ) global _ bosclient _ bosclient = bosclient ( bceclientconfiguration ( credentials = bcecredentials ( str ( config ['accesskeyid'] ), str ( config ['secretaccesskey'] ) ), endpoin... | [
-0.1739473193883896,
-0.6652284860610962,
0.43842044472694397,
-0.3970101475715637,
0.05203104391694069,
-0.5894101858139038,
-0.195083349943161,
-0.1658393293619156,
-0.8358058929443359,
0.07577954977750778,
-1.0734834671020508,
1.0569684505462646,
-0.10732229053974152,
-0.492535203695297... |
def genotype _ correlation ( chr _ list ) : starttime = datetime. datetime. now ( ) gt1 = hl. read _ matrix _ table ('gs : / / nbaya / split / ukb31063.'+ variant _ set +'_ variants. gwas _ samples _ repart. mt') print ( gt1. count ( ) ) print ( gt1. describe ( ) ) for ch in chr _ list : mt _ chr = hl. filter _ interva... | [
0.16215300559997559,
-0.01263588760048151,
0.7855744957923889,
-0.3229512870311737,
0.7991278767585754,
0.8387777805328369,
1.0793460607528687,
-0.08325233310461044,
-0.12465059012174606,
0.5521451234817505,
-0.3145736753940582,
0.4784247577190399,
-0.5609930753707886,
0.6546708345413208,
... |
def _ _ init _ _ ( self, data ) : assert len ( data ) = = len ( self. cols ) for colname, dat in zip ( self. cols, data ) : setattr ( self, colname, dat ) | [
-0.5642383694648743,
-0.19165636599063873,
0.4506325423717499,
-0.10772562772035599,
-0.2931426763534546,
-0.07813043147325516,
-0.1172025203704834,
-0.588825523853302,
-0.06352701783180237,
-0.5740941166877747,
-0.869416356086731,
-0.36778900027275085,
0.7101292014122009,
0.29850515723228... |
def _ _ del _ _ ( self ) - > none : self. clear ( ) | [
0.5663425922393799,
-0.583136796951294,
0.3049449026584625,
-1.266801357269287,
-0.4785403609275818,
0.40786007046699524,
-0.07067898660898209,
-0.701140820980072,
1.032689094543457,
-0.44917160272598267,
0.2601013779640198,
1.0706814527511597,
0.5970967411994934,
-0.08813576400279999,
0... |
def test _ lmdb _ insert ( ) : with temporarydirectory ( ) as dbpath : n = 100 total1 = 0 env = lmdb. open ( dbpath ) with env. begin ( write = true ) as txn : for i in range ( n ) : key ='key - { } '. format ( i ). encode ('utf8') value = random. randint ( 0, 2 * * 32 - 1 ) total1 + = value data = struct. pack ('< l '... | [
-0.5118746757507324,
0.9558044672012329,
0.5453606247901917,
-0.5659013390541077,
0.5464880466461182,
0.19260679185390472,
0.18270207941532135,
0.17931579053401947,
-0.612147331237793,
-0.22319728136062622,
-1.1921716928482056,
-0.6210352182388306,
-1.1082518100738525,
0.26126596331596375,... |
def clean _ html ( html _ text, javascript = true, scripts = true, style = true, embedded = true, links = true, forms = true, frames = true, comments = true, annoying _ tags = true, meta = true, safe _ attrs _ only = true, remove _ unknown _ tags = true, processing _ instructions = true ) : # true = remove | false = ke... | [
0.3316367566585541,
-0.2514154314994812,
0.741949200630188,
0.40553125739097595,
-0.9502024054527283,
0.21834900975227356,
-0.3739774227142334,
0.06715429574251175,
-0.16398866474628448,
0.4889849126338959,
-0.04140700399875641,
0.12218290567398071,
-0.4704713821411133,
0.4841676950454712,... |
def settext ( self, text ) : pass | [
-0.4315621256828308,
-0.5158454179763794,
0.12868596613407135,
0.41863107681274414,
-0.09977690130472183,
0.703416109085083,
-0.3558162748813629,
0.4946381449699402,
0.48817238211631775,
-0.049463652074337006,
-1.2385642528533936,
0.3346346914768219,
-0.6533423066139221,
0.1102403998374939... |
async def bottomxp ( self, ctx ) : promoarray = self. settings. getserverstat ( ctx. message. server, " members " ) # promosorted = sorted ( promoarray, key = itemgetter ('xp') ) promosorted = sorted ( promoarray, key = lambda x : int ( x ['xp'] ) ) startindex = 0 total = 10 msg = " " if len ( promosorted ) < 10 : tota... | [
-0.20318681001663208,
0.05674199014902115,
0.919508159160614,
-0.0166629571467638,
0.3144688904285431,
-0.0027403924614191055,
-0.16410484910011292,
-0.23979096114635468,
0.09822415560483932,
0.18350434303283691,
-0.49278759956359863,
1.6329227685928345,
-1.455538034439087,
0.1356275230646... |
def file _ diff ( title, diff _ data ) : fd = {'type':'diff ','title': title,'data': diff _ data, } return fd | [
-0.19313575327396393,
-1.1025694608688354,
0.5313436985015869,
-0.5407010912895203,
-0.5242764353752136,
0.6382917165756226,
-0.5196719169616699,
0.344638854265213,
-1.2567224502563477,
-0.6265785098075867,
-0.22694724798202515,
0.21437081694602966,
0.24540367722511292,
0.07072508335113525... |
def regnetx _ 004 _ tv ( pretrained = false, * * kwargs ) - > regnet : return _ create _ regnet ('regnetx _ 004 _ tv ', pretrained, * * kwargs ) | [
-0.14879608154296875,
0.7085354328155518,
0.22030657529830933,
0.7063417434692383,
0.14579643309116364,
-0.5203256011009216,
-0.6662249565124512,
-0.41469046473503113,
-0.15937434136867523,
-0.679511308670044,
-1.004382610321045,
0.2894302010536194,
-0.5893140435218811,
-0.673257052898407,... |
def get _ optional _ type ( tp : type ) - > type : if not is _ optional _ type ( tp ) : raise valueerror ('get _ optional _ type ( ) called with non - optional type.') if is _ literal _ type ( tp ) : # note that this doesn't remove ` none ` as a valid choice, but that's not a problem so far. return tp return next ( arg... | [
0.7121628522872925,
-0.5237356424331665,
0.464537113904953,
-0.019776323810219765,
0.6161649227142334,
-0.1686435043811798,
-0.031362276524305344,
-0.664484441280365,
0.40480589866638184,
0.7353503108024597,
0.4919172525405884,
0.12716229259967804,
-0.4629318118095398,
0.045771826058626175... |
def play ( self, node : n ) - > n : pass | [
-1.2311490774154663,
0.5643479228019714,
0.3746151924133301,
0.636087954044342,
0.5925356149673462,
-0.44374173879623413,
0.5309355854988098,
-0.5543690323829651,
0.09106148779392242,
-0.3620651662349701,
-0.07351504266262054,
1.2139252424240112,
-0.03986812382936478,
-0.1779562383890152,
... |
def ssa _ versions ( self ) - > generator [ int, none, none ] : if self. _ il _ function is none : raise notimplementederror ( " no il function associated with variable " ) version _ count = ctypes. c _ ulonglong ( ) if self. _ il _ function. il _ form in [ functiongraphtype. mediumlevelilfunctiongraph, functiongraphty... | [
-0.2356065958738327,
-0.11977767944335938,
0.47070208191871643,
-0.027212273329496384,
-0.4814195930957794,
0.47307252883911133,
0.40487873554229736,
-0.23139089345932007,
0.741887629032135,
0.4378136694431305,
-0.33125463128089905,
0.8907263278961182,
0.5672921538352966,
0.811645209789276... |
def create _ response ( data = { }, status = 200, message ='' ) : response = {'success': 200 < = status < 300,'code': status,'message': message,'result': data } return jsonify ( response ), status | [
-0.046554677188396454,
-0.6648821830749512,
0.4912821650505066,
-0.11987950652837753,
-0.37276336550712585,
-0.3027627766132355,
-0.7793213725090027,
0.04794226959347725,
-0.2756202518939972,
0.21842606365680695,
-1.7343374490737915,
0.3345772922039032,
-0.19080668687820435,
-0.14745177328... |
def _ get _ xyz ( session, station _ id ) : # request url to get the data url ='http : / / meteosearch. meteo. gr / formproc. asp'# post request body req _ body = {'stationid': station _ id,'selectyear': 2020,'selectmonth': 12 } response = session. post ( url, req _ body ) # check for code 2xx. if response. ok : statio... | [
-0.6337057948112488,
0.0914655476808548,
0.5754215121269226,
0.05344613268971443,
0.08319796621799469,
-0.3127954304218292,
-0.372891366481781,
0.042469464242458344,
-0.29973408579826355,
-0.7324455976486206,
-0.15540115535259247,
0.009841776452958584,
0.010872742161154747,
0.1254111826419... |
def matrix _ to _ histogram ( m, name = " temp ", bins = 50, normed = 1 ) : arr = flatten _ matrix ( m ) plt. hist ( arr, bins = bins, normed = normed ) plt. xlabel ( " value " ) plt. ylabel ( " frequency " ) plt. savefig ( name ) plt. show ( ) | [
0.5559220910072327,
0.3967938721179962,
0.4768098294734955,
-0.08610072731971741,
-0.8910770416259766,
0.17259567975997925,
1.1106117963790894,
0.6923186182975769,
0.520256757736206,
0.23040631413459778,
-0.05104602873325348,
0.6566715836524963,
0.04047267138957977,
0.2673410177230835,
0... |
def task _ retry _ limit ( self ) : return self. _ _ task _ retry _ limit | [
0.10026181489229202,
0.19285960495471954,
0.43497398495674133,
0.6939408779144287,
-0.2195897251367569,
1.1351689100265503,
0.9498838782310486,
0.1947944015264511,
-0.26909780502319336,
0.3822188675403595,
-0.7214057445526123,
0.8244998455047607,
-0.20838862657546997,
-1.4102510213851929,
... |
def solve ( self, setenvironment = true ) : for name, var in self. variables. items ( ) : path = self. _ solve ( var ) if setenvironment : os. environ [ name ] = path if name = = " pythonpath " : for i in path. split ( os. pathsep ) : if i not in sys. path : sys. path. append ( os. path. normpath ( i ) ) | [
-0.6813899278640747,
0.07430481165647507,
0.46156781911849976,
0.45044708251953125,
1.2201799154281616,
0.1815965324640274,
0.79327392578125,
-0.19872380793094635,
-0.5622090101242065,
-0.006247964687645435,
-0.441423237323761,
-0.9650086164474487,
-0.3586088716983795,
0.8627820014953613,
... |
def det ( self ) : if self. _ method = = " doolittle " : if not self. _ decomposed : self. _ doolittle _ decompose ( ) if not self. _ det _ a : self. _ det _ a = self. _ determinant ( self. _ u ) return self. _ det _ a | [
-0.4396740794181824,
-0.5484984517097473,
0.40246596932411194,
-0.4059690833091736,
0.11276403069496155,
0.29258736968040466,
1.2521264553070068,
-0.04977457597851753,
0.6297123432159424,
-1.3691734075546265,
-0.12686660885810852,
0.0428144633769989,
-0.3086164891719818,
0.5315176844596863... |
def idt ( self ) : log. debug ( " executing volatility idt plugin on " " { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] command = self. plugins [ " idt " ] ( self. config ) for n, entry, addr, module in command. calculate ( ) : if module : module _ name = str ( module. basedllname or'' ) sect _ ... | [
-0.4228495955467224,
-0.4640640914440155,
0.5085192322731018,
-1.0404576063156128,
0.3710806369781494,
-0.9063208103179932,
-0.5958393216133118,
-0.33858543634414673,
0.10821032524108887,
0.9119675755500793,
-0.7356776595115662,
-0.03072129189968109,
-0.7377164363861084,
-0.066940419375896... |
def method ( self ) : return self. _ method | [
-0.21185216307640076,
0.21364325284957886,
0.12104806303977966,
-0.5110296607017517,
0.4080463647842407,
-0.15325427055358887,
1.0873335599899292,
-0.7398309111595154,
0.2495536357164383,
-1.0210692882537842,
0.757101833820343,
0.3915148675441742,
0.31468984484672546,
-0.25264132022857666,... |
def create ( self, layer ) : try : uploaded _ file = self. get _ uploads ('file') if uploaded _ file : uploaded _ file = uploaded _ file [ 0 ] else : uploaded _ file = none resource _ id = self. _ createresource ( layer, self. request. get ('type'), self. request. get ('filename'), self. request. get ('url'), uploaded ... | [
-0.791292130947113,
-0.11787453293800354,
0.599866509437561,
-0.02142307348549366,
0.1584254652261734,
0.3144541382789612,
0.9069827198982239,
-0.45203259587287903,
-0.40677013993263245,
-0.28381621837615967,
0.22400493919849396,
-0.6785250306129456,
0.005141464527696371,
0.902027249336242... |
def remove _ withno ( sensor _ list ) : for i in range ( len ( sensor _ list ) ) : if type ( sensor _ list [ i ] )! = str : continue if sensor _ list [ i ] [ - 7 : ] = ='_ withno': sensor _ list [ i ] = sensor _ list [ i ] [ : - 7 ] +'_ original'if sensor _ list [ i ] [ - 12 : ] = ='_ withno _ flag': sensor _ list [ i ... | [
-0.2066044956445694,
-0.500924289226532,
0.776481568813324,
-0.23904743790626526,
-0.6379941701889038,
-0.30785366892814636,
-0.2516651451587677,
0.8755642175674438,
0.22580839693546295,
0.5907682180404663,
-1.0061116218566895,
0.49827703833580017,
-0.6357893347740173,
0.27702367305755615,... |
def double _ lst ( lst, lst2 = [ ] ) : if lst = = [ ] : return lst2 val = lst [ 0 ] * 2 lst2. append ( val ) return double _ lst ( lst [ 1 : ], lst2 ) | [
-0.23891636729240417,
0.5853124856948853,
0.7448013424873352,
1.7865631580352783,
-0.2174934446811676,
0.5290879011154175,
-0.9945436120033264,
0.0945451483130455,
-0.01851135678589344,
0.3536897301673889,
-1.862809181213379,
0.4109398126602173,
0.13952846825122833,
1.5271344184875488,
-... |
def test _ valid _ page _ handling ( self ) : response = self. client. get ( reverse ('test - pagination ', kwargs = {'page': 2 } ) ) self. assertequal ( " 5, 6, 7, 8, 9 ", response. content. decode ( ) ) | [
0.22312848269939423,
0.029896467924118042,
0.5398546457290649,
-0.3667740821838379,
0.5692116618156433,
-0.01582838036119938,
-0.32088273763656616,
-0.04812543839216232,
0.5110461711883545,
-0.6961890459060669,
-0.08485981822013855,
-0.9977062940597534,
-0.27966463565826416,
-0.33740577101... |
def customer _ view ( request, pk ) : customer = customer. objects. get ( id = pk ) # set context. # leads, sales _ people, roof _ types, storeys, electric _ powers are default options loaded in django admin # requirement, credit _ card, files are loaded from current customer # options allow to configure if a section i... | [
0.7970190644264221,
0.009267764165997505,
0.9649797081947327,
0.3361857533454895,
-0.6576979756355286,
0.18953411281108856,
0.8966387510299683,
-0.16361188888549805,
-0.2149663120508194,
0.30405986309051514,
0.404954731464386,
0.08827019482851028,
0.30209988355636597,
0.6237701773643494,
... |
def diag _ h ( a, b, k ) : h = np. zeros ( ( k * k, n ), a. dtype ) h [ : k * * 2 : k + 1, : ] = a h [ 1 : ( k - 1 ) * k : k + 1, : ] = b [ 1 :, : ] h. shape = ( k, k, n ) q = np. linalg. eigh ( h. t, uplo ='l') [ 1 ] q = np. swapaxes ( q, 1, 2 ). t return q | [
0.03716202825307846,
0.1515437513589859,
0.9375038743019104,
0.3619873523712158,
-0.36014923453330994,
0.036076124757528305,
0.22004331648349762,
1.3154767751693726,
0.02742740325629711,
0.7608637809753418,
0.33869269490242004,
-0.08430539816617966,
0.5861106514930725,
-0.585239589214325,
... |
def get _ path _ to _ license ( ) - > str : return join ( install _ dir,'license. txt') | [
1.2957903146743774,
-1.1973135471343994,
0.48374804854393005,
0.31765249371528625,
0.3428680896759033,
1.1276603937149048,
1.1755913496017456,
1.6201914548873901,
-0.29018527269363403,
0.6343746781349182,
1.0347189903259277,
-0.40042299032211304,
-0.4992201030254364,
0.015277361497282982,
... |
def on _ disconnected ( self, device _ addr ) : pass | [
0.27943530678749084,
-0.6865574717521667,
0.22350387275218964,
0.724003791809082,
0.20138691365718842,
0.3160492777824402,
0.2669372856616974,
0.07669777423143387,
0.9858811497688293,
-0.7947016954421997,
-0.32760757207870483,
0.32746320962905884,
0.401143878698349,
-0.3018915057182312,
... |
def _ run _ toplevel ( config, config _ file, work _ dir, parallel, fc _ dir = none, run _ info _ yaml = none ) : parallel = log. create _ base _ logger ( config, parallel ) log. setup _ local _ logging ( config, parallel ) dirs = run _ info. setup _ directories ( work _ dir, fc _ dir, config, config _ file ) config _ ... | [
-0.1942518800497055,
-0.23413661122322083,
0.8455177545547485,
-0.10128755867481232,
0.3882807493209839,
-0.15490005910396576,
0.7599905133247375,
0.3581847548484802,
-0.6513908505439758,
0.48270756006240845,
-0.2216702103614807,
-0.2050853967666626,
0.13507825136184692,
0.7228953242301941... |
def test _ tc _ 43795 _ post _ proximityzone _ abletocreateproximityzonewithmandatoryparameters ( self, context ) : # these could come from a data file id = " proximitypost " name = " proximitypost " # define a test step with pytest. allure. step ( " create proximityzone ` { } ` ( { } ). ". format ( name, id ) ) : # cr... | [
0.1826871633529663,
-0.12045058608055115,
0.6221247911453247,
0.45096057653427124,
-0.12942609190940857,
1.3900511264801025,
-0.38846051692962646,
0.46476784348487854,
0.8726410269737244,
0.15151940286159515,
-0.47974494099617004,
-0.6256298422813416,
-0.7645364999771118,
0.487752258777618... |
def get _ rmeans ( sims ) : c = ['r ','uo ','ui ','cost ','samples ','density ','mahalanobis ','tserr ','tspos ','tsneg'] dfr = pd. dataframe ( columns = c ) for s in sims : file _ qoi = path ( s,'qoi _ sheet. csv') r = int ( str ( str ( s. rsplit ('/ ', 1 ) [ 1 ] ). split ('l') [ 0 ] ). split ('r') [ 1 ] ) df = pd. re... | [
-0.228812113404274,
0.93630051612854,
0.6995178461074829,
-0.4857380986213684,
-0.13003750145435333,
-0.22392131388187408,
0.0785277783870697,
-0.470506489276886,
-0.07910198718309402,
0.3184681534767151,
0.3474544584751129,
0.16269439458847046,
0.17473837733268738,
-0.28857511281967163,
... |
def test _ software _ 2 ( model, testloader ) : model. eval ( ) avg _ loss = averagemeter ( " average - loss " ) y _ gt = [ ] y _ pred _ label = [ ] for batch _ idx, ( img, y _ true ) in enumerate ( testloader ) : img = variable ( img ) y _ true = variable ( y _ true ) out = model ( img ) y _ pred = f. softmax ( out, d... | [
-0.7770029902458191,
-0.792449951171875,
0.6565291881561279,
0.39383962750434875,
-0.9548447728157043,
0.4483339190483093,
0.410317063331604,
-0.0730338767170906,
-1.1333379745483398,
0.7372317910194397,
-0.22018592059612274,
0.06501369178295135,
0.6783328056335449,
1.655840277671814,
-0... |
def _ write _ peer _ device _ bt _ address ( self ) : with open ( global _ config _ path, " r " ) as read _ file : data = json. load ( read _ file ) with open ( global _ config _ path, " w + " ) as write _ file : data [ _ echo _ bluetooth _ address ] = self. _ peer _ device _ bt _ addr json. dump ( data, write _ file ) | [
-1.231469750404358,
-0.842578113079071,
0.6469575762748718,
-0.4564920663833618,
0.5578272342681885,
0.7653931379318237,
0.6748039722442627,
0.1586703658103943,
-0.7775783538818359,
0.42267975211143494,
-0.7346744537353516,
0.5564137101173401,
-0.45202529430389404,
-0.08282241225242615,
... |
def test _ redetect _ in _ area _ outside _ image ( self ) : # face on the bottom image boundary image = vlimage. load ( filename = face _ with _ mask ) for detector in self. detectors : with self. subtest ( detectortype = detector. detectortype ) : rect = detector. detectone ( image ). boundingbox. rect rect. width = ... | [
-0.21690253913402557,
-0.13390198349952698,
0.6254279613494873,
0.9249192476272583,
0.7607547044754028,
-0.18128269910812378,
0.3214069604873657,
-0.4840671718120575,
0.6041654348373413,
-0.44431450963020325,
-0.21983219683170319,
-0.07236995548009872,
0.19934819638729095,
1.07817184925079... |
def test _ cs2 _ larger _ ct2 ( ) : f0 = tab. q ['ct2'] ( x, y ) f1 = tab. q ['cs2'] ( x, y ) np. testing. assert _ array _ less ( f0, f1 ) | [
0.42859354615211487,
-0.8398094773292542,
0.22025756537914276,
0.2672930359840393,
0.11409350484609604,
0.82198566198349,
-0.6527950167655945,
-1.425533413887024,
-0.48015111684799194,
-1.156775712966919,
-0.4184345304965973,
0.2311689257621765,
1.3077971935272217,
0.32677319645881653,
-... |
def get _ os _ img ( self, os ='ios ', size ='t') : if os = ='ios': return self. get _ ios _ img ( size ) elif os = ='ios _ retina': return self. get _ ios _ retina _ img ( size ) | [
-1.0502395629882812,
0.7843649983406067,
0.34941425919532776,
0.976391613483429,
-0.7506053447723389,
-0.3460918664932251,
-0.5238351225852966,
-0.3996729850769043,
-0.5429567694664001,
0.7637600302696228,
0.07362592220306396,
0.6697826981544495,
0.6014506816864014,
0.1312824934720993,
0... |
def randomly _ partition _ into _ subsets ( n, b ) : mapping = { } available _ buckets = range ( 0, b ) # all buckets are available initially remaining _ points = false # uniformly distribute points to buckets now for i in range ( 0, n ) : no _ available _ buckets = len ( available _ buckets ) if no _ available _ bucke... | [
-0.48459407687187195,
0.2657267451286316,
0.9034743905067444,
-0.18937119841575623,
-0.5856189727783203,
0.29327234625816345,
1.0715067386627197,
0.1343076527118683,
0.7634891271591187,
0.11951791495084763,
-0.27300897240638733,
-0.8857419490814209,
0.10577668994665146,
-0.3772115409374237... |
def find _ first _ empty _ line ( self, line _ from = 0, line _ to = none ) : if not line _ to : line _ to = len ( self. textlist ) - 1 if line _ from > = line _ to + 1 : return 0 last _ empty = false for y in range ( line _ from, line _ to + 1 ) : if self. textlist [ y ]. startswith ('' ) or ( not self. textlist [ y ]... | [
-0.1015172079205513,
-0.27799516916275024,
0.8181262016296387,
-0.5841970443725586,
0.15032607316970825,
0.19373305141925812,
-0.5493974685668945,
0.31507399678230286,
-1.0891658067703247,
-0.24272553622722626,
-0.33881810307502747,
0.04212532937526703,
-0.47114694118499756,
1.440928339958... |
def wikified _ output _ uploader ( uid : str, pid : str ) - > str : error = none if'wikifier _ output'not in request. files : error ='no file part'else : file = request. files ['wikifier _ output'] if file. filename = ='' : error ='no file selected for uploading'if file and allowed _ file ( file. filename, " csv " ) : ... | [
-0.47687748074531555,
-1.0254217386245728,
0.6154266595840454,
0.26730963587760925,
-0.14990746974945068,
-0.2911983132362366,
-0.05350881442427635,
-0.03118136338889599,
-0.7993083596229553,
0.4042642414569855,
0.4266579747200012,
-0.27864718437194824,
-0.6130934953689575,
1.0226701498031... |
def acronym _ heuristic3 ( doc, features ) : for key in features : if features [ key ]. get ( " alias ", 0. 0 ) > 0 : antecedent = doc. nps. getannotbyid ( int ( features [ key ] [ " id1 " ] ) ) anaphor = doc. nps. getannotbyid ( int ( features [ key ] [ " id2 " ] ) ) if antecedent. gettext ( ). lower ( ) = = anaphor. ... | [
0.3951946794986725,
-0.2858811616897583,
0.4855342209339142,
-0.17657314240932465,
-0.17320580780506134,
0.8421139717102051,
0.14421170949935913,
1.2146269083023071,
-0.0636179968714714,
0.534611165523529,
0.5838745832443237,
-0.26646196842193604,
0.8489806056022644,
0.20824161171913147,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.