text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def remove _ system ( self, system _ type ) : for s in self. _ systems : if type ( s ) is system _ type : s. sys _ man = none self. _ systems. remove ( s ) return | [
-1.2605336904525757,
-0.21255262196063995,
0.3242819011211395,
-0.09156344085931778,
0.04375140368938446,
-0.08146369457244873,
0.002664826810359955,
-0.44169583916664124,
0.8034752011299133,
-0.42802074551582336,
-0.782202422618866,
0.0025806725025177,
-0.7649323344230652,
1.6445287466049... |
def dump _ to _ csv ( filename, header, dump _ list ) : import csv with open ( filename,'w') as csvfile : fieldnames = header writer = csv. dictwriter ( csvfile, fieldnames = fieldnames ) writer. writeheader ( ) for line in dump _ list : writer. writerow ( line ) | [
-0.42179664969444275,
0.09786614030599594,
0.34528619050979614,
0.6913416981697083,
0.5019941926002502,
0.2560218870639801,
-0.3213307857513428,
1.0263196229934692,
-0.42557525634765625,
-0.42302507162094116,
-1.240897536277771,
-0.2715446949005127,
0.8885404467582703,
0.4051833748817444,
... |
def _ _ deepcopy _ _ ( self, memo ) : return conditional ( self. conditiontext ( ) ) | [
0.8042240142822266,
-0.6934868693351746,
0.16642935574054718,
0.6266412138938904,
-1.7558454275131226,
0.5556920170783997,
0.40698251128196716,
-0.14268960058689117,
0.36377742886543274,
-0.028444716706871986,
0.21391697227954865,
0.33226779103279114,
-0.744537889957428,
-0.691485226154327... |
def _ is _ thunder _ borg _ board ( cls, bus _ num, address, tb ) : tb. _ log. debug ( " loading thunderborg on bus number % d, address 0x % 02x ", cls. default _ bus _ num, address ) found _ chip = false if cls. _ init _ bus ( bus _ num, address, tb ) : try : recv = tb. _ read ( cls. command _ get _ id, cls. _ i2c _ r... | [
0.1286107301712036,
0.38690146803855896,
0.7320144772529602,
0.4511028528213501,
-0.3195778727531433,
-0.10118291527032852,
0.7433760166168213,
-0.18022018671035767,
0.0718114972114563,
-0.5628026723861694,
0.5336835980415344,
0.16642482578754425,
-0.8896991014480591,
-0.09865982830524445,... |
def extract _ command ( self, prefixes = none ) : if self. action is not messagetype. privmsg : return # we don't care about formatting in looking for commands. content = remove _ formatting ( self. content ) # see if any of the specified command prefixes match. if prefixes : for prefix in prefixes : if content. lower ... | [
-0.2747098207473755,
0.07505796104669571,
0.5380066633224487,
-0.13866658508777618,
0.35659781098365784,
-1.414662480354309,
-0.28197619318962097,
-0.20371446013450623,
0.5768445730209351,
-0.011553668417036533,
0.12466152012348175,
0.8381429314613342,
-0.7813453674316406,
0.10739371180534... |
def calc _ rent ( self, start _ date, end _ date ) : price = {'daily _ price': self. product. daily _ price,'weekly _ price': self. product. weekly _ price,'monthly _ price': self. product. monthly _ price,'hourly _ price': self. product. hourly _ price } rent _ period = self. effective _ rent _ period ( start _ date, ... | [
-0.39004141092300415,
-0.06724443286657333,
0.8912459015846252,
-1.098315954208374,
-0.1578686237335205,
0.13624495267868042,
-0.7256414294242859,
-0.7564888000488281,
-1.128446340560913,
0.9268190264701843,
-0.8472285866737366,
0.7601056694984436,
0.41018345952033997,
-0.5255155563354492,... |
def post ( self, request, session _ id ) : print ('- - - - - region _ post - - - - - - -') print ( request. post ) if'redirect _ url'in request. post : redirect _ url = request. post ['redirect _ url'] language _ id = request. post ['language _ id'] else : raise valueerror ('incorrect request, redirect _ url not set') ... | [
-0.44607484340667725,
-0.405438095331192,
0.6198566555976868,
-0.15451593697071075,
0.29704412817955017,
0.12138629704713821,
0.4076749086380005,
-0.5584394335746765,
1.0102649927139282,
-0.03887132182717323,
-0.22285349667072296,
0.7233700752258301,
0.2029721438884735,
0.4305049777030945,... |
def get _ ind _ under _ point ( self, event ) : ind = np. argmin ( np. abs ( self. plotx - event. xdata ) ) return ind | [
0.411653995513916,
-0.3390617072582245,
0.41062402725219727,
0.037330158054828644,
-1.3643347024917603,
1.4135242700576782,
0.5780733227729797,
-0.49305781722068787,
-0.2998655140399933,
-0.704897940158844,
0.32382863759994507,
0.6551095843315125,
-0.16526822745800018,
-0.914124608039856,
... |
def _ _ init _ _ ( self, maze _ number = 1 ) : # set up gui portion of the code super ( mazegame, self ). _ _ init _ _ ( ) self. module _ path = os. path. dirname ( _ _ file _ _ ) ui _ rel _ path = '.. / maze _ gui. ui'abs _ ui _ path = os. path. join ( self. module _ path, ui _ rel _ path ) uic. loadui ( abs _ ui _ pa... | [
-0.7188808917999268,
0.10940854996442795,
0.8292021751403809,
0.8125045895576477,
-0.38652583956718445,
0.34463179111480713,
1.0495365858078003,
0.4391493499279022,
-0.41209501028060913,
0.09251414239406586,
-0.5298767685890198,
-0.8697483539581299,
-0.13645635545253754,
1.3378957509994507... |
def download _ file ( self, file _ path, range = none ) : headers = { " range " : range } if range else none url = " { 0 } / file / bot { 1 } / { 2 } ". format ( api _ url, self. api _ token, file _ path ) return self. session. get ( url, headers = headers ) | [
-0.3414439558982849,
-0.37655556201934814,
0.5837826132774353,
-0.03835579752922058,
0.35064104199409485,
-0.0874866470694542,
-0.7016618251800537,
-0.3257486820220947,
-0.9896479249000549,
-0.577993631362915,
-0.1600303053855896,
0.024731647223234177,
-0.8443823456764221,
-0.5879333615303... |
def get _ request _ by _ req _ id ( self, req _ id : int ) - > request : request = none data = self. get _ data ('''select * from request where req _ id = % s'' ', ( req _ id, ) ) if data is not none : request = data [ 0 ] request = request ( request [ 0 ], request [ 1 ], request [ 2 ], request [ 3 ], request [ 4 ], re... | [
-0.6075982451438904,
-0.20390021800994873,
0.1957978904247284,
0.3520210385322571,
1.2910648584365845,
-1.0812433958053589,
-0.8110438585281372,
-0.8904378414154053,
0.22107701003551483,
-0.2040204107761383,
0.42562249302864075,
0.7565210461616516,
-0.09742811322212219,
0.48396098613739014... |
def testjoinexception ( self ) : def sub2 ( ) : raise exception ( " test _ exc " ) def sub1 ( ) : sub2 ( ) def child ( ) : sub1 ( ) ch = tasklet. new ( child ) ( ) try : tasklet. join ( ch ) self. fail ('expected join error') except joinerror, e : self. assertequals ( ch, e. tasklet ) self. asserttrue ( isinstance ( e.... | [
0.6828639507293701,
0.28389427065849304,
0.44640833139419556,
0.6117337346076965,
0.04887520894408226,
1.04302978515625,
-0.1479617953300476,
0.1394161731004715,
0.09796188771724701,
-0.5805656313896179,
-0.24920840561389923,
-0.5039237141609192,
-0.892013430595398,
-0.1609182059764862,
... |
def process _ log _ data ( spark, input _ data, output _ data ) : # get filepath to log data file log _ data = input _ data + " log _ data / * / * / *. json " # read log data file df = spark. read. json ( log _ data ) # filter by actions for song plays df = df. filter ( col ('page') = ='nextsong') # cast the original t... | [
0.28459054231643677,
-0.23493553698062897,
1.091225266456604,
0.07326272875070572,
-0.22325104475021362,
0.21109504997730255,
0.5476414561271667,
0.3712981939315796,
-0.49437353014945984,
0.5062522888183594,
0.22196358442306519,
0.3228714168071747,
0.7559599876403809,
0.38003647327423096,
... |
def update _ static _ group _ members ( self, uuid, members, name = none, type = none ) : group = self. get _ groups ( uuid ) [ 0 ] name = name if name else group ['displayname'] dto = json. dumps ( {'displayname': name,'grouptype': group ['grouptype'],'memberuuidlist': members } ) return self. request ('groups ', meth... | [
-2.089083433151245,
-0.5142835378646851,
0.26044711470603943,
0.30067652463912964,
-0.4692394435405731,
-0.2836557626724243,
-0.6014997959136963,
0.02227531000971794,
-0.5506466031074524,
1.220255970954895,
-0.8665205240249634,
0.8485379219055176,
-1.2634516954421997,
0.165325328707695,
... |
def get _ consistent _ normals ( pts, angle = 0. 0, pivot _ axis = ( 1, 0, 0 ), return _ binormals = false, repeat _ last = true ) : tangents = norm ( pts [ 1 : ] - pts [ : - 1 ] ) rot _ axis = tangents [ 0 ] n0 = get _ rotated _ vec ( rot _ axis, angle, norm ( pivot _ axis ) ) norm _ list = [ n0 ] " " " for t in tange... | [
-0.1559719443321228,
-0.08357631415128708,
0.7073706388473511,
0.36414846777915955,
-0.5958564877510071,
0.01581408455967903,
0.3615863025188446,
-0.07738212496042252,
-0.346430242061615,
0.9122873544692993,
-0.39557692408561707,
-0.3798893690109253,
-0.02909773588180542,
-0.14269869029521... |
def ge _ cloud _ response _ json _ to _ object _ dict ( self, response _ json : dict ) - > dict : suite _ data : dict # if only the expectation _ suite _ name is passed, a list will be returned if isinstance ( response _ json [ " data " ], list ) : if len ( response _ json [ " data " ] ) = = 1 : suite _ data = response... | [
-0.8598777055740356,
-0.5464823842048645,
0.669165313243866,
-0.7697567343711853,
-0.09074682742357254,
0.32370564341545105,
-0.15689392387866974,
0.33526667952537537,
0.1433204859495163,
0.9670003056526184,
-0.6994097828865051,
-0.045956604182720184,
0.3710048496723175,
0.4735996723175049... |
def get _ direction ( self, syringe _ num ) : self. _ check _ syringe _ number ( syringe _ num ) direction _ 1 = self. write ( " dir ", 15 ) [ 1 : 7 ]. capitalize ( ) if syringe _ num = = 1 : return direction _ 1 par = self. write ( " par ", 15 ) [ 1 : - 4 ] return direction _ 1 if par = = " on " else self. _ get _ oth... | [
-0.6653260588645935,
-0.0839458703994751,
0.6154458522796631,
0.9255140423774719,
0.31013762950897217,
0.2624163329601288,
1.2501060962677002,
-0.19971533119678497,
0.4802958071231842,
-0.1537097692489624,
-0.07222212105989456,
0.5191294550895691,
-0.7711504101753235,
0.23695465922355652,
... |
def experiment ( ww _ train, rw _ train, ww _ test, rw _ test ) : # print ( " entering experiment " ) # print ( " ww _ train size is ", ww _ train. shape ) # print ( " rw _ train size is ", rw _ train. shape ) # print ( " ww _ test size is ", ww _ test. shape ) # print ( " rw _ test size is ", rw _ test. shape ) # comp... | [
0.18056656420230865,
-0.38226252794265747,
0.8689330816268921,
-0.2279919981956482,
0.5349872708320618,
0.5268612504005432,
0.9061740636825562,
0.5787993669509888,
-0.5043814778327942,
1.034206748008728,
0.004486930090934038,
0.4043898582458496,
0.19278092682361603,
0.7672379016876221,
-... |
def find _ bitfield ( self, name : str ) - > regsbitfield : for bitf in self. _ bitfields : if name = = bitf. name : return bitf raise bitfieldnotfound ( f " the { name } is not found in register { self. name }. " ) | [
0.13032573461532593,
0.22184833884239197,
0.3127308189868927,
-0.5683938264846802,
0.4008043110370636,
0.28250187635421753,
0.640927791595459,
-1.2689257860183716,
-0.297379732131958,
0.24658091366291046,
-0.6548436284065247,
0.6800082921981812,
-1.6458897590637207,
-0.07294966280460358,
... |
def _ _ str _ _ ( self ) : string = ( f " this is { self. name } initialized on { self. timestamp } utc. " ) return string | [
-0.0219163428992033,
-1.9130117893218994,
0.5438669919967651,
-0.8182882070541382,
-0.17991319298744202,
0.5702377557754517,
-0.8710407614707947,
-0.4455212354660034,
0.12609368562698364,
0.2965548634529114,
-0.30121123790740967,
0.41207465529441833,
0.2604512870311737,
-0.1789403110742569... |
def _ prompt ( func, prompt ) : return func ( prompt ) | [
-0.45739173889160156,
-0.263996958732605,
0.10095112025737762,
0.04724479466676712,
-0.23771080374717712,
-0.8673492670059204,
0.30912452936172485,
0.16785314679145813,
0.1327703595161438,
-0.254584938287735,
0.22044840455055237,
0.3836074471473694,
1.1569366455078125,
-1.1887907981872559,... |
def get _ argv ( script = none ) : if script : script = os. path. abspath ( os. path. normpath ( script ) ) argv = [ ] for i in range ( _ get _ unicode _ argc ( ) ) : a = _ get _ unicode _ argv ( i ) if os. path. exists ( a ) : a = os. path. abspath ( os. path. normpath ( a ) ) if a = = script : continue if a. endswith... | [
-0.6015329957008362,
-0.026485715061426163,
0.8609429597854614,
0.8684512376785278,
0.1386691927909851,
-0.1290227174758911,
0.4154815077781677,
-0.11311578005552292,
0.1372404545545578,
0.6084240078926086,
-0.1810336858034134,
1.133914589881897,
-0.17331314086914062,
1.03223717212677,
0... |
def search ( self, config ) : self. iteration = 0 self. config = config while self. iteration < self. maxiterations and self. counter < 500 : self. gastep ( self. config ) self. iteration + = 1 self. counter + = 1 print ( " total iterations : ", self. iteration ) print ( " best solution : ", self. best. getfitness ( ) ... | [
-0.41781309247016907,
0.16170886158943176,
0.3856423795223236,
0.8042289614677429,
0.5055822730064392,
0.3567274510860443,
0.428692102432251,
0.0033984705805778503,
-0.7332456707954407,
-0.18108057975769043,
-0.048263292759656906,
-0.09146719425916672,
-0.6879577040672302,
1.12116706371307... |
async def test _ unknown _ initial _ state ( caplog, v3 _ server ) : async with aiohttp. clientsession ( ) as session : simplisafe = await get _ api ( test _ email, test _ password, session = session, client _ id = test _ client _ id ) await simplisafe. get _ systems ( ) assert any ( " unknown system state " in e. mess... | [
0.3587794899940491,
-0.16925957798957825,
0.3943781554698944,
0.05230218917131424,
1.0575071573257446,
0.7267726063728333,
-0.2509465217590332,
0.06884308904409409,
0.6045796871185303,
-0.6643972992897034,
-0.6912492513656616,
0.3691856265068054,
0.27736857533454895,
0.25031837821006775,
... |
def valid ( self, val ) : _ val = np. asfarray ( val ) valid = np. where ( np. isfinite ( self. lnprob ( _ val ) ), _ val, self. rv. rvs ( size = _ val. shape ) ) return valid | [
0.18649788200855255,
0.3784412443637848,
0.5130357146263123,
0.08119332045316696,
-0.07383955270051956,
0.06378877907991409,
-0.8428795337677002,
-0.4036620855331421,
0.05218898877501488,
0.6116383075714111,
0.6544644236564636,
0.4027392864227295,
-0.8339945673942566,
0.08759170770645142,
... |
def find _ connected _ nodes ( network, inds, flatten = true, logic ='or') : if not isgtriu ( network ) : raise exception ( " this function is not implemented for directed networks " ) edges = np. array ( inds, ndmin = 1 ) if len ( edges ) = = 0 : # short - circuit this function if edges is empty return [ ] am = dict _... | [
-0.6130061745643616,
0.4502130150794983,
0.6890300512313843,
0.0671633705496788,
0.042073000222444534,
-0.40406590700149536,
0.5524879693984985,
-0.07063951343297958,
0.4701302647590637,
0.9602424502372742,
0.49512121081352234,
0.42828384041786194,
-0.11743909120559692,
0.19087255001068115... |
def run _ searchlight ( self, out _ dir, name ='sl _ results ', n _ folds = 10, radius = 5, mask = none, estimator = none, * * kwargs ) : # to do : implement import searchlight here ( so skbold does not # necessarily depend on nilearn # not yet tested # import old version from sklearn. model _ selection import stratifi... | [
-0.571446418762207,
-0.06964791566133499,
0.8209603428840637,
1.2779045104980469,
-0.10666173696517944,
-0.5778371095657349,
0.4769212305545807,
-0.3171043395996094,
0.10794493556022644,
0.06931149959564209,
-0.6095806956291199,
-0.3450899124145508,
-0.4975261390209198,
0.8014829754829407,... |
def is _ git _ based ( self ) : return false | [
0.38230082392692566,
-0.2334461510181427,
0.42875295877456665,
1.0375779867172241,
0.2216111272573471,
1.5655112266540527,
-0.26663240790367126,
-0.35498353838920593,
-0.1503339260816574,
-0.0448853000998497,
0.03740625083446503,
0.02798166126012802,
-1.046714425086975,
0.6212283372879028,... |
def report _ match ( winner, loser, draw = false ) : if not draw : execute _ query ( " " " update players set matches _ played = matches _ played + 1, prev _ opponents = prev _ opponents | | % s where player _ id = % s and tournament _ id = % s " " ", ( winner, loser, tournament _ id ) ) execute _ query ( " update play... | [
0.06013437733054161,
0.49511831998825073,
0.9680761694908142,
-0.38094595074653625,
0.5565046072006226,
0.06443722546100616,
0.38425010442733765,
0.8067774176597595,
-0.42485490441322327,
0.379370778799057,
0.43497568368911743,
-0.6538388729095459,
-0.5929730534553528,
-0.4775432050228119,... |
def _ _ init _ _ ( self, name = none ) : self. _ name = name or'anonymous _ message _ { } '. format ( generate _ guid ( ) ) self. _ file _ descriptor _ name ='schema _ containing _ { } '. format ( self. _ name ) self. _ package ='bonsai. proto'self. _ full _ name ='{ }. { } '. format ( self. _ package, self. _ name ) s... | [
0.19519062340259552,
0.39956772327423096,
0.7701835036277771,
0.30026814341545105,
-0.2638421952724457,
-0.2759110629558563,
0.35389524698257446,
-0.2503994107246399,
-0.32996901869773865,
-0.499565988779068,
-0.5498347282409668,
0.4310768246650696,
-0.5640856623649597,
0.6292878985404968,... |
def run ( cmd ) : return call ( cmd. split ('' ) ) | [
-0.059627581387758255,
0.5528508424758911,
0.40488317608833313,
-0.24466963112354279,
-0.8343542218208313,
0.17220336198806763,
-0.9019046425819397,
-0.20497773587703705,
-0.09965655952692032,
-0.43698620796203613,
-0.31951457262039185,
0.42952948808670044,
-1.1905136108398438,
0.248294070... |
def _ new _ connection ( ) : ldap. set _ option ( ldap. opt _ x _ tls _ require _ cert, ldap. opt _ x _ tls _ never ) ldap. set _ option ( ldap. opt _ referrals, ldap. opt _ off ) try : return ldap. initialize ( ldapserver. _ server _ url ) except ldap. server _ down : return none | [
-0.7325789332389832,
-0.2684154510498047,
0.6296631693840027,
-1.0497198104858398,
-0.5514374375343323,
-0.5913751721382141,
-1.0126469135284424,
-0.5213229656219482,
0.7007090449333191,
0.03979405760765076,
0.16287016868591309,
0.554815948009491,
-0.6300561428070068,
-0.06001460552215576,... |
def _ _ init _ _ ( self ) : self. image = pygame. image. load ( img _ path ). convert ( ) self. coords _ sep = get _ pixel _ color ( img _ path ) self. current _ image = sevenupclass ( img _ path ). get _ image ( 0, 0, 128, 142. 8 ) # 128. 0 # 142. 8 # the bird's position self. x = 0 self. y = 140 self. line _ compteur... | [
-0.9467739462852478,
-0.3381336033344269,
0.6372246146202087,
-0.45984360575675964,
0.4566676914691925,
-0.13147126138210297,
0.5082956552505493,
-0.26178938150405884,
-0.4094855487346649,
0.26520445942878723,
-0.2319030910730362,
-0.1344985067844391,
0.5142036080360413,
0.8096956014633179... |
def compute _ matches ( input _ path : str, descriptors _ type : optional [ str ], pairsfile _ path : str, overwrite _ existing : bool = false ) : logger. info ( f'compute _ matches. loading input : { input _ path }') with get _ all _ tar _ handlers ( input _ path, mode = { kapture. keypoints :'r ', kapture. descriptor... | [
-0.363250732421875,
0.6284193396568298,
0.7399964332580566,
0.4383954703807831,
-0.101422980427742,
0.5432226061820984,
0.44479113817214966,
1.0878289937973022,
-0.2838016152381897,
0.22838327288627625,
0.49262285232543945,
-0.1840934008359909,
0.25166308879852295,
0.39694976806640625,
0... |
def installation _ list ( request ) : if request. method = ='get': # get all requirements in order and installation status if request. user. has _ perm ('customer. customer _ view _ others') : requirements = requirement. objects. filter ( q ( status = " order " ) | q ( status = " installation " ) ). distinct ( ) else :... | [
-0.0136808380484581,
-0.3476403057575226,
0.8999514579772949,
0.5981736779212952,
-0.6416053175926208,
0.15480396151542664,
0.4427182674407959,
0.9565429091453552,
-0.23499959707260132,
0.887528121471405,
0.4043233394622803,
-0.9233738780021667,
0.40372028946876526,
1.2231534719467163,
-... |
def sort _ key ( a ) : return 1000000 * ( 10 - a [ 1 ] [ 0 ] ) + 1000 * ( 100 - a [ 1 ] [ 1 ] ) + 15 - ( a [ 1 ] [ 2 ] ) | [
0.24795307219028473,
0.6296418905258179,
0.421578049659729,
-0.984877347946167,
-0.6059479713439941,
-0.40080344676971436,
0.6309444904327393,
-0.7626716494560242,
0.3510211110115051,
1.0042004585266113,
0.07560905814170837,
0.356852263212204,
0.26055216789245605,
0.10921220481395721,
-0... |
def test _ do _ nothing ( self ) : band = self. band new _ popularity = self. band. popularity + 1000 band. insert ( band ( name = " pythonistas ", popularity = new _ popularity ) ). on _ conflict ( action = " do nothing " ). run _ sync ( ) self. assertlistequal ( band. select ( ). run _ sync ( ), [ { " id " : self. ba... | [
-0.543186366558075,
0.8569890260696411,
0.48926931619644165,
0.364504873752594,
1.6187291145324707,
0.9603897333145142,
-0.29752621054649353,
-0.6842228174209595,
0.6471342444419861,
-0.2923714816570282,
-1.2436678409576416,
0.362250953912735,
-0.5475925207138062,
-0.37383049726486206,
-... |
def _ from _ string ( cls, rule _ string, pool ) : packages _ string = ( s. strip ( ) for s in rule _ string. split ( " | " ) ) package _ literals = [ ] for package _ string in packages _ string : if package _ string. startswith ( " - " ) : positive = false package _ string = package _ string [ 1 : ] else : positive = ... | [
0.3202210068702698,
-0.8485680818557739,
0.5141590237617493,
-0.1245511993765831,
0.3920203149318695,
0.3051028251647949,
-0.42874062061309814,
0.7189174294471741,
-0.1734025478363037,
0.21733586490154266,
0.31334584951400757,
-0.5701892375946045,
-0.32075929641723633,
-0.0798189714550972,... |
def windchill ( temps, wspeed ) : wind _ chill _ temps = [ ] for t in range ( len ( temps ) ) : calculated _ wind _ chill = ( 13. 12 + 0. 6215 * temps [ t ] - 11. 37 * wspeed * 0. 16 + 0. 3965 * temps [ t ] * wspeed * 0. 16 ) wind _ chill _ temps. append ( round ( calculated _ wind _ chill, 2 ) ) return wind _ chill _ ... | [
0.44516026973724365,
-0.6578992009162903,
0.3267965018749237,
0.10574294626712799,
-0.02245865948498249,
0.36775630712509155,
0.10203602910041809,
0.10360646992921829,
-0.9523494243621826,
1.2463178634643555,
-0.41286447644233704,
0.26133647561073303,
-0.353642076253891,
1.1968318223953247... |
def mergemsas ( msa1, msa2 ) : if msa1 is none : # no merging to do. return msa2 if msa2 is none : # no merging to do this way either. return msa1 # make lists for each sequence we are going to build : those in msa1, and # then those in msa2 ( except the duplicate reference ). merged = [ list ( ) for i in xrange ( len ... | [
-0.3197251260280609,
-0.6560313105583191,
1.101112961769104,
-0.23399437963962555,
-0.7955629825592041,
-0.23270532488822937,
0.2963573932647705,
-0.1648513674736023,
0.8391014933586121,
0.29800623655319214,
0.20562654733657837,
1.05300772190094,
-0.09065094590187073,
0.32038024067878723,
... |
def basc _ is _ up ( self, log ) : if self. _ basc _ is _ up is none : self. _ basc _ is _ up = self. basc _ agent. bea _ host. sh _ is _ up ( log ) if not self. _ basc _ is _ up : self. basc _ failed = true return self. _ basc _ is _ up | [
-0.04516252130270004,
-0.1476377546787262,
0.8087811470031738,
0.42513778805732727,
-0.14277592301368713,
-0.18429481983184814,
0.14365370571613312,
-0.13483072817325592,
-0.08715714514255524,
0.3358463644981384,
-0.4848497807979584,
0.7460241913795471,
-0.2893248200416565,
-0.460821837186... |
def _ _ receive _ response ( self ) : # type : ( ) - > tuple if not self. connected : raise exception ( " not connected " ) data = b " " while true : try : newdata = self. sock. recv ( 4096 ) except : return 1, b " " data = data + newdata if re. search ( b " \ r \ n ", newdata ) : break if not self. session _ key _ set... | [
-0.5344476103782654,
-0.22739635407924652,
0.822018563747406,
-0.6187148690223694,
-0.20130516588687897,
-0.8428179025650024,
-0.48552823066711426,
-1.1616238355636597,
0.1849069595336914,
0.5652159452438354,
-0.7552148103713989,
-0.15990746021270752,
-0.9378641247749329,
-0.42455589771270... |
def getregionbbv ( fp, slice _ set ) : # dictionary which contains the number of instructions in each bb. # key is basic block number. # bb _ num _ instr = { } # dictionary which contains the number of times a bb was executed # key is basic block number. # bb _ freq = { } # list of lists of basic block vectors, each in... | [
0.41894635558128357,
-0.31297358870506287,
0.8916815519332886,
0.03962373360991478,
-0.19944798946380615,
-0.47483712434768677,
0.9989838600158691,
-0.0163771640509367,
-0.742993175983429,
0.4748588502407074,
-0.28990015387535095,
0.8888252973556519,
-0.07159660756587982,
0.039648227393627... |
def delete _ players ( ) : execute _ query ( " delete from players where tournament _ id = % s ", ( tournament _ id, ) ) | [
0.17907050251960754,
-0.0849132388830185,
0.3297361433506012,
0.05878394842147827,
1.2242087125778198,
-0.1649021953344345,
-0.5695800185203552,
0.5537993907928467,
-0.17612069845199585,
0.8838179707527161,
0.3340825140476227,
-0.39226508140563965,
-0.8446832895278931,
-0.594216525554657,
... |
def fib2 ( n ) : # returns fibonacci series upto n result = [ ] a, b = 0, 1 while a < n : result. append ( a ) # see below a, b = b, a + b return result f100 = fib2 ( 100 ) # call it f100 # write the result | [
-0.30862271785736084,
-0.5669839978218079,
0.34212765097618103,
0.5275490880012512,
-0.16369567811489105,
-0.6361762285232544,
0.13280163705348969,
-0.6231878399848938,
0.085419662296772,
-0.31054893136024475,
-0.8864800333976746,
0.5200963616371155,
0.3362334966659546,
0.6919193267822266,... |
def asos _ dataset ( station, start _ date, end _ date, cache _ dir = none, refetch _ incomplete = true, clip = true ) : start _ date = utils. to _ dt64 ( start _ date ) end _ date = utils. to _ dt64 ( end _ date ) fmt _ date = lambda d : utils. to _ datetime ( d ). strftime ( " % y % m % d % h : % m " ) base _ url = "... | [
-0.4340735077857971,
0.306341290473938,
0.6405543684959412,
-0.1083541288971901,
-1.0033838748931885,
-0.3726819157600403,
-0.7586268782615662,
-0.959600567817688,
0.03467768430709839,
0.03427689149975777,
0.6920966506004333,
0.6403977870941162,
0.6151363849639893,
-0.4064686894416809,
0... |
def repeat ( self, times : int = - 1 ) - >'dataset': return repeateddataset ( self, times ) | [
-0.6354268789291382,
1.1236116886138916,
0.3449409008026123,
0.0421505868434906,
-0.8103275895118713,
0.04445812478661537,
-0.2802472710609436,
-0.34357836842536926,
0.3137305676937103,
-1.5486973524093628,
-0.1141207292675972,
0.5394258499145508,
-0.35860854387283325,
-0.6975694894790649,... |
def batch _ forward ( self, batch, criterion ) : inputs = batch [ examplekeys. input ] targets = batch [ examplekeys. target ] num = targets [ targets! = ignore _ index ]. numel ( ) inputs, targets = ( inputs. to ( self. device ), targets. to ( self. device ) ) batch _ size = inputs. shape [ 1 ] self. net. hidden = sel... | [
0.032438725233078,
-0.037409842014312744,
0.6595926284790039,
-0.21457862854003906,
-0.03136489912867546,
0.029110664501786232,
0.1421312689781189,
0.8169788718223572,
-0.18223445117473602,
-0.46121329069137573,
-0.5571661591529846,
1.0928481817245483,
0.9345426559448242,
0.181867972016334... |
def scoreevaluationfunction ( currentgamestate ) : return currentgamestate. getscore ( ) | [
-0.06033925712108612,
-1.0837475061416626,
0.4080042541027069,
-0.14791736006736755,
0.22330613434314728,
-0.11058614403009415,
-0.2884647250175476,
-0.36144253611564636,
-0.4673980474472046,
0.763201892375946,
0.7759659290313721,
0.5393356084823608,
-0.4893347918987274,
-0.766397118568420... |
def download _ community _ level ( self, level : str, force _ update : bool = false ) - > str : scrubbed _ name = re. sub ( r " [ ^ \ w - ] ", " ", level ) level _ path = os. path. join ( self. dataset, " community _ levels ", scrubbed _ name ) if not force _ update and os. path. exists ( level _ path ) : return level ... | [
-0.16917139291763306,
-0.16829761862754822,
0.4578625559806824,
-0.08034417033195496,
0.1099838837981224,
0.07514019310474396,
0.29211464524269104,
-0.6600426435470581,
-0.4096568524837494,
0.20666049420833588,
0.3113318979740143,
-0.1417769342660904,
-1.1977238655090332,
-0.29158002138137... |
def lo _ omega ( x, y, gamma = 1, t = 1, nu = 1, polarin = false ) : if polarin : r = x else : r = np. sqrt ( x * * 2 + y * * 2 ) omega _ z = gamma / ( 4 * np. pi * nu * t ) * ( np. exp ( - r * * 2 / ( 4 * nu * t ) ) ) return omega _ z | [
0.11100691556930542,
-0.5854287147521973,
0.4473055899143219,
-0.6286695003509521,
-0.45445629954338074,
-0.07354187220335007,
-0.783392608165741,
-0.4238748550415039,
0.5321757793426514,
0.6418761014938354,
-0.27850890159606934,
0.332482248544693,
0.36922720074653625,
-0.6364800333976746,... |
def score ( board, alpha, beta ) : if terminal ( board ) = = true : return utility ( board ) if player ( board ) = = x : best _ value = - float ('inf') for action in actions ( board ) : new _ board = result ( board, action ) value = score ( new _ board, alpha, beta ) best _ value = max ( value, best _ value ) alpha = m... | [
0.2172987312078476,
-0.6002185940742493,
0.8989369869232178,
0.3684528172016144,
0.29217779636383057,
-0.20402051508426666,
-0.15029838681221008,
-0.5655657649040222,
-0.8785758018493652,
0.06058841571211815,
0.06511737406253815,
0.23678073287010193,
-0.33998045325279236,
0.674078822135925... |
def waitblindtask ( self, checkinterval ) - > union [ tuple [ str, str ], none ] : req = { " token " : define. hubtoken, " taskid " : self. taskid } stepstatus = _ status. waiting while true : try : time. sleep ( checkinterval ) ret = _ invokebackend ('task / checktask ', req ) newstatus = _ status [ ret [ " status " ]... | [
0.2298174798488617,
-0.8001061677932739,
0.7384172677993774,
0.5532756447792053,
-0.049962516874074936,
1.162872314453125,
-0.5126636624336243,
-0.12639786303043365,
-0.8777443170547485,
0.3356251120567322,
-0.12447138130664825,
0.09930712729692459,
-0.2226732224225998,
0.7681388854980469,... |
def substring _ similarity ( string1 : str, string2 : str, clean _ string = false, filter _ ascii = false ) : if clean _ string : string1 = utils. clean _ string ( string1, force _ ascii = filter _ ascii ) if clean _ string else string1 string2 = utils. clean _ string ( string2, force _ ascii = filter _ ascii ) if clea... | [
0.16034068167209625,
0.3338395357131958,
0.5887579917907715,
-0.33360323309898376,
-0.9723765254020691,
0.5376707315444946,
-1.0298357009887695,
-0.32245245575904846,
-0.6904118061065674,
0.8643754124641418,
-0.4576777517795563,
1.5510350465774536,
-0.11109401285648346,
-0.6763005256652832... |
def do _ final _ plots ( self, make _ plots ) : pass | [
-0.11945569515228271,
-0.4496944844722748,
0.07380430400371552,
0.8451718688011169,
0.11864931881427765,
1.276574969291687,
1.533332109451294,
-0.3021329939365387,
-0.47285085916519165,
-0.7320592403411865,
-0.2890963852405548,
0.08693267405033112,
0.202771857380867,
-0.14131951332092285,
... |
def v4 _ url _ available ( * args, * * kwargs ) : try : flask. g. testsuite _ name return true except exception : return false | [
-0.33616387844085693,
-0.48044195771217346,
0.38164228200912476,
0.6660016179084778,
0.16310450434684753,
0.9400967359542847,
-0.34078505635261536,
-0.027728263288736343,
-0.5984216332435608,
0.49924179911613464,
0.332009881734848,
0.4244548976421356,
-0.6304635405540466,
0.258315920829772... |
def set _ start _ max ( self, mx ) : assert _ is _ cpo _ interval _ value ( mx ), " interval max should be an integer in [ interval _ min, interval _ max ] " assert mx > = self. start [ 0 ], " interval max should be lower or equal to interval max " self. start = ( self. start [ 0 ], mx ) | [
-0.0806785598397255,
-0.03366757184267044,
0.4153406620025635,
1.1791545152664185,
-0.04984563589096069,
1.069854974746704,
-0.5444938540458679,
0.45808514952659607,
-0.301933616399765,
0.6497830748558044,
-0.8326390385627747,
1.566333293914795,
-0.7365705370903015,
-0.595714271068573,
-... |
def get _ all _ dependencies ( self ) : result = [ ] for dep in self. _ dependencies : dep ['groupid'] = self. _ eval _ with _ properties ( dep ['groupid'] ) dep ['artifactid'] = self. _ eval _ with _ properties ( dep ['artifactid'] ) if'version'not in dep : version = self. _ get _ version _ from _ dependency _ managem... | [
-0.37553462386131287,
-1.1070090532302856,
0.3086181879043579,
0.09354715794324875,
-0.18180300295352936,
0.779279887676239,
-0.1883706897497177,
-0.2171328216791153,
0.553611695766449,
-0.47294098138809204,
0.0865754559636116,
-0.45422643423080444,
-0.046880654990673065,
0.593000292778015... |
def kickermovementfromrelativetarget ( x, y, h ) : from burst. behavior _ params import ( calctargetxy, # area types ( where is the ball, err, target, in relation to me ) ball _ in _ kicking _ area, ball _ front _ near, ball _ front _ far, ball _ between _ legs, ball _ side _ near, ball _ diagonal, ball _ side _ near, ... | [
-0.4809371531009674,
-0.5589877963066101,
0.8851343393325806,
0.15865075588226318,
-0.5416054129600525,
0.13778385519981384,
0.24393342435359955,
-0.8843225836753845,
0.11593678593635559,
0.14170178771018982,
-0.5439163446426392,
-0.37068861722946167,
0.649928629398346,
0.1128007173538208,... |
def sequentialize _ by _ pt ( jet, reverse = false ) : jet = copy. deepcopy ( jet ) leaves = np. where ( jet [ " tree " ] [ :, 0 ] = = - 1 ) [ 0 ] nodes = [ n for n in leaves ] content = [ jet [ " content " ] [ n ] for n in nodes ] nodes = [ i for i in range ( len ( nodes ) ) ] tree = [ [ - 1, - 1 ] for n in nodes ] po... | [
-0.19294306635856628,
0.43563443422317505,
0.8876327872276306,
-1.109290599822998,
-0.7760074138641357,
-0.4394209086894989,
0.6993614435195923,
-1.151685118675232,
-0.6666367650032043,
0.7320172190666199,
-0.5876073241233826,
-0.07818008214235306,
-0.38232406973838806,
0.12864823639392853... |
def preferenceschanged ( self ) : viewmanager. preferenceschanged ( self ) self. maxfilenamechars = preferences. getui ( " tabviewmanagerfilenamelength " ) self. filenameonly = preferences. getui ( " tabviewmanagerfilenameonly " ) for tabwidget in self. tabwidgets : for index in range ( tabwidget. count ( ) ) : editor ... | [
-0.260198712348938,
-0.8175944089889526,
0.44116923213005066,
-0.43648800253868103,
-0.39473956823349,
-0.09061112999916077,
-0.28199464082717896,
-0.13035549223423004,
-0.4687868356704712,
0.42712461948394775,
0.1945813000202179,
0.4400399327278137,
0.3561106324195862,
0.48994380235671997... |
def adjust _ ranges ( bands, freq ) : # get the indices of the first and last non - zero elements. first = 0 for k, v in freq. items ( ) : if v! = 0 : first = k break rev _ keys = list ( freq. keys ( ) ) [ : : - 1 ] last = rev _ keys [ 0 ] for idx in list ( freq. keys ( ) ) [ : : - 1 ] : if freq [ idx ]! = 0 : last = i... | [
-0.7484488487243652,
-0.182977557182312,
0.648901641368866,
-0.5992193222045898,
-0.12848791480064392,
-0.1378694474697113,
0.4969118535518646,
0.1564958691596985,
-0.27003392577171326,
0.036108940839767456,
0.4618910253047943,
0.11080969125032425,
-0.25114813446998596,
0.34845778346061707... |
def equals ( self, other ) : return _ is _ equal _ expressions ( self, other ) | [
-0.5480400323867798,
-0.5387455224990845,
0.5842057466506958,
0.6464142799377441,
0.20167890191078186,
-0.4328076243400574,
0.36499232053756714,
-0.6352785229682922,
0.3576053977012634,
0.48698750138282776,
-1.2329940795898438,
-0.04786913841962814,
-0.7243954539299011,
-0.0205012504011392... |
def cgap _ core _ variant _ sample ( cgap _ core _ project, institution, variant ) : item = { " project " : cgap _ core _ project [ " @ id " ], " institution " : institution [ " @ id " ], " variant " : variant [ " @ id " ], " call _ info " : " some _ cgap _ core _ sample ", " file " : " some _ cgap _ core _ vcf _ file ... | [
0.08922090381383896,
-0.4269041419029236,
0.1578953117132187,
-0.8557060360908508,
-0.7809690833091736,
0.2629580795764923,
-0.026812652125954628,
0.2832244336605072,
0.31970691680908203,
0.9609090685844421,
-0.4279550611972809,
0.09141651540994644,
-0.8014005422592163,
-0.7125079035758972... |
def addfather ( self, father ) : self. fathers. append ( father ) | [
-0.9989274740219116,
0.3408454954624176,
0.4638940393924713,
0.020124901086091995,
0.7044014930725098,
-0.02760760672390461,
-1.1543798446655273,
-0.018476488068699837,
0.16477705538272858,
-0.8440758585929871,
-1.1090210676193237,
0.919089138507843,
-0.28089818358421326,
1.461916446685791... |
def getnexttoken ( self ) : return self. nexttoken | [
-0.5804587006568909,
-0.49618297815322876,
0.4358799457550049,
0.37787675857543945,
-0.92027747631073,
0.45554274320602417,
-0.2910888195037842,
0.33839136362075806,
0.12995126843452454,
-1.7749301195144653,
-0.4044674038887024,
1.1433305740356445,
-0.20366838574409485,
-0.2851890027523041... |
def get _ wceff _ lfv ( q2, wc, par, b, m, l1, l2, scale ) : mb = running. get _ mb ( par, scale ) qiqj = meson _ quark [ ( b, m ) ] c = { } c ['7'] = 0 c ['7p'] = 0 c ['v'] = wc ['c9 _'+ qiqj + l1 + l2 ] c ['vp'] = wc ['c9p _'+ qiqj + l1 + l2 ] c ['a'] = wc ['c10 _'+ qiqj + l1 + l2 ] c ['ap'] = wc ['c10p _'+ qiqj + l1... | [
0.2360256016254425,
-0.6375296711921692,
0.5814262628555298,
-1.0791099071502686,
-0.6825141906738281,
-0.01064644381403923,
-0.33353540301322937,
0.0012342371046543121,
-0.985795795917511,
0.3219156563282013,
-0.6227669715881348,
0.4965338110923767,
-0.30354043841362,
0.19159646332263947,... |
def test _ multiply ( ctx _ factory ) : context = ctx _ factory ( ) queue = cl. commandqueue ( context ) for sz in [ 10, 50000 ] : for dtype, scalars in [ ( np. float32, [ 2 ] ), ( np. complex64, [ 2j ] ), ] : for scalar in scalars : a _ gpu = make _ random _ array ( queue, dtype, sz ) a = a _ gpu. get ( ) a _ mult = (... | [
-0.16028672456741333,
0.6242377161979675,
0.6144479513168335,
0.7110493779182434,
0.8030585050582886,
-0.052618760615587234,
0.38316991925239563,
-1.0256736278533936,
0.4966997802257538,
-0.7249038815498352,
-0.4394065737724304,
-0.06495742499828339,
0.22631730139255524,
0.511191725730896,... |
def getkde ( data, alpha = 0. 001, n = 200, cut _ at _ zero = true, bw _ method = lambda kde : kde. n * * ( - 1. 0 / ( ( kde. d + 4 ) * 1. 6 ) ) ) : kde = gaussian _ kde ( data, bw _ method = bw _ method ) q = mquantiles ( data, [ alpha, 1 - alpha ] ) if ( q [ 0 ] < 1. 0 ) and cut _ at _ zero : q [ 0 ] = 0. 0 e = linsp... | [
0.9191133975982666,
-0.5103229284286499,
0.4838259220123291,
-0.3874422609806061,
-0.5315043330192566,
-0.3966934084892273,
-0.1500501036643982,
0.1629510074853897,
0.45710355043411255,
0.4809710681438446,
0.3251720666885376,
-0.48599427938461304,
-0.3515123724937439,
1.093595266342163,
... |
def resource _ url ( self ) - > resourceurl : return self. _ resource _ url | [
0.36684149503707886,
-0.11538069695234299,
-0.08237390965223312,
0.6967001557350159,
0.632659375667572,
0.8614080548286438,
0.4570757746696472,
0.6697909832000732,
0.6059865355491638,
-0.08085356652736664,
0.15321268141269684,
0.28555992245674133,
-0.08423681557178497,
-0.498679518699646,
... |
def test _ export _ database _ command _ no _ access ( self, mock _ g ) : mock _ g. user = security _ manager. find _ user ( " gamma " ) example _ db = get _ example _ database ( ) command = exportdatabasescommand ( [ example _ db. id ] ) contents = command. run ( ) with self. assertraises ( databasenotfounderror ) : n... | [
0.49615004658699036,
1.0790719985961914,
0.43286556005477905,
0.2888016402721405,
0.3031485080718994,
0.4781256914138794,
0.7057977914810181,
-0.12727472186088562,
0.04833540692925453,
-0.339875191450119,
-0.34320876002311707,
0.7351175546646118,
-0.9797335267066956,
0.8241623640060425,
... |
def fill _ normal ( self, ary, mu = 0, sigma = 1, queue = none ) : if queue is none : queue = ary. queue knl, size _ multiplier = self. get _ gen _ kernel ( ary. dtype, " normal " ) knl ( queue, ( self. num _ work _ items, ), self. wg _ size, self. state. data, ary. data, ary. size * size _ multiplier, sigma, mu ) | [
-1.2613170146942139,
0.6153483390808105,
0.7233527898788452,
0.8720425367355347,
-0.9339723587036133,
0.0394451767206192,
0.10312119871377945,
-0.233876034617424,
0.6622348427772522,
0.7254271507263184,
0.44365236163139343,
0.5300573110580444,
-0.05580838769674301,
1.059637427330017,
-0.... |
def put _ s3 ( local _ path, bucket, s3 _ path, auth _ file = default _ s3 _ auth _ file ) : return none | [
0.37013325095176697,
-0.0444423146545887,
0.42462122440338135,
-0.19893932342529297,
0.37951740622520447,
0.9709854125976562,
0.021408619359135628,
0.9255474805831909,
0.5242468118667603,
-0.24789869785308838,
-0.6768192052841187,
0.4707438349723816,
-0.751725435256958,
-1.2718902826309204... |
def calculate _ depth ( self, depth _ spec, sitemap, request ) : # convert to a string to test, even though we may simply turn it back # into an integer. depth _ spec = str ( depth _ spec ) # if there is no'+'then it's just an integer. if'+'not in depth _ spec : return int ( depth _ spec ) # split the spec relative _ t... | [
-0.919196605682373,
0.05219988152384758,
0.7417183518409729,
-0.4243021607398987,
-0.04284876212477684,
0.20568928122520447,
1.4319559335708618,
0.20469003915786743,
0.4641917645931244,
-0.3046180009841919,
-0.006105904467403889,
-0.19709104299545288,
-0.26201575994491577,
0.03981024026870... |
async def get _ images _ quota ( self, oauth _ token = none ) : oauth _ token = oauth _ token or self. oauth _ token if oauth _ token is none : raise exceptions. authrequired ('please provide oauth _ token') result = await api. request ( self. session, oauth _ token, request _ method ='get ', custom _ url = api. base _... | [
-0.7617310881614685,
-0.21695731580257416,
0.4290636479854584,
-0.035346779972314835,
0.8047034740447998,
-1.6087113618850708,
-1.2463468313217163,
-0.045077305287122726,
-0.08609598129987717,
0.8295639753341675,
0.02214735560119152,
1.0168696641921997,
0.13002881407737732,
0.0285712685436... |
def get _ path ( state ) : path = [ ] current _ state = state while current _ state. parent is not none : path = [ current _ state ] + path current _ state = current _ state. parent return [ current _ state ] + path | [
-0.11816506832838058,
-0.35329243540763855,
0.7229399681091309,
0.635123610496521,
0.1826208382844925,
0.12296954542398453,
0.993498682975769,
0.07557937502861023,
1.0052602291107178,
0.0016136753838509321,
-0.21024498343467712,
-0.30592238903045654,
-0.057978082448244095,
0.73013812303543... |
def main ( ) : initial _ road _ map _ path = input ('please paste here the path to the initial road map :') while os. path. isfile ( initial _ road _ map _ path ) = = false : initial _ road _ map _ path = input ('file or directory not found. please try again :') if os. path. isfile ( initial _ road _ map _ path ) = = t... | [
0.7211229205131531,
-0.10401241481304169,
1.0769357681274414,
0.37197208404541016,
-0.08265595138072968,
0.9337980151176453,
1.0252907276153564,
-0.26092785596847534,
-0.5708168148994446,
-0.17672447860240936,
-0.1586412489414215,
0.8087974190711975,
-0.02843456342816353,
0.358334213495254... |
def project _ info ( request ) : response = apiresponse ( ) response. data = config. view ( ) response. code = 200 response. message = " connect rest success " serializer = apiresponseserializer ( response ) return jsonresponse ( serializer. data ) | [
-1.1160967350006104,
-0.5859794020652771,
0.4564308226108551,
-0.08326304703950882,
-0.6583377718925476,
-0.02756183035671711,
-0.2780193090438843,
0.37543824315071106,
-0.15064844489097595,
0.668159544467926,
-0.15821512043476105,
-0.5691975355148315,
-0.2636621296405792,
-0.2474560737609... |
def singleroconepixelscan ( self, rocid, col, row, ntrig = 10, flag = 0, dac = 25, dacmin = 0, dacmax = 255 ) : self. daq _ select _ deser160 ( self. deseradjust ) self. daq _ open ( ) self. daq _ start ( ) self. loopsingleroconepixeldacscan ( rocid, col, row, ntrig, flag, dac, dacmin, dacmax ) self. daq _ stop ( ) t =... | [
0.1993439644575119,
0.42592963576316833,
0.6142994165420532,
-0.47312986850738525,
0.14355501532554626,
-0.8024094104766846,
0.5982967615127563,
-0.36696240305900574,
0.13231216371059418,
-0.11952172219753265,
-0.12731210887432098,
-0.7279022932052612,
-0.27895596623420715,
0.1406678557395... |
def _ calc _ img _ weights ( roidbs ) : imgs _ cls = [ ] num _ per _ cls = { } img _ weights = [ ] # 的 gt - box 的 for i, roidb in enumerate ( roidbs ) : img _ cls = set ( [ k for cls in roidbs [ i ] ['gt _ class'] for k in cls ] ) imgs _ cls. append ( img _ cls ) for c in img _ cls : if c not in num _ per _ cls : num _... | [
-1.0211081504821777,
-0.14827576279640198,
0.9336709976196289,
0.19737854599952698,
0.46020403504371643,
-0.015663469210267067,
1.2132446765899658,
-0.009680484421551228,
-0.3339416980743408,
0.9607697129249573,
-0.39491745829582214,
-0.1407083123922348,
-0.3451785147190094,
1.191965699195... |
def get _ markets ( self, uuid = none, * * kwargs ) : return self. request ('markets ', uuid = uuid, * * kwargs ) | [
-1.540006399154663,
0.7917978167533875,
0.25461894273757935,
0.4457215368747711,
0.6716230511665344,
-0.2624814212322235,
-0.5148529410362244,
-0.3059689402580261,
0.6886939406394958,
-0.1731458455324173,
-0.3586598038673401,
0.841189980506897,
-1.1849615573883057,
0.06064147874712944,
-... |
def generator ( rootdir, ids, test _ mode, val _ mode, preprocess, batch _ size = 8 ) : while true : if ( not test _ mode ) and ( not val _ mode ) : np. random. shuffle ( ids ) iterations = int ( np. ceil ( len ( ids ) / batch _ size ) ) for i in range ( iterations ) : if test _ mode : processed = np. zeros ( ( batch _... | [
-0.3390935957431793,
-0.5604751110076904,
0.6989344954490662,
-0.2261657416820526,
-0.45477521419525146,
0.26645761728286743,
0.11814268678426743,
-0.17504696547985077,
0.33788633346557617,
-0.2559639513492584,
0.3404621183872223,
0.46940284967422485,
0.057214077562093735,
0.17990767955780... |
def compute _ loss ( self, input _ data, expected _ output _ data ) : criterion = torch. nn. bceloss ( ) predictions = self. model ( self. reshape ( input _ data ) ) loss = criterion ( predictions, expected _ output _ data ) return loss, loss. data [ 0 ] | [
-0.5300784707069397,
-0.5413214564323425,
0.4046463966369629,
0.2290392518043518,
0.15283869206905365,
-0.558647096157074,
-0.048329394310712814,
0.7296636700630188,
-0.5211554169654846,
0.11508825421333313,
0.2825486660003662,
0.8209909796714783,
0.13629163801670074,
0.050816331058740616,... |
def delete _ activity ( activity _ id ) : with db _ session ( ) as db : activity = db. query ( models. activity ) \. filter _ by ( id = activity _ id ) \. one ( ) # activity can only be deleted by its owner if activity. user _ id! = get _ user _ id ( user _ email = flask. session ['email'] ) : return flask. redirect ( ... | [
0.430103063583374,
-0.011746854521334171,
0.5799688696861267,
0.9622033834457397,
0.5926893949508667,
-0.09640741348266602,
1.585903286933899,
0.1738530695438385,
1.3925106525421143,
-0.17842362821102142,
1.1661218404769897,
-0.0863177552819252,
0.1743190884590149,
0.7389762997627258,
0.... |
def size ( self ) : if self. is _ empty ( ) : return 0 return self. num _ items | [
-0.36638665199279785,
0.6460725665092468,
0.5158970952033997,
0.07541858404874802,
0.7569391131401062,
0.2156827300786972,
0.22624896466732025,
0.46435579657554626,
0.25342705845832825,
-0.6927962303161621,
-0.45138123631477356,
-0.5134897232055664,
-0.4734156131744385,
0.6253432035446167,... |
def max _ priority ( self ) : return max ( self. queue ) if len ( self ) else none | [
0.8839432001113892,
-0.7854268550872803,
0.6852570176124573,
0.20459575951099396,
0.27217569947242737,
-0.16509562730789185,
-1.9745944738388062,
-0.3382816016674042,
1.2735774517059326,
-0.5467661023139954,
-0.01792813464999199,
-0.2666536271572113,
-0.7575051784515381,
0.4410749673843384... |
def parse _ chunks ( b ) : # skip signature i = 8 # yield chunks while i < len ( b ) : data _ len, = struct. unpack ( "! i ", b [ i : i + 4 ] ) type _ = b [ i + 4 : i + 8 ]. decode ( " latin - 1 " ) yield chunk ( type _, b [ i : i + data _ len + 12 ] ) i + = data _ len + 12 | [
0.15483629703521729,
0.023228589445352554,
0.6784597635269165,
-0.7602503299713135,
0.40361344814300537,
-0.053957339376211166,
-0.09635572880506516,
-0.37890562415122986,
0.051573384553194046,
-0.20318424701690674,
-0.3757673501968384,
0.21390484273433685,
-0.5415828824043274,
-0.66950726... |
def unbind ( self, target = none ) : if target is none : target = self. target self. ctx. glbindbuffer ( target, 0 ) | [
0.10415372252464294,
-0.46773043274879456,
0.6657987236976624,
0.013299742713570595,
-0.061303649097681046,
0.6844192147254944,
0.6404294371604919,
-0.0714276134967804,
0.7572980523109436,
-0.9289208650588989,
-0.2588944435119629,
1.3703888654708862,
-1.2359122037887573,
0.1141685545444488... |
def compute _ network ( self, filename ='social _ balance _ characters. csv') : # print ('all characters of book ', self. book _ id,'= ', self. allcharacters ) if self. perspective = ='1'or self. perspective = ='2': " " " in case the attribute'perspective'of book object equals 1 ( 1stpers ) or 2 ( 3rdpers ) do this... ... | [
-0.4853801429271698,
-1.360465407371521,
0.8083237409591675,
0.1908181607723236,
-0.039511650800704956,
-0.11650116741657257,
0.020750371739268303,
0.6352807879447937,
0.024952787905931473,
-0.38208481669425964,
0.008289620280265808,
-0.4456028342247009,
-0.8771624565124512,
0.319514304399... |
def _ print _ eval ( iters _ num, loss _ list, ci _ list, eval _ labels ) : print ( " # after % dth iteration : " % iters _ num ) for i in range ( len ( loss _ list ) ) : print ( " \ ton % s : " % eval _ labels [ i ] ) print ( " \ t \ tloss : % g " % loss _ list [ i ] ) print ( " \ t \ ttd - ci : % g " % ci _ list [ i ... | [
-0.07136870920658112,
-0.6609860062599182,
0.506912350654602,
-1.012350082397461,
0.10467299073934555,
0.519020140171051,
-0.38181355595588684,
0.3599245548248291,
-1.0050767660140991,
0.6338987350463867,
0.5006598830223083,
0.841862678527832,
-0.32460644841194153,
-0.051122281700372696,
... |
def inference ( self, x ) : pre _ trained _ embeddings = np. load ('datasets / clinicalts / basefiles / cdif / w2v / final _ embeddings. npy') vocab _ length, embedding _ dimension = pre _ trained _ embeddings. shape print ('embedding matrix dimensions, ', vocab _ length, embedding _ dimension ) embeddings = tf. get _ ... | [
0.08233971893787384,
0.49703437089920044,
0.7778966426849365,
0.054002389311790466,
-0.14151737093925476,
-0.3355020582675934,
1.2286376953125,
-0.3912200927734375,
-0.26011160016059875,
0.9144405722618103,
-0.6343716979026794,
0.32757723331451416,
0.2695033848285675,
0.9025586247444153,
... |
def _ _ new _ _ ( cls, sqla _ expr, column _ name = none, mdata = none, search _ method = " string _ contains ", nulls _ order = none, global _ search = true, ) : if nulls _ order and nulls _ order not in nulls _ order : raise valueerror ( " { } is not an allowed value for nulls _ order. ". format ( nulls _ order ) ) i... | [
0.4839690923690796,
0.34484103322029114,
0.5974146127700806,
0.5931408405303955,
-0.9255814552307129,
-0.5135598182678223,
-0.3378218412399292,
0.15844295918941498,
-0.47571972012519836,
-0.06010692939162254,
0.46333202719688416,
-0.1374673992395401,
0.6242963671684265,
0.49929556250572205... |
def get _ full _ name ( self ) : return self. name | [
0.2981380820274353,
-1.342577576637268,
0.5796124339103699,
-0.035979870706796646,
-0.7523393034934998,
0.5432549118995667,
-0.5666908621788025,
-0.45582595467567444,
0.14633463323116302,
0.26296788454055786,
-0.20646901428699493,
0.15451385080814362,
0.18669934570789337,
0.050543170422315... |
def plot _ surface ( x, y, z = np. array ( [ [ i ] * 100 for i in range ( 100 ) ] ), nombre ='sigmoide 3d') : fig = plt. figure ( figsize = ( 10, 10 ) ) ax = fig. add _ subplot ( 111, projection ='3d') ax. plot _ surface ( x, y, z ) ax. set _ title ( f " { nombre } " ) plt. xlabel ('eje x') plt. ylabel ('eje y') plt. s... | [
0.5906276702880859,
1.1367055177688599,
0.5747414231300354,
0.22027873992919922,
-0.005129954311996698,
1.2746444940567017,
0.08593503385782242,
-0.009887655265629292,
0.11044192314147949,
0.1692546010017395,
-0.017187019810080528,
0.8633520007133484,
-0.2140420526266098,
-0.21405115723609... |
def _ _ readconfiginfo ( self ) : g _ logger. log ( " read static config file... " ) try : self. _ _ clusterinfo = dbclusterinfo ( ) self. _ _ clusterinfo. initfromstaticconfig ( g _ clusteruser ) g _ logger. debug ( " get host name... " ) hostname = socket. gethostname ( ) g _ logger. debug ( " get dbnode... " ) self.... | [
-0.575426459312439,
-0.3055884540081024,
0.6578823924064636,
-0.6529863476753235,
0.25124692916870117,
0.5530582070350647,
0.2896960377693176,
0.10535771399736404,
-2.0034799575805664,
0.4978835880756378,
-0.22765563428401947,
0.6410192847251892,
-0.14693954586982727,
0.4313904941082001,
... |
def update _ user ( self, id : uuid, data : dict ) : users. update ( ). where ( users. c. id = = id ). values ( data ). execute ( ) | [
-1.0425101518630981,
-0.23560281097888947,
0.2821478545665741,
-0.04380810260772705,
-0.49234187602996826,
0.46438056230545044,
-0.7474184632301331,
0.19582705199718475,
-0.5078413486480713,
0.4213641881942749,
-0.9631866216659546,
0.03834594786167145,
0.000873955141287297,
-0.591732800006... |
def test _ delete _ event ( self ) : role = role. query. filter _ by ( name = " event organizer " ). first ( ) user = testmodelfactory. create _ user ( ) user. role = role venue = testmodelfactory. create _ venue ( ) event = testmodelfactory. create _ event ( " test event ", " live " ) event. user = user event. venue =... | [
0.2706412374973297,
0.1483822911977768,
0.7773401141166687,
1.0814616680145264,
0.9462106823921204,
0.9600510597229004,
0.9691488146781921,
0.6870924234390259,
0.7612440586090088,
-0.8147370219230652,
-0.4771726429462433,
0.1220395565032959,
0.3362385630607605,
0.2443167269229889,
0.9322... |
def get _ user _ lesson ( self, userid ) : if assignmentprogress. objects. all ( ). filter ( assignment _ key _ id = self. id, user _ info _ key _ id = userid ). exists ( ) : progress = assignmentprogress. objects. all ( ). get ( assignment _ key _ id = self. id, user _ info _ key _ id = userid ) if alternateprogress. ... | [
-0.41317179799079895,
-0.9767998456954956,
0.6504465937614441,
-0.38432833552360535,
-0.8652147054672241,
0.8389151096343994,
0.8830348253250122,
-0.8176411986351013,
-0.5017732381820679,
0.6200289130210876,
0.5409781336784363,
-0.18437623977661133,
-0.8060452938079834,
0.7234065532684326,... |
def get _ parents ( self, asset _ key : assetkey ) - > abstractset [ assetkey ] : return self. _ asset _ dep _ graph [ " upstream " ]. get ( asset _ key ) or set ( ) | [
-0.8076196908950806,
0.9163830280303955,
0.6879882216453552,
-0.8555803894996643,
-0.5863999128341675,
-0.025941822677850723,
0.16899694502353668,
-1.6397963762283325,
-0.5552374124526978,
0.949444055557251,
0.19183926284313202,
0.17540796101093292,
0.29818791151046753,
0.21904750168323517... |
def test _ no _ seasonal _ forcing ( ) : seasonal _ forcing _ function = get _ seasonal _ forcing ( 365. 0, 0. 0, 0. 0, 1. 0 ) for i _ time in np. linspace ( - 100. 0, 100. 0, 50 ) : assert seasonal _ forcing _ function ( i _ time ) = = 1. 0 | [
-0.3661012649536133,
-0.02858770079910755,
0.464648962020874,
0.5949880480766296,
0.6728370785713196,
0.3157736361026764,
0.6018162369728088,
-0.31950074434280396,
-0.10148904472589493,
-0.5401859879493713,
-0.06953424960374832,
0.5326135754585266,
-0.15697261691093445,
0.5979477763175964,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.