text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def getsubkeybyindex ( self, index ) : if not self. _ registry _ key and self. _ registry : self. _ getkeyfromregistry ( ) subkeys = list ( self. _ subkeys. values ( ) ) if index < 0 or index > = len ( subkeys ) : raise indexerror ('index out of bounds.') return subkeys [ index ] | [
-0.33982980251312256,
0.8474209904670715,
0.23593170940876007,
0.041464827954769135,
0.22079889476299286,
0.2909468412399292,
0.7841545939445496,
-1.2950698137283325,
0.10492366552352905,
0.087297722697258,
-0.5927903652191162,
1.5526123046875,
-0.6745303869247437,
-0.824682354927063,
0.... |
def _ _ len _ _ ( self ) : return self. _ size | [
-0.12691649794578552,
-0.6661685109138489,
0.29100316762924194,
-1.798009991645813,
0.436826229095459,
0.18146581947803497,
0.6518471837043762,
0.16756293177604675,
0.8039458990097046,
-1.0270609855651855,
-1.0933301448822021,
-0.3838566839694977,
0.6342904567718506,
-0.5727577805519104,
... |
def readlines ( self, hint = - 1 ) : return [ ] | [
-0.028099529445171356,
-0.2731665074825287,
0.6861666440963745,
1.057120442390442,
0.3530575633049011,
0.8729924559593201,
-0.8396896123886108,
-0.3271065950393677,
0.07304561883211136,
-0.2924959063529968,
0.42493927478790283,
-0.11018100380897522,
-0.6750681400299072,
-0.0154583370313048... |
def _ clean _ tweets ( self, text ) : rt _ users _ punc = re. compile ( r'@ \ w + | \ w | rt') tokenizer = tweettokenizer ( ) tokens = tokenizer. tokenize ( text ) tweet = [ token for token in tokens if not rt _ users _ punc. search ( token ) ] tweet = [ word for word in tweet if word not in stopwords. words ('english'... | [
-0.7282620668411255,
-0.8705989718437195,
0.41572245955467224,
-0.6479687094688416,
-0.8362541198730469,
0.6926025152206421,
-0.24521131813526154,
0.3779110610485077,
-0.4514276087284088,
0.7246589660644531,
-0.1680489182472229,
-0.34879347681999207,
-0.4359425902366638,
0.7290487289428711... |
def prep _ wallet ( self ) : wallet _ str = " wallet : $ " + str ( self. stats. player _ wallet ) self. wallet _ image = self. font. render ( wallet _ str, true, self. text _ color, self. settings. bg _ color ) # display the wallet at the bottom left of the screen self. wallet _ rect = self. wallet _ image. get _ rect ... | [
-0.1140870526432991,
0.055748261511325836,
0.5307204723358154,
-1.32886803150177,
0.10851549357175827,
-0.34441420435905457,
-0.8493016958236694,
0.06324397772550583,
0.5795210599899292,
0.7079330086708069,
0.39639198780059814,
0.2752542793750763,
0.395076721906662,
0.8580108284950256,
0... |
def messages ( self, * * msg _ filter ) : text = msg _ filter. get ( " text ", none ) t = msg _ filter. get ( " t ", none ) partial = msg _ filter. get ( " partial ", false ) inverse = msg _ filter. get ( " inverse ", false ) index = msg _ filter. get ( " index ", none ) types = t if isinstance ( t, ( tuple, list, set,... | [
-0.5162856578826904,
0.3325699269771576,
0.8363170027732849,
0.07022424042224884,
0.11721546947956085,
-0.28407666087150574,
0.7458891272544861,
-0.9140483140945435,
-0.6844721436500549,
-0.0652720183134079,
0.4243663549423218,
0.19767683744430542,
-0.011345543898642063,
-0.265583753585815... |
def db _ url _ for ( * args, * * kwargs ) : return flask. url _ for ( * args, db _ name = flask. g. db _ name, * * kwargs ) | [
0.0324321873486042,
0.576148271560669,
0.5540122985839844,
0.0061073582619428635,
0.7267895936965942,
0.24877378344535828,
-0.8518612384796143,
-0.016582904383540154,
-1.6136423349380493,
-0.45220208168029785,
0.3609532117843628,
0.4355640709400177,
0.4233643710613251,
0.6098100543022156,
... |
def _ get _ aggregate _ kwargs ( local _ explanation = none, include _ local = true, features = none, explanation _ id = none, * * kwargs ) : if local _ explanation is not none : exp _ id = local _ explanation. id else : exp _ id = explanation _ id or str ( uuid. uuid4 ( ) ) features = local _ explanation. features kwa... | [
-0.006926275324076414,
0.6335461139678955,
0.8415934443473816,
-0.5042051076889038,
-0.05161500722169876,
-0.025652937591075897,
0.6145850419998169,
1.3138699531555176,
-0.19310496747493744,
0.810985267162323,
0.06795624643564224,
0.8944330811500549,
0.3555759787559509,
1.2190337181091309,... |
def get _ logged _ in _ passwd ( self ) : if not self. connected : raise exception ( " not connected " ) if not self. logged _ in : self. close ( ) raise exception ( " password requested while not logged in " ) return self. logged _ in _ password [ : - self. logged _ in _ password [ - 1 ] ] | [
-0.9213201999664307,
-0.7828658223152161,
1.0233128070831299,
0.9996185302734375,
0.021345721557736397,
0.6097854375839233,
0.5312746167182922,
-0.64597088098526,
-0.05299259349703789,
-0.23842376470565796,
0.9827577471733093,
0.687082827091217,
-1.4145499467849731,
-0.7637676000595093,
... |
def splitcolumn ( dataframe, targetcolumn, axis = 1 ) : return [ dataframe. drop ( targetcolumn, axis = axis ), dataframe [ targetcolumn ] ] | [
-1.4723563194274902,
-0.618327260017395,
0.6357309818267822,
-0.14326827228069305,
0.7776312828063965,
-0.5349596738815308,
0.549866259098053,
0.7147754430770874,
-0.19515223801136017,
0.6503928899765015,
-0.769644021987915,
1.3467696905136108,
0.8501145839691162,
-1.5433348417282104,
1.... |
def vibrational _ analysis ( x0, hess, masses, zero _ threshold = 1. 0e - 9, is _ molecule = false ) : # convert hessian to mass - weighted coordinates hess _ mwc = hess / np. sqrt ( np. outer ( masses, masses ) ) print " hessian for mass weighted cartesian coordinates " print " = = = = = = = = = = = = = = = = = = = = ... | [
1.0625717639923096,
-0.4679209291934967,
0.9289451837539673,
-0.008646564558148384,
-0.09005607664585114,
-0.2968001961708069,
0.12523239850997925,
0.08794591575860977,
-0.42075613141059875,
0.10684700310230255,
1.1780898571014404,
-0.07651600241661072,
-0.07074813544750214,
0.592288136482... |
def resolve ( self, name, found = none ) : resolved = self. dependencies. get ( name, none ) if resolved is not none : return resolved if name not in self. names : msg = " no dependencies found for % s " % name if found : msg + = " while resolving % s " % found raise exception, msg dependencies = self. names. get ( nam... | [
-0.49518105387687683,
-0.6121885776519775,
0.9388452768325806,
-0.4794517755508423,
-0.22743776440620422,
-0.813654363155365,
0.12196837365627289,
-0.0786360576748848,
0.14483711123466492,
-0.3522675633430481,
-0.9062708616256714,
-0.5126136541366577,
-0.5482406616210938,
0.604655146598815... |
async def _ fetch ( self, url : str ) - > str : if not self. _ connected : raise ioerror ( " client is not connected. please call connect ( ) " " method first. " ) if self. respect _ robots : if not self. _ can _ fetch ( url ) : # type : ignore raise connectionrefusederror ( " disallowed by robots. txt. attempted url -... | [
-0.15442907810211182,
0.24290132522583008,
0.35950782895088196,
-0.27667370438575745,
-0.7785604596138,
-0.22451353073120117,
-0.5809258818626404,
-0.8053334951400757,
-0.09167157858610153,
0.17697720229625702,
0.5301385521888733,
-0.37985119223594666,
-0.04270026832818985,
-0.307231128215... |
def cut _ mesh ( self, tvert _ targets ) : # fixme! this dec mesh cutting algorithm isn't done completely. it is hacked to give the correct results # to calculate the cells. lapgj and cells. lapgjinv operators. it needs to be reworked once dec is fully # integrated. the problem is that currently betse cutting events ma... | [
0.6005756258964539,
-0.5105912685394287,
0.4703075587749481,
0.08708734065294266,
-0.08626493811607361,
0.03912078216671944,
1.0049340724945068,
0.21737289428710938,
-0.01932280696928501,
0.2502824664115906,
0.5985546708106995,
0.1427818089723587,
-0.43879789113998413,
-0.06714523583650589... |
def _ publish _ effort ( self, dt ) : # call student pid code to calculate new effort self. _ effort = self. _ pid ( self. _ setpoint, self. _ position, self. _ velocity, dt. to _ sec ( ) ) # publish to crustcrawer self. _ out _ eff. publish ( self. _ effort ) | [
0.16478416323661804,
-0.16294190287590027,
0.2355484664440155,
-0.4628830850124359,
0.2052449733018875,
0.2558145225048065,
0.2662754952907562,
-0.2590342164039612,
-0.8149024844169617,
0.41329818964004517,
-0.5534113645553589,
0.2214728593826294,
-0.3854256272315979,
1.2375091314315796,
... |
def _ getcurrentmilestone ( content, regex ) : return int ( _ findmatch ( content, regex, 1 ) ) | [
-0.4954923391342163,
-1.0405651330947876,
0.3123246133327484,
-0.6983256340026855,
-0.2673487663269043,
-1.289918303489685,
0.517158031463623,
0.16041557490825653,
-0.14637824892997742,
0.3109838664531708,
0.7744253873825073,
0.09013701975345612,
-1.9523694515228271,
-0.6328978538513184,
... |
def setaccounts ( self, accountviews ) : raise notimplementederror | [
-0.7233863472938538,
-0.09329145401716232,
0.3495563566684723,
1.1001255512237549,
-0.2827683687210083,
0.11941646784543991,
1.063252568244934,
-0.16117271780967712,
1.1217432022094727,
-0.8386180400848389,
0.7253639101982117,
0.22898830473423004,
0.7572087645530701,
0.2798079550266266,
... |
def test _ list _ type ( ) : test _ obj = uvtest ( ) test _ obj. intlist = [ " s " + str ( i ) for i in np. arange ( test _ obj. int1 ) ] pytest. raises ( valueerror, test _ obj. check ) test _ obj. intlist = list ( np. arange ( test _ obj. int1 ) ) test _ obj. intlist [ 1 ] = " test " pytest. raises ( valueerror, test... | [
-0.4942704439163208,
-0.19678054749965668,
0.2957860231399536,
0.35592034459114075,
0.4190274178981781,
0.4549616873264313,
-0.36938849091529846,
0.11879194527864456,
1.2252460718154907,
0.7916774749755859,
-0.9327638149261475,
0.380732923746109,
-0.5128961205482483,
0.694144070148468,
0... |
def multi _ format ( s, * params ) : return s % tuple ( chain ( * params ) ) | [
-0.4732759892940521,
-0.3733850121498108,
0.36133038997650146,
0.6606662273406982,
0.07537674158811569,
-1.0140299797058105,
-1.1672911643981934,
-0.1897381842136383,
-0.1050424873828888,
-0.0706520676612854,
0.6255881190299988,
-0.709071934223175,
-0.04537542164325714,
0.5493781566619873,... |
def multi _ dim _ meshgrid ( * arrs ) : arrs = tuple ( reversed ( arrs ) ) lens = map ( len, arrs ) dim = len ( arrs ) sz = 1 for s in lens : sz * = s ans = [ ] for i, arr in enumerate ( arrs ) : slc = [ 1 ] * dim slc [ i ] = lens [ i ] arr2 = np. asarray ( arr ). reshape ( slc ) for j, sz in enumerate ( lens ) : if j!... | [
-0.10466918349266052,
0.11445162445306778,
0.9927235841751099,
1.1508232355117798,
0.1615392118692398,
0.07749813795089722,
0.33351224660873413,
0.5095686316490173,
0.5659775733947754,
0.7270536422729492,
-0.47679802775382996,
0.024566566571593285,
-0.2564462721347809,
0.6845150589942932,
... |
def set _ shape ( self, shape : list [ int ] ) - > none : | [
-0.9456002116203308,
0.4787704646587372,
-0.0050238873809576035,
0.8386608958244324,
1.2621846199035645,
0.6474772095680237,
0.17049361765384674,
0.5861538052558899,
-0.13975320756435394,
-0.19427461922168732,
-1.6897016763687134,
0.36848342418670654,
0.4069351851940155,
0.9333489537239075... |
def check _ config _ permission ( self, key ) : if key. startswith ( " logo " ) or key. startswith ( " font " ) : if self. can _ manage _ logos _ and _ fonts is none : self. can _ manage _ logos _ and _ fonts = has _ perm ( self. request. user, " core. can _ manage _ logos _ and _ fonts " ) return self. can _ manage _ ... | [
-1.423770546913147,
0.5933259725570679,
0.7408390641212463,
0.023647643625736237,
-1.1406278610229492,
-0.16581235826015472,
0.4629732072353363,
-0.5361903309822083,
0.20713403820991516,
0.5256943106651306,
0.14386500418186188,
0.42726102471351624,
-0.8117966055870056,
1.4156070947647095,
... |
def manage _ seats _ in _ area ( slug ) : if not _ is _ seat _ management _ enabled ( ) : flash _ error ( gettext ('seat reservations cannot be changed at this time.') ) return redirect _ to ( '. view _ area ', slug = slug ) area = seating _ area _ service. find _ area _ for _ party _ by _ slug ( g. party _ id, slug ) ... | [
-0.4780188798904419,
-0.5548197627067566,
0.9273229241371155,
-0.8673596978187561,
-0.6173216700553894,
-0.6238067746162415,
-0.09292185306549072,
0.13974350690841675,
0.38390329480171204,
-0.0808432325720787,
0.388110876083374,
0.4057553708553314,
-0.037107281386852264,
1.3880386352539062... |
def transact ( self, transaction ) : if self. asset! = transaction. asset : raise valueerror ('failed to update position with asset % s when'' carrying out transaction in asset % s.'% ( self. asset, transaction. asset ) ) # nothing to do if the transaction has no quantity if int ( floor ( transaction. quantity ) ) = = ... | [
-0.14372357726097107,
-0.41345420479774475,
0.4724671542644501,
-0.39562082290649414,
0.48113036155700684,
0.20844699442386627,
0.432595431804657,
-0.8872886300086975,
-0.24027730524539948,
0.17056474089622498,
0.015000486746430397,
-0.3640173077583313,
0.09343712031841278,
-0.480291366577... |
def test _ neg _ metagraph _ simple _ add _ remove ( ) : from wbia. algo. graph import demo from wbia. algo. graph. state import incmp, negtv, postv, unkwn, unrev # noqa # create a graph with 5 - sized ccs, with 3 - pos - redun, and no negative edges infr = demo. demodata _ infr ( num _ pccs = 2, pcc _ size = 5, pos _ ... | [
-0.09121373295783997,
0.42923998832702637,
0.9320669174194336,
0.015585031360387802,
0.014034590683877468,
0.2679193913936615,
0.02950422652065754,
-0.1865176558494568,
0.4354459345340729,
0.15751764178276062,
-0.29252979159355164,
0.07147978246212006,
-0.7852844595909119,
0.04075411707162... |
def select _ vhost ( domain : str, vhosts : sequence [ virtualhost ] ) - > optional [ virtualhost ] : if not vhosts : return none code, tag = _ vhost _ menu ( domain, vhosts ) if code = = display _ util. ok : return vhosts [ tag ] return none | [
0.3605494201183319,
0.15668058395385742,
0.12398437410593033,
0.8322324156761169,
-0.47692376375198364,
-0.3587179183959961,
-0.2843029201030731,
-1.1290955543518066,
0.6578837037086487,
0.733528733253479,
0.489194393157959,
0.8889769315719604,
-0.550592839717865,
-0.7392522096633911,
-0... |
def _ _ init _ _ ( self, data ) : self. _ distances = { } # precompute distance between location to have distance callback in o ( 1 ) for from _ node in xrange ( data. num _ locations ) : self. _ distances [ from _ node ] = { } for to _ node in xrange ( data. num _ locations ) : if from _ node = = to _ node : self. _ d... | [
-0.42126286029815674,
0.05029480159282684,
0.530002772808075,
-0.6215019822120667,
-0.10197160392999649,
-0.21044111251831055,
0.30214449763298035,
1.002419352531433,
-0.23006580770015717,
0.2980458438396454,
-0.17777718603610992,
-0.5574929118156433,
0.5467188358306885,
0.3699301183223724... |
def _ load _ sequence ( self, filename ) : assert ( os. path. exists ( filename ) ) left _ files, right _ files, gt _ files, _ = read _ list _ file ( filename ) self. _ task _ dictionary [ filename ] = {'left': left _ files,'right': right _ files,'gt': gt _ files,'num _ frames': len ( left _ files ) } | [
-1.1588658094406128,
0.1832941621541977,
0.5554803013801575,
-0.737735390663147,
-0.08442485332489014,
-0.2730969786643982,
0.7093609571456909,
0.6734591722488403,
-1.0613576173782349,
0.8156041502952576,
-1.8212003707885742,
-0.9869652390480042,
-0.09348735958337784,
0.8311542868614197,
... |
def setup ( ns ) : if not os. path. exists ( ns. build _ dir ) : os. mkdir ( ns. build _ dir ) if not os. path. isfile ( ns. dbtypes _ json ) : try : instdir = safe _ output ( ['cyclus ','- - install - path'] ) except ( subprocess. calledprocesserror, oserror ) : # fallback for conda version of cyclus instdir = safe _ ... | [
0.07336831837892532,
-0.09123494476079941,
0.8427808284759521,
-0.5670570135116577,
1.0937401056289673,
-0.6613497138023376,
0.6282360553741455,
-0.5216516852378845,
-0.5587716102600098,
0.314093679189682,
-0.8286181092262268,
0.8854356408119202,
-0.2920130789279938,
0.7983267903327942,
... |
def sanitize ( text : str ) - > str : for forbidden in forbidden : text = text. replace ( forbidden, delim _ replacement ) return text | [
0.6488587260246277,
0.3579829931259155,
0.423855185508728,
0.21102187037467957,
-1.0769766569137573,
0.16312500834465027,
-1.2096538543701172,
0.5707990527153015,
-0.05846455320715904,
0.40814676880836487,
-0.38872140645980835,
0.43142518401145935,
-1.166020393371582,
-0.5848212242126465,
... |
def write _ pid ( ) : fh = open ( ". / signal _ reciever. pid ", " w " ) fh. write ( os. getpid ( ) ) fh. close ( ) | [
0.5287896990776062,
-1.70159912109375,
0.40439000725746155,
-0.612678050994873,
1.1980352401733398,
1.5335720777511597,
0.7479711174964905,
0.7263669967651367,
-0.5303841233253479,
-0.32194799184799194,
-0.7090646624565125,
0.034826669842004776,
-0.7086173892021179,
-0.003683917224407196,
... |
def rotxyz _ to ( self, ang _ x, ang _ y, ang _ z ) : qx = ar ( ang _ x, v ( 1, 0, 0 ) ) qy = ar ( ang _ y, v ( 0, 1, 0 ) ) qz = ar ( ang _ z, v ( 0, 0, 1 ) ) self. rot = qx * qy * qz | [
0.004106489010155201,
-0.2899617850780487,
0.28090742230415344,
-1.5649139881134033,
0.9467020630836487,
-0.12259326130151749,
-0.5678176283836365,
-0.5582325458526611,
0.28437182307243347,
-0.024732692167162895,
-0.39675694704055786,
0.23528064787387848,
-0.26299989223480225,
-1.514450073... |
def _ _ init _ _ ( self, *, credentials : ga _ credentials. credentials = none, transport : union [ str, smartdevicemanagementservicetransport ] = " grpc _ asyncio ", client _ options : clientoptions = none, client _ info : gapic _ v1. client _ info. clientinfo = default _ client _ info, ) - > none : self. _ client = s... | [
-0.27312347292900085,
0.7820335030555725,
0.658546507358551,
-0.051474858075380325,
0.3295525908470154,
-0.0782632902264595,
0.579819917678833,
-0.4542587995529175,
0.2259555160999298,
-0.58267742395401,
0.10526495426893234,
0.6313694715499878,
0.32993999123573303,
-0.3308355510234833,
0... |
def _ _ init _ _ ( self, reparam _ strs, config ) : super ( sequentialreparameterizer, self ). _ _ init _ _ ( ) self. config = config self. reparam _ strs = reparam _ strs self. reparameterizers = nn. modulelist ( self. _ generate _ reparameterizers ( ) ) print ('\ nreparameterizers : { } \ n '. format ( self. reparame... | [
-0.5563122034072876,
0.3968592584133148,
0.4865776598453522,
-0.1773153841495514,
-0.06700055301189423,
-0.682236909866333,
0.6269941926002502,
0.861108660697937,
-0.5231767892837524,
0.31138908863067627,
-0.8420901298522949,
0.44655442237854004,
-0.5204172730445862,
0.5285238027572632,
... |
def add _ user _ value ( self, tree ) : count = tree [ " value _ size " ] self. stats [ " user _ value " ] + = count self. stats [ " nvme _ total " ] + = tree [ " nvme _ size " ] self. stats [ " total " ] + = count | [
-0.35941335558891296,
0.4502652585506439,
0.5489289164543152,
0.19134296476840973,
0.028511429205536842,
0.368459552526474,
0.2548157274723053,
-0.6612895727157593,
0.029874689877033234,
-0.0649685487151146,
-0.40949541330337524,
0.12489315867424011,
0.9164406061172485,
0.8564873933792114,... |
def test _ to _ graph _ should _ return _ rule _ as _ blank _ node ( mocker : mockfixture, ) - > none : mocker. patch ( " skolemizer. skolemizer. add _ skolemization ", return _ value = skolemization, ) rule = rule ( ) rule. dct _ identifier = " https : / / unique. uri. com " src = " " " @ prefix dct : < http : / / pur... | [
0.2485910803079605,
0.9165661931037903,
0.528793215751648,
-0.93210369348526,
0.8801636695861816,
0.30443376302719116,
0.08193647861480713,
-0.06290378421545029,
0.5637125968933105,
0.6694976091384888,
-0.7307248115539551,
0.7359547019004822,
0.08447466790676117,
-0.9666479825973511,
0.1... |
def name ( self ) - > optional [ str ] : return pulumi. get ( self, " name " ) | [
0.708804190158844,
0.025982527062296867,
0.5403648018836975,
0.2303352653980255,
0.6643672585487366,
0.5812855362892151,
-0.47309574484825134,
-0.568777859210968,
0.5209044218063354,
0.8991580605506897,
0.17030048370361328,
0.34480470418930054,
0.44290417432785034,
-0.9013630747795105,
-... |
def nut _ directory ( ) : nuts = produce. query. filter _ by ( prod _ type = 5 ). all ( ) return render _ template ('/ nuts. html ', nuts = nuts ) | [
-0.1711142212152481,
0.7074589133262634,
0.3181327283382416,
-0.24680839478969574,
-0.07478710263967514,
-0.01675262860953808,
0.329654335975647,
-0.41250115633010864,
0.6014739871025085,
-0.20385290682315826,
0.30496731400489807,
1.0385457277297974,
0.31939697265625,
0.2899399995803833,
... |
def rate _ of _ pay ( self ) : if self. hours : return decimal ( round ( self. gross _ pay / self. hours, 2 ) ) return decimal ( 0 ) | [
0.8424399495124817,
0.18497627973556519,
0.31750306487083435,
-0.30251288414001465,
0.6554130911827087,
-0.016774693503975868,
-1.520555853843689,
-0.9520782828330994,
-0.2102193832397461,
-0.18286240100860596,
1.8177093267440796,
-1.0077582597732544,
-0.7194523215293884,
0.696693599224090... |
def getacquiredfloatdata ( shape ) : arr = ( ctypes. c _ float * shape [ 0 ] * shape [ 1 ] ) ( ) size = ctypes. c _ ulong ( shape [ 0 ] * shape [ 1 ] ) pass | [
0.49964800477027893,
-0.05472130700945854,
0.4615209996700287,
-0.3004286289215088,
0.5402363538742065,
-0.4097995460033417,
0.38278728723526,
-0.511951208114624,
-0.5995332598686218,
-0.6739756464958191,
-0.8216599225997925,
1.065034031867981,
0.40225541591644287,
0.726973831653595,
1.0... |
def testupdatevaluesforquerieswithimplicitnestednamespaces ( self ) : tagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) # fixme replace this with securetagvalueapi once the index is # integrated objectid = uuid4 ( ) values = { objectid : { u'username / bar': 42 } } tagvalues = securetagvalueap... | [
-0.1252228319644928,
0.29917028546333313,
0.38390034437179565,
-0.1508226990699768,
-0.0952129140496254,
0.7680422067642212,
-0.19779227674007416,
-0.48710405826568604,
0.27113044261932373,
-0.8769481778144836,
-0.7169463038444519,
-0.028149226680397987,
0.012001360766589642,
0.51268512010... |
def batch _ iter ( data, batch _ size, num _ epochs, shuffle = true ) : data = np. array ( data ) data _ size = len ( data ) num _ batches _ per _ epoch = int ( ( len ( data ) - 1 ) / batch _ size ) + 1 for epoch in range ( num _ epochs ) : # shuffle the data at each epoch if shuffle : shuffle _ indices = np. random. p... | [
0.17516641318798065,
0.12053182721138,
0.6372019052505493,
0.1696753203868866,
-0.49320653080940247,
0.33213168382644653,
-0.03858380392193794,
0.0814308449625969,
0.06029835343360901,
-0.5050897598266602,
0.1299433559179306,
0.47732165455818176,
0.2293597310781479,
-0.045128174126148224,
... |
def test _ lmdb _ create ( ) : with temporarydirectory ( ) as dbpath : env = lmdb. open ( dbpath ) with env. begin ( ) as txn : assert txn. id ( ) = = 0 | [
0.4108026921749115,
-0.3224543631076813,
0.2844078242778778,
0.26070883870124817,
0.9873149991035461,
1.4680538177490234,
-0.16838577389717102,
0.7178856730461121,
-0.3586449921131134,
-1.155591368675232,
-0.6281980872154236,
-0.4456079304218292,
-1.1697263717651367,
0.6030364036560059,
... |
def on _ startup ( ) : rclpy. init ( ) global node node = rosnode ( ) | [
0.9630874395370483,
-0.8817616105079651,
0.43248477578163147,
-0.1364545226097107,
1.2727432250976562,
0.04309861361980438,
-0.1991947889328003,
0.28244972229003906,
0.6242994070053101,
0.5030364990234375,
-0.1045088991522789,
1.2340869903564453,
-0.3255036175251007,
0.2019491195678711,
... |
def test _ empty ( self ) : result = self. runner. run ( runner. testsuite ( ) ) self. assertequal ( result. _ calls, [ ] ) | [
-0.24743275344371796,
1.1131881475448608,
0.3535667359828949,
-0.5775519013404846,
1.1561130285263062,
0.8710067868232727,
0.3919852674007416,
-0.8079889416694641,
-0.005855240393429995,
-1.1240674257278442,
-0.5575239658355713,
0.2943960726261139,
-0.9040675163269043,
0.7944956421852112,
... |
def rewritequestion ( question ) : qrewrite = " " qi = 0 qverb = " " # includes spaces around " is " so words containing " is " aren't matched qindex = question. find ( " is " ) if qindex! = - 1 : qi = 4 qverb = " is " else : qindex = question. find ( " was " ) if qindex! = - 1 : qi = 5 qverb = " was " # i also tried "... | [
0.26056694984436035,
-0.6711053252220154,
0.6908763647079468,
-0.07591395825147629,
0.23632359504699707,
0.17912229895591736,
-0.13706791400909424,
-0.11032027751207352,
0.9206070899963379,
0.7257288694381714,
1.5493720769882202,
0.4632481038570404,
-0.4448486566543579,
-0.4360700845718384... |
def on _ copy _ source ( self ) : source = self. data. get ( " source ", none ) if not source : return project _ name = self. dbcon. session [ " avalon _ project " ] root = registeredroots. registered _ root ( project _ name ) path = source. format ( root = root ) clipboard = qtwidgets. qapplication. clipboard ( ) clip... | [
0.31867510080337524,
0.11762285977602005,
0.3445852994918823,
0.7444795370101929,
-0.40419039130210876,
0.5492380857467651,
0.506289005279541,
0.09437783062458038,
0.9174796938896179,
0.86003577709198,
-0.04963267594575882,
0.47825342416763306,
0.5752999782562256,
0.18352225422859192,
0.... |
def vnf _ links _ from _ nsd ( nsd ) : vls = [ ] for link in nsd [ " vnflinks " ] : vls. append ( vnf _ link _ to _ internal ( link ) ) return vls | [
-0.9152010083198547,
-0.2926689088344574,
0.038152944296598434,
0.5137606859207153,
-0.4442688524723053,
-0.5114822387695312,
-0.9272047877311707,
-0.2244727462530136,
0.5353246927261353,
0.23270417749881744,
-0.23804742097854614,
0.7749917507171631,
-0.09019149839878082,
0.982646405696868... |
def generate _ private _ data _ annual _ subfolders ( form, subfolder _ tag ='txt') : for year in range ( 2004, get _ current _ year ( ) + 1 ) : main _ folder = get _ private _ data _ folder ( form, subfolder _ tag ) dir _ = os. path. normpath ( os. path. join ( main _ folder, str ( year ) ) ) if os. path. isdir ( dir ... | [
-0.5582851767539978,
-0.1541239619255066,
0.7089465260505676,
0.14036190509796143,
-1.1859444379806519,
1.0913769006729126,
0.5659382343292236,
0.295693963766098,
0.1772690862417221,
-0.7587441205978394,
0.06299064308404922,
0.40039876103401184,
0.51236492395401,
0.5145881772041321,
0.14... |
def modified ( self ) - > datetime. datetime : # remark : can be better to have a dedicated method to minimize data transfer return self. _ get _ detail ( " modified ", refresh = true ) | [
-0.26367729902267456,
0.20620721578598022,
0.4185168445110321,
0.30514147877693176,
-0.140235036611557,
-0.5130478739738464,
-0.9172167181968689,
-0.551348865032196,
0.779754102230072,
-0.21622662246227264,
0.39449310302734375,
0.920114278793335,
0.09569955617189407,
0.20714548230171204,
... |
def test _ l2 _ metric _ geodesic ( self ) : curves _ ab = self. l2 _ metric _ s2. geodesic ( self. curve _ a, self. curve _ b ) curves _ ab = curves _ ab ( self. times ) result = curves _ ab expected = [ ] for k in range ( self. n _ sampling _ points ) : geod = self. l2 _ metric _ s2. ambient _ metric. geodesic ( init... | [
0.9590159058570862,
0.43148934841156006,
0.4975859224796295,
0.2920114994049072,
0.14035984873771667,
1.1113542318344116,
-0.5516065359115601,
-0.9919319152832031,
-0.9806047081947327,
0.7991340160369873,
0.643397867679596,
0.3260566294193268,
1.0143450498580933,
-0.1962447464466095,
-0.... |
def train ( ) : semcor = semcor ( ) _ train ( semcor, sc _ token _ ft,'all') | [
-0.13491997122764587,
0.6649510860443115,
0.044989824295043945,
0.2709147036075592,
0.24011793732643127,
-1.6576948165893555,
0.14529091119766235,
1.0436805486679077,
-0.41790497303009033,
-0.27699586749076843,
-0.8860210180282593,
-0.15168793499469757,
0.26279282569885254,
-0.564933121204... |
def segmentcellsonchannel ( self, channel : str, show _ sg _ steps : bool = false, n _ frames : int = 0 ) - > none : self. segm _ channel = channel idx = 0 for frame in self. frames [ channel ] : frame. segmentcells ( segm _ protocol. lower ( ), show _ sg _ steps, idx, n _ frames ) # cell " segmentcells " ( see " frame... | [
-0.8280825614929199,
0.1922958940267563,
0.3736550807952881,
0.23850136995315552,
0.9058129191398621,
-0.1232200562953949,
0.5324771404266357,
-0.532242476940155,
0.3954458236694336,
0.0516505092382431,
-0.798701822757721,
0.07696804404258728,
-0.6709935665130615,
1.304632306098938,
-0.2... |
def evaluate _ lfw ( dataset, model, roc _ fname ='', verbose = true, show _ failed = false ) : if verbose and isinstance ( model, torch. nn. module ) : log. info ('face recognition model config :') log. info ( model ) scores _ with _ gt = compute _ embeddings _ lfw ( dataset, model ) num _ pairs = len ( scores _ with ... | [
0.2244175225496292,
0.24982260167598724,
0.7704271674156189,
-0.0022458103485405445,
-0.11049417406320572,
0.2051667720079422,
0.7296212911605835,
-0.024692898616194725,
-0.6298964619636536,
0.2995615601539612,
-0.28562435507774353,
-0.11217294633388519,
0.5334267020225525,
0.8346640467643... |
def encryption _ name ( self ) : mode = self. configuration _ field [ 0 ] & 0x0f if mode = = 0 : return " no encryption used " if mode = = 1 or mode > = 6 : return " reserved " return { 2 : " des encryption with cbc ; iv is zero ( deprecated ) ", 3 : " des encryption with cbc ; iv is not zero ( deprecated ) ", 4 : " ae... | [
-0.8074910044670105,
0.1742004156112671,
0.6695338487625122,
0.14128178358078003,
-0.49428632855415344,
-0.3306152820587158,
-0.16396057605743408,
-0.8361590504646301,
-0.354620099067688,
1.3463243246078491,
-0.5934030413627625,
-0.6721128225326538,
-0.26577329635620117,
-0.002166026970371... |
def compute _ gene _ tissue _ joint _ posterior ( cluster, tissue, gene, eqtl _ snp _ hash ) : assert len ( cluster. ld _ snps ) = = cluster. ld _ matrix. shape [ 0 ], ( len ( cluster. ld _ snps ), cluster. ld _ matrix. shape [ 0 ], cluster. ld _ matrix. shape [ 1 ] ) assert len ( cluster. ld _ snps ) = = cluster. ld _... | [
0.6805088520050049,
-0.407546728849411,
0.8082666397094727,
-0.9924654960632324,
0.6640902161598206,
0.21760787069797516,
0.14342284202575684,
0.25634413957595825,
0.038763608783483505,
0.25317198038101196,
-0.3145941495895386,
0.4438024163246155,
-0.1450590193271637,
-0.023540444672107697... |
def receive ( self ) : try : return self. codec. receive ( lambda : self. connection. recv ( self. buffer _ size ) ) except exception as e : raise udsexception ( str ( e ) ) | [
-0.1203555315732956,
0.28968387842178345,
0.6530998349189758,
-0.5754247903823853,
0.08146461844444275,
0.1416390836238861,
-0.8967458009719849,
-0.19219616055488586,
-0.39097750186920166,
-1.4834048748016357,
-0.11665146052837372,
0.5601258277893066,
-0.40298184752464294,
-0.4770892262458... |
def _ set _ location ( self, geopt ) : self. location = geopt self. geoname = pickle. dumps ( self. _ get _ geo _ name ( ) ) # sync geocell indexing self. update _ location ( ) | [
0.08299838751554489,
-0.6953087449073792,
0.06495804339647293,
0.002154984977096319,
-0.510758638381958,
0.2669726014137268,
0.14876410365104675,
0.008682873100042343,
-0.13178087770938873,
1.4841848611831665,
-0.19746872782707214,
-0.19046203792095184,
0.37006956338882446,
-0.412579923868... |
def yaml _ load _ file ( p _ filepath ) : with open ( p _ filepath,'r') as handle : data = yaml. load ( handle ) return data | [
0.20709466934204102,
-0.6016041040420532,
0.21595712006092072,
-0.8642464876174927,
0.08175931870937347,
0.3931705057621002,
0.1260816752910614,
0.32866328954696655,
-0.34982508420944214,
0.2934432625770569,
-0.20442061126232147,
-0.027016842737793922,
0.09200967848300934,
-0.3798506855964... |
def _ _ init _ _ ( self, asyncsocketspool, srvsocket, srvaddr, bufslots ) :... | [
0.10973261296749115,
0.4629473090171814,
0.4575251042842865,
-0.03040630929172039,
-0.8916345238685608,
-0.18192312121391296,
1.0209078788757324,
-0.6349036693572998,
0.4205233156681061,
-0.588737428188324,
-0.20286054909229279,
1.3011534214019775,
0.003762573003768921,
0.1342494785785675,... |
def matrixs ( self ) : s = " " for r in self. transition _ matrix ( ) : s + = " { } \ n ". format ( ", ". join ( map ( str, r ) ) ) return s | [
-0.19305485486984253,
-0.985700786113739,
0.5911948680877686,
-0.8648933172225952,
0.03144383430480957,
-0.12159061431884766,
-0.6663535833358765,
0.12375691533088684,
0.4166092276573181,
0.5572404861450195,
-0.01306916493922472,
0.032585158944129944,
0.2366078943014145,
0.2332473993301391... |
def isolated _ parso _ cache ( monkeypatch, tmpdir ) : cache _ path = str ( os. path. join ( str ( tmpdir ), " _ _ parso _ cache " ) ) monkeypatch. setattr ( cache,'_ default _ cache _ path ', cache _ path ) monkeypatch. setattr ( cache,'_ get _ default _ cache _ path ', lambda * args, * * kwargs : cache _ path ) retur... | [
0.18425582349300385,
-0.2964931130409241,
0.4782021641731262,
0.057822905480861664,
-0.30024588108062744,
0.6423786878585815,
-0.03188444301486015,
0.572661280632019,
-0.2999306619167328,
0.06639955937862396,
-0.19639934599399567,
-0.35975518822669983,
0.31295639276504517,
-0.1587180048227... |
def get _ row _ from _ tenants _ table ( conn, tenant _ uuid ) : try : cur = conn. execute ( " select * from tenants where id =? ", ( tenant _ uuid, ) ) except sqlite3. error as e : logging. error ( " error : % s when querying tenants table for tenant % s ", e, tenant _ uuid ) return str ( e ), none result = cur. fetch... | [
0.18079516291618347,
-0.1324700564146042,
0.24676848948001862,
0.07344697415828705,
-0.07643496990203857,
-1.2927662134170532,
-0.41312041878700256,
0.37453922629356384,
-0.6008034944534302,
0.6025521159172058,
0.8317628502845764,
-0.42328277230262756,
0.24762794375419617,
-0.1433762311935... |
def percentile ( n, percent, key = lambda x : x ) : if not n : return none k = ( len ( n ) - 1 ) * percent f = math. floor ( k ) c = math. ceil ( k ) if f = = c : return key ( n [ int ( k ) ] ) d0 = key ( n [ int ( f ) ] ) * ( c - k ) d1 = key ( n [ int ( c ) ] ) * ( k - f ) return d0 + d1 | [
-0.03755899891257286,
0.6781486868858337,
0.392945796251297,
0.05960267782211304,
-0.8712374567985535,
-0.23920544981956482,
-0.5961236953735352,
-0.2729237973690033,
-0.7512936592102051,
0.2815079689025879,
-0.27209216356277466,
-1.2646467685699463,
-0.7275359034538269,
-0.313469618558883... |
def _ generate _ gridcell _ specific _ global _ section ( f, d ) : try : if not f : raise exception ('no file handle passed') conf _ path, err = config. get _ config _ dir ( ) if err : raise exception ( err ) f. write ( " server string = integralstor gridcell file server \ n " ) f. write ( " netbios name = % s \ n " % ... | [
-0.2213970571756363,
0.6486340165138245,
0.7419571876525879,
-0.23609508574008942,
0.6392312049865723,
0.9178237318992615,
0.721312403678894,
0.30525898933410645,
-0.9595345854759216,
0.7116543054580688,
-0.09020482003688812,
-0.03360346332192421,
-0.5501702427864075,
1.0587859153747559,
... |
def _ mgui _ get _ step ( self ) - > float : val = self. _ qwidget. singlestep ( ) return self. _ post _ get _ hook ( val ) | [
0.29010945558547974,
0.8397209644317627,
0.3916848301887512,
0.7285519242286682,
0.26964840292930603,
-0.21988791227340698,
-0.040363412350416183,
-0.6687318086624146,
-0.883485734462738,
-1.0209933519363403,
0.29393115639686584,
-0.323887437582016,
-0.40350407361984253,
1.1265511512756348... |
def list _ output _ files ( self ) : return [ ] | [
-0.3084641993045807,
-1.02607262134552,
0.4671047627925873,
0.9670906066894531,
0.5626354813575745,
0.041299089789390564,
-0.26626288890838623,
0.4026589095592499,
-0.5888099670410156,
-0.18883386254310608,
-0.45635855197906494,
-0.3202969431877136,
-0.34551775455474854,
0.2914193868637085... |
def train ( self, x, y, val _ x = none, val _ y = none, batch _ size = 20, n _ epochs = 10, learning _ rate = 0. 01 ) : assert x. shape [ 1 ] = = self. input _ dim x = np. expand _ dims ( x, axis = - 1 ) batched _ x, batched _ y = self. make _ batches ( x, y, batch _ size = batch _ size ) for epoch in range ( n _ epoch... | [
0.1042790487408638,
0.5968210697174072,
0.5153921246528625,
0.6813811659812927,
-0.4375859200954437,
-0.22951683402061462,
-0.7534061074256897,
-0.10519665479660034,
-0.4662105143070221,
-0.2732643187046051,
-0.4409521520137787,
0.43679001927375793,
0.9544230103492737,
0.7066444158554077,
... |
def do _ insert ( self, * * kwargs ) : _ revision _ id = kwargs ['revision _ id'] _ parent _ id = kwargs ['parent _ id'] _ part = kwargs ['part'] _ error _ code = 0 _ error _ msg ='' _ msg ='' _ parent = self. dtm _ hardware. do _ select ( _ parent _ id ) try : _ parent _ is _ part = _ parent. part except attributeerro... | [
-0.24457421898841858,
0.8191323280334473,
0.988923192024231,
0.1796339750289917,
0.5417435169219971,
0.0742916613817215,
0.29125145077705383,
-0.5406907200813293,
-1.0028696060180664,
0.2550206184387207,
-0.31006333231925964,
-0.05233386158943176,
-1.0358145236968994,
0.44142767786979675,
... |
def tag _ exists ( self, repo, tag ) : return tag in self. list _ tags ( repo ) | [
-0.13611793518066406,
0.1224757730960846,
0.09087452292442322,
-0.22079038619995117,
1.5592302083969116,
0.17358988523483276,
-1.8953924179077148,
0.45537224411964417,
-0.7862576246261597,
0.4451024532318115,
-0.7378236651420593,
0.08355020731687546,
0.2615811228752136,
1.103252649307251,
... |
def findservicebyname ( self, * args, * * kwargs ) : # real signature unknown pass | [
-0.7398945689201355,
-0.4545082449913025,
0.6028316020965576,
0.8173251748085022,
-0.11699508130550385,
-0.3638896346092224,
0.4909168481826782,
-1.5459576845169067,
-0.5231317281723022,
-0.22023412585258484,
-0.40086013078689575,
0.00862185750156641,
-1.4186427593231201,
1.136000752449035... |
def width ( self ) : return math. pow ( self. _ resolution, self. _ max _ depth ) | [
0.05269742012023926,
1.105217456817627,
0.46109509468078613,
0.7023411393165588,
0.40700414776802063,
0.09122903645038605,
0.6443100571632385,
0.2983403503894806,
0.6385928988456726,
-1.6829698085784912,
0.1770961582660675,
-0.49058645963668823,
-0.334381103515625,
0.6131563782691956,
-0... |
def reassign ( self, old, new ) : frame _ idx = self. frame _ num while frame _ idx < self. length : try : for idx, row in enumerate ( self. labels [ frame _ idx ] ) : if int ( row [ 2 ] ) = = old : row [ 2 ] = new except keyerror : pass frame _ idx + = 1 print ( " changed obj { } to obj { } in frame { } and all subseq... | [
-1.2974216938018799,
-1.3510398864746094,
0.7794791460037231,
0.06338468194007874,
-0.5739263892173767,
-0.5058061480522156,
0.726308286190033,
-0.09225771576166153,
-0.204861119389534,
0.31992998719215393,
-0.33704301714897156,
1.4205750226974487,
-0.035472795367240906,
0.7255319952964783... |
def delete _ time _ series ( self, paths _ list ) : status = self. _ _ client. deletetimeseries ( self. _ _ session _ id, paths _ list ) logger. debug ( " deleting multiple time series { } message : { } ". format ( paths _ list, status. message ) ) return session. verify _ success ( status ) | [
-1.3888671398162842,
0.49534550309181213,
0.17366273701190948,
1.061076283454895,
1.0084351301193237,
0.06703197211027145,
-0.3349427580833435,
-0.7104964852333069,
0.22521519660949707,
0.42072388529777527,
-0.6401942372322083,
-0.38505467772483826,
-1.0486958026885986,
0.13978998363018036... |
def target _ resource _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " target _ resource _ id " ) | [
0.6617268919944763,
-0.4273553788661957,
0.21062862873077393,
-0.08655501902103424,
0.6996586322784424,
1.1512069702148438,
0.04058077931404114,
0.4903532862663269,
1.2790122032165527,
0.31355708837509155,
0.8855084776878357,
1.2668861150741577,
0.1708354949951172,
-1.0683825016021729,
-... |
def _ pad _ list ( list _ arrays, length, axis = 0, value = 0 ) : n _ axis = list _ arrays [ 0 ]. ndim pad _ list = [ ( 0, 0 ) ] * ( n _ axis - 1 ) return map ( lambda x : np. pad ( x, tuple ( pad _ list [ : axis ] + [ ( 0, length - x. shape [ axis ] ) ] + pad _ list [ axis : ] ),'constant ', constant _ values = value ... | [
0.4317515790462494,
0.051585596054792404,
0.6149327754974365,
0.4347408711910248,
0.13890555500984192,
0.6931256651878357,
-0.23223064839839935,
1.0791904926300049,
0.7772819995880127,
1.0137238502502441,
-1.035900354385376,
-0.19784311950206757,
0.5570081472396851,
0.6283652186393738,
0... |
def kls _ name ( self ) : # determine kls for group if not self. parent or not self. parent. name : return'test { 0 } '. format ( self. name ) else : use = self. parent. kls _ name if use. startswith ('test') : use = use [ 4 : ] return'test { 0 } _ { 1 } '. format ( use, self. name ) | [
0.5098134875297546,
-0.9157825708389282,
0.40695255994796753,
-0.08919141441583633,
-0.91336590051651,
0.37848925590515137,
0.15689145028591156,
-1.1027454137802124,
0.3476633131504059,
0.783538818359375,
1.0794892311096191,
0.06201377138495445,
-0.24940308928489685,
0.6858510375022888,
... |
def iter _ lines ( cmd, wait _ on _ exit = true ) : process = subprocess. popen ( cmd, shell = true, stdout = subprocess. pipe ) for l in iter ( process. stdout. readline, b'' ) : yield l if wait _ on _ exit : process. wait ( ) | [
0.906289279460907,
-0.5560433864593506,
0.9233320355415344,
0.2361273318529129,
-0.4424433708190918,
0.6438032388687134,
-0.5727170705795288,
0.0627395510673523,
-0.5338680148124695,
-0.0017444789409637451,
0.6770941615104675,
-0.30616116523742676,
0.2788010239601135,
0.5134735107421875,
... |
def get _ instance ( compute, project, zone, instance ) : result = compute. instances ( ). get ( project = project, zone = zone, instance = instance ). execute ( ) return result | [
0.10676440596580505,
0.28553712368011475,
0.1965385228395462,
-0.5333701372146606,
-0.2918855547904968,
0.4363459646701813,
-0.295838326215744,
0.1575324833393097,
-0.9490172863006592,
0.45736604928970337,
0.6960840821266174,
1.0548150539398193,
-1.1161558628082275,
-0.9139814972877502,
... |
def hhlogin ( servernamestr ) : # chrome options for running in heroku gchromeoptions = webdriver. chromeoptions ( ) gchromeoptions. add _ argument ( " disable - dev - shm - usage " ) browser = webdriver. chrome ( options = gchromeoptions, executable _ path = chromedrivermanager ( ). install ( ) ) # create temp server ... | [
-0.8497627377510071,
-0.48175111413002014,
0.8955398201942444,
0.393549382686615,
0.644676685333252,
0.8935203552246094,
0.4844176173210144,
0.17352432012557983,
-0.4829366207122803,
0.16782209277153015,
-0.7406222820281982,
-0.19157271087169647,
-0.3711887001991272,
0.28434082865715027,
... |
def get _ popular _ articles ( ) : db = psycopg2. connect ( database = dbname ) c = db. cursor ( ) c. execute ( " " " select title, count ( * ) as views from articles, log where log. status ='200 ok'and log. path like'%'| | articles. slug | |'%'group by articles. title order by views desc limit 3 " " " ) popular _ arti... | [
0.595715343952179,
0.33014383912086487,
0.5897650122642517,
0.07061738520860672,
-0.16388121247291565,
-0.38878268003463745,
-0.27845054864883423,
0.43965184688568115,
-1.2993299961090088,
0.35404545068740845,
0.04053899273276329,
0.43182459473609924,
0.42037317156791687,
-0.61427474021911... |
def previous ( term ) : return add ( term, - 1 ) | [
-0.2673064172267914,
0.4571528434753418,
0.6091915369033813,
0.18029223382472992,
-0.016894506290555,
-0.5232806205749512,
0.440591961145401,
-0.17019949853420258,
-0.17860862612724304,
0.3574383556842804,
-0.14071767032146454,
-0.05572173371911049,
-0.575183093547821,
-0.7489609122276306,... |
def test _ list _ dims ( ) : test _ obj = uvtest ( ) test _ obj. strlist = [ " s " + str ( i ) for i in np. arange ( test _ obj. int2 ) ] pytest. raises ( valueerror, test _ obj. check ) | [
0.25231921672821045,
0.486554354429245,
0.43954527378082275,
0.3929835557937622,
0.16608625650405884,
0.033428855240345,
-0.4022551476955414,
0.017470143735408783,
0.8105841875076294,
-0.060761887580156326,
-0.8055284023284912,
0.6436736583709717,
0.16805055737495422,
0.7557967305183411,
... |
def write _ 1 _ to _ 10 ( ) : for each _ number in range ( 10 ) : print ( " loop at : ", each _ number ) active _ sheet. getcellbyposition ( 1, each _ number ). value = each _ number + 1 | [
-0.6515998840332031,
-0.5566797256469727,
0.3590666353702545,
0.07907748222351074,
1.4757391214370728,
0.1544029712677002,
0.9679832458496094,
0.370340496301651,
-1.060861587524414,
0.22103635966777802,
-0.18973466753959656,
0.5087966322898865,
0.41499608755111694,
0.5615589618682861,
0.... |
def start ( self ) : self. mainloop ( ) | [
0.7161654233932495,
-1.0281866788864136,
0.1094156950712204,
1.303934931755066,
0.1364997774362564,
1.1265082359313965,
0.7029138207435608,
1.0438698530197144,
0.13956667482852936,
-0.5482267737388611,
-0.13097967207431793,
0.18893708288669586,
-0.17778746783733368,
0.5510377287864685,
-... |
def load _ state _ zips ( state ) : global state _ zip with sqlite3. connect ('source. db') as conn : cur = conn. cursor ( ) state _ zip [ state ] = [ row [ 0 ] for row in cur. execute ( " select zip from states where state = : st ", { " st " : str ( state ) } ) ] | [
-1.1767274141311646,
0.6216095089912415,
0.7020761370658875,
-0.8702366352081299,
-0.4280254542827606,
-0.5124704241752625,
0.07676327228546143,
-0.0246774610131979,
1.0474300384521484,
0.5636335015296936,
-1.268034815788269,
-0.6248638033866882,
0.14736059308052063,
0.17573344707489014,
... |
def delete _ node _ in _ template ( self, template _ name : str, path : str ) : request = tspruneschematemplatereq ( self. _ _ session _ id, template _ name, path ) status = self. _ _ client. pruneschematemplate ( request ) logger. debug ( " append unaligned template { } template name : { } ". format ( self. _ _ sessio... | [
-0.4123080372810364,
-0.06935818493366241,
0.7246842384338379,
-0.622905969619751,
-0.40201401710510254,
0.08293627947568893,
-0.33938664197921753,
0.8197508454322815,
-0.15082994103431702,
0.32861122488975525,
-0.379949152469635,
-0.40948933362960815,
-1.1206375360488892,
-0.2495913654565... |
def unit _ cell ( self ) : return crystal. uctbx. unit _ cell ('{! s } {! s } {! s } 90 90 90 '. format ( * list ( flex. double ( self. grid _ size ( ) ) * self. grid _ spacing ( ) ) ) ) | [
0.7434797286987305,
0.5097082257270813,
0.5331658720970154,
-0.028976276516914368,
0.932645320892334,
0.5338607430458069,
0.9697242975234985,
-0.4946403503417969,
0.0047210208140313625,
0.025342091917991638,
0.19604742527008057,
-0.004763663746416569,
0.23961052298545837,
-0.05557021498680... |
def l ( n, ri, c ) : # matriz identidad l = [ [ float ( i = = j ) for j in range ( n ) ] for i in range ( n ) ] for k in range ( c + 1, n ) : l [ k ] [ c ] = - ri [ k ] return l | [
0.4944555461406708,
-0.3530815541744232,
0.3328123390674591,
-0.18515826761722565,
0.48349010944366455,
0.6188493967056274,
-0.14199475944042206,
0.18822471797466278,
0.30869096517562866,
0.8580928444862366,
-0.7456273436546326,
-0.6097387075424194,
-0.7609894275665283,
0.3718687891960144,... |
def test _ available _ languages _ no _ change ( self, mock _ sync ) : org = factories. org ( available _ languages = ['en ','es'], language ='en ', ) form = self. form _ class ( data = self. data, instance = org ) self. asserttrue ( form. is _ valid ( ), form. errors ) form. save ( ) org. refresh _ from _ db ( ) self.... | [
-0.2827104330062866,
0.32987964153289795,
0.42924928665161133,
-0.41240906715393066,
0.3283928334712982,
1.069267988204956,
-0.2847469449043274,
0.7500662207603455,
-0.22581075131893158,
-0.07686181366443634,
-1.1029540300369263,
-0.4568471610546112,
0.27627691626548767,
0.0568838380277156... |
def np _ divmod _ jit ( df ) : @ jit def _ fix _ date ( mdate, mtime ) : time _ out = np. empty ( mtime. shape [ 0 ], dtype = np. int32 ) for i in range ( mtime. shape [ 0 ] ) : aux, cent = np. divmod ( mtime [ i ], 100 ) aux, seconds = np. divmod ( aux, 100 ) hours, minutes = np. divmod ( aux, 100 ) time _ out [ i ] =... | [
-0.03753189370036125,
0.5141134858131409,
0.7486934661865234,
-0.4390436112880707,
-0.26287150382995605,
-0.5916315317153931,
0.19666966795921326,
-0.5641778111457825,
0.005890033673495054,
0.7752650380134583,
0.16293549537658691,
0.22972212731838226,
0.7144950032234192,
0.6910872459411621... |
def do _ get _ document _ types ( parser, token ) : # for a call like this : { % get _ document _ types as document _ types % } # bits elements are : 0 - tag name, 1 -'as ', 2 - variable name bits = token. split _ contents ( ) if len ( bits )! = 3 : raise templatesyntaxerror ( _ ( " % s requires 2 arguments " ) % bits ... | [
-0.16403931379318237,
0.2695852220058441,
0.5850818753242493,
-0.08527743071317673,
-0.012429500930011272,
-1.048876166343689,
-0.06960657238960266,
-1.1314036846160889,
-0.5121328830718994,
0.5545133948326111,
-0.08841903507709503,
0.1702004075050354,
-0.020849239081144333,
0.673151254653... |
def get _ distortion ( image _ name : str, lithos _ file : path ) - > np. ndarray : distortion = np. nan with open ( lithos _ file,'r') as lithos : lithos _ lines = lithos. readlines ( ) for index, line in enumerate ( lithos _ lines ) : if image _ name in line : distortion = np. fromstring ( lithos _ lines [ index + 1 ... | [
0.46328216791152954,
-0.6303853988647461,
0.4682362377643585,
-0.5397011637687683,
0.4130825996398926,
-0.12707281112670898,
-0.02016480639576912,
0.35916009545326233,
-0.4435909390449524,
0.40256911516189575,
0.3795548975467682,
0.49418193101882935,
0.07711734622716904,
0.5741662383079529... |
def get _ least _ common _ words ( fdist, count ) : return fdist. hapaxes ( ) [ 0 : count ] | [
1.1405024528503418,
-0.22207535803318024,
0.1310362070798874,
-0.2313777208328247,
0.3574950695037842,
-0.5260694026947021,
-0.15547595918178558,
0.15256363153457642,
-0.7744784355163574,
0.3721276521682739,
0.3999214470386505,
-0.4133284091949463,
-0.26767903566360474,
-0.0928974226117134... |
def fast _ compute ( initial _ register = [ 0 ] * 6 ) : r = initial _ register [ : ] # setup if r [ 0 ] = = 0 : r [ 1 ] = 900 else : r [ 0 ] = 0 r [ 1 ] = 10551300 for r5 in range ( 1, r [ 1 ] + 1 ) : r4, mod = divmod ( r [ 1 ], r5 ) if mod = = 0 : r [ 0 ] + = r5 return r [ 0 ] | [
0.06852206587791443,
0.8818789720535278,
0.24398235976696014,
0.42584502696990967,
0.5546742677688599,
-1.3718130588531494,
0.9531002044677734,
0.3451106548309326,
0.376919686794281,
0.008818943984806538,
-0.4615516662597656,
0.5576745271682739,
-0.6995052099227905,
0.8375146389007568,
0... |
def model _ thread ( ) : model : transformers. pretrainedmodel tokenizer : transformers. pretrainedtokenizer model, tokenizer, decode _ token = load _ models ( ) request : interface. generatestreamrequest output _ queue : queue eos _ token _ id = tokenizer. eos _ token _ id if hasattr ( tokenizer, " eos _ token _ id " ... | [
-0.6662867069244385,
0.1465146243572235,
0.8621607422828674,
0.1813342273235321,
0.2586759626865387,
-0.6395451426506042,
0.07614275068044662,
-0.640296220779419,
-1.028847336769104,
-0.6660045981407166,
-0.4458930194377899,
0.20157979428768158,
-0.134903222322464,
0.11025460809469223,
-... |
def in _ words ( self, locale = none, separator ='', _ periods = none ) : if _ periods is none : _ periods = [ ('week ', self. weeks ), ('day ', self. remaining _ days ), ('hour ', self. hours ), ('minute ', self. minutes ), ('second ', self. remaining _ seconds ) ] parts = [ ] for period in _ periods : unit, count = p... | [
0.07259982824325562,
0.8044295310974121,
0.6154305934906006,
-0.2440432459115982,
-0.40483447909355164,
-0.7732239961624146,
-0.6053528785705566,
-0.09628259390592575,
-0.18446029722690582,
0.2976014018058777,
-0.15065518021583557,
-0.4095612168312073,
-0.4814923405647278,
-0.1224651411175... |
def _ _ init _ _ ( self ) : super ( ). _ _ init _ _ ( 1, 4 ) | [
0.1210421621799469,
0.25594985485076904,
0.4242849349975586,
1.0960034132003784,
0.27188369631767273,
0.2365420013666153,
0.5347227454185486,
-0.07140827924013138,
-0.28082942962646484,
-0.8297008872032166,
-1.0244780778884888,
-0.36269909143447876,
-0.6625840067863464,
0.5598726272583008,... |
def plot _ legend ( self, loc : str = " upper left ", markerscale : float = 0. 9, frameon : bool = true, fancybox : bool = true, edgecolor : str | iterable = " darkgrey ", fontsize : float = 15. 0, labelspacing : float = 1. 5, * * params, ) - > none : legend = self. axes. legend ( loc = loc, markerscale = markerscale, ... | [
0.9106342792510986,
0.2882954478263855,
0.48917156457901,
-0.5271948575973511,
0.15960751473903656,
-0.1897798329591751,
0.5335119366645813,
1.0600650310516357,
0.7863162159919739,
-0.2752324342727661,
-0.6648033261299133,
0.8648687601089478,
0.010003240779042244,
0.14072610437870026,
0.... |
def run ( argv = none, save _ main _ session = true ) : parser = argparse. argumentparser ( ) parser. add _ argument ('- - input ', dest ='input ', required = true, help ='input file to process.') parser. add _ argument ('- - output ', dest ='output ', required = true, help ='output file to write results to.') parser. ... | [
-0.023992551490664482,
0.001733614830300212,
0.9149879813194275,
0.30088767409324646,
0.3103005588054657,
-0.7085795998573303,
1.0046703815460205,
0.4280482232570648,
-0.23079517483711243,
0.4568077027797699,
-0.25057512521743774,
0.0962727963924408,
-0.017336849123239517,
-0.0902510955929... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.