text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ analyze _ bbox ( dat ) : with open ( dat,'rb') as f : reader = csv. reader ( f, delimiter ='\ t') minw, minh, maxw, maxh = 10e8, 10e8, - 1, - 1 for row in reader : bbox = row [ 2 ]. split ('' ) _, _, w, h = map ( int, bbox ) minw, minh, maxw, maxh = min ( minw, w ), min ( minh, h ), max ( maxw, w ), max ( maxh, h... | [
-0.09582426398992538,
-0.2920380234718323,
0.7021409869194031,
-0.3024436831474304,
0.14140088856220245,
-0.4599459767341614,
-0.4138442575931549,
-0.5365563631057739,
-0.28315868973731995,
-0.46015602350234985,
-0.6793472170829773,
-0.011056954972445965,
0.5123845934867859,
0.588795483112... |
def set _ app _ version _ config ( self ) : appversionconfig ( platform = " ios ", version = " 1. 1. 1 ", expire _ at = none, enabled = true ). save ( ) appversionconfig ( platform = " ios ", version = " 2. 2. 2 ", expire _ at = datetime ( 2014, 1, 1, tzinfo = utc ), enabled = true ). save ( ) appversionconfig ( platfo... | [
-0.29132646322250366,
-0.05744553729891777,
0.9343646764755249,
0.9176685810089111,
-0.4011208713054657,
0.6627414226531982,
-0.2997637689113617,
0.5231925845146179,
-0.21658013761043549,
1.784835934638977,
-1.6780407428741455,
-0.9588892459869385,
0.11961909383535385,
0.7351411581039429,
... |
def about ( ) : message = { " titles " : " welcome to business ", " description " : " this is a good venture " } return render _ template ( " about. html ", message = message ) | [
0.8512890338897705,
0.486674964427948,
0.48745033144950867,
0.38988804817199707,
0.27905043959617615,
0.18550650775432587,
-0.5056155323982239,
0.6904879212379456,
-0.9042477011680603,
0.2112719714641571,
0.6295862793922424,
0.1256098449230194,
-0.49525442719459534,
0.9537714719772339,
-... |
def test _ inheritance _ matches _ parental _ affected _ status _ biparental _ copy _ zero ( self ) : cnv = self. create _ variant ( " female " ) cnv. child. format ['inheritance'] = " unknown " cnv. child. format ['cifer _ inheritance'] = " biparental " cnv. child. info [ " cns " ] = " 0 " self. inh. trio. mother. aff... | [
0.18141129612922668,
-0.9519292116165161,
0.5135158896446228,
0.08705293387174606,
0.10440929979085922,
1.1209001541137695,
0.13642679154872894,
0.8320465683937073,
-0.17274931073188782,
-0.5535681247711182,
-0.8116633296012878,
0.5554460287094116,
-0.11940687894821167,
0.15684910118579865... |
def test _ complain _ no _ data _ multiple _ dbs ( self ) : def mock _ get _ history _ db _ config ( db ) : if db = = " usa - stk - 1d " : return { " bar _ size " : " 1 day ", " universes " : [ " usa - stk " ], " vendor " : " ibkr ", " fields " : { " close " : " float ", " open " : " float ", " high " : " float ", " lo... | [
-0.24179507791996002,
0.5371288657188416,
0.7306645512580872,
-0.4482576251029968,
0.7449573278427124,
0.2759369909763336,
0.7522103190422058,
-0.2772137224674225,
-0.29110556840896606,
-0.2568977475166321,
-0.12494315952062607,
0.03425844386219978,
-0.44366323947906494,
0.6529096961021423... |
def plot _ sample _ imgs ( img _ list, cols = 6, rows = none, plot _ sample = none, show = true, savepath = none ) : if plot _ sample is none : plot _ sample = len ( img _ list ) if ( rows is none ) or ( rows = = 0 ) or ( rows > plot _ sample ) : if ( cols is none ) or ( cols = = 0 ) : rows = int ( math. ceil ( plot _ ... | [
0.5103371143341064,
0.5757353901863098,
0.6832645535469055,
0.7978423237800598,
-0.7683535814285278,
-0.1062069833278656,
1.20718252658844,
0.3595266342163086,
1.0733623504638672,
0.18889868259429932,
0.2411569356918335,
0.24403387308120728,
-0.34199175238609314,
0.4389720857143402,
0.37... |
def update ( self, action ) : if not self. temp _ dino. is _ jumping and action = = actions. jump : self. temp _ dino. is _ jumping = true self. temp _ dino. is _ blinking = false self. temp _ dino. movement [ 1 ] = - 1 * self. temp _ dino. jump _ speed self. temp _ dino. update ( ) if not self. temp _ dino. is _ jumpi... | [
-0.8856714367866516,
-0.22288385033607483,
0.47847533226013184,
0.8639665246009827,
0.1406402438879013,
0.2097572237253189,
0.6470779180526733,
-1.1790430545806885,
-0.16340301930904388,
1.075129747390747,
-0.008310853503644466,
-0.03824746236205101,
-0.28303399682044983,
1.421629071235656... |
def get _ indirect _ outputs _ path ( project _ path ) : parent = _ get _ indirect _ parent _ path ( project _ path ) return parent / " outputs. yml " | [
0.9155858755111694,
-0.6187890768051147,
0.44187435507774353,
-0.21721571683883667,
-0.6282032132148743,
0.6951515078544617,
2.3409423828125,
-0.8644642233848572,
-1.2196019887924194,
-0.23019137978553772,
0.43316003680229187,
0.12852396070957184,
0.5593655109405518,
0.7469184398651123,
... |
def testcrosstable ( indatabase, schema, crosstablerules ) : db = leveldb. leveldb ( indatabase ) count = 0 outdict = none for key, value in db. rangeiter ( ) : count + = 1 data = loaddata ( value, schema ) rowresults = testcrosstablerow ( data, crosstablerules ) if not outdict : outdict = rowresults else : for x in ro... | [
0.114182248711586,
0.47789663076400757,
0.7641890048980713,
0.37950599193573,
-0.04419295862317085,
-0.6230929493904114,
0.46844959259033203,
0.40375491976737976,
-0.9171733260154724,
0.918738603591919,
-0.4964350759983063,
-0.2966497838497162,
-0.8309544920921326,
0.8887141942977905,
-0... |
def virtual _ name ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " virtual _ name " ) | [
0.6503885388374329,
-0.09099767357110977,
0.4421496093273163,
0.6594330072402954,
0.026997288689017296,
1.2366807460784912,
-0.22682352364063263,
-0.17894770205020905,
0.6033731698989868,
0.3355143368244171,
0.031665120273828506,
1.3168128728866577,
0.3821846842765808,
-0.9060264825820923,... |
def assign _ coordinates ( starting _ position : tuple, spacing : int ) - > dict : grid _ coordinates = { } for letter in string. ascii _ uppercase : y = int ( starting _ position [ 1 ] ) - ( ( string. ascii _ uppercase. index ( letter ) ) * spacing ) if letter = = " i " : break for i in range ( 1, 13 ) : x = int ( sta... | [
-0.6685990691184998,
-0.6446080207824707,
0.39265212416648865,
-0.7888808250427246,
-0.21530073881149292,
-0.6357742547988892,
0.21319037675857544,
0.7482842206954956,
-0.5555796027183533,
0.9933142066001892,
-0.9516701698303223,
-0.8880751729011536,
0.17748096585273743,
-0.192046225070953... |
def get _ user _ by _ email ( email : str ) - > user : return user. query. filter _ by ( email = email ). first ( ) | [
0.3101699948310852,
0.978008508682251,
-0.007103102747350931,
-0.2476329207420349,
1.1988344192504883,
-0.6078246831893921,
0.049864742904901505,
-0.35090136528015137,
-0.5906527042388916,
0.5371020436286926,
0.22230784595012665,
0.19555070996284485,
0.5051372647285461,
-1.0591822862625122... |
def acknowledge ( self, n = none, nmin = 0 ) : npassed = max ( self. passed ( ), nmin ) if n is none : nack = npassed else : nack = min ( npassed, n ) self. next + = self. period * nack return nack | [
0.0463135801255703,
0.28304323554039,
0.44236719608306885,
0.328488290309906,
-0.41397738456726074,
-0.14076411724090576,
0.3067821264266968,
-0.5016406774520874,
0.484466552734375,
-0.6586328148841858,
0.20770753920078278,
0.8672299385070801,
-0.390423446893692,
0.33048009872436523,
0.8... |
def find _ datestamp ( self, text = none ) : datestamp = none if not text is none : datestamp = self. extract _ datestamp ( text ) if datestamp is none and not self. dataset _ metadata is none : if'name'in self. dataset _ metadata : datestamp = self. extract _ datestamp ( self. dataset _ metadata ['name'] ) if datestam... | [
0.19488021731376648,
0.2634809613227844,
0.7760505080223083,
-0.16515180468559265,
-0.3100757896900177,
0.2186458855867386,
-0.29090580344200134,
-0.2824048697948456,
0.18566958606243134,
0.18655908107757568,
0.5188494324684143,
-0.2161741405725479,
-0.24731788039207458,
0.7312964797019958... |
def test _ valid _ data ( self ) : form = self. form _ data ( deadline _ 1 = " 2020 - 06 - 22 ", objective _ 1 = " objective 1 " ) self. asserttrue ( form. is _ valid ( ) ) | [
0.0853387638926506,
0.15156547725200653,
0.6099086403846741,
0.5290054678916931,
-0.2520061731338501,
1.8309078216552734,
-0.9635862112045288,
1.0762773752212524,
-0.30833572149276733,
-0.8721750378608704,
-0.3053419291973114,
-0.25343039631843567,
0.5488649606704712,
-0.7498835921287537,
... |
def draw _ cloud ( x, y, w, oblateness ) : a = 2 / 13 * w # read documentation to know what the'a'and'b'is. b = a / oblateness ellipse ( screen, white, [ x + 3 / 4 * a, y - 3 * b, 2 * a, 2 * b ] ) ellipse ( screen, gray, [ x + 3 / 4 * a, y - 3 * b, 2 * a, 2 * b ], 1 ) ellipse ( screen, white, [ x + 9 / 4 * a, y - 3 * b... | [
-0.011893064714968204,
0.21570870280265808,
1.327122449874878,
-1.1047661304473877,
0.04603315889835358,
0.6855830550193787,
0.18715962767601013,
-0.9679451584815979,
0.8090035319328308,
0.44122037291526794,
0.22873017191886902,
-0.16035686433315277,
0.3833096921443939,
0.27852368354797363... |
def symmetric _ mean _ absolute _ percentage _ error ( actual, forecast ) : with warnings. catch _ warnings ( ) : warnings. simplefilter ( " ignore ", category = runtimewarning ) smape = ( np. nansum ( ( abs ( forecast - actual ) / ( abs ( forecast ) + abs ( actual ) ) ), axis = 0 ) * 200 ) / np. count _ nonzero ( ~ np... | [
-0.41628748178482056,
-0.34553101658821106,
0.5509835481643677,
-0.1019887775182724,
-0.3595123887062073,
0.3487561345100403,
0.283995658159256,
-0.2656959295272827,
-0.11040319502353668,
1.4292622804641724,
0.5823588967323303,
0.5097304582595825,
1.2824050188064575,
0.1444062888622284,
... |
def reshape ( self, * shape, * * kwargs ) : order = kwargs. pop ( " order ", " c " ) if kwargs : raise typeerror ( " unexpected keyword arguments : % s " % kwargs. keys ( ) ) # todo : add more error - checking, perhaps if isinstance ( shape [ 0 ], tuple ) or isinstance ( shape [ 0 ], list ) : shape = tuple ( shape [ 0 ... | [
-0.4773455262184143,
0.1626526415348053,
0.8376613855361938,
0.15568195283412933,
0.023089177906513214,
-0.24956871569156647,
-0.7404482960700989,
0.1471506953239441,
0.4555014967918396,
-0.2483435720205307,
-0.6780433058738708,
0.49124470353126526,
0.05502922087907791,
-0.3728336095809936... |
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, args : optional [ hubargs ] = none, opts : optional [ pulumi. resourceoptions ] = none ) :... | [
0.4756016135215759,
0.18362531065940857,
0.5890917181968689,
0.316610187292099,
0.4961751401424408,
0.5200091600418091,
0.19210635125637054,
0.4937382936477661,
0.8732852339744568,
-0.056752078235149384,
0.2060576230287552,
0.5844361186027527,
0.5591112971305847,
-0.76939457654953,
-0.08... |
def _ get _ prefix _ list ( self ) : return self. _ _ prefix _ list | [
-0.4409124553203583,
-0.13082675635814667,
0.3908577561378479,
0.04017557203769684,
0.6779215931892395,
0.19010651111602783,
-0.46559104323387146,
0.18846328556537628,
1.148389458656311,
0.10354974120855331,
-1.3451989889144897,
0.039476457983255386,
0.17176705598831177,
0.4603520929813385... |
def check _ vital _ programs ( ) : ok = true binaries = ['dfu - programmer ','avrdude ','dfu - util ','avr - gcc ','arm - none - eabi - gcc'] for binary in binaries : res = shutil. which ( binary ) if res is none : cli. log. error ( " { fg _ red } qmk can't find % s in your path ", binary ) ok = false if ok : cli. log.... | [
0.06570034474134445,
0.2822413146495819,
0.6933619976043701,
0.3096032738685608,
0.36753472685813904,
0.8234689235687256,
0.3024313449859619,
-0.5631131529808044,
-0.22008511424064636,
0.4558972418308258,
-0.15872594714164734,
-0.30117225646972656,
-0.6097453236579895,
0.3680737614631653,
... |
def random _ edge _ population ( number _ of _ strategies, population _ size ) : if number _ of _ strategies < 2 or population _ size < 1 : raise valueerror ( " number _ of _ strategies must be > 1, population _ size > = 0 " ) ans = np. zeros ( number _ of _ strategies, dtype = int ) edge1, edge2 = 0, 0 while ( edge1 =... | [
-0.6176683306694031,
-0.083805613219738,
0.7893837094306946,
0.02183467522263527,
0.42939260601997375,
0.07318655401468277,
1.0378419160842896,
-0.7229812145233154,
0.8735793232917786,
0.8831260800361633,
0.015478599816560745,
0.2898094356060028,
0.7682294845581055,
-0.23979245126247406,
... |
def memory _ size ( self ) - > int : return pulumi. get ( self, " memory _ size " ) | [
0.9234911203384399,
1.208670735359192,
0.3198574483394623,
-0.12623350322246552,
0.8815263509750366,
0.7587407231330872,
0.4767879247665405,
0.2803257703781128,
0.3852126896381378,
-0.6533626914024353,
0.562950849533081,
1.3788825273513794,
-0.21109434962272644,
-0.5321484804153442,
-0.1... |
def set _ favourite ( self, * args ) : logger. info ( " player : set favorite " ) | [
-0.2543821632862091,
0.07591982930898666,
0.3843851387500763,
0.9819930195808411,
1.2457045316696167,
-0.2674351930618286,
-0.005826602224260569,
-0.35237541794776917,
-0.4667321443557739,
0.5097567439079285,
-0.9831888675689697,
1.4722448587417603,
-0.757755696773529,
-0.0857016071677208,... |
def to _ dict ( self ) : data = {'public _ key': self. public _ key,'signature': self. signature,'message': self. message, } return data | [
-0.19102269411087036,
-0.45416259765625,
0.42132842540740967,
-0.8915834426879883,
-0.19534732401371002,
0.1053462028503418,
-0.9087967872619629,
-0.2628142237663269,
-0.49691203236579895,
0.3087335228919983,
-1.4911699295043945,
0.6972026228904724,
-0.6703418493270874,
0.5673470497131348,... |
def save _ single ( path, params ) : old = psblog. get _ post ( path ) old _ date = old [ " meta " ] [ " datetime " ] old _ comments = old [ " comments " ] rm _ post ( path ) print ( " old page deleted < br > " ) add _ post ( params [ " heading " ]. value, params [ " category " ]. value, params [ " text " ]. value, old... | [
-0.03765391558408737,
0.1470358520746231,
0.8184650540351868,
0.17188461124897003,
0.8720538020133972,
0.9645186066627502,
-0.2513743042945862,
0.993615448474884,
-0.6371122598648071,
0.3964557647705078,
-0.4715060591697693,
-0.16867338120937347,
-0.5184407830238342,
0.9723026752471924,
... |
def bits ( seq : int, length : int ) - > array. array : b = bytes ( format ( seq, " b " ), " ascii " ) tab = bytes. maketrans ( b " 01 ", b " \ xff \ x01 " ) res = array. array ( " b ", [ - 1 ] ) * ( length - len ( b ) ) res. frombytes ( b. translate ( tab ) ) res. reverse ( ) return res | [
0.2802622616291046,
-0.37179678678512573,
0.6611928343772888,
0.2355554699897766,
0.22825001180171967,
-0.2744722366333008,
-0.41273796558380127,
-0.3716391921043396,
0.34949737787246704,
0.9417058825492859,
-1.6788928508758545,
0.8423013091087341,
-0.6639907956123352,
-0.07122092694044113... |
def rasterize _ mesh ( self, mesh ) : return self. rasterize _ mesh _ with _ shape _ image ( mesh ) [ 0 ] | [
-0.030539758503437042,
0.41342276334762573,
0.42836111783981323,
0.6932756900787354,
0.46091729402542114,
-0.2913193106651306,
-0.6514389514923096,
-1.0602362155914307,
0.3087317943572998,
-0.5447474718093872,
0.31840980052948,
0.5814497470855713,
-1.3323607444763184,
1.1356980800628662,
... |
def unregistercyclehandler ( self, handler ) : if handler in self. _ cyclehandlers : self. _ cyclehandlers. remove ( handler ) | [
-0.6899794340133667,
0.7752452492713928,
0.17730098962783813,
0.19164973497390747,
-0.7671558856964111,
0.5783317685127258,
1.1249791383743286,
-0.5680971145629883,
-0.5364773869514465,
-0.23041373491287231,
-0.9686241149902344,
0.3326813876628876,
-1.2161986827850342,
0.980272114276886,
... |
def ratings ( self ) : # format url, retrieve data, set columns, and filter out blank and heading rows. url ='https : / / www. sports - reference. com / cfb / years / { } - ratings. html '. format ( self. year1 ) ratings = pd. read _ html ( url ) [ 0 ] ratings. columns = ratings. columns. get _ level _ values ( 1 ) rat... | [
-1.491365671157837,
0.4753594696521759,
0.469637393951416,
-0.7511882185935974,
0.020752597600221634,
-0.15644609928131104,
-0.08064745366573334,
-0.18021737039089203,
-0.24089688062667847,
0.8358225226402283,
0.38930583000183105,
0.49506431818008423,
0.04672988876700401,
0.044837485998868... |
def get _ block _ xml _ tags ( current _ parent, block _ name, tag _ names, ignore _ absense = false ) : if current _ parent : values = [ ] try : blocks = current _ parent. getelementsbytagname ( block _ name ) for each in blocks : d = { } for tag in tag _ names : if each. getelementsbytagname ( tag ) [ 0 ]. childnodes... | [
0.7487232685089111,
-0.25323376059532166,
0.884520411491394,
0.5608410239219666,
-0.6033239960670471,
-0.5363014340400696,
-1.3045755624771118,
-0.9015923738479614,
-1.4669471979141235,
0.8234783411026001,
-0.20963583886623383,
-0.7006056308746338,
-0.1321467012166977,
1.3651803731918335,
... |
def set _ fixed _ threshold ( self, threshold ) : # set fixed threshold on recurrence plot level jointrecurrenceplot. set _ fixed _ threshold ( self, threshold ) # set diagonal of jr to zero to avoid self - loops in the joint # recurrence network a = self. jr. copy ( ) a. flat [ : : self. n + 1 ] = 0 # create a network... | [
0.7175807356834412,
-0.20975129306316376,
0.4391244649887085,
0.38006702065467834,
-0.3052734136581421,
-0.11500763893127441,
1.4325560331344604,
0.38212406635284424,
-0.4497316777706146,
-1.064411997795105,
-0.5135725736618042,
0.503351628780365,
-0.8681049346923828,
0.09125743806362152,
... |
def register _ player ( name ) : execute _ query ( " insert into players ( name, tournament _ id, prev _ opponents ) \ values ( % s, % s, % s ) ", ( name, tournament _ id, [ ], ) ) | [
-0.8297048211097717,
1.1131787300109863,
0.806119978427887,
-0.5940021872520447,
0.6999721527099609,
-0.13225995004177094,
-0.13439419865608215,
0.18564587831497192,
-0.7306481003761292,
1.2677931785583496,
-1.046631932258606,
-0.8275683522224426,
-0.8730645179748535,
-0.723910927772522,
... |
def no _ permission ( module, request, message = none ) : return render ('home / no _ permission. html ', {'module': module,'message': message }, request ) | [
0.16735292971134186,
0.8294448852539062,
0.4126875698566437,
0.754613995552063,
-0.39330363273620605,
0.3724762797355652,
0.6883957386016846,
0.3400888442993164,
-0.22379198670387268,
-0.10717486590147018,
1.6293107271194458,
0.3854827880859375,
-1.6357890367507935,
1.00974702835083,
-0.... |
async def test _ set _ max _ user _ pins ( v3 _ server, v3 _ settings _ response ) : v3 _ server. get ( ( f " https : / / api. simplisafe. com / v1 / ss3 / subscriptions / { test _ subscription _ id } " " / settings / normal? forceupdate = true " ), status = 200, body = load _ fixture ( " v3 _ settings _ full _ pins _ ... | [
0.03724489361047745,
1.5181444883346558,
0.5971745252609253,
-0.14043644070625305,
0.6907877922058105,
0.8650085926055908,
-0.1186196357011795,
-1.0401031970977783,
1.1790978908538818,
0.29695504903793335,
-1.3572275638580322,
0.8738145232200623,
0.10155913978815079,
-0.37489283084869385,
... |
def _ _ delitem _ _ ( self, index : int ) - > none : _ = self. pop ( index ) | [
-0.40027716755867004,
0.2759436070919037,
0.34606629610061646,
-1.0947495698928833,
-0.09783028066158295,
0.14295604825019836,
0.35784417390823364,
0.024582568556070328,
0.27623045444488525,
-0.027532948181033134,
-0.676432728767395,
-0.0779401957988739,
0.21808157861232758,
-0.90869951248... |
def set _ read _ ready ( fileobj, loop ) : # since the selector would notify of events at the beginning of the next # iteration, we let this iteration finish before actually scheduling the # reader ( hence the call _ soon ) loop. call _ soon _ threadsafe ( _ set _ event _ ready, fileobj, loop, selectors. event _ read ) | [
-0.4806542992591858,
-0.5922749638557434,
0.5459270477294922,
-0.26305413246154785,
-0.22212104499340057,
-0.07991355657577515,
0.26774173974990845,
-0.6843897104263306,
-0.6409984827041626,
-0.22288784384727478,
-0.22573813796043396,
0.3595845699310303,
0.3032302260398865,
0.3495815098285... |
def _ _ init _ _ ( self, file _ type _ bucket _ extensions = none, file _ type _ bucket _ name = none, ) : # initialize members of the class self. file _ type _ bucket _ extensions = file _ type _ bucket _ extensions self. file _ type _ bucket _ name = file _ type _ bucket _ name | [
0.4794168770313263,
-0.4220585823059082,
0.43684059381484985,
0.5388945937156677,
0.22751855850219727,
-0.05487816408276558,
-0.30428314208984375,
0.22966016829013824,
-0.6292255520820618,
-0.3542143404483795,
-0.6370457410812378,
0.39760106801986694,
0.22743183374404907,
0.249497264623641... |
def parsequeriesfile ( self, pathtofile ) : dictionaryofqueries = ordereddict ( ) # temp structure to keep queries with open ( pathtofile,'r') as queryfile : for queryid, line in enumerate ( queryfile ) : splittedquery = line. split ( " ", 1 ) dictionaryofqueries [ int ( splittedquery [ 0 ]. strip ( ) ) ] = splittedque... | [
-0.08604273945093155,
-0.6437011361122131,
0.1304393857717514,
-1.3128327131271362,
-0.8912609815597534,
0.6055139899253845,
0.3795793354511261,
-0.2338009476661682,
-0.7792693972587585,
-0.14467352628707886,
-0.38768520951271057,
-0.7892968654632568,
-0.3019440174102783,
0.399895042181015... |
def solve ( env, discount = 1. 0, steps = np. pinf ) : ns = env. ns + 1 na = env. na t = np. zeros ( ( na, ns, ns ) ) r = np. zeros ( ( na, ns, ns ) ) for a in range ( na ) : for s in range ( ns - 1 ) : line = env. p [ s ] [ a ] for p _ trans, s _ p, rew, done in line : if done : t [ a, s, ns - 1 ] + = 1. 0 r [ a, s, n... | [
0.10057392716407776,
0.6839785575866699,
0.900755763053894,
-0.448754221200943,
0.3641325831413269,
-0.09874727576971054,
-0.022474762052297592,
0.38595104217529297,
0.48953455686569214,
0.7000731825828552,
0.2424050122499466,
-0.018942322582006454,
-0.17904219031333923,
0.4966001212596893... |
def sendattachment ( to, subject, text, attachfilename ) : msg = mimemultipart ( ) msg ['from'] = gmail _ user msg ['to'] = to msg ['subject'] = subject msg. attach ( mimetext ( text ) ) part = mimebase ('application ','octet - stream') part. set _ payload ( open ( attachfilename,'rb'). read ( ) ) encoders. encode _ ba... | [
-0.04078883305191994,
-0.5529698133468628,
0.793086051940918,
0.09114332497119904,
-0.884949803352356,
0.9180542230606079,
-0.36477047204971313,
-0.6504483222961426,
-0.32900816202163696,
0.10622603446245193,
-0.4437279999256134,
1.122996211051941,
-0.3793959319591522,
-0.487321138381958,
... |
def test _ cancel _ booking _ from _ shopping _ basket _ non _ ajax ( self ) : event = baker. make _ recipe ('booking. future _ ev') booking = baker. make _ recipe ('booking. booking ', event = event, user = self. user, paid = true ) self. assertequal ( booking. objects. all ( ). count ( ), 1 ) self. client. login ( us... | [
0.39030197262763977,
0.6750335097312927,
0.4838552474975586,
2.1524770259857178,
-0.57081139087677,
1.2143669128417969,
0.14308223128318787,
1.0413429737091064,
0.7662082314491272,
-0.02429467998445034,
-0.39402925968170166,
-0.8903963565826416,
0.4259953200817108,
1.0088319778442383,
0.... |
def assert _ array _ almost _ equal _ nulp ( self, * args, * * kwargs ) : return assert _ array _ almost _ equal _ nulp ( * args, * * kwargs ) | [
-0.6503746509552002,
-1.2208573818206787,
0.6312916278839111,
0.6443885564804077,
0.3910042345523834,
0.9757428169250488,
0.5030441880226135,
-0.9592280983924866,
0.5475695729255676,
-0.007419734727591276,
-0.6464021801948547,
0.6740329265594482,
-1.0526814460754395,
0.9507948160171509,
... |
def year _ str ( self ) : year = str ( self. year ) if self. bc : year + = " b. c. " return year | [
1.068932056427002,
-0.9685386419296265,
0.5571479797363281,
-0.48446711897850037,
-0.2920852303504944,
1.348482608795166,
0.07602747529745102,
-0.3038630783557892,
0.9284816980361938,
0.3073311746120453,
0.8317999839782715,
0.39882054924964905,
-0.8035030961036682,
-0.6486461758613586,
0... |
def with _ column ( self, column : " union [ series, expr ] " ) - > " dataframe " : # is expr if hasattr ( column, " _ pyexpr " ) : return self. with _ columns ( [ column ] ) return wrap _ df ( self. _ df. with _ column ( column. _ s ) ) | [
-0.1115601435303688,
0.26274794340133667,
0.3986334502696991,
0.5091564059257507,
-0.07487457990646362,
-1.0876964330673218,
0.2071768194437027,
-0.30302608013153076,
0.4464549720287323,
-0.6259068250656128,
-0.04991122707724571,
0.901775598526001,
0.5781738758087158,
-0.27347224950790405,... |
def mergebams ( rep, cores = 3 ) : runs = [ ] for i, val in rep. items ( ) : out1 = i + '. merged. bam'for bam in val : in1 + ='' + bam runs. append ( " samtools merge " + out1 + in1 ) h. parrun ( runs, cores ) | [
-0.04200074449181557,
0.2654050588607788,
0.48275452852249146,
0.5983076095581055,
0.2652842700481415,
0.9693307280540466,
-0.27948442101478577,
0.29796990752220154,
-0.29032859206199646,
0.07010593265295029,
-0.6586241126060486,
-0.09995219856500626,
-0.629226565361023,
0.2422909885644912... |
def get _ trailer _ tweet _ counts ( self ) : # use trailer release date and day after self. trailers _ df [ " publishdate _ date " ] = self. trailers _ df. apply ( lambda row : datetime. combine ( row [ " publishdate " ]. date ( ), datetime. min. time ( ) ), axis = 1 ) self. trailers _ df [ " publishdate _ date _ 1 " ... | [
0.07622387260198593,
-0.08373172581195831,
0.6400085091590881,
-0.7452216744422913,
0.5490062236785889,
0.022665802389383316,
0.0682995542883873,
0.2944290041923523,
-1.220174789428711,
0.20000538229942322,
0.5253069400787354,
0.23949429392814636,
0.7449702620506287,
0.15726882219314575,
... |
def transaction _ data ( self ) : return list ( map ( lambda transaction : transaction. to _ json ( ), self. transaction _ map. values ( ) ) ) | [
-0.8920589089393616,
-0.7694028615951538,
0.5677710771560669,
-0.39831268787384033,
-0.0010045452509075403,
-0.31893858313560486,
-1.2017301321029663,
0.11931519955396652,
0.2033940553665161,
0.6094915866851807,
-1.0403443574905396,
0.2138558030128479,
0.8800269365310669,
0.150662228465080... |
def _ persistentvarunset ( self, svar ) : sfull = self. _ _ persistentvarcalcname ( svar ) ; if os. path. exists ( sfull ) : try : os. unlink ( sfull ) ; except : reporter. errorxcpt ('error unlinking " % s "'% ( sfull, ) ) ; return false ; return true ; | [
0.1550959348678589,
-0.19341818988323212,
0.7483346462249756,
-0.7349938154220581,
-0.6055549383163452,
0.11053691059350967,
0.9043191075325012,
-0.22545848786830902,
0.4340471923351288,
0.13465921580791473,
0.23074892163276672,
-0.4675922989845276,
-1.088707447052002,
-0.7690659761428833,... |
def get _ read _ available ( self ) : return self. _ data _ size | [
-0.2619433104991913,
-0.0657774806022644,
0.7367749214172363,
-0.7387282252311707,
-0.6717197299003601,
0.931406557559967,
-0.2026522308588028,
0.09405852109193802,
-0.5322942733764648,
-0.6958261132240295,
0.352176696062088,
1.1861402988433838,
-0.38869810104370117,
-0.14435246586799622,
... |
def get _ context _ data ( self, * * context ) : if not has _ perm ( self. request. user, " core. can _ see _ history " ) : self. permission _ denied ( self. request ) type = self. request. query _ params. get ( " type " ) value = self. request. query _ params. get ( " value " ) if type not in ( " element " ) : raise v... | [
-1.046393632888794,
0.8079873919487,
0.6529443860054016,
0.8557242751121521,
-0.5192279815673828,
0.8802592754364014,
0.17107835412025452,
-1.2213820219039917,
0.6746323108673096,
-0.189952090382576,
0.9523401260375977,
1.0673555135726929,
-0.42766615748405457,
0.48382046818733215,
-0.16... |
def _ reversedbytes ( ) - > bytes : res = bytearray ( 256 ) for j in range ( 1, 256 ) : res [ j ] = ( res [ j > > 1 ] > > 1 ) ^ ( ( j & 1 ) < < 7 ) return bytes ( res ) | [
-0.4524155259132385,
0.56121826171875,
0.5826990008354187,
-0.3500843644142151,
-0.5959069132804871,
-0.7865948677062988,
0.010115677490830421,
-0.2006416916847229,
0.1327558308839798,
-0.340778112411499,
-0.5139408707618713,
0.2625366449356079,
-1.2693495750427246,
-0.5766482353210449,
... |
def unit _ sample ( self ) : p = np. zeros ( 4 ) theta = np. random. uniform ( 0, np. pi ) phi = np. random. uniform ( 0, 2 * np. pi ) p [ 0 ] = np. sin ( theta ) * np. cos ( phi ) p [ 1 ] = np. sin ( theta ) * np. sin ( phi ) p [ 2 ] = np. cos ( theta ) p [ 3 ] = 1 return p | [
-0.6684709787368774,
-0.199997216463089,
0.6158275604248047,
-1.2986341714859009,
0.5132927894592285,
0.7580035328865051,
-0.015681438148021698,
0.536567747592926,
1.2363320589065552,
0.526913046836853,
-0.5116980075836182,
-0.157342329621315,
-0.8654714822769165,
-0.017132200300693512,
... |
def handle _ base _ url ( self, url ) : # if the user specified a base url, use that ; otherwise use the # default base url specified by the config file if self. base _ url is not none : base _ url = self. base _ url logger. debug ( f " using user - provided base url { base _ url } " ) else : base _ url = url logger. d... | [
-0.3737531006336212,
0.10935177654027939,
0.3418373465538025,
-0.16676172614097595,
0.7189594507217407,
-0.16505585610866547,
0.05386987328529358,
0.7040403485298157,
-0.03979998081922531,
-0.30255362391471863,
-0.5869542360305786,
-0.41427698731422424,
-0.0650140717625618,
0.7555139660835... |
def run _ extract _ start _ action ( self, state, manager ) : # if no features specified, use them all if state. features _ to _ extract is none : state. features _ to _ extract = [ ] manager. fire _ event ( events. listfeatures, state ) for feature in state. available _ features : state. features _ to _ extract. appen... | [
-0.6361894011497498,
-0.6199998259544373,
0.681322455406189,
0.42873936891555786,
0.1637590378522873,
-0.725111186504364,
0.5657564997673035,
0.7695192694664001,
0.5877144932746887,
0.13946451246738434,
-0.8050277829170227,
0.4008708894252777,
0.6610842943191528,
0.49119147658348083,
-0.... |
def redirigevers ( ftp, chemin _ relatif ) : # retour a la racine du ftp while ftp. pwd ( )! ='/': ftp. cwd ( '..') # on redirige vers chemin for i in chemin _ relatif. split ('/') : if i : try : ftp. cwd ( i ) except ftplib. error _ perm : break | [
-0.16590476036071777,
-0.7459053993225098,
0.5780640244483948,
-0.8039526343345642,
0.2131800502538681,
0.5211652517318726,
-0.5596289038658142,
-0.363247811794281,
-1.0585143566131592,
0.3696720004081726,
0.22934532165527344,
0.12431962788105011,
-1.3469080924987793,
-0.20353029668331146,... |
def test _ export _ database _ command _ no _ related ( self, mock _ g ) : mock _ g. user = security _ manager. find _ user ( " admin " ) example _ db = get _ example _ database ( ) db _ uuid = example _ db. uuid command = exportdatabasescommand ( [ example _ db. id ], export _ related = false ) contents = dict ( comma... | [
0.9519031047821045,
1.288132905960083,
0.33477044105529785,
0.11023072898387909,
0.43395715951919556,
0.8240195512771606,
0.9192492365837097,
0.13574309647083282,
0.6736786365509033,
-0.3624238073825836,
-0.3816402852535248,
0.4621385633945465,
-0.5484117865562439,
0.6231290102005005,
-0... |
async def listplaylists ( self, ctx ) : data = self. _ get _ data ( ctx ) lists = data. list _ playlists ( ) output = " here's the playlists that i currently have : \ n " if lists : lists = " \ n ". join ( lists ) output = output + lists await send ( ctx, output ) | [
-0.08838288486003876,
0.12116630375385284,
0.24478869140148163,
0.3691346049308777,
0.5720874667167664,
-0.1722211241722107,
-0.20214655995368958,
-0.4229849874973297,
0.7192826867103577,
0.019255826249718666,
-0.30867183208465576,
1.3760957717895508,
-1.2744172811508179,
0.119959570467472... |
def raw _ player _ statistics ( ) : players = getdata. get _ all _ players ( ) print ( players. isnull ( ). sum ( ) ) print ('columns : ', len ( players. columns ) ) print ('rows with nans : ', len ( players ) - len ( players. dropna ( ) ) ) print ( players. describe ( ) ) print ( players. dtypes ) | [
-0.2370970994234085,
0.5246286988258362,
0.6162713170051575,
-0.6356740593910217,
0.09125819802284241,
-0.1833847463130951,
0.13412077724933624,
-0.2939484417438507,
0.015100211836397648,
-0.0600292906165123,
-0.5964730381965637,
1.2063982486724854,
1.4188846349716187,
0.010809590108692646... |
def test _ md006 _ good _ indentation _ in _ block _ quote ( ) : # arrange scanner = markdownscanner ( ) supplied _ arguments = [ " - - enable - rules ", " md006 ", " scan ", " test / resources / rules / md006 / good _ indentation _ in _ block _ quote. md ", ] expected _ return _ code = 0 expected _ output = " " expect... | [
0.5995224714279175,
-0.31191569566726685,
0.7684379816055298,
0.9365587830543518,
0.0006948247901163995,
-0.04805159196257591,
0.23098236322402954,
0.49584755301475525,
-0.4376085698604584,
0.30091387033462524,
0.35741934180259705,
-0.41687169671058655,
-0.6664664149284363,
0.1741862744092... |
def move ( self, n, p ) : current = self. pointtovalue ( p ) if ( current = = 0 ) : self. b [ p [ 0 ] ] [ p [ 1 ] ] [ p [ 2 ] ] = n self. movelist. append ( ( p, n ) ) self. updatelines ( n, p ) self. pointslist [ 0 ]. remove ( p ) self. pointslist [ n ]. add ( p ) return true else : return false | [
-0.9500699043273926,
0.20346719026565552,
0.7195988297462463,
0.393608957529068,
0.05148909613490105,
0.5302053689956665,
-0.68464195728302,
0.25561535358428955,
0.21347203850746155,
0.6528835296630859,
-1.0192903280258179,
-0.6846277117729187,
-0.9647193551063538,
-0.16263610124588013,
... |
def contact _ name ( self, contact _ name ) : if contact _ name is not none and len ( contact _ name ) > 50 : raise valueerror ( " invalid value for ` contact _ name `, length must be less than or equal to ` 50 ` " ) # noqa : e501 self. _ contact _ name = contact _ name | [
0.1415233016014099,
-0.45010045170783997,
-0.013872172683477402,
0.831210196018219,
0.01090520154684782,
0.15456534922122955,
0.14131586253643036,
0.5375935435295105,
0.6468900442123413,
0.38899606466293335,
-0.18111716210842133,
-1.2131644487380981,
0.08342074602842331,
0.2579226493835449... |
def sweep ( self, n = 1, print _ current _ state = false ) : for i in range ( n ) : for j in range ( self. target _ area ) : self. loop _ once ( ) if print _ current _ state : print i print self. current _ state self. current _ sweep + = 1 | [
-1.498439908027649,
0.044195931404829025,
0.33350732922554016,
0.3847070336341858,
-0.05245097354054451,
0.6652573943138123,
0.9635142087936401,
-0.24593690037727356,
0.21645738184452057,
-0.17604665458202362,
0.2450493425130844,
0.5424149632453918,
0.09237231314182281,
0.9371803402900696,... |
def compute _ density ( self ) : density = self. compute _ pressure ( ) / ( self. r * self. compute _ temperature ( ) ) return density | [
-0.30244094133377075,
-0.44593366980552673,
0.2854304909706116,
0.35571348667144775,
0.4694177806377411,
0.353105366230011,
0.2991286814212799,
0.35113462805747986,
-1.0627667903900146,
0.058801449835300446,
0.670226514339447,
-0.6200132966041565,
-0.5095755457878113,
0.5503424406051636,
... |
def test _ nodes ( gr ) : gr. add _ node ('val1') gr. add _ node ('val2') assert'val1'in gr. node _ dict and'val2'in gr. node _ dict | [
0.05490979179739952,
1.314078688621521,
0.42435505986213684,
-0.6499302387237549,
1.2174137830734253,
0.47292694449424744,
-0.0037776122335344553,
-0.013400210067629814,
-1.2885010242462158,
0.015732798725366592,
0.36441367864608765,
0.21497733891010284,
0.2998470366001129,
0.0517757236957... |
def generate _ pod _ spec ( self ) : return client. v1podspec ( containers = [ client. v1container ( name ='model ', image = self. full _ image _ name, ) ], restart _ policy ='never') | [
-0.36726507544517517,
0.19166137278079987,
0.40700390934944153,
-0.0675114318728447,
0.04114862158894539,
0.7860143780708313,
-0.2658441364765167,
-0.4958999454975128,
-0.5043318271636963,
0.6184998154640198,
-0.23137076199054718,
-0.08520684391260147,
0.25724920630455017,
-0.5122308135032... |
def save ( self, filepath ) : self. embedding. save ( filepath ) | [
-0.3430147171020508,
-0.5496629476547241,
-0.04646387696266174,
0.14721372723579407,
0.6786363124847412,
1.3087856769561768,
0.9956938624382019,
0.3970099985599518,
-0.22678318619728088,
0.5427184700965881,
-1.4956080913543701,
-0.3829724192619324,
-0.48828810453414917,
0.8190463781356812,... |
def savecorners ( inputdatafile, corner _ filestem, volume _ data, path = '.') : if len ( volume _ data ) > 0 : startframe = volume _ data [ 0 ] ['framenum'] # note : forces the times to be uniformly spaced... timedelta = np. mean ( np. diff ( [ avol ['voltime'] for avol in volume _ data ] ) ) else : startframe = 0 tim... | [
0.41225069761276245,
-0.8203036189079285,
0.6566641330718994,
-0.9851992130279541,
0.7838067412376404,
-0.23194782435894012,
0.45643675327301025,
-0.49461859464645386,
-0.5398288369178772,
0.5171294212341309,
-0.5601564049720764,
-0.11442640423774719,
0.016886884346604347,
-0.0105825578793... |
def _ merge _ on _ overlap ( accumulator : list, position : tuple ) - > list : # sanity check if len ( position )! = 2 and len ( position )! = 4 : raise valueerror ( f " cannot merge positions with { len ( position ) } dimensions " ) unique _ positions = [ ] for pos in accumulator : if len ( position ) = = 2 and \ ( po... | [
-0.25755444169044495,
0.38449013233184814,
0.6862071752548218,
0.21409140527248383,
0.04730107635259628,
0.11044103652238846,
-0.3378227949142456,
-0.11908556520938873,
0.972794234752655,
0.2804689109325409,
-0.2804301679134369,
-0.7712172865867615,
-0.11282898485660553,
-0.194079816341400... |
def _ _ init _ _ ( self, output _ shape ) : super ( ). _ _ init _ _ ( ) self. output _ shape = output _ shape | [
0.3162110149860382,
-0.47198212146759033,
0.32705968618392944,
0.15982608497142792,
-0.46484026312828064,
-0.4636441469192505,
0.24758444726467133,
0.24711783230304718,
-0.33601295948028564,
-0.1717434674501419,
-0.4757212996482849,
-0.2412356734275818,
0.9996830821037292,
0.20707100629806... |
def amount ( self, amount ) : self. _ amount = amount | [
0.2472727745771408,
-0.5146632790565491,
0.06404028087854385,
0.03710480406880379,
-0.4461941719055176,
0.4655728340148926,
0.39046040177345276,
0.6771412491798401,
0.2664494812488556,
0.1495850384235382,
-0.6892725825309753,
-0.2883773148059845,
0.4101405143737793,
0.6703009009361267,
-... |
def reparametrize _ from _ internal ( internal, fixed _ values, pre _ replacements, transformations, post _ replacements, ) : # do pre - replacements external _ values = pre _ replace ( internal, fixed _ values, pre _ replacements ) # do transformations for constr in transformations : func = getattr ( kt, f " { constr ... | [
-0.8061549067497253,
0.05467519909143448,
0.4363199472427368,
-0.5864575505256653,
-0.6412181258201599,
-0.4348612129688263,
-0.4316893219947815,
0.7032634019851685,
-0.544923722743988,
-0.12518124282360077,
-0.28297173976898193,
0.4972406029701233,
0.21025843918323517,
0.6178136467933655,... |
def players _ operation ( self, path ) : if path = ='/ players': return [ x for x in self. _ players ] title, func = path. split ('/') [ 2 ], path. split ('/') [ 3 ] func = func. replace ('- ','_') operation = eval ( f'self. _ players [ " { title } " ]. { func }') return operation | [
-1.9505078792572021,
-0.679879903793335,
0.5795097947120667,
-0.43142640590667725,
-0.21562950313091278,
-1.0603135824203491,
0.2959684431552887,
0.26774030923843384,
-0.4161641299724579,
0.9058228135108948,
0.24000288546085358,
0.13954317569732666,
-0.034127071499824524,
-1.12420058250427... |
def operators ( ) : print ( " \ n ". join ( cosmic _ ray. plugins. operator _ names ( ) ) ) sys. exit ( exitcode. ok ) | [
0.07364366203546524,
-0.6087900400161743,
0.6694686412811279,
0.5936315059661865,
0.3027109205722809,
0.0170552097260952,
0.40648943185806274,
0.5398151278495789,
-0.36754462122917175,
1.09184992313385,
-0.41561704874038696,
0.13967972993850708,
-0.12028969079256058,
0.1477573812007904,
... |
async def ljdc ( self, ctx ) - > none : response = get ( " http : / / lesjoiesducode. fr / random " ) soup = beautifulsoup ( response. content, " html. parser " ) title = soup. find _ all ( " h1 ", class _ = " blog - post - title " ) [ 0 ]. gettext ( ). strip ( ) img = soup. find _ all ( " div ", class _ = " blog - pos... | [
0.11191484332084656,
1.1174739599227905,
0.9430882334709167,
-0.7629660367965698,
0.023677101358771324,
-0.10005363076925278,
-0.7228521704673767,
0.0014023002004250884,
-0.017936551943421364,
-0.4496074616909027,
-0.24411752820014954,
1.0956093072891235,
-0.23024605214595795,
0.7377563118... |
def crop _ pad _ around ( image, size ) : x, y, z = image. shape x _ pad _ width = size [ 0 ] - x if size [ 0 ] > x else 0 y _ pad _ width = size [ 1 ] - y if size [ 1 ] > y else 0 if x _ pad _ width > 0 or y _ pad _ width > 0 : pad _ width = [ ( x _ pad _ width, y _ pad _ width ) for _ in range ( 2 ) ] pad _ width + =... | [
-0.36163845658302307,
-0.27575501799583435,
1.0770868062973022,
-0.33676838874816895,
-0.6361068487167358,
0.8170445561408997,
0.48594895005226135,
-1.0251556634902954,
1.896765947341919,
0.7296469211578369,
0.7481784224510193,
-0.2983061671257019,
-0.054259877651929855,
0.6994842290878296... |
async def get _ deleted _ key ( self, name : str, * * kwargs : " any " ) - > deletedkey : bundle = await self. _ client. get _ deleted _ key ( self. vault _ endpoint, name, error _ map = _ error _ map, * * kwargs ) return deletedkey. _ from _ deleted _ key _ bundle ( bundle ) | [
0.02768629789352417,
-0.169526606798172,
0.2427036315202713,
1.1344835758209229,
-0.2923542261123657,
-0.3494284749031067,
-1.1835402250289917,
-1.1116197109222412,
0.1828852891921997,
-0.13799020648002625,
-0.22871913015842438,
1.0639371871948242,
-0.5981845259666443,
-0.2084222435951233,... |
def remove _ scheduling ( self ) : logger. debug ( " stopping all systemd timers " ) results = self. _ run _ systemctl _ commands ( self. loaded _ timers, " disable ", " - - now " ) if results : active = self. active return none if active is none else not active else : return results | [
-0.3643064498901367,
-0.3487095534801483,
0.5173884630203247,
0.4288966953754425,
-0.8153396844863892,
0.10334911197423935,
0.3387051224708557,
0.36172571778297424,
-0.4424278736114502,
0.16342493891716003,
-1.059743881225586,
-1.0643022060394287,
-1.3827857971191406,
-0.2375136911869049,
... |
def send _ notification ( cls, title, message ) : data = {'title': title,'message': message } if cls. do _ post ( data ). ok : logging. info ('notification sent to pushover') return true logging. error ('pushover notification did not work') return false | [
-1.0918481349945068,
0.5456734895706177,
0.8174313306808472,
1.2609184980392456,
0.09773459285497665,
0.8092761039733887,
-0.678740918636322,
-0.5245946645736694,
-0.6969718933105469,
0.464865118265152,
-0.7278687357902527,
-0.17871150374412537,
-0.6355087161064148,
0.16887661814689636,
... |
def js _ add _ el _ to _ div ( class _ name _ source, class _ name _ target ) : js = f " const el = document. getelementsbyclassname ('{ class _ name _ target }') [ 0 ] ; " js + = " if ( el ) " js + = f " el. appendchild ( document. getelementsbyclassname ('{ class _ name _ source }') [ 0 ] ) " return js | [
-1.2763795852661133,
-0.07560772448778152,
0.667295515537262,
-0.3877805173397064,
0.09737415611743927,
-0.2208939641714096,
0.012554287910461426,
-0.10424178093671799,
0.2932564616203308,
0.5696757435798645,
0.20299063622951508,
0.6755768060684204,
1.4203976392745972,
0.6065235137939453,
... |
def update _ trace _ settings ( self, model _ name : str =..., settings : dict [ str, t. any ] =..., headers : dict [ str, t. any ] =..., as _ json : t. literal [ false ] =..., ) - > service _ pb2. tracesettingresponse :... | [
-1.038763403892517,
-0.09244701266288757,
0.6698461174964905,
0.4601636230945587,
-0.07831355184316635,
-0.2371913641691208,
0.24538204073905945,
-1.7453230619430542,
-0.13423918187618256,
0.8318551182746887,
-1.2096203565597534,
0.04524973779916763,
-0.5474943518638611,
-0.374966382980346... |
def test _ do _ update ( self ) : band = self. band new _ popularity = self. band. popularity + 1000 band. insert ( band ( name = self. band. name, popularity = new _ popularity ) ). on _ conflict ( target = band. name, action = " do update ", values = [ band. popularity ], ). run _ sync ( ) self. assertlistequal ( ban... | [
-0.5225769281387329,
0.5434250235557556,
0.6049421429634094,
0.6428411602973938,
0.867774486541748,
0.44285401701927185,
-0.48104411363601685,
-0.28083065152168274,
0.5433082580566406,
0.32858923077583313,
-1.2953506708145142,
0.06445091962814331,
-0.04317028447985649,
-0.6020433306694031,... |
def quantity ( self ) - > str : return self. _ cfg. quantity | [
-0.37161219120025635,
-0.4911210834980011,
0.30191004276275635,
0.8025081157684326,
0.48764705657958984,
0.5791047215461731,
-0.06976562738418579,
-0.21453100442886353,
0.13648837804794312,
-0.15827380120754242,
-0.7843802571296692,
-0.1963864415884018,
0.5913674235343933,
-0.4304772615432... |
def serialize ( self ) : return {'name': self. name,'description': self. description,'id': self. id,'price': self. price, } | [
-0.7757781147956848,
-1.2266273498535156,
0.5332472920417786,
-0.8039606809616089,
-0.9364720582962036,
-0.18095067143440247,
-0.8484880328178406,
-0.7517619729042053,
0.10909489542245865,
0.08820925652980804,
-1.876105546951294,
0.20484554767608643,
-0.3928411900997162,
0.0107230916619300... |
def _ _ init _ _ ( self, dist, years ) : alias. _ _ init _ _ ( self, dist ) self. years = years | [
0.18631905317306519,
-0.4340081214904785,
0.5330139398574829,
-0.19527462124824524,
-0.7313759326934814,
1.1890127658843994,
-1.0068185329437256,
1.2402693033218384,
0.525138258934021,
0.17970474064350128,
-0.639746904373169,
0.5888974070549011,
1.0880348682403564,
-0.0346837118268013,
-... |
def list _ order _ at _ subscription _ level ( self, skip _ token : optional [ str ] = none, * * kwargs : any ) - > iterable [ " _ models. orderresource " ] : api _ version = self. _ get _ api _ version ('list _ order _ at _ subscription _ level') if api _ version = ='2020 - 12 - 01 - preview': from. v2020 _ 12 _ 01 _ ... | [
-1.0617647171020508,
-0.24187757074832916,
1.0657477378845215,
0.41235896944999695,
-0.1786492019891739,
-0.40045952796936035,
-0.7365960478782654,
-1.134690523147583,
0.3418278694152832,
0.2758045196533203,
-0.6487346291542053,
0.5943583250045776,
-0.006000611465424299,
0.0177966263145208... |
def _ _ new _ event _ data ( self, event _ data, cout = true ) : # get id of source sensor source _ id = os. path. basename ( event _ data ['targetname'] ) # verify temperature event if'temperature'in event _ data ['data']. keys ( ) : # check if sensor is in this room for sensor in self. sensors + self. oofs : if sourc... | [
-0.4914496839046478,
-0.510277509689331,
0.8413664698600769,
-0.656101644039154,
0.018504424020648003,
0.5704029202461243,
-0.2073681503534317,
0.2541581094264984,
0.13990505039691925,
0.7466179132461548,
-0.3788030445575714,
-0.039442554116249084,
-0.15460309386253357,
0.812855064868927,
... |
def test _ invalid _ component _ request ( self ) : response = self. _ request _ component ( " invalid _ component " ) self. assertequal ( 404, response. code ) self. assertequal ( b " not found ", response. body ) | [
-0.6863988637924194,
-0.6775017380714417,
0.3260623812675476,
0.10194868594408035,
1.1375106573104858,
1.0454717874526978,
-0.49621301889419556,
0.3571758270263672,
0.8980108499526978,
-1.0668689012527466,
0.37821051478385925,
-0.023019609972834587,
-0.27604880928993225,
-0.199089691042900... |
def set _ ho _ freq _ zpe ( self, v _ ho ) : self. v _ ho = v _ ho # in cm ^ - 1 self. zpe _ ho = constants. h * v _ ho * ( constants. c * 100 ) / \ 2. 0 / constants. e _ h # in kcal / mol if self. nmode : self. nmode. set _ ho _ freq _ zpe ( v _ ho ) else : print ( " warning : nmode not defined for well, cannot set va... | [
-0.09217974543571472,
0.14022471010684967,
0.43848586082458496,
0.6252965927124023,
-0.027681615203619003,
0.09760499000549316,
0.17071856558322906,
-0.13556882739067078,
-0.14027146995067596,
0.6034700870513916,
-0.1388780176639557,
0.01486934069544077,
-0.5003641843795776,
0.918353676795... |
async def listen _ for _ all _ event _ messages ( self, callback _ function = none, timeout = none ) : url = " { } { } : { } / ws / events _ all / current _ operation ". format ( self. _ ws, self. _ server _ ip, self. _ server _ port ) if callback _ function : task = await self. stream _ output ( url, callback _ functi... | [
0.2955957055091858,
0.05734506994485855,
0.7204859852790833,
0.2544318735599518,
-0.39536720514297485,
-0.7380622029304504,
0.69975346326828,
0.3119103014469147,
0.07514701783657074,
0.09588682651519775,
0.31282076239585876,
0.7058885097503662,
-0.3286602199077606,
0.804736316204071,
-0.... |
def on _ isdelete _ toggled ( self, checked ) : # todo : not implemented yet def testconnection ( ip, port, service _ name ) : url _ origin = u'http : / /'+ ip + u':'+ port + u'/ ws - gateway / gateway / ws /'+ service _ name + '? wsdl'url = str ( url _ origin ) auth = httpauthenticated ( username ='administrator ', pa... | [
-0.44985121488571167,
-0.2886987328529358,
0.7293798327445984,
-0.12339111417531967,
-0.29926955699920654,
0.11468232423067093,
0.5496022701263428,
-0.4354987144470215,
0.48750603199005127,
0.2722025215625763,
0.3212161064147949,
0.3374101221561432,
-1.2668492794036865,
0.5953407883644104,... |
def update _ with _ move ( self, move ) : if move in self. root. children : self. root = self. root. children [ move ] self. root. parent = none else : # refresh the all tree self. root = node ( ) | [
0.1997334063053131,
-0.3898157775402069,
0.5182371735572815,
0.3187435269355774,
-1.015794277191162,
-0.9175381660461426,
-0.7037806510925293,
-0.36526399850845337,
0.9967052340507507,
0.7700853943824768,
-0.45178791880607605,
0.7293199300765991,
-0.7361222505569458,
1.1536571979522705,
... |
def calc _ density _ compensation _ function ( ktraj : tensor, im _ size : sequence [ int ], num _ iterations : int = 10, grid _ size : optional [ sequence [ int ] ] = none, numpoints : union [ int, sequence [ int ] ] = 6, n _ shift : optional [ sequence [ int ] ] = none, table _ oversamp : union [ int, sequence [ int ... | [
0.4373410940170288,
0.5504329800605774,
1.0204235315322876,
0.21436871588230133,
-0.6803932189941406,
-0.555187463760376,
0.7813700437545776,
0.26248180866241455,
-0.08268599957227707,
0.8319070339202881,
0.21126098930835724,
-0.2386191040277481,
0.11652073264122009,
0.30460816621780396,
... |
def gettree ( self ) : return self. _ tree | [
-0.054227929562330246,
-0.2131548523902893,
0.21893678605556488,
-0.05846186354756355,
-0.09446197748184204,
0.6723699569702148,
-0.013937334530055523,
-0.18056435883045197,
0.29165005683898926,
-1.7139476537704468,
0.26745036244392395,
1.2842762470245361,
-1.0023070573806763,
0.1538799405... |
def clean _ licensee _ records ( records ) : data = pd. dataframe ( records, columns = columns ) data ['trade _ name'] = data ['trade _ name']. str. replace ('trade name : ','' ) data ['email'] = data ['email']. str. lower ( ) data ['license _ number'] = data ['license _ number']. str. upper ( ) return data | [
0.6031340956687927,
-0.8150007724761963,
0.5049104690551758,
-1.1497457027435303,
0.0840040072798729,
0.283253937959671,
-0.6243864297866821,
1.0763400793075562,
-0.23279213905334473,
0.41189658641815186,
0.05171237140893936,
0.3792552649974823,
-0.6341396570205688,
-0.7810722589492798,
... |
def _ _ init _ _ ( self, * args ) : _ topods. topods _ tface _ swiginit ( self, _ topods. new _ topods _ tface ( * args ) ) | [
-0.4245496392250061,
0.6382175087928772,
0.4738418161869049,
-0.06853742897510529,
0.05415980517864227,
0.20404447615146637,
1.0193325281143188,
-0.40179872512817383,
-0.6234980225563049,
0.4860885739326477,
-0.7525990009307861,
-1.0043448209762573,
-0.13584491610527039,
0.2884072959423065... |
def compute _ posvels ( self, ephem = " de421 ", planets = false ) : # record the planets choice for this instance self. planets = planets # remove any existing columns cols _ to _ remove = ['ssb _ obs _ pos ','ssb _ obs _ vel ','obs _ sun _ pos'] for c in cols _ to _ remove : if c in self. table. colnames : log. info ... | [
-0.666031539440155,
0.9477329850196838,
0.8066552877426147,
-0.05567130446434021,
-0.04458215460181236,
0.5598035454750061,
-0.0007820409955456853,
0.8635979294776917,
-0.6032532453536987,
0.6952491402626038,
-0.08951392024755478,
-0.5900397896766663,
0.6826201677322388,
0.7674667835235596... |
def retargetmod ( songs, duration, music _ labels = none, out _ labels = none, out _ penalty = none, volume = none, volume _ breakpoints = none, springs = none, constraints = none, min _ beats = none, max _ beats = none, fade _ in _ len = 3. 0, fade _ out _ len = 5. 0, * * kwargs ) : # get song analysis if isinstance (... | [
-0.5801333785057068,
0.23891501128673553,
0.9339060187339783,
0.247254878282547,
-0.010458688251674175,
0.08680747449398041,
0.24182699620723724,
-0.22177626192569733,
-0.4672512114048004,
1.160943627357483,
0.6506690979003906,
1.199797511100769,
-0.4031141698360443,
-1.1496206521987915,
... |
def transactions ( request ) : if request. user. is _ stylist = ='yes': if request. method = ='get': appointments = appointment. objects. filter ( stylist = request. user, status = appointment. status _ completed ) bills = { } for appointment in appointments : items _ in _ bill = iteminbill. objects. filter ( appointme... | [
0.3083375096321106,
0.15756206214427948,
0.6424159407615662,
0.1313439905643463,
-0.802884042263031,
0.7656709551811218,
0.09772501140832901,
0.4698936939239502,
0.048122476786375046,
0.5705188512802124,
0.17479413747787476,
-0.557343602180481,
0.3632298707962036,
1.0137321949005127,
-0.... |
def backward _ pass ( self, err ) : self. err = err reverse _ weights = self. weights [ : : - 1, : : - 1 ]. transpose ( 0, 1, 3, 2 ) return convolve _ 3x3 ( err, reverse _ weights ) | [
0.044360093772411346,
0.5520816445350647,
0.8030400276184082,
0.4701631963253021,
0.17022016644477844,
-0.26191553473472595,
-0.3681800663471222,
-0.07000355422496796,
0.09861783683300018,
0.5695055723190308,
0.24122166633605957,
0.6184548139572144,
-0.2624451220035553,
-0.4232864379882812... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.