text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ atomic _ boolean _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ boolean _ pattern _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - pattern - 4. xsd ", instance = " nistdata / atomic / bo...
[ -0.3057941198348999, 0.15716303884983063, 0.6013491153717041, 0.6508539915084839, -0.07415087521076202, 0.5775777101516724, -0.1809319704771042, -0.023821773007512093, 0.0684831365942955, 0.8469640016555786, -0.23878535628318787, -0.455257773399353, -0.3235175609588623, -0.7128481268882751...
def damerau _ levenshtein _ distance ( string1, string2 ) : # get smallest string to minimize rows string1, string2 = ( string1, string2 ) if len ( string1 ) < = len ( string2 ) else ( string2, string1 ) n = len ( string1 ) m = len ( string2 ) if m = = 0 : return n # if string2 is null then need to insert string1 to ma...
[ -0.09141234308481216, -0.41609376668930054, 0.9728152751922607, -0.6862467527389526, -1.0280418395996094, -0.7461470365524292, 0.32728666067123413, 0.3857567310333252, 0.15107578039169312, 0.4535399377346039, 0.21777097880840302, 0.7377321720123291, -0.7371596097946167, -0.2711103856563568...
def root _ info ( self, info ) : self. _ root _ info = info self. ui. root _ description. settext ( info. get ( " description " ) )
[ 0.8744398355484009, -0.20544368028640747, 0.38439691066741943, 0.16626140475273132, -0.13067755103111267, 0.4999053478240967, -0.09853658080101013, -0.007518094033002853, -0.3471437394618988, -0.009030589833855629, -0.48621389269828796, 1.225913643836975, 0.4611036479473114, 1.515311241149...
def ingestorbits ( tracksfile, orbitsfiles, dias ) : curtrack = 0 curorbit, orbitsfiles = getnextorbit ( orbitsfiles ) curorbittrack = int ( curorbit. split ( ) [ 0 ] ) trackline = tracksfile. readline ( ) while trackline! = " " : trackdias = map ( int, trackline. split ( ) ) if curorbittrack = = curtrack : # we got th...
[ -0.1541588008403778, -0.05264586582779884, 0.6024584174156189, -0.3882322311401367, 0.4359126091003418, -0.0011790848802775145, 0.579906165599823, -0.4277259111404419, -0.7088084816932678, -0.25687935948371887, 0.6576755046844482, -0.2829088866710663, -0.11523674428462982, 0.26700401306152...
def _ _ call _ _ ( self, environ, start _ response ) : resp = response ( ) req = request ( environ ) try : # if there's too many threads already, just toss a # serviceunavailable to let the user know they should re - connect # later if self. maxthreads and self. threadpool : if len ( self. threadpool. working ) > self....
[ -0.45316067337989807, -0.00954496581107378, 0.7662143707275391, 0.8227944374084473, 0.5309290885925293, -0.2842092216014862, -0.11952044814825058, -0.7744387984275818, 0.9490830302238464, 0.01845531351864338, 0.27263548970222473, -0.24672310054302216, -0.12227748334407806, -0.1463233381509...
def log10 ( x ) : try : if x. val < = 0 : raise valueerror ('math domain error') return variable ( x. name, np. log10 ( x. val ), { k : v * np. log10 ( np. exp ( 1 ) ) / x. val for ( k, v ) in x. der. items ( ) }, false ) except attributeerror : if x < = 0 : raise valueerror ('math domain error') return np. log10 ( x )
[ 0.46549272537231445, 0.07553493976593018, 0.5121012926101685, -0.6056993007659912, -0.4926290214061737, -0.03877919912338257, -0.7655093669891357, 0.0027440092526376247, 0.4706338047981262, -0.22509005665779114, 0.12225188314914703, 0.6425924301147461, 0.6060663461685181, -0.31433597207069...
def strobe _ two _ state _ infinite _ plane ( model _ 0, n _ tracks, model _ 1 = none, f0 = 0. 0, track _ len = 10, dz = 0. 7, dt = 0. 01, loc _ error = 0. 0, exclude _ outside = true, n _ gaps = 0, return _ dataframe = true, model _ 0 _ kwargs = { }, model _ 1 _ kwargs = { } ) : # if * model _ 1 * is not given, defaul...
[ 0.2054581493139267, 0.8462157845497131, 0.931926965713501, 0.4710511863231659, 0.3761464059352875, 0.5288597345352173, -0.2616734206676483, -0.46709930896759033, -0.4252663254737854, 0.3115125596523285, -0.5306349396705627, -0.012208143249154091, -0.020626185461878777, 0.2639313042163849, ...
def media _ next _ track ( self ) - > none : self. _ spotify. next _ track ( )
[ -0.12531979382038116, -0.10174643993377686, 0.21422870457172394, 0.5044264197349548, 0.13391730189323425, 1.0162228345870972, 0.07668059319257736, -0.6137471795082092, -0.9918835759162903, -1.0582764148712158, 0.4260910451412201, 0.9305040240287781, -0.2530038356781006, 0.26177260279655457...
def get _ items ( self, html ) : captcha _ patterns = [ " https : / / www. google. com / recaptcha / api. js ", " i'm not a robot " ] for captcha _ pattern in captcha _ patterns : if captcha _ pattern in html : raise exc. captchaerror ( " found % r in html! " % captcha _ pattern ) data = list ( ) soup = self. to _ soup...
[ -1.2802069187164307, -0.3639248013496399, 0.7248884439468384, -0.14607344567775726, -0.1702701449394226, -0.18109610676765442, -0.36667078733444214, 0.5981393456459045, -0.11881677061319351, 0.14712199568748474, -1.206566333770752, -0.6630659699440002, 0.2747962176799774, 0.517502903938293...
def custom _ method ( * args, * * kwargs ) : return objective _ return
[ -0.09752972424030304, -0.5548361539840698, 0.5135513544082642, -0.003909355495125055, -0.13649943470954895, -0.4948365092277527, 0.3234899938106537, -0.09309911727905273, -0.6499585509300232, 0.4130832552909851, 0.9397100210189819, 0.27631160616874695, -0.2557162046432495, -0.4117111563682...
def name ( self ) - > str : return pulumi. get ( self, " name " )
[ 0.43013668060302734, -0.07677990943193436, 0.5298380851745605, 0.0733434334397316, 0.2685459554195404, 0.9129801392555237, -0.3662375509738922, -0.18939101696014404, 0.07825518399477005, 0.993715226650238, 0.18270084261894226, 0.5780794024467468, 0.719538152217865, -0.8229866623878479, -...
def test _ get _ command _ for _ testrunner _ 2 ( self ) : executor = self. real _ executor command = executor. _ get _ command _ for _ testrunner ( ) self. _ assertcommandcontains ( command, " testrunner - lite " ) self. _ assertcommandcontains ( command, " root @ 192. 168. 2. 15 " ) self. _ assertcommanddoesnotcontai...
[ 0.0594063475728035, -0.2992455065250397, 0.5196294188499451, 0.7039325833320618, 0.9287041425704956, -0.2336924970149994, 0.624648928642273, -0.2999521493911743, -0.13174226880073547, -0.9146702289581299, 0.03773101419210434, 0.5609339475631714, 0.2365698367357254, 1.0802081823349, -0.20...
def curve ( self, x0s ) : a _ params, b _ params = zip ( * map ( self. _ local _ params, x0s ) ) return np. exp ( a _ params * np. log ( x0s ) + b _ params )
[ 0.5234825611114502, -0.7234126925468445, 0.18890060484409332, -0.4754742383956909, 0.40229442715644836, -0.4875339865684509, -0.7664124965667725, 0.3676353394985199, 0.08103904873132706, 0.7009897828102112, -0.029879692941904068, 1.2642695903778076, 0.33990174531936646, 0.17257319390773773...
def from _ protobuf ( message : numbersmessage ) : theta = none if message. compact _ theta is not none and len ( message. compact _ theta ) > 0 : theta = thetasketch. deserialize ( message. compact _ theta ) elif message. theta is not none and len ( message. theta ) > 0 : logger. warning ( " possible missing data. non...
[ -0.028803283348679543, 0.6505177021026611, 0.3947544991970062, -0.1220092698931694, -0.6692443490028381, 0.30837544798851013, 0.5672066807746887, -0.12301778048276901, -0.34621429443359375, -0.847966730594635, -0.70706707239151, -0.3944898545742035, -0.47061026096343994, 1.2303285598754883...
def intersects ( self, circle2 ) : if self. center. distance _ from ( circle2. center ) < ( self. radius + circle2. radius ) : return true else : return false
[ -0.05054252967238426, -0.4725741744041443, 0.8209288120269775, -0.15702255070209503, -0.5480895638465881, 0.34702393412590027, -0.5005217790603638, -0.45049163699150085, -0.9500818252563477, 0.49187347292900085, -0.2714461386203766, 0.10263364017009735, -1.2476820945739746, -0.116687633097...
def validate _ sub _ entity _ allocation ( amount, sub _ entity, parent _ allocation, amount _ type = " percentage " ) : sub _ beneficiaries = allocation. objects. filter ( parent _ allocation = parent _ allocation ) # block for allocation percentage ( < = 100 ) if parent _ allocation : if ( parent _ allocation. alloca...
[ 0.9796915650367737, -0.48800912499427795, 1.2521687746047974, -0.16631872951984406, -0.6669723391532898, 1.1281113624572754, 0.48695459961891174, -0.6904304623603821, -0.05387958139181137, 0.13714972138404846, 0.6462789177894592, 0.18820014595985413, 0.6340889930725098, 0.12447864562273026...
def reduce _ puzzle ( values ) : stalled = false while not stalled : # check how many boxes have a determined value solved _ values _ before = len ( [ box for box in values. keys ( ) if len ( values [ box ] ) = = 1 ] ) # use the eliminate strategy values = eliminate ( values ) # use the only choice strategy values = on...
[ -0.9866463541984558, 0.6225882768630981, 0.6510525345802307, 0.41272664070129395, 0.1950385570526123, -0.1729290634393692, 0.2120288908481598, 0.09714648127555847, 0.5776416063308716, 0.09374721348285675, -0.603129506111145, -0.9318583607673645, -0.24031293392181396, 0.8378186821937561, ...
def test _ model _ hypothesis _ result _ repr ( self ) : import re _ data = { " human " : " atgcggctcgcggaggccgcgctcgcggag ", " mouse " : " atgcccggcgccaaggcagcgctggcggag ", " opossum " : " atgccagtgaaagtggcggcggtggctgag ", } aln = make _ aligned _ seqs ( data = _ data, moltype = " dna " ) model1 = evo _ app. model ( "...
[ 0.01784614287316799, -0.06666149199008942, 0.765658974647522, -0.04523972049355507, 0.2214430272579193, 0.48405390977859497, 0.03670979291200638, -0.071565181016922, -0.3627793788909912, 0.4009492099285126, -0.6200889348983765, 0.5853540897369385, 0.1402502954006195, -0.3564188480377197, ...
def validate _ phone _ number ( phone, err _ obj, err _ key ) : phone = re. sub ( re. compile ('\ s +'),'', phone ) if not phone : err _ obj [ err _ key ] ='phone number required'return if len ( phone ) > 11 : err _ obj [ err _ key ] ='max 11 digits long.'return if len ( phone ) < 10 : err _ obj [ err _ key ] ='min 10 ...
[ -0.44883689284324646, -0.14328841865062714, 0.8821702003479004, -0.2127629816532135, -0.09724514186382294, 0.6494233012199402, -0.715844452381134, 1.0229814052581787, 0.43267345428466797, -0.2416698932647705, -0.8225637674331665, -0.6389565467834473, 0.6872400641441345, 0.7126151919364929,...
def vale ( session, dilibraries = dilibraries ) : session. log ( f'run vale for { lib _ name }') standard _ di _ vale ( session, dilibraries = dilibraries )
[ -0.238925039768219, 0.1041075736284256, 0.28000086545944214, 0.3476381003856659, 0.10174552351236343, -0.1808384656906128, -0.1996673196554184, -0.0860583633184433, 0.8862394690513611, -0.15639787912368774, 0.3592514991760254, -0.17379772663116455, 0.717087984085083, -0.24123278260231018, ...
def mutagenesis ( x, model, class _ index : int = none, batch _ size = 512 ) : def generate _ mutagenesis ( x ) : _, l, a = x. shape x _ mut = [ ] for ll in range ( l ) : for a in range ( a ) : x _ new = np. copy ( x ) x _ new [ 0, ll, : ] = 0 x _ new [ 0, ll, a ] = 1 x _ mut. append ( x _ new ) return np. concatenate ...
[ -0.8842803835868835, -0.21216116845607758, 0.9514277577400208, 0.183181032538414, -0.47028425335884094, -0.2562028169631958, -0.24165688455104828, -0.03842945769429207, 0.5987544655799866, 0.8042585253715515, -0.9697880744934082, 0.7894366979598999, 0.43622979521751404, -0.2768185138702392...
def excursions ( m ) : les _ e = [ ] e = [ 0 ] for i in range ( 1, len ( m ) ) : s = m [ i ] e. append ( s ) if s = = 0 : les _ e. append ( e ) e = [ 0 ] return les _ e
[ -0.4945802092552185, 0.3413951098918915, 0.6702138185501099, 0.6232568025588989, 0.648217499256134, -0.08269292861223221, 0.22800488770008087, 1.5073050260543823, -0.07532352209091187, 1.1832332611083984, -0.21263344585895538, -0.8592245578765869, -0.24716421961784363, 0.7376040816307068, ...
def extract _ snvs _ from _ bam ( bam _ loc, r2m, positions, scaffold, * * kwargs ) : logging. debug ( f " extracting { len ( positions ) } snvs from { scaffold } { bam _ loc } " ) if len ( positions ) = = 0 : return { } # initilize. bam bam _ init = pysam. alignmentfile ( bam _ loc ) # initiize iterator biter = bam _ ...
[ -0.1691858172416687, -0.07997096329927444, 0.5449928045272827, 0.6283472776412964, -0.18298934400081635, -0.5482165217399597, 0.08154261112213135, 0.04696696624159813, -0.5540608167648315, 0.02073121815919876, -1.0069249868392944, -0.5521243214607239, 0.29314807057380676, -0.33009535074234...
def _ interval _ to _ milliseconds ( self, interval, limit ) : seconds _ per _ unit = { " m " : 60, " h " : 60 * 60, " d " : 24 * 60 * 60, " w " : 7 * 24 * 60 * 60, } interval _ time = int ( interval [ : - 1 ] ) * seconds _ per _ unit [ interval [ - 1 ] ] * 1000 now = self. get _ current _ ms _ time _ utc ( ) return no...
[ -0.9369812607765198, -0.6013412475585938, 0.6925848126411438, -0.3190922439098358, -0.048659421503543854, -0.38114166259765625, -0.5969855189323425, 0.8538722395896912, 0.2176065295934677, 0.3854439854621887, 0.24984444677829742, 0.4482515752315521, -0.6947077512741089, -0.2043798267841339...
def list _ workflows ( ) : workflows = persistence. get _ all _ workflows ( ) return make _ response ( json. dumps ( [ workflow _ to _ dict ( workflow ) for workflow in workflows. values ( ) ] ), 200, {'content - type':'application / json'} )
[ -0.9184216260910034, -1.0379184484481812, 0.4871843755245209, 0.046815164387226105, 0.2811969220638275, -1.016119360923767, -0.2488386482000351, -0.5696126222610474, 0.854873538017273, -0.2812865674495697, -0.8274461627006531, 0.18038032948970795, -0.06460149586200714, 0.3089134395122528, ...
async def send _ hand _ edit ( self, player, player _ num ) : def react _ check ( msg ) : def check ( reaction, reacting _ user ) : return str ( reaction. emoji ) in self. emojis and reaction. message. id = = msg. id return check embed _ hand = discord. embed ( title = f " { self. users [ player _ num ]. name } \ t \ t...
[ -0.3809959292411804, 0.24607421457767487, 0.9080525636672974, 0.0397849902510643, 0.6562825441360474, 0.08432363718748093, 0.4927869439125061, -0.2433278113603592, 0.23252750933170319, 0.48841845989227295, 0.2318207025527954, 0.5955914855003357, -1.0986268520355225, 0.019072797149419785, ...
def test _ inbound _ msg _ count ( self ) : _, all _ keys = ( yield self. msg _ seq _ helper. create _ inbound _ message _ sequence ( msg _ count = 3 ) ) self. assertequal ( len ( all _ keys ), 3 ) self. assertequal ( len ( self. backend. inbound ), 3 )
[ 0.18969601392745972, 0.2871941030025482, 0.599852442741394, -0.2811816930770874, 0.9322542548179626, 0.6475175023078918, -1.049220323562622, -0.2980993688106537, -0.8585476875305176, 0.09543794393539429, -1.272040605545044, -0.3045409917831421, -1.0097391605377197, 0.5339565873146057, 0....
def getversions ( self, request, context ) : context. set _ code ( grpc. statuscode. unimplemented ) context. set _ details ('method not implemented!') raise notimplementederror ('method not implemented!')
[ -1.2920401096343994, 0.4732150435447693, 0.634541928768158, 0.9442768692970276, 0.626099169254303, 0.6359218955039978, 0.33915975689888, -0.8516138195991516, 0.08772984147071838, 0.6624870300292969, -0.5751203298568726, 1.230774998664856, -1.0106128454208374, 0.4307313561439514, -0.32246...
def convertnetoutput ( ratingoutput, categoryoutput ) : encoded _ tensor = torch. argmax ( categoryoutput, dim = - 1 ) ratingoutput = [ ] categoryoutput = [ ] for k in encoded _ tensor : if k < = 4 : ratingoutput. append ( 0 ) categoryoutput. append ( k ) else : ratingoutput. append ( 1 ) categoryoutput. append ( k - 5...
[ -0.6788110136985779, -0.23774035274982452, 0.4690462350845337, 0.26808154582977295, 0.133456751704216, -0.19234202802181244, -0.2908785045146942, -0.2873757481575012, -0.6966028213500977, 0.5072822570800781, -0.43275028467178345, -0.7881741523742676, 0.4379342794418335, -0.2681141197681427...
def set _ rotation ( self, rot ) : # todo : complete parameter documentation self. rotation = _ convert2tquat ( rot )
[ -0.8143843412399292, 0.3333563804626465, 0.022140495479106903, -0.6912248134613037, 0.4718013107776642, -0.5294773578643799, 0.8270537257194519, -1.0866237878799438, 0.12049983441829681, -0.27389034628868103, -0.7382678389549255, -0.2512209117412567, -0.43056827783584595, -0.52557951211929...
def entries ( self ) : return list ( )
[ 0.11187954992055893, -0.30459484457969666, 0.32787570357322693, 0.20304612815380096, 1.02585768699646, 0.6667340993881226, -0.5060723423957825, 0.9148702621459961, 0.7378374338150024, -0.9543951153755188, -0.9142608642578125, 0.3894222378730774, 0.03220835328102112, 0.9708751440048218, -...
def expiry _ date ( self, expiry _ date ) : self. _ expiry _ date = expiry _ date
[ 0.8282188773155212, -0.14863626658916473, -0.11712425202131271, -0.08516847342252731, 0.3075937330722809, 0.22567801177501678, -0.782108724117279, 1.210588812828064, -0.6860439777374268, -0.015609275549650192, -1.003615140914917, -0.46008679270744324, -0.12067891657352448, 0.89766275882720...
def transcribe _ wav ( self, wav _ bytes : bytes ) - > typing. optional [ transcription ] : start _ time = time. perf _ counter ( ) with tempfile. namedtemporaryfile ( suffix = ". wav ", mode = " wb " ) as wav _ file : wav _ file. write ( wav _ bytes ) wav _ file. seek ( 0 ) if self. model _ type = = kaldimodeltype. nn...
[ 0.22532273828983307, -0.3447341322898865, 0.6742212176322937, 0.6047014594078064, -0.3374846279621124, -0.01944764144718647, 0.23547369241714478, -0.6807540655136108, 0.7301215529441833, 0.6169541478157043, -0.7694664001464844, -0.18435850739479065, -1.494258165359497, 0.36922013759613037,...
def yaml _ generator ( args ) : if not os. path. exists ( args. source ) : raise exception ('the source file doesn \'t exist : { } '. format ( args. source ) ) if not os. path. exists ( args. destination ) : raise exception ('the destination folder doesn \'t exist : { } '. format ( args. destination ) ) config _ data =...
[ -0.4886828660964966, 0.6902177333831787, 0.6482322812080383, -0.8934217691421509, -0.4156818687915802, 0.21234969794750214, -0.13598208129405975, 1.268244981765747, -1.0987392663955688, 0.7470154762268066, -0.41850391030311584, -0.2167397290468216, 0.4980245530605316, 0.5235269665718079, ...
def test _ place _ sell _ order ( self ) : # first create intial orders trader = self. login _ user ( username = usera. get ('username') ). profile d = self. place _ order ( self. test _ stock _ a, 20,'buy ', trader ) self. assertequal ( d. get ('resp'). status _ code, http _ 201 _ created ) d = self. place _ order ( s...
[ 0.058810774236917496, 0.011734436266124249, 0.7125637531280518, -0.1603209525346756, 1.1558549404144287, -0.15626156330108643, 0.435366153717041, -0.38490167260169983, 0.8904615044593811, -0.8819997310638428, -0.27727210521698, -0.17624425888061523, 0.4653586447238922, -0.09749402105808258...
def call ( self ) : command = list ( self. _ call ) for parameter in self. _ options : if parameter [ " value " ] is not none : if parameter [ " sep " ] is not none : command. append ( " % s % s % s " % ( parameter [ " key " ], parameter [ " sep " ], parameter [ " value " ] ) ) else : command. append ( parameter [ " ke...
[ -0.7114333510398865, 0.02974405698478222, 0.7967648506164551, -0.0798579677939415, 0.807163417339325, 0.17434842884540558, -1.7107124328613281, -0.8546881675720215, -0.18255890905857086, 0.4592891335487366, 0.4260826110839844, -0.09096657484769821, -0.2670787274837494, 0.9349845051765442, ...
def get _ multiple _ track _ id ( self, search _ queries ) : track _ ids = [ ] for query in search _ queries [ : 20 ] : track _ id = self. get _ track _ id ( query ) track _ ids. append ( track _ id ) return track _ ids
[ -0.2869186997413635, -0.006049926392734051, 0.5048539638519287, 0.5782793164253235, 1.4177086353302002, 0.4891355633735657, -0.19982126355171204, -0.22320549190044403, -0.5181650519371033, 0.4190317988395691, -0.5665613412857056, -0.1461777687072754, -0.18802005052566528, 0.658130347728729...
def _ get _ bbox _ regression _ labels ( bbox _ target _ data, num _ classes ) : # inputs are tensor clss = bbox _ target _ data [ :, 0 ] # ( 256, ) bbox _ targets = clss. new ( clss. numel ( ), 4 * num _ classes ). zero _ ( ) # ( 256, 4 * num _ classes ) bbox _ inside _ weights = clss. new ( bbox _ targets. shape ). z...
[ -1.0093755722045898, 0.5554907917976379, 1.087497353553772, -0.22816699743270874, 0.5016220808029175, 0.1287272572517395, 0.2372976839542389, -0.34149467945098877, 0.2302842140197754, 0.182176873087883, -0.09917860478162766, 0.7785431742668152, 0.18435288965702057, -1.038070559501648, -0...
def test _ atomic _ language _ pattern _ 4 _ nistxml _ sv _ iv _ atomic _ language _ pattern _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - pattern - 5. xsd ", instance = " nistdata / atomic ...
[ 0.08504112809896469, -0.6413968205451965, 0.3478702902793884, 0.5129624009132385, -0.8145157098770142, -0.03562130033969879, 0.1585114449262619, -0.44890469312667847, -0.5895729660987854, 0.8895761370658875, -0.665501594543457, -0.07398197054862976, -0.28531554341316223, 0.1877811253070831...
def setthreshold ( self, v ) : self. _ set ( threshold = v ) return self
[ 0.11509198695421219, 0.4080451726913452, 0.09383123368024826, -0.07749717682600021, -0.3112364709377289, -0.1175890862941742, 0.19225531816482544, -0.09815876185894012, 0.13606947660446167, -0.2733158469200134, -1.329224705696106, 0.47775909304618835, -0.6841498613357544, -0.25460782647132...
def image _ reference ( self, image _ id ) : info = self. image _ info [ image _ id ] if info [ " source " ] = = " shapes " : return info [ " class _ " ] else : super ( self. _ _ class _ _ ). image _ reference ( self, image _ id )
[ -0.34593021869659424, 0.1182977482676506, 0.34826168417930603, -1.1342804431915283, 0.5555617213249207, -0.18502098321914673, -0.06508851051330566, -0.9152871966362, 0.6637127995491028, 0.3808225095272064, 0.7211893796920776, 0.45925119519233704, 0.9587830901145935, 1.8390533924102783, 0...
def returnnumberofwords ( word _ list ) : return len ( word _ list )
[ 0.2587401270866394, 0.6806849837303162, 0.19620788097381592, 0.06269454210996628, 0.3669874668121338, -0.27155184745788574, 0.18487827479839325, 1.6890180110931396, 0.5540429353713989, 0.2988547682762146, -1.6591626405715942, -0.18582633137702942, -0.9930124878883362, 2.0292131900787354, ...
def evaluate _ answer ( self, session, dataset, sample = 100, log = false ) : f1 = 0. em = 0. if log : logging. info ( " f1 : { }, em : { }, for { } samples ". format ( f1, em, sample ) ) return f1, em
[ -0.35307472944259644, -0.7699595093727112, 0.220954030752182, -0.2869071960449219, -0.5391705632209778, -0.32975706458091736, 0.4291987419128418, -0.16974900662899017, 0.32955458760261536, 0.05300849676132202, 0.39893361926078796, 0.2868172526359558, 0.14841200411319733, 0.5177465677261353...
def validate ( self, data ) : # print ( data ['remind _ me _ datetime'] ) # if'remind _ me _ datetime'in data : # if'due _ datetime'in data : # if not ( data ['due _ datetime'] > data ['remind _ me _ datetime'] ) : # raise serializers. validationerror ( { " remind _ me _ date " : " reminder date has to be before due da...
[ -0.32621192932128906, 0.41887766122817993, 0.9133302569389343, -0.5720023512840271, -0.4409957826137543, 0.9106188416481018, -0.3388223350048065, -0.2005191445350647, 0.253545343875885, -0.14025935530662537, 0.1622941642999649, 0.023058727383613586, -0.1119111180305481, 0.03798169270157814...
def send _ media _ message ( self, activityrequestobject, attachment _ type, attachment _ url, attachment _ name ) : activityresponseobject = {'type':'message ','from': {'id': activityrequestobject ['recipient'] ['id'], },'conversation': {'id': activityrequestobject ['conversation'] ['id'],'name':'convo1'},'recipient':...
[ -0.7069781422615051, -0.8314595818519592, 0.8112819790840149, 0.056825991719961166, 0.013351003639400005, -0.08530215173959732, 0.11355108767747879, -1.4251114130020142, 0.47321903705596924, 0.47562554478645325, 0.3795822560787201, 0.6823344230651855, -1.1997013092041016, 0.155675038695335...
def read _ from _ directory ( dir _ path ) : # pyformat : enable # make sure the illuminant is unit vector. rgb _ illuminant = np. loadtxt ( os. path. join ( dir _ path,'illuminant. txt'), dtype = np. float32 ) rgb _ illuminant / = np. linalg. norm ( rgb _ illuminant ) weight = np. loadtxt ( os. path. join ( dir _ path...
[ -0.2858670949935913, -0.33918148279190063, 0.7620404958724976, -0.016352273523807526, -1.0572248697280884, 0.122286856174469, 0.27502596378326416, 0.019234033301472664, -0.04816818609833717, 0.568985104560852, -0.3566431999206543, 0.7422075867652893, 0.18790379166603088, 0.1600779294967651...
def _ find _ majority _ class ( self, tree ) : nodes = self. _ order _ nodes ( tree, false ) element _ count = counter ( nodes ) if len ( element _ count ) > = 2 and element _ count [ 0 ] < element _ count [ 1 ] : return 1 elif len ( element _ count ) > = 2 and element _ count [ 0 ] > element _ count [ 1 ] : return 0 e...
[ -1.3196525573730469, -0.019844625145196915, 0.9886103272438049, 0.7027570009231567, 0.08116677403450012, 0.1567736268043518, -0.4085206091403961, -0.20226775109767914, -0.08712165802717209, -0.42420440912246704, 0.738073468208313, 0.5277079343795776, 0.07302766293287277, 1.9608511924743652...
def unwrapped ( self ) : return none
[ 0.08409977704286575, -0.8773646950721741, 0.5585518479347229, -0.6650674343109131, -0.14984077215194702, 0.11941034346818924, 0.10728397965431213, 0.0467340312898159, 1.0143593549728394, -1.4442931413650513, -0.29952508211135864, 1.0646947622299194, 0.17080551385879517, -0.4331016838550567...
def test _ pixelcoords ( self ) : pix _ x, pix _ y = pixelcoordsfromradec ( self. pix _ data ['ra'], self. pix _ data ['dec'], obs _ metadata = self. obs, camera = self. camera ) np. testing. assert _ array _ almost _ equal ( pix _ x, self. pix _ data ['pixel _ x'], decimal = 3 ) np. testing. assert _ array _ almost _ ...
[ 0.4269847869873047, 0.15165342390537262, 0.4802238345146179, -0.7288608551025391, 0.5392827391624451, 0.8760111331939697, -0.4526287317276001, -1.1657626628875732, 0.20213459432125092, -0.9389888644218445, 0.04797760769724846, -0.38301515579223633, -0.13030000030994415, -0.1568176150321960...
def links _ at _ patch ( patches, sort = true, nodes _ at _ link = none, xy _ of _ node = none ) : from.. quantity. ext. of _ link import calc _ midpoint _ of _ link from.. sort. ext. remap _ element import reorder _ links _ at _ patch links _ at _ patch, offset _ to _ patch = patches sort = false # print'sorting turne...
[ -0.3667982518672943, -0.5284918546676636, 0.6353553533554077, -0.9986687302589417, -0.30163970589637756, -0.16024845838546753, 0.24093011021614075, -0.451966255903244, 0.5311049818992615, -0.8261134028434753, 0.37363719940185547, 0.27194687724113464, 0.22255998849868774, -0.479971438646316...
def median ( l ) : length = len ( l ) if len ( l ) % 2 = = 1 : return l [ ( ( length + 1 ) / 2 ) - 1 ] else : a = l [ ( length / 2 ) - 1 ] b = l [ length / 2 ] return ( float ( a + b ) ) / 2
[ -0.6006680727005005, -0.4325864017009735, 0.45084306597709656, 0.31320980191230774, 0.07529853284358978, 0.09064670652151108, -0.5678917765617371, 0.20834724605083466, 0.824293315410614, -0.30485275387763977, 0.1293075680732727, -0.040859002619981766, -1.2882883548736572, 0.626268386840820...
def crypto _ watch _ handler ( event, context ) : # by default, treat the user request as coming from the america / new _ york time zone. os. environ ['tz'] ='america / new _ york'time. tzset ( ) logger. debug ('event. bot. name = { } '. format ( event ['bot'] ['name'] ) ) return dispatch ( event )
[ 0.47709745168685913, -0.24771472811698914, 0.36940622329711914, 0.1910523921251297, -0.1579062044620514, 0.9369868636131287, 0.2969120442867279, 0.009715522639453411, -0.047918230295181274, 0.6035975217819214, -1.0093157291412354, 0.960485577583313, 0.39530134201049805, -0.1359888911247253...
def add _ historical _ event ( request ) : if request. method = = post : logged _ in _ user = request. user body = json. loads ( request. body ) # historical event fields name = body. get ('name') event _ description = body. get ('event _ description') year = body. get ('year') date = body. get ('date') image = body. g...
[ -0.16612817347049713, -0.3056563436985016, 1.098644733428955, 0.5322308540344238, 0.6822750568389893, 1.0164709091186523, -0.43224436044692993, 0.7146937847137451, -0.22522054612636566, -0.3051195442676544, -0.3444197177886963, 0.333221435546875, -0.02664438635110855, 0.5131986737251282, ...
def createlatticepvdb ( dbfname, csv2fname = none ) : # if os. path. exists ( dbfname ) : os. remove ( dbfname ) conn = sqlite3. connect ( dbfname ) c = conn. cursor ( ) c. execute ( " " " drop table if exists info " " " ) c. execute ( " " " drop table if exists elements " " " ) c. execute ( " " " drop table if exists ...
[ -0.09458804130554199, 0.14793291687965393, 1.0092134475708008, -0.1543889343738556, -0.11800176650285721, 0.37306249141693115, 0.3255388140678406, 0.3828071057796478, 0.07502622157335281, 0.029530933126807213, -0.43540552258491516, -0.7814406156539917, -0.4584590196609497, 0.68433600664138...
def company _ prices ( stock _ codes, all _ dates = none, fields ='last _ price ', fail _ missing _ months = true, fix _ missing = true ) : if not isinstance ( fields, str ) : # assume iterable if not str... assert len ( stock _ codes ) = = 1 dataframes = [ company _ prices ( stock _ codes, all _ dates = all _ dates, f...
[ -0.008324897848069668, 0.5173078775405884, 0.8966350555419922, 0.6567252278327942, -0.03298160433769226, -0.17262913286685944, -0.056883711367845535, 0.4081403315067291, -0.804018497467041, -0.19188039004802704, 0.07761509716510773, -0.4849699139595032, 0.0701126977801323, 0.52918291091918...
def test _ append _ to _ dict _ list ( self ) : d = {'a': ['1'] } # d _ copy = {'a': ['1'] } actual = utils. append _ to _ dict _ list ( d,'a ', 2 ) expected = ['1 ', 2 ] self. assertequals ( actual, expected ) # self. assertequals ( d, d _ copy ) actual = utils. append _ to _ dict _ list ( d,'x ', 99 ) self. assertequ...
[ -1.3606315851211548, 0.0928245261311531, 0.6211969256401062, -0.3650159537792206, -0.2932504117488861, 0.38295844197273254, -0.5931388735771179, 0.9151214957237244, 0.9259397983551025, 0.20353339612483978, -0.6657862067222595, -0.07191459834575653, 1.3015540838241577, 0.24592523276805878, ...
def _ update _ front ( self ) : current = self. front. value pf, _ = non _ dominated _ sort ( self. y ) self. front = pf [ pf [ :, 0 ]. argsort ( ), : ] return not np. array _ equal ( current, self. front. value )
[ -0.9612023234367371, -0.6839056015014648, 0.32489264011383057, -0.7981593608856201, -0.24301362037658691, 0.49865952134132385, 0.2168443202972412, -0.830463171005249, -0.4942448139190674, 0.31508949398994446, 0.4949598014354706, 1.3176352977752686, -0.600591242313385, 0.5178906321525574, ...
def incache ( path ) : return path in _ _ lookup _ cache
[ -0.8140441179275513, -0.4277905821800232, 0.43802839517593384, 0.15637579560279846, -0.8948198556900024, 0.31627047061920166, -0.13612934947013855, -0.009909681975841522, 0.631863534450531, 0.1708044409751892, 0.01593937911093235, -0.15859192609786987, -0.378836989402771, -0.69504499435424...
def numpyarrays32 ( * args, * * kwargs ) : return np. array ( * args, dtype = np. int32, * * kwargs )
[ 0.8465472459793091, 0.034892767667770386, 0.6745854616165161, -0.39809462428092957, 0.35053521394729614, 0.9827873706817627, -0.6948489546775818, -1.316608190536499, -0.26192691922187805, 0.24749338626861572, -0.8638876676559448, 0.6421226263046265, -0.48433053493499756, 0.7093461155891418...
def getdata ( client, account, add ) : detaillist = [ ] campaign _ id _ report _ index = 0 campaign _ name _ report _ index = 1 ad _ group _ id _ report _ index = 3 ad _ group _ name _ report _ index = 2 headline _ report _ index = 5 final _ url _ report _ index = 4 client. setclientcustomerid ( account ) service = cli...
[ 0.7109196186065674, 0.45597681403160095, 0.9241413474082947, -0.13182391226291656, -0.14343908429145813, -0.2942591607570648, -0.5696288347244263, 0.48800671100616455, -0.017785988748073578, 0.7642390131950378, 0.08243239670991898, 0.8843309879302979, -1.0900975465774536, 0.846121966838836...
def macromove ( self, x, y, theta ) : self. logger. info ( " handling macro move to { } { } { } ". format ( x, y, theta ) ) while true : # translate bot _ loc data into internal units curx = self. xyfrombot _ locuc ( self. bot _ loc [ " x " ] ) cury = self. xyfrombot _ locuc ( self. bot _ loc [ " y " ] ) curtheta = sel...
[ -0.8936615586280823, -0.33857470750808716, 0.655913233757019, -0.2732117772102356, -0.14688794314861298, -0.031539205461740494, 0.16263653337955475, -1.0663286447525024, -0.37608569860458374, -0.31911608576774597, 0.049963708966970444, 0.19342218339443207, -0.6416175961494446, 0.0732363089...
def log _ scalar ( self, name : str, value : union [ torch. tensor, np. ndarray, float ] ) - > none : # add scope prefixes name = self. log _ scope _ prefix ( name ) # log scalar optimizer _ steps = cast ( " _ buddyoptimizer ", self ). optimizer _ steps self. log _ writer. add _ scalar ( name, value, global _ step = op...
[ 0.22700493037700653, -0.14823627471923828, 0.686427116394043, 0.2768910229206085, -0.33468642830848694, -0.32158660888671875, -0.03389779478311539, -0.2797781527042389, -0.04007963091135025, 0.33769354224205017, -1.161612868309021, 1.4180269241333008, 0.48199158906936646, 0.097709931433200...
def step ( self, state, action, reward, next _ state, done, t ) : # save experience / reward # transform to full experience full _ state, full _ action, full _ reward, full _ next _ state, full _ done = self. transform _ to _ full ( state, action, reward, next _ state, done ) # save full experiecne to memory self. memo...
[ 0.0065667107701301575, 0.012629350647330284, 0.5854771137237549, -0.5422479510307312, 0.36250200867652893, -0.2873883545398712, 0.2052273452281952, 0.1832326501607895, 0.12154288589954376, 0.6843270659446716, -0.6157717108726501, -0.13980431854724884, 0.7655260562896729, 0.3799279332160949...
def read _ data ( self ) : self. curr _ data _ reads = 0 self. map _ list ( self. stock _ data _ container _ list ) return self. stock _ data _ container _ list
[ -1.6393005847930908, -0.6882320046424866, 0.36103686690330505, -0.06719397753477097, 0.47356921434402466, 0.3930950462818146, 0.0007661255658604205, -0.5801200866699219, 0.25430038571357727, -0.6794439554214478, 0.28497791290283203, 0.5638182163238525, 0.5737022161483765, 0.396742552518844...
def _ amp _ ( self, x ) : v = self. amplitude ( x ) # return complex ( v. real ( ), v. imag ( ) )
[ -0.37888675928115845, -1.5334486961364746, 0.24221453070640564, 0.01817271113395691, -1.536928415298462, 0.04797019064426422, -0.1672685593366623, -0.8513867259025574, 1.3150078058242798, 0.3550308346748352, -0.32461342215538025, 1.0532811880111694, 0.5134172439575195, -0.755054771900177, ...
def gettickets ( ) : # create a 2d array [ 3x9 ] of 0s ticket _ array = np. zeros ( ( 3, 9 ), dtype = int ) # create an a list of numbers from 1 to 90. total _ numbers = [ num for num in range ( 1, 90 ) ] # create a list of tupele of all the indices of 3x9 ticket _ array. i. e ( 0, 0 ), ( 0, 1 ),..., ( 2, 8 ) total _ i...
[ 0.07089743763208389, 0.4570608139038086, 0.9971266984939575, -0.48188501596450806, 0.5591286420822144, 0.46456897258758545, 1.6809335947036743, 0.041912805289030075, 0.10811229795217514, 0.24230226874351501, -0.060475949198007584, 0.17620736360549927, -0.03813253715634346, -0.4394057393074...
def get _ create _ rack _ vthunder _ load _ balancer _ flow ( self, vthunder _ conf, topology, listeners = none ) : f _ name = constants. create _ loadbalancer _ flow lb _ create _ flow = linear _ flow. flow ( f _ name ) lb _ create _ flow. add ( lifecycle _ tasks. loadbalanceridtoerroronreverttask ( requires = constan...
[ 1.0378379821777344, -0.36581507325172424, 0.4791410267353058, 0.6572467684745789, 1.0600554943084717, 0.8446909785270691, 0.25283244252204895, -0.6444360017776489, -0.5129521489143372, 0.4410000741481781, -0.8507320880889893, 0.021225301548838615, -0.1912282258272171, 1.255810022354126, ...
def replaceidbygrounds ( data ) : mapping = dict ( zip ( range ( len ( groundtype ) ), groundtype ) ) data ['sol']. replace ( mapping, inplace = true )
[ 0.25555792450904846, 0.3671168088912964, 0.4782440662384033, 0.36360546946525574, 0.8632772564888, 0.6539438962936401, 0.5589333176612854, -0.3961537480354309, -0.1323329210281372, 0.5634540319442749, -0.3415599465370178, 0.029948605224490166, -0.8381638526916504, 0.9989219307899475, -0....
def test _ license _ included _ in _ font _ names ( self ) : font = font. get _ ttfont ( self. path ) regex = re. compile ( r'^ (? : http | ftp ) s? : / /'# http : / / or https : / / r'(? : (? : [ a - z0 - 9 ] (? : [ a - z0 - 9 - ] { 0, 61 } [ a - z0 - 9 ] )? \. ) +'r'(? : [ a - z ] { 2, 6 } \.? | [ a - z0 - 9 - ] { 2,...
[ 0.4903750717639923, -0.6301519870758057, 0.8493670225143433, -0.3933500349521637, -0.6999426484107971, 0.4956927001476288, 0.6234471201896667, 0.7504077553749084, 0.6060435175895691, -0.36879193782806396, -0.22402836382389069, -0.102058045566082, -0.38368844985961914, 0.5965795516967773, ...
def write _ field ( text = " ", x = 1, y = 1, length = 20, align = " left ", fore _ colour = 39, back _ colour = 49 ) : # execute function to check for valid colours and force correction fore _ colour, back _ colour = colour _ check ( fore _ colour, back _ colour ) # apply foreground and background colours print ( " { ...
[ 0.875484049320221, 0.12633483111858368, 0.8979081511497498, -1.147171974182129, 0.15051895380020142, 0.5847359895706177, 0.37138277292251587, 0.44627267122268677, -0.3210524618625641, 0.08799205720424652, -0.7172833681106567, 0.505351722240448, -0.6795883178710938, -0.020166143774986267, ...
def test _ get _ consensus _ assignment _ overlapping _ names ( self ) : # here the 3rd level is different, but the 4th level is the same # across the three assignments. this can happen in practice if # three different genera are assigned, and under each there is # an unnamed species # ( e. g., f _ _ x ; g _ _ a ; s _ ...
[ -0.15866965055465698, -0.27774104475975037, 0.9024139642715454, 0.31808432936668396, 0.06396608054637909, 0.329826682806015, 0.8055701851844788, -0.22288569808006287, -1.4921162128448486, 0.34845519065856934, -0.19465166330337524, 0.015812622383236885, -0.14362329244613647, -0.157777205109...
def get _ edge _ filtered _ subgraph _ view ( graph : nx. graph, query _ params : " graphqueryparams " ) - > nx. graph : def filter _ edge _ by _ equality ( node _ start, node _ stop ) : res = graph [ node _ start ] [ node _ stop ]. get ( query _ params. label ) \ = = query _ params. value return res def filter _ edge ...
[ 0.04375937208533287, 0.8533810973167419, 0.8050743937492371, -0.022814961150288582, -0.7336731553077698, 0.9080810546875, 0.473741739988327, 0.05357787385582924, 0.4369737505912781, 0.41235870122909546, 0.8547815084457397, 0.5314573645591736, -0.0094724977388978, -0.8474196791648865, -0....
def home ( ) : html = static _ html _ string. html return html
[ 0.48851531744003296, -0.44482681155204773, 0.17269501090049744, 1.0666903257369995, -0.16430425643920898, 0.9074227809906006, 0.6685301065444946, 0.06321112811565399, -0.4639979600906372, 0.3495285212993622, 0.7257951498031616, 1.060183048248291, -0.26730111241340637, -0.8089184761047363, ...
def _ _ del _ _ ( self ) : self. stop ( )
[ 0.18100275099277496, -1.6784536838531494, 0.5359371304512024, -1.3235468864440918, -0.3223791718482971, 0.2824517488479614, 0.2773510813713074, -0.013429852202534676, 0.3044644594192505, -0.5309470891952515, 0.499580442905426, 0.04347284883260727, -0.24489079415798187, -0.4568626284599304,...
def test _ atomic _ boolean _ pattern _ 4 _ nistxml _ sv _ iv _ atomic _ boolean _ pattern _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - pattern - 5. xsd ", instance = " nistdata / atomic / bo...
[ -0.12232786417007446, -0.07984208315610886, 0.4914434254169464, 0.6024855971336365, -0.2669919431209564, 0.47750023007392883, 0.1393088400363922, -0.4410194456577301, -0.24482586979866028, 1.0246704816818237, -0.5375156402587891, -0.1809074729681015, -0.6771232485771179, -0.354413598775863...
def test _ list _ decimal _ enumeration _ 2 _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 3 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 3. xsd ", instance = " nistdata / list / ...
[ -0.8544043898582458, -0.33768925070762634, 0.7814053893089294, 0.9317436218261719, 0.11009591072797775, 0.3350121080875397, -0.39693722128868103, 0.7361498475074768, 1.3858808279037476, 0.6087436676025391, -0.7133762836456299, -0.08214258402585983, 0.34151697158813477, -0.05086712166666984...
def test _ list _ decimal _ pattern _ nistxml _ sv _ iv _ list _ decimal _ pattern _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - pattern - 1. xsd ", instance = " nistdata / list / decimal / schema...
[ -0.4497731029987335, -0.21830034255981445, 0.6785776019096375, 0.7484881281852722, 0.28459206223487854, -0.08598430454730988, 0.12227584421634674, 0.771644115447998, 1.3843775987625122, 0.2768877148628235, -0.6382089853286743, -0.5233952403068542, -0.08936978131532669, 0.39642199873924255,...
def teardown _ module ( ) : log = get _ log ( ) global serviceapp if serviceapp : log. debug ( " teardown _ module : stopping test serviceapp'% s '. " % serviceapp. uri ) serviceapp. stop ( ) serviceapp. cleanup ( ) serviceapp = none
[ 0.2588732838630676, -0.8434689044952393, 0.1178252324461937, -0.5098410248756409, 0.5344568490982056, 1.103502631187439, 1.1039388179779053, -0.2619151771068573, 0.5401254296302795, 0.3267287015914917, 0.10171196609735489, 0.4816787540912628, -1.0057191848754883, 0.4435250163078308, 0.30...
def _ get _ sch _ id _ from _ task _ id ( self, task _ id ) : return [ k for k, v in self. schedules. items ( ) if v ['task _ id'] = = task _ id ] [ 0 ]
[ 0.6488457322120667, -0.21969351172447205, 0.4670283794403076, 0.45557472109794617, -0.42594632506370544, -0.059139519929885864, -0.4510577917098999, -0.34666427969932556, 0.46516701579093933, 0.938656747341156, 0.4261559844017029, 0.4990050792694092, 0.7272872924804688, 0.14010629057884216...
def get _ helper _ dict ( ) : _ helper _ dict = dict ( record _ type = " document ", volumes = [ ], serials = [ ], has _ serial = false, is _ multipart = false, has _ tags = false, has _ related = false, has _ journal = false, tags = [ ], journal _ record _ legacy _ id = " ", eitems _ proxy = [ ], eitems _ has _ proxy ...
[ 0.4789144694805145, -0.13762354850769043, 0.45649927854537964, -1.3928020000457764, -0.2630212903022766, -0.12520770728588104, 0.949569046497345, -0.28535279631614685, -0.361712783575058, -0.24350698292255402, -0.4794861376285553, 0.5819528102874756, -0.05797244608402252, 0.018931873142719...
def is _ active ( self ) : return self. expires _ at and datetime. utcnow ( ) > self. expires _ at
[ -0.43220290541648865, -1.2755095958709717, 0.6601595282554626, -0.030707266181707382, 0.18796050548553467, -0.06007601320743561, -1.1029746532440186, 0.52599036693573, 0.09778064489364624, 0.3670794367790222, -0.21502050757408142, 0.586357831954956, 0.4122183620929718, -0.6245872378349304,...
def nearest _ vertices ( location, lat _ long ) : if lat _ long in list ( location. values ( ) ) : return list ( { k : v for k, v in location. items ( ) if v = = lat _ long }. keys ( ) ) [ 0 ] check = float ( " inf " ) ver = ( 0, 0 ) for v in location : xsum = math. fabs ( int ( location [ v ] [ 0 ] ) - int ( lat _ lon...
[ 0.005537379067391157, -0.5647810697555542, 0.46389439702033997, -0.16585126519203186, -1.1267602443695068, -0.15132826566696167, -0.4172315001487732, -0.09192629903554916, 0.06538920849561691, 1.240481972694397, -0.761168897151947, 0.4169064462184906, 0.30670320987701416, 0.120603248476982...
def get _ supported _ algorithms ( ) : return list ( dataone _ to _ python _ checksum _ algorithm _ map. keys ( ) )
[ -0.08847694098949432, 0.5627027153968811, 0.557488739490509, 0.3105114698410034, 0.008107260800898075, 1.067550778388977, -1.0945851802825928, 0.6263652443885803, 0.5528458952903748, 0.8247573375701904, -1.625560998916626, 0.7342586517333984, -0.04084854573011398, 0.32576754689216614, -0...
def testbeginepisode ( self ) : agent = self. _ create _ test _ agent ( ) # we fill up the state with 9s. on calling agent. begin _ episode the state # should be reset to all 0s. agent. state. fill ( 9 ) first _ observation = onp. ones ( self. observation _ shape + ( 1, ) ) self. assertequal ( agent. begin _ episode ( ...
[ 0.2079097479581833, 0.4795372188091278, 0.6835404634475708, 0.16694679856300354, 0.7603424191474915, -0.11325059831142426, 0.7996130585670471, 0.36074620485305786, 0.5460277199745178, 0.2075653076171875, -0.1610366553068161, 0.27637842297554016, 0.6789510846138, -0.47650277614593506, 0.3...
def _ random _ key ( self ) : return self. _ key ( " random ", uuid. uuid4 ( ) )
[ -1.4206722974777222, 0.054339904338121414, 0.07852305471897125, -0.9682602286338806, -0.20388652384281158, 0.3554356098175049, -0.05653262883424759, -0.05440974235534668, 0.05313453823328018, 0.19552810490131378, -0.18999655544757843, -0.4356454312801361, -0.7869434952735901, -0.3036888539...
def test _ atomic _ any _ uri _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ any _ uri _ pattern _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - pattern - 2. xsd ", instance = " nistdata / atomic / ...
[ -0.23985691368579865, -0.6630347967147827, 0.5497967600822449, 1.2046759128570557, -0.1623280644416809, -0.23505255579948425, 0.22014933824539185, -0.07553281635046005, -0.5860084295272827, -0.42937618494033813, 0.1389428824186325, -0.2035256028175354, -0.24290551245212555, 0.2322074472904...
async def on _ data ( self, data ) : player _ speed _ modified = false player _ inputs _ disabled = false print ( " robot location : ", data. lat, data. lon ) for game _ area in self. gps _ socket. game _ areas : effects _ robot = inside _ area _ effect ( game _ area, data ) if effects _ robot : await game _ area. play...
[ -0.20331022143363953, -0.4862666428089142, 0.8096516728401184, 0.05312221124768257, -0.3388241231441498, 0.08813489228487015, 0.24076497554779053, 0.0005363711388781667, -0.17824287712574005, 0.1175258457660675, 0.607893705368042, 0.022623199969530106, -0.5278750658035278, 0.93073165416717...
def boundary _ image ( image : union [ np. ndarray, torch. tensor ], patch _ classification : union [ np. ndarray, torch. tensor ], boundary _ color : tuple [ int, int, int ] = ( 255, 0, 0 ) ) - > np. ndarray : image = to _ numpy ( image ). copy ( ) mask = to _ numpy ( patch _ classification ). copy ( ) found _ boundar...
[ -0.2718057334423065, -0.46604111790657043, 0.835507869720459, 0.3793841004371643, 0.9940774440765381, 0.47305968403816223, 0.10691526532173157, -0.2519180476665497, -0.10628750175237656, 0.6953611373901367, 0.49823787808418274, 1.209647536277771, 0.0496600903570652, 0.08546164631843567, ...
def end ( info _ end ) : time. sleep ( 2 ) # to try to prevent broken pipe errors print " trying to send end signal, testing connection... " while true : if try _ connection ( ) = = true : print " connection verified, sending end signal. " try : socketio. emit ('endbiketrip ', json. dumps ( info _ end ), on _ response ...
[ -0.4273677170276642, -0.4318259656429291, 0.544481635093689, 0.5272744297981262, 0.5171536207199097, 0.5605608224868774, -0.38026994466781616, -0.5188780426979065, -1.8775936365127563, 0.3780381977558136, -0.7332099080085754, 0.4110982120037079, -0.7898554801940918, 0.3960183262825012, 0...
def request _ validation ( self, request, pk ) : selected _ options = request. data. get ( " selected _ options " ) comment = request. data. get ( " comment " ) version = self. get _ object ( ) timestamp = datetime. datetime. now ( ). timestamp ( ) for index, selected _ option in enumerate ( selected _ options ) : rece...
[ -0.8584030270576477, -0.18733933568000793, 0.7131640315055847, -0.014942923560738564, 0.7014607787132263, 0.06136707589030266, 0.3718518018722534, -0.5237842202186584, 0.29933053255081177, 0.4056655764579773, -0.46170884370803833, 0.4199877083301544, -0.9482702612876892, 0.0599089078605175...
def analyze _ tweets ( self, ts = none ) : start, end = self. get _ interval ( ts = ts ) neg _ tweets, pos _ tweets = self. get _ tweets _ in _ range ( start, end ) term _ lists = self. get _ term _ scores ( [ neg _ tweets, pos _ tweets ] ) if len ( term _ lists [ 0 ] ) + len ( term _ lists [ 1 ] ) > 0 : data = { } for...
[ -0.862779438495636, 0.10072444379329681, 0.710357129573822, -0.40244007110595703, 1.2222265005111694, -0.1484619826078415, -0.6821684837341309, 0.18636927008628845, -0.9413015246391296, 0.5720395445823669, -0.8516656160354614, -0.45830243825912476, 0.377929151058197, 0.5839704871177673, ...
def dump _ pdgid _ to _ corsika7 ( file : pathlib. path | none = none ) - > none : # loop over all thinkable values and only add them if the pdg id exists for a in range ( 2, 56 + 1 ) : for z in range ( 0, a + 1 ) : corsikaid = a * 100 + z with contextlib. suppress ( particlenotfound ) : corsica _ pdg _ id. append ( ( ...
[ -0.3102816939353943, -0.8310601115226746, 0.7023462057113647, -0.11122692376375198, 0.29403015971183777, 0.019881032407283783, 0.21146519482135773, 0.5579996705055237, -0.2571064233779907, -0.23595264554023743, 0.18712671101093292, 0.7582509517669678, 0.2927267551422119, 0.9816288352012634...
def installcython ( self ) : # get directories exec ( self. findkeywordoption ('cython _ src') ) cython _ src = os. path. expanduser ( cython _ src ) exec ( self. findkeywordoption ('cython _ prefix') ) # scipy _ setup = scipy _ src +'/ setup. py'cython _ home = self. salome _ home +'/ prerequisites /'+ cython _ prefix...
[ 0.3428439497947693, -0.3564194142818451, 0.4988272190093994, -0.46187448501586914, 0.8685464859008789, 0.4350444972515106, 0.962990939617157, 0.33707043528556824, 0.32558420300483704, 0.5691961646080017, -0.8875926733016968, 0.18431736528873444, -0.23303493857383728, -0.009598239324986935,...
def test _ atomic _ base64 _ binary _ length _ 3 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ length _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - length - 4. xsd ", instance = "...
[ 0.23897422850131989, 0.07650087028741837, 0.44378191232681274, 0.7688997983932495, 0.27573704719543457, 0.12051176279783249, 0.025154855102300644, -0.08899258077144623, 0.20135611295700073, 0.3831637501716614, -0.5128930807113647, -0.45385393500328064, -0.6242139339447021, -0.0496218875050...
def command _ monkey ( self, brain, arg = none ) : if arg : return self. act ( self. action _ yml,'monkey ', arg ) else : return self. act ( self. action _ yml,'monkey ', none )
[ -0.5678386092185974, -0.48021817207336426, 0.34997662901878357, 0.1458522528409958, 0.31983980536460876, 0.1682485044002533, 0.3832995295524597, 0.3966614007949829, 0.6017509698867798, -0.34888777136802673, 0.02372044138610363, 1.1450568437576294, -0.6510074734687805, 1.0860828161239624, ...
def processfiles ( path = '.') : csvfiles = glob. glob ( path +'/ *. csv') try : os. remove ('accrued. db') except : print ('accrued. bd does not exist yet.') with mp. pool ( mp. cpu _ count ( ) ) as p : ret = p. map ( extractdata, csvfiles ) data = pd. concat ( ret, sort = false ) createdictionaries ( data )
[ 0.7181088924407959, 0.5400771498680115, 0.6182451844215393, 0.352464884519577, 0.1399489939212799, 0.2025453895330429, 0.8536086082458496, 0.6917815804481506, -0.5109423995018005, -0.08854959160089493, 0.746370255947113, -0.16943754255771637, -0.20830278098583221, 0.42989179491996765, 0....
def props ( obj, required, * * kwargs ) : # get the attributes of the template object pr = get _ obj _ attrs ( obj ) # get the parameters to generate the waveform # note that keyword arguments override values in the template object input _ params = default _ qnm _ args. copy ( ) input _ params. update ( pr ) input _ pa...
[ -0.5047686696052551, -0.33115673065185547, 0.5136798024177551, -0.667243480682373, -0.40512698888778687, -0.020339908078312874, -0.6699554920196533, 0.0163857564330101, 0.11530233919620514, 0.21609550714492798, -0.6029594540596008, -0.14007695019245148, -0.623399555683136, 0.29940259456634...
def append _ to _ buffer ( self, line ) : self. buffer + = line self. counter + = 1 if self. counter = = self. block : self. output. write ( self. buffer ) self. counter = 0 self. buffer =''
[ 0.24130572378635406, 0.07761949300765991, 0.6458872556686401, 0.652009129524231, 0.12804020941257477, 0.25927627086639404, 0.7880614399909973, -0.9312888383865356, -0.03472770005464554, -1.0196943283081055, -1.1461622714996338, -0.08500766009092331, -0.6650458574295044, 1.0715945959091187,...
def storprop _ cdromdisabledigitalplayback ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " devinfo ", " devinfodata " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ -0.6579208970069885, 0.45203840732574463, 0.5322901606559753, -0.27798402309417725, -1.4558266401290894, 0.8512403964996338, 1.4505313634872437, -0.3327018618583679, 0.2712371349334717, 0.3025275468826294, -0.29355594515800476, -0.4783700704574585, -1.254817008972168, 0.09564170986413956, ...
def get _ id ( self ) : return str ( self. name )
[ 0.4466641843318939, -1.4416828155517578, 0.4735012650489807, -0.3517519533634186, -0.08614704012870789, 1.3656797409057617, -0.8699862957000732, -0.4978755712509155, 1.0446553230285645, 0.370283305644989, -0.5289617776870728, 0.23238815367221832, -0.5458340048789978, -0.6037135124206543, ...