text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ atomic _ language _ length _ 3 _ nistxml _ sv _ iv _ atomic _ language _ length _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - length - 4. xsd ", instance = " nistdata / atomic / l...
[ 0.37079066038131714, 0.13788367807865143, 0.36984169483184814, 0.16321450471878052, -0.16891828179359436, 0.22761298716068268, -0.31343838572502136, 0.10396774113178253, 0.4324508309364319, 0.5890392065048218, -0.4307403564453125, -0.9250305891036987, -0.2648041248321533, -0.19450353085994...
def get _ 24hr _ stats ( self, symbol ) : return self. get _ request ('/ api / v1 / market / stats /'+ symbol )
[ -1.2809339761734009, 0.5996728539466858, 0.3583810329437256, 0.13939544558525085, 0.7382359504699707, -0.556090772151947, -1.0844323635101318, -2.181792736053467, 0.13898618519306183, -0.47058939933776855, -0.617124617099762, 0.7851426005363464, -0.2848650813102722, -0.333884060382843, -...
def put ( self, key, item ) : if key and item : self. cache _ data [ key ] = item
[ -0.6935667991638184, 0.391996830701828, 0.3440302312374115, -0.10802770406007767, -0.1685434728860855, 1.2285852432250977, -1.1530019044876099, 0.6725150942802429, -0.4147964417934418, 1.0062687397003174, -1.0783504247665405, -0.13968847692012787, -0.6539646983146667, -0.1798020601272583, ...
def roc ( self ) : self. printstatus ( ) print " " " # reference : families = % s, domains = % s, evidence > = % i, overlap > = % i # roc - curve # x : tp # y : tp / t # sorted by size x \ ty " " " % \ ( self. mtablenamereferencefamilies, self. mtablenamereferencedomains, self. mannotationminevidence, self. mannotation...
[ 0.5085622668266296, -0.12480685114860535, 0.7027804255485535, -0.5242994427680969, -0.024542760103940964, -0.0843278020620346, 0.9719797372817993, -0.3848925232887268, -0.6795099377632141, 0.303581565618515, 0.5959466695785522, 0.05684078484773636, 0.033047910779714584, 0.6331226229667664,...
def check _ for _ error ( self ) - > list [ str ] : raise notimplementederror ( )
[ -0.8219146132469177, -0.17241688072681427, 0.49338823556900024, 0.4731467664241791, 0.6501548290252686, 0.5578280687332153, -0.4585941433906555, 0.3653075695037842, -0.17137159407138824, 0.4034753739833832, 0.0997588038444519, -0.30625519156455994, 0.3509809970855713, 1.048606038093567, ...
def cleanup ( benchmark _ spec ) : mnist _ benchmark. cleanup ( benchmark _ spec )
[ 1.322609782218933, 0.11572147160768509, -0.04723554477095604, 0.1700623482465744, 0.5724321603775024, 0.4438076913356781, 1.2812047004699707, 0.6129850745201111, -0.37539446353912354, 0.4312165081501007, -0.5463384985923767, 0.5841602683067322, 0.09357274323701859, 0.9951582551002502, -0...
def get _ lm _ records ( lmfilename ) : with open ( lmfilename ) as lmfile : curr _ record = [ ] for line in lmfile : line = line. strip ( ) if line = = " $ $ $ $ " : # record separator result ='\ n '. join ( curr _ record ) result = result. strip ( ) if len ( result ) > 0 : yield result curr _ record = [ ] else : curr...
[ 0.7326881885528564, -0.4479515552520752, 0.6549016237258911, -0.4814632833003998, -0.16385531425476074, 0.3397807776927948, -0.6581739187240601, 0.36634793877601624, -0.9124335646629333, 0.2001485973596573, 0.41894668340682983, 0.010091475211083889, -0.6548287272453308, 0.9214444160461426,...
def process _ twenty _ product _ layout _ page ( ocr, page _ image ) : yield from marker _ parser ( [ ( page _ image, ocr ) ], find _ markers = find _ markers, text _ region = ( - 0. 003, - 0. 025, 0. 18, 0. 06 ), image _ region = ( - 0. 003, - 0. 18, 0. 18, 0. 16 ), extract _ product _ from _ text = extract _ product ...
[ 0.05425053834915161, -0.9116259813308716, 0.46232327818870544, -0.1377508044242859, 0.5157949328422546, -0.20730255544185638, 1.0709658861160278, -0.52405846118927, 0.3601062595844269, 0.27076250314712524, 0.6100221276283264, -0.21231548488140106, 0.8064493536949158, -0.07233818620443344, ...
def _ _ call _ _ ( self, x, is _ training = true, ext _ wts = none, reuse = none, * * kwargs ) : x _ = tf. reshape ( x, [ - 1, self. config. height * self. config. width * self. config. num _ channel ] ) return x _
[ -0.9406746625900269, 0.8378090858459473, 0.49549639225006104, 0.24390308558940887, 0.009513757191598415, -0.46932074427604675, -0.448885977268219, 0.42171549797058105, 0.6296907067298889, 0.3895435333251953, -0.14546780288219452, 0.4204409122467041, -0.44207054376602173, -0.536272406578064...
def get _ tulpe ( self ) : liste _ joueur _ a = [ ] liste _ joueur _ b = [ ] tuple = ( ) liste _ joueur _ a = self. joueur _ a, self. score _ joueur _ a liste _ joueur _ b = self. joueur _ b, self. score _ joueur _ b tuple = liste _ joueur _ a, liste _ joueur _ b return tuple
[ -0.6939731240272522, -0.4412927031517029, 1.102864146232605, -0.38785412907600403, 1.100537896156311, 0.30193737149238586, -0.7267261147499084, 0.03654559701681137, -0.966568112373352, 1.344065546989441, -0.5091685056686401, -1.3939297199249268, -0.3650645613670349, -0.08958680182695389, ...
def voluntary _ rebalance ( self, day, taxes, years _ remaining ) : return self. rebalance ( day, taxes, self. personal _ max _ margin _ to _ assets _ ratio ( years _ remaining ), true )
[ -0.0031464125495404005, -0.22249846160411835, 0.2821124196052551, -0.022349795326590538, 0.3968731462955475, 0.2850392162799835, -0.6960954070091248, -0.9345474243164062, 0.020712299272418022, 0.24008868634700775, 1.053666114807129, 0.12702228128910065, -0.0670359805226326, -0.398330837488...
def add ( self, f1, f2 ) : a, b = f1 c, d = f2 num = a * d + b * c denum = b * d factor = self. gcd ( num, denum ) return ( num / / factor, denum / / factor )
[ -0.3790165185928345, 0.43813759088516235, 0.585766613483429, -0.4515538215637207, 0.41126689314842224, 0.3206818401813507, -0.22112038731575012, -0.6662149429321289, -0.6708118319511414, -0.4238513708114624, 0.4327433705329895, -0.24846382439136505, -0.2399924099445343, -0.1790383905172348...
def _ send _ custom _ message ( self, message ) : self. _ sender. send ( ( sent, message ) )
[ -0.785466730594635, 0.05831713601946831, 0.042252011597156525, -0.004786252044141293, -0.015104607678949833, -0.6878436803817749, -0.0058975983411073685, -0.4360295832157135, -0.6109485030174255, 0.2907317280769348, -0.48654094338417053, 0.761496365070343, -0.09975069761276245, 1.061696648...
def id _ list ( response, base _ url ) : con = sqlite3. connect ( " testdb. db " ) # open database cur = con. cursor ( ) vac _ list = response. json ( ) [ " items " ] items = [ ] for i in vac _ list : items. append ( i [ " id " ] ) sql ='insert into calendar ( id, data ) values ( % d, " % s " ) ;'% ( int ( i [ " id " ]...
[ -0.8987260460853577, -0.4302450120449066, 0.7293674945831299, -0.45600274205207825, -0.16428214311599731, -0.2677098214626312, -0.4939689338207245, 0.3389221429824829, 0.19008266925811768, 0.5232729911804199, -0.5033027529716492, -0.08293910324573517, 0.10027452558279037, 0.353001445531845...
def run ( ) - > none : global star _ cnt print ( " data filter process is started " ) inp = in _ out. get _ in ( ) start _ time = time. time ( ) table = [ ] res = in _ out. read _ store ( table, config ['default'] ['file _ name'], inp. ra, inp. dec, inp. fov _ h, inp. fov _ v ) table = res [ 0 ] star _ cnt = res [ 1 ] ...
[ 0.0857454463839531, -0.7641968727111816, 0.7759207487106323, 0.5128030776977539, -0.751998245716095, 0.46695199608802795, 0.3282230794429779, 0.6215647459030151, -0.638617753982544, -0.3226369619369507, -0.6854853630065918, 1.6353667974472046, -0.08637410402297974, 0.6695868968963623, 0....
def _ zeros _ like _ scalar ( x ) : if isinstance ( x, int ) : return 0 return 0.
[ -0.3736761510372162, -0.24299992620944977, 0.42326217889785767, 0.0395098514854908, -0.3749675154685974, 0.11586303263902664, -0.6473671793937683, -1.082452654838562, 0.22885499894618988, -0.15063534677028656, 0.23718445003032684, 0.709974467754364, -0.09159110486507416, 0.8498719334602356...
def lookups ( self ) : return extract _ lookups ( self. value )
[ -0.975677490234375, -0.6919878721237183, 0.28590595722198486, 0.4678812026977539, -0.19648036360740662, -0.22204892337322235, -0.05347207188606262, 0.18038497865200043, 0.5623859167098999, 0.13314777612686157, -0.2801062762737274, -0.9091233611106873, 0.3871799111366272, -0.541839540004730...
def is _ connected ( self ) - > bool : return self. _ device is not none # pytype : disable = attribute - error
[ -0.43711838126182556, 0.009447820484638214, 0.44622352719306946, 0.5634773969650269, 0.22113682329654694, -0.5211278200149536, 0.10063042491674423, -0.1459207385778427, -0.07381094247102737, -0.1233169287443161, -0.261883944272995, -0.3432753086090088, 0.136339008808136, 0.2227301448583603...
def test _ atomic _ base64 _ binary _ white _ space _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ white _ space _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - whitespace - 1. xsd "...
[ -0.5748358964920044, -0.08127590268850327, 0.45829057693481445, 0.9833118915557861, 0.21691972017288208, 0.13468971848487854, 0.5682492852210999, -0.46129071712493896, 0.5417031049728394, 0.6098312139511108, 0.23375162482261658, 0.44031044840812683, -0.6279230713844299, 0.9741965532302856,...
async def list _ products _ as _ end _ user _ async ( self, request : servicecatalog _ 20210901 _ models. listproductsasenduserrequest, ) - > servicecatalog _ 20210901 _ models. listproductsasenduserresponse : runtime = util _ models. runtimeoptions ( ) return await self. list _ products _ as _ end _ user _ with _ opti...
[ -2.442307710647583, 0.2926793694496155, 0.3940851092338562, 0.4703086018562317, 0.47171708941459656, -0.10473930090665817, -0.04017389938235283, -1.4897489547729492, 0.41746020317077637, 0.6008716821670532, -0.13692903518676758, 0.9334019422531128, -0.10573022812604904, 0.15879781544208527...
def callback ( _ locals, _ globals ) : global num _ update, best _ mean _ reward # process every 1000 steps if ( num _ update + 1 ) % 1000 = = 0 : # get the result array _, y = ts2xy ( load _ results ( log _ dir ),'timesteps') if len ( y ) > 0 : # save the model if best reward is gained mean _ reward = np. mean ( y [ -...
[ -0.12586568295955658, 0.2746054530143738, 0.7591073513031006, -0.10204988718032837, 0.366878867149353, 0.033016446977853775, -0.1904142200946808, -0.15671494603157043, -0.27030616998672485, 0.6505296230316162, -0.2752624750137329, 0.014472094364464283, 0.31878069043159485, 0.41260656714439...
def get _ news ( api _ keys : dict, location : dict ) - > list : global old _ headlines # declares list of headlines to be displayed. headlines = [ ] # gets latest news using the news api. news _ key = api _ keys [ " news " ] country = location [ " country " ] news _ api = ( " https : / / newsapi. org / v2 / top - head...
[ -0.3154248595237732, -0.28731998801231384, 0.45166778564453125, -0.025020405650138855, 0.3057740330696106, -0.5628907084465027, -1.2359600067138672, 0.020793911069631577, -0.20265348255634308, 0.7527645230293274, -0.7666734457015991, -0.2512191832065582, 0.5289396047592163, 0.4707542657852...
def types ( self ) - > tuple [ str,... ] : return self. _ _ incl _ pos
[ -0.4240399897098541, 0.4153478443622589, 0.6899625062942505, 0.14831052720546722, 0.9994180798530579, 0.6623987555503845, 0.23310883343219757, -0.05971648171544075, -0.15130622684955597, 0.6797395944595337, -1.1306146383285522, -0.8445558547973633, -0.9712495803833008, -0.2844136357307434,...
def test _ moves _ urllib _ request _ http ( self ) : import future. moves. urllib. request as urllib _ request from pprint import pprint url ='http : / / python - future. org'r = urllib _ request. urlopen ( url ) data = r. read ( ) self. asserttrue ( b'< / html >'in data )
[ -0.3453873097896576, 1.0987704992294312, 0.44043517112731934, 0.4419495165348053, -0.13542388379573822, 0.7693303227424622, -0.8681939244270325, 0.18919070065021515, 0.013240532018244267, -0.7209973335266113, 0.018661247566342354, 0.6002934575080872, 0.16392900049686432, 0.1192703023552894...
def clearselection ( self ) : for line in self. selectlines : self. scene ( ). removeitem ( line )
[ -0.3407438099384308, -1.2429035902023315, 0.1852656602859497, 0.14757020771503448, 0.4005526900291443, 0.09277539700269699, -0.07992827892303467, -0.15602953732013702, 0.5595052242279053, 0.549310564994812, -0.14395341277122498, 0.37024930119514465, -0.026150226593017578, -0.20518411695957...
def ifvisit ( self, id ) : l, r = - 1, len ( self. visited ) while l + 1! = r : mid = ( l + r ) / / 2 if self. visited [ mid ] = = id : print ( mid ) return - 2 else : if id < self. visited [ mid ] : r = mid else : l = mid return l
[ -0.8213210701942444, -0.5062864422798157, 0.7206516861915588, -0.09380218386650085, -0.7954481244087219, -0.3186466693878174, 0.8724200129508972, -0.7487100958824158, 0.6755107641220093, 0.31871601939201355, -0.13586099445819855, 0.5015369653701782, -1.6374787092208862, 0.22561690211296082...
def from _ assertion ( cls, assertion _ rdf : rdflib. graph, introduces _ concept : rdflib. term. bnode = none, derived _ from = none, assertion _ attributed _ to = none, attribute _ assertion _ to _ profile : bool = false ) : if assertion _ attributed _ to and attribute _ assertion _ to _ profile : raise valueerror ('...
[ 0.9377416372299194, -0.19121436774730682, 0.5494095087051392, 0.0953812226653099, -0.3788098394870758, 0.5482672452926636, 0.8617531061172485, 0.4468323290348053, 0.8806208372116089, -0.13623575866222382, 0.5473211407661438, 0.8425254821777344, -0.32021626830101013, 0.24436405301094055, ...
def findelement ( driver, selector, timeoutinseconds ) : locator, objectstring = sorted ( selector. items ( ) ) [ 0 ] if timeoutinseconds > 0 : waiter = webdriverwait ( driver, timeoutinseconds ) try : return waiter. until ( lambda d : d. find _ element ( locator, objectstring ), f'cannot find web element ( { locator }...
[ 0.04648948088288307, -0.5745117664337158, 0.4140099287033081, 0.2681816518306732, -0.4776829481124878, -0.46560055017471313, -0.36701473593711853, -0.6840975284576416, 0.41707342863082886, 0.24752065539360046, 0.9683780074119568, -0.0003159113402944058, -0.2589362561702728, -0.364597976207...
def _ _ tablename _ _ ( cls ) : return cls. _ _ name _ _. lower ( )
[ 0.584927499294281, -1.167573094367981, 0.8996171355247498, -0.31074297428131104, -0.13873931765556335, 0.43747809529304504, -0.11584160476922989, -0.4867241680622101, -0.3703065812587738, 0.36838194727897644, -0.019427217543125153, 0.281459778547287, 0.3048437535762787, 0.6922781467437744,...
def adddressedpbh ( body, dminds, pbhind, ndm, x0, v0 ) : # check that the indices'inds'are consistent # with the number of dm particles if ( len ( dminds )! = ndm ) : print " error in pbh. adddressedpbh : number of indices does not match number of particles... " # generate the mass profile print " generating mass prof...
[ -0.03729923442006111, 0.3482522964477539, 1.0408161878585815, -0.8633574843406677, 0.2532614767551422, 0.9496724605560303, -0.18967539072036743, 0.46473562717437744, 0.24628722667694092, 0.21428555250167847, -0.7236696481704712, 0.053025487810373306, -1.0221713781356812, 0.4807007610797882...
def img2img _ transformer2d _ n103 ( ) : hparams = img2img _ transformer2d _ base ( ) hparams. batch _ size = 1 hparams. num _ decoder _ layers = 12 hparams. num _ encoder _ layers = 6 hparams. query _ shape = ( 8, 32 ) hparams. memory _ flange = ( 8, 64 ) hparams. layer _ prepostprocess _ dropout = 0. 1 return hparams
[ -0.5586842894554138, -0.3240719735622406, 0.5151457786560059, -0.5425853133201599, 0.1458275318145752, -0.3432024419307709, -0.07220045477151871, 0.04195147380232811, -0.5409190058708191, 0.010920800268650055, -0.7159587740898132, 0.08616816252470016, 0.33210840821266174, 1.297153711318969...
def get _ osm ( tag ) : query = lambda rel _ type : api. query ( " " " ( { } ( { }, { }, { }, { } ) [ { } ] ; ) ; (. _ ; > ; ) ; out ; " " ". format ( rel _ type, bbox [ 1 ], bbox [ 0 ], bbox [ 3 ], bbox [ 2 ], tag ) ) def query _ rels ( ids ) : while true : try : return api. query ( " " " relation ( { } ) ; (. _ ; > ;...
[ -0.3629613220691681, 0.0553206205368042, 0.8449955582618713, -0.8633275032043457, 0.06417472660541534, -0.8108053803443909, -0.19181205332279205, -1.0757461786270142, -0.49961328506469727, -0.28118565678596497, -0.24960266053676605, 0.13401077687740326, -1.0775002241134644, 0.2661616206169...
def _ get _ plaintext _ contests ( compact _ ballot : compactplaintextballot, internal _ manifest : internalmanifest ) - > list [ plaintextballotcontest ] : index = 0 ballot _ style _ contests = _ get _ ballot _ style _ contests ( compact _ ballot. style _ id, internal _ manifest ) contests : list [ plaintextballotcont...
[ -0.43297329545021057, -0.520995020866394, 0.282591849565506, -0.9698276519775391, -0.3070426285266876, 0.03800899162888527, -0.6153189539909363, 0.11795485019683838, 0.9186702370643616, 0.05930613726377487, -0.004690514877438545, 0.5632516741752625, 0.02516249008476734, -0.5073185563087463...
def to _ csv ( self, path : pathlib. path ) : common _ df. write _ csv ( self. data, path, structlog. get _ logger ( ), self. common _ index _ fields ) if self. provenance is not none : provenance _ path = str ( path ). replace ( ". csv ", " - provenance. csv " ) self. provenance. sort _ index ( ). to _ csv ( provenanc...
[ -0.13505646586418152, 0.037359919399023056, 0.3051336109638214, 0.8012073040008545, 0.8536900877952576, 0.12630434334278107, 0.8852523565292358, 0.32014819979667664, -0.08242978155612946, -0.5704143643379211, 0.29320695996284485, 0.9363733530044556, -0.06062925234436989, 0.0009673226741142...
def merge ( job, results, args ) : job. filestore. logtomaster ('merging alignment output for { } '. format ( args. genome ), level = logging. info ) results _ file _ ids = { } for gp _ category, result _ list in results. items ( ) : tmp _ results _ file = tools. fileops. get _ tmp _ toil _ file ( ) with open ( tmp _ r...
[ -0.08837541937828064, -0.28914716839790344, 0.5840511918067932, -0.15591371059417725, 0.09609104692935944, 0.25955313444137573, 0.5319557785987854, -0.1619010865688324, -1.0269038677215576, -0.20704597234725952, -0.33285805583000183, -1.1223703622817993, -0.23977404832839966, 0.64833426475...
def open _ in _ youtube ( cls, voice _ transcript, skill ) : tags = cls. _ extract _ tags ( voice _ transcript, skill ['tags'] ) for tag in tags : reg _ ex = re. search ( tag +'( [ a - za - z ] + ) ', voice _ transcript ) try : if reg _ ex : search _ text = reg _ ex. group ( 1 ) base = " https : / / www. youtube. com /...
[ -0.4297516942024231, -0.7909097671508789, 0.8390506505966187, 0.3396253287792206, 0.2226223647594452, -0.4132842421531677, 0.24909421801567078, 0.1767793446779251, -0.06694330275058746, -0.15400588512420654, -0.21575479209423065, 0.9930562973022461, 0.1419401913881302, 0.2681523263454437, ...
def _ get _ rgb _ value ( self, our _ colour _ name : str ) : global colour _ dict our _ colour _ name = our _ colour _ name. replace ('','' ). upper ( ) if our _ colour _ name in colour _ dict : return colour _ dict [ our _ colour _ name ]
[ -0.35455837845802307, 0.1125849112868309, 0.44315120577812195, -0.9758733510971069, -0.7129628658294678, -0.2742418348789215, -0.6169897317886353, 0.22463442385196686, -0.738699734210968, 0.429190993309021, -0.19717919826507568, 0.9185556173324585, -1.0315178632736206, 0.8569743037223816, ...
def test _ order _ projected _ gain ( self ) : stock _ name = self. test _ stock _ a order _ quantity = 50 order _ type ='buy'trader = self. login _ user ( username = userb. get ('username') ). profile d = self. place _ order ( stock _ name, order _ quantity, order _ type, trader ) resp = d. get ('resp') self. asserteq...
[ -0.3082611858844757, 0.0859173983335495, 0.7821120023727417, 1.1096689701080322, 0.5398110747337341, 0.13801610469818115, -0.40719282627105713, -0.1240011528134346, 0.07406370341777802, -0.2799636721611023, -0.6803744435310364, 0.03550339862704277, 0.08049368113279343, 0.48129352927207947,...
def regression ( self, fit, title ) : print ( " fitting pdf of ", title, " to expt. data. " ) fit. fithooks [ 0 ]. verbose = 0 # we can now execute the fit using scipy's least square optimizer. # free parameters one - by - one and fit self. plot _ fit ( fit, title, num = 0 ) print ( title, " [ 1 / 3 ] " ) fit. free ( "...
[ 0.6766989827156067, -0.2195340394973755, 0.6910061240196228, -0.14260035753250122, 0.6558095216751099, 0.2534717619419098, 0.5506986975669861, -0.20380747318267822, -0.023467859253287315, -0.7507882714271545, -0.10166647285223007, 0.12116936594247818, -1.1417579650878906, -0.20127943158149...
def _ tf2 _ ( self, xmin = neg _ infinity, xmax = pos _ infinity, ymin = neg _ infinity, ymax = pos _ infinity, npars = 0, * args ) : # # if not hasattr ( self,'_ wo2') : self. _ wo2 = _ wo2 _ ( self ) if not self. _ wo2 : self. _ wo2 = _ wo2 _ ( self ) # # if hasattr ( self,'xmin') : xmin = max ( xmin, self. xmin ( ) ...
[ -0.6286202669143677, -0.8514591455459595, 0.6538066267967224, -0.6881258487701416, -0.6345353126525879, -1.0971953868865967, -0.0438360832631588, -1.5334235429763794, -0.8103979229927063, -0.25835543870925903, -0.8192312717437744, 0.6310913562774658, 0.8383349776268005, 0.01482320576906204...
def get _ parent _ instances ( self ) : vms = [ ] if self. config. monitor _ vm : vms = [ vm. instance _ name for vm in self. config. monitor _ vm ] else : # no configuration - grab the component list and find all vms iter _ resp = yield from self. _ dts. query _ read ( xpath = " d, / rw - base : vcs / rw - base : info...
[ -0.34996744990348816, -0.07001598924398422, 0.6157216429710388, -0.14262671768665314, 0.6504617929458618, 0.12789790332317352, -0.30571117997169495, -0.6826923489570618, -0.13845756649971008, 0.6528459191322327, 0.028542742133140564, -0.531413197517395, -0.8032689690589905, 0.8872919082641...
def get _ projects _ from _ testrail ( instance ) : client = apiclient ( instance. host ) client. user = instance. username client. password = instance. password return client. send _ get ('get _ projects')
[ -0.3319137394428253, 0.6357088088989258, 0.385113000869751, 0.1845037043094635, 0.4528357684612274, 0.01768541894853115, -0.20176030695438385, -0.4627111852169037, -0.7271847724914551, 0.24863779544830322, -0.49029579758644104, 0.015681594610214233, -0.9165206551551819, -0.4049870371818542...
def billing _ full _ name ( self, billing _ full _ name ) : self. _ billing _ full _ name = billing _ full _ name
[ 0.22865256667137146, 0.11365719884634018, -0.09409739822149277, 0.7672677636146545, -1.418063998222351, 1.1431729793548584, -0.036443255841732025, 0.7018879652023315, -0.1855800598859787, 0.037463270127773285, -0.8428259491920471, -1.5612040758132935, 0.16946811974048615, 1.234453558921814...
def rps ( ) : user = input ( " kies je wapen [ steen, papier, schaar ] : " ) comp = random. choice ( ['steen ','papier ','schaar'] ) print ( ) print ('de gebruiker ( jij ) koos ', user ) print ('de computer ( ik ) koos ', comp ) print ( ) if user = ='steen'and comp = ='papier': print ('helaas, je hebt verloren.') elif ...
[ -0.1716441959142685, 0.03242795914411545, 0.7908024191856384, -0.10601823776960373, -0.6300575137138367, 0.8126748204231262, 0.7587289810180664, -0.09687881916761398, 1.085304856300354, -0.43946000933647156, 0.17282739281654358, 0.4895622432231903, -0.7303498983383179, 0.026108698919415474...
def test _ list _ decimal _ pattern _ 4 _ nistxml _ sv _ iv _ list _ decimal _ pattern _ 5 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - pattern - 5. xsd ", instance = " nistdata / list / decimal / sc...
[ -0.3540043532848358, -0.3043651580810547, 0.4746658504009247, 0.36638227105140686, 0.010311753489077091, -0.38409125804901123, 0.23653154075145721, -0.1309690624475479, 0.5723647475242615, 0.26440316438674927, -1.2105934619903564, -0.6906557679176331, -0.6228521466255188, 0.555072247982025...
def test _ example _ input _ one _ clone _ cancel _ entity ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ one ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. table. clone _ row ( " dummy _ input _ one " ) self. assert _...
[ 0.623589277267456, 0.49294421076774597, 0.5459975004196167, 1.526624083518982, -0.09215767681598663, 1.197521448135376, -0.05684516578912735, 0.49067795276641846, 0.7221958041191101, 1.025222897529602, 0.3059983253479004, -0.27440255880355835, 0.20110735297203064, -0.28249064087867737, 0...
def test _ atomic _ qname _ enumeration _ 3 _ nistxml _ sv _ iv _ atomic _ qname _ enumeration _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - enumeration - 4. xsd ", instance = " nistdata / atomic ...
[ -0.4537823796272278, -0.8097502589225769, 0.4676464796066284, -0.07994192093610764, -0.2023135870695114, 0.0400296114385128, -0.1660691797733307, -0.8597185015678406, 0.24517740309238434, 0.23577536642551422, -0.2155390828847885, -0.6682097911834717, -0.2185334712266922, -0.513516664505004...
def reset ( self ) : self. _ _ init _ _ ( )
[ -0.02600197307765484, -0.8264673948287964, 0.18582898378372192, 0.3462452292442322, 0.8082082271575928, 0.19753935933113098, 0.6596894264221191, -0.08988720178604126, -0.5815158486366272, -0.34289079904556274, -0.560467541217804, 1.1050065755844116, -0.4948400855064392, -0.4774657487869262...
def get _ follower _ ids ( screenname = none, idstr = none, maxfollowers = 10000 ) : t = connect ( ) args = { " stringify _ ids " : true } if screenname is not none : args ['screen _ name'] = screenname elif idstr is not none : args ['user _ id'] = idstr else : # todo throw exception pass cursor = - 1 ids = [ ] waitper...
[ -0.3198162615299225, -0.09060931205749512, 0.5900319814682007, 0.4502404034137726, -0.33853447437286377, -0.238378643989563, -0.4822796881198883, -0.29994332790374756, -0.06586232781410217, 0.5238103270530701, -0.12796299159526825, 1.1062482595443726, -1.3056801557540894, 0.298514842987060...
def stepsize ( self ) : return self. leapfrog. stepsize
[ -0.1562459021806717, 0.5892951488494873, 0.2614651918411255, 0.13026362657546997, -0.039601027965545654, 0.8537579774856567, -0.03399542719125748, 0.18962088227272034, -0.6268486380577087, -1.7980265617370605, -1.1823408603668213, -0.44351112842559814, -0.2864423990249634, 1.43895125389099...
def get ( country _ identifier : str ) - > dict : return { }
[ -0.6655155420303345, -0.6155276298522949, 0.23031607270240784, -0.5707861185073853, -1.0827064514160156, 0.327201247215271, -0.042606599628925323, 0.43242591619491577, 0.0723835751414299, -0.5816671252250671, -1.0216952562332153, -0.14569982886314392, -0.3619040548801422, -0.53505921363830...
def checktypedefs ( filenode, releases ) : csgen = csgen ( ) for node in filenode. getlistof ('typedef') : build _ list = node. getuniquereleases ( releases ) callnode = node. getoneof ('callspec') if callnode : for param in callnode. getlistof ('param') : if param. getlistof ('array') : continue if csgen. getparammode...
[ 0.16371533274650574, 0.2810726463794708, 0.8698340058326721, 0.23180586099624634, 0.5219759941101074, 0.09043870866298676, 0.40311482548713684, -0.5158261656761169, -0.7109618186950684, 0.9671141505241394, -0.17226283252239227, 0.7362411022186279, -1.0252331495285034, 1.4523903131484985, ...
def state _ unstr ( str _ state ) : state = list ( map ( int, re. findall ( r'\ d + ', str _ state ) ) ) return state
[ -0.6309924721717834, -1.1717435121536255, 0.6556292176246643, -0.7412707805633545, -0.21556390821933746, -0.20389150083065033, 0.04530705139040947, 1.636063575744629, 0.8333343267440796, 0.25052884221076965, -0.864657461643219, -0.30149319767951965, -0.18138931691646576, -1.160630345344543...
def test _ ack _ event _ count ( self ) : _, _, all _ keys = ( yield self. msg _ seq _ helper. create _ ack _ event _ sequence ( event _ count = 3 ) ) self. assertequal ( len ( all _ keys ), 3 ) self. assertequal ( len ( self. backend. events ), 3 )
[ 0.6479220986366272, 0.779906690120697, 0.5067316889762878, -0.2068530172109604, 0.53887939453125, 0.01229895930737257, -0.07264826446771622, 0.3038159906864166, -0.443479061126709, 0.4089995324611664, -0.7407968640327454, -0.4421083331108093, 0.0649816244840622, -0.0021879083942621946, 0...
def process _ cc ( a _ tree ) : if a _ tree. is _ empty ( ) : return cc _ list = [ ] # find trees roots for iroot in _ find _ roots ( a _ tree ) : _ process _ cc _ helper ( a _ tree, iroot, cc _ list, false ) # extract coordinarively conjoined chains # print ( repr ( cc _ list ), file = sys. stderr ) _ output _ cc ( cc...
[ 0.909122884273529, -0.5280147790908813, 0.6025717854499817, 0.15286971628665924, -0.26943472027778625, -1.0844560861587524, 0.5054618716239929, -0.03491360321640968, 0.12669122219085693, 0.8958486318588257, 0.5821961760520935, -0.33873963356018066, 0.1376492977142334, 1.2036164999008179, ...
def to _ external ( self, vector : np. ndarray ) - > np. ndarray : return util. to _ external ( vector, mask = self. internal _ mask )
[ -1.2354305982589722, 0.1273360550403595, 0.728127658367157, 0.1694103628396988, -0.3990887999534607, 0.15514490008354187, -0.21508963406085968, -0.9523970484733582, 0.5785195231437683, 0.37849900126457214, -0.5501720309257507, 1.244541049003601, -0.0012229012791067362, 0.09848590195178986,...
def test _ chainmap ( self ) : from collections import chainmap cm = chainmap ( )
[ 0.28385478258132935, -0.688330888748169, 0.14666584134101868, 0.30779290199279785, 0.94538414478302, 0.5112897753715515, 0.8262042999267578, -0.6027568578720093, 0.13772857189178467, -1.2142796516418457, -1.1192384958267212, 0.63185715675354, -0.7585930228233337, 0.08527037501335144, 0.1...
def _ traverse _ left ( self, start, stop, step, color, left, skipped = [ ] ) : validmoves = { } last = [ ] for r in range ( start, stop, step ) : if left < 0 : break current = self. board [ r ] [ left ] if current = = none : if skipped and not last : break elif skipped : validmoves [ ( r, left ) ] = last + skipped els...
[ -0.30977505445480347, 0.5503432750701904, 0.6417737007141113, -0.2528873085975647, -0.6642010807991028, -0.37295109033584595, 0.24043935537338257, -0.7110405564308167, -0.4055856168270111, 0.825248122215271, -0.6550854444503784, -0.7541037201881409, 0.09765349328517914, 0.9534853100776672,...
def memoizedmethod ( method ) : method _ name = method. _ _ name _ _ @ wraps ( method ) def patched ( self, * args, * * kwargs ) : " " " patched method. " " " try : return self. _ cache [ method _ name ] except keyerror : result = self. _ cache [ method _ name ] = method ( self, * args, * * kwargs ) return result retur...
[ -0.9958747029304504, 0.40786296129226685, 0.5215134620666504, -0.3806922733783722, -0.21277843415737152, -0.7056287527084351, 0.24498263001441956, -0.7710874080657959, 1.0909209251403809, 0.11717826873064041, -0.13928180932998657, 0.2914394438266754, 0.12095111608505249, 0.2845175862312317...
def send _ request ( origin _ addresses, dest _ addresses, api _ key ) : def build _ address _ str ( addresses ) : # build a pipe - separated string of addresses address _ str ='' for i in range ( len ( addresses ) - 1 ) : address _ str + = addresses [ i ] +'|'address _ str + = addresses [ - 1 ] return address _ str re...
[ -1.3208835124969482, -0.6003457307815552, 0.8575671911239624, -0.733117401599884, -0.43163126707077026, -0.4161720275878906, -1.1755021810531616, 0.20819658041000366, -0.6046850681304932, 0.9776598215103149, -0.07961900532245636, 0.7325257062911987, -0.028787504881620407, -0.14490665495395...
def quality _ task ( session, extras, dilibraries = dilibraries ) : session. log ( f'run quality _ task in { lib _ name }') standard _ di _ quality _ task ( session, extras = extras, dilibraries = dilibraries )
[ -0.8206445574760437, -0.4284777045249939, 0.4685978293418884, 0.7293115258216858, -0.38231369853019714, -0.01068261731415987, 0.30587026476860046, 1.0429861545562744, 0.5063145756721497, 0.34290167689323425, -1.1341158151626587, -0.2750145494937897, 0.9040381908416748, -0.48361968994140625...
def _ _ init _ _ ( self, message, var _ name = none, skip _ frames = 0 ) : super ( h2o4gpuvalueerror, self ). _ _ init _ _ ( message ) self. var _ name = var _ name self. skip _ frames = skip _ frames
[ 0.053021982312202454, 0.6049844026565552, 0.5416874289512634, 1.304648518562317, 0.142607644200325, -0.15994779765605927, 0.7635936737060547, -0.022513270378112793, -1.1931771039962769, -0.06975620985031128, 0.11053547263145447, 0.13980579376220703, -0.1826799213886261, 0.9815707206726074,...
def _ make _ param _ hook ( self, param ) : # hook used for back - prop. def param _ hook ( * unused ) : # add the gradient to the buffer. if param. grad is not none : # the gradient function of linear layers is fused with gemms param. main _ grad. add _ ( param. grad. data ) # now we can deallocate grad memory. param....
[ 0.41029655933380127, -0.28012388944625854, 0.5304545760154724, -0.6501834392547607, 0.08438015729188919, 0.2867684066295624, 0.9407266974449158, -0.13808982074260712, -0.04135275259613991, 0.1357288956642151, 0.1318456530570984, 0.7074880599975586, -0.2924017012119293, -0.5640454292297363,...
def test _ qv _ ideal _ probabilities ( self ) : num _ of _ qubits = 3 qv _ exp = quantumvolume ( range ( num _ of _ qubits ), seed = seed ) # set number of trials to a low number to make the test faster qv _ exp. set _ experiment _ options ( trials = 20 ) qv _ circs = qv _ exp. circuits ( ) simulation _ probabilities ...
[ 0.25802376866340637, 0.03720772638916969, 0.6867568492889404, -0.08853443711996078, 0.3483443260192871, 0.13931414484977722, 0.27915093302726746, 0.1357661485671997, 0.11574514955282211, 0.425925612449646, -0.7511729001998901, 0.3770744502544403, -0.06856345385313034, -0.18646256625652313,...
def create _ resource ( ) : deserializer = installdeserializer ( ) serializer = installserializer ( ) return wsgi. resource ( controller ( ), deserializer, serializer )
[ 0.653436541557312, -1.169396996498108, 0.08515382558107376, -0.006107051391154528, -0.02613505721092224, -0.4863646328449249, -0.5429229736328125, 0.952890157699585, -0.0008639476727694273, -0.0599740631878376, 0.3531651198863983, -0.4748522937297821, -0.569108247756958, -0.309167563915252...
def mssne _ eval _ sim _ lds ( n, n _ perp, t _ h, np _ eps, arr _ ones, dsm _ lds _ min _ row _ dsm _ lds _ t ) : # lds single - scale similarities. s _ hij = np. empty ( shape = ( n _ perp, n, n ), dtype = np. float64 ) # lds multi - scale similarities. s _ ij = np. zeros ( shape = ( n, n ), dtype = np. float64 ) # f...
[ -0.008577569387853146, 0.2802681624889374, 0.6348717212677002, -0.2661881744861603, -0.39245614409446716, -0.32222768664360046, -0.01037533301860094, 0.5028825402259827, 0.00534425862133503, 0.628491997718811, -0.2584660053253174, -0.2642369866371155, 0.4940613806247711, 0.853901207447052,...
def addpluginmethod ( descriptor ) : global methods methods [ descriptor [ 0 ] ] = descriptor
[ -0.40107461810112, 0.2678311765193939, 0.4576583802700043, -0.6117695569992065, 0.35975369811058044, -1.13571298122406, 0.10228858888149261, -0.5836986899375916, 0.15319134294986725, -0.32595258951187134, -0.24900133907794952, 0.7401646375656128, 0.1408357471227646, 0.6613197326660156, -...
def _ _ init _ _ ( self, values, p = none, interp ='bilinear ', lazy = false ) : if isinstance ( values, ( list, tuple ) ) : if len ( values ) > = 1 : values = th. floattensor ( values ) self. values = values if not p is none : p = np. array ( self. p ) if np. abs ( 1. 0 - np. sum ( p ) ) > 1e - 3 : raise valueerror ('...
[ 0.32836228609085083, 0.7399803996086121, 0.710332453250885, 0.28576382994651794, 0.45405957102775574, 0.6188929080963135, 0.1466170847415924, 0.7116125226020813, 0.15362416207790375, -0.38476619124412537, 0.169021874666214, -0.5589165091514587, -0.4808707535266876, 0.1796277016401291, -0...
def start _ deamon _ proxy ( self, apps _ count ) : pass
[ -0.26697689294815063, 0.2791917622089386, 0.38190028071403503, 0.5959713459014893, 0.7281109094619751, 0.17652755975723267, 0.6089372634887695, 1.250796914100647, -0.12252578884363174, -0.09809167683124542, -0.4958229660987854, -0.04064812511205673, 0.003113383427262306, 0.3628981709480285...
def init ( cls, files = [ ], keep _ temps = false, force = false ) : cls. counter = defaultdict ( int ) cls. files = files cls. temp _ files = set ( ) cls. keep _ temps = keep _ temps cls. force = force
[ -0.1483730524778366, 0.35658878087997437, 0.48959603905677795, 0.050168514251708984, 0.5938116908073425, 0.8985602855682373, 0.4667910933494568, 0.38669002056121826, -1.0924018621444702, -0.030759070068597794, -0.9826179146766663, -0.849635124206543, -0.438603013753891, 0.9781164526939392,...
def mapping _ list ( environ, start _ response ) : current _ user = environ ['tiddlyweb. usersign'] ['name'] store = environ ['tiddlyweb. store'] try : bag = bag ( mapping _ bag ) tiddlers = filter _ tiddlers ( store. list _ bag _ tiddlers ( bag ),'select = user : % s'% current _ user, environ = environ ) results = { }...
[ -1.5920464992523193, -0.6070268750190735, 0.6877100467681885, -0.06871520727872849, 0.13810168206691742, -0.2341725081205368, 0.1300254762172699, 0.275246798992157, 0.4658127725124359, 0.850464940071106, -0.5659351944923401, -0.34402039647102356, 0.3063400387763977, 0.4000179171562195, -...
def process _ coins ( user _ prompt ) : quarter = int ( input ( " how many quarter do you have? : " ) ) dimes = int ( input ( " how many dimes do you have? : " ) ) nickles = int ( input ( " how many nickles do you have? : " ) ) pennies = int ( input ( " how many pennies do you have? : " ) ) user _ total = quarter * 0. ...
[ -0.18699787557125092, 0.3082132339477539, 0.9714296460151672, 0.17763862013816833, -0.6009595394134521, -0.29030945897102356, 0.5836948156356812, -0.9964467883110046, -0.08868234604597092, 0.06857256591320038, -0.6389062404632568, -0.2899710237979889, -0.12769579887390137, -0.3301672339439...
def parse _ osm _ tags ( overpass _ json, variable _ names, true _ value = true, false _ value = false, none _ value = np. nan, imperial _ units = false ) : # if variables names is list, make into dictionary if isinstance ( variable _ names, list ) : variable _ names = dict ( zip ( variable _ names, variable _ names ) ...
[ -0.1478632241487503, -0.3626110553741455, 0.7897056937217712, -0.5430170297622681, -0.20399852097034454, -0.29805615544319153, -0.38244596123695374, -0.26615121960639954, -0.9773171544075012, 0.5993587374687195, -0.4162939786911011, -0.02901950664818287, 0.08937231451272964, 1.513628125190...
def test _ read _ wavfile _ 2 ( ) : filename = os. path. join ( os. path. expanduser ( " ~ " ), " projects ", " audio _ processing ", " samples ", " stereo _ 44100 _ 16bits. wav " ) stereo _ 44100 _ 16bits = audio. audio ( filename ) print ( stereo _ 44100 _ 16bits )
[ 1.3092632293701172, 0.27997276186943054, 0.6872400641441345, 0.2911534309387207, 0.06274445354938507, 0.903170108795166, 1.1492983102798462, -0.5040498375892639, -0.23416271805763245, -0.27732595801353455, 0.2986118197441101, 0.4667796790599823, -0.014619729481637478, -0.5474891662597656, ...
def process _ zipcode ( self, df, col ='zipcode') : new _ df = df. copy ( ) new _ df = new _ df. dropna ( subset = [ col ], how ='any ', axis = 0 ) # handle rows with multiple zip codes new _ df. loc [ :, col ] = new _ df [ col ]. apply ( lambda x : self. parse _ zipcode ( x ) ) return new _ df
[ -0.2500576972961426, 0.56673663854599, 0.6807971596717834, 0.06700723618268967, -0.01959121599793434, -1.2465286254882812, 0.18874813616275787, 0.71736741065979, 0.37941113114356995, 0.3934517502784729, 0.6773386597633362, -0.07016333192586899, 0.6654123663902283, -0.4369179308414459, 1....
def import _ pandas _ columns _ from _ txt ( file _ name = '.. / data / features _ columns. txt') : save _ log ('{ 0 } : : { 1 } '. format ( import _ pandas _ columns _ from _ txt. _ _ module _ _, import _ pandas _ columns _ from _ txt. _ _ name _ _ ) ) file _ text = open ( file _ name, " r " ) array _ features = [ ] f...
[ -0.032831888645887375, -1.111677646636963, 0.6009840369224548, 0.5349182486534119, 0.47821754217147827, 0.5043801069259644, 0.2867051362991333, 0.20208142697811127, -1.0567965507507324, 0.5186496376991272, -1.6707888841629028, 0.8353923559188843, -0.1320599466562271, -0.9184231162071228, ...
def delete _ client ( client ) : try : client. send ( bytes ( " logout ", " utf - 8 " ) ) client. close ( ) except : pass print ( " % s : % s has disconnected " % addresses [ client ] )
[ 0.06830738484859467, -0.47251516580581665, 0.4818188548088074, -0.6937462687492371, -0.530576229095459, 0.8025494813919067, 0.2579224407672882, -0.49016761779785156, 1.0436866283416748, 0.1922089010477066, -0.3230944871902466, 0.689538836479187, -0.8792533278465271, -0.7336048483848572, ...
def add _ section _ to _ testsuite ( client, project _ id, suite _ id, section _ name ) : data = {'suite _ id': suite _ id,'name': section _ name } section = client. send _ post ('add _ section /'+ project _ id, data ) return str ( section ['id'] )
[ -0.15923546254634857, -0.20673635601997375, 0.6582870483398438, 0.12313070148229599, 0.1587403267621994, 0.562356173992157, -0.16406264901161194, -0.6662142872810364, -0.004799528978765011, 0.5595237612724304, 0.13120467960834503, 0.29208770394325256, -1.0758060216903687, 0.809089243412017...
def third _ row _ seats ( self ) - > str : return self. _ car. get ( " vehicle _ config ", { } ). get ( " third _ row _ seats " )
[ 0.228146031498909, -0.17404292523860931, 0.28736618161201477, -0.0419933907687664, 0.05751694366335869, 0.7398387789726257, -0.8995314240455627, -0.40586021542549133, 0.017130088061094284, 0.5284009575843811, -0.11763414740562439, -0.2070048451423645, -0.46243754029273987, -0.5309731960296...
def load _ imgs ( self, base _ dir ) : # add classes self. add _ class ( " shapes ", 1, " food " ) img _ path = os. path. join ( base _ dir, " imgs " ) mask _ path = os. path. join ( base _ dir, " masks " ) for i, filename in enumerate ( glob. glob ( img _ path +'/ *. jpg') ) : name = os. path. splitext ( os. path. bas...
[ -0.9284349679946899, -0.0869862362742424, 0.8430514335632324, 0.15027402341365814, 0.9086902141571045, 0.1630067378282547, 0.6389843225479126, -0.3008483350276947, -0.033593665808439255, -0.04102475196123123, -0.2534416913986206, 0.4397374391555786, 0.6601306200027466, 0.9089210629463196, ...
def exception _ dates ( day _ list ) : on _ day = 0 for value in day _ list : on _ day | = ( 1 < < ( value - 1 ) ) return on _ day
[ -0.5722784399986267, 0.6564390063285828, 0.3843778371810913, 1.0901834964752197, -0.14632706344127655, 0.5880211591720581, -0.2115754783153534, 0.3702794909477234, 0.5531914234161377, -0.2795449197292328, -0.5258381366729736, -0.06245772913098335, -0.718605101108551, 1.4945119619369507, ...
def get _ headers ( self, content _ type ) : # type - text = > dict # todo - add kwargs so that user can provide more headers authorization = microsoft _ bot _ framework _ connect ( ) return {'content - type': content _ type,'authorization': authorization if'bearer'in authorization else str ('bearer'+ authorization ) }
[ -0.13219188153743744, -0.6435680985450745, 0.4187764525413513, 0.3375972509384155, -0.697902500629425, -0.37687593698501587, -0.753636360168457, -0.9356228709220886, -0.5322974920272827, 0.5740584135055542, 0.028032802045345306, -0.4290136992931366, -0.587034285068512, 0.30267590284347534,...
def new _ tile ( self ) : empty _ tiles = self. get _ empty _ tiles ( ) if len ( empty _ tiles ) > 0 : if random. random ( ) < 0. 9 : num = 2 else : num = 4 tile = random. choice ( empty _ tiles ) self. set _ tile ( tile [ 0 ], tile [ 1 ], num )
[ -0.3073762357234955, 0.4064755439758301, 0.41092219948768616, 0.19944718480110168, 0.4075939953327179, 0.3038361072540283, 0.1879735141992569, 0.148824542760849, -0.13869261741638184, -0.47865524888038635, -0.6420994997024536, 0.12813033163547516, -0.4448687732219696, 0.016741540282964706,...
def metadata ( self ) : return self. _ md
[ -0.10926303267478943, -0.6943035125732422, 0.2193973958492279, 0.17102448642253876, 0.40715348720550537, 0.9605884552001953, -0.5323799848556519, -0.04732811450958252, -0.03503258526325226, -0.5135225653648376, 1.2626413106918335, 0.47553643584251404, 0.3042033016681671, -0.309460133314132...
def expand _ paths _ or _ globs ( * paths _ or _ globs : str ) - > iterable [ path ] : for path _ or _ glob in paths _ or _ globs : if os. path. exists ( path _ or _ glob ) : # this is a valid path ; yield it without evaluating it as a glob. yield path ( path _ or _ glob ) else : paths = glob. glob ( path _ or _ glob )...
[ 0.5254461765289307, -0.006886489223688841, 0.7986912727355957, 1.0953482389450073, 0.5836176872253418, 1.1251015663146973, 0.2548859417438507, 0.07015195488929749, 0.01577628403902054, -0.5893813967704773, 1.3768607378005981, -0.8688746690750122, -0.0777125284075737, 0.010674349032342434, ...
def test _ can _ hook _ body _ data ( self ) : new _ body _ data = {'new _ body _ data':'set _ in _ hook'} class myapiclient ( apiclient ) : @ apiclienthook. hook _ client _ body _ data ( client ='httpbin _ 2 ', requests = ['*'] ) def overide _ body _ data ( self, data, * * kwargs ) : return new _ body _ data httpbin =...
[ -0.6294350028038025, -0.39434102177619934, 0.4362163543701172, -0.28968265652656555, -0.266095370054245, 1.243788480758667, -0.05592511594295502, -0.3850647211074829, -0.4718225300312042, -0.36102035641670227, -0.6619781851768494, 0.8752046227455139, -0.5001470446586609, 0.0816653147339820...
def cross _ validate ( model : baseestimator, x : pd. dataframe, y : pd. dataframe, n _ fold : int = 10 ) - > tuple [ np. array, pd. dataframe ] : maes = [ ] preds = pd. dataframe ( ) cv = timeseriessplit ( n _ fold ) for fold, ( train _ index, test _ index ) in enumerate ( cv. split ( x, y ) ) : x _ fold _ train, x _ ...
[ -0.6019396781921387, 0.4183184504508972, 0.8761515617370605, 0.46479228138923645, -0.7793931365013123, 0.07361064106225967, -0.21685123443603516, 0.43755263090133667, 0.11874295771121979, 0.7299772500991821, 0.3935871124267578, -0.09084869176149368, 1.0883358716964722, 0.6694782972335815, ...
def selectvalues ( self, stream _ id, channel _ id ) : return self. cursor. execute ( " select * from chat _ log where channel _ id = { } " " and stream _ id = { } ". format ( channel _ id, stream _ id ) )
[ 0.893366277217865, -0.8535147309303284, 0.30365052819252014, -0.2967248857021332, 0.1390846222639084, -0.5177575945854187, -1.7660462856292725, -0.7937870621681213, -0.6737125515937805, 0.3666224181652069, 0.20149733126163483, 1.5901964902877808, -0.4293496906757355, 0.18996405601501465, ...
def test _ list _ integer _ pattern _ 3 _ nistxml _ sv _ iv _ list _ integer _ pattern _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - pattern - 4. xsd ", instance = " nistdata / list / integer / sc...
[ -0.7359918355941772, -0.4352016746997833, 0.5145668983459473, 0.27271535992622375, -0.5521032810211182, -0.09763680398464203, -0.47906559705734253, 0.32706740498542786, 0.6966902017593384, 0.6200050115585327, -1.001887321472168, -0.5338439345359802, -0.3059042990207672, 0.38480985164642334...
def logsumexp ( tensor : torch. tensor, dim : int = - 1, keepdim : bool = false ) - > torch. tensor : max _ score, _ = tensor. max ( dim, keepdim = keepdim ) if keepdim : stable _ vec = tensor - max _ score else : stable _ vec = tensor - max _ score. unsqueeze ( dim ) return max _ score + ( stable _ vec. exp ( ). sum (...
[ 0.4890296459197998, 0.527690052986145, 0.9985136985778809, 0.9303836226463318, -0.4646654427051544, 0.47697100043296814, -0.4173829257488251, 0.54783695936203, 0.6249285340309143, 0.7334725856781006, -0.22561956942081451, 0.19888924062252045, 0.32628703117370605, -1.4010307788848877, 0.5...
def generate _ plots ( n, file _ name, direc ) : if not os. path. exists ( ". / data / { } ". format ( direc ) ) : os. makedirs ( ". / data / { } ". format ( direc ) ) os. makedirs ( ". / data / { } / plots ". format ( direc ) ) with open ( ". / data / { } / ". format ( direc ) + file _ name + " _ coords. idl ",'w') as...
[ -0.4063720107078552, 1.0624396800994873, 0.9653981924057007, -0.4908788800239563, 0.5280860662460327, 1.027164340019226, 0.9905115365982056, -0.4846755564212799, -0.8105747699737549, -0.4519891142845154, -0.8406916260719299, -0.4654598832130432, 0.5059548616409302, 0.18835508823394775, -...
def _ prepare _ state _ hops _ without _ proxy _ pc ( self ) : state _ hops = { unixremote. not _ connected : { unixremote. unix _ remote : unixremote. unix _ local, unixremote. unix _ local _ root : unixremote. unix _ local, unixremote. unix _ remote _ root : unixremote. unix _ local, }, unixremote. unix _ local : { u...
[ -0.5942059755325317, -0.4830927550792694, 0.7603201866149902, -1.3571845293045044, -0.20216228067874908, 1.020660400390625, -0.1364118456840515, -0.2989806532859802, 0.4163205027580261, -0.2526351809501648, -0.2470807135105133, -0.37335193157196045, -0.41740772128105164, -0.557053029537200...
def families ( self ) : wall _ kinds = [ ] for member in dir ( db. wallkind ) : if type ( getattr ( db. wallkind, member ) ) is db. wallkind : wall _ kinds. append ( getattr ( db. wallkind, member ) ) return wall _ kinds
[ 0.3057161569595337, 0.5968554019927979, 0.379902184009552, 0.5233038067817688, 0.42261752486228943, 0.3217470943927765, -0.4347677528858185, -0.7281434535980225, -0.6386692523956299, 0.02014777995646, -0.21215754747390747, 0.5399247407913208, -1.1861975193023682, 1.8284028768539429, -0.8...
def test _ atomic _ hex _ binary _ enumeration _ 3 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ enumeration _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - enumeration - 4. xsd ", instance ...
[ -0.6879560947418213, -0.6452857851982117, 0.5537213683128357, 0.494344562292099, -0.37140509486198425, 0.18236985802650452, -0.3513609766960144, -0.14381219446659088, -0.44229748845100403, 0.3387259244918823, -0.7120844125747681, -0.6486307382583618, -0.057080939412117004, 0.26626291871070...
def rainbow _ gradient ( data, max _ value ) : for value in data : middle = max _ value / 2. r = int ( max ( 0, 255. * ( value / middle - 1. ) ) ) b = int ( max ( 0, 255. * ( 1. - value / middle ) ) ) yield r yield 255 - b - r yield b
[ -0.30685535073280334, 0.26458239555358887, 0.6431509852409363, -0.4205421209335327, -1.0152994394302368, 0.12707068026065826, 0.057412341237068176, -0.2726542055606842, -0.0517280176281929, 0.2163921445608139, -1.1815879344940186, -0.0369715616106987, -0.011507008224725723, 0.6637802124023...
def model _ update ( self, weights _ to _ update ) : new _ state _ dict = { } model _ counter _ = 0 for param _ idx, ( key _ name, param ) in enumerate ( self. network. state _ dict ( ). items ( ) ) : # handle the case that ` running _ mean ` and ` running _ var ` contained in ` batchnorm ` layer if " running _ mean " ...
[ -1.4776084423065186, -0.5616682767868042, 0.4080212116241455, 0.04202613979578018, -0.21894234418869019, 0.005894577596336603, -0.06318563222885132, 0.2230081409215927, -0.7536702752113342, 0.8893433213233948, -0.3432251811027527, -0.3456787168979645, 0.212172269821167, 0.1594584584236145,...
def plotcobtseg ( nodepath, segment, polygon, scale, steplength, rgba = [. 5,. 5,. 5, 1 ] ) : # plot polygonlist = [ ] for height in range ( 0, int ( 360 * scale ), steplength ) : rotedcobt = stb. genminkovseg ( stb. rotate ( polygon, height / scale ), segment ) polygonlist. append ( rotedcobt ) cobtnp = stb. gencobtnp...
[ 0.046516053378582, -0.4225400984287262, 0.5378226041793823, -0.09215469658374786, 0.2744571268558502, 0.5458588004112244, 0.08703766018152237, -0.5394538640975952, -0.32159000635147095, 0.11009985208511353, -0.7974103093147278, -0.019831864163279533, 0.01879011280834675, -0.087242789566516...
def calculate _ desired _ noise _ rms ( signal _ rms, snr ) : return signal _ rms / ( 10 * * ( snr / 20 ) )
[ 0.14434735476970673, 0.31453457474708557, 0.29441919922828674, -0.31416043639183044, 0.31162410974502563, -0.9928382039070129, -1.2187941074371338, -0.029520081356167793, 0.5605287551879883, -0.2999277412891388, -0.36086612939834595, 0.8357383012771606, -0.24404317140579224, 0.908035576343...
def init ( self, ndim, std = 1. 0 ) : self. ndim = ndim self. w = numpy. asarray ( rng. uniform ( high = 0. 001, low = - 0. 001, size = ( self. nword, self. ndim ) ) )
[ 0.006688518915325403, 0.33189964294433594, 0.5684286952018738, -0.3007776141166687, -0.06980530917644501, 1.1177150011062622, 0.22704677283763885, -0.38848060369491577, 0.3320911228656769, 0.05876864492893219, -0.29720842838287354, 0.7974644899368286, -0.13750900328159332, 2.26213669776916...
def show _ path _ topic ( self ) : for path, topic _ file in self. _ gathering _ topics ( ) : print ( os. path. join ( path, topic _ file ) )
[ 1.1241202354431152, -0.8638177514076233, 0.4500843286514282, 0.24221669137477875, 0.13378450274467468, 1.1267423629760742, 0.8669170141220093, -0.3865789473056793, -1.186682939529419, 0.5139769315719604, 1.4021265506744385, 0.19233542680740356, 0.3120408058166504, 0.4416661560535431, -0....