text
stringlengths
25
2.19k
embedding
listlengths
768
768
def register ( ) : print ( f " attempting to register for { hw _ id }... " ) reply = send _ request ( json. dumps ( {'type':'register ','device _ id': hw _ id,'email': email } ) ) if reply ['status'] : print ( " registration done " ) else : print ( " registration failed " )
[ -0.7899613976478577, 1.6721800565719604, 0.47927162051200867, 0.7050829529762268, 1.5291016101837158, -0.1312134861946106, -0.5811453461647034, -0.7437824010848999, -0.9602681994438171, -0.5931554436683655, -0.5536118745803833, 0.8868701457977295, -0.8858957886695862, 0.5369096398353577, ...
def to _ models ( self ) - > list [ tuple [ tuple [ int, int, int ], tuple [ int, int, int ], list [ tuple [ int, int, int, int ] ] ] ] : models = [ ] num _ x _ blocks = ceil ( self. x _ size / 126 ) num _ y _ blocks = ceil ( self. y _ size / 126 ) num _ z _ blocks = ceil ( self. z _ size / 126 ) for block _ z in range...
[ -0.653569757938385, 0.24474327266216278, 0.8952329158782959, -0.15209315717220306, 0.345981627702713, -0.2880503535270691, 0.37959298491477966, -0.44746336340904236, -0.07563995569944382, 0.5317345261573792, -0.9387772679328918, -0.9504854679107666, 0.041183456778526306, 0.0110782049596309...
def remove _ value ( self, data ) : if self. is _ empty ( ) : raise valueerror ( " linked list is empty. " ) current = self. head while current is not none : if current. data = = data : if current. prev is none : # at the head of the list self. pop _ front ( ) elif current. next is none : # at the tail of the list self...
[ 0.2691228985786438, 0.2006935179233551, 0.6647697687149048, -0.6379725337028503, -0.8570359349250793, -0.4700999855995178, 0.09409088641405106, 0.006481092423200607, 0.6503776907920837, 0.1359790861606598, -0.4192745089530945, 0.332793265581131, -1.6501498222351074, 0.13591985404491425, ...
def _ float _ feature ( value ) : return tf. train. feature ( float _ list = tf. train. floatlist ( value = [ value ] ) )
[ 0.328090101480484, 0.2939801812171936, 0.33555275201797485, -0.12082258611917496, 0.22235724329948425, -0.16455817222595215, -0.09607230871915817, 0.6071436405181885, -0.48317983746528625, -0.771714448928833, -1.4608293771743774, 0.049659568816423416, 0.026276329532265663, 0.07601766288280...
def draw _ graph ( df : dataframe, queries ) : fig, ax = plt. subplots ( ) x = np. arange ( len ( df ) ) rects _ ssd = ax. bar ( x - bar _ width / 2, df [ col _ ssd ], bar _ width, label = col _ ssd ) rects _ nvme = ax. bar ( x + bar _ width / 2, df [ col _ nvme ], bar _ width, label = col _ nvme ) autolabel ( rects _ ...
[ 0.3725751042366028, 0.6162336468696594, 0.9933106303215027, -0.2947865426540375, -0.40376606583595276, 0.9850060343742371, 0.9557057619094849, 0.07372833788394928, 0.012530793435871601, 0.025578074157238007, 0.35704919695854187, 0.2593929171562195, 0.20657570660114288, -0.511375367641449, ...
async def async _ oscillate ( self, oscillating : bool ) - > none : if self. _ set _ oscillating _ script is none : return self. _ oscillating = oscillating await self. async _ run _ script ( self. _ set _ oscillating _ script, run _ variables = { attr _ oscillating : self. oscillating }, context = self. _ context, )
[ 0.327818900346756, 0.47409114241600037, 0.40213918685913086, 0.40959516167640686, 0.6037324070930481, -0.31301286816596985, 0.5796844959259033, -0.1867460459470749, -0.3088618516921997, 0.14261692762374878, 0.4510739743709564, 0.9444127082824707, 0.0010968646965920925, 0.2089468389749527, ...
def recover _ transactions ( transactions ) : [ access _ token, expire _ time ] = get _ access ('','' ) account _ data = get _ account ( access _ token ) positions = account _ data ['securitiesaccount'] ['positions'] orders = account _ data ['securitiesaccount'] ['orderstrategies'] # reset transactions limit buy id and...
[ 0.2191026210784912, -0.7155970335006714, 0.7717109322547913, -0.3730701804161072, 0.024018028751015663, -0.8682303428649902, 0.46525323390960693, -0.00482718413695693, 0.08500564843416214, 0.7055037021636963, -0.3063468039035797, 0.034031402319669724, 0.345019668340683, -0.8869898319244385...
def delete _ previous ( cursor, huc12 ) : cursor. execute ( " " " delete from flowpath _ points p using flowpaths f where p. scenario = % s and p. flowpath = f. fid and f. huc _ 12 = % s and f. scenario = % s " " ", ( scenario, huc12, scenario ), ) cursor. execute ( " " " delete from flowpaths where scenario = % s and ...
[ 1.0631649494171143, 0.07431088387966156, 0.6242045164108276, 0.16135893762111664, 0.18898649513721466, -0.42798662185668945, 1.531529426574707, 0.5672507882118225, -0.3516201078891754, 0.34796959161758423, 0.5150324702262878, -0.41694748401641846, -0.22000214457511902, -0.2052990049123764,...
def find _ n _ purge _ dups ( ) : # # # todo # # # find duplicate mbids in db dupfiles = dba. get ( " mb _ id duplicates, sort desc by quality index " ) duplicatesfound = len ( dupfiles ) reportbuilder. update ( duplicates _ found = duplicatesfound ) while duplicatesfound > 1 : for this _ file in dupfiles : dba. delete...
[ 0.4456910789012909, 0.433822900056839, 0.5380905270576477, -0.26356008648872375, 0.21479643881320953, -0.903867781162262, 0.815709114074707, -0.13799171149730682, 0.624172031879425, -0.08408821374177933, -0.35177820920944214, -0.08112233132123947, -0.3709024488925934, 1.285874366760254, ...
async def test _ flow _ with _ unknown _ 2fa ( hass, aioclient _ mock ) : from homeassistant. components. hangouts. hangups _ utils import googleautherror flow = config _ flow. hangoutsflowhandler ( ) flow. hass = hass with patch ( " homeassistant. components. hangouts. config _ flow. get _ auth ", side _ effect = goog...
[ -0.30953454971313477, -0.06549739837646484, 0.3433683216571808, 1.1387436389923096, 0.564185380935669, 0.37556812167167664, 0.5755609273910522, 0.06449253857135773, -0.032455433160066605, -0.8086416125297546, -0.8627294301986694, 0.36674562096595764, 0.4380079209804535, 0.5649909973144531,...
def init _ object ( self, obj _ spec ) : if " dkeys " not in obj _ spec : raise runtimeerror ( " no dkeys in object spec % s " % obj _ spec ) oid = self. next _ object self. next _ object + = 1 # zero means distribute across all available targets num _ of _ targets = obj _ spec. get ( " targets ", 0 ) if num _ of _ tar...
[ -1.2596863508224487, 0.45958977937698364, 0.7391414642333984, -0.15243400633335114, 0.38652512431144714, -0.07734556496143341, 1.267271876335144, -0.027221189811825752, 0.11300057172775269, 0.24146074056625366, -0.41874760389328003, 0.29333844780921936, 0.5862963199615479, -0.0799752995371...
def sample _ prob ( probs ) : return tf. to _ float ( tf. random _ uniform ( tf. shape ( probs ) ) < = probs )
[ 0.742870569229126, -0.4186841547489166, 0.2340925931930542, -0.40049028396606445, -0.32457640767097473, 0.6032669544219971, -0.46435073018074036, -0.5008828639984131, 0.4162169098854065, 0.7948219180107117, 0.35532984137535095, 0.006635783705860376, -0.7142900824546814, -1.1636695861816406...
def _ _ init _ _ ( self, config _ entry : config _ entries. configentry ) - > none : self. config _ entry = config _ entry self. options = dict ( config _ entry. options ) self. options. setdefault ( conf _ weather _ areas, { } )
[ 0.2976357042789459, -0.2163219004869461, 0.23697951436042786, -0.26224976778030396, 0.15813250839710236, 0.15023936331272125, 0.6265257000923157, 0.5870135426521301, 0.44664353132247925, 0.8288713097572327, 0.25591790676116943, -0.02071443945169449, 0.5516120791435242, 1.4686156511306763, ...
def readcommand ( self ) : # pragma : no cover completer = command. completer ( sorted ( command _ factory. factory. mapping. keys ( ) ) ) readline. set _ completer ( completer. complete ) readline. parse _ and _ bind ('tab : complete') readline. set _ completer _ delims ('' ) return utils. read ( _ ('command _ prompt'...
[ -0.04315328970551491, -1.0071980953216553, 0.5890052914619446, 0.3138750195503235, 0.01464576181024313, 0.1305590122938156, -0.15443864464759827, -0.5646674633026123, -0.8560012578964233, -0.5067791938781738, 0.529838502407074, -0.27235910296440125, 1.0333138704299927, -0.6248190402984619,...
def hide ( self ) : self. _ main. send ( " hidecontactlistwidget ", [ ] ) pass
[ -0.3762582242488861, -0.12193847447633743, 0.19113151729106903, 0.31814044713974, 0.2781083881855011, 0.7711831331253052, 1.1721729040145874, 0.7791916728019714, 0.22534999251365662, -0.45216450095176697, -0.9237855076789856, 0.023884937167167664, -0.8788540959358215, -0.12642896175384521,...
def test _ mutual _ info _ score ( self, preds, target, ddp ) : self. run _ class _ metric _ test ( ddp = ddp, preds = preds, target = target, metric _ class = mutualinfoscore, reference _ metric = sklearn _ mutual _ info _ score, )
[ -0.5972988605499268, 0.15390662848949432, 0.5966198444366455, -0.02942299097776413, 0.841084897518158, 1.1996692419052124, -0.2608517110347748, -0.48864510655403137, -0.35238873958587646, -0.24556533992290497, 0.84788978099823, 0.39271143078804016, 0.1661357581615448, -0.17336127161979675,...
def channel ( self, snowflake : int ) - > typing. dict : data = fetch ( base _ url + fetch _ channel. format ( snowflake ), headers = { " authorization " : f " { self. token _ type } { self. token } " }, ) return data
[ -0.1899642050266266, 0.7970197200775146, 0.1872316598892212, -0.4488676190376282, -0.12068365514278412, -0.6779952645301819, -1.1156785488128662, -0.7732931971549988, -0.31777602434158325, -0.09936978667974472, 0.2697853744029999, 1.5822240114212036, 0.4849987030029297, 0.4268173277378082,...
def monkey _ patch ( self, obj, field, value ) : if not hasattr ( self,'_ monkey _ patches') : self. _ monkey _ patches = [ ] real _ value = getattr ( obj, field ) self. _ monkey _ patches. append ( ( obj, field, real _ value ) ) setattr ( obj, field, value )
[ -0.7839069366455078, -0.09562468528747559, 0.6832126379013062, -0.37222903966903687, -0.567041277885437, 0.7189786434173584, -0.27433067560195923, -0.05072517320513725, 0.3213980197906494, -0.17288219928741455, -1.6779274940490723, 0.13891074061393738, 0.3597854673862457, 0.610404491424560...
def unpack ( ext : str, source : io [ bytes ], dest _ path : str ) : try : if ext = = '. tar. gz'or ext = = '. tgz': un _ tar _ directory ( source, dest _ path,'gz') elif ext = = '. tar. bz2': un _ tar _ directory ( source, dest _ path,'bz2') elif ext = = '. bz2': un _ bz2 _ file ( source, dest _ path ) elif ext = = '....
[ 0.41499632596969604, 0.41304290294647217, 0.7350610494613647, 0.1113637387752533, -0.45875999331474304, -0.12884566187858582, 0.2409958839416504, 0.3736076056957245, 0.24036674201488495, 0.38414517045021057, -0.3594321608543396, 0.34995582699775696, 1.011436104774475, -0.5166121125221252, ...
def first _ last _ k ( coords ) : k = 5 partial = [ coords [ 0 ] for i in range ( 2 * k ) ] num _ coords = len ( coords ) if num _ coords < 2 * k : partial [ - num _ coords : ] = coords else : partial [ : k ] = coords [ : k ] partial [ - k : ] = coords [ - k : ] partial = np. row _ stack ( partial ) return np. array ( ...
[ -0.3422645032405853, -0.36618945002555847, 0.594261884689331, -0.37057122588157654, 0.19467033445835114, -0.667831301689148, 0.4935343265533447, -0.1504022777080536, -0.48975226283073425, 0.5437835454940796, -0.7678408026695251, -0.009987403638660908, -0.3892528712749481, -0.29245287179946...
async def voices ( self ) - > voicesiterable : yield voice ( " ", " ", " ", " ", " " )
[ 0.04028349369764328, -0.24280115962028503, 0.47714710235595703, -0.024158410727977753, 1.2691535949707031, -0.06807444244623184, -1.467893123626709, -1.1386933326721191, -0.5824769735336304, 0.07888093590736389, 0.11891693621873856, 0.309077650308609, -0.10293346643447876, 0.52755230665206...
def stream _ processing _ time ( self ) - > optional [ str ] : return self. _ _ stream _ processing _ time
[ 0.48368823528289795, -0.17123356461524963, 0.6371996998786926, -0.3160002529621124, 0.16809512674808502, 0.8833720088005066, -0.3418527841567993, -0.4698655903339386, 0.13396543264389038, 0.8186385631561279, 0.15704119205474854, 0.6256756782531738, -0.6521967649459839, 0.3866523504257202, ...
def insertion _ sort ( items ) : for i in range ( 1, len ( items ) ) : j = i while j > 0 and items [ j ] < items [ j - 1 ] : items [ j ], items [ j - 1 ] = items [ j - 1 ], items [ j ] j - = 1 return items
[ -1.1768040657043457, 0.25992724299430847, 0.47746145725250244, 0.007948166690766811, 0.28370028734207153, 0.10212154686450958, 0.6740871071815491, -0.7392755746841431, -0.4781268537044525, 0.9824423789978027, -0.7367014288902283, -0.031916700303554535, -1.3088394403457642, 0.42128285765647...
def payoff ( self, k, combo = none ) : payoffs, strikes = combo if combo else self. heston _ fft ( ) left = 0 right = len ( strikes ) - 1 while right - left > 1 : mid = ( left + right ) / / 2 if strikes [ mid ] < = k : left = mid else : right = mid slope = ( payoffs [ right ] - payoffs [ left ] ) / ( strikes [ right ] ...
[ 0.5207265615463257, 0.634867250919342, 0.4704125225543976, 0.007830584421753883, -0.741044819355011, 0.34899431467056274, 0.09867244213819504, 0.6582836508750916, 0.1719152182340622, 0.636480987071991, -0.15755659341812134, -1.2653323411941528, -0.20053958892822266, 0.156359001994133, -0...
def add ( self, batch : samplebatchtype, * * kwargs ) - > none : assert batch. count > 0, batch warn _ replay _ capacity ( item = batch, num _ items = self. capacity / batch. count ) # update our timesteps counts. self. _ num _ timesteps _ added + = batch. count self. _ num _ timesteps _ added _ wrap + = batch. count i...
[ -0.12304042279720306, 0.3706994354724884, 0.6074092388153076, 0.4147816598415375, 0.40933212637901306, 0.08974261581897736, 0.4031347930431366, -0.37365785241127014, 0.28835394978523254, -0.16598016023635864, -0.3340762257575989, 0.5625087022781372, -0.14776399731636047, -0.033552095293998...
def get _ shipping _ address ( self ) : addr _ data = self. checkout _ session. new _ shipping _ address _ fields ( ) if addr _ data : # load address data into a blank address model return shippingaddress ( * * addr _ data ) addr _ id = self. checkout _ session. user _ address _ id ( ) if addr _ id : try : return usera...
[ 0.14692537486553192, -0.07685035467147827, 0.6525006890296936, 0.36363503336906433, 0.018268516287207603, -0.5034234523773193, -0.10576752573251724, -0.5879403948783875, 1.3899545669555664, 0.08870690315961838, 0.13967719674110413, 0.7415191531181335, 0.009662284515798092, -0.5542462468147...
def _ _ delattr _ _ ( self, name ) : del self [ name ]
[ -0.1687747985124588, -1.3989776372909546, 0.7604930400848389, -1.7038718461990356, -1.930345892906189, 0.10411413013935089, -0.05997495353221893, -0.011780149303376675, 0.4654529094696045, 0.414799302816391, -0.16671587526798248, -0.15561823546886444, 0.6585479974746704, 0.1551382094621658...
def update _ db ( quarter, data ) : print ( " updating information in database. " ) keys _ exclude = {'restrictions ','code ','description ','title ','prerequisites ','units ','dei ','key ','waitlist ','podcast'} database = firebase. firebaseapplication ( firebase _ db ) for course in data : path = " / quarter / " + qu...
[ -0.793523371219635, -0.4110371172428131, 0.7615416049957275, -0.7455213665962219, -0.320359468460083, 0.4264414608478546, 0.3208613395690918, -0.13365142047405243, 0.2224952131509781, 0.36562082171440125, -0.2036333978176117, -0.702603280544281, 0.01317049004137516, 0.5298110246658325, -...
def _ _ init _ _ ( self, s, r, sigma, t, q = 0. 0 ) : cev. _ _ init _ _ ( self, s, r, sigma, t, 0. 0, q )
[ 1.4248250722885132, -0.5879896283149719, 0.5473989844322205, 1.2012524604797363, -0.34802791476249695, 0.24558286368846893, -0.1363142728805542, 0.20453819632530212, 0.26274633407592773, 0.14334389567375183, -0.2920886278152466, 0.046946559101343155, 0.9718129634857178, 0.5837976932525635,...
def send _ sms ( ser, recipient, message ) : ser. write ('at + cmgf = 1 \ r') res = wait _ for _ strs ( ser, ['ok'] ) ser. write ('at + cmgs = " % s " \ r'% recipient ) time. sleep ( 0. 5 ) ser. write ('% s \ r'% message ) ser. write ( chr ( 26 ) ) res = wait _ for _ strs ( ser, ['ok ','error'] ) if'error'in res : retu...
[ -0.6809199452400208, -0.20723368227481842, 0.4643450379371643, 0.1918225735425949, -0.7103211283683777, -0.7820808291435242, -0.06728102266788483, -0.44419413805007935, -0.44720175862312317, 0.09516876190900803, -0.747694194316864, 0.39081743359565735, -0.5550524592399597, -0.0430671758949...
def get _ database _ folder ( folder _ tag ) : if folder _ tag = ='database': folder _ tag ='db _ dump'return os. path. join ( _ project _ root _ dir,'database ', folder _ tag )
[ 0.18666012585163116, 0.8338983654975891, -0.004390109330415726, 0.10559046268463135, 0.5896013975143433, 0.2037128210067749, 0.5390337109565735, -0.4392320215702057, -0.7012633085250854, -0.1781240850687027, 0.3600477874279022, 0.5627416372299194, -0.2154109925031662, 1.3120390176773071, ...
def evaluate _ model ( model, x _ test, y _ test, category _ names ) : y _ pred = model. predict ( x _ test ) y _ pred _ df = pd. dataframe ( y _ pred, columns = y _ test. columns ) for column in y _ test. columns : print ('{ } classification report '. format ( column ) ) print ( classification _ report ( y _ test [ co...
[ 0.07144534587860107, -0.14179866015911102, 0.379589319229126, -0.49107274413108826, 0.034772757440805435, 0.2833192050457001, -0.16434252262115479, 0.4681084454059601, -1.5091147422790527, -0.6409432888031006, -0.21491287648677826, 0.6157969832420349, 0.8531659841537476, 0.2090101391077041...
def load _ aot _ archive _ day ( day : str ) : # load tar file from url url = f'https : / / s3. amazonaws. com / aot - tarballs / chicago - complete. daily. { day }. tar'r = requests. get ( url ) temp _ dir = path ('data / ignore') write _ path = temp _ dir /'data. tar'# write locally - todo : do this in memory with op...
[ -0.6754818558692932, -0.06319903582334518, 0.7376303672790527, -0.5684160590171814, 0.2307392954826355, 0.11118761450052261, 0.1731317788362503, -0.46088406443595886, -0.2573698163032532, -0.009847838431596756, 0.6632624864578247, 0.21889664232730865, 0.6936357617378235, -0.577005505561828...
def calc _ levenshtein _ loss ( model, eval _ set, summary _ manager = none, step = none ) : total _ words = 0 total _ phonemes = 0 wer = 0 per = 0 edit _ distances = [ ] # sample _ pts = np. random. randint ( 10, size = 5 ) gd _ sampled = [ ] op _ sampled = [ ] inp _ sampled = [ ] count = 0 for bucket _ id in range ( ...
[ -0.18402333557605743, -0.6019951105117798, 0.8726904392242432, -0.08561335504055023, -0.5785048604011536, -0.12975279986858368, -0.13172054290771484, 0.0027915039099752903, -0.33037492632865906, -0.26472195982933044, -0.19807159900665283, 0.15761081874370575, -0.05147384852170944, 0.500493...
def load _ label _ encoder ( index _ col : str = " label _ index ", label _ col : str = " label _ text ", origional = false ) - > pp. multilabelbinarizer : if origional : load _ from = str ( _ label _ encoding _ parquet _ file ) + ". origional " else : load _ from = str ( _ label _ encoding _ parquet _ file ) labs = pd...
[ -0.10701020807027817, -0.6560690402984619, 0.7289844155311584, 0.055054113268852234, -0.4624953866004944, 0.9001932740211487, -0.4167117476463318, 0.003948035184293985, -0.4388062059879303, 0.2666105329990387, 0.3185628354549408, 0.5190533399581909, -0.30778002738952637, -0.042569249868392...
def format _ hgvs _ name ( chrom, offset, ref, alt, genome, transcript, use _ prefix = true, use _ gene = true, use _ counsyl = false, max _ allele _ length = 4 ) : hgvs = variant _ to _ hgvs _ name ( chrom, offset, ref, alt, genome, transcript, max _ allele _ length = max _ allele _ length, use _ counsyl = use _ couns...
[ 0.2525969445705414, -0.4207860231399536, 0.6793132424354553, 0.09293243288993835, -0.6034678816795349, -0.1804957389831543, -0.5844734907150269, -0.18638813495635986, -0.45142412185668945, 0.9305645227432251, 0.7594718933105469, 0.8326509594917297, 0.926840603351593, -0.15362264215946198, ...
def editdistance ( word0, word1 ) : width = len ( word0 ) + 1 height = len ( word1 ) + 1 distance _ matrix = np. zeros ( ( width, height ) ) # initialize with insertion cost for i in range ( height ) : distance _ matrix [ 0 ] [ i ] = i for i in range ( width ) : distance _ matrix [ i ] [ 0 ] = i # generate distance mat...
[ 0.08402729034423828, -0.24721914529800415, 1.0017286539077759, -0.8827459812164307, -0.7882052659988403, -0.5906553268432617, 0.9450500011444092, 0.4793788194656372, -0.19627496600151062, 1.1808550357818604, -0.19674508273601532, 0.9442159533500671, -1.0575042963027954, 0.26629889011383057...
def betterevaluationfunction ( currentgamestate ) : util. raisenotdefined ( )
[ -0.17902034521102905, -0.5644029974937439, 0.3275987505912781, 0.014028341509401798, 0.4303450286388397, -0.45353060960769653, 0.27087733149528503, -0.11414353549480438, -0.43269890546798706, 0.15504534542560577, 0.11362843215465546, 1.2775523662567139, 0.5101964473724365, -0.0674114003777...
def is _ user _ mention ( text ) : return user _ mention _ rp. fullmatch ( text ) is not none
[ 0.6039475202560425, -0.8285080790519714, 0.24282371997833252, 1.0261603593826294, -0.24192382395267487, 0.3658820390701294, 0.5553243160247803, 0.5433827042579651, 0.9267983436584473, 0.8830841779708862, -0.2965977191925049, 0.3725581467151642, -1.1236729621887207, 0.25467449426651, -1.0...
def vault _ address ( self ) : return self. _ data. get ('inputs ', { } ). get ('hashi _ vault _ addr')
[ 0.25648775696754456, -0.5628331899642944, 0.38574907183647156, 0.9687731266021729, 0.4273800849914551, 0.42673447728157043, 0.326374888420105, -0.8614521622657776, 0.7908514738082886, -0.5239660739898682, 0.25101736187934875, 0.4083213806152344, 0.003441333770751953, -0.369156152009964, ...
def maximum _ capture _ duration ( self ) - > pulumi. output [ optional [ int ] ] : return pulumi. get ( self, " maximum _ capture _ duration " )
[ 0.4701519012451172, -0.5228115320205688, 0.32568755745887756, 1.5890694856643677, 0.456392377614975, 0.834032416343689, -0.41053399443626404, -0.34119361639022827, 1.244737982749939, 0.25231656432151794, -0.2166418731212616, 0.4767492711544037, 0.7582268118858337, -0.5524182915687561, -0...
def idleradd ( self, func ) : raise notimplementederror
[ -1.0876623392105103, 0.12886574864387512, 0.5387219786643982, -0.2843480110168457, 1.2076187133789062, 1.2558709383010864, 0.3072482645511627, -0.5132789611816406, 0.3947795331478119, -0.4935551583766937, -0.1795184314250946, 0.758280336856842, -0.26759424805641174, 0.1923569291830063, -...
def cyclic _ encode ( x ) : g = 0b11101101001 codeword = 0 for i in range ( 21 ) : codeword < < = 1 if x & 1 : codeword ^ = g x > > = 1 return codeword
[ 0.2727639079093933, 1.0269079208374023, 0.582699716091156, 0.5770923495292664, -0.5354499220848083, 0.36448895931243896, 0.8206472396850586, -0.8932571411132812, 0.5577948689460754, 0.12528064846992493, -0.3391607701778412, 1.869502067565918, -1.1820919513702393, 0.5390466451644897, 1.37...
def _ should _ end _ testing ( self, previous, obs ) : return ( self. test _ only _ changes = = 1 and not self. _ change _ detected ( previous, obs ) ) or ( self. test _ only _ changes = = - 1 and self. _ change _ detected ( previous, obs ) )
[ -0.5340907573699951, 0.5566385984420776, 0.5054636001586914, 0.528714120388031, -0.24653898179531097, 0.4616628885269165, 0.31218093633651733, 0.3751322329044342, 0.17059151828289032, 0.45611777901649475, 0.5698330402374268, 0.5049911737442017, -1.2833733558654785, 1.0346370935440063, -0...
def randlowch ( ) - > int : return randint ( 0, 2 ) * 64
[ 0.4602840542793274, 0.20570357143878937, 0.5911855101585388, -1.0112121105194092, -0.09229183197021484, 0.3796933591365814, 0.055503349751234055, -0.6956252455711365, 0.3338994085788727, -1.3150520324707031, -0.08894093334674835, 0.31491589546203613, -0.4338819980621338, -0.187646955251693...
def set _ enabled ( enabled : bool ) - > noreturn : deletebuttonview. _ _ button. setenabled ( enabled )
[ 0.244421124458313, 0.42336058616638184, 0.44690006971359253, 0.7307285070419312, 0.2927866280078888, 0.4092632830142975, -0.03092862106859684, 1.3075361251831055, 0.7657061815261841, -0.8171323537826538, -1.14056396484375, 0.40612566471099854, -1.0064747333526611, 0.0011914577335119247, ...
def _ http _ request ( url ) : f = urllib. urlopen ( url ) code = f. getcode ( ) if code = = 503 : raise servererror ('server overloaded ( 503 )') elif code! = 200 : raise servererror ('http error { 0 } '. format ( code ) ) return f. read ( )
[ -1.3130567073822021, 0.2522485554218292, 0.561581552028656, -0.38882774114608765, -0.7290247678756714, -0.4853583872318268, -0.8039355278015137, -0.35733067989349365, -0.3903239071369171, 0.04698813706636429, 0.5218918919563293, 0.36802029609680176, -0.44121068716049194, -0.888119816780090...
def image ( src, * * kwargs ) : args = kwargs. copy ( ) args [ " alt " ] = kwargs. get ( " alt ", osp. basename ( src ) ) return wrap _ html ( " ", " img ", src = src, * * args )
[ -0.4249339699745178, 0.5207192897796631, 0.4356326162815094, -0.3052619993686676, -0.590067446231842, 0.4875904321670532, -0.8941306471824646, 0.5316711664199829, -0.41372430324554443, 0.6422477960586548, 1.0698596239089966, 0.792310357093811, 0.8405057787895203, 0.5435248017311096, -0.0...
async def createissuegreeting ( gl, event ) : url = f " / projects / { event. project _ id } / issues / { event. object _ attributes ['iid'] } / notes " message = f " thanks for the report @ { event. data ['user'] ['username'] }! i have created the desciption and labels for this issue, while also linking it to your mer...
[ 0.34061941504478455, 0.37382400035858154, 0.7692425847053528, -0.32332029938697815, 1.083060383796692, 0.9980502128601074, -0.4433125853538513, 0.13384820520877838, -0.31722235679626465, -0.20908714830875397, -0.17731152474880219, 0.1512337177991867, -1.2086716890335083, 0.8716642260551453...
def set _ now _ to ( self, now ) : self. _ now = now
[ -0.6081724166870117, -0.4435482621192932, 0.48306792974472046, -0.19064633548259735, 0.8153215050697327, 0.48709836602211, 0.14883953332901, 0.6041882038116455, -1.660295844078064, 0.15756818652153015, -1.5303611755371094, 0.1413167417049408, -0.035977866500616074, 0.6891228556632996, -0...
def test _ header _ name _ context ( self ) : response = self. client. get ( reverse ('jobs : jobs - home'), {'regional _ restrictions': regional _ restrictions _ choices. anywhere } ) self. assertequal ( response. context ['header _ name'], " anywhere ( 100 % remote only ) " ) response = self. client. get ( reverse ('...
[ -0.012403051368892193, -0.2476746141910553, 0.621386706829071, -0.38531458377838135, 0.48227840662002563, 0.5104319453239441, -0.12364768981933594, -0.715388298034668, 0.2841574549674988, 0.08935318142175674, -0.14175084233283997, 0.18046189844608307, 0.26344120502471924, -0.27857717871665...
def generate ( cls, * * kwargs ) - > " adjustonconfiguration " : return cls ( description = " set'enable'to true to enable deploy _ to filtering. ", enable = false, * * kwargs )
[ -0.07871343195438385, 0.557441234588623, 0.5160994529724121, 0.09889174997806549, -0.401355117559433, 0.605536162853241, 0.11312981694936752, 1.0327693223953247, -0.2528999447822571, 0.7420457601547241, -0.3561723828315735, 0.22356638312339783, -1.0940067768096924, 0.009013260714709759, ...
def rename _ df _ col ( input _ df, rename _ col ) : input _ df _ new = input _ df. rename ( columns = rename _ col ) return ( input _ df _ new )
[ -0.7826658487319946, -0.8711374402046204, 0.6200010180473328, 0.6007691025733948, -0.13708147406578064, -0.5859026312828064, 0.07666951417922974, -0.4916163384914398, -1.1220749616622925, 0.16250838339328766, -0.027507880702614784, 1.139650583267212, 0.6889243125915527, -0.6503321528434753...
def monitor _ backends ( config _ file, check _ interval = 60, backend _ timeout = 30 ) : logger. info ( " entering storage backend monitor " ) # sanity - check the app config file. logger. debug ( " using config file % r ", config _ file ) app = load _ app _ from _ config ( config _ file ) logger. debug ( " using memc...
[ 0.4098844528198242, 0.06319230794906616, 0.6012174487113953, 0.5801936984062195, 0.9854525327682495, 0.21769869327545166, -0.10627779364585876, -0.20320285856723785, -0.6809790730476379, 1.1828770637512207, 0.064912810921669, 0.3283758759498596, -0.5785110592842102, -0.485176682472229, 0...
def n _ to _ two _ power ( n ) : return n * n
[ -0.9247620105743408, -0.5161761045455933, 0.3484516739845276, 0.5282676815986633, 0.42393869161605835, -0.9134034514427185, -0.5761679410934448, -0.47842010855674744, -0.7389010190963745, -0.075809046626091, -0.8814532160758972, -0.2990911304950714, 1.219618797302246, 0.6217214465141296, ...
def set _ utcnow _ to ( self, utcnow ) : self. _ utcnow = utcnow
[ -0.11051657050848007, -0.6314495801925659, 0.46056321263313293, -0.34608519077301025, 0.07956525683403015, 0.3724411129951477, 0.08687691390514374, 1.2649731636047363, -0.6826648116111755, 0.1920919269323349, -0.9927496314048767, 0.28273993730545044, 0.028253955766558647, -0.14265845715999...
def _ _ init _ _ ( self, text = " " ) : # type : ( str ) - > none self. text = text
[ 0.21630336344242096, -0.2794625163078308, 0.22764852643013, 0.08166413009166718, -0.8726469874382019, -0.009420696645975113, -0.3661980926990509, 0.555837094783783, 0.6941316723823547, -0.6490906476974487, -0.5920975208282471, 0.6273730397224426, -0.7440963387489319, 0.21998772025108337, ...
def do _ get ( self ) : url = urls. get ( self. path ) if not url : self. send _ response _ only ( 404 ) self. end _ headers ( ) return self. wfile. write ('not found '. encode ('utf - 8') ) self. send _ response _ only ( url. get ('status _ code ', 200 ) ) for header, value in url. get ('headers ', { } ). items ( ) : ...
[ -0.9458024501800537, -0.482984721660614, 0.8564382791519165, -0.40031659603118896, 0.9296340346336365, -0.4980272948741913, -0.3247371017932892, 0.0641278326511383, -1.1105232238769531, -0.08283518999814987, 0.27391964197158813, 0.4148501753807068, -0.025894636288285255, 0.2287897020578384...
def test _ onhandshakewronghash ( self ) : streamerrors = [ ] authd = [ ] def authenticated ( xs ) : authd. append ( xs ) xs = self. xmlstream xs. addonetimeobserver ( xmlstream. stream _ authd _ event, authenticated ) xs. sendstreamerror = streamerrors. append xs. sid ='1234'thehash ='1234'xs. authenticator. onhandsha...
[ 0.6950161457061768, 0.44581660628318787, 0.43613162636756897, 0.4524316191673279, 0.5119126439094543, 0.36299341917037964, -0.5964066982269287, 0.0024284152314066887, 0.40038931369781494, -0.7021535038948059, -0.14603182673454285, 0.45076504349708557, -0.3602175712585449, 1.037093877792358...
def roll _ single _ die ( numberofsides ) : rollresult = randint ( 1, numberofsides ) return rollresult
[ -0.569209635257721, 1.0451196432113647, 0.566935122013092, -0.6637108325958252, 0.06226861849427223, -0.05942266806960106, 0.5505026578903198, 0.12798869609832764, 0.5906282067298889, -1.0260646343231201, -0.03383827954530716, -0.09098983556032181, -0.035971499979496, -0.060664352029561996...
def evaluate _ input ( features, labels, batch _ size ) : features = dict ( features ) if labels is none : # no labels, use only features. inputs = features else : inputs = ( features, labels ) # convert the inputs to a dataset. dataset = tf. data. dataset. from _ tensor _ slices ( inputs ) # batch the examples assert ...
[ -0.2595821022987366, 0.27438613772392273, 0.21360832452774048, -0.5412828922271729, -0.41659948229789734, -0.18472252786159515, -0.6268972158432007, 0.9548079967498779, -0.3611837327480316, -0.8932068943977356, 0.44833680987358093, 0.819380521774292, 0.19162611663341522, -0.383690327405929...
def test _ update _ skill _ wrong _ credentials ( self ) : skill = skill. objects. create ( date = [ 2, 2022 ], name = { " en " : " test skill ", " fr " : " skill de test " }, description = { " en " : [ " test desc " ], " fr " : [ " desc test " ] } ) payload = { " date " : " wrong credential " } detail _ url = reverse ...
[ 0.2885519862174988, -0.09804050624370575, 0.5235380530357361, -0.1457633078098297, 0.4204683005809784, 1.5122185945510864, -0.5097883939743042, -0.8720550537109375, -0.16064509749412537, 0.10212589055299759, -0.8858593106269836, 0.9704669713973999, 0.08385446667671204, 0.538810133934021, ...
def main ( ) : if'- h'in sys. argv : print ( main. _ _ doc _ _ ) sys. exit ( ) file = sys. argv [ 1 ] f = open ( file,'r') input = f. readlines ( ) f. close ( ) out = open ( file,'w') for line in input : out. write ( line ) out. close ( )
[ 0.5263676643371582, -0.4783657193183899, 1.0257185697555542, 1.1098999977111816, 0.28825369477272034, 1.3879660367965698, 0.6365288496017456, 1.20648992061615, -1.0154863595962524, 0.039585039019584656, -0.08840278536081314, 0.38868969678878784, 0.12743327021598816, 0.17878685891628265, ...
def reset _ output _ buffer ( self ) : if not self. is _ open : raise serialutil. portnotopenerror _ drain _ queue ( self. command _ queue )
[ 0.09575171023607254, -0.41038209199905396, 0.4996986389160156, 0.2559976279735565, 0.05512630194425583, 0.027624117210507393, 1.2059993743896484, -0.6962767243385315, -0.24321681261062622, -1.2591817378997803, 0.6261683702468872, 0.7103921175003052, -1.1962072849273682, -0.3911185562610626...
def show _ recent _ deployments ( dev _ project : str, project : str, env : str ) - > none : num _ services = len ( appengine. services ) num _ records = 3 * num _ services print ( f'{ project } :') for version, tag in gcs. gcsclient ( dev _ project ). get _ recent _ deployments ( env, num _ records ). items ( ) : prin...
[ 0.20242595672607422, 0.7085728645324707, 0.6271489262580872, -0.7868622541427612, 0.36402520537376404, 0.41075724363327026, -0.2971271872520447, -0.7372347116470337, -1.1715099811553955, 0.919914960861206, 0.7595447301864624, 0.7275365591049194, 0.6551344990730286, 0.2473921775817871, 0....
def async _ wait _ for _ servers ( svrs, done _ cb = none ) : def _ runner ( ) : if wait _ for _ servers ( svrs = svrs, timeout = default _ service _ wait _ rate ) : done _ cb ( ) return true return false t = timer. timer ( rate = default _ service _ wait _ rate, end _ condition _ callback = _ runner ) return t
[ -0.5282530784606934, 1.7331749200820923, 0.3327198326587677, -0.025724336504936218, 0.5967602729797363, -0.13821032643318176, -0.38925454020500183, -0.5581676959991455, -0.17408499121665955, 0.5615223050117493, -0.10758737474679947, -0.6245946288108826, -0.5300517082214355, 0.5595313310623...
def _ structured _ derivatives _ ntk _ fn ( f : applyfn, trace _ axes : axes, diagonal _ axes : axes, vmap _ axes : vmapaxes, _ j _ rules : bool, _ s _ rules : bool, _ fwd : optional [ bool ] ) - > empiricalkernelfn : def sum _ and _ contract ( fx1 : np. ndarray, fx2 : np. ndarray, fx _ axis, df _ dys _ 1 : list [ unio...
[ 0.025176506489515305, 0.680846095085144, 0.9203920364379883, -0.7832329273223877, -0.03932981938123703, -0.2969943881034851, 1.1584032773971558, -0.20951330661773682, -0.7632060050964355, 0.28272566199302673, 0.18693424761295319, 0.05963560938835144, 1.0866596698760986, 0.0298126433044672,...
def readpfm ( file ) : file = open ( file,'rb') color = none width = none height = none scale = none endian = none header = file. readline ( ). rstrip ( ) if header = = b'pf': color = true elif header = = b'pf': color = false else : raise exception ('not a pfm file.') dims = file. readline ( ) try : width, height = lis...
[ -0.8870100975036621, -0.736528754234314, 0.8484852910041809, -1.0703874826431274, -0.44035735726356506, 0.5661983489990234, -0.514263927936554, 0.1528630554676056, -0.5097048878669739, -0.07295839488506317, -0.1633308380842209, 0.1466008573770523, -0.11849768459796906, 0.9280521869659424, ...
def delete _ service _ note ( request ) : if request. method = ='post': # load existing service note service _ note = servicenote. objects. get ( pk = request. post. get ('service _ note _ pk') ) service _ note. delete ( ) # load all service notes of the requirement service _ notes = servicenote. objects. filter ( requ...
[ -0.22191062569618225, -0.19584576785564423, 0.5538805723190308, -0.16430674493312836, 0.08477436751127243, 0.21892164647579193, 0.05544232577085495, 0.02486361376941204, -0.3714849054813385, 0.7399272322654724, 0.3581136465072632, 0.4241461753845215, 0.011721939779818058, 0.741874217987060...
def plot _ inv _ act _ para ( fo, ts, para, low _ limit = 1e - 5, save = false, sfile = " " ) : act _ grid = np. zeros ( ( 113, 173 ) ) for nuc in fo. timestep _ data [ ts - 1 ]. inventory : if float ( nuc [ para ] ) > 0 : if nuc [ 0 ] [ - 1 ] = = " n " : nuc [ 0 ] = nuc [ 0 ] [ : - 1 ] a = nucname. anum ( nuc [ 0 ] ) ...
[ -0.3389143645763397, -0.1318024843931198, 0.6118910312652588, -0.5079991221427917, 0.35414350032806396, -0.30927568674087524, 0.5858413577079773, 0.5848948955535889, 0.10546820610761642, 0.6592463850975037, 0.024024683982133865, 1.5909429788589478, -0.011036052368581295, -0.697919070720672...
def get _ task _ dict ( self, task _ id ) : try : return self. drydock _ client. get _ task ( task _ id = task _ id ) except errors. clienterror as client _ error : raise drydockclientusefailureexception ( client _ error )
[ -0.32009613513946533, 0.5897085666656494, 0.32338032126426697, -0.038404904305934906, -0.476638525724411, -0.507074236869812, 0.3437834084033966, -1.000084400177002, -0.49763908982276917, 0.6751385927200317, -0.7411218881607056, 0.8274818062782288, 0.2866615653038025, 0.5748560428619385, ...
def _ build _ target _ distribution ( self ) : batch _ size = self. _ replay. batch _ size # size of rewards : batch _ size x 1 rewards = self. _ replay. rewards [ :, none ] # size of tiled _ support : batch _ size x num _ atoms tiled _ support = tf. tile ( self. _ support, [ batch _ size ] ) tiled _ support = tf. resh...
[ -0.009465990588068962, 0.14461787045001984, 0.45378056168556213, -0.7470601797103882, -0.04207846149802208, -0.041851289570331573, 0.13791251182556152, 0.46748754382133484, 0.20458030700683594, 0.1994822472333908, 0.4799332022666931, 0.5763140916824341, 0.5154268145561218, -1.1939579248428...
async def test _ flow _ invalid _ login ( hass, aioclient _ mock ) : from homeassistant. components. hangouts. hangups _ utils import googleautherror flow = config _ flow. hangoutsflowhandler ( ) flow. hass = hass with patch ( " homeassistant. components. hangouts. config _ flow. get _ auth ", side _ effect = googleaut...
[ -0.48381307721138, 0.17923501133918762, 0.2033206671476364, 0.7030467391014099, 0.2698202431201935, 0.8255909085273743, 0.40500205755233765, 0.5636133551597595, 0.5032886266708374, -0.8076584935188293, -0.4323984384536743, 0.18192344903945923, 0.2598603069782257, -0.21423956751823425, 1....
def changecontrast ( self, gamma = 1. 0 ) : invgamma = 1. 0 / gamma table = np. array ( [ ( ( i / 255. 0 ) * * invgamma ) * 255 for i in np. arange ( 0, 256 ) ] ). astype ( " uint8 " ) # apply gamma correction using the lookup table return cv2. lut ( self. im, table )
[ -0.5237828493118286, -0.7964311838150024, 0.5990468859672546, -0.5822605490684509, -0.01122385822236538, -0.2691883444786072, 0.27289319038391113, 0.2791244387626648, 0.3976869583129883, 0.8192075490951538, 0.9277639389038086, 0.5258910655975342, -0.6030234694480896, 0.6971948146820068, ...
def normalize _ mock _ file ( self, playbook _ or _ integration _ id : str, path : str = none ) : self. logging _ module. debug ( f'normalize _ mock _ file was called for test " { playbook _ or _ integration _ id } "') path = path or self. current _ folder problem _ keys _ filepath = os. path. join ( path, get _ folder...
[ -0.7303299903869629, -0.14713242650032043, 0.9046591520309448, -0.21047912538051605, 0.36989811062812805, 0.03381245583295822, 1.0506553649902344, 0.6990459561347961, -0.20994415879249573, 0.7779685854911804, 0.29842594265937805, 0.013822995126247406, -0.6801097393035889, 0.252307534217834...
def get _ endpoint ( self, endpoint ) : raise notimplementederror ( " this function is not implemented yet. " )
[ -0.6826433539390564, -0.23648196458816528, 0.4046022295951843, 1.3763500452041626, 0.2744768261909485, -0.005931423511356115, -0.0010616856161504984, -0.1791149526834488, -0.0384012833237648, -0.08994799107313156, -0.2378813624382019, 0.47002094984054565, -0.08770154416561127, -0.151622802...
def test _ api _ video _ initiate _ upload _ token _ user ( self ) : video = factories. videofactory ( id = " 27a23f52 - 3379 - 46a2 - 94fa - 697b59cfe3c7 ", upload _ state = random. choice ( [ " ready ", " error " ] ), ) jwt _ token = instructororadminltitokenfactory ( playlist = video. playlist ) # create another vid...
[ 0.0980183556675911, 0.05862170457839966, 0.7498815059661865, 0.09888112545013428, 0.41370758414268494, 0.40107452869415283, -0.06425733864307404, -0.36582130193710327, 0.4290269911289215, -0.17602325975894928, -1.3318873643875122, 0.7851501703262329, -0.00047704658936709166, -0.16949160397...
def model _ fn ( model _ dir ) : print ( " loading model from { } ". format ( model _ dir ) ) # first, load the parameters used to create the model. model _ info = { } model _ info _ path = os. path. join ( model _ dir,'model _ info. pth') with open ( model _ info _ path,'rb') as f : model _ info = torch. load ( f ) pr...
[ 0.2857121527194977, -0.0772714838385582, 0.4754064679145813, -0.19207489490509033, 0.10507022589445114, 0.04321989789605141, 0.3332442343235016, -0.3353751599788666, -0.42672741413116455, 0.027296267449855804, -0.6102163195610046, 0.05481131002306938, 0.9749478697776794, -0.574474811553955...
def register _ user ( self, user, allow _ login = none, send _ email = none, _ force _ login _ without _ confirmation = false ) : should _ login _ user = ( not self. security. confirmable or self. security. login _ without _ confirmation or _ force _ login _ without _ confirmation ) should _ login _ user = ( should _ l...
[ -0.4942360520362854, 0.9909226894378662, 0.7060399651527405, 0.7745414972305298, 0.10002336651086807, 0.07362090796232224, 0.2993854284286499, -0.10206324607133865, 0.012910648249089718, 0.25004690885543823, -0.5626950263977051, 0.537553608417511, -0.015634136274456978, -0.1162627264857292...
def get _ resource _ for _ model ( model, fields = none ) : from restlib. resources. model import get _ or _ create _ resource # these two lines may seem confusing, but if fields are already defined, # this will force the creation of a new resource since it explicitly # defines fields. the second line is to fallback to...
[ -0.29296454787254333, 0.7593627572059631, -0.03217598423361778, -0.18455755710601807, 0.27905306220054626, -0.12295558303594589, 0.06157758831977844, -0.36130496859550476, -0.22183860838413239, -0.07990004867315292, -0.5180294513702393, -0.545355498790741, -0.30437979102134705, -0.64567553...
def _ get _ extra _ args ( extra _ args, arg _ keys ) : # xxx back compatible hack - - should have a way to specify these. single _ keys = set ( [ " sam _ ref ", " config " ] ) out = [ ] for i, arg _ key in enumerate ( arg _ keys ) : vals = [ xs [ i ] for xs in extra _ args ] if arg _ key in single _ keys : out. append...
[ -0.3817521035671234, 0.33654308319091797, 0.5703730583190918, 0.6193552017211914, 0.5267244577407837, -0.3665391206741333, -1.2173510789871216, 1.210362434387207, -0.30652180314064026, 1.454747200012207, 0.2995621860027313, 0.4993495047092438, -0.34299540519714355, 1.0953012704849243, 0....
def extend ( self, routes : typing. list [ baseroute ] ) - > none : return superclass ( routeregistermixin, self ). extend ( routes )
[ -0.5140517950057983, 1.190924048423767, 0.47779062390327454, 1.1804317235946655, 1.2433124780654907, 0.08048146963119507, -1.1406744718551636, 1.2657197713851929, 1.230918049812317, -1.0054420232772827, -0.9283941388130188, 0.11683185398578644, -0.23967166244983673, 1.201525092124939, -0...
def prev ( self ) : self. clicked = false if self. frame _ num > 0 : self. frame _ num - = 1 self. plot ( ) else : print ( " on first frame, cannot return to previous frame " )
[ 0.06578333675861359, 0.7467435598373413, 0.8276466727256775, 0.3704012632369995, 0.016968553885817528, -0.42225882411003113, 1.967801570892334, 0.6865037679672241, 0.2317790985107422, -0.347969114780426, 0.6242631673812866, 0.7738620042800903, -1.12993586063385, 0.40258634090423584, -0.0...
def main ( args ) : options = parse _ args ( args ) # this holds the nicely - parsed options object # load all the fastas, indexed fastadicts = [ seqio. index ( fasta, " fasta " ) for fasta in options. fastas ] def getsequence ( name ) : " " " get a sequence by id from the first fasta that has it. " " " for fastadict i...
[ 0.4245351254940033, -0.6560792326927185, 0.8374205827713013, 0.051560331135988235, 0.22095747292041779, -0.2673906981945038, 0.7324367165565491, 0.25709331035614014, 0.447547972202301, -0.2572297751903534, -0.13545605540275574, -0.4821182191371918, -0.0929461196064949, 0.44324854016304016,...
def get _ min _ hotel _ cost ( destination, date _ outbound, date _ inbound, remaining _ budget ) : data = get _ top _ hotels ( date _ outbound, date _ inbound, destination, remaining _ budget, n = 1 ) min _ cost = none if data is none else float ( data [ 0 ] ['price'] ) return min _ cost
[ -0.7414421439170837, -0.3542022407054901, 0.6374828815460205, 0.7981621026992798, -0.6488168835639954, 0.3298223912715912, -1.0057389736175537, -0.21874649822711945, -0.45594310760498047, -0.06930175423622131, 0.009521116502583027, 0.3294216990470886, -0.41586142778396606, 0.08622594922780...
def create _ spock _ profile ( userdir, dft _ profile, profile, door _ name = none ) : src _ data = " " " \ \ " \ " \ " settings for spock session \ " \ " \ " # # please do not delete the next lines has they are used to check the version # number for possible upgrades # spock _ creation _ version = { version } # door _...
[ -0.27297455072402954, 0.2544531524181366, 0.6927567720413208, 0.3179166615009308, -0.03856925293803215, 0.39187362790107727, 1.1743744611740112, -0.37936830520629883, 0.5011085867881775, 0.1871919482946396, -0.893528163433075, 0.2383711040019989, -0.26553794741630554, 0.19940945506095886, ...
def test _ aux _ differential _ srv _ transform _ inverse ( self ) : dim = 3 tangent _ vec = gs. transpose ( gs. tile ( gs. linspace ( 0. 0, 1. 0, self. n _ sampling _ points ), ( dim, 1 ) ) ) d _ srv = self. srv _ metric _ r3. aux _ differential _ srv _ transform ( tangent _ vec, self. curve _ a ) result = self. srv _...
[ -0.14442473649978638, 0.2432098686695099, 0.6307269334793091, -0.770967423915863, -0.49716272950172424, 0.38195115327835083, 0.9681844115257263, -0.13179922103881836, 0.551993191242218, -0.0938773974776268, -0.7724661231040955, 0.28503140807151794, -0.16853125393390656, -0.6250181198120117...
def _ convertperfdatatochartformat ( perf _ data, test _ name ) : charts = { } for line in perf _ data : match = re. match ( _ perf _ line _ regex, line ) assert match, " unable to parse the following input : % s " % line chart _ name = match. group ( 1 ) trace _ name = match. group ( 3 ) if match. group ( 3 ) else " s...
[ 0.7147323489189148, -0.6282747387886047, 0.5819305181503296, -1.1437609195709229, -0.13472633063793182, 0.08992720395326614, 0.43565911054611206, -0.5153766870498657, -0.4034668803215027, 0.4823298454284668, -0.11563088744878769, 0.1543091982603073, 0.11325538903474808, -0.4408098161220550...
def rollback ( migrator, database, fake = false, * * kwargs ) :
[ -0.27044734358787537, 1.1502978801727295, 0.4880630373954773, 1.0975395441055298, 0.14831271767616272, -0.3716742694377899, 0.3076336979866028, 1.196749210357666, -0.07022733986377716, 0.895548939704895, -0.7460349202156067, 0.03809504956007004, -1.045381784439087, 0.12612693011760712, -...
def interactive _ solver ( ciphers : [ str ], target : str ) : print ( global _ intro ) solution = [ " _ " for x in range ( len ( target ) / / 2 ) ] while ( true ) : # display current solution print _ solution ( solution, max _ width = 30 ) crib = input ( " enter a crib [ : q to quit, : h to get help ] ) : " ) if crib ...
[ -0.21517187356948853, -0.008386459201574326, 0.7692770957946777, -0.07815290987491608, -0.5029651522636414, 0.21192525327205658, 0.9504027366638184, -1.12749445438385, -0.01769750751554966, -0.22838987410068512, -0.4311023950576782, 0.688696563243866, -0.5698663592338562, -0.61087155342102...
def _ _ init _ subclass _ _ ( cls, param _ names : list [ str ] = none, param _ name : str = none, * * kwargs ) : if not param _ names : if param _ name : param _ names = [ param _ name ] else : raise valueerror ( " must provide ` param _ names ` or ` param _ name ` argument to subclass " ) cls. param _ names = param _...
[ 0.4187414050102234, 0.23489482700824738, 0.599097490310669, 0.26280301809310913, -0.03378980979323387, 0.572774350643158, -1.0127613544464111, 0.5222094655036926, 0.052331387996673584, 0.12475133687257767, -0.5260456800460815, 0.8280248641967773, 0.4534370005130768, 1.358372449874878, -0...
def convert _ acm _ to _ pod ( self ) : if self. workbook : self. workbook = self. workbook. stringkey ( ) else : self. workbook = none if self. template : self. template = tuple ( [ item. stringkey ( ) for item in self. template ] ) else : self. template = ( ) if self. portfolios : self. portfolios = tuple ( [ item. s...
[ -1.1528313159942627, 0.03395165875554085, 0.47239309549331665, -0.9449355602264404, -0.08456699550151825, 0.08498256653547287, 0.18072758615016937, -1.1967114210128784, -0.24673782289028168, 0.22412142157554626, -0.06600051373243332, 0.2967665195465088, -0.3637116849422455, 0.3470754921436...
def parsecolorspacefromstring ( self, str ) : pass
[ 0.19363582134246826, -1.5905708074569702, 0.29674601554870605, -0.07433342188596725, -0.1110803559422493, -0.06637603044509888, -0.16900548338890076, -0.46239206194877625, 1.191627025604248, -0.9108608961105347, -0.4106353223323822, -0.059655673801898956, -0.6745022535324097, 0.69257187843...
def set _ direction _ cmd ( self, cmd ) : self. direction _ cmd = cmd
[ -0.4688790738582611, -1.3779017925262451, 0.47790494561195374, 0.13922947645187378, 0.754082202911377, 1.6198093891143799, 1.063512921333313, -0.30076807737350464, 0.24709655344486237, -0.9977927803993225, -0.19738918542861938, 0.9471072554588318, 0.48877406120300293, 1.342677354812622, ...
def status _ line ( tpl ) : line =''. join ( tpl ) return is _ status _ line ( line ) and line
[ 0.1934828758239746, -0.6969583630561829, 0.3344035744667053, 0.573840856552124, -0.3189460337162018, 0.5763912796974182, -1.0651323795318604, 0.6546618342399597, 0.16574043035507202, 0.09381496906280518, -0.696288526058197, -0.7864994406700134, -0.3949619233608246, 0.28113922476768494, -...
def retarget _ to _ length ( song, duration, start = true, end = true, slack = 5, beats _ per _ measure = none ) : duration = float ( duration ) constraints = [ rt _ constraints. timbrepitchconstraint ( context = 0, timbre _ weight = 1. 0, chroma _ weight = 1. 0 ), rt _ constraints. energyconstraint ( penalty =. 5 ), r...
[ 0.2785872519016266, -0.0710119903087616, 0.6979256272315979, -0.2376837432384491, 0.17033682763576508, -0.3751697242259979, 0.38507869839668274, 0.3215891718864441, -0.09475333243608475, 0.9400366544723511, 0.13324280083179474, 0.6706667542457581, -0.05673690512776375, -0.45935219526290894...
def test _ course _ superuser _ get _ post ( self ) : major1 = random. choice ( majors ) [ 0 ] course1 = random. choice ( courses ) [ 0 ] school = school _ sample ( ) data = { " course " : course1, " major " : major1, " school " : school, } url = school _ course _ url ( school. id ) res = self. client. post ( url, data...
[ -0.26016712188720703, 0.5839414000511169, 0.5200009346008301, 0.8237653374671936, 1.0180435180664062, 1.0756458044052124, -0.2219836711883545, -0.0886480063199997, 0.0102384053170681, -1.4104613065719604, -0.5509645342826843, 0.12413686513900757, -0.441464900970459, -0.24867917597293854, ...
def _ _ init _ _ ( self, context _ identifier, connection = none, prompt = none, newline _ chars = none, runner = none ) : super ( getip, self ). _ _ init _ _ ( connection, operation ='execute ', prompt = prompt, newline _ chars = newline _ chars, runner = runner ) self. context _ identifier = context _ identifier self...
[ -0.07574354112148285, -0.0726114884018898, 0.6766285300254822, 1.1051664352416992, -0.34347784519195557, -0.32672983407974243, -0.21143227815628052, 0.8499515056610107, 0.017304440960288048, -0.22323404252529144, -0.15386618673801422, -0.4717959761619568, -0.15468956530094147, -0.996018826...
def to _ reminder ( self ) : print " to reminder " # this function will take the system from home screen to to reminder xpath = self. util. read _ xpath _ list _ from _ xml ( self. object _ repo, " toreminder ", self. my _ object ) for loop _ index in range ( len ( xpath ) ) : # self. util. client. sleep ( 2000 ) self....
[ -1.0165841579437256, -0.3295588791370392, 0.7182801961898804, -0.614843487739563, 0.7459322214126587, -0.03645877167582512, 0.5524997711181641, -0.6024143099784851, 0.8575936555862427, 0.6210774183273315, -0.48786661028862, 0.6388960480690002, -0.320840448141098, 0.4365977942943573, 0.16...
def set _ brightness ( color, brightness, as _ percentage = false, allow _ zero = false ) : if not as _ percentage and ( brightness < 0 or brightness > 255 ) : raise valueerror ('brightness { } is invalid. '. format ( brightness ) ) if brightness = = 0 : # don't worry about allow _ zero here return [ 0, 0, 0 ] average ...
[ -0.7168304324150085, -0.2381931096315384, 0.709255039691925, 0.8089188933372498, 0.24717311561107635, -0.16007521748542786, 0.06080883741378784, 0.3506215214729309, -0.3425582945346832, 0.5710073113441467, -0.1040043830871582, 0.5942280292510986, -0.03647788241505623, 0.7397806644439697, ...