text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def fire _ bullet ( bullets, ai _ settings, screen, ship ) : if len ( bullets ) < ai _ settings. bullets _ allowed : # creates new bullet and adds it to bullet group new _ bullet = bullet ( screen, ai _ settings, ship ) bullets. add ( new _ bullet ) | [
-0.5355660915374756,
0.928577721118927,
0.40001919865608215,
1.146759271621704,
0.5743176937103271,
0.5593255758285522,
-0.7714225053787231,
-1.0121983289718628,
0.2403230369091034,
0.029543861746788025,
-0.08208445459604263,
0.9367804527282715,
-0.6022413969039917,
0.6149322986602783,
0... |
def update ( operation, path, recursive = false, line _ by _ line = false, extension ='' ) : if not os. path. exists ( path ) : raise ioerror ('path does not exists :'+ path ) if not path. endswith ( extension ) : return [ ] if os. path. isfile ( path ) : return _ update _ single _ file ( operation, path, line _ by _ l... | [
-0.21411727368831635,
-0.1956484019756317,
0.7953598499298096,
1.4987788200378418,
-0.7430944442749023,
-0.5766111016273499,
0.539699912071228,
0.5462905168533325,
0.11437290906906128,
0.51433265209198,
0.4116927981376648,
-0.22151604294776917,
0.0708010345697403,
-0.24721647799015045,
-... |
def send ( self, command, termination = none, encoding = none ) : if termination is none : termination = self. send _ termination if encoding is none : encoding = self. encoding message = bytes ( command + termination, encoding ) self. log _ debug ('sending { } ', message ) return self. raw _ send ( message ) | [
-0.49778851866722107,
0.7193689346313477,
0.4077826738357544,
0.5961230993270874,
-0.4628545045852661,
-0.11362555623054504,
-1.1814478635787964,
-0.19990438222885132,
0.4731128513813019,
-0.4375706613063812,
-0.6012210845947266,
0.42129865288734436,
-0.44976818561553955,
0.273575574159622... |
def rglob ( # type : ignore [ override ] self, patterns : str | sequence [ str ], *, flags : int = 0, limit : int = _ wcparse. pattern _ limit, exclude : str | sequence [ str ] | none = none ) - > iterable ['path'] : yield from self. glob ( patterns, flags = flags | _ extmatchbase, limit = limit, exclude = exclude ) | [
0.13691024482250214,
0.5231727361679077,
0.8727213144302368,
0.8823305368423462,
-0.2046251744031906,
1.0449838638305664,
0.9930968284606934,
-0.5122599005699158,
0.5354955792427063,
0.05950125306844711,
0.4682092070579529,
0.26087236404418945,
-0.8421310782432556,
-0.2021232694387436,
-... |
def set _ alarm ( alarm _ time : str, alarm _ label : str, alarm _ repeat : str, format _ time : float ) - > list : global upcoming _ alarms # activates new alarm to alert at given time. alarm. enterabs ( format _ time, 1, alert _ alarm, argument = ( alarm _ time, alarm _ label, alarm _ repeat, ), ) # combines the alar... | [
-0.4731472134590149,
-0.5269960165023804,
0.576134204864502,
0.3382093906402588,
0.3573407828807831,
0.24000273644924164,
-0.804226815700531,
-0.49940556287765503,
-0.14738589525222778,
0.36732253432273865,
-0.10631129890680313,
1.7390832901000977,
0.3183988332748413,
0.49779561161994934,
... |
def _ on _ exit ( cls, error = none ) : if error : log. error ( " the shared object manager thread has ended with an error. " ) else : log. info ( " the shared object manager of the worker session has stopped. " ) | [
0.5212599039077759,
-1.0066341161727905,
0.5410953760147095,
-0.15102535486221313,
0.16711193323135376,
0.10961543023586273,
-0.07678931951522827,
-0.0037700003013014793,
0.18954849243164062,
0.2821892499923706,
-0.6866579055786133,
-0.7914435863494873,
-0.26063933968544006,
-0.02994244359... |
def listreferences ( ) : references = cmds. file ( query = true, reference = true ) referencesdict = dict ( ) for ref in references : refnode = cmds. file ( ref, query = true, referencenode = true ) isloaded = cmds. referencequery ( refnode, isloaded = true ) nodesinref = cmds. referencequery ( refnode, nodes = true ) ... | [
-0.2757609486579895,
-0.8638684749603271,
0.5614875555038452,
-1.1935815811157227,
0.3579004406929016,
-0.08796726167201996,
0.3400213122367859,
-0.26078489422798157,
-0.6449450850486755,
0.44722142815589905,
0.2311284989118576,
0.5134348273277283,
-0.3610868453979492,
1.4687694311141968,
... |
def extendleft ( currenthit, cdsseq, geneseq ) : k = 0 se1 = reversed ( cdsseq [ : currenthit [ 0 ] ] ) se2 = reversed ( geneseq [ : currenthit [ 2 ] ] ) for i, j in zip ( se1, se2 ) : if i = = j : k = k + 1 else : break hit = [ currenthit [ 0 ] - k, currenthit [ 1 ], currenthit [ 2 ] - k, currenthit [ 3 ], currenthit ... | [
0.30172696709632874,
-0.6978380680084229,
0.5304412245750427,
-0.2051744908094406,
0.026837892830371857,
0.10179700702428818,
-0.1393405795097351,
0.44766920804977417,
0.009710026904940605,
1.2586174011230469,
-0.6177086234092712,
0.408308207988739,
-0.5773076415061951,
-0.3751942217350006... |
def _ _ iter _ _ ( self ) : i = 0 while true : try : if isinstance ( self. attrs [ i ], numbers. real ) : yield self. attrs [ i ] elif self. node is none : yield node ( self. attrs [ i ] ) else : yield node ( self. node, self. attrs [ i ] ) except indexerror : raise stopiteration i + = 1 | [
-0.7160564064979553,
-0.06353768706321716,
0.43170517683029175,
-0.1492229402065277,
-0.30014535784721375,
0.06771916151046753,
1.2223647832870483,
0.00928402878344059,
-0.5975170731544495,
-0.2299736589193344,
0.47935837507247925,
0.4445727467536926,
-0.31186291575431824,
-0.0657579302787... |
def get _ unique _ portfolio _ card ( list _ portfolios, index ) : return list _ portfolios [ index ] | [
-0.7445801496505737,
0.22608986496925354,
0.3116603195667267,
-0.8588417172431946,
0.4538465440273285,
0.2563822269439697,
-0.457744836807251,
-0.4052351713180542,
1.2142915725708008,
0.5635192394256592,
-0.7142776250839233,
0.22431372106075287,
-0.2898794710636139,
-1.0404809713363647,
... |
def _ _ init _ _ ( self, width, height ) : try : self. integer _ validator ( " width ", width ) self. _ _ width = width except exception as e : print ( e ) try : self. integer _ validator ( " height ", height ) self. _ _ height = height except exception as e : print ( e ) | [
-0.10370269417762756,
-0.2282373011112213,
0.8236114978790283,
0.9281846880912781,
-1.0300840139389038,
0.1287933886051178,
-0.019299618899822235,
-0.2322528213262558,
-0.1324501782655716,
-0.6718006730079651,
0.5306043028831482,
-0.12270335108041763,
-0.6597316861152649,
1.398423075675964... |
def mkarr ( v ) : h, w, _ = get _ res ( v ) out, _ = ffmpeg. input ( v ) \. output ('pipe : ', format ='rawvideo ', pix _ fmt ='rgb24 ', s = f'{ x } x { y } ', r = 2 ) \. run ( capture _ stdout = true ) v = np. frombuffer ( out, np. uint8 ). reshape ( [ - 1, y, x, 3 ] ) return v | [
-0.8391327261924744,
-0.09396146982908249,
0.7317103147506714,
0.13411976397037506,
-0.2445932924747467,
-0.6826857924461365,
-0.2890022099018097,
-0.637429416179657,
0.48888716101646423,
0.15505312383174896,
-0.3485482931137085,
1.1987870931625366,
0.49952951073646545,
0.25135496258735657... |
def test _ 03 _ volume _ rec _ snapshot ( self ) : if self. hypervisor. lower ( )! = " xenserver " : self. skiptest ( " skip test for hypervisor other than xenserver " ) # step 1 self. testdata [ " recurring _ snapshot " ] [ " intervaltype " ] ='hourly'self. testdata [ " recurring _ snapshot " ] [ " schedule " ] = 1 re... | [
-0.24991625547409058,
0.31518468260765076,
0.9781190156936646,
0.40412813425064087,
0.5650845766067505,
0.4393368661403656,
-0.4513048827648163,
0.3814998269081116,
-0.0777217224240303,
-0.06104594096541405,
-0.5384474992752075,
-0.17440137267112732,
-0.3279969394207001,
-0.297294199466705... |
def itksubtractconstantfromimagefilterid2did2 _ cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilterid2did2 _ cast ( * args ) | [
0.03182687982916832,
-1.466252088546753,
0.3224949538707733,
-1.2267961502075195,
-1.0242674350738525,
0.4221717119216919,
0.0007374119013547897,
-0.15544751286506653,
-0.6801148056983948,
0.11816677451133728,
-0.9940016865730286,
1.3167285919189453,
0.6756808757781982,
-0.2432656288146972... |
def _ _ call _ _ ( self, features ) : for fmn in self. featurematches : # " featurematchername " if fmn not in features : return false for fmn, fmv in self. featurematches. items ( ) : # " featurematchername " / " featurematchervalue " feature = features [ fmn ] if callable ( fmv ) : if not fmv ( feature ) : return fal... | [
-1.5888876914978027,
-0.555341899394989,
0.7814847826957703,
0.8011707067489624,
-0.39551666378974915,
-0.014779364690184593,
0.09566967934370041,
0.36776190996170044,
0.1645800620317459,
-1.2038558721542358,
-0.3396385908126831,
-0.4467218220233917,
-0.6907268166542053,
1.0292930603027344... |
def koloruj _ mape ( sciezka, macierz, nazwa, krok, szerokosc ) : # z macierzy pobiera rzedy i szereg # sekcja wczytywania danych opisujacych arkusz podst = image. open ( sciezka ) # zmienna jako oryginal im2 = podst. copy ( ) # w tym miejscu robimy kopie oryginalu i na nim praucjemy n2 = 0 # licznik szeregow - szeroko... | [
-0.6489664316177368,
-0.9426743984222412,
0.5062591433525085,
-0.5894208550453186,
-0.7688167095184326,
-0.23031513392925262,
0.57278972864151,
0.026993675157427788,
0.15542349219322205,
0.41860896348953247,
-0.12412895262241364,
-0.5604574084281921,
0.1186765655875206,
0.30053678154945374... |
def get _ file _ url ( self, url _ width = none, url _ height = none, url _ param = none ) - > str : # plain url is requested. if url _ width is none and url _ height is none and url _ param is none : return self. latest _ file _ info. url # thumburl is requested. self. site. loadimageinfo ( self, history = not self. _... | [
-0.5584747195243835,
0.017309948801994324,
0.9043753147125244,
0.12233227491378784,
0.7118704915046692,
-0.1355830878019333,
0.26970505714416504,
0.23959848284721375,
-0.2874491214752197,
-0.7786223292350769,
0.6241308450698853,
-0.031573548913002014,
0.3374536633491516,
0.8851253390312195... |
def authsubtokenfromurl ( url ) : token = tokenfromurl ( url ) if token : return'authsub token = % s'% token return none | [
0.18948253989219666,
-0.35863277316093445,
0.40241244435310364,
0.009152977727353573,
-0.5509746074676514,
-0.4872933328151703,
-0.27703991532325745,
0.6152202486991882,
0.5668380856513977,
-0.48616209626197815,
-0.8556674718856812,
0.8543543219566345,
1.274461030960083,
-0.674432873725891... |
def generate ( self, file ) : res = list ( self. result ) args = [ i [ 0 ] for i in split _ list ( list ( res [ 1 ] ), ',') ] output = " # define % s ( % s ) ( ) " % ( res [ 0 ], " ". join ( args ) ) c _ code _ warning ( file, output, self. line ) | [
0.23951877653598785,
0.3900727331638336,
0.5995321869850159,
0.44755008816719055,
0.38846614956855774,
-0.5302278995513916,
0.19155627489089966,
0.5551007986068726,
-1.2608088254928589,
0.3271690309047699,
-0.7156967520713806,
-0.17596125602722168,
0.20434574782848358,
0.6365855932235718,
... |
def payment _ method _ id ( self ) : return self. _ payment _ method _ id | [
0.6935815215110779,
-0.02917914092540741,
0.03431251645088196,
0.04159577190876007,
0.306115061044693,
0.09440311044454575,
0.3948136270046234,
0.11015096306800842,
0.6348476409912109,
-0.16753412783145905,
1.0672954320907593,
0.5316610932350159,
-0.035306982696056366,
0.15400971472263336,... |
def new _ click ( self ) : for i in range ( self. _ click _ to _ interval. shape [ 1 ] ) : if self. _ click _ to _ interval [ left ] [ i ] = = 0 : return i + 1 | [
-0.5989735722541809,
-0.10382986813783646,
0.6223011612892151,
0.20053577423095703,
-0.29092174768447876,
0.021671028807759285,
1.0316925048828125,
0.291631281375885,
-0.4238138794898987,
-0.27415111660957336,
0.47894302010536194,
0.4578936696052551,
-0.4514952301979065,
-0.076737612485885... |
def gateway _ port ( self ) : return self. _ gateway _ port | [
1.0350916385650635,
-0.1360064595937729,
0.20820660889148712,
-0.1191844716668129,
0.331246554851532,
0.8870077729225159,
1.4189203977584839,
-0.04876374453306198,
-0.24119438230991364,
0.0006398787372745574,
0.11545264720916748,
0.3492346405982971,
-1.2932581901550293,
0.5335075259208679,... |
def update ( self ) : if self. _ due ( ) : self. _ since _ last = 0 self. _ advance ( ) self. _ since _ last + = 1 | [
-0.2938685417175293,
0.6458002328872681,
0.5434038043022156,
-0.5838323831558228,
-0.12403547763824463,
-0.2644144892692566,
0.40842458605766296,
-0.17147326469421387,
-0.7140807509422302,
-0.285566121339798,
0.4806230962276459,
-0.2186148315668106,
-0.48443976044654846,
0.8027154803276062... |
def test _ calculate _ zero _ duty _ cycle ( ) : attributes ['hazard _ rate _ method _ id'] = 1 attributes ['environment _ active _ id'] = 4 attributes ['environment _ dormant _ id'] = 3 attributes ['category _ id'] = 1 attributes ['mult _ adj _ factor'] = 1. 0 attributes ['duty _ cycle'] = 0. 0 _ attributes, _ msg = c... | [
0.5790403485298157,
-0.06443209201097488,
0.5656353831291199,
0.2204899787902832,
0.7868037819862366,
-0.46927130222320557,
0.43583256006240845,
-0.19401311874389648,
-0.924060046672821,
-0.30874788761138916,
-0.40857890248298645,
-0.5155463814735413,
-0.19747310876846313,
1.00744342803955... |
def save _ multipoly _ and _ classes2shapefile ( multipolygon, classes, shapefilename ) : # define the shapefile schema schema = {'geometry':'polygon ','properties': {'class':'int'}, } # write to a shapefile with the amersfoort crs with fiona. open ( shapefilename,'w ','esri shapefile ', schema, crs = {'init': " epsg :... | [
-0.5809003710746765,
-0.9374310970306396,
0.5540284514427185,
0.006190052721649408,
0.30941808223724365,
0.7003651261329651,
-0.5966812372207642,
0.2605094611644745,
-0.2169858068227768,
0.25178417563438416,
-1.1834250688552856,
-0.37390172481536865,
0.7265506982803345,
0.0727677196264267,... |
def updateuserstory ( request, story _ id = none ) : if ( request. method = ='post') : form = updateuserstoryform ( request. post ) if form. is _ valid ( ) : userstory = userstory ( story _ id = form. cleaned _ data. get ('story _ id'), story _ ref = form. cleaned _ data. get ('story _ ref'), story _ title = form. clea... | [
-0.10253619402647018,
0.06424210965633392,
0.7204414010047913,
0.25653448700904846,
-0.6586262583732605,
0.4816020131111145,
-0.3211941421031952,
-0.0038230030331760645,
0.14219941198825836,
-0.32468849420547485,
0.3315175175666809,
-0.3339252173900604,
0.36481818556785583,
0.4311035275459... |
def run _ test ( self ) : cmd = " ". join ( self. cmd ) if tasks. environment. dry _ run : tasks. environment. info ( cmd ) return sys. stdout. write ( cmd ) msg = colorize ('green ','\ n { bar } \ n running tests for { suite _ name } \ n { bar } \ n '. format ( suite _ name = self. root, bar ='='* 40 ), ) sys. stdout.... | [
-0.2935883700847626,
-0.04915560781955719,
0.7815073132514954,
0.5291411876678467,
-0.23528826236724854,
0.596716582775116,
0.7482647895812988,
-0.3114768862724304,
-0.5620455145835876,
-0.34287819266319275,
0.12855103611946106,
0.3711775839328766,
-0.6536762118339539,
0.3844614326953888,
... |
def deactivatedevicetypeconfiguration ( self, typeid ) : req = apiclient. devicetypeurl % ( self. host, typeid ) body = { " operation " : " deactivate - configuration " } resp = requests. patch ( req, auth = self. credentials, headers = { " content - type " : " application / json " }, data = json. dumps ( body ), verif... | [
-2.449338674545288,
-0.18279708921909332,
0.22710464894771576,
-0.24774570763111115,
-0.38954952359199524,
-0.2391808182001114,
0.526408851146698,
-0.7943313121795654,
-0.3758258819580078,
0.9579401016235352,
-1.0706229209899902,
0.5107356905937195,
-1.068024754524231,
-0.04485639557242393... |
def validate _ requested _ realms ( self, client _ key, realms, request ) : raise notimplementederror ( " subclasses must implement this function. " ) | [
-1.0014853477478027,
-0.6220123171806335,
0.6348586678504944,
0.22027260065078735,
-0.397869735956192,
0.8876902461051941,
-0.05221898853778839,
-0.5451367497444153,
-0.39827096462249756,
-0.02158571407198906,
1.028092384338379,
0.5980604887008667,
-0.4122216999530792,
0.6593763828277588,
... |
def poloka _ emulate _ output ( m, r, seeing, path ) : file = op. join ( path, " psf. dat " ) f = open ( file,'w') f. write ( " imagepsf _ version 1 \ n " ) f. write ( " % s \ n " % ( m. name ) ) f. write ( " % s % s \ n " % ( r. hsize, r. hsize ) ) f. write ( " % s % s \ n " % ( seeing, r. gain ) ) f. write ( " % s % ... | [
-0.189737468957901,
-1.1486389636993408,
0.9247262477874756,
-1.0096269845962524,
-0.4391804337501526,
-0.019856387749314308,
0.47473976016044617,
-0.477170467376709,
-0.6725273728370667,
0.18177367746829987,
-0.5174569487571716,
-0.11834323406219482,
0.18628031015396118,
-0.29482457041740... |
def video _ feed ( ) : return response ( gen ( ), mimetype ='multipart / x - mixed - replace ; boundary = frame') | [
0.5522680878639221,
-0.1884971261024475,
0.6435896754264832,
0.6686606407165527,
-0.336322546005249,
-1.3031234741210938,
-0.7472912669181824,
-0.013189119286835194,
0.9291636943817139,
-0.6350421905517578,
-0.597335696220398,
1.0423766374588013,
-1.032969355583191,
-0.025844089686870575,
... |
def test _ hawkessumexpkern _ solver _ step ( self ) : for solver in solvers : if solver in ['bfgs'] : msg ='^ solver " % s " has no settable step $'% solver with self. assertwarnsregex ( runtimewarning, msg ) : learner = hawkessumexpkern ( self. decays, solver = solver, step = 1, * * test. specific _ solver _ kwargs (... | [
-0.1575295627117157,
0.030901096761226654,
0.5091330409049988,
0.8749039173126221,
0.21822072565555573,
-0.08241557329893112,
-0.16604328155517578,
-0.24323953688144684,
-0.3232733905315399,
-0.9697949290275574,
-0.6431289315223694,
-0.4441591501235962,
0.07930663973093033,
1.1929800510406... |
def terminate ( self ) : self. _ terminated = true for dut _ worker in self. _ active _ workers : dut _ worker. terminate ( ) | [
-0.4145434498786926,
-0.7752047181129456,
0.3400353491306305,
0.17035111784934998,
1.7041772603988647,
0.22133678197860718,
-0.1156582459807396,
0.31695860624313354,
-0.7505102157592773,
-0.12225032597780228,
-1.7668713331222534,
0.5148122310638428,
-0.25704991817474365,
0.4833090007305145... |
def import _ file ( self, fspec, references = none, package _ path = none ) : abs _ fspec = os. path. abspath ( fspec ) if not self. _ exists ( abs _ fspec ) : if os. path. isabs ( fspec ) : # absolute specification raise processorexception ( " model'{ }'not found. ". format ( fspec ) ) else : # relative specification.... | [
-0.07172402739524841,
0.22492630779743195,
0.6153556108474731,
-0.2993886470794678,
0.10903921723365784,
-0.3375838100910187,
0.6889652609825134,
0.3265283703804016,
-0.971420407295227,
-0.33874017000198364,
0.5122830867767334,
-0.37850239872932434,
0.3925897777080536,
-0.10854356735944748... |
def lastresponse ( ) - > dict : return _ _ response | [
-0.33874261379241943,
-1.555553913116455,
0.5127175450325012,
-1.431682825088501,
-0.2670463025569916,
-1.06353759765625,
0.09330855309963226,
-0.757106363773346,
1.2212271690368652,
-0.44471508264541626,
-0.5916761159896851,
-1.299816608428955,
-0.7668334245681763,
-0.8343233466148376,
... |
async def test _ error ( self, ctx ) : self. journal. send ( " error / runtime ", ctx. guild, " raising runtime error ", icon = " error " ) raise runtimeerror ( " intentionally raised exception " ) | [
0.6895228624343872,
0.6089931130409241,
0.31233838200569153,
-0.2610006630420685,
0.8317718505859375,
-0.042087242007255554,
0.020928269252181053,
0.10928068310022354,
0.14747773110866547,
-0.4997740089893341,
-0.03921394422650337,
0.9345720410346985,
-0.9550648331642151,
1.19036865234375,... |
def _ _ init _ _ ( self, message ='', * * kwargs ) : message = " \ nerror : % s!! \ n " % ( message ) super ( testerror, self ). _ _ init _ _ ( message ) | [
1.0847116708755493,
0.2938944399356842,
0.5150845646858215,
0.42667463421821594,
-0.009217385202646255,
-0.023782916367053986,
-0.039894457906484604,
0.6455820202827454,
0.010245171375572681,
-0.3920554220676422,
-0.28055083751678467,
0.26158392429351807,
-1.5786921977996826,
0.61870664358... |
def create _ and _ pay _ news _ order ( service _ user, news _ item _ id, order _ items _ to ) : @ db. non _ transactional def _ get _ customer ( ) : return get _ customer ( service _ user ) @ db. non _ transactional def _ get _ contact ( ) : return contact. get _ one ( customer ) customer = _ get _ customer ( ) azzert... | [
0.055615175515413284,
0.41813337802886963,
0.6991627216339111,
1.4819748401641846,
0.2735016942024231,
0.3502594530582428,
-0.7335848808288574,
-0.42448270320892334,
-0.11243568360805511,
0.4037575125694275,
-0.4219333529472351,
-0.4132544696331024,
0.15550395846366882,
0.6049887537956238,... |
def validate _ token _ request ( self, request ) : for param in ('grant _ type ','username ','password') : if not getattr ( request, param ) : raise errors. invalidrequesterror ('request is missing % s parameter.'% param, request = request ) for param in ('grant _ type ','username ','password ','scope') : if param in r... | [
-0.6651987433433533,
-0.5209716558456421,
0.7956038117408752,
-0.0741923451423645,
-0.17238162457942963,
0.08136588335037231,
0.5745123624801636,
-0.7304964065551758,
-0.015333768911659718,
0.06824015825986862,
0.4598749577999115,
1.2368985414505005,
0.1872122585773468,
0.8761182427406311,... |
def create _ pulsars ( self, freqrange ) : # pulsar parameter file directory self. pulsardir = os. path. join ( self. basedir, " pulsars " ) self. makedirs ( self. pulsardir ) # " amplitude " parameters amppars = [ " h0 ", " c21 ", " c22 ", " q22 " ] if not isinstance ( freqrange, ( list, tuple, np. ndarray ) ) : raise... | [
-1.2095497846603394,
-0.009695416316390038,
0.7007068395614624,
-1.7803733348846436,
-0.22952863574028015,
0.2882707417011261,
-0.2369125932455063,
-0.28339114785194397,
-0.382295161485672,
0.12571720778942108,
-0.2933129370212555,
-0.32330265641212463,
0.04983774200081825,
1.2559759616851... |
def handle _ worker ( self, s, status ) : self. workers _ info [ s ] ['status'] = status if self. workers _ info [ s ] ['status'] = ='ready': self. out _ sockets. append ( s ) elif self. workers _ info [ s ] ['status'] = ='busy': self. out _ sockets. remove ( s ) | [
-0.18724176287651062,
-0.30645060539245605,
0.5844715237617493,
-0.9573279619216919,
-0.2010037899017334,
-0.0961233451962471,
-0.39293336868286133,
0.3870340883731842,
0.6036142706871033,
0.36448612809181213,
-1.3251103162765503,
-0.24579478800296783,
-0.05791769549250603,
-0.225564122200... |
def forward ( self, pred _ real : tensor, pred _ fake : tensor ) - > tensor : error _ discriminator _ real = self. loss _ bce ( pred _ real, torch. ones ( size = pred _ real. shape, dtype = torch. float32, device = pred _ real. device ) ) error _ discriminator _ fake = self. loss _ bce ( pred _ fake, torch. zeros ( siz... | [
0.10112477838993073,
-0.11951114982366562,
0.5223646759986877,
-0.16481928527355194,
-0.22801563143730164,
0.29011279344558716,
0.7295482754707336,
0.889417827129364,
-0.33496642112731934,
-0.22496537864208221,
-0.6358967423439026,
1.503731608390808,
0.8338778614997864,
-0.1361615657806396... |
def addfile ( self, path, msg = " " ) : item = item. from _ path ( repo = self. repo, path = path ) self. additem ( item ) | [
0.5910176634788513,
0.46214982867240906,
0.6156288385391235,
0.1734401285648346,
0.6190880537033081,
1.3387435674667358,
-0.3739977180957794,
0.5601255297660828,
-0.841301679611206,
-0.6151558756828308,
-0.09167911857366562,
-0.1943354606628418,
-0.24332785606384277,
0.07616102695465088,
... |
def logistic2d ( y, coords, knots, pred _ coords ) : model = pm. model ( ) with model : alpha = pm. normal ('alpha ', mu = 0., sd = 1. ) sigma _ sq = pm. gamma ('sigma _ sq ', 1., 1. ) phi = pm. gamma ('phi ', 2., 0. 1 ) spatial _ cov = sigma _ sq * pm. gp. cov. matern32 ( 2, phi ) spatial _ gp = pm. gp. latent ( cov _... | [
0.5910637378692627,
-0.6206563115119934,
0.9057131409645081,
-0.5107971429824829,
-0.9511398077011108,
-0.07647466659545898,
-0.776922881603241,
-0.18998901546001434,
-0.3291543126106262,
-0.19479584693908691,
-0.44679370522499084,
0.6316743493080139,
0.932875394821167,
-0.6297457218170166... |
def generate _ create _ tag _ panel ( create _ tag _ signal, delete _ tag _ signal ) : return components. get _ create _ tag _ components ( ) | [
0.0537133663892746,
-0.4357176125049591,
0.23785282671451569,
-0.05477040261030197,
0.7373685240745544,
0.03617803752422333,
-0.5483177900314331,
-0.5459309816360474,
-0.8464218378067017,
0.18686413764953613,
-0.5333263874053955,
0.24269284307956696,
0.06856232136487961,
0.6165552139282227... |
def init ( ) : start _ threads ( ) # loop until the user quits try : while true : time. sleep ( 1 ) with global _ state. global _ state _ lock : if not global _ state. is _ running : break except keyboardinterrupt : pass clean _ up ( ) | [
0.7432639598846436,
0.2629534900188446,
0.5332551002502441,
1.149158000946045,
0.2375679314136505,
1.0309745073318481,
0.6954993009567261,
-0.10591071844100952,
-0.42335397005081177,
-0.016637740656733513,
-0.1522015929222107,
0.4995743930339813,
-1.1623280048370361,
0.022067174315452576,
... |
def test _ atomic _ base64 _ binary _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ min _ length _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - minlength - 5. xsd ... | [
0.3426324725151062,
-0.3856528401374817,
0.34220054745674133,
0.7956045269966125,
-0.23640242218971252,
-0.20918084681034088,
0.14247192442417145,
-0.8353387117385864,
-0.11945142596960068,
0.4336825907230377,
-0.8126112818717957,
0.08313053101301193,
-1.1484227180480957,
0.175855696201324... |
def do _ get _ images ( self, args ) : global token headers = { " content - type " : " application / json ", " x - auth - token " : token } custom _ url = dct [ datacenter ] +'/ images'r = requests. get ( custom _ url, headers = headers ) # r = requests. get ( custom _ url, headers = ( { " x - auth - token " : token } ... | [
-0.5690074563026428,
0.3679679036140442,
0.6522048711776733,
-0.4136286675930023,
0.37856167554855347,
-0.7331809997558594,
-0.25394749641418457,
0.0517057329416275,
0.25765955448150635,
0.19440358877182007,
-0.21866482496261597,
1.318447470664978,
0.08438083529472351,
0.33902695775032043,... |
def delete ( data, taxonomy _ id ) : client = utils. getclientinstance ( ). data _ taxonomystores _ datataxonomies name = resources. registry. create ('datapol. data. tag ', data = data, taxonomystoresid = utils. gettaxonomystoresid ( ), datataxonomiesid = taxonomy _ id ). relativename ( ) try : return client. deletean... | [
0.6561170816421509,
0.19835259020328522,
0.0038742143660783768,
-0.8856278657913208,
0.21818982064723969,
0.24290217459201813,
0.08008437603712082,
-0.31808122992515564,
0.13888898491859436,
0.49943262338638306,
-0.57305508852005,
0.05557239055633545,
0.42003411054611206,
-0.01325210835784... |
def container _ logs ( client, resource _ group _ name, name, container _ name = none ) : if container _ name is none : container _ name = name log = client. container _ logs. list ( resource _ group _ name, container _ name, name ) return log. content | [
0.7129930853843689,
0.16971378028392792,
0.4228633940219879,
0.17875534296035767,
-0.5785511136054993,
-0.6242468357086182,
-0.9784384965896606,
-1.2554230690002441,
-0.17559584975242615,
0.8782191872596741,
0.568095862865448,
0.43931302428245544,
0.15051661431789398,
-0.018245553597807884... |
def trainfn ( fnsim, embeddings, leftop, rightop, loss = loss. hinge, loss _ margin = 1. 0, op ='', method ='sgd ', decay = 0. 999, epsilon = 1e - 6, max _ learning _ rate = none, weight _ l1 _ embed _ regularizer = none, weight _ l2 _ embed _ regularizer = none, weight _ l1 _ param _ regularizer = none, weight _ l2 _ ... | [
0.2936646044254303,
0.26596131920814514,
0.8650537133216858,
0.4249511659145355,
-0.44267529249191284,
-0.16010215878486633,
-0.20771753787994385,
0.5080844163894653,
0.25870704650878906,
0.3836941123008728,
-0.3681633174419403,
-0.2885432243347168,
0.4750315546989441,
-0.6693596243858337,... |
def stop _ wemo ( event ) : _ logger. debug ( " shutting down wemo event subscriptions " ) registry. stop ( ) | [
0.4494527280330658,
-0.8994905948638916,
0.10546237230300903,
-0.5063480734825134,
0.2916235327720642,
0.28191548585891724,
0.36159002780914307,
0.7658662796020508,
-0.6217613220214844,
0.48022156953811646,
-0.3898543119430542,
0.6120272874832153,
-0.37039196491241455,
0.2598361372947693,
... |
def belief _ propagation ( s, ray _ voxel _ indices, ray _ voxel _ count, grid _ shape, gamma = 0. 031, bp _ iterations = 3 ) : # extract the number of the rays as well as the maximum number of marched # voxels n, m, _ = k. int _ shape ( ray _ voxel _ indices ) # initialize the ray to occupancy messages to a uniform di... | [
0.13060826063156128,
0.12100470066070557,
0.8556409478187561,
0.11259857565164566,
0.6637202501296997,
-0.6988569498062134,
0.8861032724380493,
0.7071166038513184,
-0.44299936294555664,
1.1380152702331543,
0.7537729144096375,
0.38016074895858765,
-0.032382283359766006,
0.5941274762153625,
... |
def create _ card ( self ) : card = card ( ) self. db. save _ card ( card ) print ( " your card has been created " ) card. display _ info ( ) | [
0.4408295750617981,
-0.2381853312253952,
0.2823718190193176,
0.13180023431777954,
1.766381025314331,
0.9391048550605774,
-0.6160494685173035,
1.0294420719146729,
-0.3687359094619751,
-0.32451191544532776,
-0.509205162525177,
-0.4353720545768738,
0.4843040406703949,
0.6195888519287109,
0.... |
def add ( self, vector2 ) : self. x + = vector2. x self. y + = vector2. y | [
-0.796928882598877,
-1.5009180307388306,
0.5773842930793762,
-0.3938332200050354,
0.12179946899414062,
1.0655149221420288,
-0.41248619556427,
-0.8258980512619019,
0.058588430285453796,
-0.5436007976531982,
-0.449870228767395,
0.7959546446800232,
0.05761876329779625,
0.28678175806999207,
... |
def _ _ init _ _ ( self, owningworld ) : super ( blockmetadatastore, self ). _ _ init _ _ ( ) self. owningworld = owningworld | [
0.6227598786354065,
0.16851554811000824,
0.3024274706840515,
0.582046627998352,
-0.685064971446991,
1.1412370204925537,
-0.03860073909163475,
-0.44553834199905396,
-0.21639645099639893,
0.06376365572214127,
-0.01418315153568983,
0.8220010995864868,
-0.3797272741794586,
0.5898996591567993,
... |
def contains _ point ( self, point : array _ like, * * kwargs ) - > bool : vector _ a = vector. from _ points ( point, self. point _ a ) vector _ b = vector. from _ points ( point, self. point _ b ) if vector _ a. is _ zero ( * * kwargs ) or vector _ b. is _ zero ( * * kwargs ) : return true similarity = vector _ a. co... | [
0.2064693719148636,
0.06246679276227951,
0.6105234026908875,
1.089002013206482,
0.45009684562683105,
0.6898161768913269,
-0.8630685806274414,
-0.10030648857355118,
0.31464359164237976,
-0.244187593460083,
0.4803442060947418,
0.218659445643425,
-0.7297497391700745,
0.3366461992263794,
-0.... |
def check _ shape ( self, observation ) - > none : if self. _ i % obs _ validation _ interval = = 0 : if type ( observation ) is list and isinstance ( self. _ obs _ space, gym. spaces. box ) : observation = np. array ( observation ) try : if not self. _ obs _ space. contains ( observation ) : raise valueerror ( " obser... | [
-0.5497394800186157,
0.8139198422431946,
0.7653680443763733,
0.7794760465621948,
-0.3324495851993561,
1.056675910949707,
0.07711714506149292,
-0.45307233929634094,
0.1695583015680313,
0.060457419604063034,
0.2841695547103882,
0.4437474310398102,
-0.12219885736703873,
1.2485251426696777,
... |
def num _ per _ epoch ( self ) : images = self. images return len ( images ) | [
-0.36201784014701843,
0.32925477623939514,
0.47319838404655457,
-0.09158588945865631,
0.40683892369270325,
0.10250693559646606,
0.38307881355285645,
1.0517427921295166,
-0.5010020136833191,
-0.3752477467060089,
-0.8341679573059082,
-0.2429642230272293,
0.803561806678772,
1.298911452293396,... |
def project ( self, x ) : p = np. dot ( self. r, x ) + self. t p = - 1 * p [ 0 : 2 ] / p [ 2 ] norm _ p = np. linalg. norm ( p ) r = 1 + self. k1 * norm _ p + self. k2 * norm _ p * norm _ p return self. f * r * p | [
-0.10093636065721512,
-0.18961067497730255,
0.700294554233551,
0.43199610710144043,
-0.9652466177940369,
0.25258710980415344,
-0.7580968141555786,
-0.05763186141848564,
-0.01885734125971794,
0.919873833656311,
0.4422241151332855,
-0.5310767889022827,
-0.8642387986183167,
-0.889582216739654... |
def _ set _ settings _ file ( settings _ file ) : from werkzeug. utils import importstringerror try : app. config. from _ pyfile ( settings _ file ) except importstringerror : sys. stderr. write ( " received an importstringerror, please review your python settings file \ n % s \ n " % settings _ file ) sys. exit ( 1 ) | [
0.15577538311481476,
-0.2894298732280731,
0.20977051556110382,
0.1882469654083252,
0.7098053693771362,
0.45639121532440186,
0.5120193958282471,
-0.39149487018585205,
-1.1895630359649658,
1.0741255283355713,
0.07824807614088058,
-0.1292085498571396,
-0.04389828443527222,
0.20153558254241943... |
def test _ example _ input _ two _ valid _ input _ name ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input two " ) input _ page. entity2. examp... | [
-0.3838879466056824,
-0.16930191218852997,
0.4557151198387146,
0.12828025221824646,
-0.2916756272315979,
0.9412278532981873,
-0.342064768075943,
-0.28016120195388794,
0.2941023111343384,
0.4391278028488159,
-0.8835292458534241,
-0.03277938812971115,
0.3083404004573822,
0.18484550714492798,... |
def get _ time _ filters ( clockobj, datetimeindex, interval, numinterval = 2, clockfield ='start') : # grab given hour + / - numinterval intervals. lower _ time = clockobj. timediff ( clockfield, - numinterval * interval ). time ( ) upper _ time = clockobj. timediff ( clockfield, numinterval * interval ). time ( ) # g... | [
-0.9414783716201782,
-0.16577118635177612,
0.8632730841636658,
-0.09395834058523178,
-0.4364604353904724,
-0.3662663698196411,
0.15399092435836792,
-0.9648658037185669,
-0.4687492847442627,
0.882296085357666,
-0.4874584376811981,
-0.11012367159128189,
-0.1410197913646698,
0.349489122629165... |
def wx _ zestaw _ ze _ zdj ( self, evt ) : dialog = wx. filedialog ( self, message ='wybierz zdjecie planszy do przetworzenia ', defaultfile ='', wildcard ='*. png ', style = wx. fd _ open, pos = ( 10, 10 ) ) if dialog. showmodal ( ) = = wx. id _ ok : sciezka = dialog. getpaths ( ) [ 0 ] dialog. destroy ( ) self. wx _ ... | [
0.6004669070243835,
-0.36515963077545166,
0.4385007619857788,
-0.3252846300601959,
-0.8307195901870728,
1.444067120552063,
0.9355757236480713,
-0.30296143889427185,
-0.24419932067394257,
-0.23182055354118347,
-0.31919941306114197,
0.25412192940711975,
0.4063083231449127,
0.5714359283447266... |
def get _ random _ state ( init ) : if isinstance ( init, ( numbers. integral, np. integer ) ) : return np. random. randomstate ( init ) elif init = = " random - seed " : return np. random. randomstate ( none ) elif init = = " global - rng " : return np. random. mtrand. _ rand elif isinstance ( init, np. random. random... | [
0.24081747233867645,
-0.4570592939853668,
0.44807666540145874,
-0.4384901821613312,
-0.674038827419281,
0.26397204399108887,
0.36812591552734375,
-0.3688957989215851,
1.5055707693099976,
-0.522792637348175,
0.4238329231739044,
0.6421414017677307,
-0.8674427270889282,
-0.3215792775154114,
... |
def read _ handle ( self, handle : int ) - > bytes : if not self. is _ connected ( ) : raise bluetoothbackendexception ( " not connected to device! " ) return self. _ device. char _ read _ handle ( handle ) | [
-0.1471073478460312,
0.4051409959793091,
0.6047636270523071,
0.27332934737205505,
-0.12799464166164398,
0.3246909976005554,
-0.1851893961429596,
-1.3778650760650635,
-0.9959443807601929,
-0.9105536937713623,
-0.015084899961948395,
0.6082246899604797,
-1.2288906574249268,
-0.855675637722015... |
def all _ events ( request ) : events = event. objects. all ( ) query = none if'search'in request. get : query = request. get ['search'] if not query : messages. error ( request, " you didn't enter any search criteria! " ) return redirect ( reverse ('events') ) queries = q ( name _ _ icontains = query ) | q ( descripti... | [
0.3953056037425995,
-0.14885255694389343,
0.6118710041046143,
0.25374725461006165,
-0.2823195159435272,
0.24682724475860596,
-0.021974096074700356,
0.7195357084274292,
0.35074082016944885,
0.15556855499744415,
0.9770282506942749,
-0.0036565924528986216,
0.27144530415534973,
0.7718473076820... |
def type ( self, type ) : if self. local _ vars _ configuration. client _ side _ validation and type is none : # noqa : e501 raise valueerror ( " invalid value for ` type `, must not be ` none ` " ) # noqa : e501 self. _ type = type | [
0.23510664701461792,
0.08587513118982315,
-0.24096359312534332,
0.14205287396907806,
0.4481513798236847,
0.6801012754440308,
0.768488347530365,
-0.4339166283607483,
-0.20024628937244415,
0.26656246185302734,
-0.5214795470237732,
-0.008203898556530476,
-0.5496547818183899,
0.815372347831726... |
def write _ by _ name ( self, name, value, plc _ datatype ) : with self. _ lock : try : return self. _ client. write _ by _ name ( name, value, plc _ datatype ) except pyads. adserror as err : _ logger. error ( " error writing % s : % s ", name, err ) | [
-0.4593890607357025,
-0.42865410447120667,
0.320882648229599,
-0.713058590888977,
-0.5633069276809692,
-0.39608895778656006,
-0.2119097262620926,
-1.1338188648223877,
0.02407682128250599,
0.8848347663879395,
-0.4118089973926544,
0.4500618875026703,
-0.7414140105247498,
-0.195047527551651,
... |
def man _ active ( self, state ) : if state = = qtcore. qt. checked : self. man _ active _ flag = 1 self. manual _ cut _ btn. setenabled ( true ) else : self. man _ active _ flag = 0 self. manual _ cut _ btn. setenabled ( false ) | [
-0.4427122473716736,
-0.8700945377349854,
0.5975502729415894,
0.3668559193611145,
-0.19650648534297943,
0.8717458248138428,
0.13109998404979706,
0.9500600695610046,
0.10300567001104355,
0.0012767021544277668,
-0.6415091156959534,
0.8960492014884949,
0.29896315932273865,
0.15304042398929596... |
def create _ aircraft ( ) : # geometry database geometry = dict ( ) return geometry | [
-0.1506403684616089,
-0.3966619074344635,
0.17215688526630402,
-0.12986630201339722,
0.14223012328147888,
1.2521991729736328,
-0.5191668272018433,
0.06066567450761795,
-1.4479552507400513,
-0.19114762544631958,
-0.7353919148445129,
-0.9779736995697021,
0.3713913559913635,
0.199430972337722... |
def compute _ eggs _ center ( seg _ label ) : df _ center = pd. dataframe ( ) for lb in range ( 1, seg _ label. max ( ) + 1 ) : im _ bin = ( seg _ label = = lb ) if np. sum ( im _ bin ) > 0 : pos = ndimage. measurements. center _ of _ mass ( seg _ label = = lb ) df _ center = df _ center. append ( {'x': pos [ 1 ],'y': ... | [
-0.7307136654853821,
-0.24349597096443176,
0.5957773327827454,
0.2049330323934555,
0.28713086247444153,
-0.4187241196632385,
0.1664060652256012,
0.17324797809123993,
0.15548986196517944,
0.7970331907272339,
0.2859036922454834,
-0.42344343662261963,
-0.32135239243507385,
-0.3508842289447784... |
def pop ( self, rollback ) : if rollback = = true : self. ptrread = self. ptrpush self. ptrpush = - 1 | [
0.473807156085968,
0.9100369215011597,
0.5377746224403381,
-0.4094267189502716,
0.45108306407928467,
0.501539409160614,
0.49456295371055603,
0.736660897731781,
0.19329923391342163,
1.5782686471939087,
0.4551162123680115,
0.1322084218263626,
-1.9397825002670288,
-0.5923592448234558,
0.371... |
def from _ json ( cls, json : dict ) - > contact : resource = cls ( ) for key in json : is _ private = key. startswith ( " _ " ) if not is _ private : setattr ( resource, key, json [ key ] ) return resource | [
-1.272304892539978,
-1.1302388906478882,
0.3625073730945587,
-0.8744276762008667,
-1.3282811641693115,
-0.4713338017463684,
-0.5498972535133362,
-1.1924047470092773,
0.5729742050170898,
0.8962023258209229,
-0.4434957802295685,
-0.7156336307525635,
0.2993987798690796,
0.1853318065404892,
... |
def set _ as _ shower ( result _ set ) : result _ set ['fields'] ['type'] ='shower'result _ set ['fields'] ['type _ val'] = 1 return result _ set | [
-1.2141339778900146,
0.6262385845184326,
0.36749035120010376,
-0.9992282390594482,
-0.6207072734832764,
-0.029335755854845047,
0.2750307321548462,
-0.8855894207954407,
0.786497175693512,
-0.3796346187591553,
-0.428323894739151,
1.0733535289764404,
0.4497665762901306,
0.5881037712097168,
... |
def handleselecthero ( self, event ) : if not self. attackchoice : if graphicsdevice. ismouseinside ( event, pygame. rect ( configuration. hero _ human _ position, configuration. hero _ size ) ) : self. hero _ bottom. selected = true self. attackfromhero = configuration. bottom self. attackfromindex = - 1 self. attackc... | [
0.12734127044677734,
0.02611425146460533,
0.7222997546195984,
0.7006375193595886,
0.8285973072052002,
-0.27517959475517273,
0.4613025486469269,
0.001580566167831421,
0.07579122483730316,
0.17510251700878143,
-0.46040287613868713,
0.8875070810317993,
0.03345103934407234,
0.11952788382768631... |
def get _ capabilities ( self ) : return self. _ send ( requestmessage ( 0, capabilities. id ) ) | [
-0.5496687293052673,
0.7181430459022522,
0.24112476408481598,
1.5109361410140991,
1.1507048606872559,
-1.5206358432769775,
-0.8821327686309814,
-1.225512146949768,
0.7083716988563538,
-0.5105808973312378,
-0.7455736994743347,
0.9970802664756775,
-1.1174203157424927,
0.8676813840866089,
-... |
def get _ daily _ row _ count ( ) : pass # query = " select timeupdated, currenttime, description from traveltimes ". format ( tid, startdate, enddate ) | [
-0.6009609699249268,
0.19633688032627106,
0.48447299003601074,
0.41285353899002075,
0.48641589283943176,
0.06286215037107468,
-0.3163636326789856,
0.22935272753238678,
-0.9894139766693115,
0.6934266686439514,
0.4580936133861542,
-0.8695352077484131,
0.08835572749376297,
0.2804050147533417,... |
def collect _ run _ 1 _ results ( ) : prepare _ completed _ run _ 1 _ outputs ( ) root = get _ root _ path ( ) slns _ path = os. path. join ( root, " completed ", " solutions " ) rows = [ ] for folder in os. listdir ( slns _ path ) : log. info ( " parsing " + folder ) run _ type, run _ id = get _ run _ type _ and _ id ... | [
-0.28633353114128113,
-0.260852187871933,
0.7069520950317383,
0.6160096526145935,
0.39397791028022766,
-0.14012637734413147,
1.278794288635254,
-0.20322489738464355,
-0.501494288444519,
-0.12968863546848297,
0.2610033452510834,
0.1521426886320114,
0.6748723983764648,
0.7321965098381042,
... |
def array _ len ( self ) : return self. _ _ records. array _ length | [
0.6766334176063538,
-0.5956070423126221,
0.1866115927696228,
-0.7485788464546204,
1.2516604661941528,
0.5559942126274109,
0.431011438369751,
0.7677156925201416,
0.19123291969299316,
0.42757943272590637,
-0.7286851406097412,
1.3441861867904663,
-0.32790407538414,
0.21982982754707336,
1.10... |
def get _ pdf _ url ( url ) : return url | [
-0.37399688363075256,
-1.3166707754135132,
0.32355251908302307,
0.09324504435062408,
0.21881677210330963,
-0.6481306552886963,
0.040394362062215805,
0.751754641532898,
0.18287944793701172,
-1.0750253200531006,
0.6611796021461487,
0.22472438216209412,
0.008001629263162613,
-0.21466442942619... |
def calc _ spatial _ resolution ( freqs, n _ cycles ) : result = np. empty _ like ( freqs ) for i in range ( len ( result ) ) : result [ i ] = ( freqs [ i ] / float ( n _ cycles [ i ] ) ) * 2 return result | [
-0.29664045572280884,
0.5611683130264282,
0.39480289816856384,
0.43311282992362976,
0.16044341027736664,
-0.651459276676178,
0.2068624347448349,
-0.4492783546447754,
0.26280471682548523,
0.0017236982239410281,
-0.2371450662612915,
-0.3480355441570282,
-0.2568020820617676,
0.155156970024108... |
def get _ exchange _ folder ( exchange _ name ) : root = data _ root ( ) exchange _ folder = os. path. join ( root,'exchanges ', exchange _ name ) ensure _ directory ( exchange _ folder ) return exchange _ folder | [
-0.04037811607122421,
0.3955439329147339,
0.3117629885673523,
-0.6538686752319336,
-0.41397857666015625,
0.09788711369037628,
0.45092451572418213,
-0.2300344854593277,
0.687780499458313,
-0.33018141984939575,
0.8630503416061401,
0.8630979657173157,
-0.33245790004730225,
0.29071900248527527... |
def write _ data _ as _ csv ( data, stream, header _ type = " det " ) : if header _ type = = " det " : stream. write ( " false alarm rate, miss rate, threshold " ) elif header _ type = = " roc " : stream. write ( " false pos rate, true pos rate, threshold " ) [ stream. write ( " \ n % s, % s, % s " % triple ) for tripl... | [
0.41148197650909424,
-0.7001258730888367,
0.4726068377494812,
0.33100754022598267,
1.0993906259536743,
0.29383307695388794,
-1.1910555362701416,
-0.9470533728599548,
-0.4756830036640167,
-0.29452845454216003,
-0.27816125750541687,
0.6123868823051453,
0.43495887517929077,
0.3936763703823089... |
def nucs _ 2dsegm _ ws ( self ) : reload ( nucssegmenter3 ) self. busy _ indicator ( ) qtwidgets. qapplication. processevents ( ) qtwidgets. qapplication. processevents ( ) try : self. nucs _ 2d _ sgm = nucssegmenter3. nucssegmenter3split ( self. nucs _ 2d _ smooth, self. ws _ mindist _ value ). nucs self. rnd _ cmap =... | [
-1.253665804862976,
-0.36554110050201416,
0.35578176379203796,
-1.2229729890823364,
-0.17155081033706665,
0.3316980302333832,
0.44175291061401367,
-0.8452669978141785,
1.1301243305206299,
-0.4969329535961151,
0.0016080025816336274,
0.5769050121307373,
0.3178556263446808,
0.9445497393608093... |
def max _ rect2 ( data, m, n ) : def _ grow _ ones ( ll ) : " " " with this'll'as lower - left corner, to grow ones, to form one max rect " " " ur = ( ll [ 0 ] - 1, ll [ 1 ] - 1 ) maxarea = _ area ( ll, ur ) xmax = n for iy in xrange ( ll [ 1 ], m ) : if data [ n * iy + ll [ 0 ] ] = = 0 : break # we'd like to improve t... | [
0.42843738198280334,
0.24725979566574097,
0.9639185667037964,
0.031549710780382156,
-0.4094594717025757,
-0.6904999017715454,
-0.26839011907577515,
-0.31992536783218384,
0.7395893335342407,
-0.644592821598053,
0.3417075276374817,
-0.024727437645196915,
0.02536422573029995,
0.52741384506225... |
def test _ parse _ simple ( self ) : data = parse _ manifest ( get _ test _ file ('manifest _ simple. ini') ) self. assertequal ( data, ( {'src / package /': ['_ _ init _ _. py'],'src /': ['readme. txt'], '. /': ['setup. py'] }, { } ) ) | [
-0.0015843752771615982,
-0.5386691689491272,
0.5163087844848633,
0.15545040369033813,
-0.2384093850851059,
0.038840629160404205,
-0.8508356809616089,
0.6186234354972839,
0.019380854442715645,
-1.0366857051849365,
-1.120339035987854,
-0.9635616540908813,
-0.03672304004430771,
-0.58369112014... |
def _ translate _ option ( cls, option _ set ) : area = epop. get _ area ( option _ set ) duration = epop. get _ duration ( option _ set ) time = epop. get _ time ( option _ set ) if not area : raise epop. invalidoption ( " incomplete option " ) if not duration and area! = epop. area _ vice _ model : raise epop. invali... | [
-0.9053306579589844,
-0.2873673737049103,
0.5831834673881531,
-0.6591781973838806,
0.14211228489875793,
0.23495224118232727,
-0.31644612550735474,
-0.21885114908218384,
0.2062859684228897,
1.5561039447784424,
-0.026310831308364868,
-0.9180299639701843,
0.48064565658569336,
-0.1527292877435... |
def window _ fp ( self ) - > int : return self. _ vehicle _ data. get ( " vehicle _ state ", { } ). get ( " fp _ window " ) | [
-0.08107170462608337,
-0.20254027843475342,
0.385329931974411,
0.5623511075973511,
-0.3482060730457306,
-0.20260317623615265,
0.7041417360305786,
-0.24131253361701965,
0.30291953682899475,
-0.4209868609905243,
0.450314998626709,
0.3649217188358307,
-0.4659722149372101,
0.25580573081970215,... |
def test _ unit _ normalization ( self ) : # expected results list tables _ and _ counts = [ {'fq _ table _ name': f'{ self. project _ id }. { self. dataset _ id }. { measurement } ','loaded _ ids': [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ],'sandboxed _ ids': [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ],'fields': ['measurement _ id ','pe... | [
0.28651800751686096,
0.6603111028671265,
1.1138490438461304,
-0.07518481463193893,
0.2999771535396576,
0.5218282341957092,
1.592402696609497,
0.1757047176361084,
-0.3185686767101288,
-0.8535778522491455,
-0.1993626207113266,
-0.2598656415939331,
-0.20248059928417206,
0.20836038887500763,
... |
def check _ overlaps ( self ) : analysis _ folder = qtwidgets. qfiledialog. getexistingdirectory ( none, " define directory to save analysis " ) # analysis _ folder ='/ home / atrullo / desktop / helene _ update'self. mpp1 = checkoverlapps ( analysis _ folder ) self. mpp1. show ( ) | [
0.04862634465098381,
-0.2663115859031677,
0.6226760149002075,
0.7780328989028931,
-0.029124127700924873,
1.3437347412109375,
1.517264485359192,
0.6022825241088867,
0.24880081415176392,
0.15213462710380554,
-0.05694024637341499,
0.5073111653327942,
-0.288180947303772,
0.7997548580169678,
... |
def writecomsgsd ( self, gsdname ) : try : gsdf = gsd. hoomd. open ( gsdname,'ab') except ioerror : gsdf = gsd. hoomd. open ( gsdname,'wb') sz = np. shape ( self. pos ) molno = sz [ 0 ] pos = np. reshape ( self. pos, [ sz [ 0 ] * self. ats, 3 ] ) # pdb. set _ trace ( ) pn = sz [ 0 ] * self. ats ptypes = ['a'] ptypeid =... | [
-0.12105080485343933,
-0.3844169080257416,
0.5976613163948059,
-0.9596375823020935,
0.3405788838863373,
0.5919154286384583,
-0.23747368156909943,
0.1358797401189804,
0.30617472529411316,
-0.5837445259094238,
-0.32420000433921814,
-0.2545923590660095,
-0.20859229564666748,
0.513764560222625... |
def increment _ number _ served ( self, increment ) : self. number _ served + = increment | [
-0.9004421234130859,
-0.2469668984413147,
0.5988914370536804,
0.03305748477578163,
-0.3822275698184967,
0.9583103656768799,
0.42172083258628845,
0.10275831818580627,
-0.31578943133354187,
-0.9743143916130066,
-1.0587819814682007,
1.1402490139007568,
0.13951866328716278,
0.4844335913658142,... |
def add _ map _ template ( self ) : pass | [
-1.1056478023529053,
-0.9178721904754639,
0.5801609754562378,
0.13098907470703125,
-0.8092952370643616,
0.8260350823402405,
-0.8013675808906555,
0.49062392115592957,
0.6130311489105225,
-0.695160984992981,
-0.320071816444397,
-0.7506284117698669,
-0.1670522540807724,
0.4537031054496765,
... |
def do _ sub _ cat ( ) : cat = request. args. get ( " cat ", " " ) um _ cat = " " # # print ( f " cat : { cat } " ) if cat : um _ cat = ( f " " " and id _ cat in ( select id from ` mybudj _ spr _ cat ` where cat ='{ cat }') " " " ) sql = f " " " select id, sub _ cat as name from ` mybudj _ sub _ cat ` where 1 = 1 { um ... | [
-0.4478810429573059,
-0.007627834565937519,
0.7758491039276123,
0.09566519409418106,
-1.1468690633773804,
-0.7812917232513428,
-0.5425752997398376,
-0.6570428013801575,
-0.2556662857532501,
0.04629955440759659,
-0.6032882332801819,
0.6116353273391724,
0.7438125610351562,
0.5676360726356506... |
def get _ last _ harvest _ time ( self ) : try : objcount = self. client. listobjects ( start = 0, count = 0 ). total if objcount > 0 : obj = self. client. listobjects ( start = objcount - 1, count = 1 ) return obj. objectinfo [ 0 ]. datesysmetadatamodified. strftime ('% y - % m - % dt % h : % m : % sz') else : # if 0 ... | [
-0.17194314301013947,
-0.6253616213798523,
1.1554509401321411,
0.21629634499549866,
0.6046818494796753,
0.15280285477638245,
0.3967682421207428,
-0.8976075649261475,
0.32915163040161133,
0.6433300375938416,
0.26031145453453064,
-0.7125658392906189,
-0.6747364401817322,
0.17990384995937347,... |
def configured _ quantities ( label ) : economy = [ quantities. alphaoptimized, quantities. batchgradhistogram1d, quantities. distance, quantities. gradnorm, quantities. innerproducttest, quantities. loss, quantities. normtest, quantities. orthogonalitytest, quantities. time, ] business = economy + [ quantities. ticdia... | [
-0.36304548382759094,
-0.024602627381682396,
0.4896024763584137,
-0.14539699256420135,
0.1400759518146515,
0.2894739806652069,
-0.42601069808006287,
-0.7423226833343506,
0.04422138258814812,
0.2994425892829895,
-0.7842842936515808,
-0.3757862150669098,
0.5396330952644348,
0.272241115570068... |
def reverse ( self, n = none ) : start _ pos = self. tell ( ) value, num _ bits = self. read ( n ) value = reverse _ uint ( value, num _ bits ) self. seek ( start _ pos ) self. write ( value, num _ bits ) self. seek ( start _ pos ) | [
-0.8939917683601379,
0.5887338519096375,
0.5069447159767151,
-0.20504412055015564,
0.5624901652336121,
-0.3072478771209717,
0.8955990672111511,
0.21915392577648163,
-0.24591611325740814,
-0.9212156534194946,
-0.3623117208480835,
0.4469304382801056,
-0.41457027196884155,
-0.0482812374830246... |
def parse _ keqv _ list ( l ) : # with python 2. 6, parse _ http _ list handles unicode fine return urllib2. parse _ keqv _ list ( l ) | [
-1.1580073833465576,
-0.4610404968261719,
0.220086008310318,
0.8320412039756775,
-0.9526357054710388,
-0.45013532042503357,
-1.4284965991973877,
0.6601640582084656,
0.9570009112358093,
0.19358527660369873,
-1.3369237184524536,
-0.8883063197135925,
-0.08691906183958054,
1.2166444063186646,
... |
def checkremotegitstate ( self ) : if self. _ command = ='close': if not self. _ git _ helper. synchronizewithupstream ( ) : print ( ('{ 0 : s } aborted - unable to synchronize with'' upstream / master.'). format ( self. _ command. title ( ) ) ) return false elif self. _ command in ('create ','create - pr ','create _ p... | [
-0.1764095276594162,
0.43740808963775635,
1.1012133359909058,
0.2012394666671753,
-0.08433422446250916,
1.36186683177948,
-0.3588676154613495,
-0.7591983079910278,
-0.47324520349502563,
0.3331994414329529,
-0.21715876460075378,
0.6087193489074707,
-0.7933387160301208,
0.519084095954895,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.