text
stringlengths
25
2.19k
embedding
listlengths
768
768
def kinetic _ grad ( self, p ) : m = self. mass return 1. 0 / m * p
[ 0.03478405997157097, 0.03451346978545189, 0.4410926401615143, -0.26366618275642395, -0.7042819857597351, 1.1770281791687012, -0.22859765589237213, 0.7500850558280945, -1.138476014137268, -0.2102472186088562, 0.42854857444763184, -0.31206217408180237, -1.0461442470550537, 0.4912379682064056...
def calc _ iffilt _ ratio _ reg ( self, model ) : target _ ratio = model. vars. iffilt _ ratio. value # find smallest ratio that is larger than the target ratio best _ error = 9e9 for index, ratio in self. iffilt _ ratio. iteritems ( ) : error = abs ( target _ ratio - ratio ) if error < best _ error : best _ error = er...
[ 0.010291120037436485, 0.566105842590332, 0.5661718249320984, 0.08013365417718887, 0.9427700042724609, -0.6346182823181152, 0.6682249307632446, -0.09360572695732117, -0.6845307946205139, -0.27001410722732544, 0.1881859302520752, -0.3275322914123535, -0.9054076671600342, -0.22636893391609192...
async def get _ message _ in ( self ) - > message : val = await self. _ _ q _ in. get _ async ( ) if isinstance ( val, processshutdownmessage ) : # put the message back again await self. _ _ q _ in. put _ async ( val ) raise processshutdownexception return val
[ -0.49236515164375305, 0.5262064337730408, 0.42816442251205444, 0.11364580690860748, 0.36305394768714905, -0.08681759983301163, -0.11448870599269867, -0.8108453750610352, 0.004426675383001566, -0.8642981648445129, 1.868174433708191, 0.7791003584861755, -1.4540982246398926, -0.25672969222068...
def set _ quick _ update ( self, state ) : return self. set _ option ( 4, 0x01 if state else 0 )
[ 0.030314141884446144, 0.1831841617822647, 0.316709965467453, 0.439410537481308, 0.3301582932472229, -0.4203414022922516, 0.021268878132104874, -0.5415047407150269, 1.0950517654418945, -0.7715685367584229, -0.8150255084037781, -0.5122645497322083, -0.4509284496307373, -0.2520700991153717, ...
def valid _ clean _ h5 ( request, symbol ) : logger. info ('start cli for clean _ valid : % s'% symbol ) os. system ( " start cmd / k python data / manage. py valid _ clean - - symbol = % s " % symbol ) return redirect ( reverse ('admin : manage _ underlying ', kwargs = {'symbol': symbol } ) )
[ -0.4045030474662781, 0.08684886246919632, 0.44611307978630066, 0.3738383948802948, -0.11317562311887741, 0.6402149200439453, 1.3922042846679688, -0.23109884560108185, -0.2696893513202667, -0.1737075001001358, 0.1181395873427391, 1.195573091506958, 0.6712180972099304, -0.03692920506000519, ...
def test _ routedefault ( self ) : component1 = xmlpipe ( ) s2s = xmlpipe ( ) router = component. router ( ) router. addroute ('component1. example. org ', component1. sink ) router. addroute ( none, s2s. sink ) outgoing = [ ] s2s. source. addobserver ('/ * ', lambda element : outgoing. append ( element ) ) stanza = do...
[ -0.08028639853000641, 0.19420863687992096, 0.5659250617027283, 0.05871572718024254, 0.9305900931358337, 0.035975463688373566, 0.02738315425813198, 0.48779869079589844, -0.19143415987491608, -0.3661138415336609, -0.9361074566841125, -0.074294313788414, 0.026679495349526405, 0.27397406101226...
def topods _ compsolid ( * args ) : return _ topods. topods _ compsolid ( * args )
[ 0.3946705162525177, -0.5493392944335938, 0.3711758852005005, -0.7190718650817871, -0.12180411070585251, 0.9528887271881104, 0.873430609703064, -1.084647297859192, 0.6661940217018127, -0.32141607999801636, 0.027014009654521942, -0.045852553099393845, -0.9258147478103638, 0.25426164269447327...
def test _ subbox _ 2d ( ) : topo, cub = check _ subset ( discr3d, xdef, [ 0., 0. 2, 0. 8 ] ) velo = field ( domain = topo. domain, is _ vector = true, formula = v3d, name ='velo') vd = velo. discretize ( topo ) velo. initialize ( topo = topo ) i0 = cub. integrate _ field _ allc ( velo, topo ) vref = np. prod ( cub. re...
[ 0.9407451748847961, 1.0463916063308716, 0.6193446516990662, 0.7033557891845703, 0.5474543571472168, 0.8517606258392334, 0.3337419033050537, 0.12534169852733612, -0.06554969400167465, -0.903883159160614, -0.8345574736595154, 0.23727568984031677, -0.013132117688655853, 0.2702774703502655, ...
def getuserpath ( self, username ) : message = dict ( ) if username! = none and not ( self. checkuserexists ( username ) ) : message [ " success " ] = false message [ " error " ] = " username doesn't exist. " return ( json. dumps ( message ) ) recently = ( datetime. datetime. utcnow ( ) - datetime. timedelta ( minutes ...
[ -1.0630183219909668, 0.38406914472579956, 0.7422890067100525, -0.24706098437309265, -0.6231829524040222, 0.10516072064638138, 0.8579984903335571, -0.25098735094070435, -0.41127273440361023, 0.4591774344444275, -0.7795923948287964, -0.7637819051742554, -0.24957478046417236, 0.62139701843261...
def was _ deleted ( self ) : return self. _ _ deleted
[ 0.8331542611122131, -0.3325599133968353, 0.5121299624443054, -0.5196768641471863, 0.597011148929596, 0.7922090888023376, 0.0864500179886818, 0.014916092157363892, 1.2156933546066284, -1.1970484256744385, -0.6331979036331177, 0.6568929553031921, 0.3549835979938507, -0.7008290886878967, -0...
def list _ model _ builders ( cls, context ) : yield'' for method _ name in cls. all _ method _ names : try : method = cls. find _ single _ method ( method _ name ) if not method. is _ action or not method. is _ static : continue meta = meta _ module. aggregate _ meta ( method, context ) is _ builder = meta. get ('io. ...
[ 0.07022512704133987, 0.2820567190647125, 0.7620313763618469, 1.4806445837020874, 0.20742477476596832, 0.15892744064331055, -0.39369693398475647, -0.09915292263031006, 0.4503708779811859, 0.6996131539344788, -0.32699915766716003, 0.14891231060028076, 0.23610468208789825, 0.9979802370071411,...
def mock _ requests _ get _ latest _ savu _ doi ( * args, * * kwargs ) : zenodo _ mock _ resp ='https : / / zenodo. org / record / 5095360'return mock. mock ( * * {'url': zenodo _ mock _ resp } )
[ -0.8892777562141418, 0.007547823712229729, 0.4686862826347351, -0.3004348874092102, 0.8843005299568176, -0.3028356730937958, 0.34990963339805603, 0.20741508901119232, 0.6115026473999023, -0.15072369575500488, 0.026874173432588577, 0.47246643900871277, -0.044555846601724625, -1.005348086357...
def before _ train _ iter ( self, runner ) : curr _ step = runner. iter if curr _ step > self. start _ decay and curr _ step % self. interval! = 0 : return model = runner. model if is _ module _ wrapper ( model ) : model = model. module # we warm up the momentum considering the instability at beginning momentum = min (...
[ -0.4046735167503357, -0.6146959662437439, 0.6618673801422119, 0.03709699586033821, -0.2923319339752197, 0.09677480906248093, 1.1897536516189575, -0.08983097225427628, 0.0529378242790699, -0.1280432641506195, 0.34247463941574097, 0.09642395377159119, -0.4281615912914276, 1.5062007904052734,...
def check _ for _ cancel ( self, msg _ to _ cancel : message ) : id _ to _ cancel = msg _ to _ cancel. msg _ id # attempt to find message in q _ cancel found _ msg = false msgs = [ ] while true : try : val = self. _ _ q _ cancel. get _ nowait ( ) except queue. empty : # keep going until queue is drained break if val = ...
[ 1.02274489402771, -0.3365038335323334, 0.7465452551841736, -0.1278315782546997, 0.1363191306591034, -0.4726084768772125, -0.36327892541885376, -0.23873421549797058, -0.9917933940887451, 0.11606011539697647, 0.5743684768676758, -0.08366967737674713, -0.13023798167705536, 1.19896399974823, ...
def setup ( self ) : with patch ( " bookwyrm. suggested _ users. rerank _ suggestions _ task. delay " ), patch ( " bookwyrm. activitystreams. populate _ stream _ task. delay " ), patch ( " bookwyrm. lists _ stream. populate _ lists _ task. delay " ) : self. local _ user = models. user. objects. create _ user ( " mouse ...
[ 0.13132239878177643, -0.4512791335582733, 0.6480622291564941, 0.9052732586860657, 0.3669629991054535, 1.0892398357391357, 0.528134286403656, 0.34068405628204346, -0.273050457239151, 0.5557847023010254, -0.930069088935852, 0.14045242965221405, -0.2361425757408142, 0.9044190049171448, -0.4...
def testtwo ( self ) : expected _ output = ('python starboard / tools / testing / test _ runner. py'' - - platform my _ platform - - config my _ config'' - - target _ name nplb - - target _ name nb _ test') argv = ['nplb ','nb _ test'] cmd _ str = run _ tests. _ resolvetrampoline ( argv = argv ) self. assertequal ( exp...
[ 0.5121986865997314, -0.038796886801719666, 0.6485035419464111, 0.006853683385998011, 1.3802130222320557, 0.20799940824508667, 0.31038862466812134, -0.6852424144744873, -1.3811858892440796, -0.8483728170394897, -0.5522679090499878, 0.05845611169934273, -0.17204810678958893, 0.15837714076042...
def generatediagram ( self, rootnode, currentnode ) : # add nodes to edges to graph self. creategraph ( rootnode, currentnode ) # show the diagram self. graph. write _ png ('graph. png') img = mpimg. imread ('graph. png') f = pl. figure ( ) # draw search tree f. add _ subplot ( 1, 3, 1 ) pl. imshow ( img ) pl. axis ('t...
[ 0.4390949308872223, 0.258903831243515, 0.9106166958808899, -0.2316180318593979, -0.1460231989622116, 0.9128321409225464, 0.22030413150787354, 1.1451095342636108, 0.3590022921562195, -0.0511222742497921, 0.3757607042789459, 1.015095829963684, 0.26953086256980896, -0.35846570134162903, 0.8...
def det ( self ) : return self. _ det
[ 1.0604536533355713, -0.26311978697776794, 0.31963297724723816, 0.40145549178123474, -0.037851665169000626, 1.2562845945358276, 0.9058594107627869, -0.7618253827095032, 0.048783063888549805, -1.7063747644424438, -0.17526774108409882, -0.4883841574192047, -0.020114118233323097, -0.3155586123...
def movepossible ( self, direction ) : if self. neighbors [ direction ] : return 1
[ -1.6651066541671753, 0.17738059163093567, 0.4122440814971924, 0.23284384608268738, -0.14000189304351807, 0.2702712416648865, -0.018310053274035454, -0.1906595230102539, -0.007744630333036184, 0.3226088583469391, 0.3023745119571686, -0.05350237339735031, -0.6276973485946655, 0.5686231255531...
def add _ variations ( msg ) : y = re. sub ('- ( \ d {, 2 } ) ','decreased \ \ 1 ', msg ) y = re. sub ('\ + ( \ d {, 2 } ) ','increased \ \ 1 ', y ) return y
[ 0.1977693736553192, -0.13353846967220306, 0.6169849038124084, -0.6749661564826965, 0.3205001652240753, 0.21213966608047485, 0.055996134877204895, 0.0015752564650028944, 0.23923254013061523, -1.0123686790466309, -0.2890123426914215, 0.4997657537460327, -0.15708491206169128, 0.49782744050025...
def deal ( self, incident _ entry _ df ) : # deal with data predicted _ incident _ entry _ df = self. incidentwrapper. getpredictedincidententry ( incident _ entry _ df ) training _ entry _ df = self. incidentwrapper. keeptrainingcols ( predicted _ incident _ entry _ df ) general _ entry _ df = self. incidentwrapper. k...
[ -0.3539556860923767, 0.021223239600658417, 0.6276126503944397, 0.0323033481836319, 0.5703136920928955, 0.6897941827774048, 0.8661476373672485, 0.23275186121463776, -0.14923697710037231, -0.0892527848482132, 0.4091898500919342, -0.159065380692482, -0.47919145226478577, -0.918782114982605, ...
def embedded _ groups ( self ) : emb = [ embeddedgroup ( group, target _ width = self. window _ size [ 0 ] ) for group in self. group. subgroups ] # buttonize title for display in emb : menubutton. buttonize ( display. widgets [ 0 ], controlpv = self. group. pv ) return emb
[ -0.3060232400894165, -0.09512156993150711, 0.46142083406448364, 0.5185613632202148, -0.5022501945495605, 0.8528250455856323, -0.005342726595699787, -0.22643524408340454, 0.5764082670211792, -0.5012372136116028, 0.4306189715862274, -0.18026843667030334, -0.9245770573616028, 0.91625744104385...
def nouns _ adj _ spacy ( self, doc ) : for chunk in doc. noun _ chunks : adjs = [ ] chunk _ list = [ i. string for i in chunk ] chunk _ text ='' for item in chunk _ list : chunk _ text = " " + chunk _ text + str ( item ) ind = 0 for chunk _ part in chunk : if chunk _ part. pos _ = ='adj': lemma = self. lemmatize _ chu...
[ 0.556378185749054, -0.357906699180603, 0.5625598430633545, -1.694408655166626, -0.6079407930374146, 0.041488055139780045, -0.8869273662567139, 0.16441313922405243, -0.16080467402935028, 0.29166778922080994, 0.05140433460474014, -0.20573820173740387, 0.07409776747226715, 0.9883341193199158,...
def test _ processflow _ with _ inplace _ data ( self ) : print'\ n'print _ line ('- - - - starting test : { } - - - - '. format ( inspect. stack ( ) [ 0 ] [ 3 ] ),'ok') config _ path = os. path. join ( os. getcwd ( ),'tests ','test _ configs ','test _ amwg _ complete. cfg') config = configobj ( config _ path ) testarg...
[ 0.7775603532791138, -0.12305452674627304, 0.7560147047042847, -0.6901681423187256, 0.2622171640396118, 0.8595678210258484, 1.0779640674591064, 0.412247896194458, -0.3398571014404297, -0.10941214859485626, -0.29599812626838684, 0.051968496292829514, -0.80985027551651, 0.8455873727798462, ...
def supp ( self, x ) : if not ( all ( x [ 0 : 2 ] > 0 ) ) : return false # # # e or a not positive indx = 2 for i, md in enumerate ( self. mdlist ) : # # # # # # # # # # # # # # # # # # # a e s if not ( md. supp ( x [ indx : ( indx + md. n ) ] ) ) : return false # self. e [ i ] = x [ indx + 1 ] indx = indx + md. n retu...
[ -0.8194324374198914, 0.5476135015487671, 0.6535840630531311, -0.027074409648776054, -0.9631064534187317, 0.6895759701728821, -0.33326950669288635, 1.1095994710922241, 0.26251301169395447, 0.031857993453741074, -0.9489821195602417, -0.16164885461330414, -0.1280829757452011, 0.76555544137954...
def measurements ( self, input _ measurements ) - > dict [ str, measurement ] :
[ -1.0945546627044678, 0.04334549605846405, 0.04833965376019478, -0.04825914651155472, -0.5100725293159485, 0.002960288431495428, -0.28994372487068176, -0.24887771904468536, 0.2475280463695526, 0.06972745805978775, -0.3505019247531891, -1.083560585975647, 0.20864243805408478, 1.2529954910278...
def test _ available _ languages _ initial _ for _ create ( self, mock _ sync ) : form = self. form _ class ( instance = none ) self. assertequal ( form. fields ['available _ languages']. initial, [ ] )
[ 0.3656926453113556, 0.32404786348342896, 0.2917734682559967, -0.48532894253730774, 1.131547451019287, 1.4279536008834839, 0.179552361369133, 0.7673562169075012, -0.5079402327537537, -0.3666436970233917, -1.2898247241973877, -0.706026554107666, 0.3301653265953064, 0.9007053971290588, 0.30...
def _ read _ formatted ( file : binaryio ) - > any : data _ format = str. join ('', list ( _ read _ data _ format ( file ) ) ) data _ format = dataformat ( data _ format. lower ( ) ) return deserialization. deserialize ( file, data _ format )
[ 0.36335644125938416, -1.14291250705719, 0.530493974685669, -0.8273712396621704, -0.44381824135780334, -0.0719476193189621, -1.0851041078567505, -0.16658566892147064, -0.856662392616272, -0.6548930406570435, 0.21990887820720673, 0.10288134962320328, -0.17341051995754242, -0.1210991069674491...
def dice _ coef _ loss ( y _ true, y _ pred ) : return 1 - dice _ coef ( y _ true, y _ pred )
[ -0.4264419376850128, -1.2780336141586304, 0.34716859459877014, 0.10991456359624863, -0.8669273257255554, -0.1582307070493698, 0.6182044148445129, 0.37737399339675903, 0.1852584332227707, 0.30583325028419495, -0.29143860936164856, 1.5993212461471558, 0.5037427544593811, -0.08771833032369614...
def update _ collection _ state ( self, resource _ type, hour, state, domain _ id ) : updated _ at = datetime. utcnow ( ) - timedelta ( hours = hour ) query = {'filter': [ {'k':'updated _ at ','v': updated _ at,'o':'lt'}, {'k':'domain _ id ','v': domain _ id,'o':'eq'}, {'k':'collection _ info. state ','v': ['disconnect...
[ -0.7704605460166931, -1.273788571357727, 0.5415435433387756, -0.7658202648162842, 0.013287060894072056, 0.6218817830085754, -0.13040383160114288, -0.8776768445968628, -0.3835080564022064, 0.21263357996940613, -0.23390060663223267, 0.21936734020709991, 0.1753251701593399, 0.4169169664382934...
def get _ nodes _ specs ( positions, metadata, barcodes, communities, community _ col ='community ', other _ cluster _ col = none, palette = none ) : layout = pd. dataframe ( positions, index = ['xs ','ys'] ). t layout [ community _ col ] = communities layout [ community _ col ] = f'{ community _ col } # '. capitalize ...
[ 0.2686711251735687, 0.36081603169441223, 0.36695969104766846, -0.7007564902305603, 0.4363134205341339, -0.440692663192749, 0.12079045921564102, -0.26686352491378784, -1.5333529710769653, -0.22436556220054626, 0.9851769804954529, 0.17519740760326385, 0.5918075442314148, -0.939384400844574, ...
def test _ serve _ build _ type _ xml ( self ) : pass
[ -0.5187187790870667, -0.09919019043445587, 0.31134966015815735, 1.0441287755966187, 0.41597607731819153, 1.360504388809204, 1.6390515565872192, -0.19776907563209534, -0.4724869728088379, -0.8943235874176025, -0.7508342266082764, 0.6437970995903015, -1.1619126796722412, 0.23379254341125488,...
def form _ valid ( self, form ) : self. object = form. save ( commit = false ) self. object. creator _ id = self. request. user. id self. object. save ( ) return super ( mapnew, self ). form _ valid ( form )
[ -0.6138899922370911, -0.7318700551986694, 0.4465571641921997, 0.7863726019859314, -0.019000982865691185, 0.9453272223472595, -0.2147960364818573, 0.2833707630634308, -0.7214810848236084, -0.9926106333732605, -0.8455675840377808, -0.6064052581787109, 1.1172559261322021, 0.24378833174705505,...
def drop _ table ( ) : query ='drop table if exists nba _ players'try : conn = psycopg2. connect ( dsn = db _ dsn ) cur = conn. cursor ( ) cur. execute ( query ) conn. commit ( ) except psycopg2. error as e : print e. message else : cur. close ( ) conn. close ( )
[ -0.2772856056690216, 0.13868112862110138, 0.9178761839866638, 0.34443679451942444, 0.8228617310523987, -0.0862114205956459, 0.07997681200504303, -0.3022843599319458, -1.0625218152999878, 0.7581561803817749, 0.5469104051589966, 0.21819432079792023, -0.7250627279281616, 0.21886904537677765, ...
def _ mgui _ set _ step ( self, value : float ) : self. _ update _ precision ( step = value ) val = self. _ pre _ set _ hook ( value ) self. _ qwidget. setsinglestep ( val )
[ 0.094220370054245, 0.574828028678894, 0.3570287227630615, 0.4207402169704437, -0.03519675135612488, 0.7340463995933533, 0.41660070419311523, -0.12877149879932404, -0.8900803923606873, -0.7137578129768372, -0.3705483078956604, -0.7218555808067322, 0.4601663649082184, 1.489701747894287, 0....
def sensitivity _ kdist _ plot ( df, fname, preds1 ='nupop _ ncp ', preds2 ='nuclstm _ ncp ', figsize = ( 8, 6 ) ) : reqd _ cols = [ preds1, preds2,'nucleosome'] check = check _ dataframe _ validity ( df, reqd _ cols = reqd _ cols ) sub _ df = df [ reqd _ cols ] n _ nucs = sub _ df ['nucleosome']. sum ( ) pad _ lens = ...
[ 0.9727630019187927, 0.48827794194221497, 0.7348458766937256, -0.17415916919708252, -0.5455901026725769, 1.2588696479797363, 0.6867935657501221, -0.06355708837509155, -0.1789521723985672, 0.8568081259727478, -0.9171587824821472, 0.9871423244476318, -0.0827459767460823, 0.26715072989463806, ...
def test _ check _ array _ type ( ) : test _ obj = uvtest ( ) test _ obj. floatarr = test _ obj. floatarr + 1j * test _ obj. floatarr pytest. raises ( valueerror, test _ obj. check )
[ 0.28276824951171875, 0.4944117069244385, 0.598421037197113, 1.1653608083724976, 0.611203670501709, 0.5149745345115662, 1.0527366399765015, -0.26986974477767944, 0.8074197769165039, -0.09076102823019028, 0.07416746765375137, 0.05505746230483055, -0.5530431270599365, 1.4606170654296875, 0....
def compare _ dust _ creation ( z _ list, dust _ species, data _ dirc, fire _ ver = 2, style ='color - linestyle ', foutname ='creation _ routine _ compare. png ', reload = false ) : # first create ouput directory if needed try : # create target directory os. mkdir ( data _ dirc ) print ( " directory " + data _ dirc + ...
[ 0.22886493802070618, 0.24029947817325592, 0.7826976776123047, 0.4635460376739502, 0.2809162735939026, 0.2218753844499588, 1.6059679985046387, -0.038011129945516586, -0.15929920971393585, -0.08950664103031158, -0.7720776200294495, 0.4000433385372162, 0.5006347894668579, 0.6836854219436646, ...
def _ _ init _ _ ( self, alpha = np. nan, theta = np. nan, gamma = np. nan, name ='unknown') : self. alpha = float ( alpha ) self. theta = float ( theta ) self. gamma = float ( gamma ) self. mu = self. alpha / self. gamma # this is a reparametrisation self. lambd = self. alpha * * 2 self. name = name
[ 0.5347968935966492, -0.6521978974342346, 0.6492921113967896, -0.638105034828186, -0.14763404428958893, 0.5082482695579529, -0.4459311366081238, 0.6908456087112427, -0.411838561296463, 0.139657124876976, -0.556074321269989, 0.4186413288116455, -0.15766818821430206, 0.9688082933425903, 0.4...
def read _ ip _ table ( ) : dict _ ip = { } with open ('ip. csv') as f : reader = csv. reader ( f, delimiter = ',') for row in reader : dict _ ip [ row [ 0 ] ] = row [ 1 ] return dict _ ip
[ -1.0364662408828735, -0.4193626046180725, 0.3162072002887726, -0.2076655626296997, -1.7948932647705078, 0.2657932639122009, -0.8252575397491455, 1.1163491010665894, -1.0981310606002808, 1.0617244243621826, 0.26396167278289795, -0.4148746132850647, 0.5753991603851318, -1.8694474697113037, ...
def displaysystemclickablewhisper ( self, fromid, chatstring, whispertype ) : sender = none sfx = self. soundwhisper # a message from clarabelle about the catalog if fromid = = ttlocalizer. clarabelle : chatstring = ttlocalizer. clarabelle + " : " + chatstring # play the phone ring sound instead of the pssst sfx = self...
[ 0.3612807095050812, -0.41114822030067444, 0.6517846584320068, -0.24866142868995667, -0.4591292440891266, -0.07412166148424149, 0.5448275208473206, -0.3490470349788666, 0.29177650809288025, -0.23787203431129456, 0.3152880072593689, 0.9073156118392944, -0.2939913272857666, 0.9117133021354675...
def addvalue ( self, device, value, element ) : self. _ _ new _ values. put ( ( device, value, element ) ) return element
[ -0.6279816627502441, 0.7090292572975159, 0.4278656244277954, 1.0202646255493164, -0.40835022926330566, 0.9782482385635376, -0.5038240551948547, -0.778857946395874, 0.3532869815826416, -0.9921455383300781, 0.15453898906707764, 0.3717016279697418, -0.783755362033844, 0.2692388594150543, 0....
def match _ platform ( self, block ) : return self. _ match _ system ( block, " if _ platform ", self. platforms, " platform " )
[ -0.24664278328418732, 0.5698919892311096, 0.23532234132289886, 1.4205530881881714, -0.08322907239198685, -0.46700799465179443, 0.6443213224411011, -0.7387485504150391, -0.7584007978439331, 0.22813118994235992, -0.175604909658432, -0.7172712683677673, -1.7087280750274658, 1.3786206245422363...
def testupdatevaluesforquerieswithsearcherror ( self ) : value = tagpathandvalue ( u'username / unknown ', 2600 ) items = [ ( u'has fluiddb / id ', [ value ] ) ] schema = valuesqueryschema ( items ) with login ( u'username ', uuid4 ( ), self. transact ) as session : deferred = self. facade. updatevaluesforqueries ( ses...
[ -0.505382239818573, 0.3083370625972748, 0.3203815221786499, 0.07900628447532654, 0.11122898012399673, 0.5091984272003174, -0.5538964867591858, -0.12705010175704956, -0.30346548557281494, -0.5658432245254517, -0.5142401456832886, -0.6595519781112671, -0.07551107555627823, 0.5152031183242798...
def test _ create _ client ( self, context ) : # these could come from a data file id = " clientswithalldetails " name = " client with all details " # define a test step with pytest. allure. step ( " create client ` { } ` ( { } ). ". format ( name, id ) ) : # create a place in context. status for storing clients if'cli...
[ 0.8311222791671753, -0.03311341628432274, 0.6403064131736755, -0.11886462569236755, 0.25493451952934265, 0.7917988300323486, 0.631652295589447, -0.05707567557692528, 0.33671119809150696, -0.47830912470817566, -0.4638686776161194, 0.37187090516090393, -0.18624518811702728, -0.12741044163703...
def temporarily _ as _ root ( setenv = true ) : return _ set _ uids ( true, false, setenv = setenv )
[ -0.3282034695148468, -0.3031303286552429, 0.47383707761764526, 0.6048457026481628, -0.302899032831192, 0.652305006980896, 0.2332264631986618, -0.3315522074699402, 0.7090374827384949, 0.22664232552051544, -0.4310241937637329, 1.530286431312561, -0.8189663887023926, 0.6232470870018005, -0....
def alndtaread ( filename ) : nbabstracts = set ( ) dtaalignments = { } f = open ( filename, " r " ) currentkey = none sentcount = 0 for i, line in enumerate ( f. readlines ( ) ) : if line. startswith ( " curid = " ) : parts = line. strip ( ). split ( ) currentkey = parts [ 0 ]. split ( " curid = " ) [ 1 ] + ". " + par...
[ -0.4057363271713257, -1.1943849325180054, 0.9663916826248169, -1.5887775421142578, -1.2805570363998413, -0.22141626477241516, 1.0548598766326904, -0.09555590152740479, -0.8047776818275452, 0.6842398643493652, 0.3918333947658539, -0.09200552105903625, 0.31939834356307983, -0.040333051234483...
def getcoverage ( self, identifier = none, bbox = none, time = none, format = none, crs = none, width = none, height = none, resx = none, resy = none, resz = none, parameter = none, method ='get ', * * kwargs ) : if log. isenabledfor ( logging. debug ) : msg ='wcs 1. 0. 0 debug : parameters passed to getcoverage : iden...
[ -1.1992887258529663, -0.5978797674179077, 1.0764904022216797, -0.217451274394989, -0.36642420291900635, -0.5426852107048035, -0.1384492665529251, -1.1261783838272095, 0.6881759762763977, 0.023870250210165977, 0.28203490376472473, 0.7036186456680298, -0.21008259057998657, 0.655767560005188,...
def test _ nfc _ wps _ config _ token _ init ( dev, apdev ) : ssid = " test - wps - nfc - conf - token - init " hapd = hostapd. add _ ap ( apdev [ 0 ], { " ssid " : ssid, " eap _ server " : " 1 ", " wps _ state " : " 1 " } ) logger. info ( " nfc configuration token from ap to station " ) conf = hapd. request ( " wps _ ...
[ -0.484762579202652, -0.050284091383218765, 0.3005707263946533, -0.3462635278701782, 0.09617801755666733, 0.2472456842660904, -0.15276148915290833, 0.3701413571834564, -0.2610839307308197, -0.09600681811571121, -0.371229887008667, -0.2819201350212097, 0.6772456169128418, 0.4624275267124176,...
def validateclinical ( clinicalfilepath, oncotree _ mapping, sampletype _ mapping, ethnicity _ mapping, race _ mapping, sex _ mapping, clinicalsamplepath = none ) : print ( " validating clinical file " ) clinicaldf = pd. read _ csv ( clinicalfilepath, sep = " \ t ", comment = " # " ) clinicaldf. columns = [ col. upper ...
[ 0.269001305103302, -0.5631687641143799, 0.8054537773132324, -0.6083473563194275, -0.5159703493118286, 0.20323647558689117, 0.5600333213806152, 0.8448125720024109, -0.5948377251625061, 0.13043703138828278, 0.6241952776908875, 0.019751423969864845, 0.09331117570400238, 0.8026790618896484, ...
def get _ disclaimer _ html ( self ) : path = self. config. server. disclaimer if os. path. exists ( path ) : with open ( path,'r') as fp : return fp. read ( ) else : logging. warning ( f " disclaimer file from config { path } is set but not available " ) return " "
[ 0.6296057105064392, 0.164558544754982, 0.4767940938472748, 0.18447710573673248, -0.9255873560905457, 0.4766876697540283, -0.2261102944612503, 0.7933126091957092, -0.6635353565216064, 0.5631551742553711, 0.5033224821090698, 0.40718328952789307, -0.37756258249282837, 0.9014353156089783, 0....
def convert _ unit _ indicator ( cunit ) : try : cunit = cunit. lower ( ) if cunit = ='degc'or cunit = ='c': tchk = 1 elif cunit = ='degf'or cunit = ='f': tchk = 2 elif cunit = ='psia': tchk = 3 else : tchk = 0 except : tchk = 0 return tchk
[ -1.0213782787322998, -0.4912714660167694, 0.527912974357605, -0.2663520574569702, -0.3893585801124573, 0.49589475989341736, 0.5588370561599731, 0.4850122928619385, -0.46962612867355347, 0.25651079416275024, -0.20029336214065552, -0.5402811169624329, -0.10220955312252045, -0.008170864544808...
def test _ write ( self ) : message = notificationmessage ( name = " test _ name ", payload = " hello world " ) m _ bytes = write _ message ( message ) self. assertequal ( m _ bytes,'n009test _ name0000000bhello world')
[ -0.12438485026359558, 0.614407479763031, 0.3480929136276245, 0.246415913105011, 0.9724016785621643, 0.35095468163490295, 0.3162729740142822, -0.2933582365512848, -0.27280235290527344, -0.3764190673828125, -0.3732855021953583, -0.5090207457542419, -1.2515813112258911, 0.4317588210105896, ...
def input _ menu _ choice ( ) : choice = str ( input ( " which option would you like to perform? [ 1 to 5 ] - " ) ). strip ( ) print ( ) # add an extra line for looks return choice
[ -0.5592406392097473, -0.32172226905822754, 0.2151823788881302, 0.5834605693817139, -0.302521675825119, 0.5441283583641052, 0.8156042695045471, -0.9585021734237671, -0.10158178210258484, -0.6255777478218079, 0.29516446590423584, 0.7410781383514404, -0.7556051015853882, -0.46093612909317017,...
def samplewithdistinfo _ boundstrat _ multithread ( self, num ) : try : # self. mdistsamples = manager ( ). list ( ) ; self. g _ failtimes. value = 0 ; boundaryqueue = multiprocessing. queue ( ) ; dictproxy = manager ( ). list ( ) dictproxy. append ( { } ) ; threads = [ ] ; threadscount = 1 ; for i in range ( 0, thread...
[ 0.20373176038265228, -0.3721057176589966, 0.7752403616905212, -0.24556267261505127, 0.47683191299438477, 0.43693044781684875, 0.1616695076227188, -0.6970857977867126, 0.23117253184318542, -0.3589753806591034, 0.22080692648887634, 1.069854974746704, -0.9298896789550781, 0.6228373646736145, ...
def yaml _ save _ file ( p _ filepath, p _ data ) : with open ( p _ filepath,'w') as handle : yaml. dump ( p _ data, handle, default _ flow _ style = false )
[ 0.602672815322876, -0.8039768934249878, 0.15357603132724762, -0.3331475853919983, 1.219951868057251, 0.9253253936767578, 0.18354302644729614, 0.9976385831832886, -0.7044833302497864, 0.5585365891456604, -0.5130927562713623, 0.18363262712955475, 0.07237648963928223, 0.304800420999527, -0....
def get _ slice _ z _ coordinates ( self, slice _ number ) : origin = self. ct _ scan _ header. sitkimage. getorigin ( ) spacing = self. ct _ scan _ header. sitkimage. getspacing ( ) return ( ( slice _ number * spacing [ 2 ] ) + origin [ 2 ] )
[ -0.8677376508712769, -0.752306342124939, 0.4182535409927368, 0.34752219915390015, -0.568215012550354, -0.9462392926216125, 0.8045117259025574, 0.0390939898788929, 0.8942551612854004, 0.09512483328580856, 0.01859605871140957, 0.2846725285053253, 0.10584414005279541, -0.2634158730506897, 0...
def syllabify ( pronunciation : pronunciation ) - > sequence [ pronunciation ] : pass
[ -0.8297542929649353, -0.3144209086894989, 0.17675206065177917, 1.080984115600586, 0.41077640652656555, -1.0576674938201904, -0.17614753544330597, 0.21505770087242126, 0.15930712223052979, 0.15179845690727234, -1.4034762382507324, -0.12493562698364258, 0.7708306908607483, -0.601049959659576...
def _ date _ from _ range ( self, start, end ) : if not start and not end : return ( none, none ) if start : start _ formatted = self. _ format _ date ( start +'0 : 0 : 0') else : start _ formatted = self. _ format _ date ('fri jan 1 1970 0 : 0 : 0') if end : end _ formatted = self. _ format _ date ( end +'23 : 59 : 59...
[ 0.24090002477169037, -1.225265622138977, 0.7285661101341248, 0.23731152713298798, -0.2491253763437271, -0.01838606595993042, -1.374894142150879, -0.18494834005832672, -0.0004037963808514178, 0.5697884559631348, -0.03978504613041878, 0.24547366797924042, 0.06342555582523346, 0.3843363821506...
def create _ sentence ( self, pred _ i, pred _ j ) : sentence _ obj = sentence ( ) for predicate in pred _ i : if ( predicate is not none ) and not ( predicate in sentence _ obj ) : sentence _ obj. predicates. append ( predicate ) for predicate in pred _ j : if ( predicate is not none ) and not ( predicate in sentence ...
[ 0.35976454615592957, -0.6279507279396057, 0.42387011647224426, 0.44479161500930786, -0.09597329050302505, -0.3239380121231079, -0.5011752843856812, -0.06024187058210373, -1.5018965005874634, 0.6089449524879456, -0.19925548136234283, -0.282219260931015, -0.8389058709144592, 0.57146012783050...
def _ snipped ( inp : union [ str, uuid. uuid ] ) - > tuple [ str, str ] : return ( lambda x : ( x, f " { x [ : 3 ] }... { x [ - 3 : ] } " ) ) ( str ( inp ) )
[ -1.1157910823822021, -0.43722009658813477, 0.38613399863243103, -0.8915231227874756, -0.3683212995529175, 0.26160216331481934, -0.7005732655525208, 0.43258267641067505, 0.43081721663475037, 0.906195878982544, -0.9045451283454895, 0.10256469249725342, 0.3165309727191925, -1.8977525234222412...
def acl6tothits ( self ) : try : return self. _ acl6tothits except exception as e : raise e
[ 0.8221229910850525, 0.6789076924324036, 0.1135803833603859, -0.5853055119514465, 0.4001289904117584, -0.3664759695529938, 1.3252085447311401, -0.7681245803833008, 0.33284205198287964, 0.4575214982032776, -0.6957302093505859, -0.6238216757774353, 0.4360884130001068, -1.1891263723373413, 0...
def test _ ssl _ hostname _ verification ( self ) : class fakereactor ( object ) : def _ _ init _ _ ( self ) : self. connects = [ ] def connectssl ( self, host, port, factory, contextfactory, timeout, bindaddress ) : self. connects. append ( ( host, port, factory, contextfactory ) ) certs = [ makecertificate ( o = " te...
[ 0.4699840545654297, 0.08096138387918472, 0.5206929445266724, 0.4217926561832428, 0.5123199224472046, 0.5117241144180298, 0.04970823973417282, 0.41647401452064514, 0.3575795590877533, -0.6813677549362183, -0.9152603149414062, 0.47803962230682373, -0.053816065192222595, -0.6445848941802979, ...
def test _ nfc _ wps _ handover _ errors ( dev, apdev ) : ssid = " test - wps - nfc - handover " hapd = hostapd. add _ ap ( apdev [ 0 ], { " ssid " : ssid, " eap _ server " : " 1 ", " wps _ state " : " 1 " } ) sel = hapd. request ( " nfc _ get _ handover _ sel ndef wps - cr " ). rstrip ( ) if " fail " in sel : raise ex...
[ 0.0186842642724514, 0.47752729058265686, 0.8746522665023804, -0.43981650471687317, 0.564416766166687, 0.49312296509742737, 0.49326667189598083, -0.23531635105609894, 0.4454142153263092, -0.9161809086799622, 0.4831244945526123, -0.8095765113830566, -0.22881758213043213, 0.2784307599067688, ...
def name ( self ) : return self. _ name
[ -0.5138100981712341, -1.1646956205368042, 0.21370011568069458, -0.46015816926956177, -0.8609189391136169, 0.9157972931861877, 0.21445101499557495, -0.455634206533432, 0.15261998772621155, 0.13091617822647095, -0.522395670413971, 0.2680298686027527, 0.42176124453544617, -0.44303271174430847...
def activate ( self ) : self. active = true appuifw. app. exit _ key _ handler = self. handle _ close self. canvas = appuifw. canvas ( redraw _ callback = self. update ) appuifw. app. body = self. canvas appuifw. app. screen = " normal " appuifw. app. menu = [ ( u " update ", self. update ), ( u " close ", self. handle...
[ 0.05483339726924896, -0.6827662587165833, 0.4091971218585968, 0.41586071252822876, -0.265908420085907, 0.22534020245075226, 0.2049439549446106, 0.558824896812439, 0.3417167663574219, -1.0970379114151, -0.3630898892879486, -0.2988089621067047, 0.13973428308963776, 0.5027965307235718, 0.12...
def resetall ( self ) : self. _ show _ model = true self. _ show _ elems = true
[ -0.14305604994297028, -0.05269959568977356, 0.2135280817747116, 0.6103124022483826, -0.18906620144844055, 0.6760172247886658, 1.4248868227005005, 0.39194878935813904, 0.24575801193714142, -0.15834128856658936, -0.741529107093811, 1.0870311260223389, 0.2039424479007721, 1.0474977493286133, ...
def command _ line _ parameters ( ) : parser = argparse. argumentparser ( formatter _ class = argparse. rawdescriptionhelpformatter, description = " " " growth rate analysis pipeline - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select at least one data set : - - u, - - od select at least one function : - -...
[ 0.7821503281593323, 0.04149463772773743, 0.9965853095054626, -0.44474634528160095, 0.04914083704352379, -0.015642685815691948, 0.5253671407699585, -0.0272456556558609, -0.7863885164260864, -0.07243066281080246, 0.20168109238147736, 0.5835772156715393, 0.14646349847316742, -0.03568029776215...
def identity _ auth _ v3 ( self, user, password, auth _ url, service, project _ name, domain _ id ='default') : req _ url = auth _ url. rstrip ('/') +'/ auth / tokens'creds = { " auth " : { " identity " : { " methods " : [ " password " ], " password " : { " user " : { " name " : user, " password " : password, " domain ...
[ -1.020654320716858, 0.08254726976156235, 0.5471230149269104, 0.0713832899928093, 0.42505690455436707, -0.20793671905994415, -1.3188835382461548, -0.6260349750518799, 0.07399090379476547, 0.3173885643482208, 0.34927189350128174, 1.4396848678588867, 0.08143360167741776, -0.19722728431224823,...
def description ( self ) : return self. _ data. get ('description')
[ 0.13003672659397125, 0.6784624457359314, 0.02199585549533367, 0.3976767957210541, 0.5463613867759705, 0.548590898513794, -0.4591931700706482, -0.42590877413749695, 0.546463668346405, 0.1493072807788849, 0.06137801706790924, 0.3693400025367737, -0.2256259322166443, -0.47035089135169983, -...
def detach ( self, remove _ from _ target = false ) : if remove _ from _ target : self. target. remove _ enchantment ( self ) self. set _ zp ( zone. rfg, player _ id = none )
[ -0.25862228870391846, -0.19510771334171295, 0.33179518580436707, -0.32857367396354675, -0.3429049849510193, 0.09936677664518356, 0.9389219284057617, -0.08974102139472961, 0.5332754850387573, 0.546018123626709, -0.18438720703125, 0.16169598698616028, -0.5962468981742859, 0.20859700441360474...
def _ fetchmeasureresult ( self ) - > optional [ dict ] : localfile = define. outputdirpath / f'remote. { self. taskid }. measure. json'if localfile. exists ( ) : text = localfile. read _ text ( encoding ='utf - 8') return json. loads ( text ) else : return none
[ 0.4767968952655792, -0.5373812913894653, 0.4048735201358795, -0.8112741708755493, -1.0088485479354858, -0.07551198452711105, -0.9938865303993225, -1.1814014911651611, -0.5200496315956116, 0.5915937423706055, 0.10160207003355026, -0.3735135495662689, -0.47894978523254395, 0.1678067296743393...
def deeplabv3 _ resnetd50b _ cityscapes ( pretrained _ backbone = false, classes = 19, aux = true, * * kwargs ) : backbone = resnetd50b ( pretrained = pretrained _ backbone, ordinary _ init = false, bends = ( 3, ) ). features del backbone. final _ pool return get _ deeplabv3 ( backbone = backbone, classes = classes, au...
[ -0.3240048885345459, 0.9190835952758789, 0.3186874985694885, 0.23382887244224548, -0.5394037365913391, 0.7753466963768005, -0.0356452539563179, 0.46885398030281067, 0.720629096031189, 0.32330426573753357, -0.580668568611145, -0.1904091238975525, -0.8225401639938354, -0.3496902287006378, ...
def test _ outgoing _ edge _ traversals ( self ) : e1 = testedge. create ( self. v1, self. v2, numbers = 12 ) e2 = testedge. create ( self. v1, self. v3, numbers = 13 ) e3 = othertestedge. create ( self. v2, self. v3, numbers = 14 ) results = self. v2. oute ( ) assert len ( results ) = = 1 assert e3 in results results ...
[ 0.08086748421192169, 0.6725072264671326, 0.5133282542228699, 0.44094371795654297, 0.23187337815761566, 0.6246342062950134, 0.8986123204231262, -0.269435316324234, -0.36392274498939514, 0.029023457318544388, 0.05961303040385246, -0.7587853074073792, -0.9006637334823608, -0.3146902620792389,...
def reduce ( self, x ) : res = x. copy ( ) for info, r in zip ( self. info, self. r ) : if info. distributed and self. comm is not none : self. comm. allreduce ( x [ r [ 0 ] : r [ 1 ] ], res [ r [ 0 ] : r [ 1 ] ] ) return res
[ -0.4137243628501892, -0.17660127580165863, 0.519528329372406, -0.4564031958580017, 0.031018683686852455, 0.06421489268541336, -0.4441210925579071, 0.1641138643026352, 0.5725600123405457, -0.16534411907196045, -0.1639261394739151, 0.031189121305942535, -0.8296977877616882, 0.68669193983078,...
def length ( self ) : return len ( self. state )
[ 0.2667863368988037, -0.3189373016357422, 0.10622440278530121, -1.025695562362671, 0.4846823513507843, 0.9558737874031067, 0.052099406719207764, 0.9137661457061768, 1.0726549625396729, -0.6532554030418396, -1.0289909839630127, -0.38581907749176025, 0.3743140995502472, -0.23564377427101135, ...
def workformatlistener ( event ) : # check if this is a file item ( the only type we know how to handle ) if p6. storage. interfaces. ifileitem in \ zope. interface. providedby ( event. item ) : file _ info = mime _ manager. getfiletypefromextension ( event. item. filename. split ( ". " ) [ - 1 ] ) if file _ info is no...
[ -0.5633202791213989, -0.6581243872642517, 0.7680465579032898, 0.34348538517951965, 0.4863490164279938, -0.30908238887786865, 0.2071351855993271, -0.2847675681114197, 0.3891715407371521, 0.1553327441215515, -0.22111736238002777, -0.006555797997862101, -0.40890711545944214, 0.202374845743179...
def encoded _ length ( self, num _ bytes = 16 ) : factor = math. log ( 256 ) / math. log ( self. _ alpha _ len ) return int ( math. ceil ( factor * num _ bytes ) )
[ 1.3725558519363403, -0.06456265598535538, 0.11914674192667007, -0.1772077977657318, -0.1686142385005951, 0.6660717129707336, 0.8056522607803345, 0.40555498003959656, 1.1488676071166992, -0.3479524552822113, -0.7859349250793457, 0.030131138861179352, -0.514421284198761, -0.02604572474956512...
def readfile ( self, file, dialect ) : list = [ ] for row in csv. reader ( file, dialect ) : list. append ( row ) return list
[ -0.3621159791946411, -1.035841703414917, 0.14875361323356628, 0.45735159516334534, 0.4183724820613861, 0.052535127848386765, -1.859148383140564, 1.4229875802993774, -0.3273749351501465, -0.19200964272022247, 0.29881006479263306, -0.42609691619873047, 0.7549000978469849, 0.5199187397956848,...
def initial _ henry _ virial ( isotherm, verbose = false, optimization _ params = none, * * plot _ parameters ) : model _ isotherm = modelisotherm. from _ pointisotherm ( isotherm, model ='virial ', optimization _ params = optimization _ params, verbose = verbose ) if verbose : model _ isotherm. material _ name ='model...
[ 0.6811304688453674, -0.13013099133968353, 0.6930242776870728, 0.542607307434082, 0.14841419458389282, 0.5855672955513, -0.2569136619567871, 0.07228698581457138, -0.4978824853897095, 0.4686262905597687, 0.13738353550434113, 0.9458167552947998, 0.05499720573425293, -0.22176720201969147, 0....
def set _ total _ bytes ( self, total _ byte _ count ) :
[ -0.19029617309570312, -0.2668660283088684, 0.36266809701919556, -0.21969878673553467, 0.7761077880859375, 0.39054447412490845, 0.7847939729690552, 0.3304332494735718, -0.35392412543296814, -0.17492352426052094, -1.0737016201019287, -0.21127647161483765, -0.24288982152938843, -0.06104668974...
def clean ( self, value ) : value, related _ value = value value = super ( relatedmodelchoicefield, self ). clean ( value ) if int ( related _ value )! = \ getattr ( value,'% s _ id'% self. related _ model _ name ) : raise validationerror ('value does not match % s value.'% ( self. related _ form _ field _ name, ) ) re...
[ 0.4924631118774414, -0.31407487392425537, 0.46453866362571716, 0.023216454312205315, 0.003063787939026952, 1.1692756414413452, 0.7275921702384949, -0.7763609290122986, 0.35924389958381653, 0.4424809217453003, 0.15072482824325562, -0.5213103294372559, -0.09723194688558578, 0.234638988971710...
def shap _ fit _ metric ( self, model, data, nb, plot = true ) : shap _ true, shap _ plugin, shap _ shap, shap _ monte _ carlo, shap _ plugin = [ ], [ ], [ ], [ ], [ ] if model is none : tree _ model = decisiontreeregressor ( ) tree _ model = self. fit _ model ( tree _ model ) else : tree _ model = model for i in tqdm ...
[ 0.9423075318336487, 1.2853437662124634, 0.8614502549171448, 0.5119747519493103, 0.06851013749837875, 0.3072081208229065, 0.1418774127960205, 0.6299079656600952, -0.006107072811573744, 0.47672972083091736, 0.20921552181243896, -0.4497462213039398, 0.1481143832206726, 0.1623338907957077, 0...
def rename _ to _ monet _ latlon ( ds ) : if " lat " in ds. coords : return ds. rename ( { " lat " : " latitude ", " lon " : " longitude " } ) elif " latitude " in ds. coords : return ds. rename ( { " latitude " : " latitude ", " longitude " : " longitude " } ) elif " lat " in ds. coords : return ds. rename ( { " lat "...
[ -0.6805946826934814, -0.9864872097969055, 0.7859973907470703, -1.0926628112792969, -0.5522093176841736, -0.3241671323776245, -1.560538649559021, 0.33510851860046387, 0.36992207169532776, 1.2518266439437866, 0.25581660866737366, 0.8733049035072327, 1.5215954780578613, 0.4159278869628906, ...
def _ _ str _ _ ( self ) : result = " " for index, item in enumerate ( self. _ items ) : result + = " item { } < { } > : { } \ n ". format ( index, item, str ( self. _ items [ item ] ) ) return result
[ -0.8520207405090332, -1.5525113344192505, 0.36118897795677185, -1.360727310180664, 0.10129711031913757, 0.4130238890647888, -0.569348156452179, -0.06868668645620346, -0.5474499464035034, -0.08815325051546097, -0.17498645186424255, 0.3058743476867676, 0.3571898937225342, -0.8230140805244446...
def _ _ init _ _ ( self, link _ uri, nodes, sequence, cube, set _ point _ node, land _ altitude _ step = 0. 1, show _ realtime _ plot = 1 ) : # quadcopter model self. quadcopter = quadcopter ( 0. 01 ) # the list of points that the quadcopter will follow self. sequence = sequence self. sequence _ index = 0 self. set _ p...
[ 0.5985298156738281, -0.32464879751205444, 0.9047055840492249, 0.2401481568813324, -0.6650595664978027, 0.1337800920009613, 0.3784785866737366, 0.13717585802078247, 0.014167201705276966, -0.0450269877910614, -0.1973404884338379, 0.09981319308280945, -0.48033657670021057, 0.05101606249809265...
def spell _ by _ action ( intent, session ) : card _ title = " spell not found " card _ content = " please try again. " session _ attributes = { } should _ end _ session = false if'action'in intent ['slots'] and'value'in intent ['slots'] ['action'] : action = intent ['slots'] ['action'] ['value'] spell = spell. actiont...
[ -0.36465582251548767, -0.979476273059845, 0.5635796189308167, -0.4912016689777374, -0.15453283488750458, -0.4362823963165283, -0.10911346226930618, -0.600456714630127, 1.280794382095337, 0.6511648297309875, 0.5282904505729675, 0.10490414500236511, 0.09949587285518646, 0.18172690272331238, ...
def set _ name ( self, name ) : if name is not none and not isinstance ( name, str ) : raise sdkexception ( constants. data _ type _ error,'key : name expected type : str ', none, none ) self. _ _ name = name self. _ _ key _ modified ['name'] = 1
[ -1.8138259649276733, 0.24592232704162598, 0.25573286414146423, -0.17060625553131104, -0.9569787383079529, -0.2867525517940521, -0.09493228048086166, -0.1789591908454895, -0.23422996699810028, 1.3086341619491577, -1.008533239364624, 0.35567519068717957, -0.044493235647678375, 0.633238971233...
def _ installvboxonlinux ( self ) : srun = self. _ findfile ('^ virtualbox -. * \ \. run $') ; if srun is none : return false ; utils. chmodplusx ( srun ) ; # install the new one. frc, _ = self. _ sudoexecutesync ( [ srun, ] ) ; return frc ;
[ 0.3840942084789276, -0.07840926945209503, 0.5572357177734375, 0.771186351776123, -0.009460213594138622, -0.007857508026063442, -0.44500675797462463, 0.030811553820967674, -0.37670382857322693, 0.5334440469741821, -0.4033208191394806, 0.10352004319429398, -1.1465803384780884, 0.264746338129...
def _ _ init _ _ ( self, pb ) : self. _ tokens = [ annotatedtoken. from _ pb ( tok _ pb ) for tok _ pb in pb. token ]
[ 0.4322212338447571, -0.12739244103431702, 0.3597148656845093, 0.18990543484687805, 0.0523100271821022, 0.676118016242981, -0.6729904413223267, 0.6370626091957092, 0.07288962602615356, -0.7205461263656616, -0.7428790926933289, -0.11002755910158157, -0.3765178620815277, 0.41857650876045227, ...
def child _ items _ with _ text ( self, item, text ) : text = quote ( text ) if item is not none : nodeid = quote ( self. get _ nodeid ( item ) ) node _ indents = self. indents ( item ) return self. browser. elements ( self. child _ items _ text. format ( id = nodeid, text = text, indent = node _ indents + 1 ), parent ...
[ 0.2584497630596161, -0.6672894358634949, 0.441098153591156, 0.6619275808334351, -0.36302393674850464, -0.32439783215522766, -0.4461134076118469, -0.04651130363345146, 0.7637619972229004, 0.36675992608070374, -0.32952815294265747, -0.1588524729013443, -0.25330159068107605, -0.23358902335166...
def process _ drink ( json, action ) : data = {'drink': json ['drink'],'list _ id': json ['list'] } if action = ='add': return add _ drink ( data ) elif action = ='remove': return remove _ drink ( data )
[ -0.6714246273040771, -0.6829257011413574, 0.4683460295200348, -0.46837112307548523, 0.5935426354408264, -0.2607099115848541, -0.8681946992874146, 0.4421268403530121, 0.7896174192428589, 1.413203477859497, -0.18963004648685455, 0.03817884251475334, 0.19049590826034546, 0.6416077017784119, ...
def httpget ( url, timeout = 30, headers = { } ) : try : if not url : return " ", " url not provided. " log _ nouser ( " trying an http get to % s " % url, 4 ) # when it's time to do headers, do it this way # req = urllib2. request ('http : / / www. example. com /') # spin the headers dict... # req. add _ header ('refe...
[ -0.6553552150726318, -0.12513397634029388, 0.8265596032142639, -0.24301710724830627, -0.5949316620826721, -0.6479755640029907, -0.9693292379379272, -0.07501821219921112, -0.008147249929606915, -0.18582683801651, -0.04319748282432556, 0.750922441482544, -0.6107150912284851, -0.0004562863905...
def lst ( self ) : taf = self. stak [ - 1 ] if isinstance ( taf, taf _ ek ) : for tit _ l in taf. et _ r _ kii _ sh ( ) : print str ( tit _ l ) elif isinstance ( taf, gguul ) : print str ( taf )
[ 0.44281578063964844, -0.314746618270874, 0.5608208775520325, -0.4167618155479431, 0.36437079310417175, 0.41727215051651, -0.44611647725105286, -0.035254042595624924, -0.08589927107095718, 0.737401008605957, 0.4060341417789459, -0.5649519562721252, 0.41636592149734497, 0.47109436988830566, ...
def insert ( word ) : db. rollback ( ) # todo : check the word existence! #... q _ word = " " " insert into ` word ` ( ` word `, ` length ` ) values ( % s, % s ) ; " " " try : cur. execute ( q _ word, ( word. lower ( ), len ( word ) ) ) word _ id = cur. lastrowid except mysqldb. error as error : db. rollback ( ) print ...
[ 0.15728165209293365, 1.3427737951278687, 1.215928077697754, -0.22050654888153076, -0.1961231678724289, -0.03936220332980156, 0.6208956837654114, -0.4542017877101898, 0.08875773102045059, 0.5432486534118652, 0.14803127944469452, -0.4823431968688965, -1.2516242265701294, 0.2649119198322296, ...
def chunkify ( lines, limit = 2000 ) : if limit < 500 : raise valueerror ( f'minimal limit should be at least 500, got { limit! r }.') result = [ ] chunk _ ln = 0 chunk = [ ] for line in lines : while true : ln = len ( line ) + 1 if chunk _ ln + ln > limit : position = limit - chunk _ ln if position < 250 : result. app...
[ 0.08402829617261887, -0.42264366149902344, 0.8839702010154724, -0.4182145297527313, -0.1713995635509491, -0.741765558719635, -0.4069667160511017, 0.468925416469574, 0.05584174767136574, 0.05337698385119438, -0.1475318968296051, 0.6164228916168213, 0.3049555718898773, -0.5751641988754272, ...
def info ( self ) : print ( " their name is " + self. name + ". " ) print ( " they are a " + self. race + ". " ) print ( " their symbol is " + self. symbol + ". " ) print ( " their health is at " + str ( self. health ) + ". " ) print ( " they are level " + str ( self. level ) + ". " ) print ( " they are this experinced...
[ -0.04207272082567215, -1.2331031560897827, 0.8243045806884766, -0.7388507723808289, 0.16467422246932983, 0.6008991599082947, -0.5791720747947693, -0.2144538015127182, -1.2237292528152466, 0.21481268107891083, -0.046572696417570114, 1.192018747329712, 0.13995352387428284, 0.6145896315574646...
def process _ and _ move ( self, dl _ entry ) : raise notimplementederror ( " use a class derived from this. " )
[ -0.022958585992455482, -0.6887481808662415, 0.6396980881690979, 0.11724993586540222, 0.03913743421435356, 0.5404227375984192, -0.005789209622889757, -0.3251996338367462, 0.8320248126983643, 0.35546550154685974, -0.281556099653244, 0.43408679962158203, 0.8594329357147217, 0.2139981836080551...
def number _ of _ common _ friends _ map ( user ) : common _ friends _ map = { } user _ friends = friends _ of _ friends ( user ) for friend in user _ friends : length = len ( common _ friends ( user, friend ) ) if length > = 1 : common _ friends _ map [ friend ] = length return common _ friends _ map
[ -0.5633505582809448, 0.2106897234916687, 0.5904838442802429, 0.6336908936500549, -0.07965947687625885, 0.5710943937301636, 1.6303787231445312, 0.0025496489834040403, -0.7227502465248108, -0.078325055539608, -1.513511300086975, -0.6476384401321411, -0.2419774979352951, 0.46107593178749084, ...
def symmetry ( self ) : return iotbx. crystal _ symmetry _ from _ any. from _ string ( " { : f }, { : f }, { : f }, 90, 90, 90, p1 ". format ( * list ( flex. double ( self. grid _ size ( ) ) * self. grid _ spacing ( ) ) ) )
[ 0.10118567943572998, 1.071013331413269, 0.12076627463102341, 0.08167096227407455, 0.518941342830658, -0.24609896540641785, 0.38030773401260376, -0.40952765941619873, -0.6748640537261963, -0.0015431748470291495, -0.6923457980155945, -0.4103807806968689, -0.0371168777346611, -0.3977321982383...