text
stringlengths
25
2.19k
embedding
listlengths
768
768
def _ has _ fully _ defined _ shape ( tensor ) : return isinstance ( tensor, ops. eagertensor ) or tensor. shape. is _ fully _ defined ( )
[ 0.6432933807373047, 0.2995395362377167, 0.4056416153907776, -0.13548940420150757, 0.860722005367279, 0.15820977091789246, 0.3924461305141449, -0.11063852161169052, 0.20541459321975708, 0.14113613963127136, -0.2252665013074875, -0.5775861740112305, 1.0832997560501099, 0.9356748461723328, ...
def filelist ( * * args ) : ret = [ ] import os import datetime for wt in os. walk ( os. path. join ( conf. files _ path ) ) : for fn in wt [ 2 ] : fpath = os. path. join ( wt [ 0 ], fn ) ret. append ( [ os. path. relpath ( fpath, conf. files _ path ), \ str ( datetime. datetime. fromtimestamp ( os. stat ( fpath ). st ...
[ 0.18314190208911896, -0.4653359055519104, 0.6369962692260742, -0.7580320835113525, 0.3624268174171448, -0.5576435327529907, 0.4569689929485321, 0.461976021528244, -0.935042142868042, 0.4661791920661926, -0.8842014670372009, -0.7872705459594727, 0.4298899471759796, 1.1540113687515259, -1....
def plot _ subject ( subject, session, options ) : # transform all keys to lower case options = { key. lower ( ) : value for key, value in options. items ( ) } # add missing keys to options and transform to namedtuple option _ keys = ('do _ ecg ','do _ gsr ','do _ blocks ','do _ trials') default _ opts = dict. fromkeys...
[ -0.0048334612511098385, 0.9295139312744141, 0.7633776068687439, -0.18732623755931854, -0.15770965814590454, -0.008204846642911434, 0.16216666996479034, -0.6670586466789246, 0.015825403854250908, -0.2963196635246277, -0.5671834349632263, 0.1797751933336258, 0.01454201526939869, -0.096477136...
def connected _ febs ( socket = " tcp : / / localhost : 5557 " ) : # zeromq connections context = zmq. context ( ) # statistics publisher statistics = context. socket ( zmq. sub ) statistics. connect ( socket ) statistics. setsockopt ( zmq. subscribe, b " " ) # get the list of connected febs message = statistics. recv ...
[ 0.48399078845977783, -0.43862152099609375, 0.44807708263397217, -0.10633482784032822, 0.016942985355854034, -0.3217352032661438, 0.07089963555335999, -0.5579086542129517, -0.020710309967398643, -0.8332207202911377, -0.48746466636657715, 0.8474579453468323, -0.5565321445465088, 0.4809732735...
def get _ default ( self, key ) : if key not in self. data. keys ( ) : raise valueerror ( key +'is not in configuration') else : return self. default [ key ]
[ -0.21003969013690948, 0.7737281918525696, 0.07405427098274231, 0.604784369468689, 0.49498751759529114, -0.1604584902524948, -0.9182799458503723, -0.37442830204963684, -0.5459743738174438, 0.5532709360122681, 0.18902362883090973, 0.1366453766822815, -1.0286482572555542, 0.29625073075294495,...
def reset _ condition ( self, t, y, i ) : return y [ self. index _ voltage _ variable ] - self. spike _ condition
[ 0.16682027280330658, -0.3897164762020111, 0.1702250987291336, 0.21389424800872803, -0.016295598819851875, -0.08282303810119629, 0.7963389754295349, -0.3530385196208954, -0.8977484107017517, 1.161002516746521, -0.2105075716972351, 0.42441326379776, -0.7913608551025391, -1.4914841651916504, ...
def overlay _ contours ( image, mask, rescale _ img = false ) : contour = np. zeros ( mask. shape, dtype = np. bool ) coords = measure. find _ contours ( mask, 0. 5 ) # 0. 5 to work with both float and int for coord in coords : rows = np. rint ( coord [ :, 0 ] ). astype ( np. int ) cols = np. rint ( coord [ :, 1 ] ). a...
[ 0.20930974185466766, -0.1794758141040802, 0.6789503693580627, 1.1600550413131714, -0.5709564089775085, -0.6845558881759644, 0.25156912207603455, -0.3573380708694458, 0.2712792456150055, 0.12158548831939697, 0.46964031457901, -1.2271019220352173, 0.07455210387706757, 0.49960857629776, -0....
def scrape _ and _ append _ combined _ data ( url, data _ filename, sales _ filename, num _ retries = 10 ) : scrape _ and _ append _ data ( url, data _ filename, num _ retries ) scrape _ and _ append _ sales _ data ( url, sales _ filename, num _ retries )
[ 0.12781035900115967, -0.06465274840593338, 0.5057587027549744, 0.9360439777374268, 1.257466435432434, 0.49731677770614624, -0.09376406669616699, 0.2851031720638275, -0.03935087472200394, -0.7716794013977051, 0.5834881663322449, 0.05467548593878746, 0.5999261140823364, -0.17492525279521942,...
def cn _ setvariance ( self, variance ) : depr ('setvariance ', 1. 1,'obj = obj. withvariance ( variance )') new _ obj = self. copy ( ). withvariance ( variance ) self. _ profile = new _ obj. _ profile self. _ profile _ for _ stored = none # reset the stored profile as it is no longer up - to - date self. _ _ class _ _...
[ -0.17404691874980927, -0.5251115560531616, 0.6943033933639526, 0.8193483948707581, 0.00041194260120391846, 0.15451857447624207, 1.1224300861358643, -1.0362104177474976, 0.1770932972431183, -0.31557410955429077, -2.313768148422241, 0.8533521294593811, -0.9431771636009216, -0.108396053314208...
def async _ app ( request, async _ caches ) : # get the cache for the given eviction strategy cache = async _ caches [ request. param ] class cachedresource : " " " a cached resource with long expiration and all the different methods " " " @ cache. cached ( timeout = 60 ) async def on _ get ( self, req, resp ) : if fal...
[ -0.5178213715553284, 0.32720497250556946, 0.9078984260559082, 0.5979364514350891, -0.323987752199173, -0.19243387877941132, -0.37560999393463135, -0.1312061995267868, 0.894578218460083, 0.6768617033958435, -0.08850011974573135, -0.5714690685272217, 0.8473223447799683, 0.4257202744483948, ...
def synchronize ( ) : if not dist. is _ available ( ) : return if not dist. is _ initialized ( ) : return world _ size = dist. get _ world _ size ( ) if world _ size = = 1 : return dist. barrier ( )
[ 0.37865737080574036, 0.5856764912605286, 0.5464116334915161, 1.000712513923645, -0.4885410964488983, 0.5020566582679749, 0.5213197469711304, -0.7147772312164307, 0.6120938658714294, -0.0073082176968455315, 0.12860234081745148, 0.44917288422584534, -0.5342838764190674, 0.8568446040153503, ...
def read _ parquet ( source : " union [ str, binaryio, path, list [ str ] ] ", stop _ after _ n _ rows : " optional [ int ] " = none, memory _ map = true, columns : optional [ list [ str ] ] = none, * * kwargs, ) - > " dataframe " : source = _ prepare _ file _ arg ( source ) if stop _ after _ n _ rows is not none : ret...
[ -0.02374941296875477, 0.7509706616401672, 0.6260899901390076, 0.5021413564682007, -1.2646236419677734, -0.17186735570430756, 0.17421652376651764, 0.07687549293041229, -0.25464487075805664, -0.23719455301761627, -0.002764086239039898, 0.3151565194129944, 0.4444827139377594, -0.6968609690666...
def to _ int64 ( x, name = " toint64 " ) : return cast ( x, dtypes. int64, name = name )
[ -0.9764276146888733, 0.18302160501480103, 0.3827846348285675, 1.3767335414886475, -0.4502178728580475, -0.6075108647346497, -0.3607243001461029, -0.7955930233001709, 0.7616885304450989, 0.9669632911682129, -0.8450284600257874, 0.47514891624450684, 0.4878925085067749, -0.9941616654396057, ...
def notification ( self, * * kwargs ) : pass
[ 0.1357950121164322, -0.6488282680511475, 0.16007669270038605, 1.176307201385498, 0.6975992918014526, 0.23337019979953766, 0.38217252492904663, 0.2845405638217926, -0.2494121938943863, 0.032930392771959305, -1.4195160865783691, 0.19287998974323273, -0.3318132162094116, 0.49916794896125793, ...
def get _ credentials ( self, role ) : try : return self. credentials [ role ] except keyerror : return " "
[ -0.5267822742462158, -0.2831849455833435, 0.17457616329193115, -0.19318731129169464, -0.3307884931564331, -0.5850746035575867, -0.9461963772773743, -0.9095225930213928, 0.19620858132839203, 0.49336573481559753, 0.6850272417068481, -0.32138392329216003, 0.003668445162475109, -0.002632644493...
def s3 _ example _ tile ( gtiff _ s3 ) : return ( 5, 15, 32 )
[ 0.7574893832206726, 0.11701234430074692, 0.16798610985279083, -0.5915970802307129, -0.2892243266105652, 0.9471931457519531, 0.09945098310709, -0.32120203971862793, 0.47462883591651917, 0.12516556680202484, -1.5171080827713013, -0.11408572643995285, -0.05234600231051445, -0.9707635641098022...
def example1 ( ) : current _ path = os. getcwd ( ) return current _ path
[ 0.5636000633239746, -1.542014718055725, 0.48051953315734863, 1.1135118007659912, -0.2715207636356354, 0.9769760370254517, 2.254599094390869, 0.7539438009262085, -0.5140008330345154, -0.25609976053237915, 0.1183924451470375, 0.3006964325904846, 0.06964733451604843, -0.2997051775455475, -0...
def as _ dictlist ( self ) : data = [ ] for row _ i, row in enumerate ( self. row _ index ) : for col _ i, col in enumerate ( self. col _ index ) : value = self. values _ by _ row [ row _ i ] [ col _ i ] data. append ( { " row " : row, " col " : col, " value " : value, } ) return data
[ -0.6526311635971069, 0.185751810669899, 0.4946219325065613, -0.7885009050369263, -0.08518695086240768, -0.7232088446617126, -0.8683043718338013, -0.1303892880678177, -0.3187505602836609, 0.3509604036808014, -0.29036563634872437, -0.43654900789260864, 1.410204529762268, 0.4498251974582672, ...
def get _ actuator _ state ( self, actuator _ id : str ) - > actuator : if self. _ state _ by _ endpoint is not none : return self. _ state _ by _ endpoint [ actuator _ id ] raise homeassistanterror ( " unknown actuator " )
[ -0.13541562855243683, -0.8792264461517334, 0.07727795094251633, 0.40947434306144714, -0.3144173324108124, -0.8471775650978088, -0.08576411753892899, 0.011577384546399117, 1.0654759407043457, 0.2350483238697052, 0.7987499833106995, 1.0190507173538208, -0.08853224664926529, -0.32314607501029...
def load _ mif ( mif _ file, temp _ root = none, sphere = " odf8 ", mask = none ) : if not has _ mrtrix : raise oserror ( " not all mrtrix3 executables found " ) # where to make a temporary directory if temp _ root is none : if tempfile. tempdir is not none : temp _ root = tempfile. tempdir else : temp _ root = os. get...
[ -0.14642488956451416, -0.9658817648887634, 0.677689254283905, -0.558904767036438, -0.7122247219085693, -0.28793251514434814, 0.7493529319763184, 0.16186146438121796, 0.9056846499443054, 0.12213806062936783, -0.17495861649513245, 0.15034857392311096, -0.4904138147830963, -0.2426799237728119...
def add ( self, observation _ t, action _ t, observation _ t _ 1, reward _ t _ 1, done ) : # determine index at which to add experience if self. fill _ counter < self. size : # using an array of indices so that the whole of the memory doesn't need to be copied and overwritten self. sample _ indices = np. append ( self....
[ -0.8299005627632141, 0.06829677522182465, 0.7031323909759521, -0.8574056029319763, 0.7397651076316833, 0.6771236658096313, 0.31339576840400696, -0.088422492146492, 0.03595143184065819, 1.0596930980682373, -0.18048657476902008, 0.6652318835258484, -0.044629860669374466, -0.1310538798570633,...
def handle _ event ( self, event ) : _ event _ data = decode _ event _ data ( event ) if _ event _ data = = self. _ last _ event : # event already handled return self. _ last _ event = _ event _ data if _ event _ data. get ('event') : try : if _ event _ data ['event'] = ='sequencenextstep': self. advance _ step ( ) log...
[ -0.5380094051361084, -0.3518598675727844, 0.9214102625846863, -0.1516019105911255, 0.3371891975402832, -0.3532232940196991, -0.077918641269207, 0.38267821073532104, 0.06750961393117905, -0.249381422996521, -0.7535578608512878, -0.5727308988571167, 0.3375202715396881, 0.3782017230987549, ...
def enable _ flows ( ones ) : f = anturlar. flowv ( ) the _ names = f. flow _ names ( ) print ( the _ names ) for k in the _ names : if " sys _ gen _ all _ simports " in k : print ( " not enabling this one ", k ) else : cmd _ create = ( " flow - - activate % s - fea all " % k ) cons _ out = anturlar. fos _ cmd ( cmd _ ...
[ 0.06880680471658707, -0.31869828701019287, 0.6106327772140503, 1.034546971321106, 0.8195501565933228, 0.37040358781814575, 0.10714242607355118, 0.5437034964561462, 0.9165852665901184, -0.6355936527252197, -1.2654460668563843, 0.19048680365085602, 0.1543988138437271, 0.6557974815368652, -...
def setup _ logical _ replication _ on _ source _ db _ if _ needed ( self ) - > optional [ str ] : return pulumi. get ( self, " setup _ logical _ replication _ on _ source _ db _ if _ needed " )
[ 0.45201241970062256, 0.4673933684825897, 0.7118914127349854, -0.2105710357427597, -0.6035332679748535, 1.1889153718948364, -0.21735809743404388, 0.9161210060119629, 1.388135313987732, 0.9377887845039368, -0.6778031587600708, 0.40768304467201233, 0.029032865539193153, 0.08423033356666565, ...
def test _ atomic _ base64 _ binary _ min _ length _ 3 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ min _ length _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - minlength - 4. xsd ...
[ 0.5279852747917175, -0.17059451341629028, 0.40340656042099, 0.9175339341163635, -0.20085586607456207, 0.1771545112133026, 0.07397007942199707, -0.3833457827568054, -0.1885179579257965, 0.2608306407928467, -0.9245309829711914, -0.13806059956550598, -0.9767484664916992, -0.19397656619548798,...
def start _ event ( otpnumber ) : token = request. headers. get ('authorization') latitude _ = request. json. get ('latitude') longitude _ = request. json. get ('longitude') holdedquery = holdedevents. query. filter _ by ( otp = otpnumber ). first ( ) otp _ check = holdedquery if otp _ check in [ none,'' ] : # does not...
[ 0.06903159618377686, 0.030696753412485123, 0.7940788269042969, 0.25947099924087524, 0.33186212182044983, 0.26966142654418945, 0.047994259744882584, -0.7071183919906616, 0.03213925287127495, 0.2545962333679199, 0.8160873651504517, 0.557341992855072, 0.222920224070549, 0.32103434205055237, ...
def _ _ init _ _ ( self, path = false, is _ image = false, slidename = false ) : self. path = path if path else " " self. slidename = slidename self. dot _ bbox _ width = self. dot _ bbox _ height = false self. is _ image = is _ image self. low _ memory _ consumption = false self. classes = [ ] if not self. is _ image ...
[ -0.5073999166488647, -0.27141106128692627, 0.488930344581604, 0.849331796169281, -0.3080984950065613, -0.002520681358873844, 0.6021810173988342, 0.18703946471214294, 0.36489903926849365, -0.32868149876594543, 0.020805252715945244, -0.14542177319526672, 0.35999995470046997, 1.22379684448242...
def lone _ sum ( a, b, c ) : return 0 if a = = b and b = = c else c if a = = b else b if a = = c else a if b = = c else a + b + c # only return unique values
[ 0.5032955408096313, -0.3841879665851593, 0.7890284657478333, -0.679844856262207, 1.2718852758407593, 0.358769029378891, -0.09484834223985672, -0.20563237369060516, 0.8804947137832642, -0.0014999572886154056, -0.4909116327762604, -0.6610084176063538, -1.0186487436294556, -0.6581172943115234...
def file _ md5 ( file _ path : str ) - > tuple : filehash = md5 ( ) with open ( file _ path,'rb') as f : filehash. update ( f. read ( ) ) return file _ path, filehash. hexdigest ( )
[ 0.16525086760520935, -0.9432893395423889, 0.5762045383453369, -0.355548232793808, 0.16710662841796875, 0.4171745479106903, 0.07433204352855682, 1.1980524063110352, -1.4700835943222046, 0.7415173649787903, -0.42572522163391113, -1.1460505723953247, 0.318963885307312, -0.08320967853069305, ...
def expiration _ date ( self, expiration _ date ) : self. _ expiration _ date = expiration _ date
[ 1.0098150968551636, 0.3873101472854614, -0.1842738538980484, 0.8173151612281799, 0.12148769199848175, 0.2190299928188324, -0.8566849231719971, 1.233891248703003, -0.362821102142334, 0.28826290369033813, -0.2987472712993622, -0.30748599767684937, 0.8352276682853699, 1.1273833513259888, 0....
def map _ to _ weather _ info ( input _ val : dict ) - > list [ weatherinfo ] : input _ list = input _ val ['list'] city _ api _ id = input _ val ['city'] ['id'] return [ weatherinfo ( city _ api _ id = city _ api _ id, dt = elem ['dt'], dt _ txt = elem ['dt _ txt'], temp = convert ( elem ['main'] ['temp'] ), temp _ mi...
[ -0.6563262343406677, -0.43030261993408203, 0.5682435035705566, -0.40661513805389404, -0.18540552258491516, 1.1730608940124512, -0.6667031049728394, 0.4590871036052704, -0.13182947039604187, 0.37842583656311035, -0.5896755456924438, -0.26501739025115967, 0.2437019795179367, 0.69490414857864...
def new ( * args, * * kargs ) : obj = itksubtractconstantfromimagefilteriul2diul2. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj
[ 0.2797599136829376, -0.6758409738540649, 0.3536074459552765, -0.895306408405304, -1.529394507408142, 0.44921377301216125, 0.28052788972854614, 0.8401639461517334, -0.26136189699172974, -0.7886505722999573, -0.8861655592918396, 0.7340729236602783, 1.0470632314682007, -0.1875881403684616, ...
def resetxy ( self ) : self. x _ position = 0 self. y _ position = 0
[ -0.46906429529190063, -0.9802407622337341, 0.4175471365451813, -0.7134453654289246, 1.0894074440002441, -0.00946071557700634, -0.7211362719535828, 0.12339713424444199, -1.1194626092910767, 0.1802499145269394, -0.31205496191978455, 0.2291923463344574, -0.3222695291042328, -1.130096077919006...
def _ maybe _ get _ dtype ( x ) : # don't put np. ndarray in this list, because np. result _ type looks at the # value ( not just dtype ) of np. ndarray to decide the result type. if isinstance ( x, numbers. real ) : return x if isinstance ( x, tensor _ lib. tensor ) : return x. dtype. as _ numpy _ dtype if isinstance ...
[ -0.28135547041893005, 0.6948046684265137, 0.6567209959030151, 0.2826460003852844, 0.25036200881004333, -1.04267418384552, 0.5792509913444519, -1.2454874515533447, 0.6292828321456909, -0.5514876246452332, -0.257424920797348, 0.3343386948108673, 0.6649136543273926, 0.5001660585403442, 0.87...
def _ _ init _ _ ( self, value ) : if isinstance ( value, int ) : self. _ _ int = value
[ -0.8078247308731079, -0.15776482224464417, 0.4435020983219147, -0.10983631014823914, -0.7981230616569519, 0.5192335844039917, 0.3950646221637726, -0.6767455339431763, 0.6253895163536072, -0.38652828335762024, -0.07903360575437546, -0.4061214327812195, -0.6799249649047852, 0.950994789600372...
def _ _ init _ _ ( self, event = none ) : # : event self. event = event
[ 0.7137769460678101, -0.3723422884941101, 0.4963154196739197, 0.5235006213188171, -0.10530320554971695, 0.429065465927124, 0.41092732548713684, 1.0787979364395142, 0.7871390581130981, -0.7544657588005066, -0.8050581812858582, 0.2543184459209442, 0.18827882409095764, 0.625806450843811, 0.6...
def get _ total _ grain ( self, qs _ kwargs = { } ) : qs = self. recipemalt _ set. filter ( * * qs _ kwargs ) total = sum ( qs. values _ list ('amount ', flat = true ) ) return total
[ 0.3307288885116577, 0.3793884515762329, 0.4986707866191864, -0.367404580116272, -0.07116974145174026, -0.39871203899383545, 0.00041179731488227844, -0.7759902477264404, 0.20494547486305237, -0.04371162876486778, -0.4528517723083496, 0.6622185707092285, -0.21424004435539246, 0.5640466809272...
def detach _ child ( self, child ) : if type ( child ) is worldobject and child in self. _ children : child. set _ parent ( none ) self. _ children. remove ( child )
[ 0.2839869260787964, -0.0050140065141022205, 0.5469874739646912, -0.2717806398868561, -1.311309814453125, 0.672362208366394, 0.3144795298576355, -1.0238831043243408, -0.18607105314731598, 0.06174226850271225, -1.2894339561462402, -0.3242854177951813, -0.3973006010055542, 0.4161514341831207,...
def is _ spider ( spider _ class ) : assert inspect. isclass ( spider _ class ) assert issubclass ( spider _ class, torvend. spiders. _ common. basespider )
[ 0.031492654234170914, -0.10783988982439041, 0.30351918935775757, 0.8579939603805542, 0.6153171062469482, 1.4796816110610962, -0.26014047861099243, 0.4051308333873749, 1.2363735437393188, -0.039664916694164276, -0.41905680298805237, 0.917412519454956, -0.6231401562690735, 1.1244868040084839...
def get _ notes ( midi _ path ) : notes = [ ] midi _ len = len ( glob. glob ( midi _ path ) ) _ length = midi _ len if midi _ len < = 1000 else 1000 with tqdm ( glob. glob ( midi _ path ) [ : _ length ], unit = " file " ) as tglob : for file in tglob : tglob. set _ postfix ( name = file ) # print ( " parsing % s " % fi...
[ 0.44845157861709595, -0.3473263680934906, 0.6438143849372864, 0.35809218883514404, -0.17436406016349792, -0.08548343181610107, 0.43540892004966736, -0.08705972880125046, 0.014840425923466682, 0.11380601674318314, 0.012149030342698097, -0.3004583716392517, -0.941347599029541, 0.149359807372...
def geofunc ( mtest, scaled _ mass, rw _ a ) : a3 = scaled _ mass * mtest * units. m _ sun a = a3 * * ( 1. 0 / 3. 0 ) rtest = rw _ a * a return rtest. to ( units. r _ sun ). value
[ 0.18721596896648407, -0.3271367847919464, 0.34586915373802185, -0.6316652894020081, -0.5977458953857422, 0.4105794131755829, 0.4263749420642853, 0.17306388914585114, -0.1420222520828247, 0.49830561876296997, 0.32702693343162537, 0.5218469500541687, 0.008419381454586983, 0.09857942163944244...
def evaluate ( self, expr, local _ dict : dict [ str, any ] = none, out : series = none, allow _ casting = true, ignore _ check = false ) : new _ expr = expression. parse ( expr, mode = evaluationmode. dataframe ) ld = { } if local _ dict is none else local _ dict. copy ( ) ld [ neg _ inf _ str ] = neg _ inf _ val ld [...
[ -0.33270007371902466, 0.26366788148880005, 0.8346979022026062, -0.34780940413475037, -0.22421765327453613, -0.5724478960037231, -0.1392369121313095, 0.054313771426677704, -0.061431318521499634, -0.042844172567129135, 0.1398187279701233, 1.7104724645614624, -0.00399830611422658, -0.37000584...
def _ torch _ baseline ( self, batch _ size, max _ seq _ len ) : input _ data, sequence _ lengths = self. _ generate _ fake _ rnn _ inputs ( batch _ size = batch _ size, max _ seq _ len = max _ seq _ len ) rnn _ cell, initial _ state = _ create _ torch _ rnn _ cell ( batch _ size ) input _ data, sequence _ lengths = _ ...
[ 0.2698096036911011, -0.061432842165231705, 0.6521813273429871, 0.3760072886943817, 0.8174914121627808, -0.8841717839241028, -0.21201808750629425, 0.0717807337641716, -0.6425419449806213, 0.41128265857696533, -0.48816728591918945, 0.6764203310012817, 0.680071234703064, -0.4944424033164978, ...
def ydata ( self, v = ( ) ) : return [ float ( f ) for f in v ]
[ -0.6766988635063171, 0.058712512254714966, 0.3503097593784332, -0.16503097116947174, 0.6573233604431152, -0.03147377818822861, -1.0156198740005493, -0.05534430220723152, -0.5443198084831238, -0.6284919381141663, -1.4185422658920288, 0.8520916104316711, -0.1342267096042633, 0.96982610225677...
def generate _ google _ ice ( self ) : self. ufrag = " ". join ( random. choice ( ice _ char ) for _ in range ( 16 ) ) self. pwd = " ". join ( random. choice ( ice _ char ) for _ in range ( 24 ) ) self. options = " google - ice "
[ -1.2374510765075684, 0.717217743396759, 0.5012397170066833, -0.26074621081352234, 0.6375426054000854, 0.8359918594360352, 0.4141935110092163, 0.6425668001174927, -0.715810239315033, 0.12706904113292694, -1.0148288011550903, -0.4033287465572357, -0.9385625123977661, 0.006649335380643606, ...
def normalize _ keyword ( input _ str ) : return input _ str. lower ( )
[ 1.1921576261520386, -1.0749504566192627, 0.17452667653560638, 0.31129029393196106, -1.163822054862976, 0.681522011756897, -0.7144894003868103, -0.0008990330970846117, 0.2441297173500061, 0.08453994989395142, 0.4674559533596039, 0.20884722471237183, -1.6177482604980469, 0.3592489957809448, ...
def t _ freezing ( sa, p, saturation _ fraction = 1 ) : # this function, t _ freezing, calculates the in - situ freezing temperature, # t _ freezing, of seawater by first evaluating a polynomial of the # conservative temperature at which seawater freezes, ct _ freezing, using # the gsw function ct _ freezing. the in - ...
[ 0.1524629443883896, 0.0026598714757710695, 0.5532976984977722, -0.6781973242759705, -0.48870226740837097, -0.1183849573135376, 0.09622527658939362, 0.5794556140899658, 0.03487863764166832, 1.5092480182647705, -0.4470415413379669, -0.02738146483898163, -0.34986793994903564, -0.8678700327873...
def dwav ( q, n ) : if n = = 0 : return pi * * ( - 1 / 4 ) * ( - q ) * np. exp ( - ( q * * 2 ) / 2 ) else : wf = wav ( q, n - 1 ) return ( 1 / np. sqrt ( 2 * ( n - 1 ) + 2 ) ) * ( ( 2 * ( n - 1 ) + 2 ) * wf + q * dwav ( q, n - 1 ) - ( q * * 2 ) * wf )
[ -0.6873469352722168, 0.4332892596721649, 0.6491221189498901, -0.4238588213920593, -0.8691368699073792, -0.16883431375026703, 0.027578255161643028, -0.22985577583312988, 1.143843173980713, -0.773572564125061, -0.1912994086742401, 0.4337707459926605, 0.07394519448280334, 0.824936032295227, ...
def zero _ pad _ core _ box ( core _ cutout, centers, radii ) : pass
[ -0.37880074977874756, 0.20896901190280914, 0.08360856026411057, -0.4186420440673828, 0.18939070403575897, -0.13678212463855743, 0.5367608666419983, -0.06267616152763367, 0.5215318202972412, 0.004995010327547789, 0.10938481986522675, 0.2748309075832367, -1.255069375038147, 0.417068123817443...
def gen _ all _ sequences ( outcomes, length ) : answer _ set = set ( [ ( ) ] ) for dummy _ idx in range ( length ) : temp _ set = set ( ) for partial _ sequence in answer _ set : for item in outcomes : new _ sequence = list ( partial _ sequence ) new _ sequence. append ( item ) temp _ set. add ( tuple ( new _ sequence...
[ -0.9354764223098755, -0.006597752682864666, 0.9660276770591736, -0.3084525763988495, -0.4811158776283264, 0.510624885559082, 0.1419563889503479, -0.30797281861305237, 0.6032388806343079, -0.013155815191566944, -0.6431230902671814, -0.6326406598091125, -0.21785089373588562, -0.5278975367546...
def run _ cluster _ buster _ for _ motif ( cluster _ buster _ path : str, fasta _ filename : str, motif _ filename : str, motif _ id : str, extract _ gene _ id _ from _ region _ id _ regex _ replace : optional [ str ] = none, bg _ padding : int = 0, mask : bool = false, ssh _ command : optional [ union [ str, list ] ] ...
[ 0.5360154509544373, -0.06417737156152725, 0.9535455107688904, 0.583964467048645, 0.7526964545249939, -0.7173736095428467, 0.38002845644950867, -0.10480435192584991, -0.2256285399198532, -0.0908542349934578, -0.16776491701602936, 1.0101418495178223, -0.7107755541801453, 0.022103043273091316...
def purchase _ info _ for _ line ( parse, token ) : tokens = token. split _ contents ( ) if len ( tokens ) < 5 or tokens [ 3 ]! ='as': raise template. templatesyntaxerror ( " % ( tag ) r tag uses the following syntax : " " { % % % ( tag ) r request line as " " record % % } " % {'tag': tokens [ 0 ] } ) request _ var, li...
[ 0.28423547744750977, -0.29129159450531006, 0.5984874963760376, -0.44501566886901855, 0.35903576016426086, -0.5211358666419983, -0.8042778372764587, -0.40920892357826233, -0.6364306807518005, -0.4062635898590088, 0.06439334899187088, -0.5606018900871277, 0.7560426592826843, -0.0197238512337...
def lop ( ys, xs, ws ) : vj = torch. autograd. grad ( ys, xs, grad _ outputs = ws, create _ graph = true, retain _ graph = true, allow _ unused = true ) return tuple ( [ j. detach ( ) for j in vj ] )
[ -0.2231214940547943, 0.0278153233230114, 0.41698357462882996, -0.6476712226867676, -0.4577033519744873, -0.40225911140441895, -0.12444465607404709, -0.37640756368637085, -0.4068559408187866, 1.267633318901062, -0.2917897403240204, -0.21745678782463074, 0.46149230003356934, -0.7732180953025...
def getaskmlgrid ( self, session, path = none, documentname = none, colorramp = colorrampenum. color _ ramp _ hue, alpha = 1. 0, nodatavalue = none ) : if type ( self. raster )! = type ( none ) : # set document name if documentname is none : try : documentname = self. filename except attributeerror : documentname ='def...
[ 0.34531262516975403, 0.04299495369195938, 0.6295372843742371, -0.08140800148248672, -0.8020814657211304, -0.027675775811076164, 0.12565432488918304, -0.15749701857566833, -0.32373353838920593, 0.6982213854789734, 1.079575777053833, -0.27479076385498047, -0.27944403886795044, 0.305365532636...
def predict ( self, x ) : # this will be an np. array of integers representing classes lp _ prediction = self. classifier. predict ( self. ensure _ input _ format ( x ) ) return self. inverse _ transform ( lp _ prediction )
[ -1.227617621421814, -0.6556813716888428, 0.39306578040122986, -0.15809328854084015, -0.5040588974952698, 0.5314255356788635, -0.7262589335441589, -0.3073011040687561, 0.16649791598320007, -0.6552814841270447, -0.5092422962188721, 0.4585104286670685, -0.3302311897277832, -0.1231095045804977...
def resample ( x, k ) : if k < 1 : raise notimplementederror ('downsampling is not implemented') if k = = 1 : return x # nothing to do return upsample ( x, k )
[ 0.2615939974784851, 0.5384646058082581, 0.7187850475311279, 1.1375353336334229, -1.4992178678512573, -0.07709234952926636, -0.6466094255447388, 0.5559186339378357, 0.44022977352142334, 0.18182045221328735, 0.44487422704696655, -0.1645273119211197, -0.3295818567276001, -0.7720221281051636, ...
def test _ place _ buy _ order _ not _ enough _ stock ( self ) : stock _ name = self. test _ stock _ a order _ quantity = 101 order _ type ='buy'trader = self. login _ user ( username = usera. get ('username') ). profile d = self. place _ order ( stock _ name, order _ quantity, order _ type, trader ) resp = d. get ('re...
[ -0.32811135053634644, 0.19870075583457947, 0.4692396819591522, 0.5584027767181396, 1.0048942565917969, 0.29104796051979065, -0.39309319853782654, -1.2012660503387451, 0.6899909377098083, -0.7032580375671387, -0.6486055850982666, -0.07103551924228668, 0.046388477087020874, 0.470291614532470...
def get _ xi ( self, numpy = false ) : if numpy : return np. stack ( self. xi, axis = 1 ) else : return self. xi
[ -0.3018948435783386, 1.020532250404358, 0.5564081072807312, 0.8132727146148682, 0.7204861640930176, 0.15814939141273499, 0.20972184836864471, -0.04329837113618851, 0.4830634891986847, 0.3417557179927826, 0.7844991087913513, 0.690009355545044, -0.9383700489997864, -1.5435174703598022, 0.5...
async def chat _ history ( sender : text, request : historyquery = historyquery ( ), collection : str = depends ( authentication. authenticate _ and _ get _ collection ) ) : history, message = historyprocessor. fetch _ chat _ history ( collection, sender, request. month ) return { " data " : { " history " : list ( hist...
[ -0.14739654958248138, 0.5050025582313538, 0.41022324562072754, 0.45470130443573, -0.588530421257019, 0.2327587753534317, -0.1366008222103119, -0.4376693069934845, -0.7665114998817444, 0.3101450800895691, -0.048979002982378006, 1.1028276681900024, 0.6143175363540649, 0.7300443053245544, -...
def set _ display _ info ( self ) : self. name = self. get _ full _ name ( ) self. username = self. user. username self. email = self. user. email self. text _ affiliations = [ a. name for a in self. affiliations. all ( ) ]
[ 0.08224955201148987, -0.46019676327705383, 0.0999775230884552, -0.6507678031921387, -1.1193944215774536, 0.748275637626648, -0.22915703058242798, -0.5266183018684387, -0.7837026119232178, 0.38034552335739136, -0.1080610379576683, 0.16168881952762604, 0.646796703338623, 1.0667296648025513, ...
def directory _ type ( arg ) : if os. path. isdir ( arg ) : return arg else : raise argparse. argumenterror ( arg,'could not resolve root path.')
[ 0.1566586196422577, 0.3419421911239624, 0.894214928150177, 0.46677789092063904, 0.3940531313419342, 0.4268146753311157, 1.0679465532302856, 0.06579127907752991, 0.43579864501953125, -0.6881011724472046, 1.1694765090942383, 0.4882349967956543, -0.3607616126537323, 1.1732640266418457, 0.24...
def extract ( f, regexp, splitr, verbose ) : hits = [ ] # return a list, set union handled separately if verbose : print " matches for pattern : ", regexp. pattern for line in f : for match in regexp. finditer ( line ) : if match : if verbose : print " ", match. group ( 0 ) hits. extend ( splitr. split ( match. group (...
[ 0.3002815544605255, -0.07966045290231705, 0.4548245370388031, 0.6940792798995972, 0.46427100896835327, -0.5792809128761292, 0.6160662770271301, 1.061734676361084, -0.6173698306083679, 0.7247734069824219, 0.13795527815818787, -0.9835145473480225, -0.11467088758945465, 0.15243639051914215, ...
def write _ to _ file ( self, fit, title ) : from numpy import savetxt, zeros r _ expt = fit. contribution. profile. x g _ expt = fit. contribution. profile. y g _ calc = fit. contribution. evaluate ( ) print ( g _ calc ) fit _ data = zeros ( ( 3, len ( r _ expt ) ) ) fit _ data [ 0 ] = r _ expt fit _ data [ 1 ] = g _ ...
[ 0.9973773956298828, -1.059144377708435, 0.4840385317802429, -0.053745485842227936, 0.5760048627853394, 1.1801639795303345, 0.05487104505300522, 0.2062588632106781, -0.5625908374786377, 0.23286095261573792, -0.3160037696361542, 0.5588613152503967, -0.34371840953826904, -0.23042882978916168,...
def get ( self, request, slug, proposal _ id, * args, * * kwargs ) : context = self. _ setup _ context ( request, slug, proposal _ id ) return render _ to _ response ( self. template _ name, context, requestcontext ( request ) )
[ -0.5715422630310059, -0.20244711637496948, 0.3103122413158417, -0.7480946779251099, 0.1971612572669983, -0.8236093521118164, -0.8158198595046997, 0.0767022967338562, 0.5480440258979797, 0.3609977662563324, 0.7137930989265442, 0.15517105162143707, -0.7102022767066956, -0.9074206948280334, ...
def squashrngcoo ( rng, apermol ) : if not checksymmetry ( rng ) : raise runtimeerror ( " graph is non - symmetrical " ) sh = rng. shape newsh = ( int ( sh [ 0 ] / apermol ), int ( sh [ 1 ] / apermol ) ) molrng = lil _ matrix ( newsh ) rng = coo _ matrix ( rng ) rows = rng. row / / apermol cols = rng. col / / apermol r...
[ 0.3684522211551666, 0.07445413619279861, 0.5869354009628296, -0.9490482807159424, -0.38056477904319763, -0.45713552832603455, 0.4954811930656433, -0.2298050820827484, 0.13895422220230103, 0.6181498765945435, 0.10940320789813995, -0.14405368268489838, 0.23185569047927856, -0.177734851837158...
def read _ fasta _ file ( fasta _ file ) : with open ( fasta _ file ) as fin : dnastring _ list = [ ] header, seq = none, " " for line in fin : line = line. rstrip ( ) if line. startswith ( " > " ) : if header : dnastring _ list. append ( ( header, seq ) ) header, seq = line [ 1 : ], " " else : seq + = line. rstrip ( )...
[ -0.6662582755088806, -0.9950032234191895, 0.460180401802063, -0.1850222945213318, -0.10051923245191574, 0.12469076365232468, -0.25296804308891296, 1.2986807823181152, 0.2684090733528137, 0.25589820742607117, 0.09047023952007294, -0.3275526165962219, -0.03557664155960083, 0.3609860241413116...
def set _ workers _ ip ( self, s, ip ) : self. workers _ info [ s ] ['comp _ ip'] = ip self. workers _ info [ s ] ['msg _ queue']. put ('ok') self. out _ sockets. append ( s ) self. logger. log _ event ('worker _ connected ', f " worker { self. workers _ info [ s ] ['comp _ ip'] } connected to the server " )
[ -0.4831721782684326, -0.787239134311676, 0.34356144070625305, -0.5219463109970093, -0.1201295331120491, -0.0928720012307167, -0.07275039702653885, -0.101788230240345, -0.017033234238624573, 0.8819435834884644, -0.7526652216911316, 0.4507259130477905, -0.14081187546253204, -0.71675610542297...
def _ reviewcurrentitem ( self, inputevent, targetcursorcell = 0, speechtype = 1 ) : context = self. getflatreviewcontext ( ) [ wordstring, x, y, width, height ] = \ context. getcurrent ( flat _ review. context. word ) # don't announce anything from speech if the user used # the braille display as an input device. # if...
[ -0.4467644989490509, -1.026201844215393, 0.6938769221305847, -0.25394779443740845, -0.8477823138237, 0.4337543547153473, -0.4743088483810425, -0.051844146102666855, -0.013051295652985573, 0.25643235445022583, 0.721798300743103, 0.5419522523880005, -1.1020854711532593, -0.0808911845088005, ...
def register _ vsec _ layer ( self, datasets, layer _ class ) : # loop over all provided dataset names. create an instance of the # provided layer class for all datasets and register the layer # instances with the datasets. for dataset in datasets : try : layer = layer _ class ( self. vsec _ drivers [ dataset ] ) excep...
[ -0.7378740310668945, 0.0845491886138916, 0.3057743310928345, 0.1381029486656189, 0.6658893823623657, -0.24705518782138824, -0.7574124932289124, -0.5095056891441345, -0.37726107239723206, 0.33577170968055725, -0.31630033254623413, 0.16700047254562378, 0.21480102837085724, 0.9473394751548767...
def phoneticspellcurrentitem ( self, itemstring ) : for ( charindex, character ) in enumerate ( itemstring ) : if character. isupper ( ) : voice = settings. voices [ settings. uppercase _ voice ] character = character. lower ( ) else : voice = settings. voices [ settings. default _ voice ] phoneticstring = phonnames. g...
[ -0.5819090008735657, -1.3589422702789307, 0.29900726675987244, -0.06397851556539536, 0.5978504419326782, 0.3555590510368347, -0.8691735863685608, -0.3915557265281677, 0.46235382556915283, 0.4688972234725952, 0.24413850903511047, -0.004418517928570509, -0.8973853588104248, -0.87264370918273...
def edge _ color ( lattice : lattice, n _ colors : int = 3, all _ solutions = false, n _ solutions = none, fixed = ( ) ) : s = solver ( name = " g3 " ) adjacency = lattice. edges. indices n _ edges = adjacency. shape [ 0 ] n _ reserved _ literals = n _ colors * n _ edges # define the integer literals we will use l = np...
[ -0.4510022699832916, 0.38058578968048096, 0.7989369630813599, 0.09695678949356079, 0.2813134789466858, -0.7443892955780029, -0.3441390097141266, -0.17032799124717712, 0.10265079885721207, 0.6871832013130188, -0.3763062059879303, -0.2293580323457718, 0.03172190114855766, 0.5933094620704651,...
def gldzip ( v, coeff, vn ) :'''# gridlab - d forces the coefficients to sum to 1 if they don't exactly. this screws things up. # todo : the application should run a custom gld build which doesn't do this. coeffsum = ( coeff ['power _ fraction'] + coeff ['current _ fraction'] + coeff ['impedance _ fraction'] ) if ( coe...
[ -0.01282213069498539, -0.6972748637199402, 0.6487349271774292, -0.8902689814567566, 0.17549178004264832, -0.7073971033096313, 0.480909138917923, 0.30990728735923767, 0.42763200402259827, 0.5303739905357361, -0.4990839660167694, 0.1875486522912979, 0.0131081473082304, -0.021558234468102455,...
def dome _ distortion ( x, projector _ points ) : # debug stuff global previous _ parameters global best _ sum _ of _ errors global best _ parameters " " " convert x into the parameters dictionary " " " parameters = x _ to _ parameters ( x, ( projector _ pixel _ width, projector _ pixel _ height ) ) if previous _ param...
[ -0.10757283121347427, 0.15363988280296326, 0.6294569969177246, -0.08137663453817368, -0.3556974530220032, 0.2434946447610855, 0.6808554530143738, -0.00923612155020237, 0.7434199452400208, -0.15134969353675842, 0.15749084949493408, 0.5075815320014954, 0.43386149406433105, 0.1642053574323654...
def add _ missing _ param ( setting ) : for param in all _ settings : try : missing _ param ( setting, param ) except settingmissing : setting [ param ] = " "
[ -0.661442220211029, 0.12010243535041809, 0.32503584027290344, -0.08343678712844849, 0.7581725716590881, 0.22649969160556793, -0.36943140625953674, -0.8834711313247681, -0.24957400560379028, 1.376747965812683, -0.22004318237304688, -0.27921998500823975, 0.04452910274267197, 1.62963688373565...
def generate _ rdkit _ mol ( smiles : str ) - > chem. mol : m = chem. molfromsmiles ( smiles ) m = chem. addhs ( m ) allchem. embedmolecule ( m ) return m
[ 0.123862124979496, 0.15060573816299438, 0.5973060727119446, 0.012483414262533188, -0.5165692567825317, 0.8117142915725708, -0.7466287016868591, -0.45690956711769104, 1.1851352453231812, -0.5856002569198608, -0.2018260359764099, -0.31436073780059814, 0.2119879573583603, 0.14367344975471497,...
def accepted _ ct ( self ) : return [ " document " ]
[ 0.2748725116252899, 0.3566252589225769, 0.18639400601387024, -0.17141366004943848, -0.5646153092384338, 1.1257513761520386, -0.0681147575378418, -0.06229479983448982, 0.11520320922136307, 0.007992446422576904, -0.10793741792440414, -0.33689984679222107, -0.005904529709368944, 0.63150459527...
def available ( self, credentials ) : try : conn = ftplib. ftp ( host = self. ftp _ settings [ " ftp _ endpoint " ], user = credentials ['username'], passwd = credentials ['password'] ) conn. quit ( ) return true except : return false
[ -0.5945566296577454, -0.22237998247146606, 0.47334223985671997, -0.38315555453300476, -0.6577790379524231, 0.6353622078895569, -0.7873809337615967, -0.26557105779647827, -0.6710785627365112, 0.25357067584991455, 0.22323186695575714, 0.0768086165189743, -0.8420644402503967, -0.2803717553615...
def media _ content _ id ( self ) - > str | none : item = self. _ currently _ playing. get ( " item " ) or { } return item. get ( " uri " )
[ 0.19888442754745483, -0.7524898648262024, 0.48945748805999756, 0.5745433568954468, -0.050702109932899475, -0.1032475009560585, 0.40379464626312256, -0.6688498854637146, 0.3597625494003296, 0.0834781602025032, 0.9894483685493469, 0.049255382269620895, -0.9111775755882263, -0.345851957798004...
def _ span _ days ( self, year : int ) - > int : return sum ( self. _ lunar _ year _ days ( y ) for y in range ( self. start _ year, year ) )
[ -0.38615357875823975, 0.7060583233833313, 0.4101487994194031, -0.8526878952980042, -0.5422421097755432, 1.050632357597351, 0.33166515827178955, -0.5949116349220276, 1.2583928108215332, -0.8351171612739563, -0.10866133868694305, 0.6082763671875, 0.0528397299349308, 0.39901894330978394, 0....
def test _ update _ record _ rejection _ multiple _ english _ lang _ entries ( ) : res = requests. post ( f'{ env. awg _ base _ url } / api / cve - id / ', headers = utils. base _ headers, params = {'amount': 1,'cve _ year': 2000,'short _ name':'mitre'} ) id _ num = json. loads ( res. content. decode ( ) ) ['cve _ ids'...
[ -0.131308451294899, 0.1348148137331009, 0.7212385535240173, -0.6011806130409241, 0.5298290252685547, 0.13973544538021088, -0.5797770023345947, 0.30501317977905273, -0.12045002728700638, 0.4112716317176819, -1.0996594429016113, 0.078603595495224, -0.18914081156253815, 0.23194243013858795, ...
def dhcp _ fingerprint ( fingerprint ) : url ='https : / / api. fingerbank. org / api / v2 / combinations / interrogate? dhcp _ fingerprint ='+ fingerprint +'& key ='+ key r = requests. get ( url = url ) if ( r. status _ code = = 200 ) : print ( r. json ( ) ['device'] ['name'] ) else : print ('# # # error on the finger...
[ -1.1468223333358765, 0.5884320139884949, 0.5247007608413696, 0.9681695699691772, 0.39672088623046875, -0.37335798144340515, 0.08169581741094589, -0.31006062030792236, 0.0138099892064929, -0.27424100041389465, -0.2322668731212616, -0.39150792360305786, -1.1574766635894775, 0.127269700169563...
def get _ image _ for _ item ( self, item _ value, item, lang ) : images = list ( self. get _ image _ statements ( item _ value ) ) if images : return ( commons _ image _ url ( images [ 0 ] ), lngfb ( item. get ('labels'), lang ) or id ) else : return ( fallback _ image _ url, fallback _ image _ alt )
[ -0.7304257750511169, -0.3992730975151062, 0.200327068567276, 0.017518339678645134, 0.5713146924972534, -0.3732890784740448, -0.5005187392234802, -0.1665303260087967, -0.37501218914985657, 0.7375220656394958, 0.3355422914028168, -0.4990285038948059, -0.09397750347852707, 0.5804237127304077,...
def test _ atomic _ id _ enumeration _ 3 _ nistxml _ sv _ iv _ atomic _ id _ enumeration _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - enumeration - 4. xsd ", instance = " nistdata / atomic / id / schem...
[ -0.42733320593833923, -0.9130201935768127, 0.4389866590499878, 0.2006016969680786, -0.7025823593139648, -0.007855638861656189, -0.13453006744384766, -0.41411152482032776, -0.031807791441679, 0.7436790466308594, -0.44182607531547546, -0.007880892604589462, 0.16702137887477875, -0.3445828258...
def get _ exchange _ auth ( exchange _ name, alias = none ) : exchange _ folder = get _ exchange _ folder ( exchange _ name ) name ='auth'if alias is none else alias filename = os. path. join ( exchange _ folder,'{ }. json '. format ( name ) ) if os. path. isfile ( filename ) : with open ( filename ) as data _ file : d...
[ -1.17161226272583, -0.6172507405281067, 0.7978100776672363, -0.5270305871963501, -0.7936826348304749, -0.026651939377188683, -0.409881591796875, 0.3272366225719452, 0.7453631162643433, 1.0312530994415283, -0.661115825176239, 0.5640878677368164, 0.2836230993270874, -0.09302403032779694, 0...
def findblank _ 8p ( state ) : return findblank ( state )
[ 0.0013195938663557172, -0.11759307980537415, 0.32539355754852295, -0.014314423315227032, 0.9023036956787109, 0.19162051379680634, 0.3282698690891266, -1.8191863298416138, 0.4724158048629761, 0.5354930758476257, 0.2529963254928589, 0.1523943543434143, -0.8089374303817749, -0.003453095676377...
def run ( self ) : while true : input _ tup = self. input _ queue. get ( ) if input _ tup is none : self. input _ queue. task _ done ( ) break func, args = input _ tup res = func ( args ) self. input _ queue. task _ done ( ) self. output _ queue. put ( res )
[ -0.8312699198722839, -0.5313141345977783, 0.38901808857917786, -0.1762901097536087, 0.6600908637046814, -0.22124096751213074, 0.8732802271842957, -0.313039630651474, -0.9924958348274231, -0.6773954033851624, -0.3585585057735443, -0.12266401946544647, -0.17556463181972504, 0.190332919359207...
def is _ on _ table ( self ) : return self. location. is _ valid ( )
[ -0.2933500409126282, -0.6646115183830261, 0.3943174481391907, 1.228655219078064, -0.3467027544975281, 0.41662007570266724, -0.5451020002365112, 0.3522125780582428, -0.07760591804981232, 0.21919584274291992, 0.1684112548828125, 0.4132769703865051, -0.07403739541769028, 0.23913756012916565, ...
def forward ( self, output, target ) : fake _ a, fake _ b, idt _ a, idt _ b = tuple ( map ( tensorbase, output ) ) # generators should return identity on the datasets they try to convert to self. id _ loss _ a = self. l _ idt * self. l _ a * f. l1 _ loss ( idt _ a, self. real _ a ) self. id _ loss _ b = self. l _ idt *...
[ -0.923130989074707, -0.16683246195316315, 0.6614543795585632, -0.7559248208999634, 0.19780562818050385, -0.1942608803510666, 0.6489567160606384, -0.17967332899570465, -0.7085585594177246, -0.4943087697029114, -0.23565955460071564, -0.10171195864677429, 0.5673590898513794, -0.44833636283874...
def user _ directory _ path ( filename ) : return'user _ files / rb _ documents / { 0 } '. format ( filename )
[ -0.17141284048557281, -0.7849404811859131, 0.20587889850139618, 0.6439719796180725, 0.159558966755867, 0.9136662483215332, 1.5570489168167114, -0.506399393081665, -0.22703817486763, -0.2733692228794098, 0.6435787081718445, 0.16567355394363403, -0.03130663186311722, 0.1519371122121811, -0...
def sort _ playlist ( lst = default ) : name _ list = default [ : ] path ='' full _ list = [ os. path. join ( path, i ) for i in name _ list ] time _ sorted _ list = sorted ( full _ list, key = os. path. getctime ) time _ sorted _ list. reverse ( ) sortobj = playlist ( time _ sorted _ list ) sortobj. show _ playlist ( ...
[ -0.2892114520072937, 0.03249046951532364, 0.711447536945343, 0.6761646866798401, -0.0024102970492094755, 0.14672203361988068, 0.7116807699203491, -0.5650790333747864, -0.4532419443130493, 0.8551884293556213, -1.0164867639541626, -0.15272077918052673, -0.3425154387950897, 0.7903807759284973...
def set _ position _ mode ( self, position _ mode : positionmode ) : self. _ position _ mode = position _ mode return
[ -0.838750958442688, -0.631908655166626, 0.19163501262664795, 0.3442321717739105, 0.8577848672866821, 1.3046314716339111, 0.21380865573883057, 0.3699849247932434, -0.32280367612838745, 0.04738935828208923, -0.8257527947425842, -1.3569588661193848, -0.13376198709011078, -0.3254786431789398, ...
def primefactorization ( n ) : if n = = 1 : yield 1 pf = 2 while n > 1 : while n % pf = = 0 : n / / = pf yield pf pf + = 1
[ -0.6647251844406128, 1.3118363618850708, 0.5148951411247253, 0.31351137161254883, -0.14479447901248932, -0.32291144132614136, 0.5051752924919128, -0.05208004266023636, 0.41463229060173035, -1.0738890171051025, -0.5760512351989746, -0.6217735409736633, -1.1596317291259766, 0.795880973339080...
def _ _ init _ _ ( self, path = '. / ', username = none, password = none, url = default _ url, threads = max _ workers ) : self. url = url # leverage basic request / urllib3 functionality as much as possible : # persistent sessions, connection pooling, retry management self. session = requests. session ( ) self. sessio...
[ 0.025882089510560036, 0.2003277987241745, 0.7053035497665405, 0.6949487328529358, 0.04573937878012657, 0.01770169846713543, -0.3513208329677582, 0.046919673681259155, 0.7068565487861633, -0.7017338871955872, -0.12060146778821945, 0.3775951564311981, -0.6216892600059509, -0.8356786370277405...
def drag _ and _ drop _ to ( self, from _ name, to _ name ) : from _ selector = self. wait _ for _ element _ found ( from _ name,'button / input / a / img / div ','this') to _ selector = self. wait _ for _ element _ found ( to _ name,'button / input / a / img / div ','this') self. drag _ and _ drop _ to ( from _ select...
[ -1.5143202543258667, -0.6947156190872192, 0.8389554023742676, -0.2647535800933838, 0.3323197662830353, 0.014553460292518139, -0.11286522448062897, -0.20027458667755127, -0.5179179906845093, -0.34629571437835693, -0.610284149646759, 0.009251289069652557, 1.0785913467407227, 0.14018876850605...
def triangulate ( self, allow _ primitive _ restarts : bool, include _ degenerate _ faces = false ) - > tp. list [ int ] : if not self. triangle _ strip : return self. vertex _ indices. copy ( ) triangle _ list = [ ] flip = false for i in range ( len ( self. vertex _ indices ) - 2 ) : triplet = self. vertex _ indices [...
[ -0.9006009101867676, 0.7563053965568542, 0.47908681631088257, 0.21492749452590942, 0.0386834591627121, 0.4451415240764618, 0.2150934934616089, 0.3781696856021881, 0.5475571155548096, 0.47713205218315125, -0.30629807710647583, 0.4442163109779358, -0.41484054923057556, -0.8876706957817078, ...
def verificar _ datos ( self, request, context ) : action = request. post. get ('action ','' ) if action = ='' or action not in [ " json ", " html " ] : context ['action _ error'] ='true'logger. error ( " error action param, origin _ block _ id : { }, dest _ block _ id : { }, action : { }, user : { } ". format ( contex...
[ -0.5668721795082092, 0.06277730315923691, 1.3693619966506958, 0.8203377723693848, 0.13495327532291412, 0.2757273018360138, 0.04460524022579193, -0.9456151127815247, 0.04594818130135536, 0.9211981296539307, 0.5066114068031311, 1.029319167137146, 0.3140336573123932, 0.3946244716644287, 0.5...
def vendor _ id ( self, vendor _ id ) : self. _ vendor _ id = vendor _ id
[ 0.635120153427124, -0.6012904644012451, -0.028471648693084717, 0.9107406139373779, -0.010761212557554245, 0.9483354687690735, 0.6271805763244629, 1.5341891050338745, 0.3634624183177948, 0.002647595014423132, -0.5210480093955994, 0.4687190055847168, 0.5005460977554321, 1.6464422941207886, ...
def test _ outbound _ msg _ count ( self ) : _, all _ keys = ( yield self. msg _ seq _ helper. create _ outbound _ message _ sequence ( msg _ count = 3 ) ) self. assertequal ( len ( all _ keys ), 3 ) self. assertequal ( len ( self. backend. outbound ), 3 )
[ -0.20300209522247314, 0.6160483360290527, 0.5385646820068359, -0.3880615234375, 0.8582940697669983, 0.688984751701355, -0.9694914817810059, -0.4903886020183563, -0.8425185680389404, 0.25387176871299744, -1.0013213157653809, -0.394393652677536, -0.6657811999320984, 0.39835217595100403, 0....
def test _ detect _ hooks ( self ) : standard _ library. install _ hooks ( ) if utils. py2 : self. asserttrue ( standard _ library. detect _ hooks ( ) ) meta _ path = copy. copy ( sys. meta _ path ) standard _ library. remove _ hooks ( ) if utils. py2 : self. assertequal ( len ( meta _ path ), len ( sys. meta _ path ) ...
[ 0.16991594433784485, 0.18012790381908417, 0.5421013832092285, 1.0525668859481812, 0.9638753533363342, 0.8361065983772278, 0.9955894351005554, 0.28625166416168213, -0.07740820944309235, -0.2926405668258667, 0.001256906078197062, -0.3749261796474457, -0.2948545217514038, 0.3966783583164215, ...
def compare _ cow _ transport _ algorithms ( ) : def print _ results ( filename ) : dict = load _ cows ( filename ) print ( filename ) print ( ) start = time. time ( ) result = greedy _ cow _ transport ( dict, 10 ) end = time. time ( ) print ('greedy time ( in seconds ) : { } '. format ( end - start ) ) print ('greedy ...
[ -0.2761974632740021, 0.4107636511325836, 0.6497028470039368, -0.14485685527324677, 0.7288572192192078, 0.26362550258636475, 0.355874627828598, -1.0359890460968018, -1.5790947675704956, 0.5455904603004456, -1.624513864517212, 0.5876641869544983, 0.658390998840332, 0.5159856677055359, 0.48...