text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ _ init _ _ ( self, pyvmomi _ service, port _ group _ configurer, resource _ model _ parser ) : self. pyvmomi _ service = pyvmomi _ service self. port _ group _ configurer = port _ group _ configurer self. resource _ model _ parser = resource _ model _ parser | [
0.03253081068396568,
0.16483594477176666,
0.1590372622013092,
0.6409139633178711,
0.24037833511829376,
-0.38455528020858765,
-0.48417407274246216,
-0.24891552329063416,
-0.5899578928947449,
0.10635664314031601,
-0.34405532479286194,
0.28219401836395264,
-0.835395097732544,
0.41348710656166... |
def invitation _ status _ enum ( self, invitation _ status _ enum ) : self. _ invitation _ status _ enum = invitation _ status _ enum | [
-0.5081303715705872,
-0.5655462145805359,
-0.03814616799354553,
0.03785191476345062,
0.17964792251586914,
1.1991021633148193,
-0.2526894509792328,
1.191981554031372,
0.041105832904577255,
0.9393858313560486,
-1.314160704612732,
-0.3007158935070038,
0.18011659383773804,
-0.02215718105435371... |
def alpha _ composed ( self, list _ of _ alpha _ value, dart ) : for alpha in list _ of _ alpha _ value : dart = self. alpha ( alpha, dart ) return dart | [
-1.5438599586486816,
-0.8762538433074951,
0.384853720664978,
0.24113906919956207,
0.5472627282142639,
0.9489895701408386,
-0.3191209137439728,
0.6587788462638855,
0.05490407720208168,
0.19180233776569366,
0.09383559226989746,
-1.0447660684585571,
0.1869150847196579,
2.1243274211883545,
-... |
def calc _ p _ j ( j, n ) : from fast import calc _ e e = calc _ e ( j, get _ all _ states ( n ) ) expe = np. exp ( - e ) return expe / np. sum ( expe ) | [
0.08654645830392838,
0.4691186845302582,
0.35465526580810547,
0.12403640896081924,
-0.3738686740398407,
-0.08071175962686539,
-0.03782358020544052,
0.5568292140960693,
0.7127269506454468,
1.0354785919189453,
0.04231135919690132,
-0.8702567219734192,
-0.34292882680892944,
0.9084060192108154... |
def sicker _ patient ( patient1, patient2 ) : if patient1. temp > patient2. temp : return f " { patient1 }, { patient2 } " else : return f " { patient2 }, { patient1 } " | [
0.17176328599452972,
-1.6002708673477173,
0.5562785863876343,
-0.4826691448688507,
-0.46894899010658264,
0.2968078553676605,
-1.1118474006652832,
-0.41772258281707764,
-1.0159895420074463,
0.5111567974090576,
0.942834198474884,
0.7050610780715942,
0.5529076457023621,
-0.14517055451869965,
... |
def _ initialize _ extra _ fields ( self, instances : instances ) - > instances : if not instances. has ( " id " ) : instances. set ( " id ", [ none ] * len ( instances ) ) if not instances. has ( " id _ period " ) : instances. set ( " id _ period ", [ none ] * len ( instances ) ) if not instances. has ( " lost _ frame... | [
-1.2490288019180298,
0.8047707676887512,
0.6770382523536682,
-1.1451568603515625,
-0.023969972506165504,
0.06648122519254684,
0.1510692834854126,
-0.13328087329864502,
0.8870271444320679,
0.15732431411743164,
-0.8767753839492798,
-0.09941559284925461,
-0.3917122781276703,
0.313094794750213... |
def query _ annotation _ history ( request ) : # read file ca = get _ mongo _ client ( uri ='mongodb : / / localhost : 27017 /') offset = int ( request. get. get ( " offset ", 0 ) ) limit = int ( request. get. get ( " limit ", 10 ) ) text = ca [ " annotation _ data " ]. find ( ). limit ( limit ). skip ( limit * offset ... | [
-0.816904604434967,
0.31245991587638855,
0.7849000692367554,
-0.5650412440299988,
-0.1987793743610382,
0.4925902187824249,
-0.3323093354701996,
0.22427982091903687,
-0.4605093002319336,
0.8720514178276062,
0.2925323247909546,
0.5803523063659668,
0.1448228508234024,
0.14151300489902496,
-... |
def fixed _ ip _ associate ( context, address, instance _ uuid, network _ id = none, reserved = false ) : return impl. fixed _ ip _ associate ( context, address, instance _ uuid, network _ id, reserved ) | [
-0.6491833925247192,
-0.24518193304538727,
0.2867911159992218,
0.08565600961446762,
0.2769719362258911,
-0.27037206292152405,
0.400723397731781,
0.7812298536300659,
0.85118567943573,
-0.0900643989443779,
0.27064359188079834,
-0.15066401660442352,
-0.5547078251838684,
-0.4169532358646393,
... |
def _ parse _ table _ info ( self, table _ data, verbose = false ) : # populating ` table _ row ` with the primary header keywords # of the middle ffi data _ ind = len ( table _ data ) / / 2 table _ row = none while table _ row is none : table _ row = table _ data [ data _ ind ] # making sure we have a row with wcs inf... | [
0.018911119550466537,
0.23316624760627747,
0.5085872411727905,
0.12651671469211578,
-0.36628010869026184,
-0.5082895755767822,
-0.08390998840332031,
-0.9699047207832336,
-0.2625945210456848,
0.08174601197242737,
0.5959591865539551,
-0.03779752179980278,
0.5593062043190002,
1.14404702186584... |
def create ( filename = none, handle = none, debug = false ) : return rearrangementsfile ( true, filename = filename, handle = handle, debug = debug ) | [
0.7400828003883362,
0.48588845133781433,
0.4733477532863617,
0.22889477014541626,
0.057226844131946564,
-0.04133840650320053,
1.4391330480575562,
0.6087998747825623,
-1.0853098630905151,
-1.0650062561035156,
0.6598877310752869,
-0.5913000106811523,
-0.6062150001525879,
-0.4397827088832855,... |
def _ _ check _ consistency ( self, iline ) : lcond = self. condition. groups lrepl = len ( self. replacement. groups ) if not lcond or lcond! = lrepl : raise ruleformaterror ( " " " invalid # of groups in rule : { : s } { : d } groups in condition { : d } groups in replacement " " ". format ( iline, lcond, lrepl ) ) r... | [
-0.46634143590927124,
0.15516462922096252,
0.4160265326499939,
-0.9441068768501282,
0.5819306969642639,
0.4626045525074005,
0.19790881872177124,
1.0299352407455444,
-0.7306013107299805,
0.02052152529358864,
0.5640307664871216,
-0.22448018193244934,
-0.8039872050285339,
0.4828717112541199,
... |
def list ( cls, context, limit = none, marker = none, filters = none, sort _ key = none, sort _ dir = none, eager = false ) : db _ actions = cls. dbapi. get _ action _ list ( context, limit = limit, marker = marker, filters = filters, sort _ key = sort _ key, sort _ dir = sort _ dir, eager = eager ) return [ cls. _ fro... | [
-0.5553815960884094,
0.31371504068374634,
0.5602349042892456,
0.5504928231239319,
1.2723323106765747,
-0.5876192450523376,
-0.11329882591962814,
-0.35189393162727356,
0.9842230081558228,
0.26892271637916565,
-0.01179454755038023,
0.8726083040237427,
0.8232709169387817,
0.22336462140083313,... |
def update _ plot _ bbox ( self, x _ lo = none, x _ hi = none, y _ lo = none, y _ hi = none ) : _ x _ lo, _ x _ hi = self. bbox. t [ 0 ]. min ( ), self. bbox. t [ 0 ]. max ( ) _ y _ lo, _ y _ hi = self. bbox. t [ 1 ]. min ( ), self. bbox. t [ 1 ]. max ( ) if x _ lo is not none : _ x _ lo = x _ lo if x _ hi is not none ... | [
-0.15765784680843353,
-0.8426898121833801,
0.8352172374725342,
-0.28954043984413147,
0.7891831994056702,
-0.2788650095462799,
-0.015449650585651398,
-0.06596264988183975,
-1.0198994874954224,
-0.6271963119506836,
-0.42370787262916565,
1.3788481950759888,
0.32415494322776794,
-0.22220458090... |
def min ( self ) - > dataframe : if self. downsample : return wrap _ df ( self. _ df. downsample ( self. by, self. rule, self. n, " min " ) ) return wrap _ df ( self. _ df. groupby ( self. by, self. selection, " min " ) ) | [
-0.11789649724960327,
-0.1428295224905014,
0.2915553152561188,
0.25593724846839905,
-0.13361279666423798,
-0.7573525309562683,
0.18833577632904053,
-1.3488329648971558,
0.5459612011909485,
-0.5606564283370972,
1.54088294506073,
0.7678641080856323,
-0.4620473384857178,
-0.6904536485671997,
... |
def example ( self ) : result = getattr ( self,'_ example ', none ) if result is none : # no example batch was found, so get one from the `. train ` dataset result = next ( iter ( self. train ) ) # and cache it for next time self. _ example = result return result | [
0.48226046562194824,
0.46996408700942993,
0.38580748438835144,
0.3023295998573303,
-0.6318906545639038,
-0.37444210052490234,
0.1036134883761406,
-0.2647241950035095,
0.022299183532595634,
-0.2505207061767578,
-0.7300830483436584,
0.31587088108062744,
0.38406136631965637,
-0.26510769128799... |
def gettab ( self, n ) : return self. tabs [ n ] | [
-1.2046427726745605,
-0.10662898421287537,
0.07996002584695816,
0.7485933303833008,
0.12241961061954498,
0.32308849692344666,
-0.2150183469057083,
-2.321730375289917,
-0.6348572969436646,
-0.6944754719734192,
-0.16037146747112274,
0.3726559281349182,
-0.045485720038414,
-0.4620250165462494... |
def get _ vm _ network _ interface _ names ( pid ) : result = set ( ) for netdev _ description in _ get _ kvm _ process _ arguments ( pid, " netdev " ) : match = kvm _ interface _ name _ regex. search ( netdev _ description ) if match : result. add ( match. groups ( ) [ 0 ] ) return result | [
0.12175969034433365,
1.0317044258117676,
0.6132301092147827,
-0.1021934449672699,
0.42341217398643494,
0.22188825905323029,
-1.017258644104004,
-0.987300455570221,
-0.45261189341545105,
0.8234763741493225,
-0.23214934766292572,
-0.5004733204841614,
-0.41823944449424744,
0.5734354257583618,... |
def create _ daq _ worker _ gui ( self, daq _ worker = none, show = false ) : # create the widget self. daq _ worker _ widget = daqworkerwidget ( ) # add the daq connection if daq _ worker! = none : self. connect _ daq _ worker _ gui ( daq _ worker ) | [
-0.13141006231307983,
0.8117451071739197,
0.525642991065979,
-0.1733981817960739,
-0.609019935131073,
0.2188459038734436,
0.04255295544862747,
0.4781133830547333,
-0.19033771753311157,
-0.8094845414161682,
-0.36824899911880493,
-0.5723478198051453,
-0.42080917954444885,
0.6734241843223572,... |
def test _ redetect _ one _ with _ detection _ option ( self ) : for detector in self. detectors : with self. subtest ( detectortype = detector. detectortype ) : detection = detector. detectone ( image = vlimage _ one _ face ) redetect = detector. redetectone ( image = vlimage _ one _ face, bbox = detection ) self. ass... | [
-0.016221629455685616,
0.1678151935338974,
0.46475017070770264,
1.5715904235839844,
1.548543930053711,
-0.17711134254932404,
0.6858764290809631,
-0.18433794379234314,
1.5326929092407227,
-0.31476688385009766,
-0.5548931360244751,
-0.7746210694313049,
0.2690894603729248,
1.2585618495941162,... |
def from _ acm _ certificate ( cls, certificate : aws _ cdk. aws _ certificatemanager. icertificate, *, aliases : typing. optional [ typing. list [ str ] ] = none, security _ policy : typing. optional [ " securitypolicyprotocol " ] = none, ssl _ method : typing. optional [ " sslmethod " ] = none ) - > " viewercertifica... | [
1.0145645141601562,
0.7938769459724426,
0.3309101462364197,
-0.005862545687705278,
-1.424503207206726,
-0.26766031980514526,
0.06838283687829971,
0.1720326691865921,
0.056793611496686935,
-0.3442968726158142,
0.2017393261194229,
0.7543915510177612,
0.48787209391593933,
-0.2624106705188751,... |
def expectation ( z, z _ e, lambda _ exp ) : error = z - z _ e return z _ e + lambda _ exp * error | [
0.18988725543022156,
-0.7106008529663086,
0.3449506461620331,
-0.3482324481010437,
0.39664220809936523,
0.27831968665122986,
0.5006034970283508,
1.4673575162887573,
0.17112815380096436,
0.13562655448913574,
-0.3868723511695862,
0.6293551921844482,
0.015226537361741066,
-0.02541451342403888... |
def test _ login _ user ( self ) : user = { " username " : " rozzah ", " password " : " password " } userdata = json. dumps ( user ) response = self. client. post ( " / v1 / auth / login ", data = userdata, content _ type ='application / json') self. assertequal ( response. status _ code, 200 ) output = json. loads ( r... | [
-0.5317146182060242,
0.07513546198606491,
0.6031322479248047,
0.5907831788063049,
-0.19356392323970795,
1.130777359008789,
-0.06159176677465439,
-0.09859789907932281,
-0.025662831962108612,
-0.7699893712997437,
-1.3925310373306274,
0.46856796741485596,
-0.06542959064245224,
-0.407916396856... |
def load _ matrix _ coo _ mat ( infile ) : f = io. loadmat ( infile ) i = f ['i'] [ 0 ] - 1 j = f ['j'] [ 0 ] - 1 d = f ['s'] [ 0 ] m = f ['m'] [ 0 ] n = f ['n'] [ 0 ] return sparse. coo _ matrix ( ( d, ( i, j ) ), shape = ( m, n ) ) | [
0.05619952827692032,
-0.3753858208656311,
0.2287091165781021,
-0.39019280672073364,
-0.7578873038291931,
0.00018721335800364614,
0.5202355980873108,
0.19723185896873474,
-1.0118424892425537,
0.3814973533153534,
0.13533605635166168,
0.2416597306728363,
-0.36864787340164185,
-0.5729438662528... |
def _ transform _ to _ final _ state ( self, obj ) : # if an object doesn't have a final state, just remove it if'final _ state'not in self. current _ room ['objects'] [ obj ] : self. current _ room ['objects']. pop ( obj, none ) return # store the final state and remove the original object final _ state = self. curren... | [
-0.5951448082923889,
-0.5232778787612915,
0.5922430157661438,
-0.7438802123069763,
-0.7525465488433838,
0.06782061606645584,
0.6437392830848694,
0.44437429308891296,
0.47414886951446533,
0.7492691278457642,
-1.1718093156814575,
-0.2945198118686676,
-0.25643324851989746,
-0.1715413779020309... |
def dfs ( root ) : result = [ 0, 0 ] if root is none : return result left = dfs ( root. left ) right = dfs ( root. right ) # rob result [ 0 ] = root. val + left [ 1 ] + right [ 1 ] # not rob result [ 1 ] = max ( left ) + max ( right ) return result | [
-0.8115526437759399,
0.7303297519683838,
0.6972528696060181,
1.2126458883285522,
-0.09215962886810303,
-0.7894482016563416,
-0.22546939551830292,
-0.21762701869010925,
0.45970243215560913,
-0.2705511748790741,
-0.40179839730262756,
-0.3713604509830475,
-0.23000046610832214,
1.4789392948150... |
def join ( a, * p ) : path = a for b in p : if b. startswith ('/') : path = b elif path = ='' or path. endswith ('/') : path + = b else : path + ='/'+ b return path | [
0.486309289932251,
-0.054754018783569336,
0.623211681842804,
0.938173770904541,
0.05678749457001686,
0.9461312890052795,
-0.25600796937942505,
0.4238891899585724,
0.05029567703604698,
0.2099945843219757,
0.8264870047569275,
-0.5900940895080566,
-1.4235291481018066,
-0.40453267097473145,
... |
def ticket _ scopes ( self, ticket _ scopes ) : if ticket _ scopes is none : raise valueerror ( " invalid value for ` ticket _ scopes `, must not be ` none ` " ) # noqa : e501 self. _ ticket _ scopes = ticket _ scopes | [
-0.3706674575805664,
0.6020522713661194,
-0.6646291017532349,
0.5728147625923157,
-0.14491933584213257,
0.021187584847211838,
0.5131456851959229,
-0.24504870176315308,
0.1329776495695114,
0.5410043597221375,
-0.8966825008392334,
-0.348955363035202,
-0.30718928575515747,
-0.5674506425857544... |
def show _ bookmarksmenu _ screen ( self ) : self. _ push _ prev _ screen _ to _ history ( ) self. bookmarksmenu _ screen. ids. bookmarksmenu _ widget. parent. scroll _ y = 1 self. sm. transition. direction ='left'self. sm. current ='bookmarksmenu ' | [
-0.04340573027729988,
1.033563256263733,
0.6869065761566162,
0.05951036512851715,
1.1179782152175903,
0.11157674342393875,
1.1256016492843628,
0.1353178471326828,
0.21640048921108246,
0.6205143928527832,
-0.3888227641582489,
0.7105786800384521,
0.37623193860054016,
1.175672173500061,
-0.... |
def transform ( im ) : im = from _ polar ( im ) im, phase = lc. magphase ( im ) im = np. log1p ( im ) return im | [
-0.276958703994751,
-0.8493744730949402,
0.45480066537857056,
-0.6914793252944946,
-0.2895609140396118,
0.049090925604104996,
-0.7523677349090576,
-0.013131395913660526,
1.3850040435791016,
0.0849447026848793,
0.5768088102340698,
-0.02304028905928135,
-0.4388076961040497,
-0.26458287239074... |
def _ _ init _ _ ( self, max _ value, width = 30 ) : self. max _ value = float ( max _ value ) self. bar _ width = width self. digits = math. ceil ( math. log10 ( self. max _ value + 1 ) ) self. text _ format ='[ % % 0 % dd / % d ] | % % s % % s | % %. 1f % % % %'% ( self. digits, self. max _ value ) self. printed _ ch... | [
0.10405844449996948,
0.1452934443950653,
0.5447959303855896,
0.05651022493839264,
-0.3775540888309479,
0.39987003803253174,
0.16182705760002136,
0.1225242167711258,
-0.21977080404758453,
-0.3465321660041809,
0.459855318069458,
0.02885678969323635,
0.19134321808815002,
1.3572115898132324,
... |
def test _ related _ partial ( foo, bar, conn, pipe ) : bar1 = bar ( id = 2, title ='bar1') bar1. save ( ) foo = foo ( id = 1, name ='foo ', bar = bar1 ) foo. save ( ) foo = foo. get ( id = 1, fields = ['name'] ) assert foo. _ data = = dict ( id = 1, name ='foo') # access bar assert foo. bar. title = = bar1. title # in... | [
-0.1123543232679367,
-0.02639886736869812,
0.5936023592948914,
-0.7538410425186157,
0.058709047734737396,
0.5184354186058044,
-0.17032520473003387,
-0.30835333466529846,
-0.8007593154907227,
-1.3460049629211426,
-0.795235276222229,
0.029754044488072395,
-0.5406054258346558,
-0.271621882915... |
def wait ( self, duree, unity ) : line _ to _ print = " wait [ ] ( { 0 } { 1 } ) ". format ( str ( duree ), unity ) # + str ( duree ) + " " + unity + " \ n " self. scn _ line _ list. append ( line _ to _ print ) | [
-0.7685145139694214,
-0.6375011801719666,
0.5336970686912537,
-0.2816636860370636,
1.3541749715805054,
0.16528357565402985,
-1.3652572631835938,
0.028701215982437134,
-0.5519490242004395,
-0.34423303604125977,
-1.0351642370224,
1.1939034461975098,
0.08359071612358093,
0.33782270550727844,
... |
def trip _ duration _ stats ( df ) : print _ pause ('\ ncalculating trip duration... \ n ', 1 ) start _ time = time. time ( ) print ( " total travel time : { :. 1f } s ( { :. 1f } hr ) ". format ( df ['trip duration']. sum ( ), df ['trip duration']. sum ( ) / 3600 ) ) print ( " average travel time : { :. 1f } s ( { :. ... | [
-0.02591053582727909,
0.2698211669921875,
0.6945596933364868,
-0.8422194123268127,
-0.21025921404361725,
0.4231748878955841,
0.6724276542663574,
-0.7987300157546997,
-0.6553062200546265,
0.9205673336982727,
-0.11165449768304825,
0.7108857035636902,
1.4060964584350586,
0.08350549638271332,
... |
def setup ( self ) : self. bb = bitbucket ( username, password ) # create a repository. success, result = self. bb. repository. create ( test _ repo _ slug, has _ issues = true ) # save repository's id assert success self. bb. repo _ slug = result [ u'slug'] | [
0.8291457891464233,
0.34014177322387695,
0.29157623648643494,
-0.5574072003364563,
1.9926069974899292,
-0.08394307643175125,
-0.1824396699666977,
0.5118070840835571,
-0.28588518500328064,
-0.8591617941856384,
-0.9993070960044861,
-0.10610011965036392,
-0.4169559180736542,
0.047986011952161... |
def compute _ node _ update ( context, compute _ id, values, prune _ stats = false ) : return impl. compute _ node _ update ( context, compute _ id, values, prune _ stats ) | [
-0.43495485186576843,
0.5074317455291748,
0.3211520314216614,
0.3144444227218628,
0.04089880362153053,
0.07870546728372574,
-0.1956067681312561,
0.16247305274009705,
-0.2919445335865021,
1.0181347131729126,
0.14649318158626556,
0.7394296526908875,
0.23899206519126892,
-0.40073004364967346,... |
def updatedatabase ( self, outdict, con ) : insert = u " insert into rss ( id, link, title, parser _ content, reporter _ content, sensitive _ flag ) \ values ('{ id } ','{ link } ','{ title } ','{ content } ','{ reporter _ content } ','{ flag }') ; " with con : cur = con. cursor ( mdb. cursors. dictcursor ) cur. execut... | [
-0.6288208961486816,
-0.6462519764900208,
0.8451837301254272,
-0.38880807161331177,
-0.8914527893066406,
-0.4168756604194641,
-0.8633560538291931,
0.020146870985627174,
-0.9072389006614685,
0.17517007887363434,
-0.1532033085823059,
-0.5524555444717407,
-1.1727899312973022,
0.12740118801593... |
def migration _ get _ unconfirmed _ by _ dest _ compute ( context, confirm _ window, dest _ compute ) : return impl. migration _ get _ unconfirmed _ by _ dest _ compute ( context, confirm _ window, dest _ compute ) | [
-0.4954388439655304,
0.4422227144241333,
0.6691293120384216,
0.7305785417556763,
-0.23913350701332092,
-0.05962144583463669,
0.041527993977069855,
-1.0557925701141357,
-0.7618173956871033,
0.21241670846939087,
0.3685247600078583,
0.9281759858131409,
0.9204668402671814,
0.7945315837860107,
... |
def date _ created ( self, date _ created ) : self. _ date _ created = date _ created | [
1.4294683933258057,
0.39579668641090393,
-0.12639732658863068,
0.8073669672012329,
1.3374667167663574,
1.2443881034851074,
-0.08599039912223816,
0.7778254151344299,
-0.6486427783966064,
-1.7278800010681152,
-0.9950652718544006,
-0.9002845883369446,
1.1580805778503418,
0.64865642786026,
-... |
def set _ key ( ) : with namedtemporaryfile ( mode = " w " ) as temp _ file : temp _ file. write ( " test - password " ) temp _ file. flush ( ) stratisdbus. set _ key ( key _ desc, temp _ file ) | [
0.3086775243282318,
0.230070561170578,
0.38250765204429626,
-0.3261065185070038,
0.8924434781074524,
0.7736527323722839,
-0.036696288734674454,
0.3120410442352295,
-1.0821808576583862,
0.4495174288749695,
-0.3017311096191406,
0.3150719404220581,
-0.34522745013237,
0.3134511411190033,
-0.... |
def session _ loader ( path, variables ) : # merge sessions from the same day raw _ data = [ ] for root, dirs, files in os. walk ( path ) : for file in files : if file. endswith ( ". npy " ) : raw _ data. append ( ( os. path. join ( root, file ) ) ) data = { } for var in variables : # list equivalent npys merge = [ x f... | [
-0.6587763428688049,
-0.8108468055725098,
0.7807133197784424,
-0.7089242339134216,
-0.8133460283279419,
-0.3486824333667755,
-0.19611217081546783,
-0.9883764982223511,
0.2780478894710541,
0.917908251285553,
-0.3103322684764862,
-0.3796217441558838,
-0.016778668388724327,
0.2940965890884399... |
def registerhandler ( self, name, handler, typ ='', ns ='', xmlns = none, makefirst = 0, system = 0 ) : if not xmlns : xmlns = self. _ owner. defaultnamespace self. debug ('registering handler % s for " % s " type - > % s ns - > % s ( % s )'% ( handler, name, typ, ns, xmlns ),'info') if not typ and not ns : typ ='defau... | [
-0.6433846950531006,
0.723024845123291,
0.42216771841049194,
-0.14134298264980316,
0.4029170870780945,
0.06658760458230972,
-0.7896909117698669,
-1.0563218593597412,
0.11208939552307129,
-0.9429189562797546,
-1.0480828285217285,
0.3853784501552582,
-0.11612003296613693,
0.7939648032188416,... |
def return _ det ( nominal _ group ) : # nominal _ group is empty if not nominal _ group : return [ ] # we return the first element of the list if nominal _ group [ 0 ] in resourcepool ( ). determinants : return [ nominal _ group [ 0 ] ] # if there is a number if other _ functions. number ( nominal _ group [ 0 ] ) = = ... | [
-0.22132958471775055,
-0.19393274188041687,
0.4668794572353363,
0.38596001267433167,
0.02391725406050682,
-0.2148185521364212,
-0.4507593512535095,
-0.6363285183906555,
0.5404652953147888,
0.21893572807312012,
0.6014479994773865,
0.47664695978164673,
-1.0584990978240967,
1.1685258150100708... |
def on _ press ( self, key ) : try : if key = = keyboard. key. esc : self. stopper. set ( ) self. listener. stop ( ) print ( " esc pressed " ) raise myexception ( key ) self. q. put ( key. char ) except attributeerror : print ('special key { 0 } pressed '. format ( key ) ) | [
0.8688806891441345,
-0.10114580392837524,
0.47295624017715454,
-0.019118353724479675,
-0.490597128868103,
-0.014755217358469963,
-0.17861761152744293,
0.3098629117012024,
-0.10645967721939087,
0.18759791553020477,
-0.6075959205627441,
-0.29663699865341187,
-0.1197706088423729,
0.4213815331... |
def network _ get _ by _ bridge ( context, bridge ) : return impl. network _ get _ by _ bridge ( context, bridge ) | [
-1.0546082258224487,
0.2091570347547531,
0.28229495882987976,
0.5051050782203674,
0.38561001420021057,
-0.44977524876594543,
0.5231513977050781,
-1.009442687034607,
0.6823965907096863,
-0.612414538860321,
-0.3302183151245117,
-0.24681061506271362,
0.004330749157816172,
0.17955245077610016,... |
def get _ plone _ site ( app ) : sites = [ ] for item _ id, item in app. items ( ) : if isinstance ( item, plonesite ) : sites. append ( item _ id ) if len ( sites ) = = 1 : print " info : using plone site'% s '. " % sites [ 0 ] return app. unrestrictedtraverse ( sites [ 0 ] ) elif len ( sites ) > 1 : print " error : m... | [
-0.1529432088136673,
0.2875790297985077,
0.5212555527687073,
0.7858676314353943,
0.19824212789535522,
0.4606766402721405,
0.7174402475357056,
-0.19524839520454407,
0.4190306067466736,
0.5204375982284546,
0.3800725042819977,
0.0802859514951706,
-0.7977519631385803,
-0.6562608480453491,
-0... |
def find _ max _ gap ( scores, gap _ opening, gap _ extension ) : gap = gap _ opening + gap _ extension * ( len ( scores ) ) gap _ array = np. arange ( gap, gap _ opening, - gap _ extension ) scores _ with _ penalties = scores - gap _ array return np. amax ( scores _ with _ penalties ) # max of the gap scores with pena... | [
-0.3384164273738861,
0.0761706605553627,
0.6148034334182739,
0.6648846864700317,
-0.6375860571861267,
0.873576819896698,
0.39647364616394043,
0.42268794775009155,
0.9093459248542786,
0.6515627503395081,
1.3104283809661865,
0.02890077233314514,
-0.8226921558380127,
0.30975255370140076,
0.... |
def check _ winner ( ) : print ( " - - - - - - - - - - - - - - - - - - - - - - " ) print ( " * * * game results * * * " ) print ( " - - - - - - - - - - - - - - - - - - - - - - \ n " ) for i in range ( 1, len ( players ) ) : for hand _ index in range ( len ( get _ hand ( i ) ) ) : print ( " player { } - { } - hand { } :... | [
0.26593515276908875,
-0.14101126790046692,
1.1310607194900513,
0.7994049191474915,
-0.027992738410830498,
-0.2861786186695099,
0.643006443977356,
-0.257767915725708,
-0.4774208664894104,
0.6572430729866028,
-0.16069205105304718,
0.25203821063041687,
0.21887561678886414,
0.8472612500190735,... |
def load _ data ( city, month, day, month _ list, day _ list ) : df = pd. read _ csv ( city _ data [ city ] ) df = df. iloc [ :, 1 : ] df ['start time'] = pd. to _ datetime ( df ['start time'] ) df ['month'] = df ['start time']. dt. month df ['day _ of _ week'] = df ['start time']. dt. weekday df = df. sort _ values ( ... | [
-0.1247507855296135,
0.2826206684112549,
1.0044469833374023,
-0.4072452783584595,
-0.825952410697937,
0.09719876199960709,
-0.06451138854026794,
0.6426572203636169,
-0.45810559391975403,
-0.16664481163024902,
0.11011781543493271,
0.13046975433826447,
0.5916017889976501,
0.9186021685600281,... |
def run ( ) : data = getlabelledexample ( ) # print off the meta data ( holy spam! ) print ( data. metadata. _ _ dict _ _ ) rawdataobj = data. data lowres = rawdataobj. lowresdata hires = rawdataobj. hiresdata # get the labels ( locations of start and end for events ) eventlabels = data. labels # decimate the high reso... | [
1.4832899570465088,
-0.09608656913042068,
1.0015755891799927,
-0.10331688821315765,
0.8410409688949585,
0.5071502327919006,
0.043857503682374954,
0.3863760530948639,
0.302453875541687,
-0.8342412710189819,
0.20549115538597107,
0.6934985518455505,
0.2337127923965454,
0.27204179763793945,
... |
def begin _ part ( self, headers ) : for header in headers : logger. info ( header ) if header. get ( " name ", " " ). lower ( ). strip ( ) = = " content - disposition " : params = header. get ( " params ", [ ] ) is _ fileinfo _ header = false if 0! = len ( params ) : for name in params : if name. lower ( ). strip ( ) ... | [
0.5218977332115173,
-0.6952044367790222,
1.0425628423690796,
0.708057701587677,
-0.26065778732299805,
-0.2052476704120636,
1.359322190284729,
0.2184797078371048,
-0.9866297245025635,
-0.12152061611413956,
0.060689348727464676,
-0.5878403782844543,
-0.49600234627723694,
0.3126136362552643,
... |
def invert _ dict ( d, kmap = none ) : return dict ( [ ( kmap ( v ), k ) for ( k, v ) in viewitems ( d ) ] ) if kmap else dict ( [ ( v, k ) for ( k, v ) in viewitems ( d ) ] ) | [
-1.3612645864486694,
0.595839262008667,
0.63845294713974,
0.15328039228916168,
-2.0163094997406006,
0.05743531510233879,
-0.40293532609939575,
1.0958383083343506,
0.5542868375778198,
-0.038710758090019226,
-0.3635461926460266,
-0.6587561368942261,
-0.23356103897094727,
0.40636587142944336,... |
def _ _ init _ _ ( self, filenames : union [ str, list [ str ] ] = [ " masc ", " semcor " ], base _ path : optional [ union [ str, path ] ] = none, in _ memory : bool = true, cut _ multisense : bool = true, columns = { 0 : " text ", 3 : " sense " }, banned _ sentences : optional [ list [ str ] ] = none, sample _ missin... | [
0.4592021703720093,
0.13012605905532837,
0.7812654376029968,
0.31832653284072876,
-0.2845143675804138,
-0.6576322317123413,
0.18737614154815674,
0.9202919006347656,
-0.24687078595161438,
-0.9126778244972229,
0.41357266902923584,
0.03651611879467964,
0.6038728952407837,
0.31086692214012146,... |
def main ( ) : parser = argparse. argumentparser ( description ='scores') parser. add _ argument ('input _ file ', metavar ='history file ', type = open, nargs ='+ ', help ='files with game history') parser. add _ argument ('output _ file ', metavar ='output file ', type = open, nargs ='+ ', help ='the converted file')... | [
0.011156669817864895,
0.019941307604312897,
1.1498600244522095,
0.02671828307211399,
0.9697311520576477,
0.2526082992553711,
0.19962461292743683,
0.5595353841781616,
-1.1444600820541382,
0.3803905248641968,
0.7041868567466736,
0.2739642262458801,
0.17033259570598602,
-0.2905721962451935,
... |
def to _ csv ( self, file : " optional [ union [ textio, str, path ] ] " = none, batch _ size : int = 100000, has _ headers : bool = true, delimiter : str = ", ", ) : if file is none : buffer = bytesio ( ) self. _ df. to _ csv ( buffer, batch _ size, has _ headers, ord ( delimiter ) ) return str ( buffer. getvalue ( ),... | [
-0.3294573128223419,
0.8654057383537292,
0.5060178637504578,
0.7240051627159119,
-0.22771678864955902,
-0.5346953868865967,
-0.3863202929496765,
0.026851704344153404,
-0.5016997456550598,
-0.8596174120903015,
0.4409482181072235,
0.45206284523010254,
0.2612943947315216,
-0.20057988166809082... |
def save _ indexes ( idxs, outdir, base _ name = layer _ template ) : out _ name = str ( path ( outdir ) / base _ name ) for i, idx in enumerate ( idxs ) : faiss. write _ index ( idx, out _ name. format ( i ) ) | [
-1.6628161668777466,
-0.7516433596611023,
0.19244931638240814,
0.3724821209907532,
-0.11152398586273193,
-0.34356817603111267,
0.3690955638885498,
0.013103795237839222,
0.3250545561313629,
0.3636420965194702,
-0.9007220268249512,
-0.585558295249939,
0.015878213569521904,
0.3034275770187378... |
def get _ output _ name ( graph, node _ id, pattern ) : node = graph. getnodefromid ( node _ id ) mapping = dict ( ) mapping ['$ ( graph )'] = graph. getidentifier ( ) mapping ['$ ( identifier )'] = node. getproperties ( sdpropertycategory. output ) [ 0 ]. getid ( ) mapping ['$ ( description )'] = node. getannotationpr... | [
-0.19618554413318634,
-0.21855078637599945,
0.6404248476028442,
-0.15220731496810913,
-0.9445384740829468,
-0.44464439153671265,
0.1684563159942627,
-0.0012084611225873232,
-0.586963415145874,
0.6109189987182617,
0.649668276309967,
0.2616496980190277,
0.7398432493209839,
-0.608433961868286... |
def repositionnementdansleftp ( ftp, chemin ) : l = differenceentrechemins ( ftp. pwd ( ), chemin ) if l : for i in l : try : ftp. cwd ( i ) except ftplib. error _ perm : break | [
0.134313702583313,
-0.6290098428726196,
0.34298956394195557,
-0.8420931696891785,
-0.06519605219364166,
1.039548397064209,
-0.055143725126981735,
-0.032843898981809616,
-0.3489258885383606,
-0.27000296115875244,
0.7682364583015442,
0.04298665001988411,
-0.8865464925765991,
0.26771858334541... |
def test _ force _ prompt _ grab _ inputs ( self ) : target = manifest ( stringio ( manifest _ force _ inputs ) ) target. get _ config = mock ( ) target. grab _ inputs ( force _ prompt = true ) target. get _ config. assert _ has _ calls ( [ call ( " gitroot ", default = " ~ / workspace ", secret = false, force _ prompt... | [
-0.373494416475296,
0.5893669128417969,
0.4195494055747986,
0.2766800820827484,
0.6199437379837036,
0.5884700417518616,
-0.11324644088745117,
-0.36045223474502563,
0.0910375565290451,
-0.5876222252845764,
-0.2803925573825836,
-0.04620777815580368,
0.1286601424217224,
0.5565488338470459,
... |
def multiscale _ cnn _ features ( image, layername, fraction = 1. 0, scale = 1 / np. sqrt ( 2 ), n _ downsample = 3, n _ upsample = 1 ) : resample _ exponents = range ( min ( - n _ upsample, 0 ), max ( 0, n _ downsample ) ) f = [ ] for exponent in resample _ exponents : # resample image with bilinear interpolation im =... | [
-0.3650958836078644,
-0.0882830023765564,
0.8799058794975281,
1.1375948190689087,
-0.18435807526111603,
-1.0933040380477905,
-0.3582145869731903,
0.26618731021881104,
-0.32651638984680176,
0.6506280303001404,
-0.7358803749084473,
-0.526590883731842,
-0.5399453043937683,
0.21380920708179474... |
def get _ trans _ matrix ( self ) : return self. trans _ matrix | [
-0.7401708960533142,
-0.04161912202835083,
0.16482584178447723,
-0.40259918570518494,
0.5621194839477539,
-0.36543014645576477,
0.40705496072769165,
-0.032018691301345825,
0.1489008665084839,
-0.26559972763061523,
-0.7359350919723511,
0.28946638107299805,
-0.30364954471588135,
-0.735603570... |
def _ _ iter _ _ ( self ) : for v in self. vec : yield ( v ) | [
-0.17963901162147522,
-0.6235873103141785,
0.05311323329806328,
-0.43236374855041504,
0.6279039978981018,
0.5016933679580688,
0.3706773817539215,
-0.6480060815811157,
-0.6932794451713562,
-0.7609782814979553,
0.48323366045951843,
0.3876398205757141,
0.08703165501356125,
0.01684361696243286... |
def remove _ id _ path ( docs, id _ path ) : for doc in docs : if doc. id _ path! = id _ path : yield doc | [
-0.31711214780807495,
-1.3160531520843506,
0.48929497599601746,
0.7765042781829834,
-0.5456963777542114,
0.2825024127960205,
0.3952832520008087,
-0.08821584284305573,
0.4260958135128021,
0.6692779660224915,
-0.5769714117050171,
-0.8403304219245911,
-0.917356550693512,
-0.32642513513565063,... |
def get _ contributions ( self, bounty _ id ) : contributions = [ ] contrib _ page _ str ='http : / / www. wesearchr. com / api / bounties / { } / contributions? page = { }'page _ no = 1 # start off at square one... # keep grabbing pages til it runs dry! while true : try : contrib _ page = json. loads ( requests. get (... | [
-0.0016726994654163718,
-0.5192453265190125,
0.5654202699661255,
-0.45543190836906433,
1.0998151302337646,
-0.31520283222198486,
-0.35514941811561584,
-0.18597254157066345,
0.5060766935348511,
0.4362559914588928,
0.12935388088226318,
-0.48668166995048523,
-0.5823503732681274,
1.11514091491... |
def get _ leverage ( self, cached _ equity = none ) : a = self. get _ ledger ( ). get _ asset _ valuation ( ) lev _ exposure = self. leverage _ constraint. get _ leverage _ denominator ( a ) if cached _ equity is none : l = self. get _ ledger ( ). get _ liability _ valuation ( ) cet1e = self. get _ cet1e ( a - l ) else... | [
0.027446120977401733,
-0.3563384413719177,
0.6998909115791321,
-0.3828355073928833,
-0.02776983752846718,
0.4451451003551483,
0.25481298565864563,
0.11560814082622528,
0.3302946984767914,
0.010466196574270725,
0.5428884625434875,
0.11836598813533783,
-0.6070518493652344,
0.2754156291484833... |
def debootstrap ( mnt _ point, arch = " arm64 ", components = ( " main ", " contrib ", " non - free " ), extra _ pks = ( ), variant = " minbase ", repo = " http : / / ftp. debian. org / debian " ) : # need debootstrap, debian - archive - keyring, qemu, binfmt - support, qemu - user - static extra _ pks = ", ". join ( e... | [
-0.3604521155357361,
-0.031006887555122375,
0.4426182210445404,
0.31498152017593384,
-0.9371171593666077,
-0.19582752883434296,
-0.6064238548278809,
-0.19243362545967102,
0.5498411059379578,
-0.07381044328212738,
-0.1824769526720047,
0.1776871383190155,
-0.34876400232315063,
-0.31194826960... |
def train ( self, epochs = none, steps = none, shuffle _ batches = true, stability _ target _ delta = 1e - 2, stability _ iterations = none ) : # prepare model and monitors # # # # # # # # # # set to converged mode self. model. set _ mode ('converged') # pre - compute decays self. model. precompute _ decays ( 1 ) # ass... | [
-0.8557087779045105,
0.6730833649635315,
0.5603371858596802,
0.6945683360099792,
0.5627356767654419,
0.12375497072935104,
0.4944973289966583,
-0.3146117627620697,
-0.4783734083175659,
-1.033469319343567,
-0.16952405869960785,
-0.4761907160282135,
0.18838870525360107,
0.5676997303962708,
... |
def get _ element ( osm _ file, tags = ('node ','way ','relation') ) : context = et. iterparse ( osm _ file, events = ('start ','end') ) _, root = next ( context ) for event, elem in context : if event = ='end'and elem. tag in tags : yield elem root. clear ( ) | [
0.6010695695877075,
-0.04716968536376953,
0.8527178764343262,
0.5605400800704956,
-0.05044356733560562,
0.2545139491558075,
-0.4977339804172516,
-0.3010498583316803,
-1.114076018333435,
-0.06938978284597397,
0.8114013671875,
0.3294450640678406,
-0.6309224963188171,
-0.27597254514694214,
... |
def output _ addresses ( blockheight = directory _ block _ height ) : transactions : object = factomd. factoid _ block _ by _ height ( blockheight ) ['fblock'] ['transactions'] for result in transactions : output _ addr = result ['outputs'] for out _ addr in output _ addr : output _ addresses = out _ addr ['useraddress... | [
-0.11483744531869888,
-0.17832569777965546,
0.6384651064872742,
0.5806209444999695,
-0.3915497362613678,
-1.4977970123291016,
1.1238436698913574,
-0.2990889549255371,
-0.7318323254585266,
0.7051116824150085,
-0.05540036782622337,
0.2513495981693268,
-0.07555214315652847,
0.2661777436733246... |
def itersegments ( self ) : yield segment ( self. pt1. x, self. pt1. y, self. pt2. x, self. pt1. y ) # bottom yield segment ( self. pt1. x, self. pt1. y, self. pt1. x, self. pt2. y ) # left yield segment ( self. pt1. x, self. pt2. y, self. pt2. x, self. pt2. y ) # top yield segment ( self. pt2. x, self. pt1. y, self. p... | [
-0.905744731426239,
-0.3088538646697998,
0.690403938293457,
-0.0705125480890274,
1.2588216066360474,
0.8111348152160645,
0.5944730043411255,
-1.483970046043396,
-0.4488835036754608,
-0.02798970229923725,
0.004797880072146654,
-0.019272666424512863,
-0.017460839822888374,
0.1449084132909774... |
def _ _ init _ _ ( self, api _ name = none, apikey = " " ) : if " eits " not in api _ name and api _ name is not none : try : curr = exp. apis [ api _ name ] except keyerror : raise keyerror ( " the requested census product shortcode ( { } ) was not found in the " " list of api shortcodes. please check cenpy. explorer.... | [
-0.2971136271953583,
-0.4984360933303833,
0.5415458083152771,
0.2563799023628235,
-0.1393357813358307,
-0.4049215316772461,
0.16011923551559448,
0.00557657890021801,
0.39204615354537964,
0.5014867186546326,
-0.12258601188659668,
0.4813472330570221,
0.2920593023300171,
0.29963767528533936,
... |
def created _ at ( self ) : return self. _ created _ at | [
0.5293933153152466,
-0.6347188353538513,
0.11385388672351837,
-0.05122371390461922,
1.1941115856170654,
0.910701334476471,
0.21676255762577057,
-0.6456858515739441,
-0.8210271596908569,
-1.7543929815292358,
-0.37894007563591003,
0.17806586623191833,
1.3394593000411987,
-0.6304371953010559,... |
def add _ experience ( self, experience _ batch ) : self. replay _ buffer. append ( experience _ batch ) return skillspaceagent. add _ experience ( self, experience _ batch ) | [
-0.04606775939464569,
-0.3246946632862091,
0.45145124197006226,
0.41013261675834656,
0.5452303886413574,
0.6975138783454895,
-0.7116188406944275,
-0.14279325306415558,
1.1596778631210327,
-0.5534840822219849,
-0.701083779335022,
0.3926498591899872,
-0.4629487693309784,
-0.06434189528226852... |
def grab _ raised _ bounty ( self, response ) : amount _ raised _ text = response. css ('div. bounty - data') [ 0 ]. css ('div'). extract ( ) [ - 1 ] # this is squirreled away in some inline javascript... amount _ raised _ match = re. search ('document \. write \ ( \ \ \'( [ 0 - 9 ] + ) \ \ \'', amount _ raised _ text ... | [
0.23450179398059845,
-0.5380631685256958,
0.7319098114967346,
-0.3964180648326874,
0.1809464991092682,
-0.763209879398346,
1.072318196296692,
-0.3240651488304138,
-0.11548347026109695,
-0.2662173807621002,
0.07786080241203308,
-0.19867368042469025,
-0.436953604221344,
-0.13566678762435913,... |
def _ _ init _ _ ( self, istring ) : if istring [ - 2 : ]! = " ; ; " : raise ruleformaterror ( " " " incorrect replacement format. replacement should end with { : s }. " " ". format ( repl _ separator. pattern ) ) self. groups = self. _ _ parse ( repl _ separator. split ( istring ) [ : - 1 ] ) | [
0.7674099802970886,
0.06718108803033829,
0.511201798915863,
-0.466143399477005,
-0.554603636264801,
-0.19600355625152588,
-0.022097328677773476,
1.4936472177505493,
-0.2114463448524475,
-0.007182866334915161,
0.12423744052648544,
-0.7368206977844238,
-0.30086493492126465,
-0.33324918150901... |
def volume _ type _ get _ all ( context, inactive = false ) : return impl. volume _ type _ get _ all ( context, inactive ) | [
0.3531431555747986,
-0.5099169611930847,
0.6506432890892029,
1.0399117469787598,
1.0143003463745117,
-0.3498266339302063,
-0.9231421947479248,
-1.0694289207458496,
0.003390870988368988,
0.10996698588132858,
-0.02349761314690113,
0.539516031742096,
-0.21626217663288116,
0.09225470572710037,... |
def qr _ interp ( self, t ) : return self. qt _ interp ( t ) / self. qt _ interp ( self. tref ) | [
0.18220293521881104,
-0.38139528036117554,
0.4443250000476837,
-1.1275067329406738,
-0.24223476648330688,
0.6507905721664429,
0.31869789958000183,
-0.5599648952484131,
0.03844792768359184,
0.5607752203941345,
-0.1030568778514862,
-0.9947149157524109,
-1.192740559577942,
-0.5131427645683289... |
def registrants _ email _ notification ( self, registrants _ email _ notification ) : self. _ registrants _ email _ notification = registrants _ email _ notification | [
-0.7661012411117554,
-0.02717060223221779,
-0.3445836901664734,
0.3569876253604889,
0.5811088681221008,
0.4413352310657501,
0.5069364905357361,
1.5525637865066528,
-0.3661970794200897,
0.7440623044967651,
-1.2153902053833008,
-0.27468329668045044,
0.8454554677009583,
-1.1076936721801758,
... |
def delta ( self ) : if self. _ delta is none : raise assertionerror ( " privacy budget is not calculated yet. " ) return self. _ delta | [
0.12154553830623627,
0.4451258182525635,
0.6484118103981018,
1.2204294204711914,
0.6032209396362305,
1.7402395009994507,
1.5632404088974,
-0.2256024330854416,
0.6618064641952515,
-1.0606305599212646,
-0.18637850880622864,
0.688126266002655,
-0.768347978591919,
0.04125441238284111,
0.7019... |
def verification ( self, x, labels ) : miss _ classified _ count = 0 for i in range ( 0, len ( x ) ) : predicted _ label = self. predict ( x [ i ] ) if predicted _ label! = labels [ i ] : miss _ classified _ count = miss _ classified _ count + 1 print " % s is misclassified as % s " % ( x [ i ], predicted _ label ) pri... | [
-0.5986437201499939,
-0.2824046015739441,
0.6314413547515869,
0.5197829604148865,
0.5149019956588745,
0.7831248044967651,
-0.3539113700389862,
0.27830788493156433,
0.1488339900970459,
-0.1802571415901184,
-1.0238975286483765,
0.8639958500862122,
0.17371509969234467,
0.9083885550498962,
-... |
def _ done _ callback ( self, future ) : future. end _ time = time. time ( ) future. duration = future. end _ time - future. start _ time # sort the results list in order of fastest to slowest self. results. sort ( key = lambda e : - 1 / ( e. duration or - 1 ) ) | [
0.09314204752445221,
0.7181503176689148,
0.37846314907073975,
-0.4233027994632721,
0.5405413508415222,
-0.4716583788394928,
0.2068062424659729,
0.1795375496149063,
-0.6281499266624451,
0.13354690372943878,
-0.24432715773582458,
-0.08423600345849991,
0.25115036964416504,
1.0249360799789429,... |
def filter _ image _ with _ mode ( height, width, portrait _ mode _ filtered ) : return height / width > 1 if portrait _ mode _ filtered else height / width < 1 | [
-1.2209373712539673,
0.23631782829761505,
0.47169002890586853,
0.7592898011207581,
-1.213679313659668,
0.4919120967388153,
-0.08084709942340851,
-0.5690268874168396,
-0.3879123628139496,
0.5166618824005127,
0.17625701427459717,
0.09917662292718887,
-0.2616042196750641,
0.08873822540044785,... |
def tel _ altitude ( self, side _ port _ group _ 1, side _ port _ group _ 2, side _ port _ group _ 3, side _ port _ group _ 4, telescope _ state, slit _ state, flap _ state, mirror _ cover _ state, who _ did _ it _ tel, who _ did _ it _ sp ) : self. side _ port _ group _ 1 = side _ port _ group _ 1 self. side _ port _ ... | [
-0.12696339190006256,
-0.4194108247756958,
0.7461246252059937,
-0.3638972342014313,
-0.7217238545417786,
0.2919001281261444,
0.276221364736557,
-0.5184789896011353,
-0.14664004743099213,
0.6369057297706604,
0.06542925536632538,
-0.13370102643966675,
-0.33630403876304626,
0.5016969442367554... |
def _ _ repr _ _ ( self ) : return f " " " a polygon sequence object with the following properties length _ of _ the _ sequence - { self. _ _ len _ _ ( ) } max _ num _ of _ vertices - { self. max _ num _ of _ vertices } circum _ radius - { self. circum _ radius } max _ efficiency _ polygon - { self. max _ efficiency _ ... | [
-0.6160409450531006,
-1.2597273588180542,
0.6094823479652405,
-0.7248829007148743,
-0.38452866673469543,
0.0018519875593483448,
0.20896391570568085,
-0.13684484362602234,
0.5086207389831543,
0.7508623003959656,
-1.0450983047485352,
0.7404171228408813,
0.5443568229675293,
-0.581960856914520... |
def get _ form ( self, form _ class ) : object = getattr ( self,'object ', self. get _ object ( ) ) return form _ class ( object, * * self. get _ form _ kwargs ( ) ) | [
-0.16085870563983917,
-0.47808635234832764,
0.44295573234558105,
-0.04725588485598564,
0.7919460535049438,
-0.018864639103412628,
-0.5115360617637634,
-0.5017189979553223,
0.6575844287872314,
-0.9086167812347412,
-0.43483594059944153,
-0.2214658111333847,
0.7722500562667847,
0.508376598358... |
def find _ relative ( nominal _ group, sentence, position, propo _ rel _ list ) : # nominal group or sentence is empty if not nominal _ group or not sentence : return - 1 # relative motion is obtained after a proposal # we deleted all nominal groups and their complements # = > we have not nominal _ group + relative but... | [
0.349395751953125,
0.25033822655677795,
0.6881104707717896,
-0.0829935371875763,
-1.1925207376480103,
-0.6008003950119019,
-0.19846676290035248,
-0.3565100431442261,
0.06433828920125961,
1.274387001991272,
0.4938372075557709,
-0.38117948174476624,
-1.753154993057251,
0.4990314245223999,
... |
def cli ( config, configfile, verbose ) : config. verbose = verbose config. configfile = configfile if not os. path. isfile ( configfile ) : state. write ( configfile, { } ) | [
0.5435923337936401,
-0.16957561671733856,
0.49544376134872437,
0.30122265219688416,
1.111318826675415,
0.26420852541923523,
0.3152196407318115,
0.9169470071792603,
-0.8986851572990417,
0.449146568775177,
-0.45484068989753723,
-0.4299395978450775,
0.7039470672607422,
0.7221137881278992,
0... |
def cluster _ analysis _ array ( simname, cutoff, coords _ loc = [ 3, 6 ] ) : coord, bs = extract. extract _ unwrapped ( simname, first _ only = true, boxsize = true ) current _ timestep = coord ['timestep _ 0'] del coord cluster _ set = { } cluster _ index = 0 type2 = current _ timestep [ current _ timestep ['type'] =... | [
-0.22672098875045776,
0.11386069655418396,
0.7229536175727844,
-0.45267438888549805,
-0.37506523728370667,
0.17414861917495728,
0.4508083164691925,
-0.2423633188009262,
-0.3783474862575531,
0.8608964681625366,
0.1388208568096161,
0.24717235565185547,
0.2848261892795563,
-0.6069834232330322... |
def add _ block ( self, block, proof ) : previous _ hash = self. blockchain. last _ block. hash if previous _ hash! = block. previous _ hash : return false if not device. is _ valid _ proof ( block, proof ) : return false block. hash = proof self. blockchain. chain. append ( block ) return true | [
0.043324291706085205,
0.9278088212013245,
0.8690968155860901,
1.5057883262634277,
0.373125284910202,
0.679337739944458,
-0.7591755986213684,
-0.09756671637296677,
0.2202436923980713,
-0.6139317154884338,
-0.2144930362701416,
-0.5388375520706177,
-1.1212716102600098,
0.7974715232849121,
0... |
def process _ result ( self, post, path = none ) : file _ dict = collections. ordereddict ( ) result _ list = post. posts if path is not none : i = 0 for result in result _ list : filename = " doc " + str ( i ) filepath = path + os. sep + filename result _ doc = codecs. open ( filepath, mode ='w ', encoding ='utf - 8')... | [
-0.34588029980659485,
0.18167640268802643,
0.4423298239707947,
-0.6342066526412964,
-0.27212345600128174,
0.052800994366407394,
0.38851386308670044,
0.20734921097755432,
-1.0963412523269653,
-0.47954893112182617,
-0.8257572650909424,
-0.8850409388542175,
0.16231049597263336,
0.639997601509... |
def _ populate ( self, json ) : base. _ populate ( self, json ) mapped _ udfs = [ ] for udf in self. user _ defined _ fields : t = userdefinedfieldtype. text choices = none if hasattr ( udf, " oneof " ) : t = userdefinedfieldtype. select _ one choices = udf. oneof. split ( ", " ) elif hasattr ( udf, " manyof " ) : t = ... | [
-1.5150545835494995,
0.43481943011283875,
0.5130875110626221,
-0.6307517290115356,
0.4683155417442322,
-0.2986445426940918,
0.32084110379219055,
-0.33406805992126465,
0.5084607005119324,
-0.00492691807448864,
-1.202207088470459,
-0.40370577573776245,
1.002765417098999,
0.5155934691429138,
... |
def _ _ select _ one ( self, current _ list, index ) : if not self. _ _ validate _ select ( current _ list, index ) : return track = current _ list [ index ] if not track. is _ playable ( ) : self. ui. show _ message ( " track : { 0 } cannot play, track required to purchase or credit ". format ( track. title ) ) return... | [
-0.30320292711257935,
0.24046719074249268,
0.5836703777313232,
0.2813032269477844,
0.45254507660865784,
0.5729573965072632,
0.21776767075061798,
-0.7233846187591553,
0.7148513197898865,
0.2848842442035675,
0.36431875824928284,
0.4488689601421356,
-0.7668687105178833,
0.02021493762731552,
... |
def import _ dataset ( i _ datasource : basedatasource, database _ id : optional [ int ] = none, import _ time : optional [ int ] = none, ) - > int : lookup _ database : callable [ [ basedatasource ], optional [ database ] ] lookup _ datasource : callable [ [ basedatasource ], optional [ basedatasource ] ] if isinstanc... | [
-0.46990105509757996,
0.623296320438385,
0.35342922806739807,
-0.36060577630996704,
-0.6647879481315613,
-1.0061861276626587,
0.023560816422104836,
0.7688190937042236,
0.9104219079017639,
0.21090994775295258,
-0.47691628336906433,
0.40815913677215576,
-0.015225774608552456,
-0.386348396539... |
def floating _ ip _ allocate _ address ( context, project _ id, pool ) : return impl. floating _ ip _ allocate _ address ( context, project _ id, pool ) | [
-0.7965054512023926,
0.2867598235607147,
0.34093308448791504,
0.24169571697711945,
0.021154340356588364,
-0.021275823935866356,
0.878005862236023,
-0.9336425065994263,
0.3023237884044647,
0.0194143857806921,
1.463192105293274,
1.0359916687011719,
-0.296440452337265,
-1.0817906856536865,
... |
def all _ partitions ( n, s, xmin = 1, xmax = none ) : if xmax is none : if n = = 1 : yield [ s ] else : for i in range ( xmin, s / / n + 1 ) : for result in all _ partitions ( n - 1, s - i, i, xmax ) : yield [ i ] + result else : if s > n * xmax : yield none elif n = = 1 : yield [ s ] else : for i in range ( max ( xmi... | [
-0.06256464868783951,
0.5006002187728882,
0.8378170728683472,
0.5568168759346008,
-0.5803231000900269,
-0.9744887351989746,
-0.6182599663734436,
-0.36365166306495667,
0.8701373934745789,
-0.2921440899372101,
-0.3754861354827881,
0.14366745948791504,
-0.01498560979962349,
-0.415051072835922... |
def finish _ job ( self, jobreport ) : | [
0.5213460326194763,
-0.3707381784915924,
0.05962556228041649,
-0.021427670493721962,
0.44276905059814453,
0.18430542945861816,
0.1324276626110077,
-0.08430967479944229,
-1.339301586151123,
-0.7841822504997253,
-0.2688134014606476,
-1.2440638542175293,
-1.1437455415725708,
0.125452086329460... |
def interpolate _ ts ( v, time, value, freq ) : v = v [ [ time, value ] ] v = v. set _ index ( time ) idx = np. arange ( v. index. min ( ), v. index. max ( ) + freq, freq ) v = v. reindex ( pd. int64index ( idx, name = time ) ). interpolate ( ) return v. reset _ index ( ) | [
-0.689626157283783,
0.5411926507949829,
0.6352375149726868,
-0.5528770089149475,
-0.2522863447666168,
-1.2287603616714478,
-0.47735199332237244,
0.16440147161483765,
0.008216790854930878,
0.9595319628715515,
0.41328296065330505,
-0.059583842754364014,
0.42244118452072144,
-1.12713670730590... |
def measured _ angle ( self ) : return self. sensors [ 3 ]. sensor _ values [ 2 ] | [
0.40840643644332886,
0.059932515025138855,
0.3527142405509949,
0.0019544472452253103,
0.42612484097480774,
1.308432698249817,
-0.18005995452404022,
-0.15041488409042358,
0.1815638542175293,
-0.007393964100629091,
0.09961427003145218,
0.03795744478702545,
-0.7437732815742493,
-0.25914385914... |
def get _ writers ( self ) : # build list of writers objects but also keep dataframe writers _ df = database _ helper. select _ query ( " writers ", { " m _ imdbid " : self. imdbid } ) self. writers = [ ] self. writers _ df = writers _ df for index, row in writers _ df. iterrows ( ) : writer = writer ( row ) self. writ... | [
-1.1166595220565796,
0.2602314054965973,
0.20224781334400177,
0.03777781128883362,
1.7402453422546387,
-0.9961121678352356,
-0.10562808811664581,
0.5415436625480652,
-0.1899813413619995,
-0.10860583931207657,
-0.06362798064947128,
0.28355565667152405,
-0.7266821265220642,
0.397690743207931... |
def plot _ binding _ release ( df, chaperone ='binding ', order = false, palette ='mako') : # sourcery skip : switch if chaperone = ='binding': ycol ='fret _ after _ normalised'ylabel ='# of chaperone binding events / min / molecule'title ='chaperone _ binding _ rate _ per _ molecule'if chaperone = ='release': ycol ='f... | [
0.5379047989845276,
0.08305680006742477,
0.899480938911438,
-0.41371285915374756,
-0.7766803503036499,
0.4413151741027832,
0.7100281715393066,
0.5740061402320862,
0.2877059876918793,
0.4777458608150482,
0.2061595767736435,
1.1310677528381348,
-0.12296221405267715,
-0.04897062107920647,
1... |
def _ str _ to _ windows ( self, input _ str, window _ length, curse _ forward ) : windows = [ ] i = 0 len _ input = len ( input _ str ) while i < len _ input : window _ text = input _ str [ i : i + window _ length ] if self. sanitize _ input : windows. append ( {'sanitized': self. _ sanitize ( window _ text ),'text': ... | [
-0.441162109375,
-0.19142046570777893,
0.38969337940216064,
-0.34179624915122986,
-1.256190538406372,
0.08931653201580048,
0.08348500728607178,
0.5417105555534363,
-0.14482539892196655,
0.38706398010253906,
-0.44312503933906555,
0.7872431874275208,
-1.0040584802627563,
0.6359988451004028,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.