text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def test _ t _ tr ( ) : c _ bf = 1. 5 z0 _ dis = 0. 0 zf _ str = - 4. 0 c _ gz = - 1. 0 t _ tr = sbp. calc _ t _ tr ( c _ bf, z0 _ dis, zf _ str, c _ gz ) assert t _ tr = = 11. 0, " transient time calculated incorrectly " | [
0.8411929607391357,
0.2861028015613556,
0.36336299777030945,
-0.8069400191307068,
1.2270112037658691,
0.0023326596710830927,
0.40166008472442627,
0.1123700961470604,
-0.9968689680099487,
0.9807618856430054,
-1.0070902109146118,
-1.0455044507980347,
-0.9484614133834839,
-0.23229223489761353... |
def test _ add _ weights ( self ) - > none : random _ function = make _ random _ function ( [ # weights for the first neuron. 0. 3, 0. 4, # weights for the second neuron. 0. 5, 0. 6, ] ) dense _ layer = denselayer ( neuron _ count = 2, activation = relu, activation _ prime = relu _ prime, random _ function = random _ f... | [
0.4265161454677582,
0.4739750325679779,
0.6144613027572632,
0.4874779284000397,
1.5205439329147339,
-0.3617320954799652,
0.2250445932149887,
-0.4098171889781952,
-0.10203702747821808,
-0.4100131690502167,
-0.5125269889831543,
0.21193644404411316,
-0.11337225884199142,
0.5580615997314453,
... |
def dense _ to _ subnet ( model, state _ dict ) : model. load _ state _ dict ( state _ dict, strict = false ) | [
-0.1482791155576706,
0.3060556948184967,
0.23437611758708954,
-0.04777800291776657,
0.07200278341770172,
0.5037707090377808,
-0.16937513649463654,
0.08886595815420151,
0.7631945610046387,
0.3034669756889343,
-1.059981346130371,
-0.12607897818088531,
1.2776498794555664,
-0.4471081793308258,... |
def _ _ str _ _ ( self ) : return " / ". join ( self. parts ) | [
0.020620210096240044,
-1.4629379510879517,
0.4954972565174103,
-1.370348572731018,
-0.26821139454841614,
1.446333646774292,
-0.40732529759407043,
-0.6933020949363708,
-0.10934314131736755,
-0.19590169191360474,
1.0504485368728638,
-0.6154420375823975,
-0.7418126463890076,
-0.60377430915832... |
def aoi ( self, * * kwargs ) : g = self. _ parse _ geoms ( * * kwargs ) if g is none : return self else : return self [ g ] | [
0.37767085433006287,
-0.005255311727523804,
0.42545634508132935,
0.11241941154003143,
0.10805075615644455,
0.18622398376464844,
-0.38218775391578674,
-1.020616888999939,
-0.044540584087371826,
-0.13718199729919434,
0.9283168315887451,
0.3998623192310333,
-0.112450011074543,
-0.564000725746... |
def find _ memorytable _ nexttable _ offset ( data ) : for i in range ( len ( data ) ) : toffset = unpack ('< i ', data [ i : ( i + 4 ) ] ) [ 0 ] * page _ size if verify _ memorytable _ offset ( toffset ) : return i | [
0.14665895700454712,
0.237015500664711,
0.48360487818717957,
-0.08750592172145844,
-1.1898821592330933,
0.14161600172519684,
0.7111197710037231,
-0.6346558928489685,
0.26125702261924744,
-0.11602260172367096,
0.05519380420446396,
0.1976737231016159,
-0.8123979568481445,
0.3300594389438629,... |
def qnm _ freq _ decay ( f _ 0, tau, decay ) : q _ 0 = pi * f _ 0 * tau alpha = 1. / decay alpha _ sq = 1. / decay / decay # expression obtained analytically under the assumption # that 1. / alpha _ sq, q _ 0 ^ 2 > > 1 q _ sq = ( alpha _ sq + 4 * q _ 0 * q _ 0 + alpha * numpy. sqrt ( alpha _ sq + 16 * q _ 0 * q _ 0 ) )... | [
0.714042603969574,
-1.0802799463272095,
0.24409200251102448,
-0.37446117401123047,
-0.184475377202034,
-0.9156935811042786,
-0.3962753713130951,
-0.28224363923072815,
0.20833097398281097,
-1.091800332069397,
0.20776385068893433,
-0.48431989550590515,
0.017215749248862267,
1.053468108177185... |
def bounds ( self ) : return shape ( self ). bounds | [
0.21162700653076172,
-1.4355400800704956,
0.19823265075683594,
0.6126168370246887,
0.6975333094596863,
0.9234638214111328,
0.1577768325805664,
-0.5157029032707214,
0.8221152424812317,
-1.096853494644165,
-0.8558183312416077,
0.6947246193885803,
0.4091537296772003,
0.6044525504112244,
-0.... |
def prepare _ model ( model, args ) : set _ prune _ rate _ model ( model, args. k ) if args. exp _ mode = = " pretrain " : print ( f " # # # # # # # # # # # # # # # # # # # # pre - training network # # # # # # # # # # # # # # # # # # # # " ) print ( f " = = = > > gradient for importance _ scores : none | training weigh... | [
0.6478989124298096,
0.32663899660110474,
1.1881766319274902,
-0.01716519333422184,
0.8499836325645447,
0.2915392518043518,
0.4841955304145813,
-0.3563058376312256,
-0.4661947190761566,
1.051826000213623,
-0.12087201327085495,
-0.3850093185901642,
-0.3779188394546509,
0.5899176597595215,
... |
def set _ domain ( self, domain _ name ) : self. dname = domain _ name try : self. sdb = self. sdbconn. create _ domain ( self. dname ) except : try : self. sdb = self. sdbconn. create _ domain ( self. dname ) except : raise sdb _ createdomain ( " can't create sdb domain'% s'" % self. dname ) | [
-0.7255207896232605,
1.1892627477645874,
0.5686157941818237,
1.4174329042434692,
0.7095344662666321,
0.4603329300880432,
-0.6431552171707153,
-0.07338826358318329,
0.4440365135669708,
-0.5670995712280273,
-0.7284188866615295,
0.6463144421577454,
-0.41652002930641174,
0.8801456093788147,
... |
def box ( rects, img, wr = false ) : for x1, y1, x2, y2 in rects : cv2. rectangle ( img, ( x1, y1 ), ( x2, y2 ), ( 127, 255, 0 ), 2 ) if wr : cv2. imwrite ('detected. jpg ', img ) ; | [
-0.2930675446987152,
0.01327848993241787,
0.5694764256477356,
0.5310934782028198,
0.5319229960441589,
0.014048201963305473,
0.8614087104797363,
-0.5941212177276611,
0.7882317304611206,
-0.46882638335227966,
-0.4487643837928772,
-0.587843656539917,
0.5497901439666748,
0.5911682844161987,
... |
def test _ list _ integer _ pattern _ 2 _ nistxml _ sv _ iv _ list _ integer _ pattern _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - pattern - 3. xsd ", instance = " nistdata / list / integer / sc... | [
-0.4325706660747528,
-0.05436919257044792,
0.5769349932670593,
0.37064677476882935,
-0.045475661754608154,
0.2483360767364502,
-0.573521077632904,
0.39994046092033386,
1.3071422576904297,
0.8845058083534241,
-0.6512309312820435,
-0.3628465533256531,
-0.4002567231655121,
0.20054742693901062... |
def prune ( tree, min _ enhancement, disorder _ function = " entropy " ) : if disorder _ function = = " entropy " : disorder _ estimator = decisiontree. entropy elif disorder _ function = = " gini _ impurity " : disorder _ estimator = decisiontree. gini _ impurity elif disorder _ function = = " variance " : disorder _ ... | [
0.40837132930755615,
0.7245050668716431,
0.7223294377326965,
-0.33218297362327576,
0.3980688154697418,
0.21407876908779144,
-0.7160908579826355,
0.4533650279045105,
0.04535587504506111,
-0.7570358514785767,
0.03904001787304878,
0.18451042473316193,
-0.6828499436378479,
0.15305499732494354,... |
def _ merge _ batch _ grad _ transforms ( batch _ grad _ transforms ) : transforms = [ t. get _ transforms ( ) for t in batch _ grad _ transforms ] key _ function _ pairs = [ ] for t in transforms : for key, value in t. items ( ) : key _ function _ pairs. append ( ( key, value ) ) unique _ keys = { pair [ 0 ] for pair ... | [
-0.426685631275177,
-0.06263436377048492,
0.5285224318504333,
-0.5904515385627747,
0.3421575129032135,
0.23987363278865814,
-0.0031224230770021677,
-0.04333443567156792,
-0.25576382875442505,
0.01976797729730606,
-1.1820554733276367,
-0.3494599461555481,
-0.34613344073295593,
0.18646146357... |
def send _ message ( self, grades _ table, distribution _ table, bot _ pwd ) : # general setup msg = mimemultipart ( ) msg ['from'] = cfg ['source _ email'] msg ['to'] = cfg ['target _ email'] msg ['subject'] = " new grade! " # structure the tables to be featured in the email. table1 = " " " < html > < head > < / head ... | [
-0.5250927209854126,
0.6949104070663452,
0.9029313325881958,
-0.16081711649894714,
-0.3086164593696594,
0.6671427488327026,
-0.7531615495681763,
-0.16090305149555206,
-1.3138413429260254,
0.34253257513046265,
0.12141622602939606,
1.2859095335006714,
-0.29349106550216675,
0.2198818325996399... |
def create _ datamodule ( paths : dict, train _ common _ params : dict ) - > pl. lightningdatamodule : datamodule = isicdatamodule ( data _ dir = paths [ " data _ dir " ], cache _ dir = paths [ " cache _ dir " ], num _ workers = train _ common _ params [ " data. num _ workers " ], batch _ size = train _ common _ params... | [
-0.41767650842666626,
0.2694501280784607,
0.6881064176559448,
-0.2603425085544586,
1.0341864824295044,
1.0465595722198486,
-0.050386808812618256,
-0.029327670112252235,
-0.3478584885597229,
0.43707510828971863,
0.12713272869586945,
0.5713217258453369,
0.5699378252029419,
-0.970390379428863... |
def test _ tile _ neighbours ( self ) : board = builder ( 10, 10, 7, 6 ). create ( ) self. asserttrue ( board. isaccessible ( ( 0, 0 ), ( 0, 1 ) ) ) self. asserttrue ( board. isaccessible ( ( 0, 3 ), ( 1, 3 ) ) ) self. asserttrue ( board. isaccessible ( ( 1, 3 ), ( 0, 3 ) ) ) self. asserttrue ( board. isaccessible ( ( ... | [
0.30035459995269775,
0.3943484127521515,
0.6998807787895203,
-0.1436578929424286,
-0.21022102236747742,
0.6709330677986145,
0.9783061146736145,
0.16471433639526367,
-0.1514432579278946,
-0.3996540307998657,
-0.440273642539978,
-0.7192144393920898,
-0.4194219708442688,
0.06509067863225937,
... |
def home ( ) : return ( f " / api / v1. 0 / precipitation < br / > " f " / api / v1. 0 / stations < br / > " f " / api / v1. 0 / tobs < br / > " f " / api / v1. 0 / temp / < start _ date > < br / > " f " / api / v1. 0 / temp _ start _ end / < start _ date > / < end _ date > " ) | [
-0.5910720229148865,
-0.6958520412445068,
0.574432909488678,
0.24973493814468384,
0.4783836901187897,
0.5657828450202942,
-0.9801543354988098,
0.030003409832715988,
-0.11914011836051941,
0.22194020450115204,
0.13034293055534363,
0.38196295499801636,
0.07052014768123627,
0.29880082607269287... |
def cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilterif3dif3 _ superclass _ cast ( * args ) | [
1.317549705505371,
0.599450409412384,
0.4981577396392822,
0.07374701648950577,
-0.20319794118404388,
1.0816324949264526,
0.1441858857870102,
0.3759780824184418,
0.7338345050811768,
0.15276023745536804,
-0.4265587329864502,
-0.10226491838693619,
-0.10431820154190063,
-0.2372911423444748,
... |
def get _ name ( self ) : tokens = self. name. split ('-') if tokens [ 0 ]! ='save': print ( " error : name not in right format : { } ". format ( fname ), file = sys. stderr ) sys. exit ( 1 ) name = " " idx = 1 if tokens [ idx ] = ='synth': idx + = 1 name + ='data type \ \ texttt { { synth { } } } '. format ( tokens [ ... | [
-0.4915996193885803,
-0.6655271649360657,
0.9703831076622009,
-0.5523003339767456,
-0.645293653011322,
-0.07593700289726257,
0.13276636600494385,
-0.22254958748817444,
-1.17666494846344,
0.9900833368301392,
-0.3292568325996399,
0.44437915086746216,
0.8027464151382446,
0.0914590060710907,
... |
def loss ( phab, thab, * * kwargs ) : # batchsize = sne return model _ base. loss ( phab, thab, * * kwargs ) | [
-0.3466644287109375,
-0.13637743890285492,
0.2139231562614441,
0.6775550842285156,
0.43609610199928284,
-0.09826499223709106,
-0.3272436857223511,
-0.11456669121980667,
-0.7237405180931091,
-0.4747568368911743,
-0.25750088691711426,
-0.6252760291099548,
0.13440191745758057,
0.2514602839946... |
def load _ from _ json _ file ( filename ) : with open ( filename, encoding ='utf - 8') as a _ file : line = a _ file. readline ( ) new _ object = json. loads ( line ) return new _ object | [
-0.3370702564716339,
-1.805174708366394,
0.4527387320995331,
-0.9852124452590942,
-1.0182664394378662,
0.39650577306747437,
-0.46439433097839355,
-0.023813892155885696,
-0.7564104795455933,
-0.04734421148896217,
-0.6728964447975159,
0.4087520241737366,
0.594575047492981,
-0.839829504489898... |
def _ process _ csv ( self, file _ path : str, timeline : timeline ) : with open ( file _ path ) as csv _ file : csv _ reader = csv. reader ( csv _ file, delimiter = ", " ) header _ row = next ( csv _ reader ) date _ time _ col = hecoscraper. _ get _ header _ position ( header _ row, " date / time " ) # assumes there's... | [
-0.7180842757225037,
-0.040842149406671524,
0.6731614470481873,
0.047330014407634735,
0.0681171864271164,
-0.19182854890823364,
-0.38336026668548584,
-0.2702327370643616,
-0.08672454953193665,
0.7203191518783569,
0.5901588797569275,
-0.7306026816368103,
0.801889181137085,
0.346001386642456... |
def orchestrator ( self, orchestrator ) : self. _ orchestrator = orchestrator | [
-0.2704433500766754,
0.23899252712726593,
-0.022517915815114975,
-0.10686200857162476,
-1.0861554145812988,
0.5052935481071472,
1.0792704820632935,
0.08929356187582016,
-0.6494077444076538,
-0.7607862949371338,
-0.7976300716400146,
-0.7402095198631287,
0.5625215172767639,
0.696246743202209... |
def get _ word _ counts ( self ) : try : data = json. loads ( self. scores ) return data except valueerror : return { } | [
-0.012179338373243809,
-0.14289219677448273,
0.43020498752593994,
-0.8712836503982544,
-0.4243648946285248,
-0.45105084776878357,
-1.0560191869735718,
-0.9365600943565369,
-0.32111939787864685,
1.0642577409744263,
-0.4508751630783081,
-0.09370342642068863,
-0.762060284614563,
0.56048065423... |
def some _ with _ kwargs ( one, two, * * kwargs ) : return one + two + reduce ( operator. add, [ kwargs [ k ] for k in kwargs ], 0 ) | [
-0.36769095063209534,
0.029994120821356773,
0.5829465985298157,
0.14570340514183044,
-0.19100184738636017,
-0.4849769175052643,
-1.5121456384658813,
-0.548514187335968,
-0.18298959732055664,
0.3330310583114624,
-1.1616252660751343,
-0.31619372963905334,
-0.5317152142524719,
0.4307091236114... |
def sgx _ get _ quote _ size ( sig _ rl = none ) : c _ sgx _ get _ quote _ size = sgx _ uae _ service _ lib. sgx _ get _ quote _ size c _ sgx _ get _ quote _ size. argtypes = [ c _ char _ p, pointer ( c _ uint ) ] c _ sgx _ get _ quote _ size. restype = c _ uint c _ sig _ rl = none if sig _ rl : c _ sig _ rl = create _... | [
0.0765167772769928,
0.2749897539615631,
0.6214867830276489,
-0.0031388690695166588,
-0.15961387753486633,
-0.5415552854537964,
-0.08519864827394485,
-0.411906361579895,
0.5333986878395081,
-0.4454285800457001,
-0.5176001191139221,
0.04663119837641716,
-0.7568168044090271,
0.296800076961517... |
def get _ shape ( self, id _ param, ex _ param ) : assert id _ param. shape [ 0 ] = = ex _ param. shape [ 0 ] bs = id _ param. shape [ 0 ] id _ base = self. idbase [ none, :, : ]. expand ( bs, - 1, - 1 ) ex _ base = self. exbase [ none, :, : ]. expand ( bs, - 1, - 1 ) face _ shape = self. meanshape + torch. bmm ( id _ ... | [
-0.16869762539863586,
-0.11256330460309982,
0.7903361916542053,
0.3822822868824005,
0.35977986454963684,
0.23475955426692963,
0.45787307620048523,
0.08968212455511093,
0.21750330924987793,
1.0390576124191284,
0.25982093811035156,
0.5232049226760864,
-0.13273991644382477,
-0.391374766826629... |
def break _ words ( stuff ) : words = stuff. split ('' ) return words | [
-0.2535189986228943,
0.9703288078308105,
0.344639390707016,
0.1995709389448166,
0.5394668579101562,
-0.10231289267539978,
-0.5758475065231323,
-0.23925450444221497,
0.10674687474966049,
0.9435175061225891,
-0.14446504414081573,
0.19264937937259674,
-1.229995846748352,
0.38199564814567566,
... |
def charge _ limit _ soc ( self ) - > int : return self. _ vehicle _ data. get ( " charge _ state ", { } ). get ( " charge _ limit _ soc " ) | [
1.0188180208206177,
0.2631435692310333,
0.4439842700958252,
0.49624109268188477,
0.2717569172382355,
0.06829960644245148,
-0.23333199322223663,
-0.5140402317047119,
0.38037481904029846,
0.03241383284330368,
-0.09096041321754456,
0.5293846726417542,
0.49056118726730347,
-0.9453622698783875,... |
def connect _ file _ storage ( self ) : try : if self. s3 _ resource is none : self. s3 _ resource = boto3. resource ('s3 ', aws _ access _ key _ id = aws _ access _ key _ id, aws _ secret _ access _ key = aws _ secret _ access _ key ) logger. info ('connection to file storage established') else : logger. warning ('con... | [
0.15608815848827362,
-0.6539163589477539,
0.6623644828796387,
-0.12490025907754898,
0.988635241985321,
-0.03330417349934578,
-0.36175382137298584,
-0.04586710035800934,
-0.33681121468544006,
0.15612871944904327,
0.2310752272605896,
-0.40239810943603516,
-0.0593000128865242,
0.2130473703145... |
def _ write _ assoc ( self, value, subtypes ) : s = stringstream ( ) nitems = len ( value ) s. _ write _ int ( nitems ) ntypes = len ( subtypes ) for i, ( key, val ) in enumerate ( value. iteritems ( ) ) : s. write _ value ( key, subtypes [ ( 2 * i ) % ntypes ] ) s. write _ value ( val, subtypes [ ( 2 * i + 1 ) % ntype... | [
-0.43577590584754944,
0.29829803109169006,
0.4996195435523987,
-0.3618911802768707,
0.053462766110897064,
-0.42104676365852356,
0.8817658424377441,
-0.46287134289741516,
-0.6127753853797913,
0.21540847420692444,
-0.08492615818977356,
0.2211664617061615,
0.07141304761171341,
0.1561849415302... |
def autodescribe ( qid, lang ) : if not autodescribe _ endpoint : return'' try : r = requests. get ( autodescribe _ endpoint, {'q': qid,'format':'json ','mode':'short ','links':'wikidata ','get _ infobox':'yes ','lang': lang }, timeout = 2 ) desc = r. json ( ). get ('result ','' ) desc = desc. replace ('< a href ','< a... | [
-0.21894657611846924,
0.1974393129348755,
0.6664167642593384,
-1.000148057937622,
0.36765778064727783,
-0.37666088342666626,
-1.1321064233779907,
-0.02576189674437046,
-0.2939523160457611,
-0.26968568563461304,
0.1275091916322708,
1.377358078956604,
-0.23324443399906158,
0.5380330681800842... |
def addfolder ( self, path ) : try : # move up from the root through the end of the path, adding folders as needed. for subpath in path. subpaths ( ) : if not self. _ _ pathexists ( subpath ) : os. mkdir ( subpath ) if subpath not in self. folders : self. folders. append ( subpath ) print " added folder : \ t " + subpa... | [
-0.5205435752868652,
0.38999173045158386,
0.7465040683746338,
0.8114542365074158,
0.2751924693584442,
1.4049265384674072,
0.5000460147857666,
-0.6567952632904053,
0.1467168629169464,
-1.1366374492645264,
0.11037502437829971,
-0.20176540315151215,
-0.9591385126113892,
0.128694087266922,
0... |
def _ _ call _ stream ( self, uri, params = none, method = " get " ) : self. _ client _ _ session _ stablisher ( ) # remove empty params params = { k : v for k, v in params. items ( ) if v } kwargs = { " url " : uri, " verify " : true, " stream " : true } if method = = " get " : kwargs [ " params " ] = params else : kw... | [
-0.3920508623123169,
-0.015132484957575798,
0.7202581167221069,
0.02023894339799881,
-0.014162464067339897,
-0.22669968008995056,
-0.7215350270271301,
-1.1640478372573853,
0.5742246508598328,
-0.26452258229255676,
0.7511461973190308,
0.9127545356750488,
-1.1656731367111206,
0.1444920450448... |
def restore ( self ) : raise exception ('needs to be implemented') | [
0.6002650260925293,
-0.5114913582801819,
0.3515220880508423,
0.2825061082839966,
0.21256420016288757,
0.444345623254776,
0.4339545965194702,
0.4728163182735443,
0.6036522388458252,
-0.6446496248245239,
0.1093541756272316,
0.3544670641422272,
-1.1971526145935059,
-0.5259124040603638,
-1.1... |
def testsendrequestinvalidinput ( self ) : self. assertequal ( self. client. send _ request ( " nine " ), none ) self. assertequal ( self. client. send _ request ( - 3 ), none ) | [
-0.6377459168434143,
0.4810725748538971,
0.5223214030265808,
0.42219382524490356,
0.7233255505561829,
1.3036404848098755,
-0.6602015495300293,
-0.8336290717124939,
-0.2844330966472626,
-0.7687258124351501,
-0.1508224904537201,
-0.21129469573497772,
-0.48370951414108276,
-0.0594845339655876... |
def cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefiltericf2cficf2 _ cast ( * args ) | [
0.36160188913345337,
-1.3420424461364746,
0.22200001776218414,
-0.16943052411079407,
0.23951034247875214,
-0.1989147812128067,
1.101191759109497,
0.1473982334136963,
-1.09049654006958,
0.14806663990020752,
-0.78432297706604,
-0.1402505338191986,
-0.0543355867266655,
-0.04474233463406563,
... |
def caption _ collate ( data ) : # separate source and target sequences sent, att _ feats, img _ masks, box _ feats, img _ ids = list ( zip ( * data ) ) # t2i def generate _ inputs ( ) : # sent = np. array ( sent ) x _ img = torch. stack ( att _ feats, dim = 0 ) img _ loc = torch. stack ( box _ feats, dim = 0 ) x _ img... | [
-0.7643667459487915,
-0.9025741815567017,
0.9936383366584778,
-0.10784299671649933,
-0.3078482151031494,
-0.510716438293457,
0.46111807227134705,
-0.2633228003978729,
-0.03733345493674278,
0.6065782308578491,
-0.44272667169570923,
-0.2733560800552368,
0.6259821057319641,
0.4516355991363525... |
def getalldevicemanagementextensionpkgs ( self ) : dmereq = apiclient. dmerequests % ( self. host ) r = requests. get ( dmereq, auth = self. credentials, verify = self. verify ) status = r. status _ code if status = = 200 : self. logger. debug ( " retrieved all device management extension packages " ) return r. json ( ... | [
-1.1916158199310303,
0.6765587329864502,
0.38643503189086914,
0.8175144195556641,
-0.7201775908470154,
-0.21534422039985657,
-0.8391031622886658,
-0.8303119540214539,
0.9389939308166504,
0.1198594719171524,
-0.5068540573120117,
0.8211675882339478,
-1.1146479845046997,
0.5465812087059021,
... |
def print _ tour ( o, tour _ list, search _ city ) : # o. write ('% i \ n'% search _ city. id ) while ( len ( tour _ list ) > 1 ) : for remaining _ edge in tour _ list : if remaining _ edge. v1. id = = search _ city. id : o. write ('% i \ n'% remaining _ edge. v1. id ) tour _ list. remove ( remaining _ edge ) search _ ... | [
0.14803409576416016,
-0.8535434007644653,
0.7587698698043823,
-0.04742017015814781,
-0.37232550978660583,
0.2875637710094452,
0.72402024269104,
0.27370989322662354,
0.6203585267066956,
1.2903105020523071,
-1.0069867372512817,
0.11407075077295303,
-0.8542202711105347,
-0.5690904259681702,
... |
def gen _ binder _ url ( script : galleryscript, binder _ conf ) : # build the url fpath _ prefix = binder _ conf. get ( " filepath _ prefix " ) link _ base = binder _ conf. get ( " notebooks _ dir " ) # we want to keep the relative path to sub - folders path _ link = os. path. join ( link _ base, script. ipynb _ file ... | [
-0.04826905578374863,
-0.6081231236457825,
0.6693370342254639,
0.37455472350120544,
-0.0877869725227356,
0.058782726526260376,
0.49877628684043884,
0.621907651424408,
-0.6818691492080688,
0.26147714257240295,
-0.05168898031115532,
0.19440394639968872,
-0.3026873469352722,
0.979487895965576... |
def gen _ word ( ) - > str : word _ len = randint ( 2, 9 ) return''. join ( pick _ letter ( ) for _ in range ( word _ len ) ) | [
0.40281522274017334,
0.45882153511047363,
0.5294259786605835,
-0.05863451585173607,
0.3984167277812958,
1.144147276878357,
-0.11445154249668121,
0.23065407574176788,
0.3545225262641907,
0.3397698998451233,
-0.25429531931877136,
0.048565443605184555,
-0.11889950186014175,
-0.149612188339233... |
def application _ tags ( self ) : return self. _ application _ tags | [
0.2415384203195572,
-0.14163461327552795,
0.2193116396665573,
0.8746896386146545,
0.31964194774627686,
0.991644024848938,
-0.5267539024353027,
-0.6035112738609314,
0.003146004630252719,
0.07185034453868866,
-0.8911937475204468,
0.5981405377388,
0.16382868587970734,
1.6071850061416626,
-0... |
def presentationinterrupt ( self ) : speech. stop ( ) braille. killflash ( ) | [
0.8258653879165649,
-0.9275758266448975,
0.2741333842277527,
-0.07285581529140472,
0.6368085741996765,
0.5287445783615112,
0.01995285227894783,
1.6717475652694702,
-0.055802129209041595,
0.5061231851577759,
0.11744086444377899,
-0.2593840956687927,
-1.0952049493789673,
-0.6586199402809143,... |
def _ _ init _ _ ( self, classifier = none, require _ dense = none ) : super ( labelpowerset, self ). _ _ init _ _ ( classifier = classifier, require _ dense = require _ dense ) self. clean ( ) | [
-0.3949759602546692,
-0.11338269710540771,
0.5346261858940125,
0.09621363878250122,
-0.2163858264684677,
0.6756113767623901,
-0.29747429490089417,
0.812102198600769,
-0.5292529463768005,
0.5840241312980652,
0.4329352378845215,
0.34687429666519165,
0.19296780228614807,
0.9730709195137024,
... |
def extract _ config _ value ( self, key _ chain : iterable [ str ], validator : callable [ [ object ], bool ], mapper : callable [ [ object ], object ], requirement _ msg : str ) : value = self. _ config key _ str = '. '. join ( key _ chain ) try : for key in key _ chain : value = value [ key ] except ( keyerror, type... | [
-1.1772375106811523,
-0.473723441362381,
0.601176381111145,
0.5303037762641907,
-0.7101746201515198,
-0.08501039445400238,
-0.5033801794052124,
-0.46687692403793335,
-0.7879540324211121,
0.053324855864048004,
0.32587990164756775,
-0.2825867831707001,
0.15262584388256073,
0.5971282124519348... |
def query _ occ ( symbol, date ) : http = httplib2. http ( ) url ='http : / / optionsclearing. com / webapps / volume - query'headers = {'content - type':'application / x - www - form - urlencoded ','referer':'http : / / optionsclearing. com / webapps / volume - query'} ; data ='volumequerysearch. volumequerytype = o &... | [
0.037243347615003586,
-0.2116047441959381,
0.7486640214920044,
-0.22404524683952332,
-0.11797057837247849,
-0.4400424063205719,
-0.2996845543384552,
-0.8654839396476746,
-0.1738714873790741,
0.054804567247629166,
0.44059860706329346,
0.8418175578117371,
0.30670425295829773,
0.1946603059768... |
def get _ bg _ index ( bg _ df, start _ str, end _ str, set _ str, make _ col _ bool ) : start _ date, end _ date = _ get _ date ( start _ str, end _ str ) bg _ df, start _ index, end _ index = _ find _ index ( bg _ df, start _ date, end _ date, make _ col _ bool ) # print the number of entries, the start index, and th... | [
-0.2430890053510666,
0.0541885606944561,
0.5533091425895691,
-0.17166991531848907,
0.1438017040491104,
-0.2548603415489197,
0.871651291847229,
-0.14622707664966583,
-1.9446464776992798,
0.42146024107933044,
0.29605597257614136,
1.8909093141555786,
-0.04356732964515686,
-0.8536978363990784,... |
async def handle _ presence _ command ( self, message : message ) : # parse the command. try : _, * presence = message. content. split ('' ) presence =''. join ( presence ) except valueerror : print ( f " incorrect parameters for! presence : { message. content } ", file = sys. stderr ) return # if we're switching back ... | [
0.008162478916347027,
-0.43079450726509094,
0.7474045157432556,
0.21501366794109344,
1.0785528421401978,
-0.0909482017159462,
0.12824364006519318,
0.740524172782898,
0.1984095573425293,
0.22574558854103088,
0.7145639061927795,
0.32908451557159424,
-0.48759159445762634,
0.6713336110115051,
... |
def symbol ( self ) : symbol = self. _ revit _ object. symbol return symbol ( symbol ) | [
-0.7003697752952576,
-0.3558771014213562,
0.04507451876997948,
-0.18664056062698364,
0.8038356304168701,
-0.3097175657749176,
1.4816765785217285,
-0.4624173939228058,
0.7915454506874084,
-1.4466527700424194,
-0.22377508878707886,
1.0863314867019653,
0.6776087284088135,
-1.04521644115448,
... |
def test _ init ( self ) - > none : random _ function = make _ random _ function ( [ ] ) dense _ layer = denselayer ( neuron _ count = 2, activation = relu, activation _ prime = relu _ prime, random _ function = random _ function, ) np. testing. assert _ array _ equal ( np. array ( [ 0. 0, 0. 0 ] ), dense _ layer. bias... | [
0.046328939497470856,
0.10990992188453674,
0.33716312050819397,
0.5084247589111328,
1.5395429134368896,
-0.35416778922080994,
0.3355465531349182,
-0.26131701469421387,
0.1957164704799652,
-1.0704818964004517,
-0.8562822937965393,
0.404269814491272,
-0.07908368110656738,
0.8887444138526917,... |
def addcoulombdeterminants ( group1, group2, distance, version ) : coulomb _ interaction = version. electrostatic _ interaction ( group1, group2, distance ) if coulomb _ interaction : q1 = group1. charge q2 = group2. charge # assigning the coulombic interaction if q1 < 0. 0 and q2 < 0. 0 : " " " both are acids " " " ad... | [
-0.25534579157829285,
-0.7811102271080017,
0.779695451259613,
0.6661480665206909,
0.4168536365032196,
0.8205673694610596,
-0.5965254306793213,
0.008486824110150337,
-0.6849349141120911,
0.37262269854545593,
0.43420717120170593,
-0.6503859162330627,
-1.417884349822998,
0.2607329785823822,
... |
def flow _ to _ each _ sim ( ) : sw _ info = anturlar. switchinfo ( ) fid _ now = sw _ info. ls _ now ( ) cons _ out = anturlar. fos _ cmd ( " " ) # sw _ ip = sw _ info. ipaddress ( ) f = anturlar. fabricinfo ( fid _ now ) ip _ list = f. ipv4 _ list ( ) ip _ count = len ( ip _ list ) ip _ c = ip _ count combine _ port ... | [
-0.19746187329292297,
0.0629623606801033,
0.8971953392028809,
0.46730417013168335,
0.8720220923423767,
0.1612732857465744,
0.9208928942680359,
-0.6248273849487305,
-0.02980724535882473,
-0.3661133944988251,
-1.0737658739089966,
-0.17987710237503052,
0.3226601779460907,
0.45599424839019775,... |
def merge ( self, ds ) : common _ x = true common _ y = true for d in ds : if self. xc _ label! = d. xc _ label or self. yc _ label! = d. yc _ label : raise exception ( " data to be merged have different x _ labels. " ) ret = matrixwithcoords ( ) ret. xc = np. unique ( np. hstack ( [ m. xc for m in [ self ] + ds ] ). f... | [
-0.8280687928199768,
0.4564068913459778,
0.9622188806533813,
-0.5819136500358582,
-0.13294175267219543,
0.18402811884880066,
0.4720594584941864,
-0.43661269545555115,
0.7380377650260925,
-0.8045738935470581,
0.5671461224555969,
0.12966716289520264,
-0.047451600432395935,
0.2112207859754562... |
def breast _ cancer _ generator ( ) : breast _ cancer = load _ breast _ cancer ( ) breast _ cancer _ dataset = pd. dataframe ( data = breast _ cancer. data, columns = breast _ cancer. feature _ names ) breast _ cancer _ labels = pd. dataframe ( data = breast _ cancer. target, columns = [ " label " ] ) breast _ cancer _... | [
-0.7737317681312561,
-1.085382103919983,
0.47939935326576233,
-1.0684175491333008,
-0.09533243626356125,
0.46948954463005066,
-0.8539289236068726,
0.8549898266792297,
-0.8778901696205139,
-0.7277528643608093,
0.35207903385162354,
2.1105196475982666,
0.7555720806121826,
-0.49713191390037537... |
def new ( * args, * * kargs ) : obj = itksubtractconstantfromimagefilteriul2diul2 _ superclass. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj | [
0.7474835515022278,
-0.16398803889751434,
0.42728716135025024,
-0.7495859861373901,
-1.8255462646484375,
0.3843016028404236,
-0.09895533323287964,
1.2954567670822144,
-0.1463860273361206,
-1.4979368448257446,
-1.079757571220398,
0.31527069211006165,
1.0883444547653198,
-0.0687292143702507,... |
def test _ atomic _ boolean _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ boolean _ pattern _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - pattern - 4. xsd ", instance = " nistdata / atomic / bo... | [
-0.066776804625988,
-0.13167189061641693,
0.5456913709640503,
0.7161102890968323,
0.03691721335053444,
0.41283732652664185,
-0.013239460065960884,
-0.18644678592681885,
-0.2682598829269409,
0.8525307774543762,
-0.2556702792644501,
-0.416536420583725,
-0.37624022364616394,
-0.73240679502487... |
def usingpages ( self, * * kwargs ) : # noqa : n802 return self. using _ pages ( * * kwargs ) | [
-0.07475614547729492,
0.48728594183921814,
0.2543073892593384,
-0.20286397635936737,
0.25866639614105225,
-0.7672438621520996,
-0.24374687671661377,
-0.35368117690086365,
0.30226656794548035,
-0.5468753576278687,
0.6563727259635925,
-0.38516733050346375,
-0.46884915232658386,
0.50482904911... |
def request _ for _ shopify _ product _ images ( self, shopify _ template ) : shopify _ images = false try : shopify _ images = shopify. image ( ). find ( product _ id = int ( shopify _ template. shopify _ tmpl _ id ) ) except clienterror as error : if hasattr ( error, " response " ) : if error. response. code = = 429 ... | [
-1.337883710861206,
0.715887725353241,
0.45121145248413086,
0.09476494044065475,
0.5788061618804932,
-0.7746066451072693,
-0.23816953599452972,
-1.2285743951797485,
0.2682344615459442,
0.3217925429344177,
-0.3741380274295807,
-0.310518354177475,
-0.315560519695282,
0.6701452732086182,
0.... |
def plot _ frcs ( volume _ pairs : sequence [ tuple [ ndarray, ndarray ] ], labels : sequence [ str ], title : optional [ str ] = none, smooth : optional [ int ] = 5, snrt : float = 0. 2071, axes : optional [ sequence [ int ] ] = none, verbose : bool = false, ) - > tuple [ figure, axes ] : frcs = [ np. array ( [ ] ) ] ... | [
0.09492157399654388,
0.4470967650413513,
0.9614396691322327,
-0.008088217116892338,
0.23674821853637695,
-0.7212458848953247,
0.5333940982818604,
-0.5144367218017578,
-0.3077622354030609,
-0.028538072481751442,
0.9713070392608643,
-0.512466549873352,
-0.05301852896809578,
0.05928960070014,... |
def test _ atomic _ any _ uri _ max _ length _ 1 _ nistxml _ sv _ iv _ atomic _ any _ uri _ max _ length _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - maxlength - 2. xsd ", instance = " nistdata... | [
-0.11087343096733093,
-0.6953088641166687,
0.4012451469898224,
1.302417516708374,
-0.4741332232952118,
-0.15048857033252716,
-0.4943199157714844,
0.08098141103982925,
-0.31095051765441895,
-0.28844600915908813,
0.04944436997175217,
0.053561341017484665,
0.2457054704427719,
0.52450197935104... |
def classify ( ) : try : body = request. get _ json ( ) print ( body ) img _ url = body [ " url " ] # get the image and show it response = requests. get ( img _ url ) img = image. open ( bytesio ( response. content ) ) prcedimg = processimage ( img ) # convert a 2d image into a flat array # imgfeatures = np. array ( pr... | [
-1.2030413150787354,
-0.47157371044158936,
0.7354674339294434,
0.16373589634895325,
-0.41252267360687256,
-0.6713712215423584,
0.14734970033168793,
0.09331642836332321,
-0.5348580479621887,
-0.2725503444671631,
-0.4016806185245514,
0.8110153079032898,
0.24041813611984253,
0.314273089170455... |
def get _ counts _ and _ lengths _ masked ( input _ segment _ chain, mapped _ read _ array, masked _ logical, keep _ true ) : if masked _ logical : masked _ counts = input _ segment _ chain. get _ masked _ counts ( mapped _ read _ array ) if keep _ true = ='yes': roi _ masked _ counts = input _ segment _ chain. get _ c... | [
0.7445766925811768,
-1.1865040063858032,
0.6069809794425964,
-0.07180923223495483,
0.15353359282016754,
0.37557852268218994,
0.39559900760650635,
-0.06072649359703064,
0.46841174364089966,
-0.1973692625761032,
0.2895788848400116,
0.31528139114379883,
0.13224473595619202,
0.0110717015340924... |
def relabel _ boundary ( self, x, y, nn _ params ) : # fitting nearest neighbors model to determine boundary region n _ neighbors = min ( [ len ( x ), self. n _ neighbors + 1 ] ) x _ maj = x [ y = = self. maj _ label ] nnmt = nearestneighborswithmetrictensor ( n _ neighbors = n _ neighbors, n _ jobs = self. n _ jobs, *... | [
-0.0015335838543251157,
-1.0221517086029053,
0.7484708428382874,
-0.000900771701708436,
-0.10197795182466507,
0.4215101897716522,
-0.4537014067173004,
-1.2369505167007446,
-0.2901574969291687,
0.8504953980445862,
0.21207861602306366,
1.0430254936218262,
-0.35698768496513367,
0.470597207546... |
def bokeh _ multiple _ pr _ curves ( y _ probas _ df : pd. dataframe, y _ true : iterable [ bool ] ) - > layoutdom : fig = none colors = itertools. cycle ( palette ) for column in y _ probas _ df. columns : fig = bokeh _ pr _ curve _ from _ y _ proba ( y _ probas _ df [ column ], y _ true, fig = fig, color = colors. _ ... | [
0.12086673080921173,
0.9544201493263245,
0.7370386123657227,
-0.015710270032286644,
0.35381072759628296,
0.5448014140129089,
-0.05840438976883888,
-0.04948040097951889,
-0.6447138786315918,
0.13502047955989838,
0.010931925848126411,
0.6026562452316284,
0.6118893623352051,
-0.53160059452056... |
def test _ get _ consensus _ assignment _ adjusts _ resolution ( self ) : in1 = [ ['ab ','bc ','fg'], ['ab ','bc ','fg ','hi'], ['ab ','bc ','fg ','hi'] ] # defaults params = {'id _ to _ taxonomy _ fp': self. id _ to _ tax1 _ fp,'reference _ sequences _ fp': self. refseqs1 _ fp } expected = ( ['ab ','bc ','fg'], 1. 0, ... | [
-0.26934608817100525,
-0.11338149756193161,
0.5360944867134094,
0.5302931070327759,
0.5923898220062256,
-0.07490009814500809,
0.061263587325811386,
0.28956338763237,
-0.9786383509635925,
0.49659138917922974,
0.33335384726524353,
-0.44472789764404297,
-0.45263639092445374,
-0.58008533716201... |
def checkoutformat ( data _ format, frame _ id ) : assert isinstance ( data _ format, list ) assert all ( isinstance ( x, str ) for x in data _ format ) assert ( len ( data _ format ) = = 2 or len ( data _ format ) = = 3 ) if len ( data _ format ) = = 2 : filename = ( " %. " + data _ format [ 0 ] + data _ format [ 1 ] ... | [
-0.026521220803260803,
-0.5219773650169373,
0.8122730255126953,
-0.3477141261100769,
-0.10407597571611404,
-0.35442444682121277,
-0.7483824491500854,
0.6188448071479797,
0.16657525300979614,
0.616855800151825,
0.896952211856842,
0.23200032114982605,
-0.21220943331718445,
0.6790998578071594... |
def test _ atomic _ id _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ id _ pattern _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - pattern - 4. xsd ", instance = " nistdata / atomic / id / schema + instance... | [
0.18203356862068176,
-0.15133744478225708,
0.43446293473243713,
0.3405851423740387,
-0.18516306579113007,
0.19627603888511658,
0.17853926122188568,
-0.3343653082847595,
0.36138272285461426,
0.7096802592277527,
-0.11820178478956223,
-0.2450570911169052,
-0.22887778282165527,
-0.562235355377... |
def _ send _ mail ( address : str, subject : str, content : str, content _ type = " html ", content _ charset = " utf - 8 ", smtp : optional [ smtplib. smtp ] = none ) - > none : logger = current _ app. logger sender _ address ='fabius1705 @ live. de'msg = mimetext ( content, content _ type, content _ charset ) msg [ "... | [
-0.22435277700424194,
0.9362613558769226,
0.5060447454452515,
0.21938693523406982,
-0.539732813835144,
-0.5790843367576599,
0.04280634596943855,
-0.02928096055984497,
-0.2877025306224823,
0.5733591914176941,
0.19463974237442017,
1.1815879344940186,
0.06949698179960251,
0.41015625,
-0.394... |
def test _ atomic _ id _ enumeration _ 2 _ nistxml _ sv _ iv _ atomic _ id _ enumeration _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - enumeration - 3. xsd ", instance = " nistdata / atomic / id / schem... | [
0.0895412489771843,
-0.7285351753234863,
0.5209173560142517,
0.24033984541893005,
-0.10530418157577515,
0.19936364889144897,
-0.08674779534339905,
-0.47230997681617737,
0.39434415102005005,
0.831219494342804,
-0.09815870225429535,
0.014305015094578266,
0.0032113490160554647,
-0.41025036573... |
def normalize _ space ( s ) : return " ". join ( re. split ( r " \ s + ", s ) ) | [
0.5170298218727112,
0.3021314740180969,
0.22339695692062378,
0.06898012012243271,
-0.9827808737754822,
-0.7038608193397522,
-0.30051785707473755,
0.8553610444068909,
1.413994550704956,
-0.1480323076248169,
-0.09015051275491714,
0.33698680996894836,
-0.5691237449645996,
0.11203707009553909,... |
def priorityrest ( htmlsoup ) : secondkeylist = keywordlist [ 2 : - 1 ] for keyword in secondkeylist : search _ word = keyword keys = htmlsoup. body. find _ all ( string = re. compile ( '. * { 0 } * '. format ( search _ word ) ), recursive = true ) return keys | [
-0.5848479270935059,
0.3124665319919586,
0.7309945225715637,
0.768621027469635,
-0.16934102773666382,
-1.2191290855407715,
-1.0968964099884033,
-0.08924988657236099,
0.30661606788635254,
0.6646775007247925,
-0.4355221390724182,
0.047648247331380844,
-1.31471848487854,
0.9873447418212891,
... |
def data ( self ) : if self. _ file is not none : return self. file. read _ bytes ( ) else : return self. output. retrievedata ( ) | [
0.42650482058525085,
-0.5518757700920105,
0.5149556994438171,
0.05642635375261307,
-0.08196612447500229,
-0.12440460175275803,
0.09147138893604279,
-0.7945161461830139,
-0.21937690675258636,
-1.6494611501693726,
0.9591699242591858,
-0.16621878743171692,
-0.5066638588905334,
0.1521326452493... |
def predict ( self, embeddings : np. array ) - > np. array : pass | [
-0.9897252321243286,
-0.07051205635070801,
0.2557123601436615,
1.3023542165756226,
-0.17979426681995392,
0.3985579013824463,
0.30833399295806885,
0.2509583830833435,
0.4947142004966736,
-0.08375822007656097,
-0.29463836550712585,
0.5110266208648682,
-0.187336727976799,
0.771287202835083,
... |
async def fixture _ dbus _ interface ( dbus _ session _ bus : messagebus ) - > networkinterface : dbus _ interface = networkinterface ( " / org / freedesktop / networkmanager / devices / 1 " ) await dbus _ interface. connect ( dbus _ session _ bus ) yield dbus _ interface | [
-1.0213032960891724,
0.5307943224906921,
0.34283721446990967,
0.016096755862236023,
0.039313506335020065,
0.20554180443286896,
0.7910999059677124,
-0.8730247020721436,
0.9376638531684875,
-1.1324951648712158,
-0.547081470489502,
-0.301369309425354,
-0.895244300365448,
0.10203798115253448,
... |
def new ( * args, * * kargs ) : obj = itksubtractconstantfromimagefiltericf2cficf2. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj | [
0.6606764197349548,
-1.2486011981964111,
0.05034985393285751,
-0.47849005460739136,
-0.23439829051494598,
-0.9899016618728638,
1.1197103261947632,
0.4646645486354828,
-1.4922024011611938,
-0.22418789565563202,
-1.7150839567184448,
-0.4049168825149536,
0.48143789172172546,
0.209282815456390... |
def test _ atomic _ hex _ binary _ length _ 4 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ length _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - length - 5. xsd ", instance = " nistdata / ... | [
0.20879504084587097,
-0.27788037061691284,
0.38106462359428406,
0.3821176588535309,
-0.07957469671964645,
0.12140218168497086,
0.051947206258773804,
-0.15150333940982819,
-0.4397954046726227,
0.4441523849964142,
-0.9286140203475952,
-0.6255618929862976,
-0.3668851852416992,
0.7331084609031... |
def write ( self ) : # update the cockpit with the outputs from the individual quantities for q in self. quantities : _ update _ dicts ( self. output, q. output ) # dump to file with open ( self. logpath + ". json ", " w " ) as json _ file : json. dump ( self. output, json _ file, indent = 4, sort _ keys = true ) print... | [
-0.6201196312904358,
-1.3417627811431885,
0.43731778860092163,
-0.2831163704395294,
0.4213959276676178,
-0.08931449055671692,
0.48209625482559204,
-0.05110509321093559,
-0.9946526288986206,
-0.480768084526062,
-0.43790116906166077,
-0.4792277216911316,
0.5167748332023621,
0.541039764881134... |
def add _ base _ frame ( self, base _ link : str, xyz : union [ none, list [ float ] ] = none, rpy : union [ none, list [ float ] ] = none, joint _ name : str = none, ) - > none : parent _ link = base _ link child _ link = self. urdf. get _ root ( ) # i. e. current root if xyz is none : xyz = [ 0. 0 ] * 3 if rpy is non... | [
0.0674428790807724,
-0.8659297227859497,
0.7547099590301514,
0.8030439019203186,
0.6035167574882507,
0.08759665489196777,
0.14402253925800323,
0.955071210861206,
-0.336061030626297,
-1.3834964036941528,
-0.2729964554309845,
0.41786232590675354,
-1.4215141534805298,
0.0518021397292614,
0.... |
def clear _ nested _ contours ( img _ patch, contours ) : " " " indicate whether a contour should be preserved or removed check _ map element is a list in format : [ contour _ idx, contain _ contours, reside _ contained _ by _ contours, nest _ contained _ by _ contours ] " " " if not contours : return [ ], [ ], np. emp... | [
-0.16572816669940948,
-0.8040118217468262,
0.9809848070144653,
0.07744928449392319,
0.03459441661834717,
0.27100399136543274,
1.4112472534179688,
0.13359510898590088,
0.5089765191078186,
-0.6355221271514893,
-0.2097458690404892,
0.0024939461145550013,
-0.2742832899093628,
0.198811084032058... |
def shipping _ city _ name ( self, shipping _ city _ name ) : self. _ shipping _ city _ name = shipping _ city _ name | [
-0.5147736668586731,
-0.22467169165611267,
-0.14790798723697662,
-0.08735541254281998,
-1.5398216247558594,
1.301167368888855,
-0.1045735776424408,
0.3025665879249573,
-0.4787317216396332,
0.2909684479236603,
-0.825501024723053,
-1.2116154432296753,
0.3626629710197449,
-0.08783473819494247... |
def addressexpr ( s ) : val = sloppy _ gdb _ parse ( s ) if not isinstance ( val, int ) : raise argparse. argumenttypeerror ( f " incorrect address ( or gdb expression ) : { s } " ) return val | [
-0.22488495707511902,
-0.2101738303899765,
0.5286845564842224,
-0.19401876628398895,
-0.9348547458648682,
0.4639659821987152,
0.6395530700683594,
-0.23480010032653809,
0.3158662021160126,
0.38393619656562805,
0.873737096786499,
0.7568126916885376,
-0.739325225353241,
0.3772197365760803,
... |
def case ( pred _ expr _ pairs : list [ tuple [ any, any ] ] ) - > symbolicexpression | any : # type : ignore def _ case _ fn ( * pred _ expr _ pairs ) : assert len ( pred _ expr _ pairs ) % 2 = = 0 for pred, expr in zip ( pred _ expr _ pairs [ : : 2 ], pred _ expr _ pairs [ 1 : : 2 ] ) : if pred : return expr raise ru... | [
-0.34129637479782104,
-0.24688366055488586,
0.49120885133743286,
0.8396757245063782,
-0.3719782531261444,
-0.3475838303565979,
1.1337885856628418,
0.18114008009433746,
-0.3162243068218231,
0.37649640440940857,
0.845588743686676,
-0.16716374456882477,
0.516146719455719,
0.43905752897262573,... |
def taxonomy ( self ) : self. printstatus ( ) if self. mloglevel > = 1 : print " # taxonomy : % s " % ( self. mtablenametaxonomy ) print " # taxonomy _ assignments : % s " % ( self. mtablenametaxonomyassignments ) print " # map _ taxonomy : % s " % self. mtablenametaxonomymapping sys. stdout. flush ( ) print " " " # # ... | [
0.8106973767280579,
-0.724828839302063,
0.7771210670471191,
0.10602875053882599,
-0.13720102608203888,
-0.17118559777736664,
0.3507077097892761,
-0.5224276185035706,
-1.2961184978485107,
-0.25806793570518494,
-0.04429718852043152,
0.27660253643989563,
0.6399206519126892,
0.2448863238096237... |
def linspace _ nd ( start, stop, num, name = none, axis = 0 ) : with ops. name _ scope ( name, " linspace ", [ start, stop ] ) : start = ops. convert _ to _ tensor ( start, name = " start " ) # stop must be convertible to the same dtype as start stop = ops. convert _ to _ tensor ( stop, name = " stop ", dtype = start. ... | [
0.0014732127310708165,
-0.0543307289481163,
1.0807362794876099,
0.41282257437705994,
-0.8172728419303894,
0.08065687865018845,
1.0164414644241333,
-0.4828309416770935,
0.277459055185318,
0.022904567420482635,
0.1338978111743927,
0.8420056104660034,
0.5710601210594177,
-0.5668066740036011,
... |
def min _ max _ sequence _ length ( self ) : sequences = [ ] for record in seqio. parse ( self. input _ file, " fasta " ) : sequences. append ( len ( record. seq ) ) return min ( sequences ), max ( sequences ) | [
0.3766385018825531,
-1.678871989250183,
0.30839017033576965,
-0.05875062197446823,
-0.08299025893211365,
-0.25875532627105713,
-0.9068216681480408,
1.2937196493148804,
0.48844659328460693,
0.5263134837150574,
-0.9302050471305847,
-0.08536751568317413,
-0.3664049208164215,
0.553234696388244... |
def monomials _ not _ divisible _ by ( monomials ) : if len ( monomials ) = = 0 : raise quotientalgebraerror ('list of leading monomials was empty') # find the univariate leading terms rect = [ none ] * len ( monomials [ 0 ] ) for monomial in monomials : active _ vars = [ ( i, a ) for i, a in enumerate ( monomial ) if ... | [
-0.3397599458694458,
-0.45662006735801697,
0.4052565395832062,
0.5148245096206665,
0.20689885318279266,
0.38354137539863586,
0.5437343716621399,
-0.3715783655643463,
0.6543902158737183,
0.47205841541290283,
-0.20507733523845673,
-0.5341276526451111,
-1.5446760654449463,
0.47425010800361633... |
def command _ bkln _ oncall ( self, brain, args ) : url = " http : / / monitoring. bkln. corp. yahoo. com : 9999 / pager / gen - pager. cgi? both = 1 " oncall _ csv = self. fetchurl ( url ). split ( " \ n " ) [ 0 ] primary, secondary = oncall _ csv. split ( ',') l = [ ] by _ url = " http : / / api. backyard. yahoo. com... | [
0.3298143744468689,
-0.43768003582954407,
0.8873376846313477,
0.36380547285079956,
0.5350294709205627,
0.21149718761444092,
-1.1748719215393066,
-0.2675108313560486,
0.4004533290863037,
0.5095535516738892,
0.10458739846944809,
0.4300883114337921,
-0.2421564906835556,
0.4482153654098511,
... |
def set _ authors _ to _ cycle ( context, logger = none ) : if logger is none : # called as upgrade step : define our own logger. logger = logging. getlogger ('ageliaco. rd2') # run the catalog. xml step as that may have defined new metadata # columns. we could instead add < depends name = " catalog " / > to # the regi... | [
-0.7019003033638,
-0.45181724429130554,
0.6845950484275818,
-0.32408756017684937,
0.49551922082901,
-0.09196199476718903,
0.6913754940032959,
-0.4657943844795227,
-0.3143121302127838,
1.0131288766860962,
-0.08085108548402786,
1.4442238807678223,
-0.28648829460144043,
-0.1926479935646057,
... |
def get _ packages _ grouped _ by _ version ( self, user _ name, number _ of _ versions _ to _ list = none ) : # get a list of ungrouped package names : self. _ authorize ( user _ name, resources. repository, none, actions. read ) package _ names = self. get _ package _ list ( ) candidates = { } for item in package _ n... | [
-0.33620572090148926,
-0.24530436098575592,
0.4542492628097534,
0.202711284160614,
-0.3387160897254944,
-0.23781956732273102,
0.11130988597869873,
0.09318690001964569,
-0.09945882856845856,
0.4185238778591156,
-0.44178083539009094,
-0.062440741807222366,
0.26612529158592224,
0.087864562869... |
def train _ in _ post ( self, train : train, post : post ) : if post. type = = posttype. town : # unload product from train to town : goods = 0 if train. post _ type = = posttype. market : goods = min ( train. goods, post. product _ capacity - post. product ) post. product + = goods if post. product = = post. product _... | [
-0.266141414642334,
-0.05711271986365318,
0.9464811086654663,
-0.1823553740978241,
0.14312171936035156,
0.148469939827919,
0.2305397391319275,
-0.8018885850906372,
-0.885986328125,
-0.08406001329421997,
-1.018413782119751,
0.04454822838306427,
0.0054636732675135136,
-0.603223443031311,
0... |
def ppo _ train ( env _ name = gin. required, env _ seed = gin. required ) : # make a gym environment. gym _ env = gym. make ( env _ name ) gym _ env. seed ( env _ seed ) np. random. seed ( 0 ) tf. random. set _ random _ seed ( 0 ) # bound action _ space and state _ space sizes. with gin. unlock _ config ( ) : action _... | [
0.05533451586961746,
0.5132759809494019,
0.8535603880882263,
0.3905353546142578,
0.6469030976295471,
-0.32988011837005615,
0.6431730389595032,
0.38816821575164795,
-0.8394084572792053,
0.30598509311676025,
-0.6063872575759888,
0.33494386076927185,
0.6350032091140747,
-0.015567028895020485,... |
def destroy ( request, pk = none, * args, * * kwargs ) : message = chatmessage. objects. get ( pk = int ( pk ) ) if message. sender = = request. user : message. delete ( ) return response ( { " code " : 1 } ) return response ( { " code " : - 1 }, status = status. http _ 403 _ forbidden ) | [
-0.39980849623680115,
0.14358197152614594,
0.7969365119934082,
0.875091552734375,
-0.2262423187494278,
-0.05956833064556122,
0.9672655463218689,
-0.18807291984558105,
-0.24145501852035522,
0.06383824348449707,
0.2608766555786133,
-0.22995544970035553,
-0.39434388279914856,
0.85290217399597... |
def expressionderivation ( cls, record ) : # make a managed dependent yield from cls. manageddependentderivation ( ) # if the record has anything to say if record. expression : # this is its spot yield record. expression # this where they fit yield cls. expression # and whatever else my superclass says yield from cls. ... | [
0.8792877197265625,
-0.1360119730234146,
0.7330683469772339,
0.27524301409721375,
-0.22656363248825073,
0.03763682395219803,
0.8111538887023926,
0.619128406047821,
0.39326947927474976,
-0.448109894990921,
0.06561149656772614,
0.1753932684659958,
-0.19759491086006165,
0.7036938071250916,
... |
def ranking ( self ) - > arraylist [ tuple ] : array _ list = arraylist ( max ( self. min _ capacity, len ( self. new _ hash _ table ) ) ) # must copy and insert all your non - empty ( key, value ) tuples from the hash table into an arraylist. counter = 0 for i in range ( len ( self. new _ hash _ table. table ) ) : # o... | [
-0.17731139063835144,
0.2743317782878876,
0.6579537987709045,
1.159984827041626,
0.5183703899383545,
-0.47543370723724365,
-0.07152020931243896,
0.04497512802481651,
-0.779959499835968,
0.26620081067085266,
-0.26763734221458435,
-0.09281347692012787,
-0.019517207518219948,
0.10496046394109... |
def mark _ step _ done ( self, step : step ) - > operationdependencies : if self. dependency _ graph [ step ] : raise unsatisfieddepdencieserror ( ) new _ graph = copy. deepcopy ( self. dependency _ graph ) new _ dependants = copy. deepcopy ( self. dependant _ steps ) if step in new _ dependants : for dependant in new ... | [
-0.7255353331565857,
-0.2644619345664978,
0.3384815454483032,
0.31598523259162903,
0.15219050645828247,
-0.23815679550170898,
1.1402331590652466,
-0.12939365208148956,
-0.3105253577232361,
-0.10098908096551895,
-0.6181367039680481,
-0.31803616881370544,
0.2998028099536896,
0.76210504770278... |
def _ _ init _ _ ( self, model ) : if not isinstance ( model, probability ) : raise typeerror ('expected probability') self. model = model | [
0.18560898303985596,
-0.16361676156520844,
0.2951701879501343,
0.9650669693946838,
-0.5599817037582397,
0.8411158919334412,
-0.28968214988708496,
-0.04035167023539543,
0.07582517713308334,
0.11185631155967712,
0.022665908560156822,
-0.05940436199307442,
-0.575289785861969,
0.32014977931976... |
def _ find _ roots ( a _ tree ) : for inode in a _ tree : if inode. phead = ='0': yield inode | [
0.027642888948321342,
-0.6670222282409668,
0.5756992101669312,
-0.10784667730331421,
-0.12707342207431793,
-0.5932694673538208,
-0.5677821040153503,
0.12672069668769836,
0.7394441962242126,
0.7359651923179626,
0.9615494012832642,
-0.4746553897857666,
-0.5691998600959778,
1.563185214996338,... |
def get ( resource _ name : str, id : pulumi. input [ str ], opts : optional [ pulumi. resourceoptions ] = none, arn : optional [ pulumi. input [ str ] ] = none, auto _ enable _ controls : optional [ pulumi. input [ bool ] ] = none, control _ finding _ generator : optional [ pulumi. input [ str ] ] = none, enable _ def... | [
-0.2321646511554718,
-0.4488057494163513,
0.3160299062728882,
0.32676979899406433,
0.34955185651779175,
0.061693329364061356,
0.28119492530822754,
0.25343722105026245,
1.1301451921463013,
-0.33402183651924133,
0.18057416379451752,
1.053491234779358,
0.20175331830978394,
-0.7288481593132019... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.