text
stringlengths
25
2.19k
embedding
listlengths
768
768
def set _ number _ served ( self, customer _ count ) : self. number _ served = customer _ count
[ 0.17784029245376587, 0.1872776448726654, 0.5044360160827637, 0.0423269085586071, 0.27723875641822815, 0.5591578483581543, 0.4448082149028778, 0.7382990717887878, -1.5140600204467773, -0.3983135223388672, -1.3394092321395874, 0.8737723231315613, 0.42382729053497314, 0.9564141035079956, 0....
def normalize ( x ) : import math squared = [ y * * 2 for y in x ] sum _ squared = sum ( squared ) norm = math. sqrt ( sum _ squared ) return norm
[ -0.10374480485916138, -0.47599881887435913, 0.38659006357192993, 0.598106861114502, -0.5714622735977173, -0.42427825927734375, -0.10035664588212967, 0.25997796654701233, 1.1983057260513306, -0.20925326645374298, -1.5311435461044312, 0.4089665114879608, -0.3737105429172516, 0.35418078303337...
def _ _ delattrs _ _ ( self, attrs ) : for attr in attrs : try : delattr ( self, attr ) except attributeerror : pass
[ -0.4900707006454468, -0.22754746675491333, 0.3202541768550873, -0.35204821825027466, -0.17394264042377472, -0.027124715968966484, -0.23942287266254425, 0.3223635256290436, 0.39323675632476807, -0.27524176239967346, 0.4600936472415924, -0.6757780313491821, -0.027173927053809166, 0.640277326...
def get _ top _ keys ( state _ dict ) : return set ( { get _ top _ key ( k ) for k in state _ dict. keys ( ) } )
[ -0.7499119639396667, 0.22635400295257568, 0.5059119462966919, -0.4975926876068115, -0.42286255955696106, -0.11185763776302338, -0.525680422782898, -0.4334469735622406, -0.02394973672926426, 0.6883687376976013, -0.18174992501735687, 0.17364656925201416, 0.699936032295227, -0.522802293300628...
def test _ io _ trans ( tmp _ path ) : os. mkdir ( tmp _ path / " sample " ) pytest. raises ( runtimeerror, _ find _ trans, " sample ", subjects _ dir = tmp _ path ) trans0 = read _ trans ( fname ) fname1 = tmp _ path / " sample " / " test - trans. fif " trans0. save ( fname1 ) assert fname1 = = _ find _ trans ( " samp...
[ 0.005998321808874607, -0.11752849817276001, 0.3606909513473511, 0.07745935767889023, 0.5417470335960388, -0.25553223490715027, 0.6323716044425964, -0.30570289492607117, -0.4670153558254242, 0.10197354108095169, -1.0086936950683594, -0.37580543756484985, 0.3364420533180237, -0.2589886784553...
def _ merge _ function ( job ) : chunk = job. parameters ['chunk'] logger = job. parameters ['logger'] logger. log ( f'{ job. parameters [ " name " ] } - { job. id : 3 } / { job. total : 3 } - finish - start') chunk. open ( ) pattern = str ( path ( chunk. dataset. location,'temp ', f'{ chunk. dataset. name } _ temp ', ...
[ -0.13006052374839783, -0.44882145524024963, 0.7708882689476013, -0.632434606552124, 0.10790248215198517, -0.3766963481903076, 0.073274627327919, -0.5580721497535706, -1.051742672920227, -0.03731172904372215, -0.3349786400794983, -0.45222634077072144, -0.09344124794006348, 0.200432881712913...
def to _ string ( self ) : ret = " address : " + self. city + " " + self. state + " " + self. country return ret
[ -0.5978495478630066, -1.480607509613037, 0.5279116630554199, -1.4613704681396484, -0.0967978835105896, 0.7154263257980347, -0.826698899269104, -0.23123019933700562, 0.17525233328342438, 0.7722453474998474, -0.309621125459671, 0.8095541596412659, -0.2543342709541321, -1.0544664859771729, ...
def fill _ in _ arguments ( config, modules, args ) : def work _ in ( config, module, name ) : rkeys = getattr ( module,'runtime _ keys ', { } ) for ( attr, cname ) in rkeys. iteritems ( ) : v = args. get ( attr, none ) if v is not none : config [ cname ] = v if not isinstance ( args, collections. mapping ) : args = va...
[ -0.9565324187278748, -0.11834649741649628, 0.5192094445228577, -0.45651811361312866, 0.060930877923965454, -0.23134730756282806, -0.24039387702941895, 0.09427426010370255, -0.7348129153251648, 0.5592999458312988, -0.17732200026512146, -0.1990671157836914, -0.6487274169921875, 1.25186002254...
def _ base _ dist ( self, * args, * * kwargs ) : return tfd. transformeddistribution ( distribution = tfd. normal ( * args, * * kwargs ), bijector = tfp. bijectors. sigmoid ( ), name = " logitnormal ", )
[ 0.2906288802623749, -0.6835018992424011, 0.34003376960754395, -1.009957194328308, 0.1717902272939682, 0.17463327944278717, -0.5613903403282166, 0.5971439480781555, -0.4180886149406433, -0.24612712860107422, 0.28386935591697693, 0.6061832904815674, -0.9820325970649719, -1.3158875703811646, ...
def hit ( player _ posn, deck _ lst, hand _ num = 0 ) : # note : deal _ cards ( ) returns a list of one card - [ 0 ] is added to append the card itself to the hand players [ player _ posn ] ['hand'] [ hand _ num ]. append ( deal _ cards ( 1, deck _ lst ) [ 0 ] )
[ -0.10032055526971817, 0.011762863956391811, 0.4451059401035309, 0.5755190253257751, 1.1633085012435913, -0.1868773102760315, -0.7523553371429443, 1.5014334917068481, -0.1883615255355835, -0.08145587146282196, -0.4556994140148163, -0.33736667037010193, -0.1797845959663391, -0.52680259943008...
def delete _ pending ( key ) : instance = key. get ( ) if not instance : return if not instance. pending _ deletion : logging. warning ('instance not pending deletion : % s ', key ) return if not instance. url : logging. warning ('instance url unspecified : % s ', key ) return instance _ group _ manager = instance. ins...
[ -0.9243590235710144, 0.08233531564474106, 0.7342371940612793, -0.8379216194152832, -0.982594907283783, -0.24151913821697235, 0.3131129741668701, 0.6140651106834412, -0.2863956689834595, 0.49202466011047363, 0.3406849801540375, 0.18128369748592377, -0.6933698654174805, 0.8591068983078003, ...
def generate _ plots ( ticket _ data, address _ data ) : agencies = pd. read _ csv ( raw _ loc +'sf _ agency _ list. csv') c = conn. cursor ( ) c. execute ('select max ( tickissuedate ), min ( tickissuedate ) from ticket _ data') totaldays = c. fetchone ( ) maxdate = time. strptime ( totaldays [ 0 ],'% y - % m - % d % ...
[ 0.635380208492279, 0.701468288898468, 1.130875825881958, -0.17885512113571167, -0.3209281861782074, 0.5490557551383972, 0.9760251641273499, 0.03980933874845505, -0.44348347187042236, -0.47430431842803955, 0.810085654258728, 0.3807368874549866, -0.032835934311151505, 0.5762704610824585, 1...
def linearize _ nested _ expression ( nested _ expression, open _ bracket : str = " ( ", close _ bracket : str = " ) " ) - > list [ str ] : if isinstance ( nested _ expression, str ) : # if the string is not a predicate but a nl argument, it is the onus of the models to tokenize it appropriately return [ nested _ expre...
[ -0.36664333939552307, -0.2851117253303528, 0.8397184610366821, 0.49821728467941284, 0.05552064999938011, 0.3970138728618622, -0.27728939056396484, 0.9089517593383789, 0.18787749111652374, -0.32227814197540283, 0.0625915378332138, 0.9187119603157043, -1.0963844060897827, 0.8300842642784119,...
def test _ rearrange _ ss _ capri _ output ( ) : with open ( f " { golden _ data } / capri _ ss _ 1. tsv ",'w') as fh : fh. write ( " model caprieval _ rank score irmsd fnat lrmsd ilrmsd " " dockq cluster - id cluster - ranking " " model - cluster - ranking " + os. linesep ) fh. write ( ".. / 1 _ emscoring / emscoring ...
[ 0.004064643289893866, -0.8765841722488403, 0.6614953279495239, 0.1962512582540512, 0.0776989758014679, 0.4663287401199341, 1.581610918045044, -0.08371900022029877, -0.6178076863288879, -0.47254493832588196, -0.1306677609682083, 0.3041693866252899, 0.3486352860927582, -0.5059822797775269, ...
def _ _ insert _ node ( self, session : azuresession, dbsession : session, dbhardwareprofile : hardwareprofile, dbsoftwareprofile : softwareprofile, addnodesrequest : dict, resourceadapter : str ) - > node : self. _ logger. info ('inserting % d node ', 1 ) nodedetail = addnodesrequest ['nodedetails'] [ 0 ] instance _ i...
[ -0.5493131279945374, 0.717041015625, 0.8517900109291077, -0.8054562211036682, 0.5862568020820618, 0.02014194242656231, -0.4991629719734192, -0.163301482796669, -0.43807289004325867, 0.6858090758323669, 0.40678155422210693, -0.08112440258264542, -0.7623651027679443, -0.21833106875419617, ...
def decode _ kempressed ( bytestring ) : subvol = fpzip. decompress ( bytestring, order ='f') return np. swapaxes ( subvol, 3, 2 ) - 2. 0
[ 0.9288280606269836, -0.648224413394928, 0.3202008605003357, 0.6118364930152893, -0.46247079968452454, -0.2948876917362213, -0.07904935628175735, 0.07944826036691666, -0.02140640839934349, 0.1329866647720337, -0.39398834109306335, -0.21182480454444885, -0.9181262850761414, -1.20072031021118...
def _ _ get _ attribute _ log _ value ( self, attribute _ name, attribute _ value, attribute _ infos ) : result = attribute _ value if attribute _ name in attribute _ infos : expected _ data _ type = dictionary _ utils. get _ element ( attribute _ infos, attribute _ name ) if expected _ data _ type = ='password': resul...
[ -0.05010003596544266, -0.48288866877555847, 0.35813143849372864, -0.37590742111206055, -0.8645675778388977, 0.04378930479288101, -0.8686076402664185, -0.46253761649131775, 0.4074377715587616, 0.3234444856643677, 0.7550243735313416, 0.790662407875061, 1.345352292060852, 0.0586845837533474, ...
def stop ( self ) : self. logger. info ( " stopping batched nanny... " ) if self. timer is not none : self. timer. cancel ( )
[ 0.1992100477218628, -0.8664189577102661, 0.15736447274684906, -0.014465143904089928, 0.4045935571193695, 0.9215139150619507, -0.3379615545272827, 0.5486568808555603, -1.0881636142730713, -0.11577389389276505, -1.0264782905578613, 1.1037589311599731, -0.6073405742645264, 1.2052645683288574,...
def action ( ) : if str ( value ). lower ( ) = = " taxi " : self. taxi ( ) elif str ( value ). lower ( ) = = " fly " : self. fly ( )
[ 0.21545808017253876, -0.7837647795677185, 0.4505138695240021, 0.8071041107177734, 0.47200044989585876, 0.4755605161190033, -0.37389251589775085, -1.2139230966567993, 0.09267428517341614, 0.05475399270653725, 0.2503981590270996, 0.4666013717651367, -0.5186380743980408, 0.844057023525238, ...
def get _ tasks _ state ( self, task _ ids ) : states = { task _ id : inspect. get _ task _ state ( task _ id ) for task _ id in task _ ids } return states
[ -0.379725843667984, -0.10198609530925751, 0.2688737213611603, 0.030215414240956306, -0.43782639503479004, -0.24062857031822205, 0.5427034497261047, -0.3595428466796875, 0.059414032846689224, 0.5529223084449768, -0.5932862758636475, -0.13294091820716858, 0.7318195700645447, 0.74702513217926...
def login ( * * kwargs ) : return api ( * * kwargs )
[ -0.9708331823348999, -0.6732433438301086, 0.457585871219635, 0.17741498351097107, -0.676435649394989, 0.14814552664756775, -1.0958328247070312, -0.030041079968214035, 0.3083644509315491, -0.6347068548202515, -1.005087971687317, 0.26580315828323364, -0.8938508033752441, -0.5696499943733215,...
def get _ next _ page ( self, raw = false ) : return self. account. get _ receive _ addresses ( page = self. current _ page + 1, limit = self. limit, query = self. query, raw = raw )
[ -0.8750045895576477, 0.7232546210289001, 0.6914352774620056, -0.38583627343177795, 0.1468096375465393, -0.7152760028839111, -0.7308354377746582, 0.13820913434028625, 0.6078711748123169, -0.222052663564682, 0.4810797870159149, 0.5854147672653198, -0.21297714114189148, -0.6009154915809631, ...
def epoch _ milliseconds ( d ) : return time. mktime ( d. timetuple ( ) ) * 1000
[ -0.8030951023101807, 0.9713867902755737, 0.18097373843193054, -1.0723260641098022, -0.43434035778045654, -0.5899449586868286, -0.8310067653656006, 0.5344609618186951, 0.24057497084140778, 0.8881087303161621, -0.2733340561389923, -0.8418704271316528, 1.007594108581543, 0.7120961546897888, ...
def match _ commentary ( match _ id, events ) : url = settings. football _ match _ commentary _ url. format ( match _ id, settings. api _ key ) response = requests. get ( url ) data = json. loads ( response. content ) try : print data ['status'], data ['message'] return false except exception as e : ( match _ stats, ma...
[ 0.41071587800979614, -0.3475404381752014, 1.2388339042663574, -0.38712066411972046, 0.6576876640319824, -0.47780752182006836, 0.3185000717639923, 0.33501219749450684, 0.20552906394004822, 0.2035590410232544, -0.15711823105812073, 0.043375201523303986, 0.09994471073150635, -0.16989071667194...
def parse _ xml ( fn _ path ) : with open ( fn _ path ) as data _ file : xml _ doc = etree. parse ( data _ file ) data _ values = list ( ) color _ values = list ( ) opacity _ values = list ( ) nan = none above = none below = none s = xml _ doc. getroot ( ). find ('colormap') if s is not none : color _ map _ details = d...
[ 0.11614590138196945, -0.7768369317054749, 0.8275240659713745, -1.1318330764770508, -1.0314481258392334, -0.24454382061958313, 0.37415799498558044, 0.20713108777999878, -0.6050055623054504, -0.5457351207733154, -1.0355689525604248, 0.23681680858135223, 1.086211085319519, 0.9156240224838257,...
def load _ app _ from _ config ( config _ file ) : global _ conf = { " here " : os. path. dirname ( config _ file ), } settings = { " configuration " : " file : " + config _ file, } app = syncstorage. wsgiapp. make _ app ( global _ conf, * * settings ). app cache _ servers = app. config. get ( " storage. cache _ server...
[ 0.6417002081871033, -0.4193519949913025, 0.454720139503479, 0.6789581179618835, -0.26959747076034546, 1.0629534721374512, 0.7638682126998901, 0.3280787765979767, -0.707716166973114, 1.2094520330429077, -0.9773041009902954, -0.2390499860048294, 0.25152185559272766, 0.1273241490125656, 0.9...
def _ _ len _ _ ( self ) : return self. totlen
[ 0.48032674193382263, -0.9477872848510742, 0.49669045209884644, -1.6344120502471924, 0.033645596355199814, 0.27309131622314453, -0.18422606587409973, 0.25619274377822876, 0.8866572380065918, -0.40154457092285156, -1.4560556411743164, -0.679510235786438, 0.9017859101295471, -0.93212080001831...
def _ listen ( self ) : if not cfg ['udp'] : return try : fleet. startok. wait ( ) bot = fleet. byname ( cfg ['udpbot'] or'default') if not bot : rlog ( 10,'udp ', " can't find % s bot.. not starting " % cfg ['udpbot'] ) return self. sock. bind ( ( cfg ['udphost'], cfg ['udpport'] ) ) rlog ( 10,'udp ','udp listening on...
[ -0.174151211977005, -0.4168892204761505, 0.8134431838989258, -0.7521959543228149, -0.08506178110837936, 0.38764917850494385, -0.1443796306848526, 0.7340521812438965, -0.4047321081161499, -0.1278827041387558, -0.060323309153318405, -0.10453235357999802, -0.4676673412322998, -0.1037989854812...
def get _ name ( self ) : return self. _ _ name
[ -0.7943698167800903, -1.299762487411499, 0.455154687166214, -0.42175790667533875, -0.40297046303749084, 0.49276870489120483, 0.15003827214241028, -0.45629650354385376, 0.02377508021891117, 0.012768073007464409, -0.33438968658447266, 0.3885190188884735, 0.3102034628391266, -0.32007592916488...
def to _ dict ( self ) : result = { } for attr, _ in six. iteritems ( self. swagger _ types ) : value = getattr ( self, attr ) if isinstance ( value, list ) : result [ attr ] = list ( map ( lambda x : x. to _ dict ( ) if hasattr ( x, " to _ dict " ) else x, value ) ) elif hasattr ( value, " to _ dict " ) : result [ att...
[ -0.40874913334846497, 0.018182964995503426, 0.8091816306114197, -0.5790044665336609, -0.8958887457847595, -0.6055082678794861, 0.7305677533149719, -0.1577119529247284, -0.14404116570949554, 0.31542837619781494, 0.17824490368366241, -0.3484180271625519, 0.015370878390967846, 1.0162906646728...
def log _ performance _ metrics ( self, epoch, performance _ estimators, kind = " perfs " ) : metrics = [ epoch, self. args. checkpoint _ key ] metrics = metrics + performance _ estimators. estimates _ of _ metrics ( ) early _ stop = false with open ( " all - { } - { }. tsv ". format ( kind, self. args. checkpoint _ ke...
[ -1.0402638912200928, -0.06139576807618141, 0.7074617147445679, 0.6471369862556458, 0.9440958499908447, 0.20896464586257935, 0.18174795806407928, 0.10892216116189957, -1.370131254196167, 0.09940905123949051, -0.0680830180644989, 0.3209973871707916, 0.2325448840856552, 0.5020936131477356, ...
def fetchbundle ( self, localrestoredirpath, url, remotedirpath, remotestashprefix = " a ", username = none, password = none ) : try : ok = false fileu = fileutil ( ) fn = self. _ _ makebundlefilename ( self. _ _ basebundlefilename, remotestashprefix = remotestashprefix ) if not url : remotepath = os. path. join ( remo...
[ 0.09093386679887772, 0.014963535591959953, 0.9341126680374146, -0.299399733543396, -0.7441254258155823, 0.1352170705795288, 0.011136877350509167, 0.7691216468811035, -0.4775066375732422, -0.35586100816726685, 0.09911782294511795, -0.1647563874721527, -0.4884413480758667, -0.046216588467359...
def minimal _ config ( ) : return yaml. round _ trip _ load ( textwrap. dedent ( r " " " static _ data _ config : reference : path : / path / to / ref. fa step _ config : ngs _ mapping : tools : dna : ['bwa'] bwa : path _ index : / path / to / bwa / index. fasta somatic _ msi _ calling : tools : ['mantis'] path _ ngs _...
[ 0.1835450381040573, -0.8274185061454773, 0.44578230381011963, -0.4274270236492157, -0.7023921608924866, 0.13306815922260284, 0.05207784101366997, 0.097563736140728, -0.4734683036804199, 0.023839687928557396, -0.5189173817634583, 0.6354312896728516, 0.8772313594818115, 0.3961012661457062, ...
def queue _ for _ moderation ( self, object ) : status = contentflag. objects. add _ flag ( object, contentflag. moderate _ flag ) return status
[ -0.41798219084739685, -0.21335825324058533, 0.4611830413341522, -0.5171954035758972, 0.3066045939922333, 0.40541866421699524, -0.734664797782898, -0.5905725359916687, 0.5398470163345337, -0.1422753781080246, -1.068588137626648, 0.22357802093029022, -0.9489087462425232, 0.5312581658363342, ...
def neighbor ( self, col, color ) : for r in range ( 7, - 1, - 1 ) : if self. grid [ r ] [ col ] = ='-': self. grid [ r ] [ col ] = color break return game ( self. grid )
[ 0.01712883450090885, 0.6606667041778564, 0.7766532301902771, -0.17588847875595093, 0.1657751053571701, 0.5938576459884644, -0.6926146149635315, -0.967052161693573, -0.6201649308204651, 1.100351333618164, 0.43790629506111145, 0.07966223359107971, -0.6317514777183533, -0.04687182232737541, ...
def calc _ ohc _ vertical _ integral ( temperature _ cube, volume _ data, density, specific _ heat, coord _ names, chunk = false ) : temperature _ cube. data = temperature _ cube. data * volume _ data if chunk : integral = uconv. chunked _ collapse _ by _ time ( temperature _ cube,'depth ', iris. analysis. sum ) else :...
[ 0.6052095890045166, 0.22909031808376312, 0.7358106374740601, -0.03872513398528099, -0.35895225405693054, -0.47784146666526794, 0.08002658188343048, 0.3804702162742615, -1.2280888557434082, 0.4917201101779938, 0.3732168972492218, 0.23016813397407532, -0.21025517582893372, -0.845531761646270...
def make _ data ( self ) : m = self. m for m in range ( m ) : file _ name ='data _'+ str ( m + 1 ) data = self. prices _ and _ share ( ) data. to _ pickle ( file _ name ) file _ name = file _ name + '. csv'data. to _ csv ( file _ name )
[ -0.539993166923523, 0.5977045297622681, 0.4434460699558258, 0.6257864832878113, 0.8855358958244324, 0.19870787858963013, 0.2830435037612915, 0.3253854513168335, -0.7821744680404663, -0.24573580920696259, -0.2660328149795532, -0.043115194886922836, 0.7021039724349976, -0.05039408802986145, ...
def primes ( n ) : if n < 2 : return [ ] nums = range ( 2, int ( n ) ) p = [ ] while nums : new _ prime = nums [ 0 ] p. append ( new _ prime ) for i in nums [ 1 : ] : if i % new _ prime = = 0 : nums. remove ( i ) nums. remove ( nums [ 0 ] ) return p
[ -1.1183445453643799, -0.09688233584165573, 0.3445785641670227, 0.4906114935874939, 0.33002984523773193, 0.2176285982131958, -0.5896227359771729, 0.07782711088657379, 1.2680778503417969, 0.7840225100517273, -0.8764916062355042, -0.16084939241409302, -0.8252480030059814, 0.7277746796607971, ...
def compute _ targets ( self, image _ group, annotations _ group ) : # get the max image shape max _ shape = tuple ( max ( image. shape [ x ] for image in image _ group ) for x in range ( 3 ) ) anchors = self. generate _ anchors ( max _ shape ) batches = self. compute _ anchor _ targets ( anchors, image _ group, annota...
[ -0.9043931365013123, 0.07998557388782501, 0.3441968262195587, 0.5762414336204529, 1.0201961994171143, -0.4368622601032257, -0.1884635090827942, 0.20225411653518677, 0.04421226307749748, 0.6355870962142944, 0.585685133934021, 0.5030236840248108, 0.4271637201309204, 0.2135104387998581, 0.1...
def constant _ iterable ( node, ctxt, avoid _ side _ effects = true ) : # todo : support zipping # todo : support sets / dicts? # todo : support for reversed, enumerate, etc. # todo : support len, in, etc. # check for range ( * constants ) def wrap ( return _ node, name, idx ) : if not avoid _ side _ effects : return r...
[ -0.6285152435302734, 0.39250439405441284, 0.7842994928359985, -0.3388477861881256, -0.43461838364601135, -0.9283614158630371, -0.7281395792961121, 0.3591315746307373, 0.06952494382858276, 0.6249192357063293, -0.316990464925766, -0.04721970483660698, -0.4062432050704956, -0.1427452564239502...
def quick _ sort ( lst, start, end ) : if start < end : p = partition ( lst, start, end ) quick _ sort ( lst, start, p ) quick _ sort ( lst, p + 1, end ) return lst
[ 0.5374752283096313, -0.1715458482503891, 0.4393909275531769, 0.9080080389976501, -0.7630296349525452, -0.0818084105849266, -1.3156324625015259, -0.0028037247247993946, -0.22638408839702606, -0.4229857623577118, -1.0636202096939087, 0.13058511912822723, -0.3488144278526306, -0.2396753877401...
def dataframe _ to _ list ( df ) : idx = list ( df. index. values ) values = list ( df. values ) z = zip ( idx, values ) return [ ( str ( x [ 0 ] ), float ( x [ 1 ] ) ) for x in z ]
[ -0.7643743753433228, -0.1982075423002243, 0.4122524559497833, -0.49010398983955383, 0.6475101113319397, -0.12271673232316971, -0.4070616066455841, 0.408549964427948, 0.19258157908916473, 0.7001445293426514, -0.5601680278778076, -0.02927333302795887, 0.7900697588920593, 0.19166792929172516,...
def encode ( self, value ) : return super ( datetimefield, self ). encode ( value. strftime ( self. format ) )
[ -0.34741413593292236, -0.20291613042354584, 0.47251272201538086, -0.1547624170780182, -0.21719114482402802, 0.45390164852142334, -0.7916368842124939, -0.5337066650390625, 0.1869378536939621, 0.005458351224660873, -0.8047967553138733, -0.4959014058113098, -0.5360248684883118, 0.563314497470...
def save _ to _ revit _ doc ( self, doc = revit. doc ) : bindingmap = doc. parameterbindings # type : bindingmap if bindingmap [ self. definition ] : bindingmap. reinsert ( self. definition, self. binding, self. bip _ group. enum _ member ) else : bindingmap. insert ( self. definition, self. binding, self. bip _ group....
[ -0.8639429807662964, -0.3570929169654846, 0.5921782851219177, 0.2021024376153946, 0.522706151008606, 0.20330525934696198, 1.0540294647216797, 0.6142798066139221, -0.013654316775500774, 0.7252066731452942, -0.6891594529151917, 0.4204898476600647, -1.2070430517196655, 0.9653540849685669, -...
def query _ industry _ daily ( self, symbol, start _ date, end _ date, type _ ='sw ', level = 1 ) : def group _ df _ to _ dict ( df, by ) : gp = df. groupby ( by = by ) res = { key : value for key, value in gp } return res df _ raw = self. query _ industry _ raw ( symbol, type _ = type _, level = level ) dic _ sec = gr...
[ -1.1401939392089844, 0.028877541422843933, 1.0035406351089478, -0.038584209978580475, -0.14650605618953705, -0.1410292088985443, 0.7365779280662537, -0.509282112121582, -0.9260435700416565, 0.3634633719921112, 0.9022353887557983, 0.7035459280014038, 0.11043038219213486, -0.0567032024264335...
def _ start ( queue, stop _ event ) : while not stop _ event. is _ set ( ) : queue. _ populate ( )
[ -0.3116377592086792, -0.42116764187812805, 0.4304617643356323, -0.32042235136032104, -0.077931247651577, 0.13156479597091675, -0.4908580780029297, -0.49774810671806335, -0.24393002688884735, 0.6833601593971252, -0.44637906551361084, -0.10993576049804688, 1.2045096158981323, 0.0204618927091...
def parse _ query ( query : list [ str ], threads : int = 1, ) - > list [ song ] : songs : list [ song ] = get _ simple _ songs ( query ) results = [ ] with concurrent. futures. threadpoolexecutor ( max _ workers = threads ) as executor : for song in executor. map ( reinit _ song, songs ) : results. append ( song ) ret...
[ -0.49341776967048645, 0.4619736075401306, 0.4680807292461395, 0.5699159502983093, 0.6870448589324951, -0.3003104031085968, -1.0588886737823486, -0.07275323569774628, 0.3657328188419342, 0.22218598425388336, -0.24630986154079437, -0.016395343467593193, -0.5350582599639893, -0.15596289932727...
def _ attributes _ deep _ copy ( self, other, flow = _ down ) : # make sure interface is ready to use d = self. _ attributes _ t _ init ( ) other _ d = { } orig _ d = other. _ attributes _ t _ init ( ) # for some reason, deep copy won't work on the'attributes'dict, so we # do it manually. use the list copy c'tor to cop...
[ -1.1122885942459106, -0.3202195167541504, 0.7986666560173035, -1.0844815969467163, -0.9413816332817078, 0.03608119115233421, -0.41662532091140747, -0.07559606432914734, 0.3313738703727722, -0.04856029152870178, -0.9083335995674133, 0.4240577220916748, 0.7284098267555237, 0.683345377445221,...
def _ _ check _ predicate _ _ ( predicate ) : supported _ predicates = ['intersects ','contains ','within ','touches ','crosses ','overlaps'] if predicate not in supported _ predicates : raise valueerror ( f'the predicate " { predicate } " is not supported by the grid'' sjoin method. the supported predicates are :'f'{ ...
[ -0.006536206696182489, 1.1771093606948853, 0.5929316282272339, 0.0688302218914032, -0.6172949075698853, 0.2355642467737198, -0.4686046838760376, 0.9731565713882446, -0.47350820899009705, 0.14257650077342987, 0.9384797811508179, -0.44152745604515076, -0.9800660014152527, 0.26677554845809937...
def startdocument ( self ) : self. parser. _ parser. startcdatasectionhandler = self. startcdatasection self. parser. _ parser. endcdatasectionhandler = self. endcdatasection
[ 0.1601962149143219, -0.5374383330345154, 0.34862035512924194, -0.9515612125396729, 0.09110846370458603, 1.461226224899292, 0.6478891372680664, 0.6051952242851257, -1.2860740423202515, -0.9707671999931335, -0.5961259603500366, 0.24568994343280792, 0.27689129114151, 0.5775346755981445, 0.4...
def normalize _ state ( psi ) : norm = np. sqrt ( np. real ( np. dot ( psi. t, psi ) ) ) return psi / norm
[ -0.20911160111427307, -0.9670151472091675, 0.25314176082611084, -0.6877301335334778, -1.3219208717346191, 0.06058948487043381, -0.2548694908618927, 0.9489781260490417, 1.5613839626312256, 0.6994349360466003, 0.5844061970710754, -0.6450040340423584, -1.086774468421936, -0.3678865432739258, ...
def plot _ curve _ with _ error _ ribbon ( mean _ response, roi, ci ='std ', error _ alpha = 0. 1, markers = none, label ='', color = none, plotax = plt ) : _ mean = np. mean ( mean _ response, axis = 0 ) _ ci = _ calc _ error ( mean _ response, ci = ci ) x = np. linspace ( roi [ 0 ], roi [ 1 ], len ( _ mean ) ) plotax...
[ 0.6452956795692444, -0.39020034670829773, 0.892661988735199, -0.5610089302062988, -0.05422716587781906, 0.6162696480751038, 0.3312419056892395, -0.09647616744041443, 0.6909168362617493, 0.38350775837898254, 0.07300057262182236, 1.3267948627471924, -0.11125829070806503, -0.8781593441963196,...
def at _ server _ cold _ stop ( ) : pass
[ -0.9705996513366699, -1.4745683670043945, 0.1859584003686905, 0.30084073543548584, -0.16814278066158295, 0.278826504945755, 0.62093585729599, 0.09966709464788437, -1.017953872680664, 0.5340767502784729, -1.4048384428024292, 0.500862181186676, -0.32522866129875183, -0.10908756405115128, -...
def show _ pie _ chart ( self, cat _ var, head _ lim = none ) : var _ count = self. df [ cat _ var ]. value _ counts ( ) if head _ lim : var _ head = var _ count. head ( head _ lim ) else : var _ head = var _ count var _ sum = var _ head. sum ( ) def convert _ to _ count ( val ) : return int ( val * var _ sum / 100 ) p...
[ 0.40840423107147217, 0.5451462268829346, 0.47036728262901306, -0.7202879190444946, -1.427089810371399, 0.030989674851298332, 0.7265280485153198, 0.035865671932697296, 0.2986214756965637, 0.02470552735030651, 0.4783341884613037, 1.0856778621673584, 0.5640370845794678, -0.029690442606806755,...
def _ iter _ pages ( self ) : # self. _ bz2 _ file. seek ( 0 ) dump = mwxml. dump. from _ file ( bz2file ( self. _ bz2 _ file ) ) for page in dump. pages : yield page
[ -0.0015171942068263888, -1.4308091402053833, 0.2247130274772644, -0.28392791748046875, -0.31831666827201843, 0.8794462084770203, -0.1958271712064743, -0.039958275854587555, -0.13577373325824738, -0.3905169367790222, 0.7577769756317139, 0.26688385009765625, -0.8580307960510254, 0.3908345699...
def shuffle _ maintain _ relation ( data _ list, label _ list, filename _ list = [ ] ) : if len ( filename _ list ) = = 0 : temp = list ( zip ( data _ list, label _ list ) ) random. shuffle ( temp ) data _ list, label _ list = zip ( * temp ) data _ list = np. asarray ( data _ list ) label _ list = np. asarray ( label _...
[ -0.36882081627845764, -0.7066650390625, 0.7339966893196106, -0.40941789746284485, 1.263584852218628, 0.47322213649749756, -0.2835480272769928, 0.7946478128433228, 0.6480487585067749, -0.19197618961334229, 0.10860596597194672, 0.8647096157073975, -1.0575177669525146, 0.8103296756744385, -...
def compress ( self ) - > typing. optional [ bool ] : return self. _ values. get ('compress')
[ 0.13619522750377655, 1.2457255125045776, 0.2783908247947693, 1.0186830759048462, 0.9124647974967957, 0.6945821642875671, 0.6371814012527466, 0.1252594143152237, -0.19692957401275635, 0.3494955897331238, -0.032188452780246735, -0.45892834663391113, -0.9982022047042847, 0.41547828912734985, ...
def peek ( self ) : # o ( 1 ) if self. root = = none : # edge case = empty queue return none return self. root. data
[ 0.20760494470596313, -0.03851562365889549, 0.9396591782569885, 0.1663093864917755, -0.8484163880348206, -0.5845483541488647, -0.4254727363586426, -1.147002935409546, 0.38945791125297546, -0.04595456272363663, 0.32753315567970276, 1.343827724456787, -0.30445143580436707, 0.2302253246307373,...
def status ( self ) : instances = [ ] vapps = self. filter ( ) for vapp in vapps : instance _ data = self. info ( vapp ) instances. append ( instance _ data ) return instances
[ -0.9385000467300415, -0.7892162799835205, 0.3633882999420166, 0.07224322110414505, -0.10335250943899155, 1.0090751647949219, -0.9848230481147766, 0.8739803433418274, 0.42899489402770996, 0.8238747715950012, -0.3418327867984772, -0.09243976324796677, 0.3602718114852905, 0.4430953562259674, ...
def generateimage ( ) : global matrix, temp, p print matrix print temp for row in range ( len ( p. fill ) ) : if ( p. fill [ row ] = ='-') : temp [ row ] = ( 1 ) else : temp [ row ] = ( 0 ) mapcellstomatrix ( ) matplotlib. image. imsave ('crossword. png ', matrix, cmap = cm. gray )
[ -0.45662930607795715, 0.6571784019470215, 0.32117825746536255, -0.05696681886911392, 0.2934527099132538, 1.05062997341156, 0.8351850509643555, 0.9917694926261902, -0.05667940899729729, 1.0889469385147095, 0.04596078395843506, -0.4157257676124573, -0.33243390917778015, 1.1717995405197144, ...
def plot _ xvariance ( self, laxis, xbl, xbr, ybu, ybd, ilg ) : if self. ig! = 1 and self. ig! = 2 : print ( " error ( xvarianceequation. py ) : " + self. errorgeometry ( self. ig ) ) sys. exit ( ) # convert nuc id to string xnucid = str ( self. inuc ) element = self. element # load x grid grd1 = self. xzn0 # load and ...
[ 0.9001821279525757, 0.08309923112392426, 1.1136412620544434, 0.10453227907419205, -0.9279372096061707, 0.36292436718940735, 0.33662858605384827, 0.37756049633026123, 0.15248437225818634, -0.08527012169361115, 0.639809787273407, 0.8103587627410889, -0.4305422902107239, -0.022626863792538643...
def default _ epsg ( self ) : return 4326
[ 0.6530770659446716, 1.0575547218322754, 0.40146684646606445, -0.31088563799858093, -0.1303938776254654, 0.8118364810943604, -0.3770395517349243, 0.028205526992678642, 0.4278733730316162, -0.1804879903793335, -0.6254749894142151, -0.6490557789802551, -0.8084349632263184, 0.42672112584114075...
def _ estimate _ f0 ( id _ ex ) : id _, ex = id _ ex beam. metrics. metrics. counter ( split, " estimate - f0 " ). inc ( ) audio = ex [ " audio " ] # copied from magenta / ddsp / spectral _ ops. py # pad end so that ` num _ frames = _ num _ secs * _ f0 _ and _ loudness _ rate `. hop _ size = _ audio _ rate / _ f0 _ and...
[ 0.41713955998420715, -0.2027522474527359, 0.6326748728752136, -0.13204313814640045, -0.08628352731466293, -0.9491736888885498, -0.05508962646126747, 0.7412147521972656, -0.36276674270629883, 0.46934568881988525, -0.7043559551239014, 0.33086270093917847, 0.07049374282360077, 1.5733759403228...
def check _ changes ( ) : allowed ='deprecation ','breaking ','change ','doc ','misc'except _ ='readme. rst ', '. gitignore'assert all ( any ( key in file. name for key in allowed ) for file in pathlib. path ('changelog. d'). iterdir ( ) if file. name not in except _ )
[ -0.059750646352767944, 0.5204620957374573, 0.46597611904144287, 0.545904278755188, -0.9640244245529175, 1.1487852334976196, -0.5485050082206726, -0.013551855459809303, -1.043107032775879, 0.4870516359806061, -0.14892032742500305, 0.5419990420341492, -0.01091837603598833, 1.2424190044403076...
def tobitstring ( val, length = 8 ) : # # create binarystr binarystr = dectobin ( abs ( val ) ) # # add zeros to the front of binarystr strlen = len ( binarystr ) leadzero = length - strlen for i in range ( leadzero ) : binarystr ='0'+ binarystr if val < 0 : binarystr = bitstr2comp ( binarystr ) return binarystr
[ -0.0561651773750782, -0.0797620639204979, 0.785386860370636, -0.12666849792003632, -0.45405107736587524, 1.1455377340316772, -0.47269734740257263, -1.0243176221847534, 0.42283010482788086, -0.16450896859169006, -0.023332996293902397, 0.2489350587129593, -0.10093503445386887, -0.26190644502...
def performdepthcharge ( self, state, thedepth ) : if self. thebackingmachine = = none : return none try : return self. thebackingmachine. performdepthcharge ( state, thedepth ) except transitiondefinitionexception as te : raise te except movedefinitionexception as me : raise me except exception as e : self. failgracef...
[ 0.1788066327571869, 0.9349815249443054, 0.7943770885467529, -0.08749621361494064, 0.3223494589328766, -0.8898420929908752, -0.6388484835624695, -0.8624229431152344, -0.015509878285229206, -0.2661517858505249, 0.542012095451355, 0.3097180128097534, -0.2346225529909134, -0.04435785114765167,...
def add _ inline ( self, regexp, fn ) : self. _ inlines. append ( ( regexp, fn ) )
[ 0.0006186745595186949, -0.2748982906341553, 0.46503859758377075, 0.2808198630809784, 0.5034303665161133, 0.09622608870267868, -0.5461386442184448, 1.683488368988037, 0.09088999032974243, -1.322256088256836, -0.8825644850730896, 0.6585862040519714, -0.4249710440635681, -1.0695953369140625, ...
def as _ python _ source ( self, tree _ list _ name = none, tree _ list _ args = none, oids = false ) : p = [ ] if tree _ list _ name is none : tree _ list _ name = " tree _ list _ % s " % id ( self ) if self. label is not none : label = "'" + self. label + "'" else : label = " none " if oids : oid _ str = ', oid = " %...
[ -0.20200426876544952, -0.6211655735969543, 0.8566374182701111, -0.7627713084220886, 0.10549626499414444, -0.3367435038089752, -0.47090983390808105, -0.15292613208293915, -0.13073493540287018, 0.9052366614341736, -0.7616127133369446, 0.43449875712394714, 0.6733112931251526, 0.92133343219757...
def spiderline ( var, value, comment = none ) : # check if var is a numeric type if type ( var ) = = type ( 1 ) : line = " x " + str ( var ) + " = " + str ( value ) + " " while len ( line ) < 11 : line + = " " line + = " ; " + comment + " \ n " else : line = " [ " + var + " ] " + value + " \ n " sys. stderr. write ( li...
[ 1.1565181016921997, -0.3286973237991333, 0.9317050576210022, -0.6192261576652527, 0.3347737193107605, 0.49287644028663635, -0.6284037828445435, -0.027552256360650063, 0.11793026328086853, -0.04056589677929878, 0.4700019359588623, 0.14191006124019623, -0.20856256783008575, -0.00586614850908...
def test _ pool _ create _ encrypted ( self ) : with kernelkey ( " test - password " ) as key _ desc : pool _ name = p _ n ( ) self. _ unittest _ command ( stratisdbus. pool _ create ( pool _ name, stratiscertify. disks, key _ desc ), dbus. uint16 ( 0 ), )
[ -0.11175025999546051, 1.0240305662155151, 0.3861435651779175, 0.3473646640777588, 1.178536295890808, 1.259830117225647, 0.07582689821720123, -0.6504963636398315, 0.020615234971046448, 0.3252207338809967, -0.6900904178619385, 0.4866357147693634, 0.021193113178014755, 0.1636684536933899, -...
def _ download _ repomds ( repos _ and _ universes : iterable [ tuple [ yumdnfconfrepo, str ] ], cfg : downloadconfig, ) - > iterator [ downloadresult ] : with threadpoolexecutor ( max _ workers = cfg. threads ) as executor : futures = [ executor. submit ( _ download _ repomd, repo, repo _ universe ) for repo, repo _ u...
[ -0.6145253777503967, 0.08253014832735062, 0.37457776069641113, -0.718981146812439, 0.2716425657272339, -0.27150794863700867, -0.6055336594581604, -0.004757421091198921, 0.05792539194226265, -0.3132907450199127, -0.019594524055719376, -0.04021068662405014, 0.24832779169082642, 0.62372225522...
def corpus _ to _ bow ( corpus, wd2idx ) : all _ features = [ ] for text in corpus : all _ features. append ( text _ to _ bow ( text, wd2idx ) ) all _ features = np. array ( all _ features ) return all _ features
[ -0.7177463173866272, -0.9720686078071594, 0.4538686275482178, 0.5914232730865479, 0.8699779510498047, -0.2777021527290344, -0.28979259729385376, 0.02769896388053894, -0.14911949634552002, 0.4003573954105377, -1.3167076110839844, 1.6085946559906006, -0.5913522839546204, 0.8772872090339661, ...
def posedart ( self, context = none, residuelist = none ) : if context = = none : context = self. nc _ context if residuelist = = none : residuelist = self. residuelist total _ diff _ list = [ ] total _ dist _ list = [ ] nc _ pos = context. getstate ( getpositions = true ). getpositions ( ) # update sim _ traj position...
[ -0.25180286169052124, -0.32724472880363464, 0.7523378729820251, -0.17180995643138885, -0.1389700174331665, 1.0251882076263428, 0.3849429190158844, 0.6408893465995789, 0.2089291661977768, 0.33735382556915283, -0.8109014630317688, -0.5531682372093201, -0.3886794149875641, 0.7757048606872559,...
def get _ worlds _ ids ( self ) : return self. _ request ( " worlds " )
[ -0.8304311037063599, 0.754335880279541, 0.24641777575016022, 1.3347526788711548, 0.6247802376747131, 0.3536640405654907, -0.4892978072166443, -0.8265873193740845, 0.06799125671386719, 0.8511864542961121, -0.5356811881065369, 1.2348698377609253, -1.5464650392532349, 0.5930033922195435, -0...
def add _ new _ operation ( calc, operation ) : if check _ integrity ( calc ) : if check _ integrity ( operation, check _ calc = false ) : for operand in operation : if operand not in calc ['operations'] : calc ['operations'] [ operand ] = operation [ operand ] else : print ('skipping % s : % s exist in calculator.'% (...
[ -0.10307351499795914, 0.5873787999153137, 0.5989802479743958, 0.3940863013267517, -0.014632657170295715, 0.8422713875770569, 0.2857981324195862, -0.3765397071838379, 0.35193973779678345, 0.31436687707901, -0.09693144261837006, -0.5695394277572632, -0.3832404315471649, -0.2573758661746979, ...
def flag _ font _ size ( textline, direction, strip _ text = " " ) : if direction = = " horizontal " : d = [ ( t. get _ text ( ), np. round ( t. height, decimals = 6 ) ) for t in textline if not isinstance ( t, ltanno ) ] elif direction = = " vertical " : d = [ ( t. get _ text ( ), np. round ( t. width, decimals = 6 ) ...
[ 0.5913236737251282, 0.3301317095756531, 0.8186174631118774, -0.809299111366272, -0.7130212783813477, -0.5921606421470642, -0.44979140162467957, 0.0691719800233841, -0.10790754109621048, 0.04633580893278122, 0.008424211293458939, 0.44180577993392944, 0.5197319984436035, 0.6676220893859863, ...
async def test _ update _ system _ data ( v3 _ server, v3 _ subscriptions _ response, v3 _ settings _ response ) : v3 _ server. get ( f " https : / / api. simplisafe. com / v1 / users / { test _ user _ id } / subscriptions? activeonly = true ", status = 200, body = v3 _ subscriptions _ response, ) v3 _ server. get ( ( ...
[ -0.1823355257511139, 0.085353784263134, 0.5973202586174011, -0.3456810414791107, 0.8642553687095642, 0.2389625906944275, -0.4069726765155792, -0.7388834357261658, 1.3186551332473755, -0.8340742588043213, -0.7771722674369812, 0.7191627025604248, -0.32937055826187134, -0.43864941596984863, ...
def form _ valid ( self, form ) : if all ( [ " id " in self. kwargs, # must be an existing instance, not creating a new one " completion _ date " in form. changed _ data, # must be an update to completion _ date self. form _ class = = actionplantaskform, # must be using a form that doesn't ask for a reason ] ) : respon...
[ 0.48236754536628723, -0.23239459097385406, 0.7567856907844543, -0.9090972542762756, -0.3116380274295807, 0.6880740523338318, 0.0263616144657135, 0.22802427411079407, 0.012991031631827354, 0.041441939771175385, 0.25041425228118896, 0.29797500371932983, 0.7618811726570129, 0.4619025588035583...
def dirname ( p ) : i = p. rfind ('/') + 1 head = p [ : i ] if head and head! ='/'* len ( head ) : head = head. rstrip ('/') return head
[ -0.7570750713348389, 0.36507537961006165, 0.7835400700569153, 0.6501337289810181, -0.5136528015136719, 0.009384718723595142, 0.6276150941848755, -0.2871432900428772, 0.7165188789367676, 0.39058640599250793, 0.6026864647865295, -0.12717652320861816, -1.0704084634780884, -1.008134365081787, ...
def test _ get _ error _ with _ normal _ dict _ syntax ( config ) : with pytest. raises ( keyerror ) : config [ " does _ not _ exist " ]
[ -0.02607993595302105, 0.5738018751144409, 0.3938688039779663, 0.5512349605560303, 0.00677866954356432, 0.42821961641311646, -0.46273329854011536, 0.8629224896430969, -0.406579852104187, 0.06434207409620285, -0.6956791281700134, 0.3748875856399536, 1.0230597257614136, 0.08935503661632538, ...
def _ _ init _ _ ( self ) : # screen setting self. screen _ width = 1200 self. screen _ height = 768 self. screen _ color = ( 230, 230, 230 ) # fighter's setting self. speed = 6 self. fighter _ limit = 3 # bullets setting self. bullet _ speed = 10 self. bullet _ height = 16 self. bullet _ width = 5 self. bullet _ color...
[ -0.660944402217865, 0.423928827047348, 0.6859451532363892, 0.48591047525405884, 1.0339837074279785, -0.6361658573150635, -0.3690982162952423, -0.7007198929786682, -0.866863489151001, 0.18745310604572296, -0.505506694316864, -0.5334480404853821, 0.4415728449821472, 1.3550136089324951, 0.6...
def weightedshiftsoptimization ( sc, regdict, numtimepoints = 10000, useperplaneprior = false, percentile = 33 ) : start = time. time ( ) getshiftoffset ( regdict ) data = regdict ['data'] sz = data. shape [ 0 ] index = np. array ( sample ( range ( sz ), numtimepoints ) ) regdict ['datamidindex'] = index datamid = data...
[ 0.28412577509880066, 0.6668190360069275, 0.8238327503204346, -0.07392022758722305, -0.12831014394760132, -0.3608947694301605, 0.28987061977386475, -0.05215222388505936, -0.04928785562515259, 0.4445468783378601, -0.03753840550780296, 0.051762670278549194, -0.173086017370224, 0.6118919849395...
def create _ manual _ finding ( self, application _ id, vulnerability _ type, description, severity, full _ url = none, native _ id = none, path = none ) : params = {'isstatic': false,'vulntype': vulnerability _ type,'longdescription': description,'severity': severity } if full _ url : params ['fullurl'] = full _ url i...
[ -0.04269859194755554, 0.13567626476287842, 0.6656211018562317, 0.7870408892631531, -0.16295269131660461, 0.7161762118339539, -0.5904499888420105, -0.10284428298473358, -0.22970640659332275, 0.11258568614721298, 0.1395130157470703, 0.6785961985588074, -0.8303669691085815, 0.3219529986381531...
def has _ label ( self, label ) : return label in self. labels
[ -0.13284581899642944, -0.19617044925689697, 0.30463287234306335, -0.0185043066740036, 0.3385311961174011, 0.8383135795593262, -1.4873186349868774, 0.34637463092803955, 0.6098372340202332, -0.15365740656852722, 0.2099296599626541, -0.132478266954422, -0.5235880613327026, 0.5781719088554382,...
def dropweirdchromosomes ( bedfile, keep = [ ], skip = 0 ) : if skip > = 20 : raise valueerror ('too many header lines!') try : bed = pd. read _ csv ( bedfile, sep ='\ t ', header = none, skiprows = skip ) except parsererror : dropweirdchromosomes ( bedfile, keep, skip + 1 ) return except emptydataerror : print ( " emp...
[ -0.3319960832595825, 0.15079094469547272, 0.907869279384613, 0.24620456993579865, -0.9110942482948303, 0.9128498435020447, 0.9688742756843567, -0.6343992948532104, -0.3914143145084381, -0.16714292764663696, -0.24000021815299988, 0.47330567240715027, -0.9046733975410461, 0.32638585567474365...
def swap _ node ( node _ type ) : try : cv. terminate ( nodes [ node _ type ] ) nodes [ node _ type ] = cv. node ( node _ type ) except keyerror : nodes [ node _ type ] = cv. node ( node _ type )
[ -0.9622063636779785, 0.39956730604171753, 0.576387345790863, -0.008054387755692005, 0.9980922341346741, 0.14555901288986206, -0.580385684967041, -0.09707509726285934, 0.31469449400901794, 0.6195816993713379, 0.039467327296733856, 1.429404854774475, -0.1943512260913849, 0.040814358741045, ...
def justdartmove ( self, context = none, residuelist = none ) : if residuelist = = none : residuelist = self. residuelist if context = = none : context = self. nc _ context stateinfo = context. getstate ( true, true, false, true, true, false ) olddartpos = stateinfo. getpositions ( asnumpy = true ) olddartpe = stateinf...
[ -1.05218505859375, -0.6104423999786377, 0.9690760374069214, 0.4567044675350189, 0.17110316455364227, 0.002641211962327361, -0.19771142303943634, 0.7067543864250183, 0.9345608353614807, 0.19857719540596008, -0.28372371196746826, -0.1260271519422531, -0.12981067597866058, 0.34372127056121826...
async def test _ subscribe _ unsubscribe _ logbook _ stream _ entities _ past _ only ( recorder _ mock : recorder, hass : homeassistant, hass _ ws _ client : websocketgenerator ) - > none : now = dt _ util. utcnow ( ) await asyncio. gather ( * [ async _ setup _ component ( hass, comp, { } ) for comp in ( " homeassistan...
[ 0.2981534004211426, 0.23618371784687042, 0.986272931098938, 0.11185978353023529, 0.40564897656440735, -0.033549487590789795, -0.24797990918159485, -0.480189710855484, -0.4597746729850769, -0.17634479701519012, -0.42643672227859497, 0.7549067139625549, 0.043021928519010544, 0.98033767938613...
def train _ and _ evaluate _ cv ( model, data, cv = 3, metrics = [ r2 _ score, mean _ squared _ error, scaled _ rmse ], ax = none ) : # train model predicted = cross _ val _ predict ( model, data [ 0 ], data [ 1 ], cv = cv ) # evaluate model print ( f'{ " = " * 100 } \ n evaluating : \ n { model } \ n { " = " * 100 }')...
[ 0.6218324899673462, 0.3268570005893707, 0.8016169667243958, 0.4252576529979706, -0.8077116012573242, 0.637356162071228, -0.10181649029254913, 0.2649586498737335, -0.745109498500824, -0.26343822479248047, -0.1234559416770935, 0.885606586933136, 0.18856564164161682, -0.37068668007850647, -...
def post ( self ) : employer = employer ( ) email = request. json ['email'] test = employer. query. filter _ by ( email = email ). first ( ) if test : return none, 404 else : employer. username = request. json ['username'] employer. email = request. json ['email'] employer. password = request. json ['password'] employe...
[ -0.5466734766960144, 0.10591506958007812, 0.9604976177215576, 0.34774652123451233, 0.29295048117637634, 0.3768809139728546, -0.27365076541900635, 0.7237077951431274, 0.4050600230693817, -0.047807157039642334, -0.9645863175392151, 0.24661418795585632, -0.7884110808372498, 0.1719112098217010...
def run _ with _ viscous _ heating ( prefix, model, n _ iter = 10, mpi = false, n _ processes = 64, overwrite = false, alpha = 0. 01 ) : from hyperion. grid import cylindricalpolargrid from hyperion. model. model _ output import modeloutput from hyperion. util. integrate import integrate from hyperion. util. constants ...
[ -0.19809584319591522, -0.07202193140983582, 0.9313077926635742, -0.29870766401290894, -0.07287661731243134, -0.10157129913568497, 0.09569540619850159, 0.21580688655376434, -0.5540054440498352, 0.3434727191925049, -0.504531979560852, 0.06670194119215012, 0.13682672381401062, 0.6972233653068...
def network _ error ( self, i, t ) : net _ err = mean _ squared _ error ( t, self. predict ( i ) ) return net _ err
[ -1.3782198429107666, -0.12383285909891129, 0.1525755226612091, -0.16899140179157257, 0.4250122010707855, 0.577972412109375, -0.138044074177742, -0.6043535470962524, -0.7060945630073547, -0.056873619556427, -0.5612428784370422, -0.48858368396759033, 0.40430113673210144, -0.12851327657699585...
def forward ( self, x ) : p, s = self. padding, self. stride x _ padded = np. pad ( x, ( ( 0, 0 ), ( p [ 0 ], p [ 0 ] ), ( p [ 1 ], p [ 1 ] ) ), mode ='constant') # check dimensions assert ( x. shape [ 1 ] - self. w. shape [ 2 ] + 2 * p [ 0 ] ) / s [ 0 ] + 1 > 0, \'height doesn \'t work'assert ( x. shape [ 2 ] - self. ...
[ 0.3074074685573578, 0.02914607711136341, 1.0985736846923828, -0.202837273478508, -0.7168022990226746, -0.13727527856826782, 0.5142146348953247, 0.06779465079307556, 0.5317673683166504, -0.07516814768314362, 0.030991962179541588, 0.4962526261806488, -0.3581252992153168, 0.9699722528457642, ...
def _ _ init _ _ ( self, email, password ) : self. gd _ client = gdata. contacts. client. contactsclient ( source ='googleinc - contactspythonsample - 1') self. gd _ client. clientlogin ( email, password, self. gd _ client. source )
[ 0.566453754901886, -0.4046795070171356, 0.319388210773468, -0.22222191095352173, -0.38519662618637085, 0.5968980193138123, 0.2975125014781952, -0.082081638276577, -0.17008858919143677, -0.06851840764284134, 0.08939042687416077, 1.0621252059936523, -0.11017116904258728, -0.2877199947834015,...
def parse _ protein ( self, details ) : for regex in hgvsregex. pep _ allele _ regexes : match = re. match ( regex, details ) if match : groups = match. groupdict ( ) # parse mutation type. if groups. get ('delins') : self. mutation _ type ='delins'else : self. mutation _ type ='>'# parse coordinates. self. start = int...
[ -0.3334224224090576, -0.02923252061009407, 0.5671880841255188, 0.1588403284549713, 0.16405002772808075, 0.06144525483250618, -0.9285795092582703, 0.18908806145191193, -0.18773305416107178, -0.5208408236503601, -0.011117164976894855, 0.42575815320014954, 0.2517082691192627, 0.03118861652910...
def _ arguments _ types ( cls ) : return {'name': co. basicoption ( str, none ),'base': co. basicoption ( str ),'target': co. basicoption ( str ),'base _ points': co. listofoptions ( co. point2option ( ) ),'target _ points': co. listofoptions ( co. point2option ( ) ),'snap': co. basicoption ( str,'no'),'btypes': co. ba...
[ -0.5801384449005127, -0.4720376431941986, 0.4090624451637268, -1.3225605487823486, 0.30170050263404846, -0.08390650153160095, -0.3017945885658264, -0.6951433420181274, -0.8374857306480408, 1.0812315940856934, -0.9994103312492371, 0.043692588806152344, 0.1532738357782364, 0.2971083819866180...
def nextmove ( self ) : move = [ ] # multi step front = self. frontfree ( ) if ( self. checkfree ( [ 1, 2, 3, 0 ], self. robot. center ) ) : self. robot. movebot ( right ) move. append ( right ) front = self. frontfree ( ) for i in range ( front ) : self. robot. movebot ( forward ) move. extend ( [ forward ] * front ) ...
[ -0.22590897977352142, 0.4601224362850189, 0.9668368697166443, 0.6844428777694702, -0.731026828289032, -0.11013928055763245, -0.5409892797470093, -0.5031501054763794, 0.4105704426765442, 0.3565673828125, -0.38492321968078613, -0.6652064919471741, -0.5431998372077942, 0.7338568568229675, 0...
def get _ train _ examples ( self, data _ dir ) : raise notimplementederror ( )
[ -0.7547492384910583, 0.899193286895752, 0.48262819647789, 0.3425503671169281, 0.5266031622886658, 0.24091272056102753, 0.057731468230485916, 0.7492489218711853, -0.44240888953208923, -0.15484628081321716, -1.1322276592254639, 0.9974845051765442, 0.9843255877494812, 0.15542025864124298, -...
def _ _ init _ _ ( self, filename ) : self. filename = filename self. basename = os. path. basename ( filename ) self. _ parse _ parameter _ file ( ) self. _ set _ units ( ) self. _ field _ data = fieldcontainer ( self ) self. _ node _ io = self. _ tree _ field _ io _ class ( self ) self. _ root _ io = self. _ root _ f...
[ 0.09122583270072937, -0.16417865455150604, 0.5960826873779297, -0.12039635330438614, 0.8215692639350891, 0.3130568265914917, 0.919946551322937, 0.15577976405620575, -0.9246371984481812, -0.2906043231487274, -0.3506738543510437, 0.025368254631757736, 0.5904982089996338, 0.923160970211029, ...
def msd ( coord, r _ 0, coord _ loc = [ 3, 6 ] ) : msd _ list = [ ] for key in coord : r _ curr = coord [ key ] r _ curr. sort _ values ( by = ['id'], inplace = true ) r _ curr = r _ curr. iloc [ :, coord _ loc [ 0 ] : coord _ loc [ 1 ] ]. values dist = r _ curr - r _ 0 dist = np. square ( dist ) dist = np. sum ( dist,...
[ 0.4188961386680603, -0.7738879919052124, 0.6627411246299744, -0.43379613757133484, -0.12371446937322617, 0.22587455809116364, 0.14134229719638824, 0.3803750276565552, -0.04200509935617447, 0.8335572481155396, -0.22736547887325287, -0.22335104644298553, 0.5678876042366028, 1.032314181327819...