text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
async def resume ( self, ctx ) : if ctx. voice _ client. is _ playing ( ) : ctx. voice _ client. pause ( ) else : ctx. voice _ client. resume ( ) | [
1.121970534324646,
-0.1829809993505478,
0.6923331618309021,
0.3248056471347809,
0.851950466632843,
0.6153616905212402,
-1.017990231513977,
-0.4216674268245697,
0.8664886355400085,
-0.19496376812458038,
0.7697131633758545,
0.5693765878677368,
-1.1854089498519897,
-0.7645792961120605,
0.50... |
def tags ( self ) - > pulumi. output [ optional [ mapping [ str, any ] ] ] : return pulumi. get ( self, " tags " ) | [
0.48860859870910645,
0.31502777338027954,
0.5108786225318909,
0.17165371775627136,
0.9105594158172607,
-0.009591378271579742,
-0.6106942892074585,
0.007089683786034584,
0.17892207205295563,
-0.23131723701953888,
-0.911230206489563,
0.24156445264816284,
0.2917119562625885,
-0.04038348421454... |
def app _ options ( self ) : return [ self. input ( ) [ 0 ]. path, self. input ( ) [ 1 ]. path, self. specimen _ type, self. output ( ). path, ] | [
-0.4354957044124603,
-0.8277812600135803,
0.39130252599716187,
0.9921461343765259,
0.5678112506866455,
0.8276885747909546,
0.3721093535423279,
-0.9912181496620178,
-0.28250062465667725,
0.4807128608226776,
0.16676123440265656,
0.16482442617416382,
0.24706785380840302,
0.6614415049552917,
... |
def inspectobviouscellclues ( self, cell ) : if not cell. isfullyset ( memoize = true ) : if cell. reqsides is not none : # if already has correct number of active sides, set others to blank if cell. countactivesides ( ) = = cell. reqsides : msg = " cell already has correct number of active sides, " + \ " so remove the... | [
0.13417521119117737,
0.41733911633491516,
0.7004686594009399,
-0.27187320590019226,
0.1709202527999878,
-0.7173388600349426,
1.077149510383606,
-0.6015247106552124,
-0.11477683484554291,
0.23363886773586273,
0.5519827008247375,
0.7596472501754761,
0.22272752225399017,
1.4133752584457397,
... |
def get _ da _ by _ bov ( self, da _ vec, value _ vectors ) : da _ type ='' for i, item in enumerate ( da _ vec ) : if item = = 1 : da _ type = self. index _ dat [ i ] break assert da _ type! ='' slot _ values = [ ] for i, item in enumerate ( value _ vectors ) : s _, v _ = self. slots [ i ],'' dic = self. index _ value... | [
-0.7674209475517273,
0.15132136642932892,
0.6539847254753113,
0.22063279151916504,
-0.06342288106679916,
-0.18240594863891602,
0.894788920879364,
-0.14443737268447876,
-0.30313146114349365,
0.05443244054913521,
0.4405515789985657,
1.0454211235046387,
0.8549604415893555,
0.586640477180481,
... |
def findpalindromes ( str ) : ptable = { } findpalindromesintable ( str, ptable ) return ptable [ str ] | [
-0.20864231884479523,
-0.02584761194884777,
0.363479882478714,
0.4668531119823456,
-0.9477081298828125,
0.15567442774772644,
0.34742045402526855,
0.0008202815661206841,
-0.3752560019493103,
0.2225572168827057,
-0.32576271891593933,
-0.7355797290802002,
-1.5489959716796875,
-0.5429937839508... |
def start _ time ( self, value ) : self. start _ time _ value = value | [
0.17779704928398132,
-0.17021094262599945,
0.2551986873149872,
-0.4360795319080353,
-0.13649581372737885,
0.596988320350647,
0.08059638738632202,
0.5255401730537415,
-0.33254796266555786,
1.4108234643936157,
-1.0862632989883423,
0.2629109025001526,
0.15760718286037445,
0.7410232424736023,
... |
def inverse _ mapping ( mapping ) : return mapping. _ _ class _ _ ( map ( reversed, mapping. items ( ) ) ) | [
-1.2830066680908203,
0.21533145010471344,
0.6173086762428284,
-0.27592024207115173,
-1.01102614402771,
0.1669250875711441,
-0.46571633219718933,
0.9946326017379761,
0.002170547842979431,
0.04741750285029411,
-0.22232100367546082,
0.24990613758563995,
0.17302410304546356,
-0.686611294746398... |
def delete ( self, name, * paths ) : self. not _ supported ( ) | [
-0.10319430381059647,
0.21286678314208984,
0.2741154730319977,
1.5448321104049683,
0.11781855672597885,
0.3698250353336334,
-0.25737038254737854,
0.591230571269989,
0.21898189187049866,
-0.22107645869255066,
-0.26415595412254333,
-0.8929871916770935,
-0.96831876039505,
0.05053640529513359,... |
def test _ load _ jwks ( self ) - > none : jwks = self. get _ success ( self. provider. load _ jwks ( ) ) self. fake _ server. get _ jwks _ handler. assert _ called _ once ( ) self. assertequal ( jwks, self. fake _ server. get _ jwks ( ) ) # subsequent calls should be cached … self. reset _ mocks ( ) self. get _ succes... | [
-0.4551640450954437,
1.5314278602600098,
0.6211099624633789,
-0.09713029861450195,
0.15420034527778625,
0.4531908333301544,
0.046878814697265625,
-1.2869278192520142,
0.22472988069057465,
0.14379654824733734,
-1.108657717704773,
0.49513426423072815,
-0.2772495150566101,
0.5140978097915649,... |
def sum _ naturals ( n ) : return summation ( n, identity ) | [
-0.905993640422821,
0.8395296931266785,
0.07836167514324188,
0.32411062717437744,
0.23568999767303467,
-0.2303513139486313,
-0.7767219543457031,
-0.5673731565475464,
-0.4405730962753296,
-0.1209944561123848,
-1.4260430335998535,
-0.26987653970718384,
0.4226563572883606,
-0.0669397264719009... |
def load _ selected _ images ( self ) : # set up and run thread to load images from selected cells loader = imageloader ( self ) loader. run ( ) | [
-0.45033448934555054,
-0.3513217270374298,
0.2689860463142395,
0.727308988571167,
0.414299875497818,
-0.1964300572872162,
0.5902442932128906,
-0.42572662234306335,
-0.059673964977264404,
-0.2741028964519501,
-0.16735881567001343,
0.3908368647098541,
-0.2863035798072815,
0.8487226366996765,... |
def vpnvserver _ rewritepolicy _ bindings ( self ) : try : return self. _ vpnvserver _ rewritepolicy _ binding except exception as e : raise e | [
-0.7696239948272705,
-0.7551261782646179,
0.2858337461948395,
1.2190468311309814,
0.4367181062698364,
1.036740779876709,
0.787394106388092,
0.3987411856651306,
0.7282426357269287,
0.765248715877533,
-0.2636493742465973,
0.8849338293075562,
-1.32657790184021,
-0.44263023138046265,
-0.0291... |
def save _ classification ( ) : list _ to _ save = sorted ( points. items ( ), key = itemgetter ( 1 ), reverse = true ) try : file _ classif = open ( " classificacao _ geral ",'w ', encoding ='utf8') pos = 1 for item in list _ to _ save : # print ( format ( pos, " 02n " ) + " " + format ( item [ 0 ], " 12s " ) + " " + ... | [
-0.7359616756439209,
-0.5564727187156677,
0.6548619270324707,
-0.10320447385311127,
0.7423372864723206,
0.8607223033905029,
0.799835741519928,
0.34070590138435364,
-1.1359515190124512,
0.7037559747695923,
-0.9019638299942017,
0.4698788821697235,
0.2924489974975586,
0.3749537169933319,
0.... |
def same _ text ( s1, s2 ) : # note, unicodedata. normalize is a good idea to get this to work all the time, # but this is only used here to compare against our simple directive names return s1. casefold ( ) = = s2. casefold ( ) | [
0.0245871189981699,
-0.528461754322052,
0.5988625884056091,
0.10384512692689896,
-1.1220334768295288,
0.23485177755355835,
-0.8800466656684875,
0.12895655632019043,
0.37596094608306885,
0.6557936668395996,
-0.5726323127746582,
0.7165664434432983,
-0.7956673502922058,
-0.4537568986415863,
... |
def is _ private ( self, user ) : self. nav _ user ( user ) private _ h2 = self. driver. find _ elements _ by _ css _ selector ('# react - root > section > main > div > div. nd _ rl. _ 2z6ni > article > div. _ 4kbb _ > div > h2 [ class = " rkeop " ]') if len ( private _ h2 ) = = 0 : print ( user + " not private " ) ret... | [
-1.0264376401901245,
0.539309024810791,
0.6924811005592346,
1.0746232271194458,
-0.08647283166646957,
0.10364047437906265,
0.14387385547161102,
-0.8814215660095215,
0.52010178565979,
-0.20016419887542725,
-0.2596941590309143,
0.06980320066213608,
-0.33634498715400696,
0.7262885570526123,
... |
def parse _ codon _ scheme ( codonfile ) : aa _ index, codon _ index = 1, 3 # default codon _ table = collections. counter ( ) for line in codonfile : if line. startswith ( " # " ) : line = line. strip ( ). split ( ) line [ 0 ] = line [ 0 ] [ 1 : ] # strip leading " # " for i, x in enumerate ( line ) : if x = = " aa " ... | [
0.2429293394088745,
-0.5125625729560852,
0.592114269733429,
-0.9293993711471558,
-0.6371639966964722,
-0.20724502205848694,
0.8074443340301514,
0.38010457158088684,
-0.7416626811027527,
0.9811679124832153,
-0.6916093826293945,
-0.2783293128013611,
0.466859370470047,
-0.19100132584571838,
... |
def has _ enough _ time ( self ) : booking _ date = self. booking _ datetime. asdatetime ( ) return self. prenotazioni. is _ booking _ date _ bookable ( booking _ date ) | [
-0.9911357760429382,
0.8916237950325012,
0.7075339555740356,
1.6417450904846191,
-0.8939813375473022,
1.4273426532745361,
-0.485806405544281,
0.25560107827186584,
-1.618944525718689,
1.008563756942749,
-0.33504921197891235,
-0.4120669364929199,
-0.35866880416870117,
1.4241459369659424,
0... |
def set _ global _ mask ( self, mask ) : self. _ grid _ masks ['protein'] = mask print self. global _ mask ( ). summary ( ) | [
-0.4176718592643738,
0.18360494077205658,
0.3942227363586426,
1.1087417602539062,
0.9876916408538818,
0.8114433288574219,
0.5582422614097595,
-0.511289656162262,
-0.6448245644569397,
0.33297833800315857,
-0.5728162527084351,
1.7325239181518555,
-0.8393157720565796,
0.754361629486084,
0.3... |
def _ _ init _ _ ( self, log _ frames = 0, run _ num = 0, eval _ time = 10., dt =. 002, n = 4 ) : global simulate man = odemanager ( near _ callback, stepsize = dt / n, log _ data = log _ frames, run _ num = run _ num ) # settings for the simulation. self. log _ frames = log _ frames self. run _ num = run _ num self. e... | [
-0.04833351820707321,
1.4799001216888428,
0.7608844041824341,
0.11335712671279907,
-0.304302841424942,
-0.5359987020492554,
0.25884997844696045,
-1.0094854831695557,
0.15509545803070068,
-0.2479153275489807,
-0.5570353269577026,
-0.2083147019147873,
0.28991007804870605,
0.46711617708206177... |
def device _ index ( self ) - > optional [ pulumi. input [ int ] ] : return pulumi. get ( self, " device _ index " ) | [
-0.17466261982917786,
0.8705621361732483,
0.40260034799575806,
0.419395387172699,
0.9794313907623291,
1.2812325954437256,
1.677207350730896,
0.4497372806072235,
0.9067474007606506,
-0.7725001573562622,
0.40839719772338867,
1.037731647491455,
-0.20234054327011108,
-1.1350334882736206,
0.4... |
def build _ city ( self, existing _ settlement _ locations, game _ state ) : return | [
-0.30990517139434814,
-1.2785686254501343,
0.14227473735809326,
0.17677350342273712,
0.03564099222421646,
0.567410409450531,
-0.042778659611940384,
0.7188330292701721,
0.2997371554374695,
-0.0447164885699749,
-0.152227982878685,
-1.2750669717788696,
0.6907573342323303,
-0.813286542892456,
... |
def date _ time _ string ( self, timestamp = none ) : if timestamp is none : timestamp = time. time ( ) return email. utils. formatdate ( timestamp, usegmt = true ) | [
0.3203963339328766,
0.23488812148571014,
0.6255772709846497,
-0.08052131533622742,
-0.009491827338933945,
0.0768442451953888,
-1.2922170162200928,
-0.7465533018112183,
1.1445960998535156,
0.6393200755119324,
0.4068661034107208,
0.24213480949401855,
0.027382729575037956,
-0.5252764225006104... |
def sigmoid ( z ) : return 1 / ( 1 + np. exp ( - z ) ) | [
-0.3434849977493286,
-0.34540119767189026,
0.23300638794898987,
0.649490237236023,
-0.1807515174150467,
0.4565759599208832,
0.8592073321342468,
0.45615512132644653,
1.7802636623382568,
0.061670783907175064,
-0.2405255287885666,
-0.5209461450576782,
-0.8525547981262207,
-0.36327415704727173... |
def mark _ job _ as _ missed ( job _ id ) : update _ dict = { " status " : " error ", " error " : " job delayed too long, service full ", " finished _ timestamp " : datetime. datetime. now ( ), } _ update _ job ( job _ id, update _ dict ) | [
-0.3163899779319763,
-0.3818103075027466,
0.39192938804626465,
-0.4545901417732239,
-0.24096806347370148,
0.24981559813022614,
-0.3315935730934143,
0.2718998193740845,
0.27317142486572266,
0.06933953613042831,
-0.6098706126213074,
0.2438911497592926,
0.6948538422584534,
0.532638669013977,
... |
def test _ protdna _ irmsd ( protdna _ caprimodule ) : protdna _ caprimodule. calc _ irmsd ( ) assert round _ two _ dec ( protdna _ caprimodule. irmsd ) = = 2. 05 | [
0.5767697691917419,
-0.949371337890625,
0.3373109996318817,
-0.3695025146007538,
0.2830817401409149,
0.4353964924812317,
-0.07703229784965515,
-0.5797717571258545,
0.03845076635479927,
-0.7428832054138184,
0.21412180364131927,
0.49103012681007385,
-0.6109819412231445,
0.8320913314819336,
... |
def predict ( self, test _ x _ with _ time _ df, plot _ clusters = false, dim _ reduction _ method = dim _ reduction _ method _ tsne, perplexity = 30 ) : # in order to retain the original object, use slice to do a shallow copy. test _ x _ without _ time _ df = test _ x _ with _ time _ df. copy ( ) ret = test _ x _ with... | [
-0.4426211416721344,
0.04739971458911896,
0.5174189805984497,
0.852113664150238,
-0.2648673951625824,
-0.3134397864341736,
0.40080592036247253,
-0.6735964417457581,
0.35202381014823914,
0.13774220645427704,
0.4476524889469147,
0.4527457058429718,
-0.15222424268722534,
-0.0786072239279747,
... |
def validateseg ( filepath ) : print ( " validating seg file " ) total _ error = " " warning = " " segdf = pd. read _ csv ( filepath, sep = " \ t ", comment = " # " ) segdf. columns = [ col. upper ( ) for col in segdf. columns ] required _ headers = ['id ','chrom ','loc. start ','loc. end ','num. mark ','seg. mean'] if... | [
-0.7012906670570374,
-0.21914345026016235,
0.5433984994888306,
-0.19223091006278992,
0.5626180768013,
-0.017525451257824898,
0.3170790672302246,
0.053401362150907516,
-1.3194023370742798,
-0.0772990733385086,
-0.07054173201322556,
-0.6277456879615784,
0.23405617475509644,
-0.28770250082015... |
def top _ k _ top _ p _ filtering ( logits, top _ k = 0, top _ p = 0. 0, filter _ value = - float ('inf'), gen _ func = torch. softmax ) : assert logits. dim ( ) = = 1 # batch size 1 for now - could be updated for more but the code would be less clear top _ k = min ( top _ k, logits. size ( - 1 ) ) # safety check if to... | [
-0.18219494819641113,
-0.5682530999183655,
0.7212806940078735,
-0.2762254774570465,
-1.312692403793335,
0.18554744124412537,
0.13809604942798615,
0.21070581674575806,
-0.31099408864974976,
0.5314053893089294,
0.45221957564353943,
0.5530992746353149,
0.039305590093135834,
-0.735021948814392... |
def increment _ number _ served ( self, additional _ customers ) : self. number _ served + = additional _ customers | [
-0.2119116485118866,
-0.4091052711009979,
0.41033074259757996,
0.25514575839042664,
-0.04873893782496452,
0.6425327658653259,
0.15629443526268005,
-0.03591373935341835,
-0.3467917740345001,
-0.6353126764297485,
-0.7029206156730652,
1.1076998710632324,
0.46821874380111694,
0.352352917194366... |
def _ _ new _ _ ( cls, a ) : obj = np. array ( [ " ". join ( s ) for s in a ], dtype = object, copy = false, order = " c ", ndmin = 2 ). view ( cls ). copy ( order = " f " ) if obj. size = = 0 : obj. shape = ( 0, 0 ) return obj | [
-0.09076346457004547,
-1.2569619417190552,
0.8292316198348999,
0.1906919926404953,
-0.8591709733009338,
0.12735165655612946,
0.7781051993370056,
-0.02401016652584076,
0.6193826198577881,
0.25078967213630676,
0.03233886882662773,
0.39541348814964294,
0.5895372629165649,
0.366279274225235,
... |
def plot _ zoom _ x _ cb ( self, plot, direction ) : scale _ x, scale _ y = self. viewer. get _ scale _ xy ( ) zoomrate = self. viewer. get _ zoomrate ( ) with self. viewer. suppress _ redraw : # zoom x axis if direction = ='in': scale _ x * = zoomrate elif direction = ='out': scale _ x * = ( 1. 0 / zoomrate ) self. vi... | [
0.01999952644109726,
0.4536864459514618,
0.7163106203079224,
-0.012917007319629192,
-1.6791744232177734,
0.2916686534881592,
0.13573087751865387,
-0.26822277903556824,
0.6326812505722046,
0.13688908517360687,
-0.6772513389587402,
0.2680896520614624,
0.37560999393463135,
-0.2729576230049133... |
def test _ match _ types _ multiple ( self ) : normalized _ types = {'account': ['account'],'region': ['region ','awsregion'],'ipv4': ['destination ','source ','sourceipaddress'],'username': ['username ','owner ','invokedby'] } expected _ results = {'account': [ 123456 ],'ipv4': ['1. 1. 1. 2 ','1. 1. 1. 3'],'region': [... | [
-0.09859859198331833,
0.3876778781414032,
0.6769616603851318,
0.21339291334152222,
0.15036706626415253,
0.07331818342208862,
0.05538592487573624,
-0.05453270301222801,
0.01967206411063671,
-0.14047449827194214,
-0.8468017578125,
-0.7645971775054932,
-0.6538183689117432,
0.00276619079522788... |
def write _ sentence _ list _ to _ file ( filename, sen _ l ) : with open ( filename, mode = " w ", encoding = " utf - 16 " ) as fl : for ln _ edit1 in sen _ l : ln _ edit1 = " ". join ( ln _ edit1. split ( ) ) if ( ln _ edit1. count ('"') % 2 )! = 0 : ln _ edit1 = ln _ edit1. replace ('" ', " " ) if len ( ln _ edit1. ... | [
0.09924155473709106,
-1.1583822965621948,
0.7051740288734436,
-0.21438811719417572,
0.7032051682472229,
-0.28554919362068176,
-0.3164198696613312,
0.04102899879217148,
-0.04662293195724487,
0.5841142535209656,
-1.2754274606704712,
-0.591911256313324,
-0.22094091773033142,
0.724903702735900... |
async def ui ( ) : exit _ with _ error _ if _ not _ editable _ install ( ) with tmpchdir ( prefect. _ _ development _ base _ path _ _ ) : with tmpchdir ( prefect. _ _ development _ base _ path _ _ / " ui " ) : app. console. print ( " installing npm packages... " ) await run _ process ( [ " npm ", " install " ], stream ... | [
-0.1467265784740448,
0.5157902240753174,
0.7683667540550232,
0.22624297440052032,
1.325368881225586,
0.3718169927597046,
0.9853918552398682,
-0.2574380040168762,
-0.05408519133925438,
-0.4172024130821228,
-0.19348275661468506,
0.4969542324542999,
-0.1437128335237503,
0.46964457631111145,
... |
def get _ subject ( self ) : if self. is _ valid ( ) : data = self. cleaned _ data value ='' fields = ['cn ','email ','country ','state ','locality ','org ','ou'] for component in fields : if data [ component ] : value + ='/ % s = % s'% ( name _ dict [ component ], data [ component ] ) return value return none | [
-0.2211756855249405,
0.0319942943751812,
0.3511866629123688,
-0.9752824306488037,
-0.9011695981025696,
0.2241428792476654,
-0.2939496338367462,
-1.364893913269043,
0.04066264256834984,
-0.07018357515335083,
0.08539062738418579,
0.11526462435722351,
-0.3324631154537201,
-0.8384619951248169,... |
def teststickyebuild ( self ) : stable _ ebuilds = self. _ getstableebuilds ( ) sticky _ ebuild = cros _ mark _ chrome _ as _ stable. _ getstickyebuild ( stable _ ebuilds ) self. assertequal ( sticky _ ebuild. chrome _ version, self. sticky _ version ) | [
0.34864407777786255,
-0.13114473223686218,
0.19499528408050537,
1.2640775442123413,
0.8884204626083374,
1.3693689107894897,
0.7009564638137817,
-0.40081197023391724,
-0.1939265877008438,
-0.09643705934286118,
-1.1428353786468506,
0.349543958902359,
-0.22716566920280457,
0.64111328125,
0.... |
def get _ agents _ info ( filepath ) : f = open ( filepath ) agents _ info = { } for line in f : if line. split ( ) = = [ ] or line [ 0 ] = ='#': continue entries = dict ( [ tuple ( entry. split ( " = " ) ) for entry in line. split ( ) ] ) id = int ( entries ['id'] ) del entries ['id'] agents _ info [ id ] = entries re... | [
0.10114254057407379,
-1.3278340101242065,
0.26295068860054016,
-1.1476128101348877,
-0.49090778827667236,
0.2760528326034546,
-0.28993934392929077,
0.11512294411659241,
-0.5764095187187195,
0.7118605971336365,
-0.9042811989784241,
-0.7463973164558411,
0.7018356919288635,
0.0791222378611564... |
def test _ parsing _ geom ( clear _ database _ before _ test, db _ test _ app, generate _ calc _ job _ node, generate _ parser, h2 _ calc _ inputs, ) : from aiida _ castep. calculations. castep import castepcalculation node = generate _ calc _ job _ node ( " castep. castep ", " h2 - geom ", inputs = h2 _ calc _ inputs,... | [
0.9197455048561096,
-0.03760136291384697,
0.5055283308029175,
0.30241578817367554,
0.5212958455085754,
0.07514171302318573,
0.07647289335727692,
-0.38636428117752075,
-1.1236820220947266,
-0.5021831393241882,
-0.23027028143405914,
-0.10624304413795471,
0.6674568057060242,
0.162217974662780... |
def search ( self, layer : int, heads : list, query : np. ndarray, k : int ) : assert max ( heads ) < nheads # heads should be indexed by 0 assert min ( heads ) > = 0 unique _ heads = list ( set ( heads ) ) mask _ vector = base _ mask ( unique _ heads ) mask _ vector = mask _ vector. reshape ( query. shape ) new _ quer... | [
-0.5803343057632446,
-0.0017397744813933969,
0.4808504581451416,
0.27329662442207336,
-0.1979408860206604,
-0.19606800377368927,
-0.27287983894348145,
-0.9006904363632202,
0.05286860093474388,
0.38974669575691223,
0.4536833167076111,
0.12853404879570007,
-0.9532293677330017,
-0.14288958907... |
def attach ( self, observer ) : self. observers. append ( observer ) | [
0.026649383828043938,
-0.30488157272338867,
0.21760542690753937,
-0.6122649908065796,
0.13065099716186523,
0.9817262291908264,
-0.7932785749435425,
0.15077869594097137,
0.260651171207428,
-0.9904448390007019,
-0.5298400521278381,
-0.1563594937324524,
-0.42404013872146606,
0.943060398101806... |
def main ( filename, nframes = - 1, natoms = - 1 ) : np. set _ printoptions ( precision = 3, suppress = true ) reader = framereader ( filename ) if natoms < 0 : natoms = reader. total _ atoms else : natoms = min ( natoms, reader. total _ atoms ) if nframes < 0 : nframes = reader. total _ frames else : nframes = min ( n... | [
0.5518776774406433,
-0.14120210707187653,
0.9384095668792725,
-0.2814079821109772,
-0.43873828649520874,
0.061832915991544724,
0.6041412949562073,
0.2808937728404999,
0.3817066252231598,
0.9191045761108398,
0.17384864389896393,
-0.6201823949813843,
-0.19143539667129517,
-0.0876890569925308... |
def missno ( scores ) : total = 0 if len ( scores ) = = 0 : # if no scores avoid div by zero! return 0 for score in scores : if score = = 0 : total = total + 1 print total return total | [
-0.7001824975013733,
-0.26266559958457947,
0.7961430549621582,
0.6768290996551514,
0.5582170486450195,
-0.16323111951351166,
1.597066879272461,
0.23021167516708374,
0.706810474395752,
0.2536456286907196,
-0.4254765212535858,
-0.49157071113586426,
-0.45998910069465637,
0.5777246952056885,
... |
def setup ( self ) : self. portal = self. layer ['portal'] self. browser = browser ( self. portal ) | [
0.47019457817077637,
-0.9648814797401428,
0.11397247761487961,
-0.2509867548942566,
0.549828290939331,
0.43508508801460266,
0.7089349627494812,
-0.016583707183599472,
0.8362956643104553,
-0.001907246420159936,
-0.06258462369441986,
0.6780831217765808,
-0.4032042920589447,
0.980107843875885... |
def first _ maximum ( reactions, variable _ index, i0 ) : times = reactions [ 0 ] psi = reactions [ variable _ index ] nt = len ( times ) for i in range ( i0, nt - 1 ) : if psi [ i ] > max ( psi [ i - 1 ], psi [ i + 1 ] ) : return psi [ i ], i raise exception ('the function is probably constant, or hasn \'t the same pe... | [
0.07754053175449371,
-0.007398203015327454,
0.46605998277664185,
-0.00011989926133537665,
-0.24343076348304749,
-0.8008646368980408,
-0.5053377151489258,
0.5516677498817444,
-0.3358238637447357,
0.43268445134162903,
-0.1941409707069397,
0.21511630713939667,
-0.708160400390625,
-0.104880213... |
def test _ empty _ deque _ size ( ) : empty _ deque = deque ( ) assert empty _ deque. size ( ) = = 0 | [
-0.5189692378044128,
0.26069027185440063,
0.11235039681196213,
-1.3173655271530151,
1.2809425592422485,
0.2995947003364563,
-0.5138357877731323,
0.4414517283439636,
-0.09788082540035248,
-1.6657758951187134,
-0.9761385917663574,
-0.23557044565677643,
0.2068667709827423,
0.8131700158119202,... |
def get _ all _ forms ( url ) : # get request res = session. get ( url ) # for javascript driven website # res. html. render ( ) soup = beautifulsoup ( res. html. html, " html. parser " ) return soup. find _ all ( " form " ) | [
-0.8601822257041931,
-0.24422739446163177,
0.8331010937690735,
0.2098514884710312,
0.05273392051458359,
-0.1144946962594986,
-0.6572502255439758,
-0.3578082323074341,
0.7654224038124084,
-0.6473667621612549,
-1.0446282625198364,
-0.10980265587568283,
0.44354140758514404,
1.242569088935852,... |
def create _ mock _ github ( user ='octo - cat ', private = false ) : github _ mock = mock. create _ autospec ( githubclient ) github _ mock. repo. return _ value = github3. repos. repository. from _ json ( dumps ( { u'archive _ url': u'https : / / api. github. com / repos / { user } / mock - repo / { { archive _ forma... | [
-0.47044485807418823,
0.0754370391368866,
0.7165522575378418,
-0.386846661567688,
0.33940455317497253,
-0.1046319305896759,
-0.151677206158638,
-0.13793231546878815,
-0.28507110476493835,
-0.2639390230178833,
-0.7288886308670044,
0.2101021558046341,
-0.006016168277710676,
-0.36976793408393... |
def is _ recording ( self ) : return self. _ device. device _ data [ self. _ uuid ] [ " is _ streaming " ] | [
-0.6253415942192078,
1.6037107706069946,
0.5259037613868713,
1.0525507926940918,
0.09956607967615128,
-0.12591829895973206,
-0.28340497612953186,
-0.10156501084566116,
0.5186371803283691,
0.37063154578208923,
-0.3301047384738922,
1.692233920097351,
-1.263869285583496,
0.005828019231557846,... |
def main ( ) : parser = argparse. argumentparser ( ) group = parser. add _ mutually _ exclusive _ group ( ) group. add _ argument ( " - c ", " - - camera ", action = " store _ true " ) group. add _ argument ( " - b ", " - - board ", action = " store _ true " ) group. add _ argument ( " - w ", " - - whiteboard ", action... | [
0.22982655465602875,
0.9493622183799744,
0.7666014432907104,
0.8293376564979553,
-0.4358750283718109,
0.02551487646996975,
0.29371386766433716,
0.09879010915756226,
0.1944890022277832,
0.04412689805030823,
0.17939041554927826,
0.800741970539093,
0.03643372654914856,
0.8595566153526306,
0... |
def four ( ) : return [ [ 0, 0, 1, 0 ], [ 0, 1, 1, 0 ], [ 1, 0, 1, 0 ], [ 1, 0, 1, 0 ], [ 1, 1, 1, 1 ], [ 0, 0, 1, 0 ], [ 0, 0, 1, 0 ], ] | [
-0.5364762544631958,
-0.6444212198257446,
0.784621000289917,
0.24269618093967438,
0.9869139194488525,
-0.22425206005573273,
0.25799360871315,
-0.8631080389022827,
-0.12088014930486679,
-0.3025188446044922,
-1.6685701608657837,
-0.5471479892730713,
-0.2156812697649002,
0.2895764708518982,
... |
def test _ show _ post _ details ( self ) : with app. test _ client ( ) as client : resp = client. get ( f " / posts / { self. post _ id } " ) html = resp. get _ data ( as _ text = true ) self. assertequal ( resp. status _ code, 200 ) self. assertin ( f'< h1 > { self. post. title } < / h1 > ', html ) self. assertin ( f... | [
1.072641134262085,
0.702301561832428,
0.3979613780975342,
0.4002071022987366,
0.2647804319858551,
0.6361981630325317,
-0.40246716141700745,
0.5655571818351746,
-0.1842215657234192,
-1.1112561225891113,
0.37231284379959106,
0.45475754141807556,
0.662383496761322,
0.2215726375579834,
-0.06... |
def get _ namespace ( ) : return ['unwrap, find _ nth, small _ motif _ find, min _ process _ glycans, motif _ find, \ process _ glycans, character _ to _ label, string _ to _ labels, pad _ sequence, get _ lib, \ glycan _ to _ graph, dataset _ to _ graphs, hierarchy _ filter, compare _ glycans, subgraph _ isomorphism, \... | [
0.37800371646881104,
-0.2323817014694214,
0.3841235935688019,
0.0650811642408371,
0.3030065596103668,
-0.2362806648015976,
0.7206774950027466,
-1.156237006187439,
0.2926005423069,
-0.3381567895412445,
-0.5722213387489319,
1.3060708045959473,
0.691379964351654,
0.1409474015235901,
0.32399... |
def generate _ primary _ diagonal ( space, i, j ) : result = set ( ) def helper ( space, i, j, result ) : if 0 < = i < len ( space ) and 0 < = j < len ( space [ 0 ] ) and ( i, j ) not in result : result. add ( ( i, j ) ) helper ( space, i + 1, j + 1, result ) helper ( space, i - 1, j - 1, result ) helper ( space, i, j,... | [
-0.0046825651079416275,
0.5684120059013367,
0.5417502522468567,
-0.6566072106361389,
-0.5899381637573242,
-1.0018283128738403,
0.24631190299987793,
-0.12845826148986816,
0.32897618412971497,
-0.06205190345644951,
-0.5263751745223999,
0.17887593805789948,
-0.5784513354301453,
0.303351640701... |
def search _ entries ( ) : # calling our view _ entries function and asking for a string / word to search for view _ entries ( input ( " search query : " ) ) | [
0.5151560306549072,
0.3258466422557831,
0.21952137351036072,
0.6152622699737549,
-0.26314371824264526,
0.017700335010886192,
0.060480065643787384,
-0.03438473865389824,
-0.15177680552005768,
-0.9962665438652039,
0.16438765823841095,
0.8261777758598328,
-0.13930483162403107,
0.9716863036155... |
def from _ vocabfile ( cls, filename ) : words = [ x. strip ( ) for x in _ open ( filename,'r'). read ( ). splitlines ( ) ] return cls ( words = words ) | [
1.0742942094802856,
-1.0913821458816528,
0.13231807947158813,
-0.20255400240421295,
-0.5120342373847961,
0.4023573398590088,
-0.4075927734375,
0.9580985903739929,
0.048058222979307175,
0.883486270904541,
0.01516801305115223,
-0.06672362983226776,
-0.5457613468170166,
0.08335679024457932,
... |
def apply ( self, f : " callable [ [ dataframe ], dataframe ] " ) : return wrap _ df ( self. _ df. groupby _ apply ( self. by, f ) ) | [
-0.9892345666885376,
0.9567386507987976,
0.42511773109436035,
0.507830798625946,
-0.12787336111068726,
-0.6870816349983215,
0.5938258767127991,
0.2363576889038086,
-0.6931005716323853,
-0.7548166513442993,
0.8625630736351013,
0.6740633845329285,
0.3889010548591614,
-0.18417300283908844,
... |
def set _ labels ( repos, standard _ labels, repo _ specific _ labels ) : for repo in list ( repos ) : log. info ( f " getting labels for repo'{ repo. name } '... " ) labels = standard _ labels + repo _ specific _ labels. get ( repo. name, [ ] ) log. success ( f " done. found { len ( labels ) } labels. " ) log. info ( ... | [
-0.8224983215332031,
0.29012659192085266,
0.34763622283935547,
-0.1261562556028366,
0.5281765460968018,
0.42849865555763245,
-0.9976126551628113,
0.12391988188028336,
-0.32746779918670654,
1.321387767791748,
-0.38723719120025635,
0.27385568618774414,
0.8328660130500793,
0.2874228060245514,... |
def test _ simple _ get ( config ) : assert config. get ( " top " ) = = " key " | [
-1.4014003276824951,
0.2604806423187256,
0.2982262074947357,
0.31431135535240173,
-0.019705435261130333,
0.12995536625385284,
-0.5362495183944702,
-0.5372859239578247,
-0.07199221104383469,
-0.22595633566379547,
-0.47837644815444946,
0.2902768552303314,
-0.12010850757360458,
-0.83232265710... |
def producer ( cond ) : logging. debug ('starting producer thread') with cond : logging. debug ('making resource available') import time logging. debug ( " working on my task and once complete with notify others to start " ) time. sleep ( 10 ) cond. notifyall ( ) | [
0.7342727780342102,
-0.2519960403442383,
0.48410338163375854,
0.7219223380088806,
-0.12876424193382263,
0.5531523823738098,
0.5848009586334229,
0.8951435089111328,
0.050387367606163025,
0.4892981946468353,
-0.2274734526872635,
0.3897441327571869,
0.21199116110801697,
0.52968829870224,
0.... |
def get _ table _ download _ link ( df : pd. dataframe, name : str ) : csv = df. to _ csv ( index = false ) b64 = base64. b64encode ( csv. encode ( ) ). decode ( ) # some strings < - > bytes conversions necessary here href = f'< a href = " data : file / csv ; base64, { b64 } " download = " % { name } " > download as *.... | [
-0.14942188560962677,
0.1229267418384552,
0.6260601878166199,
0.7107178568840027,
0.1351211816072464,
-0.879487156867981,
-0.5973226428031921,
0.006001635454595089,
-0.6276978254318237,
-0.26642921566963196,
0.3838471472263336,
1.0724396705627441,
0.9600823521614075,
0.16713188588619232,
... |
def initialize ( self ) : # configure the event loop, which can be used for non - window clients. logger = logging. getlogger ( ) old _ level = logger. level logger. setlevel ( logging. info ) self. _ _ event _ loop = asyncio. new _ event _ loop ( ) # outputs a debugger message! logger. setlevel ( old _ level ) | [
0.25876784324645996,
0.26274922490119934,
0.5107050538063049,
-0.03265555575489998,
0.05886150524020195,
-0.8675011396408081,
0.10177794843912125,
0.15873481333255768,
-1.0720163583755493,
-0.4371429681777954,
-0.5208739638328552,
0.5870197415351868,
-0.21492883563041687,
1.324463248252868... |
def select _ menu _ option ( request ) : if request. user. is _ stylist = ='yes': if request. method = ='get': menu _ options = globalmenu. objects. all ( ). exclude ( modified _ global _ _ stylist = request. user ) stylist _ options = stylistmenu. objects. filter ( stylist = request. user ) return render ( request,'st... | [
-0.5889670252799988,
0.23570901155471802,
0.6139121055603027,
1.3759287595748901,
-0.5959791541099548,
0.8544471263885498,
0.5117395520210266,
0.6958932280540466,
0.5341634750366211,
0.8887037038803101,
0.022920457646250725,
0.7207291126251221,
-0.72732013463974,
0.8770376443862915,
-0.1... |
def procesar _ temp _ modis ( self ) : # # todo : pasar estas funciones a seattr como las de iv filtrado = self. _ filtro _ calidad _ temp _ modis ( self. mod11a2, " dia " ) self. modis _ temp _ dia = ( self. _ interpolar _ serie ( filtrado, u'lst _ day _ 1km') * 0. 02 ) - 273 filtrado = self. _ filtro _ calidad _ temp... | [
-1.5357762575149536,
-0.5533366203308105,
0.48770591616630554,
-0.4793011546134949,
0.41936933994293213,
-0.15858732163906097,
-0.37868762016296387,
-0.5155177712440491,
0.24178189039230347,
0.5344715714454651,
0.39736610651016235,
0.3189953565597534,
0.25389233231544495,
0.836745738983154... |
def test _ qlibrary _ instantiate _ n _ square _ spiral ( self ) : design = designs. designplanar ( ) try : nsquarespiral except exception : self. fail ( " nsquarespiral failed " ) try : nsquarespiral ( design, " my _ name " ) except exception : self. fail ( " nsquarespiral ( design, \ " my _ name \ " ) " ) try : nsqua... | [
0.21446311473846436,
-0.3626753091812134,
0.39140045642852783,
-0.43935033679008484,
-0.5564863085746765,
0.8701127171516418,
0.25029921531677246,
-0.8971045017242432,
0.9797081351280212,
-1.054113745689392,
-0.9541579484939575,
-0.18688607215881348,
-0.15809781849384308,
0.587369501590728... |
def cleantb ( tb ) : cleaned = [ ] for line in tb. split ('\ n') : if'file \ "'in line and'line'in line : lline =''. join ( line. partition ('\ "') [ : - 1 ] ) rline =''. join ( line. rpartition ('/') [ 1 : ] ) line =''. join ( ( lline, rline ) ) cleaned. append ( line ) return'\ n '. join ( cleaned ). replace ('\'','#... | [
1.0497037172317505,
-1.0774236917495728,
0.7918539047241211,
0.09482346475124359,
-0.5835002660751343,
0.19580304622650146,
0.1775532364845276,
0.2877800166606903,
-0.9058763980865479,
1.0312048196792603,
0.40799447894096375,
-0.41054171323776245,
0.08973941206932068,
0.8891589045524597,
... |
def test _ pool _ create _ permissions ( self ) : pool _ name = p _ n ( ) self. _ test _ permissions ( stratisdbus. pool _ create, [ pool _ name, stratiscertify. disks, none ], true ) | [
-0.08554662019014359,
1.1118282079696655,
0.27474457025527954,
0.6701489686965942,
1.2383270263671875,
1.1689976453781128,
0.7540302872657776,
-0.35695692896842957,
-0.25702106952667236,
-0.12910917401313782,
-0.24800488352775574,
0.12831608951091766,
-0.10710949450731277,
0.31541919708251... |
def _ _ init _ _ ( self, ntu _ limit = none, ntu = none ) : # noqa : e501 # noqa : e501 self. _ ntu _ limit = none self. _ ntu = none self. discriminator = none if ntu _ limit is not none : self. ntu _ limit = ntu _ limit if ntu is not none : self. ntu = ntu | [
0.1712091565132141,
0.43430885672569275,
0.43612557649612427,
-0.14482031762599945,
-0.03551648557186127,
-0.4110959768295288,
-0.46354013681411743,
0.7809380888938904,
0.6402073502540588,
-0.37922587990760803,
-0.8593873381614685,
0.8608724474906921,
0.19705940783023834,
-0.29051017761230... |
def get _ min _ max ( ints ) : if len ( ints ) = = 0 : return ( ) min = max = ints [ 0 ] for i in ints : if i < min : min = i if i > max : max = i return ( min, max ) | [
-1.7094786167144775,
-0.19063755869865417,
0.4468536674976349,
0.40395522117614746,
0.21788348257541656,
-0.7832861542701721,
-1.3502628803253174,
-0.319649875164032,
0.26973655819892883,
0.5485297441482544,
-1.105176568031311,
-0.2436247020959854,
-0.8496846556663513,
0.4155932366847992,
... |
def setup ( self ) : if self. _ trhph is none : # should not happen, but anyway just skip here : self. skiptest ( " environment variable uw _ trhph undefined " ) self. _ sim _ launcher = none if " simulator " = = self. _ trhph or " embsimulator " = = self. _ trhph : self. _ sim _ launcher = _ simulatorlauncher ( ) self... | [
0.48864954710006714,
0.11551148444414139,
0.518121063709259,
-0.013380216434597969,
0.36817923188209534,
-0.17815564572811127,
0.5207863450050354,
0.6245760917663574,
0.2400377243757248,
-0.16459038853645325,
-0.03723843768239021,
-0.5632544755935669,
0.19132742285728455,
0.779290080070495... |
def showname ( self ) : print " your name is ", self. name print " my name is ", self. _ _ class _ _. _ _ name _ _ | [
-0.09136702865362167,
-1.4545671939849854,
0.9940711259841919,
-0.03675774484872818,
-1.4625896215438843,
0.8812891244888306,
0.37475651502609253,
-0.3591592013835907,
0.21138350665569305,
0.323319673538208,
-0.7237202525138855,
1.4409868717193604,
0.7436563372612,
0.6542341709136963,
0.... |
def _ get _ serve _ tf _ examples _ fn ( model, tf _ transform _ output ) : model. tft _ layer = tf _ transform _ output. transform _ features _ layer ( ) @ tf. function def serve _ tf _ examples _ fn ( serialized _ tf _ examples ) : " " " returns the output to be used in the serving signature. " " " raw _ feature _ sp... | [
-0.1256340891122818,
-0.12468376755714417,
0.23817101120948792,
-0.7414541840553284,
-0.5330756902694702,
-0.771997332572937,
1.1098886728286743,
0.297183096408844,
-0.8835206627845764,
-0.04252268373966217,
-0.9047048091888428,
0.09881259500980377,
0.9726182222366333,
-0.4772898554801941,... |
def setupclass ( cls ) : super ( integrationtestcase, cls ). setupclass ( ) cls. correct _ input _ 2 _ rows _ output = match _ 2 _ inputs ( ) cls. correct _ input _ 2 _ rows _ whitespace _ output = match _ 2 _ inputs _ with _ whitespace ( ) cls. correct _ input _ 2 _ rows _ only _ 1 _ site _ output = match _ 2 _ inputs... | [
-0.2542535364627838,
0.10218988358974457,
0.763148307800293,
0.3064447045326233,
0.5987358093261719,
0.054299402981996536,
1.5796319246292114,
-0.47488194704055786,
0.31178784370422363,
-0.2318141758441925,
0.12479951232671738,
-0.9844040274620056,
0.3512829542160034,
0.6375265121459961,
... |
def get _ signatures _ to _ run ( self ) : ok _ tasks = self. get _ unlocked _ dependencies ( ) to _ run = [ ] for node _ id, node in self. nodes. items ( ) : if node _ id in self. running or node _ id in self. finished : continue if set ( node. dependencies ). issubset ( ok _ tasks ) : to _ run. append ( node ) self. ... | [
-1.0775465965270996,
-0.5688496828079224,
0.447548508644104,
-0.04295557364821434,
0.39695268869400024,
0.0910165086388588,
0.608929455280304,
0.2750703990459442,
-0.3801266849040985,
1.0473469495773315,
-0.46687281131744385,
0.3524107038974762,
-0.4588356912136078,
0.42753082513809204,
... |
def _ _ eq _ _ ( self, other ) : if isinstance ( other, credential ) : return self. _ id = = other. id return false | [
-0.10762737691402435,
-0.9327232837677002,
0.35845258831977844,
0.24702180922031403,
0.4217412769794464,
0.5574682950973511,
-0.05106848478317261,
-0.2229100614786148,
1.1338967084884644,
-0.22518524527549744,
-0.9820907115936279,
0.7460445761680603,
-0.43815797567367554,
-0.39376339316368... |
def comparemodels ( comparedresult, vcnnauc, type = " deepbind " ) : auc = { } aucaixs = { } better _ number = 0 # significantbetternum = 0 # bigaxis = [ ] # betternumber = 0 # worsekeylist = [ ] vcnnauclist = [ ] comparedresultlist = [ ] betternumkeys = [ ] for key in comparedresult. keys ( ) : if key in vcnnauc. keys... | [
-0.17139099538326263,
-0.22559401392936707,
0.7184348702430725,
0.10384964942932129,
0.15543435513973236,
-0.21961241960525513,
0.5754374861717224,
-0.3204677700996399,
-0.04283726215362549,
-0.07042158395051956,
-0.7020722031593323,
0.5288706421852112,
0.45826587080955505,
0.5442250370979... |
def test _ index _ references _ are _ valid ( repo ) : index = cim. index ( repo. cim _ type, repo. logical _ index _ store ) for key in index. lookup _ keys ( cim. key ('ns _') ) : if not key. is _ data _ reference : continue is _ found = false entry _ size = 0 page = repo. logical _ data _ store. get _ page ( key. da... | [
0.40309613943099976,
0.20940424501895905,
0.3622671961784363,
-0.5960896611213684,
0.9560783505439758,
0.362124502658844,
0.12599006295204163,
-0.12250304222106934,
0.3898564279079437,
0.017237942665815353,
-0.05115552619099617,
0.5605595111846924,
-0.5898732542991638,
0.2409948706626892,
... |
def addinedge ( self, i ) : self. inedges. append ( i ) | [
-0.7847037315368652,
0.09208473563194275,
0.7480016350746155,
0.0628126934170723,
-0.1764475703239441,
1.4102308750152588,
0.025445222854614258,
0.3765637278556824,
-0.0022977746557444334,
-0.526398777961731,
-0.9168375730514526,
-0.18079231679439545,
-1.742456316947937,
-0.326848357915878... |
def last ( self ) - > dataframe : return self. select _ all ( ). last ( ) | [
-0.027595020830631256,
0.303627610206604,
0.4238545298576355,
-0.014113047160208225,
0.4234578013420105,
-0.6522321701049805,
-0.592776358127594,
-0.3362232446670532,
-0.3178296387195587,
-0.7799577116966248,
0.813896894454956,
0.1170586422085762,
-0.553450882434845,
-1.382396936416626,
... |
def _ _ init _ _ ( self, package = { } ) : self. _ _ home _ path = os. environ. get ('home ','' ) self. _ _ package = package # { keyword : package } self. _ _ keyword = { key : pkg for pkg in package for key in package [ pkg ]. get ('_ _ keywords ', { } ) } self. _ _ keyword. update ( { pkg : pkg for pkg in package } ... | [
-0.1652989387512207,
-0.24388685822486877,
0.7891087532043457,
0.06493908911943436,
-0.6543663740158081,
-0.24381016194820404,
-0.8022688627243042,
0.38191553950309753,
0.45229750871658325,
-0.2540747821331024,
-0.18998733162879944,
-0.11499213427305222,
0.574740469455719,
1.38673043251037... |
def multiple _ births _ less _ than _ 5 ( self ) : status = true query ='select fam. chil, fam. fam from fam where fam. chil! = " na "'siblings = self. tool. query _ info ( query ) for sibling in siblings : sib = sibling [ 0 ]. split ( ) if len ( sib ) > 5 : counter = 0 for i in range ( len ( sib ) - 1 ) : prev = self.... | [
-0.03537449613213539,
0.4858046770095825,
0.6669096350669861,
0.38963472843170166,
-0.8564138412475586,
0.30867716670036316,
1.1993677616119385,
-0.6782799959182739,
-0.5158974528312683,
-0.22735144197940826,
-1.1339296102523804,
-0.331682026386261,
-0.6272106170654297,
1.2216473817825317,... |
def gf _ add _ const ( f, a, p ) : if not f : a = a % p else : a = ( f [ - 1 ] + a ) % p if len ( f ) > 1 : return f [ : - 1 ] + [ a ] if not a : return [ ] else : return [ a ] | [
0.15047961473464966,
0.17423641681671143,
0.6043987274169922,
0.5296573638916016,
0.9169042110443115,
0.8313400149345398,
-0.6422620415687561,
0.8392395377159119,
0.17103296518325806,
0.7884700298309326,
0.7953265309333801,
0.13850228488445282,
-0.9043543338775635,
-0.2510487139225006,
0... |
def test _ passes _ gene _ inheritance _ x _ linked ( self ) : gene = " test " inh = " x - linked dominant " cnv = self. create _ variant ( " female " ) # check that a cnv with mismatched chrom fails cnv. child. genotype = " dup " cnv. child. info [ " cns " ] = " 3 " self. inh. known _ gene [ " inh " ] [ inh ] = { " in... | [
0.5024827718734741,
-0.07299912720918655,
0.6770266890525818,
0.8794164657592773,
0.3322966694831848,
1.412681221961975,
-0.49254608154296875,
0.004503537900745869,
-0.17649929225444794,
-0.5863828659057617,
-1.3920470476150513,
0.7385696172714233,
0.02405437082052231,
-0.10414360463619232... |
def predict ( self, input _ data ) : return self. model ( self. reshape ( input _ data ) ) | [
-0.21937553584575653,
-0.4769544005393982,
0.06893686950206757,
-0.03555416315793991,
-0.2541353106498718,
0.25988003611564636,
-0.9194573760032654,
0.25832414627075195,
-0.22877487540245056,
-0.7172960042953491,
-0.08572765439748764,
-0.2941811680793762,
-0.28850728273391724,
-0.761377930... |
def tr ( self, message ) : # noinspection pytypechecker, pyargumentlist, pycallbyclass return qcoreapplication. translate ('uldkgugik ', message ) | [
0.4302934408187866,
1.1547099351882935,
0.1728740930557251,
-1.2315864562988281,
0.34277182817459106,
-0.45816364884376526,
0.008626949973404408,
-0.45537257194519043,
0.03698629513382912,
0.4837168753147125,
0.24740265309810638,
-0.28666436672210693,
-0.5815332531929016,
-0.34893858432769... |
def find _ polygon _ intersections ( line _ poly1, line _ poly2 ) : intersecting _ polygon = [ ] for i in line _ poly1 : for j in line _ poly2 : line1 = i [ 2 ] line2 = j [ 2 ] intersection = intersection _ of _ lines ( line1, line2 ) if intersection = = " no point " : pass elif intersection = = " same " : intersecting... | [
0.34708234667778015,
-1.0497616529464722,
0.7135321497917175,
0.7403767108917236,
0.5185135006904602,
0.48261377215385437,
-0.905407190322876,
-0.27833935618400574,
-0.7017959356307983,
0.6024410128593445,
-0.3785669803619385,
-0.1015145406126976,
-0.4130367338657379,
-0.4334960877895355,
... |
def _ _ repr _ _ ( self ) : return'< user ( { username! r } ) > '. format ( username = self. username ) | [
-0.42011308670043945,
-0.9205683469772339,
0.09436029940843582,
-0.4422059953212738,
-0.6254628896713257,
0.7251698970794678,
0.3984017074108124,
0.2610589265823364,
0.7053221464157104,
-0.6860549449920654,
-0.2636454999446869,
0.5975572466850281,
0.2296379953622818,
-0.4906589686870575,
... |
def _ _ init _ _ ( self, id = none, transaction _ id = none, transaction _ location _ id = none, amount _ money = none, created _ at = none, refunds = none ) : self. swagger _ types = {'id':'str ','transaction _ id':'str ','transaction _ location _ id':'str ','amount _ money':'money ','created _ at':'str ','refunds':'l... | [
1.2094504833221436,
-0.6175417304039001,
0.6651779413223267,
-1.17948317527771,
-0.2695857882499695,
-0.88889080286026,
-0.2827259302139282,
0.6194779872894287,
1.0554299354553223,
0.30397868156433105,
-0.34914207458496094,
-0.12860487401485443,
0.44408348202705383,
-0.2199021428823471,
... |
def english _ to _ nepali ( number : any ) - > str : number = str ( number ) converted _ number = [ ] for n in number : num = ord ( n ) - ord ( " 0 " ) if num in range ( 0, 10 ) : converted _ number. append ( np _ numbers [ num ] ) else : converted _ number. append ( n ) return " ". join ( converted _ number ) | [
-1.117672324180603,
-0.36495742201805115,
0.7954938411712646,
-0.41258057951927185,
0.3891211152076721,
0.020214717835187912,
-0.6069745421409607,
0.19218334555625916,
0.9009007215499878,
1.1702611446380615,
-0.05322913080453873,
-0.3251897990703583,
0.5125330686569214,
-0.0308303199708461... |
def bgr2rgb ( im : np. ndarray ) - > np. ndarray : return cv. cvtcolor ( im, cv. color _ bgr2rgb ) | [
0.34182876348495483,
-0.39238232374191284,
0.5752777457237244,
0.907391369342804,
1.0414353609085083,
0.11745690554380417,
0.0799141377210617,
-0.3362847566604614,
-0.002560252323746681,
1.7427783012390137,
0.5054308772087097,
0.8799439072608948,
-0.441615492105484,
0.679568886756897,
0.... |
def get ( id _ ) : with database _ session ( ) as sess : return sess. query ( database. asset ). filter ( database. asset. category _ id = = id _ ). count ( ) | [
-0.28037229180336,
0.26618701219558716,
0.34614473581314087,
-1.2234669923782349,
0.15138986706733704,
-0.6681633591651917,
-0.248000830411911,
-0.4947175979614258,
-0.6647790670394897,
-0.38913992047309875,
0.07510599493980408,
0.17886829376220703,
1.007790446281433,
0.0828637108206749,
... |
def save _ users _ list ( client, file _ name _ prefix = " " ) : team _ info = get _ team _ info ( client ) team _ domain = team _ info [ " domain " ] os. makedirs ( team _ domain, exist _ ok = true ) file _ name = " users _ list. json " file _ path = os. path. join ( team _ domain, file _ name ) with open ( file _ pat... | [
-0.5167202353477478,
-0.3048776090145111,
0.6786776185035706,
-0.5776128172874451,
0.7268807888031006,
0.5634509325027466,
0.2598843276500702,
0.001151137868873775,
-0.5359735488891602,
0.38528093695640564,
-1.2906136512756348,
0.8613245487213135,
0.5305234789848328,
0.05339254438877106,
... |
def execute ( self, layer _ dict : dict ) : keys _ size = len ( layer _ dict. keys ( ) ) for i in range ( len ( layer _ dict [ 0 ] ) ) : layer _ dict [ 0 ] [ i ] [ " server _ ip _ port " ] = [ ] for i in range ( 1, keys _ size ) : for j in range ( len ( layer _ dict [ i ] ) ) : layer _ dict [ i ] [ j ] [ " server _ ip ... | [
-0.8729041814804077,
0.18186451494693756,
0.6366122961044312,
-1.043422818183899,
0.3928382992744446,
0.37728577852249146,
0.6452438831329346,
0.39932891726493835,
-0.7788611054420471,
1.2998716831207275,
-0.3383064568042755,
-0.2495679408311844,
-0.17518775165081024,
0.4989616274833679,
... |
def refresh _ metadata ( self, identifier _ type, identifier, provider = none ) : work = self. load _ work ( flask. request. library, identifier _ type, identifier ) if isinstance ( work, problemdetail ) : return work if not provider and work. license _ pools : provider = metadatawranglercollectionregistrar ( work. lic... | [
-0.7355146408081055,
-0.3313952386379242,
0.525641143321991,
0.10879721492528915,
-0.011588175781071186,
-0.2357572615146637,
-0.19927668571472168,
-0.22854354977607727,
0.7828495502471924,
0.8039096593856812,
-0.22097823023796082,
0.299803227186203,
-0.24200153350830078,
0.036640662699937... |
def savecellfeatureevolution ( self, feature _ names ) - > list : for c _ idx, root _ cell in enumerate ( self. rootcells ( ) ) : track = self. tracking. trackcontainingcell ( root _ cell ) if track is not none : cell _ features = { } # empty dictionary to save the cell features # create an empty list for each feature ... | [
-0.10811950266361237,
0.39142706990242004,
0.7014576196670532,
1.1771854162216187,
0.7206409573554993,
-0.6981413960456848,
-0.2687816619873047,
0.26943835616111755,
-0.8372337222099304,
0.13473747670650482,
-1.3703800439834595,
-1.0421825647354126,
0.5311558246612549,
0.9980957508087158,
... |
def _ _ init _ _ ( self, params ) : self. block _ sizes = params. resnet _ block _ sizes self. block _ strides = params. resnet _ block _ strides self. data _ format = params. data _ format self. dtype = params. dtype self. first _ pool _ size = params. resnet _ first _ pool _ size self. first _ pool _ stride = params.... | [
0.20914480090141296,
0.07988863438367844,
0.6610029935836792,
0.05751532316207886,
0.4415392279624939,
-0.6521841883659363,
0.0087204584851861,
-0.19523413479328156,
0.05845173820853233,
0.14857976138591766,
-0.3302609920501709,
0.36048227548599243,
0.5488961935043335,
0.7147583961486816,
... |
def _ is _ comparable _ dtype ( self, dtype : dtypeobj ) - > bool : return self. dtype = = dtype | [
-0.42971208691596985,
0.23531128466129303,
0.3548303544521332,
0.006418474018573761,
-0.5048757791519165,
-0.38943782448768616,
-0.21584028005599976,
-1.161295771598816,
0.9175797700881958,
0.9420259594917297,
-0.98603355884552,
0.39895808696746826,
-0.14512020349502563,
0.3322138488292694... |
def get _ attribute ( self, attribute : str ) - >'node': matches = [ value _ node for key _ node, value _ node in self. yaml _ node. value if key _ node. value = = attribute ] if len ( matches )! = 1 : raise seasoningerror ('attribute not found, or found multiple times : { } '. format ( matches ) ) return node ( matche... | [
-0.4420119524002075,
0.051458295434713364,
0.35127419233322144,
-0.12252666801214218,
0.22019509971141815,
-0.9314566850662231,
0.43700480461120605,
0.03438186272978783,
0.3718211054801941,
0.43187981843948364,
0.8997141122817993,
1.4355628490447998,
0.7811000943183899,
-0.1045770868659019... |
def orderedorbit ( self, dart, list _ of _ alpha _ value ) : orbit = [ ] current _ dart = dart current _ alpha _ index = 0 n _ alpha = len ( list _ of _ alpha _ value ) while ( current _ dart! = dart ) or orbit = = [ ] : orbit. append ( current _ dart ) current _ alpha = list _ of _ alpha _ value [ current _ alpha _ in... | [
-1.2937185764312744,
0.02737341821193695,
0.7960692048072815,
-0.004126794636249542,
-0.06571035832166672,
0.3398382365703583,
-0.290242463350296,
-0.0000975336879491806,
0.3007163405418396,
0.2434578239917755,
-0.021374300122261047,
-0.5763534307479858,
0.061167579144239426,
0.99957150220... |
def get _ game _ history ( self, request ) : game = get _ by _ urlsafe ( request. urlsafe _ game _ key, game ) if not game : raise endpoints. notfoundexception ('game not found') return stringmessage ( message = str ( game. history ) ) | [
-0.12633490562438965,
0.6570934653282166,
0.5056209564208984,
-0.09483952075242996,
0.25233161449432373,
-0.12900084257125854,
-0.6780458092689514,
-1.242535948753357,
-0.4992867708206177,
1.0103884935379028,
0.8866761326789856,
1.143032431602478,
0.07459816336631775,
-0.12183263897895813,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.