text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def plot _ vel _ ne _ gridded ( station, grid, figsize = ( 14, 10 ) ) : u _ u = grid. variables [ " vozocrtx " ] v _ v = grid. variables [ " vomecrty " ] w _ w = grid. variables [ " vovecrtz " ] dep _ t = grid. variables [ " depthv " ] dep _ w = grid. variables [ " depthw " ] t = grid. variables [ " time _ counter " ] ... | [
0.3567454218864441,
0.6116092801094055,
0.915184497833252,
-0.2650989592075348,
-0.251699298620224,
0.9316830039024353,
0.6804810762405396,
0.11609917879104614,
-0.1902705430984497,
-0.09945540130138397,
-0.34776875376701355,
1.0185766220092773,
0.3619771897792816,
0.508244514465332,
0.0... |
def size ( self ) - > int : stream = bcdatastream ( ) self. serialize _ to ( stream ) return len ( stream. get _ bytes ( ) ) | [
0.27783340215682983,
0.9031171798706055,
0.5620917081832886,
-1.0768331289291382,
0.4729006886482239,
-0.17432139813899994,
0.15047436952590942,
0.4004686176776886,
-0.07007083296775818,
-1.2504010200500488,
-1.546470046043396,
0.6272884011268616,
-1.367410659790039,
0.23562029004096985,
... |
def unblock _ client ( client _ indentity ) : client _ block _ key = client _ blocked _ prefix + client _ indentity return redis _ instance. delete ( client _ block _ key ) | [
-0.1546618938446045,
0.3303826153278351,
0.6291723251342773,
-0.5150750875473022,
-0.7512220740318298,
-0.17763768136501312,
0.40842828154563904,
-0.23521578311920166,
-0.31381383538246155,
1.0192680358886719,
-0.3653949797153473,
0.29347166419029236,
-0.4671517312526703,
-0.73656207323074... |
def peek ( self ) : if len ( self. b ) = = 0 : while self. a : self. b. append ( self. a. pop ( ) ) return ( self. b [ - 1 ] ) | [
0.0010813975241035223,
0.4476248621940613,
0.8466962575912476,
-0.2212459146976471,
0.4482496678829193,
-0.4284684956073761,
-0.21008111536502838,
-0.7446436882019043,
0.08642050623893738,
0.21977347135543823,
0.34497836232185364,
0.6432793736457825,
-1.219030499458313,
0.04211302101612091... |
def load _ models ( ) : global dt global knn try : dt = joblib. load ( '.. / models /'+ str ( model _ names [ 0 ] ) ) knn = joblib. load ( '.. / models /'+ str ( model _ names [ 1 ] ) ) print ('models loaded') except exception as e : print ('no model here') print ( str ( e ) ) return | [
-0.539956271648407,
0.4630099833011627,
0.6496427059173584,
0.699120044708252,
0.8371784687042236,
1.082859992980957,
-0.244606614112854,
-0.5058323740959167,
-1.684463381767273,
0.12576426565647125,
-0.2075033187866211,
-0.3738480508327484,
0.017224250361323357,
0.27278491854667664,
-0.... |
def print _ rec ( lst ) : if not lst : return print lst [ 0 ] return print _ rec ( lst [ 1 : ] ) | [
-0.17918184399604797,
1.161389946937561,
0.5656923055648804,
0.8605878353118896,
0.5095900893211365,
-0.07714526355266571,
-0.07465032488107681,
-0.23649746179580688,
-0.05992177873849869,
0.08781778067350388,
-0.6351563334465027,
0.5914278626441956,
-0.40801307559013367,
0.989808976650238... |
def setup _ sample _ cube ( self ) : cube _ mesh = qt3dextras. qcuboidmesh ( self. component _ root _ entity ) self. set _ cube _ mesh _ dimensions ( cube _ mesh, * [ 0. 1, 0. 1, 0. 1 ] ) dark _ red = qcolor ( " # b00 " ) sample _ material = create _ material ( qcolor ( " red " ), dark _ red, self. component _ root _ e... | [
0.7207862138748169,
-0.5686479806900024,
0.6094646453857422,
-0.24500730633735657,
0.314248651266098,
0.3166710436344147,
0.20250971615314484,
0.005001187324523926,
-0.15181317925453186,
-0.16317427158355713,
-0.26697787642478943,
0.5259591937065125,
-0.2169732302427292,
0.9869890809059143... |
def genre _ attribution ( text ) : n _ gram = compute _ n _ gram _ words ( 1, text ) seqs = n _ gram [ " sequences " ] freqs = n _ gram [ " frequencies " ] genre _ index = open ( " res / genres / index " ). readlines ( ) print " genre index : " + ', '. join ( genre _ index ) diff _ best _ match = maxint best _ match = ... | [
-0.14222267270088196,
-0.8932626247406006,
0.7372364401817322,
-0.3860021233558655,
-0.3945479989051819,
-0.5719566941261292,
0.7693178057670593,
0.7396413683891296,
-0.2933691442012787,
0.14668118953704834,
0.7168542146682739,
0.4447577893733978,
-0.9630401134490967,
0.4935692250728607,
... |
def handle _ authn _ response ( self, context, internal _ resp ) : auth _ req = self. _ get _ authn _ request _ from _ state ( context. state ) # filter attributes to return in id token as claims attributes = self. converter. from _ internal ( " openid ", internal _ resp. get _ attributes ( ) ) satosa _ logging ( logge... | [
-0.2160956859588623,
-0.8022522926330566,
0.7339951992034912,
-0.8333631157875061,
-0.03651468828320503,
-0.7175701260566711,
-0.08417844772338867,
-0.5488353371620178,
0.717987596988678,
-0.27282410860061646,
-0.27625560760498047,
0.17458800971508026,
0.45235559344291687,
-0.5293766856193... |
def test _ image _ blocked ( self ) - > none : self. lookups [ " matrix. org " ] = [ ( ipv4address, " 10. 1. 2. 3 " ) ] self. lookups [ " cdn. matrix. org " ] = [ ( ipv4address, " 10. 1. 2. 4 " ) ] result = ( b " " " < html > < body > < img src = " http : / / cdn. matrix. org / foo. jpg " > < / body > < / html > " " " ... | [
-0.7182391881942749,
1.1787906885147095,
0.6197015047073364,
-0.7337327599525452,
0.2003367394208908,
-0.2926351726055145,
0.0018943825270980597,
-0.5740658044815063,
-0.6263056397438049,
0.049895334988832474,
0.010790159925818443,
0.1690690517425537,
-0.13664142787456512,
0.37030276656150... |
def tag _ place ( node, context ) : return word _ from _ file ('data / places') | [
0.4520489275455475,
0.5995373725891113,
0.05722954124212265,
-1.2824839353561401,
0.7621317505836487,
-0.0008697716984897852,
-0.05114700645208359,
0.4569229781627655,
0.1446947157382965,
0.6625598669052124,
0.3712429404258728,
-0.004391794558614492,
0.2553900480270386,
0.17772217094898224... |
def bw _ usage _ get ( context, uuid, start _ period, mac ) : return impl. bw _ usage _ get ( context, uuid, start _ period, mac ) | [
-0.07521052658557892,
0.268541157245636,
0.7078530192375183,
0.8468031883239746,
0.06560201942920685,
-1.4947285652160645,
0.5679330229759216,
-0.6678634881973267,
-0.7624486088752747,
0.29974988102912903,
1.0145663022994995,
1.5670300722122192,
-0.5467324256896973,
-0.3068658113479614,
... |
def test _ entity _ attr _ funcs _ df ( mock _ asn _ whois _ query, create _ pivot, test _ case ) : mock _ asn _ whois _ query. return _ value = asn _ response respx. get ( re. compile ( r " http : / / rdap \. arin \. net /. * " ) ). respond ( 200, json = rdap _ response ) ent _ cls = getattr ( entities, test _ case. e... | [
-0.8526913523674011,
0.4521644711494446,
0.49875786900520325,
-0.04918600991368294,
0.7069841623306274,
-0.031427107751369476,
0.5104358196258545,
-0.19309860467910767,
0.5189855098724365,
-0.3210608661174774,
0.5254503488540649,
0.03293260931968689,
0.7064906358718872,
-0.2648949921131134... |
def insert _ value ( cur, table, subj, colname, value ) : # check if column exits, add if it does not cur. execute ('pragma table _ info ( { } ) '. format ( table ) ) d = cur. fetchall ( ) cols = [ ] for col in d : cols. append ( str ( col [ 1 ] ) ) if colname not in cols : cur. execute ('alter table { table } add colu... | [
0.018208716064691544,
0.5226275324821472,
1.1184355020523071,
-0.1454121172428131,
-1.0464787483215332,
0.2403065413236618,
0.16358546912670135,
0.007549859583377838,
-0.693277895450592,
0.505416750907898,
0.9031479358673096,
-0.016965718939900398,
-0.17008069157600403,
0.3731354773044586,... |
def nbody _ separation ( expr, qs ) : try : import sympy except importerror : raise importerror ( " this function requires sympy. please install it. " ) logging. debug ( expr ) free _ symbols = expr. free _ symbols logging. debug ( free _ symbols ) assert type ( expr ) = = sympy. add logging. debug ( expr. args ) mappi... | [
-0.3757171034812927,
-0.46694421768188477,
0.8974050283432007,
-0.5035464763641357,
-0.9357377290725708,
-0.4004761576652527,
0.15508674085140228,
-0.1722148358821869,
0.8343154191970825,
0.3043806850910187,
-1.0121859312057495,
-0.19157078862190247,
-0.3077859580516815,
-0.042604956775903... |
def run _ mcmc ( loomfile, model, hapcode, start, end, outfile, verbose ) : utils. configure _ logging ( verbose ) scbase. run _ mcmc ( loomfile, model, hapcode, start, end, outfile ) | [
-0.07053783535957336,
-0.33256539702415466,
0.45251956582069397,
0.4798254370689392,
-0.07176852226257324,
-0.39552560448646545,
0.392839640378952,
0.2557041347026825,
-1.0266457796096802,
0.13305515050888062,
0.2836603820323944,
0.3643670082092285,
-0.31128183007240295,
-0.115276932716369... |
def div ( self, r ) : self. _ check _ r _ shape ( r ) try : return self. _ div ( r ) except notimplemented : return jacobian ( lambda x : self ( x ). sum ( dim = 0 ), r, vectorize = true ) | [
-0.46331116557121277,
0.2247418314218521,
0.690895676612854,
0.5593224763870239,
-0.48975419998168945,
-0.03739108145236969,
1.0307705402374268,
-1.1087977886199951,
0.4163149893283844,
-0.25726306438446045,
-0.8017474412918091,
0.12534774839878082,
0.13669320940971375,
0.49140605330467224... |
def volume _ metadata _ get ( context, volume _ id ) : return impl. volume _ metadata _ get ( context, volume _ id ) | [
-0.20789211988449097,
-0.64272141456604,
0.36605703830718994,
-0.2281150221824646,
1.1735070943832397,
-0.9402723908424377,
-1.3322014808654785,
-0.635657012462616,
-0.17498403787612915,
0.6917931437492371,
0.44727960228919983,
1.3295972347259521,
0.4612146317958832,
-0.5279614329338074,
... |
def all ( self ) : return sorted ( self. all _ users, key = lambda u : u. name. lower ( ) ) | [
0.7926108241081238,
-1.1278619766235352,
0.6754584908485413,
0.22923323512077332,
-0.2709990441799164,
0.8810641169548035,
-1.2853024005889893,
-0.35814252495765686,
0.044628825038671494,
0.16818897426128387,
-0.10451767593622208,
1.099062204360962,
-0.31440237164497375,
0.5378159880638123... |
def test _ glm _ prepare _ controller _ l1 _ old _ config ( old _ glm _ config _ file : path ) : # monkeypatch helper function so that controller can be tested in isolation glm _ prepare. _ glm _ l1 _ propagate = _ old _ glm _ l1 _ propagate _ return with pytest. raises ( systemexit ) as e : glm _ prepare. glm _ prepar... | [
0.6972869038581848,
-0.2146371603012085,
0.5212725400924683,
0.47484779357910156,
-0.03476747125387192,
1.0546499490737915,
0.28174465894699097,
0.3177807629108429,
-0.09906226396560669,
0.9217362999916077,
-0.454677551984787,
0.03454643860459328,
0.003440000582486391,
0.6393391489982605,
... |
def objective _ ann ( trial, est, x _ train, y _ train, randseed, hype _ cv, param _ grid, scoring _ metric ) : params = {'activation': trial. suggest _ categorical ('activation ', param _ grid ['activation'] ),'learning _ rate': trial. suggest _ categorical ('learning _ rate ', param _ grid ['learning _ rate'] ),'mome... | [
0.893843412399292,
0.3140680193901062,
1.0754903554916382,
0.343120813369751,
-0.204096719622612,
-0.3712897300720215,
-0.28835609555244446,
0.16493584215641022,
-1.1076653003692627,
1.288864254951477,
0.0362892672419548,
0.8932382464408875,
0.6231037974357605,
-0.1519213616847992,
0.175... |
def _ _ init _ _ ( self ) : self. root = trienode ('root') | [
1.1299887895584106,
-0.18417847156524658,
0.11057662963867188,
0.3220946192741394,
0.14804519712924957,
0.15550121665000916,
0.20466242730617523,
1.1760337352752686,
0.37646836042404175,
-0.0738590657711029,
-0.9297120571136475,
0.9674035906791687,
-0.005111515522003174,
0.5764049887657166... |
def densenetbc ( blocks, input _ shape = none, classes = 1000 ) : inputs = input ( input _ shape ) bn _ axis = 3 if k. image _ data _ format ( ) = ='channels _ last'else 1 # x = zeropadding2d ( padding = ( ( 3, 3 ), ( 3, 3 ) ) ) ( inputs ) x = conv2d ( 16, 7, strides = 2, use _ bias = false, padding ='same ', name ='co... | [
0.14822904765605927,
0.10469585657119751,
1.2072312831878662,
0.7392721772193909,
0.2678305208683014,
0.4317469000816345,
0.3741302788257599,
-0.7170844078063965,
-0.30947381258010864,
0.1826288104057312,
-0.5880303382873535,
-0.13219648599624634,
-0.1880752295255661,
-0.1760990470647812,
... |
def findoneofbyname ( self, * args, * * kwargs ) : # real signature unknown pass | [
-0.22498559951782227,
0.049313101917505264,
0.4398799240589142,
0.15005452930927277,
0.18625400960445404,
-0.6864058971405029,
0.4246368408203125,
-1.4699679613113403,
-0.27995094656944275,
-0.1575091928243637,
-0.8341882228851318,
-0.2189367115497589,
-1.3032574653625488,
0.43153083324432... |
def read ( self, file _ name : optional [ path ] = none ) : if file _ name is none : file _ name = self. file _ name try : with open ( file _ name,'r') as sum _ file : # parse the name and observation _ date lines ( first two lines self. image _ name = sum _ file. readline ( ). strip ('\ n \ t \ r') self. observation _... | [
-0.532774031162262,
-0.32520902156829834,
0.9001278281211853,
-0.16936451196670532,
0.26208561658859253,
0.0027334203477948904,
0.47982215881347656,
0.21582551300525665,
-0.2352396696805954,
0.021997706964612007,
-0.03510825335979462,
0.3129129409790039,
0.4725243151187897,
-0.310504853725... |
def save _ game ( self ) : if self. game _ file = = none : while true : user _ input = input ( " type a filename to save to ( will be re - used next time you save : " ) # the filename must be at least 1 char long if user _ input = = " " : print ( " that's not a good filename... " ) continue # we don't allow the user to... | [
-0.7058797478675842,
-1.0614017248153687,
0.9287490248680115,
-0.230740025639534,
0.7450634837150574,
0.6391444802284241,
0.3426842987537384,
-0.424888014793396,
-0.8480591177940369,
0.018915165215730667,
-0.17169368267059326,
-0.1122637689113617,
-0.30467620491981506,
0.4451116621494293,
... |
def exists ( self, key : typing. anystr ) : | [
-1.2848989963531494,
0.16177725791931152,
0.21883928775787354,
-0.24747644364833832,
0.6909235715866089,
0.5105303525924683,
-1.5322949886322021,
0.023821702226996422,
-0.47844889760017395,
0.25707635283470154,
-0.1218264177441597,
0.039564233273267746,
-0.15158316493034363,
0.308985888957... |
def _ spr ( self ) : if self. limit = = np. inf : self. limit = self. size * 100 min _ tree = self. tree min _ score = self. tree. score iter = 0 while iter < self. limit : # choose a random edge that's not connected to the root ; first pick a random inner node, then pick one of its children. parent = random. choice ( ... | [
-0.3220479190349579,
0.0248304083943367,
0.8568758964538574,
-0.24962328374385834,
-0.3965137302875519,
-0.4055297076702118,
0.5997320413589478,
0.024970674887299538,
0.4933212399482727,
0.22946405410766602,
0.5348042249679565,
0.7192463278770447,
-0.7040819525718689,
-0.31433096528053284,... |
def popitem ( self ) : raise typeerror ( self. _ _ msg ) | [
0.14857704937458038,
0.4057895541191101,
0.3952725827693939,
0.4508764147758484,
0.4678614139556885,
0.7886115908622742,
0.3616142272949219,
-0.20904549956321716,
-0.6310386657714844,
0.5612636804580688,
0.6358488202095032,
0.402354896068573,
-0.911457896232605,
0.014005308970808983,
0.5... |
def add _ slicer _ pic ( fpath, slicergap, picwidth, qchtml ) : # # # figure out a name for the output image from the input file name basefpath = os. path. basename ( fpath ) stem = basefpath. replace ('nii. gz ','' ) pic = os. path. join ( qcpath, stem + '. png') # # make the pic using fsl's slicer function run ( " sl... | [
-0.2643652558326721,
-0.08157864212989807,
0.5927762985229492,
-0.32248958945274353,
-0.7947906851768494,
0.12880748510360718,
0.8476644158363342,
-0.14432914555072784,
-0.010004398413002491,
0.3326420187950134,
0.2900395393371582,
-0.5813831090927124,
0.20632337033748627,
0.15272101759910... |
def _ destination ( trigger ) : destination = trigger. get ('destination') if destination is none : return'' if'cloudrun'in destination : dest = destination. get ('cloudrun') # while not explicit in the api, these are effectively oneof. job = dest. get ('job') if job : return'cloud run job : { } '. format ( job ) servi... | [
-0.577890932559967,
-0.56708824634552,
0.43412500619888306,
-0.9354000091552734,
-0.3444744348526001,
-0.9019665122032166,
-0.3636486530303955,
-0.24571992456912994,
-0.2845325469970703,
0.2656894028186798,
0.19556425511837006,
0.09817424416542053,
0.75982666015625,
-0.6113273501396179,
... |
def gradtensor _ to _ npvec ( net, include _ bn = false ) : filter = lambda p : include _ bn or len ( p. data. size ( ) ) > 1 return np. concatenate ( [ p. grad. data. cpu ( ). numpy ( ). ravel ( ) for p in net. parameters ( ) if filter ( p ) ] ) | [
0.051145993173122406,
0.3909112811088562,
0.7217756509780884,
-0.04767205938696861,
0.7992644309997559,
0.751028835773468,
0.5840474367141724,
-0.20824646949768066,
-0.2884049117565155,
0.5760225057601929,
0.1766098588705063,
0.5985233187675476,
0.014815532602369785,
0.15629182755947113,
... |
def _ _ iadd _ _ ( self, other ) : if self. _ readonly : raise readonlyerror, read _ only _ message if isinstance ( other, meld ) : nodes = [ other. _ tree. getelementnode ( ). clone ( ) ] else : nodes = self. _ nodelistfromsource ( other ) self. _ tree. children. extend ( nodes ) return self | [
-0.2622090280056,
0.5913037657737732,
0.7716046571731567,
0.2761717438697815,
-0.5026637315750122,
1.0298645496368408,
-0.28139737248420715,
-0.4326029419898987,
1.4255951642990112,
0.006615801714360714,
-0.1669575721025467,
1.0999881029129028,
0.07575981318950653,
0.5259758830070496,
0.... |
def get _ quaggans _ ids ( self ) : return self. _ request ( " quaggans " ) | [
-0.8408341407775879,
0.029256727546453476,
0.1287449300289154,
0.30951425433158875,
0.022805724292993546,
-0.06363645941019058,
-0.5161431431770325,
-0.7146795988082886,
0.1709098219871521,
0.685101330280304,
-1.1557347774505615,
0.8607832789421082,
-0.49992358684539795,
-0.594425320625305... |
def reconfig _ eyeq _ get _ counter _ enable ( fpgaid, verbose = 1 ) : if ( verbose & 1 ) = = 1 : print " " " only available when you turn on the enable bit error rate block in the transceiver reconfiguration controller ip core gui. when set to 1, the counters accumulate bits and errors. when set to 0, pauses accumulat... | [
-0.16019774973392487,
0.30890849232673645,
0.80643630027771,
-0.5643675923347473,
-0.2741237282752991,
-0.2972537577152252,
0.7527489066123962,
0.2328805774450302,
-0.4544358253479004,
0.6901366710662842,
-0.1549452841281891,
0.4628884494304657,
-1.247279167175293,
0.7504242658615112,
1.... |
def setflighttrackmodel ( self, model ) : super ( ). setflighttrackmodel ( model ) if self. docks [ wms ] is not none : self. docks [ wms ]. widget ( ). setflighttrackmodel ( model ) | [
0.07654508203268051,
0.7743432521820068,
0.7909430265426636,
0.7762241363525391,
0.05455637723207474,
1.4925098419189453,
1.2963565587997437,
-1.0155341625213623,
-0.4973292350769043,
-0.3339511454105377,
-0.4399830996990204,
-0.33007657527923584,
-0.12797260284423828,
2.0390896797180176,
... |
def new _ output ( self, location : str ) - > outputfile : | [
0.27714914083480835,
-1.2920215129852295,
0.21518106758594513,
-0.00620653573423624,
-0.3318600058555603,
-0.28016790747642517,
0.4108858108520508,
-0.35965025424957275,
-1.2168564796447754,
-0.3995218575000763,
-0.39065778255462646,
-0.19379524886608124,
0.37067940831184387,
-0.8447957634... |
def run _ cxcalc ( mol _ string : str, args : list [ str ] ) : command = [ cxcalc _ bin ] + args try : logger. debug ( " parameters : % s | % s ", mol _ string, " ". join ( command ) ) # kms added in env for jupyter result = subprocess. run ( command, input = mol _ string, stdout = subprocess. pipe, stderr = subprocess... | [
0.8444607257843018,
-0.9092254042625427,
0.9028881788253784,
0.3528655171394348,
-0.5631181001663208,
0.4859902858734131,
-0.3355996310710907,
0.7901975512504578,
-0.5298351049423218,
0.3549981713294983,
-0.0615076944231987,
0.020646829158067703,
-0.44249725341796875,
0.32384902238845825,
... |
def save ( self, wclass, check _ exists = true ) : pass | [
-1.2503533363342285,
-0.36304613947868347,
0.5708115100860596,
0.749058187007904,
1.1072168350219727,
1.0155246257781982,
0.5029690265655518,
-0.571325421333313,
0.15649186074733734,
0.5682342052459717,
-0.7739863395690918,
0.0026106834411621094,
-0.6232421398162842,
1.2017438411712646,
... |
def ibn _ conv1x1 _ block ( in _ channels, out _ channels, stride = 1, groups = 1, bias = false, use _ ibn = false, activate = true ) : return ibnconvblock ( in _ channels = in _ channels, out _ channels = out _ channels, kernel _ size = 1, stride = stride, padding = 0, groups = groups, bias = bias, use _ ibn = use _ i... | [
0.035917460918426514,
-0.1387600600719452,
0.6503779888153076,
1.0597556829452515,
-0.8759138584136963,
0.3040470778942108,
-0.20664505660533905,
-0.48280081152915955,
-0.4965521991252899,
0.49524369835853577,
0.4025196135044098,
1.1654099225997925,
-1.1880537271499634,
-0.1178866475820541... |
def reshape _ text ( buffer, from _ row, to _ row ) : lines = buffer. text. splitlines ( true ) lines _ before = lines [ : from _ row ] lines _ after = lines [ to _ row + 1 : ] lines _ to _ reformat = lines [ from _ row : to _ row + 1 ] if lines _ to _ reformat : # take indentation from the first line. length = re. sea... | [
0.5503328442573547,
0.06257942318916321,
0.8238769173622131,
-0.6521243453025818,
-0.8772996068000793,
-1.2928476333618164,
-0.18298423290252686,
0.8973886370658875,
0.10285410284996033,
-0.15919098258018494,
0.4942653179168701,
0.1272154450416565,
-0.2785235047340393,
-0.8125895261764526,... |
def decode ( self, s ) : # method 1 # output = [ ] # while s! ='' : # idx = s. index ('#') # header = s [ : s. index ('#') ] # next _ word _ len = int ( header ) # next _ word = s [ idx + 1 : idx + 1 + next _ word _ len ] # output. append ( next _ word ) # s = s [ idx + 1 + next _ word _ len : ] # return output # metho... | [
0.044142819941043854,
-0.5354539155960083,
0.8305315375328064,
-0.07258842885494232,
-0.6052444577217102,
-0.9462404251098633,
0.3602811098098755,
0.2758936583995819,
0.4133007526397705,
0.25625932216644287,
-0.486797571182251,
0.1874230057001114,
-0.8015345931053162,
-0.19130899012088776,... |
def _ find _ nn _ route ( destinations, route, total _ time ) : if len ( destinations ) = = 0 : return route, total _ time # find previous point and index of point to add start = none for i, p in enumerate ( route ) : if p is none : start = route [ i - 1 ] break closest, min _ dist = find _ closest ( start, destination... | [
-0.3752550184726715,
0.18111754953861237,
0.7433598637580872,
0.38393330574035645,
0.0551077239215374,
-0.4999144375324249,
-0.36042332649230957,
-0.3308523893356323,
-0.25966528058052063,
1.1415692567825317,
0.02115457132458687,
-0.21715329587459564,
-0.1589101403951645,
0.688120782375335... |
def test _ app _ update _ mutation _ out _ of _ scope _ permissions ( app, permission _ manage _ apps, permission _ manage _ products, permission _ manage _ users, staff _ api _ client, staff _ user, ) : query = app _ update _ mutation staff _ user. user _ permissions. add ( permission _ manage _ apps, permission _ man... | [
-0.03427457809448242,
-0.10264233499765396,
0.5327712297439575,
0.5910311341285706,
-0.12567949295043945,
0.5279759168624878,
0.17054146528244019,
-0.8863499760627747,
0.20552968978881836,
1.0008326768875122,
0.3351365625858307,
0.6887983083724976,
-0.14494682848453522,
-0.4315166473388672... |
def create _ dict ( presschartimeline, presstimeline, releasechartimeline, releasetimeline, datadict ) : runninghistory = " " for char in presschartimeline : if char not in runninghistory : runninghistory + = char numuniquechar = len ( runninghistory ) - 1 # do not count the / n presstiminglist = [ [ ] for i in range (... | [
-0.09907472878694534,
-0.36454856395721436,
0.6819795966148376,
-0.5342065095901489,
-0.45763924717903137,
0.10060743242502213,
-0.19141064584255219,
0.6484265923500061,
-0.5479985475540161,
0.6828672885894775,
-0.5017774105072021,
0.15986886620521545,
-0.4577416479587555,
-0.0790151283144... |
def deal _ and _ serialize _ hands ( self ) : cards = np. arange ( 52 ) np. random. shuffle ( cards ) hands = np. split ( cards, 4 ) serialized _ hands = [ ] for hand in hands : serialized _ hand = np. zeros ( ( 52, ) ) for card in hand : serialized _ hand [ card ] = 1 serialized _ hands. append ( serialized _ hand ) r... | [
-0.9119651913642883,
-0.07911667227745056,
0.673125684261322,
0.08805268257856369,
0.6340218782424927,
0.3915567994117737,
0.11050815880298615,
0.20094968378543854,
1.2779959440231323,
-0.3465211093425751,
-0.2159985899925232,
0.0905672162771225,
-0.5475969910621643,
0.3392016291618347,
... |
def _ get _ radius ( self ) : mag _ a = self. a. norm ( ) mag _ b = self. b. norm ( ) mag _ c = self. c. norm ( ) if np. allclose ( ( mag _ a, mag _ b ), ( mag _ b, mag _ c ) ) : return mag _ a else : return none | [
0.2545810639858246,
-0.8248009085655212,
0.7079076766967773,
-0.8205894827842712,
0.44217026233673096,
-0.22278054058551788,
0.031349655240774155,
-0.6997376680374146,
-0.40577811002731323,
0.512499213218689,
1.1606799364089966,
0.33866938948631287,
-1.4482613801956177,
-0.1336549818515777... |
def get _ report _ path ( self ) : report _ path = os. path. join ( filepath, " report " ) if not os. path. exists ( report _ path ) : os. mkdir ( report _ path ) report _ path = os. path. join ( report _ path,'testreport. html') return report _ path | [
1.0596879720687866,
0.9151300191879272,
0.5878176093101501,
0.205614373087883,
1.0436774492263794,
0.2663387358188629,
2.1231331825256348,
-0.2206796407699585,
-0.11803056299686432,
-0.62675541639328,
0.5482847094535828,
-0.8433629274368286,
-1.2734334468841553,
0.18357622623443604,
-0.1... |
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, args : optional [ sqlresourcesqlcontainerargs ] = none, opts : optional [ pulumi. resourceoptions ] = none ) :... | [
0.9480040669441223,
0.14280261099338531,
0.4718835949897766,
-0.5045283436775208,
-0.26787039637565613,
-0.011745603755116463,
-0.6630442142486572,
0.20973724126815796,
0.673274040222168,
-0.5193380117416382,
0.28316137194633484,
-0.3496268093585968,
0.45082220435142517,
-0.625845611095428... |
def iso _ to _ utc ( iso ) : timestamp = parser. parse ( iso ) timestamp = timestamp. replace ( tzinfo = pytz. utc ) return timestamp | [
-0.059399012476205826,
-0.8808525204658508,
0.5905643105506897,
-0.5353288054466248,
-0.18383000791072845,
-0.07307813316583633,
0.4249717891216278,
1.1562882661819458,
0.4803147614002228,
0.29390445351600647,
-0.810700535774231,
-0.5175753235816956,
0.5290476083755493,
-1.8166526556015015... |
def export ( ) : import textwrap lines = [ ] sections = set ( ) for prop in option. unsorted _ items : if prop. section not in sections : if sections : lines. append ('' ) lines. append ('[ % s ]'% prop. section ) sections. add ( prop. section ) lines. append ('\ n '. join ( ['# % s'% i for i in textwrap. wrap ( prop. ... | [
0.35595518350601196,
-0.8374720811843872,
0.772705078125,
-0.5040650367736816,
-0.04404802992939949,
0.433508038520813,
-0.8154730200767517,
-0.6439159512519836,
-0.5213431119918823,
0.6573747992515564,
0.29762977361679077,
0.09536604583263397,
0.8498226404190063,
0.3812643885612488,
-0.... |
def decode _ dict ( data : dict [ bytes, bytes ] ) - > dict [ str, str ] : ret = { } for key, value in data. items ( ) : if isinstance ( key, bytestring ) : key = key. decode ( ) if isinstance ( value, ( mapping, dict ) ) : ret [ key ] = decode _ dict ( value ) elif isinstance ( value, bytestring ) : ret [ key ] = valu... | [
0.003406127216294408,
0.02407912351191044,
0.6501680016517639,
-0.40771523118019104,
-1.2438982725143433,
-0.34507083892822266,
-0.6619949340820312,
0.09197614341974258,
0.3176514804363251,
-0.7501215934753418,
0.015779294073581696,
-0.1239643469452858,
-0.39395710825920105,
0.699971675872... |
def getpartsasync ( self ) : if not self. size : raise ndb. return ( none ) string _ id = self. key. string _ id ( ) part _ keys = [ ndb. key ( multipartentity, string _ id, partentity, i + 1 ) for i in range ( self. size ) ] part _ entities = yield ndb. get _ multi _ async ( part _ keys ) serialized =''. join ( p. val... | [
-0.3174556791782379,
0.32572272419929504,
0.5222317576408386,
-0.3429268002510071,
0.045349135994911194,
-0.4183220863342285,
-1.5633859634399414,
-0.596051037311554,
-0.21901443600654602,
0.22240503132343292,
-0.4282315671443939,
-0.13748055696487427,
-0.8267243504524231,
0.18019619584083... |
def test _ redirect _ request _ with _ forced _ code _ challenge ( self ) - > none : req = mock ( spec = [ " cookies " ] ) req. cookies = [ ] url = urlparse ( self. get _ success ( self. provider. handle _ redirect _ request ( req, b " http : / / client / redirect " ) ) ) # ensure the code _ challenge param is added to... | [
-0.24415592849254608,
0.5307283997535706,
0.5183011889457703,
0.23435047268867493,
0.8637701869010925,
-0.30316436290740967,
0.12682028114795685,
-0.06784894317388535,
0.5073391199111938,
-0.7505993247032166,
-0.6150309443473816,
0.4959608018398285,
0.027346979826688766,
0.4686690270900726... |
def cluster _ with _ mohgp ( probestocluster, organ, strain, k, alpha, path, seed = 0 ) : # to reproduce results np. random. seed ( seed ) # load gene expression data and assign training data # remember column names are of the type day. nreplicate e. g 3. 4 = day 3, replicate 4 data = pd. read _ csv ( os. path. join ( ... | [
0.5793738961219788,
0.00149127549957484,
0.9123587608337402,
0.389303058385849,
0.0015234460588544607,
0.4994383454322815,
0.2053905874490738,
0.48904407024383545,
-0.27052900195121765,
0.570053219795227,
0.6097576022148132,
0.8071326017379761,
-0.36748555302619934,
-0.2569196820259094,
... |
def complement ( l, universe = none ) : if universe is not none : universe = set ( universe ) else : universe = set ( range ( min ( l ), max ( l ) + 1 ) ) return sorted ( universe - set ( l ) ) | [
-0.4661370813846588,
-0.20999905467033386,
0.4984935522079468,
0.8593927025794983,
-1.0585886240005493,
0.36946654319763184,
-0.39883628487586975,
0.675708532333374,
0.8154245018959045,
-0.3706302046775818,
-1.0908985137939453,
0.0909854844212532,
-0.7366947531700134,
0.30061593651771545,
... |
def textsize ( self, text, font = none, spacing = 4, direction = none, features = none, language = none, stroke _ width = 0, ) : if self. _ multiline _ check ( text ) : return self. multiline _ textsize ( text, font, spacing, direction, features, language, stroke _ width ) if font is none : font = self. getfont ( ) ret... | [
0.3228386640548706,
0.626897931098938,
0.6635280251502991,
-0.24416494369506836,
-0.8500454425811768,
-1.2568507194519043,
-0.6653540134429932,
0.843921422958374,
0.619329035282135,
-0.5364136695861816,
-0.36774274706840515,
-0.1558351367712021,
-0.3551202118396759,
0.500327467918396,
-0... |
def parse _ vcf _ file ( vcf _ file ) : parsed _ vcf = collections. counter ( ) for line in vcf _ file : if line. startswith ( " # " ) : continue line = line. strip ( ). split ( ) if parsed _ vcf [ line [ 0 ] ] = = 0 : parsed _ vcf [ line [ 0 ] ] = collections. counter ( ) if len ( line [ 4 ] ) > 1 : if len ( line [ 4 ... | [
0.4616820216178894,
-0.110932357609272,
0.5387752056121826,
0.23115935921669006,
0.14455054700374603,
-0.5785952210426331,
0.7938765287399292,
0.9962721467018127,
-0.520458996295929,
0.20077677071094513,
-0.4181972146034241,
-0.6898856163024902,
-0.5081369280815125,
0.04455690085887909,
... |
def main ( ) - > int : return _ sum _ even _ fibonacci _ up _ to ( 4 _ 000 _ 000 ) | [
0.35876789689064026,
0.7586562633514404,
0.5477802753448486,
0.8633652925491333,
0.34856170415878296,
-0.9416409134864807,
1.1332893371582031,
0.06708338856697083,
-0.3704143464565277,
0.4152524769306183,
-0.7516723871231079,
0.07508315145969391,
0.042168017476797104,
-0.10190782696008682,... |
def comm _ confirmation ( self ) : self. log. debug ('= = = = = = = = = = = = = = = = = = = \ starting thread comm _ confirmation = = = = = = = = = = = = = = = = = = =') self. act = connection. server ('', 5008 ) self. act. connect ( ) self. act. accept ( ) count = 0 while true : # finishes if flag is set if self. fini... | [
-0.15875035524368286,
-1.047656536102295,
0.7965233325958252,
0.045293182134628296,
0.24791811406612396,
0.46500831842422485,
0.6637808084487915,
-0.01815708912909031,
-0.7148513197898865,
0.643597424030304,
0.4099269211292267,
0.4110715091228485,
-0.5868885517120361,
1.2824819087982178,
... |
def getsortedpagesqueryset ( self, book ) : return self. filter ( book = book ). order _ by ('page _ number') | [
-0.06269537657499313,
-0.449987530708313,
0.3404751718044281,
1.002685308456421,
0.26889997720718384,
0.08204344660043716,
-0.9641847610473633,
-0.879798948764801,
-0.7695621252059937,
-0.24223174154758453,
0.7893323302268982,
-0.4510469138622284,
-0.04865776374936104,
-0.10719023644924164... |
def deviceindependentsize ( self ) - > _ n _ 10 _ t _ 0 : | [
-0.5674354434013367,
1.4734327793121338,
0.4010786712169647,
0.032952796667814255,
0.5952638983726501,
0.5506193041801453,
2.139416217803955,
0.6589915156364441,
-0.3190688490867615,
-1.604138731956482,
-0.9100379943847656,
-0.5931990742683411,
-0.4282650649547577,
1.365975260734558,
1.8... |
def winbio _ winbioclosesession ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " sessionhandle " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value ) | [
-0.5339811444282532,
-0.8690757155418396,
0.5134247541427612,
0.790273129940033,
-0.5434017181396484,
1.0559598207473755,
1.6740676164627075,
-1.0793955326080322,
0.14381501078605652,
0.02782166190445423,
-0.07051412761211395,
0.043697718530893326,
-1.8003250360488892,
0.6957800984382629,
... |
def convert _ time ( time : str ) - > int : endresult = 0 data = re. findall ( regex, time ) for key in data : value = int ( key [ 0 ] [ : - 1 ] ) result = value * times [ key [ 1 ] ] endresult + = int ( result ) return endresult | [
-1.1005830764770508,
0.18064039945602417,
0.847541093826294,
-0.3592340350151062,
0.14406181871891022,
-1.039340853691101,
0.04651184380054474,
0.23953798413276672,
-0.5880706310272217,
1.0107744932174683,
-1.027022361755371,
-1.0159687995910645,
-0.7022222280502319,
0.6856819987297058,
... |
def transitive _ member _ of ( self ) : return self. properties. get ('transitivememberof ', directoryobjectcollection ( self. context, resourcepath ( " transitivememberof ", self. resource _ path ) ) ) | [
0.202893927693367,
-0.02621050551533699,
0.4335058033466339,
-0.24288420379161835,
0.5117844343185425,
-0.34886690974235535,
0.7374727129936218,
-0.6164652705192566,
0.18096032738685608,
-0.8073568940162659,
0.062333181500434875,
-0.0528327152132988,
-0.6539520025253296,
-1.058093905448913... |
def getexperimentmetadata ( self, experimentname ) : experimentdesc = self. getexperimentdescriptor ( experimentname ) # # get the entities types query ='''{ entitiestypes ( experimentid : " % s " ) { key name numberofentities properties { key type label description required trialfield value } } }'''% experimentdesc ['... | [
0.25951623916625977,
0.4447700083255768,
0.6848207116127014,
-1.3130112886428833,
-0.07044891268014908,
0.12911859154701233,
-0.49598222970962524,
-0.46156996488571167,
-0.16278469562530518,
0.6203731894493103,
-0.22105444967746735,
0.41144320368766785,
0.17578677833080292,
0.7709606289863... |
def life _ step ( x ) : nbrs _ count = sum ( np. roll ( np. roll ( x, i, 0 ), j, 1 ) for i in ( - 1, 0, 1 ) for j in ( - 1, 0, 1 ) if ( i! = 0 or j! = 0 ) ) return ( nbrs _ count = = 3 ) | ( x & ( nbrs _ count = = 2 ) ) | [
-0.38045963644981384,
0.8665130138397217,
0.7213886380195618,
0.5455818772315979,
-0.4465245008468628,
0.40558019280433655,
-0.8138626217842102,
-0.17080114781856537,
0.523352324962616,
0.058603525161743164,
-1.0912108421325684,
-0.9138128161430359,
-0.15113945305347443,
0.7472264170646667... |
def testpredict ( countsin = 55000. 0, colcut = 631, rowcut = 529 ) : dd = flatstack ( ) dd. loadexpon ( ) dd. loadvslinear ( ) dd. predictdeficitvslinear ( countsin ) # dd. predictdeficitexpon ( countsin ) dd. smoothdeficitpred ( ) print n. shape ( dd. aimgpred ) # return # show this p. figure ( 5 ) p. clf ( ) p. subp... | [
0.263085275888443,
0.047204919159412384,
0.864144504070282,
0.46271368861198425,
-0.506925642490387,
0.5983864068984985,
0.40788647532463074,
0.022759415209293365,
0.48018383979797363,
-0.23476199805736542,
0.5576651692390442,
1.077709674835205,
0.37283265590667725,
0.46250441670417786,
... |
def getmaximumsubset ( words ) : a = set ( [''. join ( sorted ( i ) ) for i in words ] ) return len ( a ) | [
1.264156699180603,
0.8454386591911316,
0.5417965054512024,
-0.166435107588768,
-1.1843674182891846,
-0.28071728348731995,
-0.80426424741745,
0.06576067954301834,
-0.09899389743804932,
0.3273334205150604,
0.008540738373994827,
0.4793400764465332,
-0.5662881731987,
0.0807996541261673,
-1.2... |
def cache _ password ( self, symbol ) : self. cump _ old = self. cump self. reset _ cump ( ) | [
-0.2337687760591507,
-0.35523319244384766,
0.44673895835876465,
-0.04944339394569397,
0.38797470927238464,
-0.35439401865005493,
1.5038386583328247,
-0.14415639638900757,
0.6923533082008362,
0.6425506472587585,
-0.8853958249092102,
0.9910178184509277,
0.4721819758415222,
-0.182665258646011... |
def _ _ getitem _ _ ( self, index : union [ int, slice ] ) - > _ t : if isinstance ( index, slice ) : # handle indices and call range _ sum length = len ( self ) start, end = index. start, index. stop if start is none : start = 0 else : start = start + length if start < 0 else start if end is none : end = length - 1 el... | [
-0.2727837860584259,
0.44282692670822144,
0.6670467257499695,
-0.19295348227024078,
-0.14780479669570923,
-0.5258077383041382,
0.4122648537158966,
-0.7126112580299377,
1.209812045097351,
-0.1021709218621254,
-0.22895392775535583,
0.556164026260376,
-0.017618197947740555,
-1.132600545883178... |
def integer _ var ( min = none, max = none, name = none, domain = none ) : return cpointvar ( _ build _ int _ var _ domain ( min, max, domain ), name ) | [
0.034002356231212616,
0.03925812616944313,
0.38831469416618347,
0.06481385231018066,
-1.041595220565796,
-0.3210383951663971,
-0.3390936255455017,
-0.4942498803138733,
-0.3237661123275757,
-0.4251525104045868,
-1.081199288368225,
1.0538944005966187,
-0.37773263454437256,
-0.869761884212493... |
def change _ chid ( self, old, new ) : if len ( old ) = = len ( new ) and len ( old ) > 0 : d = { } for o, n in zip ( old, new ) : d [ o ] = n for atom in self : if atom. chid in d : atom. chid = d [ atom. chid ] return self | [
0.17293860018253326,
-0.5889684557914734,
0.6327164769172668,
-0.28592899441719055,
-0.3763391077518463,
0.04572678729891777,
-0.5833977460861206,
0.558011531829834,
-1.1856160163879395,
1.0668202638626099,
-0.9140635132789612,
1.2153682708740234,
-0.35078513622283936,
0.45651715993881226,... |
def assemble _ default _ config ( modules ) : def work _ in ( config, module, name ) : local _ config = dict ( getattr ( module,'default _ config ', { } ) ) config. update ( local _ config ) return _ walk _ config ( dict ( ), modules, work _ in, required = false ) | [
-1.0740379095077515,
-0.7310839295387268,
0.20558716356754303,
0.22447825968265533,
0.2377159148454666,
-0.020193777978420258,
0.10137199610471725,
0.031384509056806564,
-0.6578546762466431,
0.5686296224594116,
-0.5329140424728394,
-0.9501710534095764,
-0.32953712344169617,
1.1881316900253... |
def intersector ( x, y ) : parity _ x = x % 2 parity _ y = y % 2 if parity _ x = = 1 : if parity _ y = = 1 : return min ( x, y ) else : return y if parity _ x = = 0 : if parity _ y = = 0 : return max ( x, y ) else : return x | [
-0.036844637244939804,
0.3780321180820465,
1.0273106098175049,
0.38809382915496826,
-0.6570481657981873,
0.13254031538963318,
-1.3702328205108643,
-0.23184148967266083,
-0.2016509622335434,
0.1697463095188141,
1.1094459295272827,
0.2090342491865158,
-0.38215208053588867,
0.0877650529146194... |
def _ process _ neuron _ params ( self, neuron _ id, conf ) : if neuron _ id not in self. neurons : err ( " cannot set parameters for unknown neuron'% s'" % neuron _ id ) current = self. neurons [ neuron _ id ] if " type " not in current or " type " in conf : current [ " type " ] = conf. get ( " type ", " simple " ) if... | [
-0.43162432312965393,
-0.6703528165817261,
0.37869372963905334,
-0.20703309774398804,
0.8370398879051208,
-0.1412545144557953,
-0.1326778531074524,
0.6009207367897034,
-0.5191198587417603,
1.2669811248779297,
-0.3415943682193756,
0.693566620349884,
-0.1333504617214203,
1.2755365371704102,
... |
def loader _ cgd ( file _ list ) : x _ set = [ ] y _ set = [ ] with fileinput. input ( files = file _ list ) as f : frag = [ ] for line in f : if'-'* 5 not in line : frag. append ( line [ : - 1 ] ) else : x _ set. append ( frag [ 2 : - 1 ] ) y _ set. append ( int ( frag [ - 1 ] ) ) frag = [ ] return x _ set, y _ set | [
-0.27636104822158813,
-0.39602261781692505,
0.5812265872955322,
-0.6094720363616943,
-0.3604298233985901,
0.45862942934036255,
0.054137375205755234,
0.3709038496017456,
-1.3073794841766357,
0.06876245141029358,
0.012973552569746971,
-0.45077770948410034,
-0.6130223870277405,
1.209210991859... |
def is _ valid ( self ) : if not getattr ( self. sender, settings. msocks _ allow _ parameter, false ) : # this model does not allow subscriptions return false return true | [
0.42710211873054504,
1.1046050786972046,
0.6551374197006226,
0.7060478329658508,
-0.6246633529663086,
0.6598955988883972,
0.07287324965000153,
-0.8888989686965942,
0.24246126413345337,
0.46530041098594666,
0.29805830121040344,
-0.177625373005867,
-1.1196627616882324,
0.7235405445098877,
... |
def execute ( self, scheduler, product, * subjects ) : request = scheduler. execution _ request ( [ product ], subjects ) result = scheduler. execute ( request ) if result. error : raise result. error states = [ state for _, state in result. root _ products ] if any ( type ( state ) is not return for state in states ) ... | [
-0.5261366963386536,
-0.12955433130264282,
0.49079686403274536,
1.204724669456482,
-0.021665893495082855,
0.231241837143898,
-0.8011918067932129,
-0.6339695453643799,
0.4692092835903168,
0.3739837408065796,
0.41343656182289124,
-0.19672252237796783,
0.2804526388645172,
-0.27733367681503296... |
def parse _ fight ( self, response, fight _ id, fighter _ 1 _ last, fighter _ 2 _ last, correct _ position ) : media _ decisions = ( response. xpath ('/ / body / div') [ 0 ]. xpath ('table') [ - 1 ]. xpath ('tr') [ 0 ]. xpath ('td') [ 0 ] \. xpath ('table') [ 1 ]. xpath ('tr / td') [ 0 ]. css ( '. decision') ) # create... | [
0.18223842978477478,
-0.07038863003253937,
1.0047637224197388,
0.4119114279747009,
0.848524272441864,
-0.3756638765335083,
0.13489362597465515,
0.2841392457485199,
-1.4151984453201294,
0.12223544716835022,
0.14845748245716095,
-0.9820610284805298,
0.2535427212715149,
0.7323595881462097,
... |
def test _ purge _ put _ and _ get _ archive ( self ) : archive = { " user1 " : { " schema1 " : { " schema " : { " field1 " : { " type " : " string " } }, " data " : { " datum1 " : { " field1 " : " foo " }, }, }, " schema2 " : { " schema " : { " field2 " : { " type " : " string " } }, " data " : { " datum2 " : { " fiel... | [
-0.008881916292011738,
0.013854678720235825,
0.6056840419769287,
-0.8179186582565308,
0.522584855556488,
-0.2936302423477173,
-0.1754840463399887,
-0.28940945863723755,
0.5984999537467957,
-0.034783970564603806,
-1.1138486862182617,
0.5831822156906128,
-0.38944122195243835,
-0.914575576782... |
def test _ get _ team _ roster ( self ) : pass | [
0.13987040519714355,
0.42216727137565613,
0.17515450716018677,
0.3248302638530731,
0.5299158692359924,
-0.2221752256155014,
0.3818106949329376,
0.06114595755934715,
-0.4854786992073059,
-0.38072776794433594,
-1.4580588340759277,
-0.4334114193916321,
-0.9667152166366577,
-0.1460365206003189... |
def run ( cls ) : logger. info ( f " run manager - ai " ) tasks = cls. get _ tasks ( ) logger. info ( f " found { len ( tasks ) } new tasks in { config _ file _ path } " ) if tasks : old _ tasks _ count = mongo _ client [ database _ name ] [ " jobs " ]. count _ documents ( { } ) if old _ tasks _ count > 0 : mongo _ cli... | [
-0.15192696452140808,
0.07361637055873871,
0.8500809669494629,
0.17540757358074188,
0.41974061727523804,
0.16910859942436218,
0.40013036131858826,
0.4485716223716736,
-0.4909183084964752,
0.7479410767555237,
-0.10643065720796585,
-0.44044071435928345,
0.31322526931762695,
1.091559767723083... |
def interp _ new _ vertical ( z _ old, z _ new, v _ old ) : ( jpk _ new, jpj, jpi ) = z _ new. shape ( jpk _ old, jpj, jpi, jpt ) = v _ old. shape v _ new = np. empty ( ( jpk _ new, jpj, jpi, jpt ) ) # omp parallel for collapse ( 3 ) for ji in range ( jpi ) : for jj in range ( jpj ) : for jk in range ( jpk _ new ) : # ... | [
0.09401067346334457,
-0.32055774331092834,
1.1202672719955444,
-0.0259565357118845,
-0.4053703844547272,
-0.37763091921806335,
0.6953838467597961,
-0.3124716281890869,
0.1884233057498932,
0.8243895173072815,
-0.036791589111089706,
0.6400415897369385,
-0.7010403275489807,
0.0208985712379217... |
def applicable ( dataset ) : return len ( dataset. data. axes ) = = 3 | [
0.6185201406478882,
1.1729973554611206,
0.3499179184436798,
-0.7191028594970703,
-0.3264646530151367,
0.5929064750671387,
-0.7461149096488953,
0.7646188735961914,
0.9034242630004883,
-0.28792548179626465,
0.16775254905223846,
-0.08199644088745117,
0.6669716238975525,
-0.25832754373550415,
... |
def fitdeltacounts ( self ) : self. b2fit = ( ~ self. blinear ) & ( self. vthisdeficit > 0 ) # can't do anything if bad if n. size ( n. where ( self. b2fit ) [ 0 ] ) < 2 : self. vparsdeficit = n. zeros ( 2 ) return # be a bit smarter about this... use all points brighter than # the dimmest of these countsmin = n. min (... | [
1.328440546989441,
-1.1514984369277954,
0.5744004249572754,
0.4858892858028412,
-0.09389116615056992,
0.8838232755661011,
-0.3248463273048401,
-0.22098617255687714,
0.020177070051431656,
-0.8540694117546082,
0.0008772856090217829,
1.0955852270126343,
-0.17770500481128693,
0.352550148963928... |
def on _ logout ( self, data ) : self. logout _ user ( ) | [
0.26861572265625,
-0.6541158556938171,
0.0344068743288517,
0.011410446837544441,
-0.013243418186903,
-0.3874821066856384,
-0.16849972307682037,
0.17835931479930878,
0.5672760009765625,
-0.1275441199541092,
-0.7327525019645691,
-0.12009737640619278,
0.6899040937423706,
-1.2879817485809326,
... |
def generator _ loss _ fn ( y _ generated, data _ label = 0 ) : assert data _ label = = 1 or data _ label = = 0 # todo : # implement the generator loss. # think about what you need to compare the input to, in order to # formulate the loss in terms of binary cross entropy. labels = torch. full _ like ( y _ generated, da... | [
-0.9451110363006592,
-0.29335930943489075,
0.4761364758014679,
0.2536449730396271,
0.15107214450836182,
-0.08518458902835846,
1.0889519453048706,
-0.07792878895998001,
-0.5628171563148499,
-0.8787965178489685,
-0.25024840235710144,
-0.22804215550422668,
0.301085889339447,
-0.04617141187191... |
def _ compute _ power _ series ( self, n, abs _ prec, cache _ ring = none ) : if n < = 1 : if n < = - 1 : return polynomialrealdense ( realfield ( abs _ prec ) ['x'] ) if n = = 0 : return polynomialrealdense ( realfield ( abs _ prec ) ['x'], [ 1 ] ) elif n = = 1 : nterms = ( rdf ( abs _ prec ) * rdf ( 2 ). log ( ) / rd... | [
0.11705037951469421,
0.2723132073879242,
0.7612537145614624,
0.08443548530340195,
-0.27657777070999146,
-0.22529290616512299,
-0.5648840665817261,
-0.19001217186450958,
-0.00006822044088039547,
0.24740202724933624,
0.48873189091682434,
0.24658066034317017,
0.29825061559677124,
-0.481443345... |
def launch ( cli _ context, cluster _ name, num _ slaves, install _ spark, spark _ version, ec2 _ key _ name, ec2 _ identity _ file, ec2 _ instance _ type, ec2 _ region, ec2 _ availability _ zone, ec2 _ ami, ec2 _ spot _ price, ec2 _ vpc _ id, ec2 _ subnet _ id, ec2 _ placement _ group, ec2 _ tenancy, ec2 _ ebs _ optim... | [
-0.25535693764686584,
-0.27496692538261414,
0.64317387342453,
0.4814057946205139,
0.024662764742970467,
0.22253713011741638,
-0.5096762180328369,
0.6128433346748352,
0.9194120764732361,
0.7197933197021484,
0.41221773624420166,
1.1589046716690063,
0.47315365076065063,
-0.1574714630842209,
... |
def path2id ( path ) : return path. split ( '.') [ 0 ] | [
-0.13752463459968567,
-1.2417501211166382,
0.4934786260128021,
0.062225520610809326,
0.4809005856513977,
0.5496723651885986,
0.5456693768501282,
-0.42097148299217224,
0.8611787557601929,
0.4842471182346344,
-0.4347146451473236,
0.42732134461402893,
-0.6916955709457397,
-1.6278568506240845,... |
async def get _ coins _ of _ interest ( self, ) - > set [ bytes32 ] : coin _ ids = await self. trade _ store. get _ coin _ ids _ of _ interest _ with _ trade _ statuses ( trade _ statuses = [ tradestatus. pending _ accept, tradestatus. pending _ confirm, tradestatus. pending _ cancel ] ) return coin _ ids | [
0.0125724533572793,
0.9896649718284607,
0.3740297257900238,
-0.7750263214111328,
0.4724831283092499,
-0.30769070982933044,
-0.4387556314468384,
-0.8580332398414612,
-0.16605821251869202,
0.1606360226869583,
-0.4241075813770294,
1.8045055866241455,
-0.5721915364265442,
-0.6503618955612183,
... |
def _ _ init _ _ ( self, from _ name, from _ address, hostname, username, password, priority = 3, tls _ enabled = true, force _ tls = true ) : # make sure the variables are the correct type if not isinstance ( hostname, str ) : raise typeerror ( " the hostname must be a string " ) if not isinstance ( from _ address, st... | [
0.19633740186691284,
0.31737178564071655,
0.6856590509414673,
-0.09938658028841019,
-0.5670544505119324,
0.26962509751319885,
-0.8108241558074951,
0.8905674815177917,
-0.045273859053850174,
0.2475479543209076,
-0.5786375999450684,
0.5679866671562195,
-0.5208415985107422,
0.2531113624572754... |
def removemenuitems ( self ) - > _ n _ 7 _ t _ 1 [ int ] : | [
-1.2227851152420044,
0.6561417579650879,
0.41744670271873474,
1.2162764072418213,
-0.5200396776199341,
0.0992097407579422,
0.4186369478702545,
0.6160354614257812,
-0.5124114751815796,
-0.6126352548599243,
-1.1691584587097168,
-1.0296030044555664,
-0.8019883632659912,
0.7827296853065491,
... |
def test _ report _ good ( self ) : media _ group _ partner = mediapartner. objects. get ( id = 402 ) self. login ( media _ group _ partner. email ) response = self. client. get ('/ hudson - valley / media - partner / consumer - sign - ups / last - 12 - months /') self. assertequal ( response. status _ code, 200 ) self... | [
0.332719087600708,
0.8530307412147522,
0.4925496280193329,
0.042921338230371475,
0.448462575674057,
0.027513040229678154,
0.13660918176174164,
0.2834703326225281,
-0.06721577793359756,
-0.6299797296524048,
0.4219483435153961,
-0.2872377932071686,
-0.448563814163208,
-0.17382188141345978,
... |
def get _ int _ icode ( res _ seq ) : if not res _ seq [ - 1 ]. isdigit ( ) : int1 = int ( res _ seq [ 0 : len ( res _ seq ) - 1 ] ) icode = res _ seq [ - 1 ] else : int1 = int ( res _ seq ) icode = none return ( int1, icode ) | [
-0.7568798065185547,
-0.859219491481781,
0.5740320682525635,
-0.4805154800415039,
0.03475796431303024,
-1.3488759994506836,
0.41680485010147095,
0.2640978693962097,
-0.05784072354435921,
1.3308510780334473,
-0.36561763286590576,
-0.6966398358345032,
-1.3010982275009155,
-0.6973018646240234... |
def _ _ init _ _ ( self, restart _ file = none, * args, * * kwargs ) : super ( parallelislandmanager, self ). _ _ init _ _ ( * args, * * kwargs ) self. comm = mpi. comm _ world self. comm _ rank = self. comm. get _ rank ( ) self. comm _ size = self. comm. get _ size ( ) if restart _ file is none : # make coevolution is... | [
1.1543009281158447,
0.10291584581136703,
0.8150107860565186,
0.019047345966100693,
0.006158571690320969,
0.8818187117576599,
0.587164580821991,
0.9950588345527649,
-0.3284778594970703,
-0.576432466506958,
-0.12427067011594772,
0.3599286377429962,
-0.8575207591056824,
0.60911625623703,
-0... |
def safe _ exp ( log _ value ) : if log _ value is none : return 0. 0 return math. exp ( log _ value ) | [
1.701094627380371,
0.2025185525417328,
0.2096775770187378,
0.2967434227466583,
-0.15810184180736542,
-0.6079998016357422,
-0.26909539103507996,
0.037561073899269104,
0.6015214920043945,
-0.027222633361816406,
0.5703892111778259,
-0.013093553483486176,
-0.0753762274980545,
0.310094863176345... |
def refine _ conflict ( self ) : # ensure cpo model string has been generated with all constraints named if not self. model. _ ensure _ all _ root _ constraints _ named ( ) : # build and send new cpo model string self. context. model. name _ all _ constraints = true cpostr = self. _ get _ cpo _ model _ string ( ) # enc... | [
-0.3844252824783325,
-0.37296783924102783,
0.8087285161018372,
0.4433938264846802,
0.49344587326049805,
0.2028384655714035,
0.688843846321106,
-0.5374910831451416,
-0.647821843624115,
0.49464860558509827,
-0.7915148138999939,
0.13178855180740356,
-1.1462522745132446,
-0.39281702041625977,
... |
def challenge ( self, environ, status, app _ headers = ( ), forget _ headers = ( ) ) : resp = response ( ) resp. status = 401 resp. headers = self. forget ( environ, { } ) for headers in ( app _ headers, forget _ headers ) : for name, value in headers : resp. headers [ name ] = value resp. content _ type = " text / pla... | [
0.12119792401790619,
-1.014719843864441,
0.6428520083427429,
0.35002174973487854,
-0.08243797719478607,
0.00650213984772563,
-0.6675002574920654,
0.17542512714862823,
0.4682183861732483,
0.7195067405700684,
-0.26821115612983704,
-0.4596530795097351,
0.09004589915275574,
-0.3670580387115478... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.