text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def location ( self, location ) : if location is none : raise valueerror ( " invalid value for ` location `, must not be ` none ` " ) self. _ location = location | [
-0.22264187037944794,
0.018959593027830124,
-0.27856212854385376,
0.01330132968723774,
0.8456438183784485,
0.07253547012805939,
0.9626874923706055,
0.9974933862686157,
0.002339310944080353,
-0.14860738813877106,
-0.6686729788780212,
-0.5406609773635864,
0.005006618797779083,
0.013586284592... |
def register ( self, username : str, password : str, properties : dict [ str, any ] ) - > dict [ str, any ] : idt = { } try : idt = { " username " : username, " password " : password, " properties " : conv _ json _ to _ dict ( properties ) } self. data [ " identities " ]. append ( idt ) except valueerror as err : raise... | [
-1.309918761253357,
-0.13936053216457367,
0.5430827736854553,
-0.7554952502250671,
0.04229235276579857,
-0.3628877103328705,
-1.6996945142745972,
-0.018925469368696213,
-0.4614466428756714,
0.06069190800189972,
-0.7548519372940063,
-0.4498841464519501,
-0.5957581400871277,
-0.4110725224018... |
def get _ gabor _ parameters ( self, dilations = [ 1, 0, - 1, - 2, - 3 ], num _ rotations = 8, alpha0 = np. float64 ( 2 ), b0 = np. float64 ( 1. 5 ), b0scalebase = np. sqrt ( 2 ), kappa = 2. 5 ) : b0 = np. float64 ( b0 ) b0scalebase = np. float64 ( b0scalebase ) alpha0 = np. float64 ( alpha0 ) self. kappa = float ( kap... | [
-0.16429434716701508,
0.524012565612793,
0.8873152732849121,
-0.10883278399705887,
0.493295818567276,
-0.6133547425270081,
0.9237772822380066,
0.12349186837673187,
0.03193742409348488,
0.7521452307701111,
-0.5599158406257629,
0.29863443970680237,
-0.2799149453639984,
0.33382222056388855,
... |
def pick _ clip ( values ) : variations = values. diff ( ) / values variations = variations. iloc [ 1 : ]. abs ( ) last _ values = values [ 0 ] for date, variations in variations. items ( ) : if np. max ( variations ) > 1. 5 : values [ date ] = last _ values print ( last _ values, values ) else : last _ values = values... | [
0.019265828654170036,
0.14229071140289307,
0.42922574281692505,
0.5981612205505371,
-0.512193500995636,
0.48201823234558105,
0.35805225372314453,
-0.3369157314300537,
0.17612053453922272,
0.6333420276641846,
0.6945406198501587,
0.7293258309364319,
1.131726861000061,
-0.18906758725643158,
... |
def test _ apply _ check _ mode _ change ( self ) : # remove absent storage pool with self. assertraisesregexp ( ansibleexitjson, "'changed': true " ) : with patch ( self. drives _ property, new _ callable = propertymock ) as drives : drives. return _ value = self. drives _ data with patch ( self. storage _ pool _ prop... | [
0.07680255174636841,
-0.02344643883407116,
0.9007479548454285,
0.33966973423957825,
0.7453124523162842,
1.1284877061843872,
0.4981513023376465,
0.3544168472290039,
-0.03917984291911125,
0.5399966239929199,
-0.41678860783576965,
-0.057301972061395645,
0.027627872303128242,
0.222723931074142... |
def minus _ dapi _ thr ( self ) : cif = self. frame _ dapi _ 2d. currentindex hh = self. frame _ dapi _ 2d. view. viewrange ( ) self. nucs _ 2d _ det. vals [ self. frame _ dapi _ 2d. currentindex ] - = self. nucs _ 2d _ det. val _ step self. nucs _ 2d _ det. nucs _ sgm [ self. frame _ dapi _ 2d. currentindex ] = ( self... | [
-0.2946389317512512,
-0.17926371097564697,
0.5431724786758423,
-0.7211604118347168,
0.0873783603310585,
0.6906200647354126,
0.9417985677719116,
-0.5401518940925598,
-0.038960956037044525,
-0.5818349123001099,
-0.1512470543384552,
0.38453102111816406,
0.17309655249118805,
0.4962937533855438... |
def build ( self ) : self. title = " places to visit 2. 0 " self. source = builder. load _ file ( " app. kv " ) self. button _ creat ( ) return self. source | [
0.0072609311901032925,
0.09594736993312836,
0.10842698812484741,
0.4830382466316223,
-0.8578552603721619,
0.4769180119037628,
-0.046822335571050644,
1.0829858779907227,
0.168467178940773,
-0.5085895657539368,
-0.32742631435394287,
-0.41363322734832764,
0.6360015869140625,
-0.01764420233666... |
def _ traced _ add _ attr ( node, * * kwargs ) : cmds. addattr ( node, * * kwargs ) # if commands are traced... if node. trace _ commands : if node in node. traced _ nodes : #... check if node is already part of the traced nodes : use its variable instead node = node. traced _ variables [ node. traced _ nodes. index ( ... | [
0.589106023311615,
-0.02119000069797039,
0.7750257849693298,
-0.08138556778430939,
0.1505722552537918,
-0.10803748667240143,
0.19851285219192505,
-0.5670179128646851,
0.6025880575180054,
-0.5258022546768188,
0.5779957175254822,
0.6683863401412964,
0.06562116742134094,
0.5750643014907837,
... |
def get _ trends _ by _ location ( location ) : resp, content = _ make _ authorized _ get ( trends _ endpoint % location. woeid ) if resp. status! = 200 : raise apirequestexception ('% s request failed ( status % d )'% ( trends _ endpoint, resp. status ), resp. status ) content = json. loads ( content. encode ('utf - 8... | [
-1.126455545425415,
-0.2258855700492859,
0.3451039493083954,
-0.4237384796142578,
0.7858660221099854,
-0.26950588822364807,
-0.37541279196739197,
-0.37693580985069275,
0.2498539835214615,
1.1397788524627686,
-1.5308822393417358,
0.5178588628768921,
-0.003853514790534973,
-0.026929991319775... |
def get _ num _ dashes _ per _ fret ( self ) : return self. num _ dashes _ per _ fret | [
0.3731979429721832,
0.8165563941001892,
0.6647619605064392,
-0.09580609202384949,
0.5840447545051575,
0.18555685877799988,
1.1144092082977295,
0.19951491057872772,
0.02252153307199478,
-1.931151032447815,
-0.31443366408348083,
-0.41630223393440247,
0.1146627888083458,
0.36560869216918945,
... |
def _ _ init _ _ ( self, nodes = none ) : self. nodes = nodes | [
-0.1439213752746582,
0.7175028324127197,
0.2601688504219055,
-0.268716961145401,
0.6228266954421997,
-0.008311713114380836,
-0.41200417280197144,
1.0659154653549194,
0.17277748882770538,
-0.36626195907592773,
-0.0331464484333992,
0.6029835939407349,
-0.43753519654273987,
0.3429481685161590... |
def fill _ field ( self, field _ name, text ) : selector = self. wait _ for _ element _ found ( field _ name,'input / textarea ','next') if'password'in field _ name. upper ( ) : self. input _ password ( selector, text ) else : self. input _ text ( selector,'' ) self. input _ text ( selector, text ) | [
-0.4076162278652191,
0.17061859369277954,
0.5455759167671204,
0.05816007778048515,
0.13384175300598145,
0.3498274087905884,
-0.26408475637435913,
0.24721068143844604,
-0.033061228692531586,
0.36488258838653564,
-0.42785826325416565,
-0.6368930339813232,
-0.23243752121925354,
0.621165871620... |
def test _ natsel _ sitehet _ mprob ( self ) : opt = dict ( max _ evaluations = 2, limit _ action = " ignore " ) aln = load _ aligned _ seqs ( " data / ensg00000198712. fa ", moltype = " dna " ) # optimising root probs natsel = evo _ app. natsel _ sitehet ( " mg94hky ", opt _ args = opt, gc = 2, optimise _ motif _ prob... | [
0.4808421730995178,
0.023913443088531494,
0.46547672152519226,
-0.22626954317092896,
0.11239569634199142,
0.5800201296806335,
0.1469559222459793,
-0.6038987040519714,
-0.05614527687430382,
0.5834326148033142,
-0.16303734481334686,
0.19488897919654846,
-0.7930610179901123,
0.196452558040618... |
def close ( self ) : closecomputeengine ( ) | [
0.0020428854040801525,
0.07181272655725479,
0.3556557595729828,
0.33633917570114136,
-0.17750705778598785,
1.4839814901351929,
1.2623279094696045,
0.47185060381889343,
-1.5987968444824219,
-0.5199294686317444,
0.8521081209182739,
-0.23169323801994324,
-0.22075894474983215,
1.28338372707366... |
def saveconfig ( ) : configfile = open ( configfilename, " w " ) try : configfile. write ( json. dumps ( configdict ) ) finally : configfile. close ( ) | [
-1.133508563041687,
-0.5200764536857605,
0.10357560217380524,
-0.6678377389907837,
0.44227686524391174,
0.4723518490791321,
0.1443016529083252,
0.4173361361026764,
-1.507568597793579,
0.9718375205993652,
-2.1289985179901123,
-0.6763759851455688,
-0.10879557579755783,
0.776652991771698,
1... |
def availability _ zone ( self ) : return self. _ availability _ zone | [
0.24383722245693207,
-1.5564481019973755,
0.21477113664150238,
0.333725243806839,
-0.16677774488925934,
1.3587381839752197,
0.7251189947128296,
1.1595966815948486,
0.9310745596885681,
-0.3173137903213501,
0.4230174124240875,
0.6133524775505066,
0.3291182518005371,
-0.5445629358291626,
0.... |
def disambiguate ( self, block, metadatakey ) : return integer. tostring ( block. getx ( ) ) + " : " + integer. tostring ( block. gety ( ) ) + " : " + integer. tostring ( block. getz ( ) ) + " : " + metadatakey | [
-0.04241153225302696,
-0.9105449318885803,
0.4973786771297455,
-0.7335214614868164,
0.4034939408302307,
0.23157565295696259,
-0.8523001074790955,
0.04084702208638191,
-0.3064703643321991,
1.0669965744018555,
-0.283393532037735,
0.4073416590690613,
-0.13244865834712982,
-0.0728766992688179,... |
def confirm ( self, cr, uid, ids, context = none ) : for rec in self. browse ( cr, uid, ids, context = context ) : all _ amount = 0. 0 if rec. filling = ='several'and not rec. line _ id : raise osv. except _ osv ( _ ('validateerror'), _ ( " you must enter fuel filling details! " ) ) self. write ( cr, uid, ids, {'state'... | [
0.09494779258966446,
-0.2747757136821747,
0.549876868724823,
0.3624466359615326,
0.5859785676002502,
-0.0696675106883049,
0.027346335351467133,
0.29473504424095154,
-0.8207424283027649,
-0.234137624502182,
0.21978305280208588,
-0.4620681405067444,
0.029667438939213753,
1.2595832347869873,
... |
def _ _ init _ _ ( self, data ) : if type ( data ) is np. ndarray : bstnode. _ _ init _ _ ( self, data ) self. axis = 0 else : raise typeerror ('data not np array') | [
0.4266950488090515,
-0.41855672001838684,
0.6801114678382874,
0.8400481939315796,
0.02895747870206833,
0.8662751317024231,
0.23353147506713867,
-0.5728664398193359,
0.5687576532363892,
-0.05848018452525139,
0.29425492882728577,
0.8365258574485779,
-0.16024309396743774,
0.9148657321929932,
... |
def test _ example _ input _ two _ delete _ valid _ prompt _ message ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ two ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ name = " dummy _ input _ two " prompt _ message = input _... | [
0.40453627705574036,
0.5785118341445923,
0.554319441318512,
0.7093440890312195,
0.23260456323623657,
0.2565700113773346,
-0.45327040553092957,
0.09164226055145264,
0.457801878452301,
-0.1992948204278946,
0.11451330035924911,
0.29203543066978455,
0.2014942765235901,
-0.05485226586461067,
... |
def is _ on _ planet ( self ) : return self. _ location. has _ latlon ( ) | [
0.2610005736351013,
-0.8127087354660034,
0.23592504858970642,
0.5894167423248291,
-0.11675179749727249,
0.9825237989425659,
-1.2542273998260498,
0.6635742783546448,
-0.5011139512062073,
0.824457585811615,
-0.06290435791015625,
-0.05424557998776436,
-0.40918025374412537,
0.4491196870803833,... |
def next ( self, callback = none ) : self. eval _ js ('table. movetosibling ( undefined, " next " ) ; ', callback = callback ) | [
-0.0012981919571757317,
1.6212761402130127,
0.35054001212120056,
1.0871272087097168,
-0.8277820348739624,
-0.5586807727813721,
1.0876518487930298,
-0.5577606558799744,
-0.013226517476141453,
0.05116819962859154,
-0.48054322600364685,
0.5828073024749756,
-0.08720076084136963,
0.412869125604... |
def two _ of _ three ( x, y, z ) : arr = [ x, y, z ] sort ( arr ) return arr [ 0 ] + arr [ 1 ] | [
0.47816991806030273,
-0.5543907284736633,
0.7098875045776367,
-0.21203161776065826,
0.14075474441051483,
-0.024486184120178223,
-0.8798375725746155,
-0.9141270518302917,
-0.17353850603103638,
0.02825034037232399,
-0.7733317017555237,
0.22749333083629608,
0.2021784484386444,
-1.132017612457... |
def updateconfigwithyaml ( config, file ) : if path. isfile ( file ) : with open ( file ) as file : # print'extending config with ', file yamlconfigdata = yaml. load ( file, loader = yaml. fullloader ) # print'yamlconfigdata : ', yamlconfigdata config. update ( yamlconfigdata ) | [
0.7713044881820679,
-0.9615204334259033,
0.7669569253921509,
0.14175331592559814,
-0.8540754914283752,
0.21830415725708008,
-0.23287732899188995,
1.7414824962615967,
-0.04706072807312012,
0.5036858320236206,
-0.961029052734375,
0.28274863958358765,
0.6456489562988281,
1.1002185344696045,
... |
def compute _ diameter ( adjacency ) : # number of nodes in the graph list _ of _ nodes = np. where ( np. sum ( adjacency, axis = 1 ) > 0 ) [ 0 ] # initialize diameter to be 0 diameter = 0 for _, node in enumerate ( list _ of _ nodes ) : shortest _ path _ lengths = compute _ shortest _ path _ lengths ( adjacency, node ... | [
0.3526199460029602,
0.5512258410453796,
0.7657219171524048,
0.4423123300075531,
0.030632680281996727,
-0.010405749082565308,
0.9519033432006836,
0.4199201166629791,
1.067665696144104,
0.9447208642959595,
0.7708073854446411,
0.0039994120597839355,
-0.33870741724967957,
0.5997694730758667,
... |
def strip _ boolean _ result ( method, exc _ type = none, exc _ str = none, fail _ ret = none ) : @ functools. wraps ( method ) def wrapped ( * args, * * kwargs ) : ret = method ( * args, * * kwargs ) if ret [ 0 ] : if len ( ret ) = = 2 : return ret [ 1 ] else : return ret [ 1 : ] else : if exc _ type : raise exc _ typ... | [
-0.3243839740753174,
-0.4408254623413086,
0.6990735530853271,
0.647555947303772,
-0.517223596572876,
-0.030431624501943588,
-0.2644108533859253,
-0.0420965850353241,
0.07597513496875763,
0.5667845606803894,
0.8172332048416138,
0.6202475428581238,
-0.546484649181366,
-0.18740102648735046,
... |
def os2ip ( os : bytearray, byteorder ='big') - > int : return int. from _ bytes ( os, byteorder = byteorder ) | [
-0.999842643737793,
-0.03643171861767769,
0.36662814021110535,
-0.2627894878387451,
-1.154685378074646,
-0.30072706937789917,
-0.2161748856306076,
0.6973597407341003,
0.8102743029594421,
0.059761397540569305,
-0.8757893443107605,
0.14446015655994415,
0.2212255448102951,
-0.5687991380691528... |
def snmp _ device ( hostname, community = " public ", oid = ". 1. 3. 6. 1. 2. 1. 1 " ) : task = get _ queue ( ). enqueue ( task _ snmp, args = ( hostname, community, oid ) ) response _ object = {'status':'error ','data': {'task _ id':'' } } if task : response _ object = {'status':'success ','data': {'task _ id': task. ... | [
-0.28991129994392395,
-0.13322684168815613,
0.8059611320495605,
0.8114525079727173,
-0.11076352745294571,
-0.6742614507675171,
-0.1125783696770668,
-0.261761337518692,
-0.15190696716308594,
0.7079631090164185,
-0.8911168575286865,
0.44765082001686096,
-0.30236372351646423,
0.37867972254753... |
def test _ atomic _ language _ white _ space _ nistxml _ sv _ iv _ atomic _ language _ white _ space _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - whitespace - 1. xsd ", instance = " nistdat... | [
-0.20297212898731232,
-0.21694643795490265,
0.2985810339450836,
0.09947019815444946,
-0.4416191577911377,
0.020354129374027252,
0.7677097320556641,
-0.5674120783805847,
0.5471544861793518,
0.8225942254066467,
-0.03661653399467468,
0.17340770363807678,
-0.2885201573371887,
1.021960258483886... |
def get _ filtered _ subgraph _ view ( graph : nx. graph, query _ paramses : sequence [ " graphqueryparams " ] ) - > nx. graph : res = deepcopy ( graph ) for query _ params in query _ paramses : res = _ get _ single _ filtered _ subgraph ( res, query _ params ) return res | [
0.1673251986503601,
0.9718483686447144,
0.398701548576355,
0.9843363165855408,
-0.9638401865959167,
0.17421452701091766,
0.2571543753147125,
-0.07370685786008835,
-0.12090594321489334,
-0.2135288119316101,
0.45578432083129883,
0.8086544275283813,
0.08641880750656128,
-1.3803623914718628,
... |
def example ( cls ) : return cls ( u'- 11 0 \ n'u'3 - 1 \ n'u'- 1 - 1') | [
0.8151546716690063,
-0.2751379609107971,
0.4493612051010132,
0.5018516778945923,
-0.8276444673538208,
0.39868444204330444,
-0.4279334843158722,
0.3385835587978363,
1.1558119058609009,
-0.36791661381721497,
-0.8612725734710693,
0.4897831380367279,
-0.20796822011470795,
-1.2073179483413696,
... |
def test _ list _ decimal _ length _ nistxml _ sv _ iv _ list _ decimal _ length _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - length - 1. xsd ", instance = " nistdata / list / decimal / schema + ... | [
-0.13918240368366241,
0.12012800574302673,
0.46307310461997986,
0.5196788311004639,
0.2271105945110321,
0.22714899480342865,
-0.14927738904953003,
0.6722899675369263,
1.306198239326477,
0.25607866048812866,
-0.9672123789787292,
-0.8320227265357971,
-0.2603721618652344,
0.46684014797210693,... |
def setbraillefocus ( region, pantofocus = true, getlinkmask = true ) : braille. setfocus ( region, pantofocus, getlinkmask ) | [
0.2889367640018463,
-1.2247729301452637,
0.4308188557624817,
-0.06829139590263367,
0.34822529554367065,
0.16435709595680237,
0.6799654364585876,
-0.24753737449645996,
0.11912893503904343,
-1.1152726411819458,
-0.8002444505691528,
1.0115326642990112,
-0.39631280303001404,
-0.159134969115257... |
def _ parse ( self, data ) : # return is a list of imported css links. # this subroutine uses the specification mentioned at # http : / / www. w3. org / tr / rec - css2 / cascade. html # at - import # for doing stylesheet imports. # this takes care of @ import " style. css " and # @ import url ( " style. css " ) and ur... | [
-0.3444939851760864,
-0.29275745153427124,
0.4662022292613983,
-0.2551482617855072,
-0.16469453275203705,
0.27535396814346313,
-0.20625099539756775,
0.11944014579057693,
0.00847828108817339,
-0.456329345703125,
-0.3374755084514618,
-0.03557927533984184,
-0.19119960069656372,
0.608858406543... |
def findgenotype ( rsid, filename ) : # project1. findgenotype ('i3001931 ','mygenome. txt') with open ( filename,'rt') as fin : for line in fin : if ( rsid = = line. split ( ) [ 0 ] ) : return line. split ( ) [ 3 ] | [
0.19932296872138977,
-0.31643834710121155,
0.5136637687683105,
-0.024287300184369087,
0.0551379919052124,
-0.26657548546791077,
0.25209373235702515,
-0.11741216480731964,
-0.6302071809768677,
0.6858683824539185,
0.19926682114601135,
0.1925733983516693,
-1.0471558570861816,
0.21933145821094... |
def credential _ id ( self, credential _ id ) : self. _ credential _ id = credential _ id | [
1.4519505500793457,
-1.2784117460250854,
-0.30097782611846924,
0.3067854642868042,
0.5733740925788879,
0.6285617351531982,
0.11873065680265427,
1.7711596488952637,
0.5410038828849792,
-0.028326673433184624,
-1.236321210861206,
1.1484366655349731,
-0.0607999712228775,
0.5923462510108948,
... |
def _ evaluate _ for _ shape ( self ) : child _ eval = self. children [ 0 ]. evaluate _ for _ shape ( ) vec = pybamm. evaluate _ for _ shape _ using _ domain ( self. domains [ " secondary " ] ) return np. outer ( vec, child _ eval ). reshape ( - 1, 1 ) | [
0.40378719568252563,
-0.4734317660331726,
0.45619863271713257,
-1.0221929550170898,
0.7110489010810852,
-0.541335940361023,
0.2930588126182556,
0.2659178376197815,
-0.7404061555862427,
-0.7197842001914978,
-0.11363937705755234,
1.0233676433563232,
0.6480374932289124,
0.38491934537887573,
... |
async def test _ step _ user ( hass : homeassistant ) - > none : with patch ( " pynina. baseapi. baseapi. _ makerequest ", wraps = mocked _ request _ function, ), patch ( " homeassistant. components. nina. async _ setup _ entry ", return _ value = true, ) : result : dict [ str, any ] = await hass. config _ entries. flo... | [
-0.5084168314933777,
0.970400333404541,
0.39800095558166504,
0.4037800133228302,
0.5070817470550537,
0.3526713252067566,
0.20523470640182495,
-0.36744457483291626,
0.29425811767578125,
-0.6975027918815613,
-0.9150485992431641,
0.5430472493171692,
0.6733080744743347,
0.4661162197589874,
0... |
def draw _ box _ horizontal ( x = 1, y = 1, width = 80, height = 1, fore _ colour = 39, back _ colour = 49 ) : # call check for valid colours and force correction if required fore _ colour, back _ colour = colour _ check ( fore _ colour, back _ colour ) # set foreground and background colours print ( " { } { } m { } { ... | [
0.06263966113328934,
0.7554730176925659,
0.7662323117256165,
-0.5963699817657471,
0.06874372810125351,
0.27341723442077637,
-0.6493257880210876,
-0.2462288737297058,
-0.5058609247207642,
-0.21065834164619446,
-0.1292135864496231,
0.32241153717041016,
-0.09383921325206757,
0.187205180525779... |
def start _ encoding ( encoding ) : auto _ representations = autorepresentation ( ) h264 _ per _ title _ configuration = h264pertitleconfiguration ( auto _ representations = auto _ representations ) per _ title = pertitle ( h264 _ configuration = h264 _ per _ title _ configuration ) start _ encoding _ request = starten... | [
-0.3055762052536011,
-0.0669926255941391,
0.5046039819717407,
1.264309048652649,
-0.06254219263792038,
-0.15098273754119873,
0.0828481987118721,
-0.13615582883358002,
0.2285504937171936,
-0.41730135679244995,
-0.8297905921936035,
0.2911204993724823,
-0.0890721008181572,
0.4662429094314575,... |
def print _ networks ( self, verbose ) : print ('- - - - - - - - - - networks initialized - - - - - - - - - - - - -') for name in self. model _ names : if isinstance ( name, str ) : net = getattr ( self, name ) num _ params = 0 for param in net. parameters ( ) : num _ params + = param. numel ( ) if verbose : print ( ne... | [
0.07545829564332962,
0.1458236277103424,
0.7793072462081909,
0.17190666496753693,
0.7423609495162964,
0.28420916199684143,
0.6617351174354553,
-0.749171793460846,
-0.5355645418167114,
-0.02886286936700344,
-0.6803653240203857,
0.08098088204860687,
0.19120392203330994,
1.279906988143921,
... |
def write _ versionfile ( ) : versionfile = os. path. join ( basedir,'version. py') text ='''" " " version information for networkx, created during installation. do not add this file to the repository. " " " import datetime version = % ( version ) r date = % ( date ) r # was networkx built from a development version? i... | [
0.15312308073043823,
-0.6357590556144714,
0.5806892514228821,
0.571512758731842,
1.0126862525939941,
0.30362603068351746,
0.5598306059837341,
-0.03181864321231842,
-0.4085550606250763,
0.002037022728472948,
-0.31649211049079895,
-0.9106156826019287,
0.6149246096611023,
0.33037450909614563,... |
def vgg16 ( num _ classes = 10 ) : model = vgg ( cfg ['vgg16'], num _ classes ) return model | [
0.6895125508308411,
1.4795926809310913,
0.09495699405670166,
0.8374698162078857,
0.6489174365997314,
0.21819165349006653,
-0.33727672696113586,
0.6971097588539124,
-0.44323965907096863,
0.0020329593680799007,
-0.618876576423645,
-0.12346334755420685,
0.2503068745136261,
-0.5589990615844727... |
def _ _ init _ _ ( self, type = none, features = none, features _ eq = none, text = none ) : # pylint : disable = w0622 self. type = type if features _ eq is not none : if callable ( features _ eq ) : self. features _ matcher = features _ eq else : self. features _ matcher = featureeqmatcher ( * * features _ eq ) elif ... | [
-0.21399380266666412,
-0.6235206127166748,
0.7797101140022278,
0.6543045043945312,
-0.045081976801157,
-0.5160157680511475,
-0.1260804831981659,
0.9899289011955261,
0.2610744833946228,
-0.7998009324073792,
-0.18334034085273743,
-0.09669101983308792,
-0.1836010366678238,
1.418007254600525,
... |
def application _ tags ( self, application _ tags ) : self. _ application _ tags = application _ tags | [
0.5012943744659424,
0.00032075968920253217,
-0.05487805977463722,
0.9506933093070984,
0.41780826449394226,
0.6558600068092346,
-0.5080991387367249,
0.29170548915863037,
-0.7559041380882263,
0.17047522962093353,
-0.6810526251792908,
-0.06344031542539597,
0.4215010702610016,
1.26868975162506... |
def deparallelize ( self ) : if hasattr ( self. plm, " deparallelize " ) : self. plm. deparallelize ( ) self. device _ map = none self. template. cpu ( ) self. verbalizer. cpu ( ) else : raise notimplementederror ( " parallelize method was not implemented for this plm. " ) | [
0.11578173190355301,
0.16006475687026978,
0.6478609442710876,
-0.15424345433712006,
-0.26786336302757263,
-0.686414361000061,
0.7846904993057251,
0.7662733197212219,
-0.45130425691604614,
-1.0412850379943848,
0.28294676542282104,
-0.009182293899357319,
-1.3123173713684082,
0.21915175020694... |
def make _ loopable ( clip, cross ) : d = clip. duration clip2 = clip. fx ( transfx. crossfadein, cross ). \ set _ start ( d - cross ) return compositevideoclip ( [ clip, clip2 ] ). \ subclip ( cross, d ) | [
0.24851484596729279,
0.08191180229187012,
0.6011967658996582,
0.9528470635414124,
-1.0902117490768433,
0.589568018913269,
-0.10496553033590317,
-0.08040368556976318,
-0.019720152020454407,
0.5489569306373596,
-0.21232646703720093,
1.1298837661743164,
0.3648102879524231,
-0.9349442720413208... |
def p ( ax, col, dropped ) : gray _ light ='# d4d4d4'model = sm. ols ( dropped ['kwh'], sm. add _ constant ( dropped [ col ] ) ) res = model. fit ( ) # dots ax. plot ( dropped [ col ], dropped ['kwh'], '. ', color = gray _ light, alpha = 1. 0 ) # line h, = ax. plot ( [ min ( dropped [ col ] ), max ( dropped [ col ] ) ]... | [
0.3513976037502289,
0.38372257351875305,
0.7507462501525879,
-0.8268625736236572,
-0.17661277949810028,
1.0245407819747925,
0.0816613957285881,
-0.3703191876411438,
0.0883660614490509,
0.0018750837771221995,
0.4426197111606598,
1.0317434072494507,
0.772246241569519,
-0.5395827293395996,
... |
def additem ( self, item ) : try : self. tree. additem ( item ) except attributeerror, e : raise versionerror ('saved versions are immutable') | [
-0.2368682622909546,
0.11664154380559921,
0.507012128829956,
0.9571190476417542,
0.8949655890464783,
1.4273478984832764,
-0.24052102863788605,
-0.08098803460597992,
0.6209567189216614,
0.7489287853240967,
-0.7478513717651367,
0.08764669299125671,
-0.4131108522415161,
0.3297354578971863,
... |
def merge _ likelihood _ headers ( filenames, outfile, * * kwargs ) : import fitsio filenames = np. atleast _ 1d ( filenames ) ext ='pix _ data'nside = fitsio. read _ header ( filenames [ 0 ], ext = ext ) ['lkdnside'] keys = ['lkdpix ','stellar ','ninside ','nannulus'] data _ dict = fileio. load _ headers ( filenames, ... | [
-0.5472411513328552,
-0.9728916883468628,
0.6712799668312073,
-0.425670862197876,
-0.5378732085227966,
0.4285827577114105,
-0.7466678619384766,
0.005341425072401762,
-0.3660751283168793,
-0.41126397252082825,
-0.24623674154281616,
0.09681560844182968,
-0.38745424151420593,
0.58289361000061... |
def fromlist ( cls, elems, * * kwargs ) : if not ('m'in kwargs or'n'in kwargs ) : raise valueerror ( " at least one of m and n must be specified " ) m = kwargs ['m'] n = kwargs ['n'] if m * n! = len ( elems ) : raise valueerror ( " dimension does not match number of elements in " " list " ) obj = matrix ( m, m, init = ... | [
-0.5066714882850647,
-0.2533945143222809,
0.438578337430954,
0.7473253011703491,
-0.5095266699790955,
0.7116353511810303,
-0.013782646507024765,
0.624605655670166,
0.9547191858291626,
-0.8110840320587158,
-0.6586851477622986,
-0.15453723073005676,
-0.3815935254096985,
0.7846539616584778,
... |
def is _ valid ( tokens, variables ) : # validate the variable name if not re. fullmatch ( r " [ a - za - z ] [ a - za - z0 - 9 ] * ", tokens [ 0 ] ) : return false # validate the statement length if len ( tokens ) < 3 : return false # validate last token if re. match ( r " ( \ + | - ) ", tokens [ - 1 ] ) : return fals... | [
-0.7481513023376465,
-0.33461061120033264,
0.6944308876991272,
-0.2166668325662613,
-1.3065671920776367,
0.22248324751853943,
-0.5391688346862793,
-0.06589324027299881,
-0.5988397002220154,
0.36177632212638855,
-0.02156161144375801,
-0.4141997694969177,
-0.9372394680976868,
-0.065186657011... |
def bs _ mapping ( data : dict, df _ temp : object, bs _ data : dict ) - > dict : # print ( bs _ data ) global year _ count _ bs global scenario _ flag _ bs, tradepayable _ pos, bs _ graph _ output template _ code = data ['source'] ['templateurl']. split ('/') [ - 2 ] print ('- - - - - - - - - - - - - - - - - - - - - -... | [
-0.523378849029541,
-0.29424768686294556,
0.780100405216217,
0.2244267761707306,
-0.07835900783538818,
0.18258360028266907,
0.2382422536611557,
0.37767189741134644,
-0.25484052300453186,
0.06294287741184235,
-0.16257458925247192,
0.12503021955490112,
0.5332155823707581,
0.00834980886429548... |
def open ( self, path, mime _ type ='application / octet - stream ', compression _ type = compressiontypes. auto ) : # type : (... ) - > binaryio raise notimplementederror | [
0.05341889709234238,
-0.17810966074466705,
0.6605269908905029,
0.9002953767776489,
-0.5144449472427368,
0.5317488312721252,
0.4350854456424713,
-0.2669711709022522,
-0.5733014345169067,
-0.36641862988471985,
-0.43700313568115234,
0.11229753494262695,
-0.2904209792613983,
-0.305591225624084... |
def test _ ensure _ device _ role _ assigned ( self ) : device _ role = devicerole. objects. create ( name = " firewall ", slug = " firewall " ) onboarding _ kwargs = { " netdev _ hostname " : " device1 ", " netdev _ nb _ role _ slug " : device _ role. slug, " netdev _ nb _ role _ color " : plugin _ settings [ " defaul... | [
-0.21284818649291992,
0.9462311863899231,
0.22779110074043274,
0.43797531723976135,
1.2483044862747192,
0.3171282112598419,
0.4638616740703583,
-0.4412272274494171,
-0.3299054503440857,
-0.45459166169166565,
-0.7057298421859741,
-0.7984430193901062,
0.2114456593990326,
1.5010473728179932,
... |
def to _ python ( self, value ) : if value in validators. empty _ values : return self. default if isinstance ( value, datetime. datetime ) : return from _ current _ timezone ( value ) if isinstance ( value, datetime. date ) : result = datetime. datetime ( value. year, value. month, value. day ) return from _ current _... | [
-1.0343214273452759,
0.3319694697856903,
0.514275074005127,
0.3494841158390045,
0.08111487329006195,
0.2909848690032959,
-0.10886602103710175,
-0.461900919675827,
0.3114522695541382,
0.1087827980518341,
-0.9614256024360657,
-0.440891832113266,
-0.6353407502174377,
0.43248942494392395,
-0... |
def extract _ shape ( settings ) : shapefile = settings. get ('shapefile ','' ) if not os. path. exists ( shapefile ) : raise recipeerror ( " in preprocessor function ` extract _ shape ` : " f " unable to find'shapefile : { shapefile }'" ) valid = {'method': {'contains ','representative'},'crop': { true, false }, } for... | [
0.02077523060142994,
0.22389620542526245,
0.5206812620162964,
-0.10725127160549164,
0.2949868142604828,
-0.05182071775197983,
0.09728098660707474,
-0.03215900808572769,
-0.3731141984462738,
1.2471414804458618,
-0.043400127440690994,
-0.18091537058353424,
0.2853330075740814,
0.1577877849340... |
def launch ( func, args, nprocs, master _ addr = " localhost ", master _ port = none ) : if master _ port is none : master _ port = free _ port ( ) # set pytorch distributed related environmental variables # note : in contrast to subprocess. popen, # explicit environment variables can not be specified. # it's necessary... | [
0.23997032642364502,
-0.45848292112350464,
0.8534305691719055,
0.0470467284321785,
-0.07494121044874191,
0.031063901260495186,
0.7672527432441711,
0.3373684883117676,
-0.2917730510234833,
0.16336689889431,
-0.06869219243526459,
0.044463369995355606,
0.4832543134689331,
0.09278982132673264,... |
def test _ list _ insert _ with _ incorrect _ policy ( self ) : key = ('test ','demo ', 1 ) policy = {'timeout': 0. 5 } try : testlistinsert. client. list _ insert ( key, " age ", 6, " str ", { }, policy ) except e. paramerror as exception : assert exception. code = = - 2 assert exception. msg = = " timeout is invalid ... | [
-0.27169376611709595,
0.41563183069229126,
0.336009681224823,
0.2687407433986664,
0.2675535976886749,
1.1220426559448242,
-0.7368427515029907,
0.8443913459777832,
-0.026855479925870895,
1.984001636505127,
-0.9039744734764099,
-0.25081560015678406,
-0.9870947003364563,
0.9890292286872864,
... |
def update _ user _ pool _ client ( userpoolid = none, clientid = none, clientname = none, refreshtokenvalidity = none, readattributes = none, writeattributes = none, explicitauthflows = none, supportedidentityproviders = none, callbackurls = none, logouturls = none, defaultredirecturi = none, allowedoauthflows = none,... | [
-0.7666122317314148,
-1.2025697231292725,
0.3513047993183136,
0.29915687441825867,
-0.9307270646095276,
0.5744413137435913,
1.11379075050354,
-0.6695045828819275,
1.6337286233901978,
0.04014979302883148,
-0.8229976892471313,
1.2051246166229248,
-0.8442805409431458,
-1.0286656618118286,
0... |
def blitme ( self ) : self. screen. blit ( self. image, self. rect ) | [
-0.08987116813659668,
-0.5932055115699768,
0.3149905502796173,
-0.20226497948169708,
0.8673437237739563,
0.8961293697357178,
0.49119797348976135,
-1.079455852508545,
-0.5741405487060547,
-0.30986765027046204,
0.7610202431678772,
0.2824253737926483,
-0.10855578631162643,
0.5611348748207092,... |
def shopify _ prepare _ variant _ vals ( self, instance, variant, is _ set _ price, is _ set _ basic _ detail ) : variant _ vals = { } if variant. variant _ id : variant _ vals. update ( { " id " : variant. variant _ id } ) if is _ set _ price : price = instance. shopify _ pricelist _ id. get _ product _ price ( varian... | [
-0.6862474083900452,
-0.19525952637195587,
0.3304380178451538,
0.022387156262993813,
0.08728247880935669,
0.2162637710571289,
-0.6354568600654602,
-0.5504360795021057,
0.06329776346683502,
0.874994695186615,
-1.03941011428833,
-0.16569580137729645,
0.872202455997467,
0.21007750928401947,
... |
def test _ _ get _ data ( self ) : pytrend = trendreq ( ) self. assertequal ( pytrend. hl,'en - us') self. assertequal ( pytrend. tz, 360 ) self. assertequal ( pytrend. geo,'' ) self. asserttrue ( pytrend. cookies ['nid'] ) | [
-0.8090112209320068,
-0.10124995559453964,
0.1947312206029892,
-0.5348181128501892,
0.9366093277931213,
0.6793822646141052,
-0.47092992067337036,
-0.5132870674133301,
-0.3323429226875305,
-0.9842882752418518,
-0.7857462167739868,
0.2804471254348755,
0.33025068044662476,
-0.0461038984358310... |
def test _ atomic _ language _ pattern _ 4 _ nistxml _ sv _ iv _ atomic _ language _ pattern _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - pattern - 5. xsd ", instance = " nistdata / atomic ... | [
0.07754747569561005,
0.01693703420460224,
0.39805909991264343,
0.4020453691482544,
-0.6024604439735413,
0.33902859687805176,
0.04491236433386803,
-0.27515870332717896,
0.08546445518732071,
0.9060758352279663,
-0.49454042315483093,
-0.4060033857822418,
-0.6097651720046997,
-0.22414594888687... |
def underharness ( f ) : def testfun ( self ) : computedgraphtestharness ( ). executetestnoarg ( lambda : f ( self ) ) testfun. _ _ name _ _ = f. _ _ name _ _ return testfun | [
0.46333664655685425,
0.15550865232944489,
0.49138742685317993,
-0.587360143661499,
0.34136563539505005,
-0.1174626499414444,
1.2136391401290894,
0.08950832486152649,
-0.39053091406822205,
-0.9586917757987976,
-0.2956562638282776,
0.5035651922225952,
0.11133652925491333,
0.16392825543880463... |
def get _ coords ( points, dim _ img ) : if points = = [ ] : return [ ] xmin = points [ :, 0 ]. min ( ) xmax = points [ :, 0 ]. max ( ) ymin = points [ :, 1 ]. min ( ) ymax = points [ :, 1 ]. max ( ) xmid = ( ( xmin + xmax ) / 2 ) / dim _ img [ 1 ] ymid = ( ( ymin + ymax ) / 2 ) / dim _ img [ 0 ] width = ( xmax - xmin ... | [
-0.25296783447265625,
-0.23800857365131378,
0.6735253930091858,
0.6691583395004272,
-0.37863004207611084,
-0.3624607026576996,
-0.33259910345077515,
0.415851891040802,
0.35821622610092163,
0.6326751112937927,
-0.5988076329231262,
-0.7150148153305054,
0.11158223450183868,
0.2291369736194610... |
def status ( self, status ) : allowed _ values = [ " enabled ", " disabled " ] # noqa : e501 if status not in allowed _ values : raise valueerror ( " invalid value for ` status ` ( { 0 } ), must be one of { 1 } " # noqa : e501. format ( status, allowed _ values ) ) self. _ status = status | [
0.3419695794582367,
-0.044200699776411057,
-0.45921847224235535,
0.8097566366195679,
-0.39174723625183105,
0.938549816608429,
-0.0811111256480217,
1.6179475784301758,
0.1882699877023697,
0.05512366443872452,
-0.8655903339385986,
0.11519160866737366,
-0.269876092672348,
0.36396029591560364,... |
def jsonify _ no _ content ( status ) - > response : response = flask. json. jsonify ('' ) response. status = status return response | [
-0.9493879079818726,
-1.1546941995620728,
0.398814857006073,
-1.0670154094696045,
-0.8500869274139404,
-0.47428274154663086,
-0.47146669030189514,
-0.37879839539527893,
-0.20778712630271912,
0.020157981663942337,
-1.4525737762451172,
0.20350056886672974,
0.22927266359329224,
-0.19159239530... |
def stop ( self ) - > none : logger. debug ( " stopping... " ) if not self. is _ alive ( ) : # pragma : nocover return if self. _ loop. is _ running ( ) : logger. debug ( " stopping loop... " ) self. _ loop. call _ soon _ threadsafe ( self. _ loop. stop ) logger. debug ( " wait thread to join... " ) self. join ( 10 ) l... | [
-0.32375308871269226,
-0.1241990178823471,
0.4352085292339325,
0.1911868155002594,
0.9288610816001892,
0.5564357042312622,
0.18291610479354858,
0.2727711498737335,
-0.6518142223358154,
0.2570447027683258,
-0.5258458256721497,
-0.2750283181667328,
-0.8691203594207764,
0.19131609797477722,
... |
def key _ value ( dic ) : keys = list ( dic. keys ( ) ) values = list ( dic. values ( ) ) return keys, values | [
-0.6921377778053284,
-0.5718151926994324,
0.37237057089805603,
-0.8049291372299194,
-0.16846522688865662,
0.19195112586021423,
-0.5176711082458496,
1.0750741958618164,
0.02694707177579403,
0.3870297968387604,
0.17664292454719543,
-0.05864578112959862,
1.5049893856048584,
1.1337316036224365... |
def get _ active _ version _ manager _ by _ user _ id ( user _ id, _ cls = true ) : return templateversionmanager. get _ active _ version _ manager _ by _ user _ id ( user _ id, _ cls ) | [
-0.3463224172592163,
-1.318520426750183,
0.16496406495571136,
0.7270835638046265,
-0.48851490020751953,
-0.1043381318449974,
0.16500888764858246,
-0.5253884792327881,
0.4795078635215759,
-0.26221194863319397,
-0.37857285141944885,
1.017569899559021,
0.13508321344852448,
0.46859210729599,
... |
def momentum _ gradient _ descent _ step ( x, update _ x, nit, mom _ t _ change, mom _ init, mom _ fin, stepsize, grad ) : if nit < mom _ t _ change : mom = mom _ init else : mom = mom _ fin update _ x = mom * update _ x - ( 1 - mom ) * stepsize * grad x + = update _ x return x, update _ x | [
0.1436130553483963,
-0.471171110868454,
0.43178820610046387,
0.35236039757728577,
-0.508975088596344,
0.452843576669693,
-0.731403648853302,
0.13924945890903473,
-0.495133638381958,
-0.01898760348558426,
-0.06326726078987122,
-0.025246625766158104,
-0.527233362197876,
1.3781496286392212,
... |
def wait _ for _ copying _ to _ begin ( self ) : pass | [
-0.38471275568008423,
-0.8484144806861877,
0.6779041290283203,
0.46094533801078796,
-0.9320571422576904,
1.096240758895874,
0.7806134819984436,
0.38572338223457336,
-0.0050051528960466385,
0.2506689131259918,
0.11828579008579254,
0.8261486291885376,
0.20738579332828522,
-0.0434660464525222... |
def _ add _ mac _ token ( self, uri, http _ method ='get ', body = none, headers = none, token _ placement = auth _ header, ext = none, * * kwargs ) : headers = tokens. prepare _ mac _ header ( self. access _ token, uri, self. mac _ key, http _ method, headers = headers, body = body, ext = ext, hash _ algorithm = self.... | [
-0.8039369583129883,
0.09177157282829285,
0.6163126230239868,
-0.4521651268005371,
-0.6126712560653687,
-0.4291000962257385,
-1.2629603147506714,
0.3617943227291107,
0.028691666200757027,
-0.9261413216590881,
0.5476312637329102,
0.19094359874725342,
-0.02992597594857216,
-0.354349106550216... |
def testremovingweightlessmode ( self ) : ssd = self. added ( ) op = iecorescene. removesmoothskinninginfluencesop ( ) op. parameters ( ) ['input']. setvalue ( ssd ) op. parameters ( ) ['mode']. setvalue ( iecorescene. removesmoothskinninginfluencesop. mode. weightless ) result = op. operate ( ) self. assertnotequal ( ... | [
0.4091002643108368,
-0.03252777084708214,
0.8181793689727783,
-0.6652060151100159,
-0.31674471497535706,
0.4716792106628418,
0.9960305094718933,
0.17918358743190765,
0.10121636092662811,
-0.7242505550384521,
-0.8173178434371948,
-0.14311747252941132,
-0.4594830274581909,
-0.237502008676528... |
def create _ test _ runner ( self, module _ text, parameters, parameter _ text, environment ) : args = namespace ( ) args. name ='test'args. environments = [ environment ] migrator _ dir = path ( self. dir, environment ) migrator _ dir. mkdir ( ) migrator. main. create ( args ) expected = " " " \ " \ " \ " { 0 } \ " \ ... | [
0.25285208225250244,
0.28979939222335815,
0.7751136422157288,
0.16207841038703918,
0.7253857254981995,
0.6201099753379822,
0.6100645065307617,
-0.05003286525607109,
-0.06882664561271667,
0.1805805265903473,
-0.03918563947081566,
0.09813922643661499,
-1.37679123878479,
0.599719226360321,
... |
def delete _ user _ pool _ client ( userpoolid = none, clientid = none ) : pass | [
-0.25748929381370544,
-0.7602546811103821,
-0.04553210735321045,
0.7884408831596375,
-0.5178262591362,
0.8571503758430481,
1.119646668434143,
-0.601712703704834,
0.6295754909515381,
0.04408881813287735,
-0.751616358757019,
1.5480151176452637,
-0.8542696237564087,
-0.48630332946777344,
-0... |
def substringmatchonesub ( key, target ) : allanswers = ( ) for miss in range ( 0, len ( key ) ) : # miss picks location for missing element # key1 and key2 are substrings to match key1 = key [ : miss ] key2 = key [ miss + 1 : ] # print'breaking key ', key,'into ', key1, key2 # match1 and match2 are tuples of locations... | [
-0.559563398361206,
-0.5005049705505371,
0.8382203578948975,
0.051000289618968964,
-1.0038013458251953,
0.3961160480976105,
-0.011731287464499474,
-0.10447321832180023,
-0.595075786113739,
1.007240653038025,
-0.004864218179136515,
0.24540051817893982,
0.28409168124198914,
-0.58703309297561... |
def write _ csv ( data _ dictionary ) : # csv file path and name csv _ file _ path = get _ csv _ file _ path ( ) file _ name = csv _ file _ path. joinpath ( data _ dictionary ['last name'] + '. csv') # column names fieldnames = ['first name ','last name ','description ','quantity shipped ','unit price ','amount ','orde... | [
-0.5594041347503662,
-0.656856119632721,
0.8376342058181763,
-0.7505722045898438,
0.2865558862686157,
0.40726086497306824,
-0.06907028704881668,
0.21557360887527466,
-0.017667200416326523,
-0.1464884877204895,
-0.503381609916687,
0.4837561249732971,
1.0039417743682861,
-0.5401056408882141,... |
def label _ mask ( y, y _ hat ) : batch _ size = np. shape ( y ) [ 1 ] max _ len = max ( len ( y ), len ( y _ hat ) ) mask = torch. ones ( max _ len, batch _ size, device = device ) for i in range ( batch _ size ) : try : y _ hat _ index = np. where ( y _ hat [ :, i ] = = 1 ) [ 0 ] [ 0 ] y _ index = np. where ( y [ :, ... | [
-0.6625832915306091,
-1.3759945631027222,
0.9356090426445007,
0.6677895188331604,
0.5524197220802307,
0.3331371545791626,
0.42826277017593384,
-0.14651945233345032,
0.1942858099937439,
0.6266106367111206,
-0.36854732036590576,
0.7135803699493408,
0.5474126935005188,
0.38173335790634155,
... |
def teardown ( error ) : storage. close ( ) | [
0.6669309735298157,
-0.6231000423431396,
0.19271866977214813,
0.3912961483001709,
0.31314828991889954,
0.7994725108146667,
1.2742096185684204,
-0.058610931038856506,
0.5640554428100586,
0.053270477801561356,
0.6989395022392273,
-0.044496189802885056,
-0.5967028737068176,
-0.391549736261367... |
def transpose ( self ) : m, n = self. n, self. m res = matrix ( m, n, init = false ) res. data = [ list ( col ) for col in zip ( * self. data ) ] return res | [
-0.4015401303768158,
-0.43546968698501587,
0.29703113436698914,
-0.5560160279273987,
0.2286471426486969,
-0.9128043055534363,
0.002799052046611905,
-0.00821289699524641,
0.1326717734336853,
-0.41106531023979187,
-0.4153308868408203,
-0.3186449110507965,
-0.6901816725730896,
-0.003233351744... |
def test _ create _ cve ( ) : with open ( '. / src / test / cve _ tests / cve _ record _ fixtures / cve - 2000 - 0008 _ published. json') as json _ file : data = json. load ( json _ file ) res = requests. post ( f'{ env. awg _ base _ url } { cve _ url } / { create _ cve _ id } ', headers = utils. base _ headers, json =... | [
0.5942806601524353,
-0.42843130230903625,
0.5546436905860901,
-0.031767264008522034,
1.245984673500061,
0.8327473402023315,
-0.7848047614097595,
-0.024867909029126167,
-0.28581416606903076,
0.18352030217647552,
-0.7187183499336243,
0.5157745480537415,
-0.2397184520959854,
0.196119204163551... |
def _ composite _ table ( pa, pb, ta, tb ) : columns = [ ] for table _ name, table _ obj in zip ( ( pa, pb ), ( ta, tb ) ) : iterator = iter ( table _ obj ) names = next ( iterator ) types = map ( lambda item : item [ 1 ], table _ obj. schema ) for column _ name, column _ type in zip ( names, types ) : if table _ name!... | [
-0.37610819935798645,
-0.3081006109714508,
0.5842000842094421,
-0.009665350429713726,
0.49723106622695923,
0.8810568451881409,
0.20304358005523682,
-0.41666752099990845,
-0.7630735039710999,
0.31870734691619873,
0.37304598093032837,
-0.5801790952682495,
0.1851249486207962,
-0.5389472842216... |
def change _ to _ id ( obj ) : obj ['id'] = obj. pop ('uuid') return obj | [
-1.0385020971298218,
-0.9579179286956787,
0.3559442460536957,
-0.49260950088500977,
-0.07476723939180374,
0.5396787524223328,
-0.4282214939594269,
1.3318190574645996,
0.7047125101089478,
1.6427981853485107,
-1.219939947128296,
0.06844614446163177,
-0.18845179677009583,
-1.6890273094177246,... |
def objective _ function ( self, mask, annuity _ scalar = 1 ) : # get generic tech objective costs costs = super ( ). objective _ function ( mask, annuity _ scalar ) # add fuel cost expression fuel _ exp = cvx. sum ( cvx. multiply ( self. fuel _ price [ mask ]. values, self. variables _ dict ['dis'] + self. variables _... | [
-1.101046085357666,
0.390562504529953,
0.3821646571159363,
0.9705474972724915,
-0.16472241282463074,
-0.7932339310646057,
-0.7645940184593201,
-0.19732366502285004,
-0.47041621804237366,
0.2806205153465271,
0.36454036831855774,
-0.25116589665412903,
1.3705484867095947,
-0.5186038613319397,... |
def log _ scope _ prefix ( self, name : str = " " ) - > str : if len ( self. _ log _ scopes ) = = 0 : return name return " { } / { } ". format ( " / ". join ( self. _ log _ scopes ), name ) | [
0.2129853516817093,
-0.28521183133125305,
0.9710942506790161,
-0.7393048405647278,
-0.4750312268733978,
0.1758718639612198,
-0.8905122876167297,
-0.6025689244270325,
0.8734810948371887,
1.0560221672058105,
0.5802598595619202,
1.2673646211624146,
-0.3263157904148102,
0.013502568006515503,
... |
def estimate _ count ( cls, session : dbsession ) - > int : return session. execute ( text ( f " select reltuples : : bigint from pg _ class where relname ='{ cls. _ _ tablename _ _ }'" ) ). scalar _ one ( ) | [
0.32331961393356323,
0.7369803190231323,
0.7362164855003357,
-0.4145542085170746,
0.7547369003295898,
-0.10742142796516418,
0.2975938320159912,
0.4052993953227997,
-0.6177588105201721,
0.4300632178783417,
-0.11904490739107132,
0.013762049376964569,
-0.4378814697265625,
0.36790865659713745,... |
def power _ spectrum ( img : ndarray, axes : optional [ sequence [ int ] ] = none, smooth : optional [ int ] = 5, taper _ ratio : optional [ float ] = 0. 05, power : int = 2, ) - > ndarray : img _ shape = np. array ( img. shape ) if axes is none : axes = list ( np. arange ( - len ( img _ shape ), 0 ) ) axes _ shape = i... | [
0.6141287684440613,
0.17878951132297516,
0.9131287336349487,
0.27731937170028687,
-0.678607165813446,
-0.6048325300216675,
-0.00003370267586433329,
-0.27181777358055115,
-0.0921567976474762,
0.9311985969543457,
0.7769331336021423,
0.1852821558713913,
0.5924009680747986,
-0.0097492225468158... |
def create _ account ( self, account _ type, currency ) : return self. trading _ api _ request ('post ','/ api / v1 / accounts ', {'type': account _ type,'currency': currency } ) | [
-0.8761857151985168,
0.14150144159793854,
0.26581352949142456,
1.2445013523101807,
0.8870159983634949,
0.5320501327514648,
0.22712606191635132,
-0.7033875584602356,
0.56341552734375,
0.12726394832134247,
-0.19046564400196075,
0.7562762498855591,
-1.4074290990829468,
0.07267376780509949,
... |
def prepare _ request _ uri ( self, uri, redirect _ uri = none, scope = none, state = none, * * kwargs ) : return prepare _ grant _ uri ( uri, self. client _ id,'token ', redirect _ uri = redirect _ uri, state = state, scope = scope, * * kwargs ) | [
-0.5468577146530151,
0.12704259157180786,
0.7059194445610046,
-0.1404096931219101,
-0.4076230227947235,
0.027421128004789352,
-0.15574772655963898,
0.6200205087661743,
1.2961459159851074,
-0.9245437979698181,
0.6784175634384155,
0.6834436655044556,
-0.08483302593231201,
-0.6188249588012695... |
def _ bits _ to _ hex ( bitstring ) : # encrypted changes endiannes of the bitstring, # change the docstring above if encrypt change this behavior encrypted = _ encrypt ( bitstring ) return ( " { : 02x } " * len ( encrypted ) ). format ( * encrypted ) | [
-0.4385133683681488,
-0.0775664895772934,
0.26258036494255066,
-0.7052444815635681,
0.19771188497543335,
0.030434558168053627,
-0.14588502049446106,
-0.521858274936676,
0.05762045830488205,
0.08517034351825714,
-0.6930402517318726,
0.8561310768127441,
0.1940547376871109,
-0.432182610034942... |
def genthermaldiff _ powder ( k, p, c, t ) : # generate thermal conductivity data # then modifiy it according to approximation function return kp ( k ( t ), t, tm ) / ( p ( t ) * c ( t ) ) | [
0.6608659625053406,
-0.35615450143814087,
0.302228182554245,
-0.12424664944410324,
-0.031857334077358246,
1.4957243204116821,
-0.47616973519325256,
1.0132577419281006,
-1.1225579977035522,
1.116129994392395,
-0.4124636948108673,
-0.11454527080059052,
-0.26630643010139465,
-0.04714313894510... |
def findelements ( driver, selector, timeoutinseconds ) : locator, objectstring = sorted ( selector. items ( ) ) [ 0 ] if timeoutinseconds > 0 : waiter = webdriverwait ( driver, timeoutinseconds ) try : return waiter. until ( lambda d : d. find _ elements ( locator, objectstring ), f'cannot find any web element ( { loc... | [
-0.2830834984779358,
-0.5388072729110718,
0.45469337701797485,
0.5211859941482544,
-0.25005894899368286,
-0.647091269493103,
-0.6279121041297913,
-0.5844240188598633,
0.5664764642715454,
0.2115054726600647,
0.5082541704177856,
-0.23181810975074768,
-0.3153810501098633,
0.18005041778087616,... |
def sgx _ get _ quote ( sgx _ report, quote _ type, spid, quote _ nonce = none, sig _ rl = none, sig _ rl _ size = none ) : def val _ or _ none ( v ) : if v : return v. c _ type ( ) else : none c _ sgx _ get _ quote = sgx _ uae _ service _ lib. sgx _ get _ quote c _ sgx _ get _ quote. argtypes = [ pointer ( c _ sgx _ r... | [
0.8395708799362183,
0.12477670609951019,
0.5642852783203125,
0.18675000965595245,
0.196890190243721,
-0.870652973651886,
-0.5308346152305603,
-0.4517568349838257,
0.7129237055778503,
-0.11833979189395905,
0.27544617652893066,
0.40282243490219116,
-0.9600946307182312,
0.045201994478702545,
... |
def test _ list _ decimal _ length _ 1 _ nistxml _ sv _ iv _ list _ decimal _ length _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - length - 2. xsd ", instance = " nistdata / list / decimal / schem... | [
-0.39064812660217285,
-0.4820204973220825,
0.5325788259506226,
0.9369274377822876,
0.06422028690576553,
-0.15582437813282013,
-0.0921935960650444,
0.676967442035675,
0.41643184423446655,
-0.06122427061200142,
-1.1538273096084595,
-0.16707217693328857,
0.32809409499168396,
0.837250590324401... |
def write _ bibliospec ( all _ preds _ in, peprec, params, output _ filename = " ms2pip ", unlog = true, write _ mode ='w + ', return _ stringbuffer = false ) : def get _ last _ scannr ( ssl _ filename ) : " " " return scan number of last line in a bibliospec ssl file. " " " with open ( ssl _ filename,'rt') as ssl : fo... | [
-0.3035668134689331,
-1.2738819122314453,
0.8193381428718567,
-0.2068931758403778,
-0.4864720404148102,
0.22065767645835876,
0.20432120561599731,
0.9300360083580017,
-0.7471610903739929,
0.7540929317474365,
0.04229379817843437,
0.24310559034347534,
0.07252068817615509,
-0.3980482220649719,... |
def _ _ call _ _ ( self, features ) : for feat in features. keys ( ) : if feat not in self. featurematches : return false if not self. _ fm ( features ) : return false return true | [
-1.059415578842163,
0.2253604233264923,
0.5614045262336731,
0.7626888155937195,
-0.17236466705799103,
0.40431156754493713,
-0.14223958551883698,
0.2042272388935089,
-0.28933650255203247,
-1.135751485824585,
-0.14101828634738922,
-1.5977988243103027,
-0.9083492159843445,
0.613821268081665,
... |
def _ recv _ characteristic ( self ) : characteristics = self. connection. getcharacteristics ( uuid = command _ response _ uuid ) if not characteristics : return none return characteristics [ 0 ] | [
0.19304132461547852,
-0.7031803727149963,
0.4700718820095062,
-0.30463430285453796,
-0.03890572488307953,
-0.6062204837799072,
-0.4591629207134247,
-0.1879262924194336,
0.2838914692401886,
-0.3001917004585266,
0.24225835502147675,
0.8592441082000732,
-0.9205078482627869,
-1.771454930305481... |
def parse _ cbr _ currency _ base _ daily ( document ) : currency _ dict = { } soup = beautifulsoup ( document,'html. parser') table = soup. find ('tbody') for index, line in enumerate ( table. find _ all ('tr') ) : if index > 0 : items = line. find _ all ('td') currency _ dict [ items [ 1 ]. get _ text ( ) ] = round (... | [
-0.4179671108722687,
0.15217138826847076,
0.5832075476646423,
-0.5980284214019775,
-0.11132636666297913,
-0.5234116315841675,
0.5510042905807495,
-0.41307321190834045,
-1.0125495195388794,
0.8474987745285034,
-0.12690815329551697,
-1.3577345609664917,
-0.5098240375518799,
1.083120822906494... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.