text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ init _ model ( self ) : self. env, env _ continuous, num _ states, num _ actions = get _ env _ info ( self. env _ id ) # seeding torch. manual _ seed ( self. seed ) self. env. seed ( self. seed ) if env _ continuous : self. policy _ net = policy ( num _ states, num _ actions ). to ( device ) else : self. policy _... | [
0.5882576704025269,
-0.4120197296142578,
0.7415761351585388,
-0.1869882345199585,
0.8206871151924133,
0.8408764004707336,
0.23422613739967346,
-0.3271656036376953,
0.046480972319841385,
0.06644632667303085,
-0.5002790093421936,
-0.33730030059814453,
0.3202664256095886,
0.48908621072769165,... |
def conf _ r ( self, t, a, lbda ) : l _ w = 1 + np. log ( len ( self. states [ 0 ] ) ) l = np. sqrt ( ( 1 - l _ w * * ( self. d + 1 ) ) / ( 1 - l _ w ) ) conf = np. log ( self. na * t * * self. alpha * ( 1 + self. n [ a ] * l * * 2 / lbda ) ) conf = np. sqrt ( ( self. d + 1 ) * conf ) + np. sqrt ( lbda ) if self. n [ a... | [
0.7356470227241516,
-0.7961094975471497,
0.43231314420700073,
-1.108603835105896,
-0.1678890585899353,
-0.5349189043045044,
0.27840107679367065,
0.5620062947273254,
-0.1641886681318283,
0.8886863589286804,
0.13721469044685364,
-0.17776010930538177,
-0.18741671741008759,
0.6573323607444763,... |
def get _ object ( self ) : queryset = self. filter _ queryset ( self. get _ queryset ( ) ) # perform the lookup filtering. lookup _ url _ kwarg = self. lookup _ url _ kwarg or self. lookup _ field assert lookup _ url _ kwarg in self. kwargs, ('expected view % s to be called with a url keyword argument'' named " % s ".... | [
-0.6633564233779907,
0.04761158674955368,
0.755545437335968,
0.12594981491565704,
-0.1706380993127823,
0.21522049605846405,
0.8169639110565186,
0.03355541452765465,
0.4438333213329315,
-0.4923509955406189,
0.6257932782173157,
0.6217064261436462,
0.07342110574245453,
-0.43008026480674744,
... |
def extract _ mapped ( bam, processes ) : try : bamfile = pysam. alignmentfile ( bam, " rb " ) chrs = bamfile. references except valueerror as e : print ( e ) # returns empty list if not reads mapped ( because not ref match in bam ) if len ( chrs ) = = 0 : return ( [ ] ) # checking that nb _ process is not > nb _ chrom... | [
0.23753367364406586,
-0.7018333077430725,
0.8394580483436584,
0.42160919308662415,
-0.4906700849533081,
0.34414201974868774,
-0.4260186553001404,
-0.17643055319786072,
0.3124385476112366,
0.08064920455217361,
0.29631540179252625,
0.019665919244289398,
-0.3499628007411957,
0.286785572767257... |
def output _ dirname ( self ) - > str : return " encrypted _ output " | [
-0.6341466903686523,
-0.5558018088340759,
0.5507731437683105,
0.678327739238739,
-0.6748185753822327,
0.3179490268230438,
0.9648846983909607,
-0.2629040479660034,
-0.3196283280849457,
0.04402512311935425,
-0.17557993531227112,
0.46572062373161316,
0.14265546202659607,
-0.8226185441017151,
... |
def affinecalculate ( matrix _ x, matrix _ a ) : matrix _ a = np. array ( matrix _ a ) a11 = matrix _ a [ 0 ] [ 0 ] a12 = matrix _ a [ 0 ] [ 1 ] a21 = matrix _ a [ 1 ] [ 0 ] a22 = matrix _ a [ 1 ] [ 1 ] b1 = matrix _ a [ 0 ] [ 2 ] b2 = matrix _ a [ 1 ] [ 2 ] a = [ [ a11, a12 ], [ a21, a22 ] ] x = [ [ matrix _ x [ 0 ] ]... | [
0.5017393231391907,
-0.35062435269355774,
0.8548163771629333,
-0.25674089789390564,
0.23431149125099182,
-0.7175123691558838,
-0.5282905101776123,
0.15873415768146515,
-0.2617901563644409,
0.805844783782959,
0.18019931018352509,
0.39215990900993347,
0.27459877729415894,
-0.0133714955300092... |
def testmodifactivity ( ) : print ( colors. bold + " appel du script de check des contraintes d'activity en cas d'uptdate " + colors. endc ) data = const. defaultdata ( activityname = " generatedactivitytoupdate " ) rmurray = sessionserpico ( " rmurray @ yopmail. com " ) rmurray. createactivity ( data. datacreationacti... | [
-0.0005186791531741619,
-0.5482726097106934,
0.9341835379600525,
0.09570442885160446,
0.008305217139422894,
0.35534629225730896,
0.5720923542976379,
0.03402002900838852,
0.020846957340836525,
0.2396470010280609,
0.3003447949886322,
0.3903805613517761,
-0.7661558985710144,
0.169980630278587... |
def feedlocalizertheta ( self, commresult _ rads ) : sensor _ data = self. getsensordata ( ) self. logger. debug ( " about to put data into qnav _ loc, object { } ". format ( str ( self. qnav _ loc ) ) ) self. qnav _ loc. put ( { " dtheta " : self. angletolocuc ( commresult _ rads ), " dxy " : 0, " sensordata " : senso... | [
-0.3305531442165375,
-0.44880443811416626,
0.30574309825897217,
-1.973923921585083,
0.6383407115936279,
0.09287012368440628,
0.5412290692329407,
-0.4922727644443512,
-0.06053736060857773,
-0.4669772982597351,
-0.652820348739624,
0.19584017992019653,
0.06034986302256584,
-0.2815142869949341... |
def list ( ) : flist, total _ use = bucket _ folder _ stats ( app, bucket ) payload = { " bucket " : app. config ['aws _ bucket'], " folder " : starts _ with _ branch ( app. config ['branch'] ), " total _ use " : total _ use, " files " : flist, } return json. dumps ( payload ) | [
-0.0881621316075325,
-0.24365325272083282,
0.5047597885131836,
-0.7684034109115601,
0.4241475760936737,
-0.800803005695343,
-0.15070344507694244,
-0.9286365509033203,
-0.397576242685318,
0.05834078788757324,
-0.9697816967964172,
0.33409348130226135,
0.7531682848930359,
0.6447202563285828,
... |
def save ( self, * args, * * kwargs ) : self. asset _ type = " company " super ( company, self ). save ( * args, * * kwargs ) | [
-0.5043471455574036,
0.059628989547491074,
0.47549083828926086,
0.016923202201724052,
0.7492160797119141,
0.35632359981536865,
0.08579903095960617,
0.2919387221336365,
-0.518606424331665,
0.21170511841773987,
-0.4918712377548218,
0.620470404624939,
-0.45391666889190674,
0.8009402751922607,... |
def run _ engine _ and _ launch _ simulation ( mission, number _ of _ boxes, number _ of _ particles _ in _ box, box _ side _ length, temperature, box _ hole _ area, initial _ fuel _ mass ) : # simulate engine thrust _ per _ box, \ mass _ loss _ rate _ per _ box \ = simulate _ engine _ performance ( number _ of _ parti... | [
-0.11617071181535721,
0.009335790760815144,
0.5710787773132324,
-0.20609356462955475,
-0.3819665014743805,
-0.4010767638683319,
-0.4088567793369293,
-0.518287718296051,
-0.7090113759040833,
0.0730740949511528,
0.3528631031513214,
0.268166720867157,
0.3025921583175659,
0.3563683331012726,
... |
def get _ multiple _ tracks _ audio _ features ( self, tracks _ id ) : id _ string = " " for track _ id in tracks _ id : id _ string + = track _ id + ", " audio _ features _ data = self. _ make _ request ( f " https : / / api. spotify. com / v1 / audio - features /? ids = { id _ string [ : - 1 ] } " ) if audio _ featur... | [
-0.7351326942443848,
-0.7477912306785583,
0.398176908493042,
0.47935304045677185,
1.4448250532150269,
-0.6802187561988831,
-1.6544767618179321,
-0.9921220541000366,
-0.6051027774810791,
0.23063689470291138,
-0.9222211837768555,
0.49067962169647217,
-0.16830392181873322,
0.3253142237663269,... |
def new _ tile ( self ) : is _ empty = false while ( not is _ empty ) : dummy _ random _ row = random. randrange ( 0, self. _ tiles _ height ) dummy _ random _ col = random. randrange ( 0, self. _ tiles _ width ) if self. get _ tile ( dummy _ random _ row, dummy _ random _ col ) = = 0 : is _ empty = true dummy _ probab... | [
-0.06654705107212067,
0.7087262272834778,
0.6119422912597656,
-0.36006277799606323,
0.493376761674881,
0.5693387985229492,
0.169087216258049,
-0.44647711515426636,
-0.0939476415514946,
-0.07760471105575562,
-0.18100935220718384,
0.31638962030410767,
0.13395236432552338,
0.15024997293949127... |
def _ objects _ to _ human _ message ( self, x _ hfth, x _ oft, h _ hfth, h _ oft, objects _ mask, ho _ dists = none ) : receiver = torch. cat ( [ x _ hfth, h _ hfth ], dim = - 1 ) senders = torch. cat ( [ x _ oft, h _ oft ], dim = - 1 ) senders _ mask = objects _ mask weights = none if self. message _ type in {'v1 ','... | [
-0.04206813871860504,
-0.3985777795314789,
0.7709333300590515,
-0.47014445066452026,
0.2691960334777832,
-0.012537895701825619,
0.3776465356349945,
-0.3626808822154999,
-0.47625625133514404,
0.6073008179664612,
-0.12219426035881042,
0.3846411108970642,
0.6359106302261353,
0.120073534548282... |
def _ dim ( self, units ) : if self. strategy. do _ linear _ layer : return self. dim else : dim = units * self. _ unit _ dim + self. _ remainder _ dim self. _ remainder _ dim = 0 return dim | [
-0.24824905395507812,
0.6636686325073242,
0.4075043499469757,
-0.032159049063920975,
0.310085654258728,
0.9522978067398071,
1.0837535858154297,
-1.0213662385940552,
0.2792896628379822,
-1.1629689931869507,
0.6078549027442932,
-0.25864076614379883,
-0.24690228700637817,
-0.23666410148143768... |
def run ( self, force = false ) : global instance global job _ ids data = self. payload. load _ input ( ) logger. debug ( " payload : \ n % s " % json. dumps ( data, sort _ keys = true, indent = 4 ) ) if not data : logger. error ( " no payload data to load. " ) return false if not force : if self. payload. output _ exi... | [
-1.5733567476272583,
-0.1534731686115265,
0.981600284576416,
-0.5341292023658752,
0.06550538539886475,
0.3772372007369995,
0.251700222492218,
-0.03019890934228897,
-0.3883630335330963,
0.514676570892334,
-0.29354894161224365,
-1.1914329528808594,
-0.23741310834884644,
0.7587729692459106,
... |
def terminate _ provisioned _ product ( self, request : servicecatalog _ 20210901 _ models. terminateprovisionedproductrequest, ) - > servicecatalog _ 20210901 _ models. terminateprovisionedproductresponse : runtime = util _ models. runtimeoptions ( ) return self. terminate _ provisioned _ product _ with _ options ( re... | [
-1.4560582637786865,
-0.5142859816551208,
0.3554328680038452,
0.889731228351593,
0.4006270468235016,
0.7623353600502014,
-0.44661885499954224,
-1.2619950771331787,
0.8034480214118958,
-0.3324325382709503,
-0.3609987497329712,
0.37972545623779297,
-0.5499435663223267,
0.006823629606515169,
... |
def fetch _ file ( filehash, url ) : # make sure cache exists cache _ dir = os. path. expanduser ( os. path. join ('~ ', '. xpkg ','cache') ) if not os. path. exists ( cache _ dir ) : os. makedirs ( cache _ dir ) # get the path where the file will be placed in our cache cache _ path = os. path. join ( cache _ dir, file... | [
0.9081674218177795,
-0.09009313583374023,
0.8413448929786682,
0.45947593450546265,
0.03551751375198364,
0.30618736147880554,
-0.3167642652988434,
0.3350396752357483,
-0.20101355016231537,
0.2852439284324646,
0.46913453936576843,
-0.5001274943351746,
-0.26984289288520813,
0.4821668267250061... |
def returnchecker ( self ) : return self. checkers [ 0 ] | [
0.09208184480667114,
-1.1479666233062744,
0.6005432605743408,
0.39248228073120117,
0.1325981318950653,
0.7333258390426636,
0.24378958344459534,
0.3452344536781311,
-0.31305018067359924,
-0.8396878242492676,
1.1474707126617432,
0.17824918031692505,
-1.6542994976043701,
0.4056127071380615,
... |
def _ offset _ to _ gcoord ( read, gcoord ) : if read. is _ reverse : return next ( ( len ( read. positions ) - idx - 1 for ( idx, pos ) in enumerate ( read. positions ) if pos = = gcoord ), none ) else : return next ( ( idx for ( idx, pos ) in enumerate ( read. positions ) if pos = = gcoord ), none ) | [
0.07636036723852158,
-0.3031546175479889,
0.6832050085067749,
-1.6801186800003052,
-1.0159000158309937,
0.10967665910720825,
-0.2546145021915436,
-0.7746955752372742,
-0.42385753989219666,
0.715933084487915,
0.4122592508792877,
0.7772725224494934,
-0.54228276014328,
-1.059753656387329,
0... |
def register _ component ( self, component _ name, component _ instance, mw _ data ) : # import the configuration of the poster from an extra module function = self. _ add _ method ( mw _ data, component _ instance ) | [
-0.1923413723707199,
0.2208619862794876,
0.407736212015152,
-0.7796239256858826,
0.3723699748516083,
0.27427423000335693,
-0.9267058372497559,
1.351180076599121,
0.19308726489543915,
-0.2152700424194336,
-0.610601007938385,
0.6720102429389954,
-0.5874125361442566,
0.6274279356002808,
0.6... |
def predict ( self, data : any, features _ names : optional [ sequence [ str ] ] = none, report : bool = false ) - > numpydataset : dataset = self. reader. read ( data, features _ names, add _ array _ attrs = report ) pred = self. levels [ 0 ] [ 0 ]. predict ( dataset, report = report ) return cast ( numpydataset, pred... | [
-0.10161101818084717,
-0.39497312903404236,
0.28012004494667053,
-0.5336170196533203,
-0.15582312643527985,
-0.3472956717014313,
-0.5601903200149536,
0.3503279387950897,
-0.26586905121803284,
-1.1416882276535034,
0.5714452862739563,
0.595085859298706,
-0.4166567325592041,
0.121424674987792... |
def get ( self, index ) : self. _ check _ index ( index ) return self. array [ index ]. data | [
-0.6104379296302795,
0.284894198179245,
0.21824587881565094,
-0.2901441156864166,
0.09622745960950851,
0.26009228825569153,
-0.7472600340843201,
-1.8648960590362549,
0.5370641946792603,
-0.4872862696647644,
-0.3234434723854065,
1.607017993927002,
-0.16729244589805603,
-0.8456271886825562,
... |
def _ _ len _ _ ( self ) : return len ( self. memory ) | [
0.4319217801094055,
-0.6357346177101135,
0.2850884795188904,
-1.5621176958084106,
0.24379050731658936,
0.24310576915740967,
0.45554307103157043,
0.5888379812240601,
0.974285364151001,
-0.6652646660804749,
-0.9260225892066956,
0.4416658282279968,
0.2269657403230667,
-0.014736018143594265,
... |
def update ( self, delta _ time ) : # move the player with the physics engine self. physics _ engine. update ( ) # update animations self. scene. update _ animation ( delta _ time, [ layer _ name _ coins, layer _ name _ background ] ) # update walls, used with moving platforms self. scene. update ( [ layer _ name _ mov... | [
0.01008184440433979,
-0.2905378043651581,
0.9434484839439392,
0.07943204045295715,
0.3092506527900696,
-0.29441502690315247,
0.2820276618003845,
-0.5360960364341736,
-0.508337676525116,
0.9388619065284729,
-0.3499981164932251,
-0.22941553592681885,
-0.294135719537735,
0.6589446663856506,
... |
def patches2array _ overlap ( patches, img _ size, patch _ size = ( 64, 64 ), step _ size = 64, subpatch _ size = ( 32, 32 ) ) : print ('patches2array _ overlap : img _ size : { } '. format ( img _ size ) ) patches _ in _ row = ( img _ size [ 1 ] - patch _ size [ 1 ] ) / / step _ size # + 1 patches _ in _ col = ( img _... | [
-0.3403874933719635,
-0.8105510473251343,
1.207409143447876,
0.15730470418930054,
-0.332116961479187,
0.627088725566864,
1.1560640335083008,
-0.1685493290424347,
-0.13911303877830505,
0.008215564303100109,
-0.25321727991104126,
0.5455304384231567,
0.4813874661922455,
0.32681238651275635,
... |
def get _ secrets ( directory ='/ var / run / secrets /') : secrets = { } if not os. path. exists ( directory ) : return secrets for filename, secret in load _ secrets _ from _ dir ( directory ) : secrets [ filename ] = secret return secrets | [
-0.5719270706176758,
0.4028911292552948,
0.45644721388816833,
0.5925023555755615,
-0.07818852365016937,
-0.5659109354019165,
0.11452575773000717,
-0.7822271585464478,
-0.45449790358543396,
0.6700887084007263,
-1.298360824584961,
0.35632261633872986,
0.500593364238739,
1.1246514320373535,
... |
def cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilteriul2diul2 _ cast ( * args ) | [
0.04338500276207924,
-0.8518209457397461,
0.4287475347518921,
-0.7322799563407898,
-0.7916485667228699,
1.0387046337127686,
0.4149099886417389,
0.35714542865753174,
-0.014866545796394348,
-0.14289715886116028,
-0.28964704275131226,
0.8323864936828613,
0.59083491563797,
-0.3768615126609802,... |
def swarmspawner _ configured _ app ( app, named _ servers ) : with mock. patch. dict ( app. tornado _ settings, { " spawner _ class " : swarmspawner } ), mock. patch. dict ( app. config. swarmspawner, { " network _ name " : " bridge " } ) : yield app | [
-0.4028985798358917,
-0.4112876355648041,
0.4194847643375397,
0.30893418192863464,
-0.05241687223315239,
0.6160279512405396,
0.5506837964057922,
-0.6140563488006592,
1.4558731317520142,
0.48433491587638855,
-0.6401770710945129,
-0.8175758719444275,
0.5435667634010315,
0.7601490020751953,
... |
def trim _ to _ count ( self, n ) : self. x = self. x [ - n : ] self. y = self. y [ - n : ] self. recompute _ bbox ( ) | [
-0.1702091544866562,
-0.4808600842952728,
0.28582581877708435,
-0.720513641834259,
1.246132254600525,
0.2528657019138336,
0.15981823205947876,
-0.5274451971054077,
-0.09890373796224594,
-0.4807026982307434,
-0.5696963667869568,
0.20482730865478516,
0.17686490714550018,
-0.46201199293136597... |
def addall ( self, vectors ) : for i in range ( len ( vectors ) ) : self. set. append ( vectors [ i ] ) | [
-0.44127094745635986,
0.12435711920261383,
0.2920556962490082,
0.14694884419441223,
0.48751580715179443,
1.2259926795959473,
-0.8334377408027649,
-0.40128809213638306,
0.7002902030944824,
-0.5619248151779175,
0.23599138855934143,
0.03673599660396576,
-0.6090720891952515,
0.9952713251113892... |
def prepare _ acg ( dts, acg, xact, xact _ info, ksp, msg ) : self. pending [ xact. id ] = msg acg. handle. prepare _ complete _ ok ( xact _ info. handle ) | [
0.3904828131198883,
-0.38109979033470154,
0.2509959936141968,
-1.2195922136306763,
-0.269206166267395,
-0.6345335245132446,
-0.20792429149150848,
-0.09478809684515,
0.186399906873703,
0.3401986062526703,
-0.055923741310834885,
0.3147526979446411,
0.6039779186248779,
-0.08307050913572311,
... |
def test _ atomic _ id _ pattern _ 4 _ nistxml _ sv _ iv _ atomic _ id _ pattern _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - pattern - 5. xsd ", instance = " nistdata / atomic / id / schema + instance... | [
0.18986056745052338,
-0.5088695287704468,
0.32691773772239685,
0.300475150346756,
-0.35745319724082947,
-0.10781213641166687,
0.5792592167854309,
-0.6319811344146729,
-0.0047472938895225525,
0.9409881234169006,
-0.4790957272052765,
0.14223875105381012,
-0.47553035616874695,
0.0233511868864... |
def update _ body ( self, body : dict [ any, any ] ) - > none : body [ " data " ] [ " password " ] = self. _ password | [
-1.655081868171692,
-0.5857840776443481,
0.5000404119491577,
-0.5352810025215149,
0.6005870699882507,
0.3818971514701843,
-1.2825595140457153,
-0.013185549527406693,
0.7017794847488403,
0.7270361185073853,
-1.5995194911956787,
0.6878149509429932,
-0.2818666994571686,
0.32375529408454895,
... |
def handle _ get ( self ) : return self. get _ success _ response ( ) | [
-0.7635356187820435,
-0.8824467658996582,
0.49172189831733704,
0.17256242036819458,
0.4690999984741211,
-0.5208542346954346,
-0.7606080174446106,
-0.2652636766433716,
-0.22293435037136078,
-1.1827845573425293,
-0.38057225942611694,
-0.2151615172624588,
-0.20204122364521027,
-0.775151789188... |
def _ _ init _ _ ( self, dist _ func, epsilon, min _ neighbors ) : self. dist _ func = dist _ func self. epsilon = epsilon self. min _ neighbors = min _ neighbors | [
0.6714900732040405,
-0.3253202438354492,
0.38240087032318115,
0.24093158543109894,
0.3927062153816223,
-0.014837044291198254,
-0.037103597074747086,
1.2156747579574585,
-0.3359464406967163,
-0.1608908474445343,
-0.6730787754058838,
0.4137292802333832,
0.7535615563392639,
-0.333320796489715... |
def _ validate ( self, sam _ template ) : if " resources " not in sam _ template or not isinstance ( sam _ template [ " resources " ], dict ) \ or not sam _ template [ " resources " ] : raise invaliddocumentexception ( [ invalidtemplateexception ( "'resources'section is required " ) ] ) samtemplatevalidator. validate (... | [
0.09682444483041763,
-0.33897364139556885,
0.5015577673912048,
-0.5215315222740173,
-0.927994966506958,
0.5541595816612244,
-0.11281366646289825,
0.157662495970726,
0.05743301287293434,
-0.18568158149719238,
0.7051735520362854,
-1.1063979864120483,
0.11763773113489151,
1.0991593599319458,
... |
def search _ triggers ( reddit ) : # for comment in reddit. subreddit ( " u _ eyebleacherbot _ test " ). stream. comments ( skip _ existing = true ) : for comment in reddit. subreddit ( " nottheonion + formuladank + roastme + hololive + atbge + fellowkids + bikinibottomtwitter + bonehurtingjuice + apexlegends + boomerh... | [
0.288543701171875,
0.10893967747688293,
1.0112088918685913,
-0.5314910411834717,
1.1634496450424194,
-0.3557765483856201,
-0.053076956421136856,
-0.4072709083557129,
-0.3196195065975189,
-0.1421116143465042,
-1.0373969078063965,
0.24969710409641266,
-0.8659196496009827,
0.6410094499588013,... |
def _ get _ trr ( network : heteromagnet, states : list, next _ states : list, non _ final _ next _ states _ indices : list, trr _ coef : float ) : if trr _ coef = = 0 : return 0 if not isinstance ( network. relational _ layer, gatmodule ) : raise notimplementederror ( " only gat layer type has attention weights necess... | [
0.10522253811359406,
0.43578359484672546,
0.6638065576553345,
-1.1348729133605957,
0.5329137444496155,
-0.6007495522499084,
1.0303621292114258,
-0.11951600015163422,
-0.04759734123945236,
0.8209370374679565,
0.06887883692979813,
0.40053093433380127,
-0.15715502202510834,
-0.486852616071701... |
def decodeasmarket ( url ) : pattern ='\? qs = (? p < hash > [ 0 - 9a - fa - f ] * )'matches = re. search ( pattern, url ) data = matches. group ('hash') # strip any padding datalen = int ( data [ : 2 ], 16 ) data = data [ 2 : datalen + 2 ] data = binascii. unhexlify ( data ) return data | [
-0.5832569599151611,
-0.5599284768104553,
0.5743619203567505,
-0.5323060750961304,
-0.15596944093704224,
-0.6478093862533569,
-0.6213776469230652,
0.20128385722637177,
0.8263213038444519,
-0.16079023480415344,
-0.7292603850364685,
-0.032147981226444244,
-0.01093025878071785,
-0.72134661674... |
def test _ atomic _ hex _ binary _ max _ length _ 2 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ max _ length _ 3 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - maxlength - 3. xsd ", instance ... | [
0.2763560712337494,
0.389620840549469,
0.4492039978504181,
0.824730396270752,
-0.007001531310379505,
0.880967915058136,
-1.1396000385284424,
0.38413068652153015,
0.5131618976593018,
0.4899026155471802,
-0.5486817359924316,
-0.57291179895401,
-0.124627485871315,
-0.06991343945264816,
0.00... |
def index ( ) : return render _ template ('index. html') | [
0.6503291130065918,
0.4519205093383789,
0.027740590274333954,
-0.027164287865161896,
-0.09195702522993088,
0.21939018368721008,
0.5763280987739563,
1.2399687767028809,
-0.6618441343307495,
0.4215790629386902,
0.14496943354606628,
-0.3240973949432373,
-0.08366081118583679,
-0.64679813385009... |
def pair _ start _ with _ stop ( start _ codon _ array, transcript _ sequence, stop _ codon _ regex ) : stops = [ ] for x in stop _ codon _ regex. finditer ( transcript _ sequence ) : stops. append ( x. start ( ) ) # convert to np. array starts = np. asarray ( start _ codon _ array ) stops = np. asarray ( stops ) filte... | [
-0.7107790112495422,
-1.4649003744125366,
0.5557780265808105,
0.21282829344272614,
-0.16267743706703186,
-0.620423436164856,
0.6375743746757507,
0.8801330327987671,
0.22703507542610168,
0.5590680241584778,
-0.10999530553817749,
0.05405716598033905,
0.4544829726219177,
-0.4325229823589325,
... |
def empty _ param ( setting, param _ name ) : missing _ param ( setting, param _ name ) if setting [ param _ name ] : raise settingempty ( param _ name ) | [
-0.6262465715408325,
0.3649178445339203,
0.3955006003379822,
-0.1314474642276764,
0.056376196444034576,
0.1951199769973755,
-0.5926128029823303,
-0.6270288228988647,
-0.5094254016876221,
1.7981477975845337,
0.023067330941557884,
0.869072437286377,
0.02335084043443203,
0.4286123216152191,
... |
def make _ fgmt ( sess, env, x _ data, epochs = 1, eps = 0. 01, batch _ size = 128 ) : print ('\ nmaking adversarials via fgsm') n _ sample = x _ data. shape [ 0 ] n _ batch = int ( ( n _ sample + batch _ size - 1 ) / batch _ size ) x _ adv = np. empty _ like ( x _ data ) for batch in range ( n _ batch ) : print ('batc... | [
-0.44548922777175903,
0.48341959714889526,
0.6697453856468201,
0.13808287680149078,
-0.5138148069381714,
-0.09381469339132309,
-0.8522586226463318,
-0.8605330586433411,
-0.3451042175292969,
0.08587993681430817,
0.009178821928799152,
0.7519973516464233,
0.920707106590271,
0.3544021248817444... |
async def pre _ run ( self ) : await asyncio. sleep ( 2 ) await self. gps _ socket. connect ( ) await self. connect ( ) | [
-0.6371292471885681,
0.2241838276386261,
0.4060554504394531,
0.27558305859565735,
0.4747542142868042,
0.10642571747303009,
-0.014623863622546196,
0.26473209261894226,
-0.004592160228639841,
-0.403922975063324,
0.40279585123062134,
0.5096516013145447,
-0.21149104833602905,
0.057906039059162... |
def _ do _ consume ( self, channel, method, properties, body ) : self. _ logger. info ('received task : % s ', properties. correlation _ id ) error _ sender = sender. errorsender ( channel, properties ) rabbit _ task = connection _ pb2. rabbittask ( ) try : rabbit _ task. parsefromstring ( body ) except exception as e ... | [
-0.4105832874774933,
-0.10279184579849243,
1.0111960172653198,
0.1216425895690918,
0.30387213826179504,
-0.2417849600315094,
0.37928202748298645,
-0.11158740520477295,
-0.44111350178718567,
0.6773478388786316,
-0.6205265522003174,
0.2653840482234955,
-0.28119081258773804,
0.197918072342872... |
def checksum ( self, path ) : raise notimplementederror | [
-0.4914306104183197,
-0.6680964231491089,
0.5140134692192078,
0.5493960380554199,
0.44749191403388977,
0.6811458468437195,
0.7542605996131897,
0.20989452302455902,
0.5079042911529541,
-0.17471948266029358,
-0.3054670989513397,
-0.05134657397866249,
0.2712421715259552,
0.09746593236923218,
... |
def driver _ temp _ setting ( self ) - > float : return self. _ vehicle _ data. get ( " climate _ state ", { } ). get ( " driver _ temp _ setting " ) | [
-1.0572335720062256,
0.3723902404308319,
0.26884862780570984,
-0.13749152421951294,
0.568312406539917,
-0.5119447708129883,
0.153755784034729,
-0.034377168864011765,
-0.10993789881467819,
0.8286887407302856,
-0.4789521098136902,
-0.6212673783302307,
-0.5062422156333923,
-0.1805538833141327... |
def transform _ y ( y : iterable [ float ], direction : str, curve : str ) - > float : # convert elbows to knees if direction = = " decreasing " : if curve = = " concave " : y = np. flip ( y ) elif curve = = " convex " : y = y. max ( ) - y elif direction = = " increasing " and curve = = " convex " : y = np. flip ( y. m... | [
-0.7541700005531311,
-0.5547537207603455,
0.7733519077301025,
-0.46390604972839355,
0.7110121250152588,
-0.21830810606479645,
-0.6330887079238892,
-0.14754581451416016,
0.2583894431591034,
0.5736904740333557,
-0.23748895525932312,
0.9286250472068787,
0.5622032880783081,
0.4927188456058502,... |
def _ convert _ parameter _ dict ( param _ key _ dict ) : # convert year skey strings into integers and # optionally convert lists into np. arrays year _ param = dict ( ) for pkey, sdict in param _ key _ dict. items ( ) : if not isinstance ( pkey, str ) : msg ='pkey { } in reform is not a string'raise valueerror ( msg.... | [
-0.499136358499527,
-0.008328283205628395,
0.8163765072822571,
-1.1151798963546753,
-1.258215308189392,
0.2089257687330246,
0.005849131848663092,
0.7312442660331726,
0.15432125329971313,
1.6932132244110107,
-0.15967333316802979,
0.6534518599510193,
0.21842995285987854,
0.9731165170669556,
... |
async def _ mocked _ index _ html ( request : web. request ) - > web. response : html = textwrap. dedent ( " " " \ <! doctype html > < html > < body > < h1 > osparc - simcore < / h1 > < p > this is a result of disable _ static _ webserver fixture for product osparc < / p > < / body > < / html > " " " ) return web. resp... | [
-0.37677425146102905,
0.5530282258987427,
0.3192341923713684,
0.1270408183336258,
-0.3402145802974701,
0.3314144015312195,
0.537623405456543,
0.15963208675384521,
0.23117196559906006,
0.5792439579963684,
0.3462226390838623,
0.2412426918745041,
-1.3049505949020386,
-0.3431074321269989,
0.... |
def get _ director ( dataset ) : for i in dataset : if i ['job'] = ='director': return i ['name'] return np. nan | [
-1.1572026014328003,
0.12386896461248398,
0.249378502368927,
0.09468751400709152,
-1.030397891998291,
-0.1851276159286499,
-0.6955752372741699,
-0.22008293867111206,
-0.22176983952522278,
-0.13682803511619568,
0.20992320775985718,
0.935083270072937,
0.8972628712654114,
0.03659858927130699,... |
def largest _ indices ( ary, n ) : flat = ary. flatten ( ) indices = np. argpartition ( flat, - n ) [ - n : ] indices = indices [ np. argsort ( - flat [ indices ] ) ] return np. unravel _ index ( indices, ary. shape ) | [
-1.0344303846359253,
0.06855391710996628,
0.5381299257278442,
0.0204613134264946,
-0.02685195580124855,
-0.8044267892837524,
-0.13328801095485687,
-0.7110019326210022,
0.21667614579200745,
0.9297659397125244,
0.4152706265449524,
-0.21762079000473022,
0.3770145773887634,
-0.2334549725055694... |
def parse _ fasta ( file ) : state = 0 dna _ list = [ ] for line in file : line = line. strip ( ) if state = = 0 : if line [ 0 ] = ='>': add _ new _ dna ( dna _ list, line ) state = 1 elif line = ='' : continue else : raise exception ( ) elif state = = 1 : add _ line _ to _ dna ( dna _ list [ - 1 ], line ) state = 2 el... | [
-0.24080771207809448,
-0.38253018260002136,
0.6925238966941833,
0.6377518773078918,
0.31407633423805237,
-0.07853720337152481,
0.31477856636047363,
0.5252273678779602,
0.16264960169792175,
-0.23105937242507935,
-0.012782024219632149,
0.14983797073364258,
0.07239598035812378,
0.913810670375... |
def parse _ corpus _ set ( self ) : matrix _ set = [ ] for corpus _ name in self. corpus _ name _ list _ : file _ path = self. path _ + corpus _ name logger. info ( " reading from { } ". format ( file _ path ) ) print ( " reading from { } ". format ( file _ path ) ) corpus = midifeaturecorpus ( file _ path, self. note ... | [
0.3597830832004547,
-0.08571995049715042,
0.4183093309402466,
-0.3961406350135803,
0.18608152866363525,
0.019889982417225838,
0.7854285836219788,
0.3697487413883209,
-0.7591461539268494,
-0.3604123592376709,
0.02701444737613201,
-0.04477639123797417,
-0.8340952396392822,
0.2150235027074813... |
def load _ images ( self ) : for file in os. listdir ( directory ) : if file. endswith ( ". jpg " ) or file. endswith ( ". png " ) or file. endswith ( ". jpeg " ) : image _ names. append ( file ) try : for i in image _ names : self. execute ('insert into images ( name ) values (? ) ', [ i ] ) return " good " except sql... | [
-1.225426197052002,
1.1083673238754272,
0.8899664878845215,
0.16018757224082947,
0.3197479844093323,
-0.3469831347465515,
0.05691532790660858,
0.028209803625941277,
-0.39405038952827454,
0.9769197702407837,
0.04428931698203087,
-0.919093668460846,
-0.20742179453372955,
0.6909992098808289,
... |
def chi2polarfunc ( params, nmax, im, nm ) : import sys beta = params [ 0 ] xc = params [ 1 ] yc = params [ 2 ] if beta < 0. : print'warning : beta going negative, setting to 0. 0'beta = 0. print'beta : % f \ txc : ( % f, % f )'% ( beta, xc, yc ) size = im. shape r, th = shapelet. polararray ( [ xc, yc ], size ) bvals ... | [
-0.01311370637267828,
-0.5302442908287048,
0.5198794007301331,
-0.6867942214012146,
0.13171140849590302,
0.1440574675798416,
-0.5332880616188049,
-0.5848318338394165,
-0.49555426836013794,
0.31189635396003723,
-0.6213202476501465,
-0.10631164163351059,
-0.3618212938308716,
-0.1677865684032... |
def testpubmedfieldlinksearch ( self ) : driver = self. driver form = self. form form. enter _ value ('accids ','j : 130344') form. click _ search ( ) # finds the results table and iterates through the table table _ element = self. driver. find _ element ( by. id, " resultstable " ) table = table ( table _ element ) # ... | [
0.3701241910457611,
0.41218408942222595,
0.504425048828125,
0.35439589619636536,
1.0853471755981445,
0.6269239187240601,
0.26555368304252625,
0.06038912758231163,
-0.3425358831882477,
-0.7586788535118103,
0.4161945879459381,
0.19769616425037384,
-1.0799044370651245,
-0.31125596165657043,
... |
def _ fast _ cross ( a, b ) : if has _ c _ ufuncs : return math _ util. cross ( a, b ) cp = np. empty ( np. broadcast ( a, b ). shape ) at = a. t bt = b. t cpt = cp. t cpt [ 0 ] = at [ 1 ] * bt [ 2 ] - at [ 2 ] * bt [ 1 ] cpt [ 1 ] = at [ 2 ] * bt [ 0 ] - at [ 0 ] * bt [ 2 ] cpt [ 2 ] = at [ 0 ] * bt [ 1 ] - at [ 1 ] *... | [
0.7452737092971802,
0.1394541710615158,
0.7950276136398315,
0.12128585577011108,
0.08386003226041794,
-0.7092179656028748,
0.3234148919582367,
-0.1743425726890564,
0.16531838476657867,
0.8195920586585999,
0.31985098123550415,
0.5482582449913025,
-0.13551700115203857,
-1.0105119943618774,
... |
def _ copy _ links ( self, parent : linkeddataframe, reindex : bool = false ) : if reindex : indexer = parent. index. get _ indexer ( self. index ) else : indexer = none link _ names = set ( ) for link _ name, link in parent. _ links. items ( ) : self. _ links [ link _ name ] = link. copy ( indexer ) link _ names. add ... | [
-1.071874976158142,
-0.3742290139198303,
0.4631805419921875,
-0.2481042593717575,
-0.023848768323659897,
0.11198156327009201,
0.1629679948091507,
0.22542162239551544,
-0.08065343648195267,
-0.4068872630596161,
-0.2667738199234009,
0.6098580956459045,
0.14763832092285156,
-0.324775278568267... |
def getname ( self ) : self. send _ getname ( ) return self. recv _ getname ( ) | [
-0.4533752202987671,
-0.20037835836410522,
0.813704252243042,
0.09819842129945755,
-0.7640500068664551,
-0.4401821792125702,
-0.2215578705072403,
-1.1046192646026611,
0.07090441137552261,
0.356577068567276,
-1.0456299781799316,
0.4258171021938324,
-0.5137437582015991,
0.03188246488571167,
... |
def get _ permission _ actions ( self ) : return ['blog _ view ', ('blog _ comment ', ['blog _ view'] ), ('blog _ create ', ['blog _ view'] ), ('blog _ modify _ own ', ['blog _ create'] ), ('blog _ modify _ all ', ['blog _ modify _ own'] ),'blog _ delete ', ('blog _ admin ', ['blog _ modify _ all ','blog _ comment ','b... | [
-0.0022834409028291702,
0.5158882737159729,
0.7083691358566284,
1.320407509803772,
0.6522438526153564,
0.1719728410243988,
1.0208275318145752,
-0.2740228772163391,
0.43271589279174805,
0.11559635400772095,
-0.7808163166046143,
0.46658870577812195,
0.05857530236244202,
0.07370273768901825,
... |
def right ( self ) : self. direction. rotate _ right ( ) | [
0.18826135993003845,
0.7578664422035217,
0.2647595703601837,
0.4213956892490387,
0.576804518699646,
0.25450077652931213,
0.33100461959838867,
-0.3904770314693451,
-0.28859901428222656,
-0.1059507355093956,
-0.18795540928840637,
0.7975766658782959,
-0.1816866546869278,
0.28903594613075256,
... |
def whois _ command ( reliability : str ) - > list [ commandresults ] : args = demisto. args ( ) query = args. get ( " query ", " paloaltonetworks. com " ) is _ recursive = argtoboolean ( args. get ( " recursive ",'false') ) verbose = argtoboolean ( args. get ( " verbose ", " false " ) ) should _ error = argtoboolean (... | [
-0.7796502709388733,
0.042697783559560776,
0.8312979340553284,
-0.17561250925064087,
0.8712505102157593,
0.09386522322893143,
0.17830634117126465,
-0.6136678457260132,
-0.12427614629268646,
0.5673009753227234,
0.2595578134059906,
-0.3668595850467682,
0.09334291517734528,
-0.169255793094635... |
def micromovexy ( self, distance, speed ) : self. logger. debug ( " handling micro move xy with distance { } and speed { } ". format ( distance, speed ) ) # mark location as dirty, since i'm about to issue a move command self. bot _ loc [ " dirty " ] = true self. logger. info ( " bot loc is now marked as dirty " ) # pa... | [
-0.6021286845207214,
-0.2096567004919052,
0.550235390663147,
-0.3230823576450348,
-0.41492897272109985,
-0.010248908773064613,
-0.24686311185359955,
0.021314365789294243,
-0.11582651734352112,
-0.30898505449295044,
-0.8005006313323975,
-0.02856472320854664,
-0.6753837466239929,
-0.03795885... |
def get _ kl ( self, mean _ w, log _ var _ w, prior _ mean _ w, log _ prior _ var _ w ) : mq = mean _ w log _ vq = log _ var _ w mp = prior _ mean _ w log _ vp = log _ prior _ var _ w return 0. 5 * tf. reduce _ sum ( log _ vp - log _ vq + ( tf. square ( mq - mp ) / tf. exp ( log _ vp ) ) + tf. exp ( log _ vq - log _ vp... | [
1.251850962638855,
-0.17792350053787231,
0.46464455127716064,
-0.34574955701828003,
-0.8908584713935852,
-0.10206721723079681,
0.2820577621459961,
0.204900324344635,
0.20209476351737976,
0.8898972868919373,
0.27169185876846313,
0.839120626449585,
-0.2244407832622528,
-0.04893003776669502,
... |
def association _ base ( cls ) - > type ['associable'] : for parent in cls. _ _ bases _ _ : if parent is associable : return cls if issubclass ( parent, associable ) : return parent. association _ base ( ) return cls | [
0.05845876783132553,
-0.5042742490768433,
0.8152078986167908,
1.3172123432159424,
0.7782000303268433,
0.5495462417602539,
0.6988825798034668,
-1.1554231643676758,
-0.24101124703884125,
-0.18480566143989563,
0.5105564594268799,
0.03796074539422989,
-0.21696703135967255,
0.11689884960651398,... |
def lo _ frequency ( self ) : if self. module. device : if self. module. device. is _ qrm _ type : self. _ settings. lo _ frequency = self. module. device. get ( f " out { self. port _ number } _ in { self. port _ number } _ lo _ freq " ) elif self. module. device. is _ qcm _ type : self. _ settings. lo _ frequency = s... | [
0.45458903908729553,
-0.23825161159038544,
0.47689080238342285,
-0.37478119134902954,
0.021272458136081696,
-0.276934951543808,
0.6317048668861389,
-1.2446340322494507,
0.26336365938186646,
-0.5692736506462097,
0.5910816192626953,
0.28755930066108704,
-0.7383293509483337,
-0.01198898442089... |
def test _ call _ logs _ run ( self ) : log _ path = get _ tmp _ filename ( prefix ='rtaxtaxonassignertests _ ', suffix = '. fasta') self. _ paths _ to _ clean _ up. append ( log _ path ) p = rtaxtaxonassigner ( {'reference _ sequences _ fp': self. reference _ seqs _ fp,'id _ to _ taxonomy _ fp': self. id _ to _ taxono... | [
0.18407665193080902,
-1.0224894285202026,
0.8736689686775208,
-0.308017760515213,
-0.19553318619728088,
0.46280282735824585,
0.39041322469711304,
0.1671552062034607,
-0.16551640629768372,
0.35278990864753723,
0.4733864665031433,
-0.012651178054511547,
-0.2154698222875595,
-0.17250797152519... |
def _ _ init _ _ ( self, max _ processes = max _ processes ) : assert isinstance ( max _ processes, int ) # prevent overwrite of previous settings if self. pool is not none : return self. pool = mp. pool ( processes = max _ processes ) self. max _ processes = max _ processes | [
-0.3438824713230133,
0.1631121039390564,
0.4230065941810608,
-0.46673616766929626,
-0.19270086288452148,
-0.2982451617717743,
-0.20484484732151031,
0.10622751712799072,
0.3329237699508667,
-0.3716883361339569,
-0.29294392466545105,
0.2539687752723694,
-0.747471034526825,
0.2636834979057312... |
async def drive _ actuator ( self, val, seat = 0 ) : self. latest _ val = val new _ val = self. middle + ( val * self. current _ delta ) self. pi. set _ servo _ pulsewidth ( self. pin, new _ val ) | [
-0.6099961400032043,
-0.2566908597946167,
0.44264617562294006,
0.05740981176495552,
0.1864950805902481,
0.7773838043212891,
0.28758716583251953,
0.023180536925792694,
0.6165611743927002,
-0.35571956634521484,
0.47382140159606934,
0.8023714423179626,
-0.6173298954963684,
-0.1668179184198379... |
def num _ or _ str ( x ) : if isnumber ( x ) : return x try : return int ( x ) except valueerror : try : return float ( x ) except valueerror : return str ( x ). strip ( ) | [
0.01956442929804325,
0.14190782606601715,
0.46298035979270935,
-0.061289917677640915,
-0.08043442666530609,
0.8330010175704956,
-1.056494116783142,
-0.2850012481212616,
0.7650255560874939,
-0.5386139750480652,
0.644546389579773,
0.132668599486351,
0.2616373896598816,
0.18868787586688995,
... |
def created _ date ( self ) : return self. _ created _ date | [
1.4359660148620605,
-0.18283376097679138,
-0.0847359374165535,
0.8200823664665222,
1.3830915689468384,
1.1363465785980225,
-0.12239737063646317,
-0.10188993811607361,
-0.07796552777290344,
-1.9822298288345337,
-0.3913986086845398,
0.5664184093475342,
0.5388638973236084,
-0.1094458550214767... |
def swap ( state, location1, location2 ) : state [ location1 [ 0 ] ] [ location1 [ 1 ] ], state [ location2 [ 0 ] ] [ location2 [ 1 ] ] = state [ location2 [ 0 ] ] [ location2 [ 1 ] ], \ state [ location1 [ 0 ] ] [ location1 [ 1 ] ] return list ( state. flat ) | [
-1.8841365575790405,
-1.048357367515564,
0.8473044037818909,
-0.4932665526866913,
-0.33484914898872375,
0.11507592350244522,
-0.610292375087738,
1.479811429977417,
0.31989786028862,
0.3786616623401642,
-0.706502377986908,
0.33941909670829773,
0.35065388679504395,
-1.1859992742538452,
-0.... |
def log _ scope ( self, scope : str ) - > generator [ none, none, none ] : self. log _ scope _ push ( scope ) yield self. log _ scope _ pop ( scope ) | [
-0.33213576674461365,
0.3446202874183655,
0.7295499444007874,
-0.8586656451225281,
-0.12764982879161835,
-0.7118048071861267,
-0.8296626806259155,
-0.778693437576294,
0.16768644750118256,
0.7284784317016602,
-0.20698386430740356,
1.0064023733139038,
0.09304068237543106,
0.1154826208949089,... |
def browser _ iface ( ) : return'nothing to see here ' | [
-0.5958513021469116,
-0.4853426516056061,
0.2846038043498993,
0.15441299974918365,
0.3798309862613678,
-0.2897634506225586,
0.5081650614738464,
-1.100036859512329,
0.4250037372112274,
0.033796388655900955,
0.4472222626209259,
-0.010575739666819572,
-0.7776988744735718,
0.05820927768945694,... |
def strip _ attributes ( cube :'iris. cube') - > none : for attr in ['creation _ date ','tracking _ id ','history'] : if attr in cube. attributes : cube. attributes. pop ( attr ) | [
0.07643742859363556,
0.09008489549160004,
0.21522216498851776,
0.2955230176448822,
-0.20912985503673553,
0.8243070244789124,
0.13331273198127747,
0.549171507358551,
-0.7316769361495972,
0.027625884860754013,
-0.32063430547714233,
0.4394451975822449,
-0.25549209117889404,
0.3193549215793609... |
def test _ zhang _ mtseq ( self ) : from cogent3. app. composable import notcompleted opt = dict ( max _ evaluations = 20, limit _ action = " ignore " ) aln = load _ aligned _ seqs ( " data / ensg00000198712. fa ", moltype = " dna " ) natsel = evo _ app. natsel _ zhang ( " cnfgtr ", tip1 = " human ", opt _ args = opt, ... | [
-0.30021947622299194,
-0.3744642436504364,
0.3466055691242218,
-0.3747512698173523,
0.4246828854084015,
0.6151572465896606,
-0.004475530236959457,
-0.5275065302848816,
-0.4759019911289215,
0.5962474942207336,
-0.26707008481025696,
-0.5021335482597351,
0.2766597270965576,
0.256050169467926,... |
def _ _ call _ _ ( self, pipe, log _ file, data _ names, yscales, xlabels, ylabels ) : import matplotlib. pyplot as plt self. plt = plt self. output. set _ output ( filename = log _ file ) self. output ('starting plotter...') self. pipe = pipe self. data _ names = data _ names self. yscales = yscales self. xlabels = xl... | [
0.5865852236747742,
-0.0052531203255057335,
0.58213210105896,
-0.22605201601982117,
-0.3311634361743927,
0.7402521371841431,
0.004171839915215969,
0.22604107856750488,
-1.5983487367630005,
-0.4807971119880676,
0.11075068265199661,
0.8850483894348145,
-0.0536404550075531,
0.0120543669909238... |
def test _ atomic _ qname _ enumeration _ 2 _ nistxml _ sv _ iv _ atomic _ qname _ enumeration _ 3 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - enumeration - 3. xsd ", instance = " nistdata / atomic ... | [
-0.6319028735160828,
-0.6068047285079956,
0.5941318869590759,
0.321880966424942,
-0.3851093649864197,
0.7460781931877136,
-0.4580986797809601,
-0.4358740448951721,
0.7042250037193298,
1.0219147205352783,
-0.12737751007080078,
0.13175563514232635,
0.19887344539165497,
-0.716183602809906,
... |
def stark _ assert _ lt ( exp _ val, actual _ val, code : starkmsg, message : optional [ str ] = none ) : if exp _ val > = actual _ val : eq _ log = f'{ exp _ val } > = { actual _ val }'message = f'{ message } \ n { eq _ log }'if message else eq _ log raise starkexception ( code, message ) | [
0.707712709903717,
-0.753352701663971,
0.6141165494918823,
0.21319560706615448,
0.38733023405075073,
0.7153593301773071,
-0.43148964643478394,
-0.23035584390163422,
-0.49390435218811035,
-0.385094553232193,
0.5351722836494446,
0.8053598403930664,
0.041922662407159805,
1.225078821182251,
... |
def addpoints ( self, points ) : self. points = points | [
-0.019531946629285812,
0.3481990396976471,
0.1939801275730133,
0.21410700678825378,
1.4053677320480347,
1.423384428024292,
-0.6144915819168091,
1.1554157733917236,
0.8837582468986511,
-0.17573340237140656,
-0.3120151162147522,
0.19737376272678375,
-0.37073761224746704,
0.741113543510437,
... |
def update _ data ( self, element _ id, data ) : return self. _ request ('put ','/ elements / { } / data '. format ( element _ id ), body = {'data': data } ) | [
-1.4418987035751343,
-0.1681511402130127,
0.16284698247909546,
0.10193299502134323,
-0.23904788494110107,
0.9285721182823181,
-1.2149624824523926,
0.0054410966113209724,
0.8745473027229309,
0.17889079451560974,
-0.8900712728500366,
1.1754132509231567,
-1.2048933506011963,
0.070684917271137... |
def departments ( ) : departments = department. query. order _ by ( department. id ). all ( ) return render _ template ( " departments. html ", user = current _ user, departments = departments ) | [
0.3082196116447449,
0.22780337929725647,
0.36156165599823,
0.08987338095903397,
0.02907612733542919,
0.43082696199417114,
-0.3715372085571289,
0.25530198216438293,
0.2362009435892105,
-0.4796242415904999,
0.8303965926170349,
-0.41030949354171753,
0.8709754943847656,
0.9516690969467163,
-... |
def midpoint ( pta, ptb ) : return ( ( pta [ 0 ] + ptb [ 0 ] ) * 0. 5, ( pta [ 1 ] + ptb [ 1 ] ) * 0. 5 ) | [
0.26697105169296265,
-0.799302875995636,
0.5298164486885071,
-0.3042469620704651,
0.3435235619544983,
0.0020475387573242188,
-0.46173548698425293,
-0.5874639749526978,
-0.14678575098514557,
1.154036045074463,
0.6389394402503967,
0.05680349841713905,
-1.242100477218628,
-0.15077194571495056... |
def get _ message ( self ) : messages = { 0 : " not a single word! how very worldly and refined. ", 5 : " the odd self - mention in there, but we can let it pass. ", 10 : " not great, but at least you'll get a word in edgeways sometimes. ", 20 : " might have a bit of trouble getting their head through the door from tim... | [
-0.34239110350608826,
0.1114424392580986,
0.5502346158027649,
-0.23242133855819702,
-0.16013166308403015,
-0.1474463790655136,
0.2870143949985504,
-1.1461888551712036,
-0.3385329246520996,
0.30746036767959595,
0.17571930587291718,
0.39573320746421814,
-1.0575225353240967,
0.601212918758392... |
def setzeroes ( self, matrix : list [ list [ int ] ] ) - > none : if not matrix or not matrix [ 0 ] : return m = len ( matrix ) n = len ( matrix [ 0 ] ) zeros = [ ] for row in range ( m ) : for col in range ( n ) : if matrix [ row ] [ col ] = = 0 : zeros. append ( ( row, col ) ) for r, c in zeros : for cl in range ( n ... | [
-0.631782591342926,
0.3966595530509949,
0.565782904624939,
-0.09261320531368256,
0.37808549404144287,
-0.07942516356706619,
0.7063665986061096,
0.36381471157073975,
0.17141440510749817,
0.45274871587753296,
-0.2346223145723343,
-0.18911564350128174,
-0.31513282656669617,
1.564266324043274,... |
def read _ data ( datasets _ dir = ". / data ", frac = 0. 1 ) : print ( "... read data " ) data _ file = os. path. join ( datasets _ dir,'data _ 2. pkl. gzip') f = gzip. open ( data _ file,'rb') data = pickle. load ( f ) # get images as features and actions as targets x = np. array ( data [ " state " ] ) y = np. array ... | [
-0.21053533256053925,
-0.23557022213935852,
0.6678097248077393,
-0.21252357959747314,
0.1552426666021347,
-0.3849751353263855,
0.1242506355047226,
0.011510482057929039,
-0.01766480691730976,
-0.1386788785457611,
0.20476222038269043,
0.16799774765968323,
0.623991847038269,
-1.03161990642547... |
def reduce _ prod ( input _ tensor, axis = none, keepdims = false, name = none ) : keepdims = false if keepdims is none else bool ( keepdims ) return _ may _ reduce _ to _ scalar ( keepdims, axis, gen _ math _ ops. prod ( input _ tensor, _ reductiondims ( input _ tensor, axis ), keepdims, name = name ) ) | [
0.20737871527671814,
0.7613372802734375,
0.9482662677764893,
1.0615723133087158,
-0.8899720907211304,
0.677092969417572,
0.5924088954925537,
-0.4726625084877014,
0.3251864016056061,
0.1590944230556488,
0.014087023213505745,
0.6231154799461365,
0.15712542831897736,
-0.6998120546340942,
0.... |
def check _ bounds ( self, args, lowerlimit, upperlimit ) : penalty = 0 bound _ hit = false for i in range ( 0, len ( args ) ) : if args [ i ] < lowerlimit [ i ] or args [ i ] > upperlimit [ i ] : penalty = 10 * * 15 bound _ hit = true return penalty, bound _ hit | [
-0.05926280468702316,
0.1054772287607193,
0.5500509738922119,
-0.33493146300315857,
0.6816832423210144,
0.24912616610527039,
-0.10829120129346848,
-0.5053707957267761,
-0.8779470920562744,
0.5808680653572083,
0.583926260471344,
0.4749990999698639,
-1.338667392730713,
0.3106147050857544,
... |
def create _ schedule _ pattern ( self, pattern _ dict ) : if'freq _ type'not in pattern _ dict : raise sdkexception ('schedules ','102 ', " frequency type is required to create pattern " ) try : getattr ( self,'_'+ pattern _ dict ['freq _ type']. lower ( ) ) ( pattern _ dict ) return self. _ pattern except attributeer... | [
-0.6594802737236023,
0.4682994484901428,
0.5126408338546753,
-0.22597117722034454,
-0.18338140845298767,
0.6016444563865662,
0.12025187909603119,
-0.12240137904882431,
0.6610480546951294,
0.4695582091808319,
0.6120709776878357,
-0.24745036661624908,
-0.11353853344917297,
-0.146900206804275... |
def format _ qs ( q ) : kw = { } for k, v in q. items ( ) : if k. endswith ('_ _ in') and isinstance ( v, basestring ) : v = v. split ( ',') kw [ str ( k ) ] = v return kw | [
-0.6399228572845459,
-1.095388412475586,
0.33954381942749023,
-1.3193259239196777,
-1.2113579511642456,
-0.5181837677955627,
-1.2881866693496704,
-0.9116308689117432,
0.26567044854164124,
0.7422507405281067,
0.09713590145111084,
0.40869569778442383,
-0.2112656682729721,
0.47155505418777466... |
def get _ equation ( self ) : coefficients = self. get _ coefficients ( ) labels = self. get _ labels ( ) nonzeros = np. nonzero ( coefficients ) [ 0 ] term _ list = [ " ( { : 3. 3f } * { } ) ". format ( coefficients [ i ], labels [ i ] ) for i in nonzeros ] term _ list = [ " ( { : f } * { } ) ". format ( coefficients ... | [
-0.21084533631801605,
-0.9195353984832764,
0.5300999879837036,
-0.5290066003799438,
0.5322668552398682,
-0.5417657494544983,
-0.40147241950035095,
-0.08504750579595566,
-0.12208078801631927,
0.7142066359519958,
0.6038024425506592,
0.2603919506072998,
0.5284528136253357,
-0.1545704007148742... |
def create _ address ( * * kwargs ) : defaults = {'zip _ code':'654321 ','country':'россия ','city':'нижнии новгород ','district':'нижегородскии раион ','street':'родионова'} defaults. update ( kwargs ) obj, create = address. objects. get _ or _ create ( * * defaults ) return obj | [
-0.22925806045532227,
-0.561137855052948,
0.6521607637405396,
-0.06171170622110367,
0.7266194224357605,
0.5516780018806458,
-0.6056557297706604,
-0.20674028992652893,
0.553925633430481,
0.2470775842666626,
-0.8105751872062683,
0.01942773349583149,
-0.8066005706787109,
0.1788274347782135,
... |
def terminal ( func ) : func. terminal = true return func | [
-0.2654353082180023,
-0.8285031318664551,
0.4822136163711548,
-0.6808468103408813,
-0.10158911347389221,
0.14680886268615723,
0.07751111686229706,
0.92043536901474,
-0.04267212375998497,
0.021524399518966675,
-0.02395879104733467,
0.9610597491264343,
0.9001666903495789,
-0.8068390488624573... |
def run _ exit _ handlers ( self ) : while self. _ zombies : pid, proc = self. _ zombies. popitem ( ) if proc. exit _ handler is not none and callable ( proc. exit _ handler ) : proc. exit _ handler ( proc ) | [
-0.7180306911468506,
-0.8098656535148621,
0.41351839900016785,
0.8283565640449524,
0.2451646625995636,
0.029205648228526115,
0.57114577293396,
0.07027539610862732,
-0.6315773725509644,
0.31171029806137085,
-0.8101999163627625,
-0.01815129444003105,
-0.5437147617340088,
0.7565913200378418,
... |
def test _ atomic _ hex _ binary _ length _ 2 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ length _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - length - 3. xsd ", instance = " nistdata / ... | [
0.24238601326942444,
-0.20374418795108795,
0.41849449276924133,
0.3969784677028656,
0.0008206084021367133,
0.6299101114273071,
-0.7894522547721863,
0.35270455479621887,
-0.08035425841808319,
0.5506468415260315,
-0.6911230087280273,
-0.19323809444904327,
0.11065233498811722,
0.3827438354492... |
def set _ all ( self, pwm _ period _ ms, duty _ cycle _ ms, enable ) : self. pwm _ period _ ms = self. pwm _ lib. set _ period ( int ( pwm _ period _ ms ) ) self. duty _ cycle _ ms = self. pwm _ lib. set _ duty ( int ( duty _ cycle _ ms ) ) self. enable = self. pwm _ lib. set _ enable ( int ( enable = = true ) | [
0.2931124269962311,
-0.4581628441810608,
0.7127141952514648,
0.4358401298522949,
0.09045366197824478,
0.8527606129646301,
-0.18661032617092133,
0.4531496465206146,
0.08708585053682327,
-0.15846455097198486,
-0.24234138429164886,
0.6713995933532715,
-0.8000708818435669,
1.2317177057266235,
... |
def _ col _ prefix ( self, group ) : return " { prefix } _ { group } _ ". format ( prefix = self. prefix, group = group ) | [
-0.6753261089324951,
-0.48578307032585144,
0.5468478798866272,
-1.177369236946106,
-0.5368969440460205,
-0.8137680888175964,
-0.6110690236091614,
-0.8931375741958618,
-0.5105768442153931,
0.5995413064956665,
0.3940819203853607,
0.565215528011322,
1.0270142555236816,
-0.1277715265750885,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.