text
stringlengths
25
2.19k
embedding
listlengths
768
768
def create _ look _ ahead _ mask ( size ) : # 1 - lower triangular matrix return 1 - tf. linalg. band _ part ( tf. ones ( ( size, size ) ), - 1, 0 )
[ -0.2579461336135864, -0.02874729596078396, 0.49733036756515503, -1.0391398668289185, -0.38645443320274353, 1.000247836112976, 0.6936356425285339, -1.1963415145874023, 0.7465784549713135, -0.6720499992370605, -0.13840802013874054, 0.4027070105075836, 0.06097574159502983, -0.5775041580200195...
def test _ delete _ alumno _ admin _ while _ active ( self ) : self. client. force _ authenticate ( user = self. user _ admin ) id _ alumno = self. alumno _ curso _ 1. alumno. pk response = self. client. delete ( f " / api / alumnos / { id _ alumno } / " ) self. assertequal ( response. status _ code, status. http _ 400...
[ 0.6600215435028076, -0.6104319095611572, 0.44811657071113586, 0.8002856969833374, 0.5670411586761475, 1.1849168539047241, 0.08968592435121536, -0.703551173210144, 0.8346870541572571, 0.3342773914337158, -0.49066469073295593, 1.9133342504501343, 0.23976942896842957, -0.4080294966697693, 1...
def create _ chromosome _ empty _ matrix ( chromosome, resolution, genome ) : chromosomes _ dict = choose _ genome _ version ( genome _ version = genome ) length = chromosomes _ dict [ chromosome ] number _ of _ beads = ceil ( length / resolution ) matr = np. zeros ( ( number _ of _ beads, number _ of _ beads ) ) retur...
[ 0.16377146542072296, -0.19708794355392456, 0.22670328617095947, -0.29030877351760864, 0.14451681077480316, 0.7443914413452148, 1.3381850719451904, 0.4132915139198303, 0.3130928874015808, 0.192825049161911, -0.7185493111610413, 0.4969056248664856, -0.9835702776908875, 0.33644425868988037, ...
def simple _ rfi _ path ( f _ start, drift _ rate, spread, spread _ type ='uniform ', rfi _ type ='stationary') : f _ start = unit _ utils. get _ value ( f _ start, u. hz ) drift _ rate = unit _ utils. get _ value ( drift _ rate, u. hz / u. s ) spread = unit _ utils. get _ value ( spread, u. hz ) def path ( t ) : if sp...
[ -0.025466207414865494, -0.3744180500507355, 0.7499520778656006, 0.23805435001850128, -0.8514167070388794, 0.6063830852508545, 0.6383057236671448, -0.046419426798820496, 0.39699575304985046, -0.3750862181186676, 0.6522476077079773, -0.3324049413204193, 0.1750856339931488, -0.097963191568851...
def pathsum ( self, root : optional [ treenode ], targetsum : int ) - > int : def calculate _ sums _ of _ path _ started _ from _ current _ node ( node : optional [ treenode ], curr _ sum : int ) - > none : if not node : return curr _ sum + = node. val if curr _ sum = = targetsum : self. ans + = 1 # calculate the sums ...
[ -0.17928263545036316, -0.39147013425827026, 1.1107304096221924, 0.29515767097473145, -0.5063097476959229, -0.22508825361728668, 0.9291864633560181, 0.15667128562927246, 0.5627260804176331, 0.12138111889362335, -0.0865379199385643, 0.7541488409042358, -0.20190343260765076, 0.355014920234680...
def organize _ directory _ structure ( prefix = " original ", feature _ model _ path = " feature _ models ", confidence _ path = " confidences " ) : os. makedirs ( feature _ model _ path, exist _ ok = true ) feature _ dir = os. path. join ( feature _ model _ path, prefix ) os. makedirs ( feature _ dir, exist _ ok = tru...
[ -0.32141736149787903, -0.523919403553009, 0.5603412985801697, 0.04589060693979263, 0.5309321284294128, 0.34307488799095154, 1.00599205493927, 0.4572735130786896, -0.4302152991294861, -0.5552207827568054, 0.016438230872154236, 0.3329222500324249, 0.5080551505088806, 0.24055419862270355, 0...
def ntk _ fn ( x1 : pytree, x2 : optional [ pytree ], params : pytree, * * apply _ fn _ kwargs ) - > np. ndarray : args1, args2, fx1, fx2, fx _ axis, keys, kw _ axes, x _ axis = _ get _ args ( f, apply _ fn _ kwargs, params, vmap _ axes, x1, x2 ) def j _ fn ( x, * args ) : _ kwargs = { k : v for k, v in zip ( keys, arg...
[ -0.22078979015350342, 0.818448543548584, 1.044625997543335, 0.2887701988220215, -0.48259755969047546, -1.0389573574066162, 0.096538245677948, -0.3441944122314453, -0.6935948133468628, 0.6007100939750671, -0.3426387310028076, 0.11218585073947906, 0.8680679798126221, 0.18014678359031677, -...
async def process _ triggers ( self, msg ) : for t in self. triggers : if t. is _ triggered ( msg. clean _ content ) : # warn : this runs each triggers ( if needed ) non - concurrently one after another # warn : updating python to 3. 7 gives the ability to create easily tasks that can run concurrent awaitables await t....
[ 0.31249597668647766, 0.3428046703338623, 0.3537612557411194, -0.2006330043077469, 0.9881166219711304, -1.3238860368728638, 0.9045177698135376, 0.41964730620384216, -0.25364813208580017, -0.3243042230606079, -0.754632294178009, -0.3541029691696167, -0.42069172859191895, 0.7845858931541443, ...
def get _ nearest _ orbit _ num ( orbit _ nums, idx, d _ idx ) : while true : idx + = d _ idx if idx < 0 or idx > = len ( orbit _ nums ) : raise notfounderror ( " no nearest orbit num found " ) if orbit _ nums [ idx ]! = - 1 : break return orbit _ nums [ idx ], idx
[ -1.3080962896347046, 0.2534078061580658, 0.41661733388900757, -0.7732914090156555, -0.82173752784729, 0.38544392585754395, -0.30545884370803833, -0.6673908233642578, 0.37367895245552063, 0.04434901848435402, 0.5354326963424683, 1.0694372653961182, -0.03480132296681404, -0.26551494002342224...
def make _ replay _ tables ( self, environment _ spec : specs. environmentspec, policy : actor _ core. feedforwardpolicy, ) - > list [ reverb. table ] : del policy replay _ table = reverb. table ( name = self. _ config. replay _ table _ name, # todo ( yl ) : support prioritized sampling in sac sampler = reverb. selecto...
[ 0.7613982558250427, 0.34474027156829834, 0.4606471061706543, -0.19700317084789276, 0.5990905165672302, 0.12310358881950378, 0.07204996049404144, 0.4907854199409485, 0.19868294894695282, 0.6183053255081177, -0.500720202922821, 0.675727367401123, 0.3170294463634491, 0.18053703010082245, -0...
def get _ absolute _ url ( self ) : return reverse ('organization - detail ', args = [ str ( self. id ) ] )
[ -0.1531892865896225, -0.32036492228507996, 0.5330782532691956, -0.017771122977137566, 1.037801742553711, 1.0028212070465088, -0.36553192138671875, 0.22483870387077332, -0.5110493302345276, -0.3423207700252533, 0.6390388011932373, 0.945219099521637, 0.5075294971466064, 0.2627027630805969, ...
async def _ bulk _ dispatch ( self ) : while not self. _ queue. empty ( ) : bulk = list ( zip ( * ( await self. _ get _ bulk ( ) ) ) ) # noqa b905 if not bulk : continue tasks, futures = bulk # limit concurrent bulk execution # we must make sure * here * that a new bulk can be launched, but # we must release the claim ...
[ 0.7485336661338806, 0.31720221042633057, 0.7707822322845459, -0.09336060285568237, 1.1133631467819214, -0.8118938207626343, 0.12973655760288239, 0.00517793046310544, 0.07316660135984421, -0.47168484330177307, -0.2504054605960846, 0.8151804208755493, 0.9442811012268066, 0.07778096199035645,...
def _ _ lt _ _ ( self, other ) : return self. name < other. name
[ 0.5858832001686096, -1.1398913860321045, 0.9281681776046753, -0.9699501991271973, -0.5288175940513611, 0.5112341046333313, -1.20552659034729, -2.1494009494781494, -0.7278082370758057, -0.9003337621688843, -0.8403787612915039, -0.23246829211711884, 0.2900943160057068, 0.49888864159584045, ...
def get _ df _ loc ( self ) - > pd. core. frame. dataframe : if self. method = ='local': dfloc = self. load _ data _ from _ local ( ) elif self. method = ='gcp': dfloc = self. load _ data _ from _ gcp _ cloud ( ) else : raise keyerror ( f'error - non supported method : { self. method }') print ( f'loaded existing data ...
[ -0.36803919076919556, 0.7395470142364502, 0.4807095229625702, -0.15921132266521454, 0.413320392370224, -0.07359704375267029, 0.9179785251617432, -0.6469415426254272, -0.9472677111625671, -1.0814001560211182, 0.2859308421611786, 0.7602154016494751, 0.08183132857084274, -0.6063475608825684, ...
def dedent _ feature _ file ( contents ) : dedented = textwrap. dedent ( contents ) # remove first empty line return " \ n ". join ( dedented. splitlines ( ) [ 1 : ] ) + " \ n "
[ 0.6474711894989014, -1.58036470413208, 0.5960506200790405, -0.6866768002510071, 0.12492392212152481, -0.0607520192861557, -0.6768468618392944, 0.5511680841445923, -0.5300750136375427, -0.057223111391067505, 0.14843794703483582, -0.30041956901550293, -0.42844530940055847, -0.821294546127319...
def test _ add _ feature ( self ) : pass
[ 0.33226993680000305, 0.1845053732395172, 0.2945746183395386, 1.5048282146453857, 1.3184351921081543, 0.3050832450389862, 0.6292230486869812, 0.2722115218639374, 0.2668379545211792, -1.841577172279358, -1.2216486930847168, 0.25610411167144775, -1.0503612756729126, 0.168735533952713, -0.29...
def getheader ( self, field, default ='' ) : if self. headers : for header in self. headers : if field. lower ( ) = = header. lower ( ) : return self. headers [ header ] return default
[ -0.10500417649745941, -0.23867197334766388, 0.47614824771881104, 0.32527223229408264, 0.09158794581890106, -0.21840305626392365, -1.1213223934173584, -1.2666431665420532, -0.8849606513977051, -0.03156276047229767, 0.1843070685863495, -0.07996265590190887, -1.7747645378112793, -0.5050437450...
def realise ( u, d, p, w ) : basis = legendre _ chaos ( d, p ) p, n = u. shape us = np. zeros ( ( n, ) ) for j in range ( n ) : for s in range ( p ) : us [ j ] + = u [ s, j ] * basis [ s ] ( w ) return us
[ 0.17014935612678528, 0.41171687841415405, 0.4008895754814148, -0.6155360341072083, 0.14873835444450378, -0.05008523538708687, -0.04297732561826706, 0.9594365358352661, 0.8559028506278992, -0.4422430098056793, -0.13467875123023987, 0.34734830260276794, -0.21852508187294006, 0.02280005253851...
def process ( cursor, filename, huc12df ) : # we get the huc12 code based on the filename huc12 = filename [ - 16 : - 4 ] delete _ previous ( cursor, huc12 ) huc8 = huc12 [ : - 4 ] # the inbound dataframe has lots of data, one row per flowpath point # we group the dataframe by the column which uses a prefix and the huc...
[ 0.1380642205476761, -0.02487652748823166, 0.8213912844657898, 0.08206309378147125, 0.4705665409564972, -0.662312924861908, 0.4034522771835327, 0.22914443910121918, -0.1843678206205368, 0.10677597671747208, 0.7651800513267517, -0.2927529215812683, 0.01035183947533369, 0.1549033373594284, ...
def add _ arguments ( parser ) : add _ token _ flags ( parser ) parser. add _ argument ('- - json ', help ='provide the data in a json file ', dest ='json') parser. add _ argument ('token ', nargs = '?')
[ -0.3661092221736908, -0.2778662443161011, 0.6538944244384766, -1.1170902252197266, 0.4870304465293884, 0.4641141891479492, -0.975676417350769, 0.5857872366905212, -0.623005747795105, -0.37072449922561646, -0.5686618685722351, 0.6158678531646729, 0.49193382263183594, 1.0172476768493652, 0...
def extra _ state _ attributes ( self ) : return self. _ event _ attributes
[ -0.24746350944042206, -0.5632374882698059, 0.6111093759536743, 0.10059729218482971, -0.8315262794494629, 0.50837242603302, 0.120061956346035, 0.5366015434265137, 0.7657843828201294, -0.047050993889570236, -1.0389939546585083, -0.0691457986831665, -0.2772396206855774, 0.3123977482318878, ...
def _ darwinmountdmg ( self, sdmg ) : self. _ darwinunmountdmg ( fignoreerror = true ) smountpath = self. _ darwindmgpath ( ) ; if not os. path. exists ( smountpath ) : try : os. mkdir ( smountpath, 0755 ) ; except : reporter. logxcpt ( ) ; return false ; return self. _ executesync ( ['hdiutil ','attach ','- readonly '...
[ -0.27546176314353943, 0.7930501103401184, 0.8351549506187439, -0.16238559782505035, -0.8896452188491821, 0.5722677707672119, -0.6501786708831787, -0.6381539106369019, 0.39485785365104675, 0.15421488881111145, -0.06999529153108597, -0.12048735469579697, 0.09811542928218842, 1.02665114402771...
def read ( self, n = 1 ) : return b''
[ -0.7477346658706665, 0.5769624710083008, 0.4846355617046356, 0.7148541212081909, -0.47169187664985657, 0.39866504073143005, -0.5712811350822449, -1.1763103008270264, -0.06384748965501785, -0.8405876755714417, -0.3558392822742462, 0.3032535910606384, -1.0346943140029907, -0.3821625113487243...
def wrap _ get _ current _ time ( self ) : real _ get _ current _ time = s3mysqldump. get _ current _ time self. _ now = none self. _ utcnow = none def fake _ get _ current _ time ( utc = false ) : result = self. _ utcnow if utc else self. _ now return result or real _ get _ current _ time ( utc = utc ) self. monkey _ ...
[ -1.2165284156799316, -0.2616341710090637, 0.6569913625717163, 0.4001900255680084, 0.2316923886537552, -0.16869273781776428, -0.06677094846963882, 0.4467799663543701, 0.5239976048469543, 1.278939127922058, -0.07536264508962631, 0.07857665419578552, 0.10096977651119232, 0.03403525799512863, ...
def fetch _ async _ host _ address ( ec2 _ async _ result ) : # ec2 instance status checks in progress while waiting for the async result print'running server checks...'ip _ address = ec2 _ async _ result. get ( ) # when ip address returns, instance is started print'server started'# sometimes client connects too soon a...
[ -1.0303822755813599, -0.9011503458023071, 0.33450862765312195, -0.2720877230167389, -0.7370479106903076, 0.156231090426445, -0.08900263905525208, 0.2579338252544403, -0.013724240474402905, -0.08253030478954315, 0.2118474394083023, 0.28858450055122375, -0.04901322349905968, -1.1506793498992...
def get _ html ( url ) : r = requests. get ( url, headers = headers ) return r
[ -0.5421625375747681, 0.49868538975715637, 0.242475688457489, 0.5108615159988403, -0.7567841410636902, 0.18146610260009766, -1.0498089790344238, -0.13139858841896057, -0.26352834701538086, 0.21528445184230804, 0.13843713700771332, 0.5663081407546997, -0.20166434347629547, -0.343904554843902...
def get _ potential _ recs ( sp ) : results = sp. current _ user _ top _ tracks ( time _ range ='short _ term ', limit = 5 ) uris = [ track ['uri'] for track in results ['items'] ] potential _ recs = sp. recommendations ( seed _ tracks = uris, limit = 10 ) recs = [ ] for track in potential _ recs ['tracks'] : rec = tra...
[ -0.4404657781124115, -0.2236609309911728, 0.4837796688079834, -0.10825364291667938, 0.07538285851478577, 0.19253556430339813, -0.4685710072517395, 0.20434923470020294, -0.04776586592197418, 0.23229199647903442, 0.1598534882068634, 0.9394853711128235, -0.26987236738204956, -0.24825768172740...
def stereonet ( strikes, dips ) : import numpy as np import matplotlib. pyplot as plt import mplstereonet # visualize stereonets ( schmidt projection ) fig = plt. figure ( figsize = ( 10, 10 ) ) ax = fig. add _ subplot ( 111, projection ='stereonet') ax. pole ( strikes, dips, '. ', color = " black ", markersize = 10 ) ...
[ 0.9434020519256592, 0.001271955668926239, 0.6321743130683899, 0.2752826511859894, 0.184200257062912, 0.479892760515213, 0.6250206232070923, 0.5637319087982178, 0.8589749932289124, -1.300460934638977, 0.06472892314195633, 0.049125079065561295, 0.9614177346229553, -0.24792888760566711, 0.5...
def get _ pcs ( gct _ df, normalize = true, c = none, n _ components = 5, return _ genes = false ) : if normalize : gct _ norm _ std _ df = normalize _ counts ( gct _ df, c = c ) else : gct _ norm _ std _ df = gct _ df pca = sklearn. decomposition. pca ( n _ components = n _ components ) pca. fit ( gct _ norm _ std _ d...
[ -0.1661480963230133, -0.11452820897102356, 0.6838237047195435, 0.25690147280693054, -0.43172621726989746, -0.07919285446405411, 0.5330667495727539, 0.3117658495903015, -0.022982563823461533, 0.13777460157871246, 1.0295605659484863, -0.07072695344686508, -1.0915619134902954, -0.476649552583...
def dlllist ( self ) : log. debug ( " executing volatility dlllist plugin on { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] command = self. plugins [ " dlllist " ] ( self. config ) for task in command. calculate ( ) : new = { " process _ id " : int ( task. uniqueprocessid ), " process _ name " :...
[ -0.26529011130332947, -0.9465784430503845, 0.6035318970680237, -1.3286398649215698, 0.43170472979545593, -1.1124905347824097, -0.6044349074363708, -0.09026029706001282, 0.4070896804332733, 1.1350984573364258, -0.9360158443450928, 0.1823086142539978, 0.08097309619188309, 0.7032148838043213,...
def preico _ funding _ goal ( ) - > int : return to _ wei ( 1000, " ether " )
[ 0.1456916779279709, 0.7855262756347656, 0.40224528312683105, 1.0876561403274536, -1.0778757333755493, -0.10961196571588516, 0.3851979672908783, 1.0482062101364136, -0.39822983741760254, 0.11042533069849014, -0.0717923566699028, -0.4996064007282257, 0.30506932735443115, 0.298752099275589, ...
def make _ first _ example ( self ) : return self. example + str ( 0 )
[ 0.9322174787521362, -0.2653796076774597, 0.4324774742126465, -0.5766832828521729, -0.22830072045326233, 0.7367245554924011, -0.15097017586231232, 0.7384134531021118, 0.239720419049263, -0.03322339430451393, -0.1622006893157959, 0.6776895523071289, 0.4680081307888031, -0.015307408757507801,...
def _ get _ period ( self ) : try : # could be class level return self. period except attributeerror : # defaut to immediate? return 0
[ -0.629419207572937, 0.12740738689899445, 0.6127086877822876, 0.6207246780395508, 0.18996186554431915, 0.17401891946792603, 0.63018399477005, -0.5597470998764038, 0.394622802734375, 0.16537360846996307, 1.0934971570968628, 0.05227870121598244, -0.6932735443115234, 0.5341912508010864, 0.85...
def write ( self, content ) : self. _ fileout. write ( content )
[ 0.4870965778827667, -0.73026043176651, -0.15828341245651245, -0.19657452404499054, 0.776800811290741, 0.4445860683917999, 0.3727491796016693, 0.8393664956092834, -1.2799230813980103, -0.553361713886261, -0.16022604703903198, -0.11537138372659683, -0.3732195794582367, 0.3002222776412964, ...
def loadgffstats ( infiles, outfile ) : p. concatenateandload ( infiles, outfile, regex _ filename = " (. * ). tsv. gz ", options = " - - allow - empty " )
[ 0.6856164336204529, 0.661279022693634, 0.5435349345207214, 0.4802747666835785, 0.38326624035835266, 0.6821877956390381, -0.02680618315935135, -0.3035125136375427, -1.1512929201126099, -0.1475718766450882, 0.5095058083534241, 0.24669742584228516, -0.04627804830670357, -0.018911687657237053,...
def handle _ request ( self, request ) : # special cases if request = = " wait " : time. sleep ( 1. 0 ) elif request = = " stop " : self. _ stop _ me = true # echo return " requested : " + request
[ -1.9384360313415527, -0.45814260840415955, 0.5897607803344727, 0.7663478255271912, 0.1894354224205017, 0.38422664999961853, -0.1269710808992386, -0.7046038508415222, -0.30548956990242004, -0.8234485983848572, 1.2754144668579102, -1.0965055227279663, -0.27251431345939636, -0.382848262786865...
def test _ delete _ alumno _ admin _ no _ existente _ o _ distinta _ institucion ( self ) : self. client. force _ authenticate ( user = self. user _ admin ) id _ alumno = alumno. objects. get ( dni = 5 ). id response = self. client. delete ( f " / api / alumnos / { id _ alumno } / " ) self. assertequal ( response. stat...
[ -0.0786413922905922, -0.03662780299782753, 0.5578057169914246, 0.22026683390140533, 1.3488332033157349, 1.5741809606552124, 0.3602220118045807, 0.29130056500434875, 0.7165191173553467, -0.2383240908384323, -0.36650824546813965, 1.4148308038711548, 1.071759581565857, 0.21638385951519012, ...
def discoverremotehosts ( hosts, tcpport ) : class _ checker ( threading. thread ) : def _ _ init _ _ ( self, iceaddress ) : threading. thread. _ _ init _ _ ( self, name = iceaddress ) self. iceaddr = iceaddress self. timeout = 5 * 500 # ice _ timeout ( seconds * 500 ) self. success = false def run ( self ) : self. suc...
[ -0.6626302003860474, -0.09305761754512787, 0.7802081108093262, 0.22949236631393433, 0.6188695430755615, 0.33173665404319763, 0.045548420399427414, -0.06936333328485489, -0.245829775929451, 0.33748823404312134, -0.623350203037262, 0.08882488310337067, -1.2475229501724243, 0.6973753571510315...
def n _ log _ base _ two ( n ) : return n * math. log ( 2, n )
[ -0.6613426804542542, -0.682839572429657, 0.2460184097290039, 0.436090886592865, 0.00028370515792630613, -0.6273268461227417, -0.9716546535491943, -1.2811739444732666, -1.0839518308639526, -0.3395979106426239, -1.0100468397140503, 0.16549357771873474, 0.6496834754943848, 0.46780288219451904...
def disable _ all _ jobs ( self ) : for j in self. jobs : j. disable ( )
[ 0.4284372329711914, -0.9865687489509583, 0.4360993802547455, 0.9534915089607239, -0.27179864048957825, 0.4310658872127533, 0.11975022405385971, 1.019884467124939, -0.5047289729118347, -0.7209163308143616, -0.5345537662506104, -0.4116028845310211, -1.033218502998352, 0.8811540603637695, 0...
def demean _ test _ matrix ( data, global _ mean, item _ means, user _ means, verbose = false ) : num _ items, num _ users = data. shape ( rows, cols, vals ) = sp. find ( data ) # substract baseline of each element in ` data ` train _ vals = vals. copy ( ) train _ vals = 1. 0 * train _ vals baselines = np. array ( [ ( ...
[ 0.7111566066741943, 0.19236108660697937, 0.5739701986312866, -0.2527836561203003, 0.22672395408153534, 0.5209821462631226, 1.10059654712677, 0.7184520959854126, 0.5199747681617737, 0.25859206914901733, 0.2132193148136139, 0.8277862668037415, -1.2913340330123901, -0.7293519973754883, 0.11...
def parse _ undo _ args ( args : list [ str ], flags : list [ str ] ) - > tuple [ bool ] : colored = true if long _ nocolor _ flag in flags : colored = false return colored,
[ -0.16293057799339294, 0.10030350089073181, 0.5367448329925537, -1.0182058811187744, 0.12232455611228943, 0.20665991306304932, -0.4612731337547302, 0.8007470369338989, -0.8142291903495789, 0.44140586256980896, -0.301435261964798, 0.35730379819869995, -0.2886667251586914, 0.7205584645271301,...
def sampleobst ( self, num ) : obstsamp = [ ] ; obstsampcount = 0 ; while ( obstsampcount < num ) : irand _ 1 = randrange ( 0, self. mworld. mwidth ) ; irang _ 2 = randrange ( 0, self. mworld. mheight ) ; if self. mobstmgr. isconfiginobstacle ( ( irand _ 1, irang _ 2 ) ) : obstsamp + = [ ( irand _ 1, irang _ 2 ) ] ; ob...
[ -0.8145956993103027, -0.1897384077310562, 0.5642535090446472, -0.13039594888687134, -0.5048988461494446, 0.3477877080440521, 0.45310333371162415, -1.1652952432632446, 0.48012611269950867, 0.5110336542129517, 0.018247142434120178, -0.10774024575948715, -0.17606109380722046, 0.31693223118782...
def test _ default _ language _ required _ for _ update ( self, mock _ sync ) : self. data. pop ('language') form = self. form _ class ( data = self. data, instance = factories. org ( ) ) self. assertfalse ( form. is _ valid ( ) ) self. assertequal ( form. errors. keys ( ), ['language'] ) self. assertequal ( form. erro...
[ -0.5411942601203918, 0.3017148971557617, 0.3228006362915039, -0.47501108050346375, 0.5294439196586609, 0.8761297464370728, -0.697093665599823, 0.42328065633773804, -0.4827674329280853, -0.08313307911157608, -1.2568473815917969, -0.7673928141593933, -0.23021188378334045, 0.7178614735603333,...
def testgraphfrommetagraphbecomesavailable ( self ) : directory = os. path. join ( self. get _ temp _ dir ( ), " metagraph _ test _ values _ dir " ) if tf. io. gfile. isdir ( directory ) : tf. io. gfile. rmtree ( directory ) tf. io. gfile. mkdir ( directory ) writer = test _ util. filewriter ( directory, max _ queue = ...
[ 1.0796101093292236, 0.4575233459472656, 0.49740830063819885, 0.23838208615779877, -0.020410265773534775, 0.11381448060274124, 0.4120418429374695, 0.4883958399295807, 0.4839383363723755, 0.4952353835105896, -0.17949636280536652, 0.8211979269981384, 0.5081360936164856, -0.057120341807603836,...
def rope _ event _ factory ( room, room _ 2 ) : def callback ( ) : print ('you used the " rope ". you can now climb down the chasm.') room. description = " " " \ a steep cliff appears before you, falling into the darkness. ahead to the north, a light flickers in the distance. a climbing rope is fastened securely. " " "...
[ 0.8265430331230164, -0.24815590679645538, 0.4164954423904419, -0.16842658817768097, 0.26904740929603577, -0.5624644756317139, 0.17107956111431122, -0.5209729075431824, -0.700630247592926, 0.19013024866580963, -0.022017624229192734, 1.3571114540100098, 0.480704665184021, 0.7578234076499939,...
def squared _ path ( f _ start, drift _ rate ) : f _ start = unit _ utils. get _ value ( f _ start, u. hz ) drift _ rate = unit _ utils. get _ value ( drift _ rate, u. hz / u. s ) def path ( t ) : return f _ start + 0. 5 * drift _ rate * t * * 2 return path
[ 0.3621434271335602, -0.553148627281189, 0.4429890215396881, 0.039121031761169434, -0.7662907242774963, -0.6673502326011658, 0.5966100096702576, -0.7476215362548828, -0.6002764105796814, -0.4021572768688202, 0.11829919368028641, -0.33938175439834595, 0.9253710508346558, -0.00788675714284181...
def construct _ watermark ( content ) : if isinstance ( content, list ) : for i, substring in enumerate ( content ) : # construct the mark for channel # i bitstring = text _ to _ bitstring ( substring ) # form bitstring wi = bitstring _ to _ list ( bitstring ) # split it into a list if i = = 0 : w = wi else : w = np. v...
[ -1.2017602920532227, 0.004452942404896021, 0.5361890196800232, -1.3423397541046143, 0.5221819281578064, -0.549921452999115, 0.5431638360023499, 0.0496852733194828, 0.22768794000148773, 0.7192022204399109, 0.02483653835952282, 1.0584349632263184, -0.9582555890083313, 0.3769776523113251, -...
def last _ year _ dates ( start _ date, end _ date ) : lst _ start _ date = start _ date. split ('-') lst _ end _ date = end _ date. split ('-') lastyear _ start _ year = int ( lst _ start _ date [ 0 ] ) - 1 lastyear _ end _ year = int ( lst _ end _ date [ 0 ] ) - 1 ly _ start _ date = f " { lastyear _ start _ year } -...
[ 0.15146705508232117, -0.9125053882598877, 1.0568633079528809, -0.6644243597984314, 0.16347293555736542, 0.2037462443113327, -1.1463958024978638, 0.72050541639328, 0.13129760324954987, 0.7386357188224792, -0.5822060704231262, 0.4362771511077881, -0.29971346259117126, -0.14836429059505463, ...
def _ _ init _ _ ( self, * args ) : pass
[ 0.17309658229351044, -0.5959532260894775, 0.3741130828857422, 0.9378101229667664, 1.0776631832122803, 0.46381834149360657, 0.31563350558280945, 0.10038095712661743, -0.7510321736335754, -0.9708048701286316, -0.3367096185684204, -0.08203879743814468, -0.19481827318668365, 0.6378073692321777...
def main ( ) : he. genheader ( " termo " ) st. write ( f " " " < div class = " conteudo main - title " style = " padding - top : 50px ; " > < b > termos de uso < / b > < / div > < div class = " conteudo " style = " padding - bottom : 10px ; " > 1. estou ciente que as sugestoes e recomendacoes apresentadas na plataforma...
[ 0.29487812519073486, 0.20863096415996552, 0.6036407351493835, 0.13116297125816345, 0.13722336292266846, 0.02521023526787758, 0.9477860927581787, 0.0972859114408493, -0.5140647888183594, -0.08720698952674866, -0.6092653274536133, -0.15038852393627167, 0.9494107365608215, 0.5434319376945496,...
def arrange _ data ( ) : df = pd. dataframe. from _ records ( get _ oref _ data ( ) ) df ['data'] = df ['data']. str. split ( ',') df. rename ( columns = {'data':'area _ name'}, inplace = true ) df = df. explode ('area _ name') df ['area _ name'] = df ['area _ name']. str. strip ( ) # correct some data : df = df [ df [...
[ 0.4022050201892853, -0.3764799237251282, 0.5601834654808044, -1.0648949146270752, -0.20766447484493256, -0.46516668796539307, 0.22233286499977112, 0.6483989357948303, 0.2195615917444229, 0.24479824304580688, 0.9935791492462158, 0.21077051758766174, 0.5302631855010986, -0.12205658107995987,...
def queue _ name ( self ) : return self. _ _ queue _ name
[ -0.25646501779556274, -1.5640861988067627, 0.46153903007507324, -0.039714232087135315, -0.5284923911094666, 0.43692994117736816, -0.4762738049030304, -0.10107756406068802, 0.22379368543624878, 0.5229287147521973, 0.42431801557540894, 0.7033692002296448, 0.6505233645439148, 0.19825679063796...
def getreviews ( ) : conn = connection. get _ connection ( ) num _ of _ results _ response = query. get ( conn, constant. reviews _ collection,'annotated : true ', 0 ) num _ of _ results = num _ of _ results _ response. result. dict ['response'] ['numfound'] response = query. get ( conn, constant. reviews _ collection,...
[ -0.22921790182590485, -0.34054577350616455, 0.42339348793029785, -0.2407853752374649, 0.7220261096954346, 0.18515868484973907, -0.905867874622345, 0.06416517496109009, -0.16795971989631653, -0.14819642901420593, -0.16320060193538666, -0.08438147604465485, -0.9478243589401245, 0.07911337912...
def test _ sequence _ wiki _ final ( ) : result = sequence _ wiki _ final ( " bonjour. \ ntu vas bien? \ noui, merci. " ) assert result = = [ " bonjour. ", " tu vas bien? " ]
[ -0.535210132598877, -0.6093136072158813, 0.4643889367580414, 0.2797970175743103, 0.04133022949099541, -0.16496455669403076, -0.8031536340713501, 0.7872522473335266, -0.4534946084022522, -0.13174475729465485, -0.1360662579536438, -0.22059902548789978, -0.6513845324516296, 0.3811026215553283...
def get _ password _ to _ workspace ( self ) - > str : workspaces = self. list _ all _ workspaces ( ) deployment _ name = self. _ generate _ workspace _ name ( ) name = none for workspace in workspaces : if deployment _ name in workspace : name = workspace if name is none : raise f " cannot find workspace { deployment ...
[ -0.5382383465766907, -0.9214801788330078, 0.6527011394500732, -0.025406472384929657, 0.1220204085111618, 0.24592195451259613, 0.04233688488602638, -1.1312228441238403, 0.05923713743686676, 0.812160074710846, 0.1315312385559082, 0.7737572193145752, -0.36216601729393005, 0.3332211971282959, ...
def payments _ missing ( assign = none ) : if'undo'in request. form : s = subscription. query. filter ( subscription. membership = = request. form ['membership'] ). one ( ) if s. member _ id : authutil. log ( eventtypes. rattbe _ logevent _ member _ payment _ unlinked. id, message = " undo ", member _ id = s. member _ ...
[ 0.890124499797821, -0.32381734251976013, 0.9337130784988403, -0.3943479359149933, -0.027490705251693726, -0.030168352648615837, 0.13661448657512665, 0.6841605305671692, 0.6003579497337341, -0.4472844898700714, 0.8894262909889221, 0.4038100242614746, -0.11729559302330017, 0.7993805408477783...
def _ search _ executable ( self, root _ mount _ point, pathname ) : if pathname. startswith ( " / " ) : path = [ " " ] else : path = [ " / bin / ", " / usr / bin / ", " / sbin / ", " / usr / local / bin / " ] for p in path : absolute _ path = " {! s } {! s } {! s } ". format ( root _ mount _ point, p, pathname ) if os...
[ 0.7019261121749878, -1.1213856935501099, 0.8985893130302429, 1.117762804031372, -0.046691205352544785, -0.12338998168706894, -0.12815982103347778, -0.9395114183425903, -0.4356350004673004, -0.02031715027987957, 0.8129525184631348, 0.05600360035896301, -0.9214591979980469, 0.289263397455215...
def test _ quadruple _ args _ in _ call ( x ) : def g ( a, b, c, d ) : return a * b * c * d return g ( x, x, x, x )
[ -0.38917437195777893, 0.8449707627296448, 0.6507593393325806, -0.4794599711894989, -0.20640330016613007, 0.7390802502632141, 0.045955803245306015, -1.1671494245529175, 0.011446326971054077, 0.3396444320678711, -0.6334211826324463, -0.15834291279315948, -0.5028126835823059, -0.1950607746839...
def get _ auth _ session ( device, interface = none, mac _ address = none, method ='dot1x ', search _ value ='authc success ', timeout = 1, interval = 1 ) : if interface is not none : interface = interface elif interface is none and'interface'in device. custom and \ device. custom ['interface'] : interface = device. cu...
[ -0.0785028338432312, 0.24077773094177246, 0.6327184438705444, 0.23341773450374603, -1.1313154697418213, -0.3705490827560425, 0.6712484359741211, -0.9351029396057129, -0.10600460320711136, -0.10572466254234314, 0.8781937956809998, 0.7041366696357727, -0.6652149558067322, -0.4983132183551788...
def add _ meta ( self, stat, count ) : self. stats [ stat ] + = count self. stats [ " total " ] + = count self. stats [ " total _ meta " ] + = count
[ 0.2479504942893982, -0.04284777119755745, 0.7314863204956055, -0.20874938368797302, 0.6329310536384583, 0.2774132192134857, -0.47464340925216675, 0.03561018034815788, -0.07671426981687546, 0.04540155082941055, -0.31707605719566345, 0.7074829339981079, 1.5087460279464722, 0.2052552551031112...
def send _ signal ( self, sig ) : os. kill ( self. pid, sig )
[ -0.38224145770072937, -0.5353398323059082, 0.09531042724847794, 0.4529836177825928, 0.10159576684236526, 0.44762665033340454, -0.8380576372146606, -0.34475475549697876, -0.42995432019233704, 0.1645289957523346, -1.3249026536941528, -0.11071062833070755, 0.39896130561828613, 0.6409432888031...
def test _ gf _ write _ feature _ header _ empty _ background _ with _ short _ description ( disabled _ colors, capsys, mocker ) : # given feature = mocker. magicmock ( spec = feature ) feature. keyword = " feature " feature. short _ description = " my feature " feature. description = [ ] feature. tags = [ ] feature. b...
[ 0.7713238000869751, -0.3414151668548584, 0.4276096522808075, 0.5984816551208496, 0.8068862557411194, 0.47354474663734436, -0.2736344337463379, 0.010058045387268066, -0.43751469254493713, -0.3305993974208832, -0.5659664869308472, 0.5285914540290833, -0.4371199905872345, 0.37148189544677734,...
def get _ all _ possible _ transitions ( self ) : return utils. get _ all _ possible _ transitions ( self. grid _ size )
[ -0.5604475140571594, 0.3988594710826874, 0.5062475800514221, 1.6058627367019653, 0.011447759345173836, -0.1733447015285492, -1.2585543394088745, -0.016736943274736404, -0.2435297667980194, -0.11611557006835938, -0.7668365240097046, -0.0005222201580181718, 0.12523314356803894, 1.04850506782...
def european _ vanilla _ formula ( self, k, option, output ) : d1 = ( np. log ( self. s / k ) + ( self. r + self. sigma * * 2 / 2 ) * self. t ) / ( self. sigma * np. sqrt ( self. t ) ) d2 = d1 - self. sigma * np. sqrt ( self. t ) formula = {'call - value': norm. cdf ( d1 ) * self. s - norm. cdf ( d2 ) * k * np. exp ( -...
[ 0.18088655173778534, 0.10447920113801956, 0.7765612006187439, -0.4199189841747284, -0.8457170128822327, -0.10250061750411987, 0.07476923614740372, -0.5292631387710571, -0.8396177291870117, 0.5253804326057434, -0.08643677085638046, -0.1024087518453598, 0.30450472235679626, 0.427040189504623...
def get _ partitioning ( self ) : raise exception ( " unimplemented " )
[ -0.27591294050216675, 0.8706392049789429, 0.8265832662582397, 0.7831217050552368, -0.5718881487846375, -0.2047835886478424, 0.3472486138343811, 0.307635635137558, 0.08551947772502899, -0.6197238564491272, 0.034411489963531494, -0.5939787030220032, -0.14906373620033264, 0.06705192476511002,...
def make _ loss _ compute ( model, tgt _ vocab, dataset, opt ) : if opt. copy _ attn : compute = onmt. modules. copygeneratorlosscompute ( model. generator, tgt _ vocab, dataset, opt. copy _ attn _ force ) else : compute = onmt. loss. nmtlosscompute ( model. generator, tgt _ vocab ) if use _ gpu ( opt ) : compute. cuda...
[ -0.3319014310836792, -0.239670068025589, 0.318745493888855, -0.1799062192440033, -1.1367998123168945, -0.4117390513420105, -0.16725848615169525, -0.23565633594989777, 0.1984306126832962, 0.347959041595459, 0.604690670967102, 0.4192541241645813, 0.2020702213048935, -0.08424507826566696, 0...
def add _ place ( city _ id ) : # check that user input is correct user _ input = request. get _ json ( ) if user _ input is none : abort ( 400, {'message':'not a json'} ) elif user _ input. get ('name') is none : abort ( 400, {'message':'missing name'} ) elif user _ input. get ('user _ id') is none : abort ( 400, {'me...
[ 0.09112513810396194, -0.7226800918579102, 0.9418162703514099, 0.6081638932228088, -0.06978986412286758, 0.747366726398468, 0.036648090928792953, 0.10604380816221237, 0.9537952542304993, -0.19098791480064392, 0.3486281633377075, -0.11041683703660965, -0.9111464619636536, 0.46689340472221375...
def check _ content ( response, expected ) : content _ type = response. headers. get ( " content - type " ) if not content _ type : response. failure ( " no content - type in response " ) elif not content _ type. startswith ( expected ) : message = " expected content - type { 0! r } but got { 1! r } ". format ( expecte...
[ 0.36195382475852966, -0.8597956895828247, 0.5047974586486816, 0.4019412100315094, 0.0789482444524765, -0.2453390210866928, -0.45636677742004395, -0.43390315771102905, 0.29838627576828003, 0.18719534575939178, -0.05470705032348633, 0.3039911091327667, -0.2611245810985565, -0.380392849445343...
def compute _ uncertainty _ batch ( model, input _ images, input _ states, actions, targets = none, car _ sizes = none, npred = 200, n _ models = 10, z = none, dirname = none, detach = true, compute _ total _ loss = false ) : bsize = input _ images. size ( 0 ) if z is none : z = model. sample _ z ( bsize * npred, metho...
[ -0.4515666365623474, -0.5705006122589111, 0.6651723980903625, 0.17502222955226898, -0.04364744946360588, -0.1324041485786438, 0.7475444674491882, 1.072808027267456, -0.13512545824050903, 0.24523818492889404, -0.5569554567337036, -0.13437718152999878, 0.16733799874782562, 0.4375990331172943...
def save _ model ( self ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # prep the parquet which is used for the multilabelbinarizer df = pd. dataframe ( self. mlb. classes _, columns = [ self. multilabelbinarizer _ label _ column ] )...
[ -1.107452630996704, -0.5906583666801453, 0.936684787273407, -0.3834167718887329, 0.5848992466926575, 0.35676711797714233, 0.20385117828845978, 0.15968048572540283, -0.8778942227363586, 0.2842288613319397, -1.5424818992614746, -0.2951504588127136, 0.1288328319787979, 0.8089974522590637, 0...
def loadpropertylist ( datafile ) : propnamelist = [ ] f = open ( datafile, " r " ) lnb = 0 for line in f. readlines ( ) : if lnb = = 2 : # read props props = line. split ( ) for prop in props : propnamelist. append ( prop. split ( " ( " ) [ 0 ] ) break lnb + = 1 return propnamelist
[ -0.5315577387809753, -0.7484292984008789, 0.5312393307685852, -0.2390146106481552, -0.3840291500091553, 0.33259719610214233, -0.7432673573493958, 1.021024227142334, -0.040400054305791855, 0.4529985785484314, -0.427018404006958, -0.11399871110916138, -0.4033289849758148, -0.2038408368825912...
def publish ( publish _ configuration, graph ) : dot _ name = publish _ configuration [ " output _ dot _ file " ]. as _ filename ( ) logging. debug ( " graph will be written as dot file : % s ", dot _ name ) graphic _ file _ name = publish _ configuration [ " output _ graphviz _ file " ]. as _ filename ( ) graphic _ pr...
[ 0.14047694206237793, -0.5445846319198608, 0.7167704701423645, 0.2869489789009094, -0.22388549149036407, 0.12213629484176636, 0.523308277130127, 0.013242705725133419, 0.2487793266773224, -0.35507145524024963, 0.06771232932806015, 0.7749797105789185, 0.18875199556350708, -0.11500535160303116...
def setupclass ( cls ) : cls. rect _ funcs = inspect. getmembers ( rectangle, inspect. isfunction )
[ -0.06339409202337265, -0.20741897821426392, 0.35920408368110657, 0.022146709263324738, 1.1443347930908203, -1.3147910833358765, 0.526751697063446, -0.7079896926879883, 0.6172419190406799, -0.6795679330825806, -0.5884988903999329, 0.24120435118675232, 0.23721782863140106, 0.7120398283004761...
def _ _ del _ _ ( self ) : query = " insert into fetchlog ( recordsadded ) \ values ( % s ) ; " self. cursor. execute ( query, ( self. count, ) ) done _ queue = " update queue set finished = now ( ) where id = % s ; " self. cursor. execute ( done _ queue, ( self. queue _ id, ) ) if false : # if we didn't finish # if we...
[ 0.5649386644363403, -0.31309381127357483, 0.8563247323036194, -0.9923495650291443, -0.13715800642967224, -0.4129280149936676, -0.7441088557243347, 0.02850823476910591, -0.2930656373500824, 0.3748181164264679, -0.5114783048629761, 0.000374543946236372, -0.1341424286365509, 0.921656191349029...
def simplex _ grid ( m, n ) : l = num _ compositions _ jit ( m, n ) if l = = 0 : # overflow occured raise valueerror ( _ msg _ max _ size _ exceeded ) out = np. empty ( ( l, m ), dtype = np. int _ ) x = np. zeros ( m, dtype = np. int _ ) x [ m - 1 ] = n for j in range ( m ) : out [ 0, j ] = x [ j ] h = m for i in range...
[ -0.19696468114852905, 0.7972366213798523, 0.688045859336853, 0.3159497380256653, -0.37811312079429626, -0.49552640318870544, 0.19906708598136902, 0.2203931212425232, 0.31493431329727173, -0.2186918556690216, 0.0227469801902771, -0.13558247685432434, -0.25447461009025574, 0.3829082548618316...
def num _ divisors ( n ) : sqrt = math. floor ( math. sqrt ( n ) ) num = 0 for x in range ( 1, math. floor ( sqrt ) ) : if n % x = = 0 : num + = 1 if n % sqrt = = 0 : return 2 * num + 1 return 2 * num
[ -0.7823813557624817, 0.7390557527542114, 0.5190519094467163, -0.2513364255428314, -0.21431002020835876, -0.7999125719070435, 0.04354147985577583, 0.1155891865491867, 0.694372832775116, -0.9851962327957153, -1.1207406520843506, 0.1295650452375412, -0.11619073152542114, 0.8894370198249817, ...
def on _ identify ( self, data ) : try : safe _ data = t. dict ( { t. key ( u " token " ) > > " token " : t. string, } ). check ( data ) except t. dataerror : self. emit ( " signupfailed ", { " reason " : " invalidrequest " } ) logging. exception ( " received invalid data : { } ". format ( data ) ) return try : user _ ...
[ -0.5591402053833008, -0.09676574915647507, 0.5420771837234497, 0.8823570013046265, 0.34860238432884216, -0.11256283521652222, -0.5966617465019226, -0.16797010600566864, 0.6142893433570862, 0.4654146134853363, -1.4473164081573486, -0.014610358513891697, -0.17384476959705353, -0.588087081909...
def test _ read ( subtests, etcd _ client, prefix ) : etcd _ client. set ( " { } / read / 1 ". format ( prefix ), " one " ) etcd _ client. set ( " { } / read / 2 ". format ( prefix ), " two " ) etcd _ client. set ( " { } / read / 3 / 4 ". format ( prefix ), " three / four " ) # simple read test with subtests. test ( " ...
[ 0.08980631828308105, 0.07264579832553864, 0.6991165280342102, -0.34382373094558716, -0.26239684224128723, 0.274451345205307, 0.02083362080156803, 0.4356563687324524, -0.2196807861328125, -0.3772915005683899, 0.5840033292770386, -0.08419130742549896, -0.4426685869693756, -0.9137588739395142...
def runquery ( self, query, args = none, conn = none, callback = none ) : self. _ threadpool. add _ task ( partial ( self. _ query, query, args, conn ), callback )
[ -0.37442144751548767, 0.0011966405436396599, 0.39806827902793884, 0.3470710217952728, 0.1543523222208023, 0.09546532481908798, -0.21732279658317566, 0.32304495573043823, -0.027751578018069267, -0.317151814699173, -0.20337200164794922, -0.19950799643993378, -0.890661895275116, 0.02730816975...
def get _ tenant _ users ( self, tenant ) : # tenant must have 4 users : project _ admin, publisher, consumer, archiver ( consumer ) lookup = [ ( " project _ admin ", " ams _ { } _ admin " ), ( " publisher ", " ams _ { } _ publisher " ), ( " consumer ", " ams _ { } _ consumer " ), ( " archiver ", " ams _ { } _ archiver...
[ -0.05581962689757347, 0.02286646142601967, 0.44481873512268066, -0.5888912081718445, -0.2395593225955963, -0.47037273645401, -0.9360327124595642, -0.4584755301475525, 0.06107179448008537, 0.7083618640899658, -0.46669232845306396, 0.27648475766181946, 0.5375707149505615, 0.27675801515579224...
def partition _ exists ( self, partitioning, partition _ id ) : raise exception ( " unimplemented " )
[ 0.01902906969189644, -0.6690441966056824, 0.5742250084877014, 0.24983170628547668, 0.45500755310058594, -0.06790247559547424, -1.186035394668579, 1.1467286348342896, -0.14928258955478668, -0.07171161472797394, 0.44479382038116455, -0.06472387909889221, 0.1914086639881134, -0.26442423462867...
def add ( self, other ) : return other. apply ( self )
[ -0.2111395299434662, -0.6827774047851562, 0.6881718039512634, 0.22503824532032013, -0.3001718819141388, 0.5217416882514954, -1.185221552848816, -1.0733258724212646, 1.0460140705108643, -1.2378631830215454, -0.1628093272447586, 0.3274545669555664, -0.5843603610992432, -0.07124631851911545, ...
def _ _ init _ _ ( self, command, input _ pipe = none ) : self. _ command = command self. _ input _ pipe = input _ pipe self. _ original _ input = true if input _ pipe is not none : try : input _ pipe. fileno ( ) except attributeerror : # subprocess require a fileno to work, if not present we copy to disk first self. _...
[ 0.9669869542121887, -1.0104230642318726, 0.8636484742164612, -0.25039052963256836, -0.3020459711551666, 0.3983805477619171, 0.6043376326560974, 0.22437003254890442, 0.06100792437791824, -0.8030380606651306, -0.3157382011413574, 0.2112138718366623, -0.08004867285490036, 0.08791270852088928,...
def exists _ in ( cls, tabs ) : return cls. get _ from _ tabs ( tabs ) is not none
[ -0.1673901230096817, -0.6400900483131409, 0.33989083766937256, 0.4743785858154297, 0.7138308882713318, 1.2607665061950684, -1.0284255743026733, -0.13572373986244202, -1.0324527025222778, -0.16271182894706726, 0.07476301491260529, -0.4688950777053833, 0.15365248918533325, -0.282693177461624...
def prod ( s ) : product = 1 for i in s : product = product * i return product
[ -0.6670868396759033, 0.015624713152647018, 0.4422585368156433, 0.6175391674041748, -0.1942288875579834, -0.012988930568099022, 0.9911689758300781, -0.37841370701789856, 0.46586209535598755, -0.4794599413871765, -0.39910992980003357, -0.2645803689956665, -0.4429718852043152, -0.490880042314...
def testupdatevaluesforquerieswithinvalidquery ( self ) : queryitems = [ ( u'username / unknown 42 ', [ tagpathandvalue ( u'username / unknown ', 2600 ) ] ) ] valuesqueryschema = valuesqueryschema ( queryitems ) with login ( u'username ', uuid4 ( ), self. transact ) as session : deferred = self. facade. updatevaluesfor...
[ -0.1413344442844391, 0.08417708426713943, 0.4229840934276581, -0.12452518194913864, -0.2673884630203247, 0.7174798250198364, -0.8375986814498901, 0.010485031642019749, -0.0824054554104805, -0.6636995077133179, -0.07321120798587799, -0.7289309501647949, 0.24140632152557373, 0.75337457656860...
def display _ message ( message, information = none, width = none ) : message _ box = qtwidgets. qmessagebox ( ) message _ box. settext ( message ) if information : message _ box. setinformativetext ( information ) if width : message _ box. setstylesheet ( f " qlabel { { min - width : { width } px ; } } " ) else : mess...
[ 0.2504654824733734, 0.051499880850315094, 0.4239468574523926, -0.7615193128585815, -0.5340526103973389, 0.2099604457616806, -0.5612127184867859, -0.652680516242981, 0.3135792016983032, -0.7626610398292542, 1.2956362962722778, 0.0611688531935215, -0.41649484634399414, 0.5302971005439758, ...
def log _ values ( self, key _ values : dict [ str, any ] ) : stored _ row = ordereddict ( ) for key in self. _ keys : stored _ row [ key ] = key _ values. get ( key ) stored _ row ['timestamp'] = datetime. datetime. now ( ). strftime ( " % y - % m - % d % h : % m : % s " ) self. _ store _ log ( stored _ row )
[ -0.7020125389099121, 0.29360318183898926, 0.6227906346321106, -0.1626342535018921, -0.24882952868938446, 0.07510799914598465, -1.4799840450286865, 0.044452209025621414, -0.763070821762085, -0.1906673014163971, -0.7070034146308899, -0.11944054067134857, 0.7594977617263794, 0.872006714344024...
def sigma0 ( u _ ) : id = identity ( len ( u _ ) ) return 2. 0 * mu * eps ( u _ ) + lmbda * tr ( eps ( u _ ) ) * id
[ 0.14426934719085693, 0.02958165854215622, 0.3674028217792511, -0.011391570791602135, -0.2847512662410736, 0.2589872181415558, 0.2409089356660843, 0.5259456634521484, 0.5720672607421875, -0.3764214515686035, -0.6372339725494385, 0.8518199324607849, 0.16120894253253937, 0.06937651336193085, ...
def call _ service ( service _ string, params = [ ] ) : string _ start = service _ string. split ( '.') [ 0 ] service _ id = int ( string _ start. split ('_') [ 1 ] ) method = '. '. join ( service _ string. split ( '.') [ 1 : ] ) # find component that have required service id print ('service id : { }, method : { } '. f...
[ -0.38135161995887756, -1.0155446529388428, 0.9599315524101257, -0.44268491864204407, -0.44148221611976624, -0.290219783782959, -0.41041964292526245, -0.9495247602462769, 0.1186382919549942, 0.11913268268108368, 0.7007837891578674, 0.12646235525608063, -0.9569419622421265, 0.923774838447570...
def computetrilinearformbylist ( self, gs, gpsk, basisk, alphak, gpsi, basisi, gpsj, basisj ) : a = np. ndarray ( ( len ( gpsi ), len ( gpsj ) ) ) err = 0. # run over all rows for i, gpi in enumerate ( gpsi ) : # run over all columns for j, gpj in enumerate ( gpsj ) : # run over all gpks b, erri = self. computetrilinea...
[ -0.1817517727613449, -0.03719016909599304, 0.49361342191696167, -0.32043665647506714, 0.2345263659954071, -0.6019420623779297, 0.5830606818199158, 1.0251137018203735, 0.17081215977668762, 0.8251709938049316, -0.19804002344608307, -0.6360719799995422, -0.5797019004821777, 0.6537138819694519...
def output _ list _ box ( self ) : return self. _ _ output _ list _ box. widget
[ -0.6503063440322876, -0.4578074514865875, 0.5050176382064819, -0.6714382171630859, -0.535478413105011, -0.3571334481239319, 0.14987637102603912, -0.13036146759986877, 0.47012919187545776, -0.7970702052116394, -0.14848428964614868, 0.6911298632621765, -0.29830947518348694, 0.113159306347370...
def _ update _ items _ view ( self, data ) : # todo : make this a call into self. view # rather than into view. items _ panel self. view. items _ panel. clear _ and _ add _ items ( data )
[ -1.1316475868225098, -0.3959007263183594, 0.25165683031082153, -1.259360671043396, -0.08305823057889938, -0.05321980267763138, -0.8617908954620361, -0.419927179813385, 0.3213140368461609, 0.06706036627292633, -0.30687251687049866, 0.07484881579875946, 0.21426145732402802, -0.41628777980804...
def test _ index _ project _ exists _ with _ milestones ( self ) : create _ project _ and _ milestones ( " title ", 1 ) response = self. client. get ( reverse ('projects : index') ) self. assertcontains ( response, " title " ) self. assertquerysetequal ( response. context ['latest _ project _ list'], ['< project : titl...
[ -0.21785040199756622, 0.885316789150238, 0.23574140667915344, 0.030991269275546074, 1.1937521696090698, 1.310311198234558, -0.07414034754037857, 0.0884375348687172, 0.8417108058929443, 0.14579705893993378, 0.1825481802225113, -0.6577836871147156, -0.537473738193512, -0.22415398061275482, ...
def test _ http _ root ( ) : response = app. test _ client ( ). get ( " / " ) rdata = response. data. decode ( " utf - 8 " ) assert response. status _ code = = 200 assert " it's alive! " in rdata
[ 0.7257705330848694, -0.3650098145008087, 0.5149128437042236, 0.6089051365852356, 0.755842387676239, 1.3258066177368164, -1.0545835494995117, -0.23859253525733948, -0.2694548964500427, -0.28954315185546875, -0.39674249291419983, 0.9734851717948914, -0.27951738238334656, -0.1782846748828888,...
def sleep _ time _ on _ read _ none _ s ( self ) - > optional [ union [ int, float ] ] : return none
[ 0.5181794762611389, -0.2460433393716812, 0.38230207562446594, 0.4678146541118622, -0.40937063097953796, 0.09963740408420563, -0.18990358710289001, -1.4048771858215332, 0.22090481221675873, -0.5187764763832092, 0.2676379084587097, 0.18125201761722565, -0.4320041537284851, -0.458826690912246...
def test _ intraday _ infer _ timezone _ from _ securities ( self ) : def mock _ get _ history _ db _ config ( db ) : return { " bar _ size " : " 30 mins ", " universes " : [ " usa - stk " ], " vendor " : " ibkr " } def mock _ download _ history _ file ( code, f, * args, * * kwargs ) : prices = pd. dataframe ( dict ( s...
[ -0.21810351312160492, -0.0041609047912061214, 1.0393270254135132, 0.3245217800140381, 0.8864415287971497, 0.08012370765209198, 1.0595011711120605, -0.11617608368396759, -0.013444732874631882, -0.08956844359636307, -0.4872915744781494, -0.1665208637714386, -0.2630763649940491, 0.45354235172...
def get _ today ( ) - > datetime : return timezone. now ( )
[ 0.17145290970802307, -0.0921383947134018, 0.30328840017318726, 1.131884217262268, 0.4191794991493225, -0.19275611639022827, -0.2556692063808441, -0.4208683967590332, -1.1881070137023926, -0.6000980734825134, -0.40896838903427124, -0.3501163423061371, -0.03697175532579422, -0.54919141530990...
def settimestampformat ( self, timestamp _ format ) : self. _ timestamp _ format = timestamp _ format
[ 0.4126816391944885, -0.40489357709884644, 0.2081741839647293, -0.13324491679668427, 0.3998126983642578, -0.08345535397529602, -0.4285428524017334, 0.43271297216415405, 0.7328896522521973, 0.1360737830400467, -0.39877083897590637, -0.16578124463558197, 0.43713927268981934, 0.410649448633193...