text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def test _ get _ health _ status ( ) : health _ metric = producer. get _ health _ metric ('example. com') assert health _ metric. status _ code = = 200 | [
0.5862355828285217,
0.06414161622524261,
0.23010599613189697,
1.1236920356750488,
0.5370820760726929,
0.6432851552963257,
-0.4401768147945404,
0.364516943693161,
-0.3742387890815735,
-0.42643555998802185,
-0.07616641372442245,
1.071947693824768,
0.9949710965156555,
-0.8462837338447571,
-... |
def stream _ output _ mode ( self ) - > optional [ str ] : return self. _ _ stream _ output _ mode | [
0.1885346621274948,
-0.07274293899536133,
0.5319052338600159,
0.09297669678926468,
0.27856162190437317,
1.2052762508392334,
0.316718727350235,
-0.8102989196777344,
-0.4845096468925476,
0.01015637069940567,
0.07740145921707153,
0.23374374210834503,
-0.4127083122730255,
-0.4939332902431488,
... |
def random _ be _ response ( self ) : resp _ 1 = " i'm an nba search bot, here to answer your nba queries. " resp _ 2 = " i'm a chatbot here to answer your questions. " resp _ 3 = " i'm just some lines of code trying to decipher what you asked me in a different language via math and natural language processing. " resp ... | [
-0.20558422803878784,
-0.26249900460243225,
0.7241625189781189,
0.04190666973590851,
0.8453892469406128,
0.52199786901474,
0.4142935276031494,
-0.33776625990867615,
1.0647202730178833,
-0.5756879448890686,
-0.24442048370838165,
-0.02751355990767479,
-1.1056039333343506,
-0.1464665979146957... |
def getdetector ( ) : andor _ solis. getdetector. restype = ctypes. c _ uint xpixels, ypixels = ctypes. c _ int ( ), ctypes. c _ int ( ) result = andor _ solis. getdetector ( ctypes. byref ( xpixels ), ctypes. byref ( ypixels ) ) check _ status ( result ) return int ( xpixels. value ), int ( ypixels. value ) | [
-0.27468955516815186,
-0.7159411907196045,
0.6028889417648315,
-0.4804334342479706,
-0.5017568469047546,
-0.948009729385376,
-0.15768180787563324,
-0.4156437814235687,
0.99658203125,
-0.9102861285209656,
0.2440207302570343,
0.4849098026752472,
-0.2433733195066452,
0.4319401979446411,
0.9... |
def _ _ check _ timestep ( self, unixtime ) : # check time since last update if self. last _ update < 0 : # update time to this event time self. last _ update = unixtime return false elif unixtime - self. last _ update > self. args ['timestep'] : # update timer to this event time self. last _ update = unixtime return t... | [
-0.7788547277450562,
0.47701647877693176,
0.7703644037246704,
0.40528684854507446,
0.41625434160232544,
0.5261703133583069,
-1.0804499387741089,
0.07394120842218399,
-0.18178530037403107,
0.46594366431236267,
-0.005507407709956169,
-0.8762410283088684,
-0.7895931601524353,
0.88923889398574... |
def add _ decoherence ( coeff _ current, cstate _ l, e _ ad, e _ kin, dt _ l ) : # hartree ( recommended value. pourquoi? what effect does it have? ) alpha = 0. 1 # initialize tau = np. zeros ( nel ) new _ coeff = np. zeros ( nel, dtype ='complex64') # compute tau and coeffs other than cstate for n in range ( nel ) : i... | [
0.1028614342212677,
-0.967394232749939,
0.809370756149292,
-0.4284325838088989,
0.04246855154633522,
0.1843627393245697,
-0.3925333321094513,
0.5725616216659546,
0.6570627689361572,
0.5438824892044067,
0.16896624863147736,
-0.17800454795360565,
0.21961529552936554,
0.17365038394927979,
0... |
def test _ set _ new _ score ( self, test _ client, login _ response ) : quote _ id = " " while quote _ id! = " f6c8c2c0 - c648 - 459e - 9c08 - 673383a326b0 " : quote _ id = json. loads ( test _ client. get ( " / quote " ). data. decode ( " utf - 8 " ) ) [ " quote _ id " ] highscore _ response = test _ client. post ( "... | [
0.03110373392701149,
-0.30064651370048523,
0.6984189748764038,
0.18028417229652405,
1.0323628187179565,
-0.2972726821899414,
0.08978000283241272,
-0.43855124711990356,
-0.14210042357444763,
0.49161916971206665,
-1.449881672859192,
0.5584614276885986,
-0.4160551428794861,
-0.225793406367301... |
def get _ word ( elem ) : result = [ ] str _ elem = str ( elem ) caracter = split ( str _ elem ) for i in range ( 0, len ( caracter ) ) : if caracter [ i ] = ='1': result. append ('unu') if caracter [ i ] = ='2': result. append ('doi') if caracter [ i ] = ='3': result. append ('trei') if caracter [ i ] = ='4': result. ... | [
-0.7457804679870605,
-0.024331744760274887,
1.0449814796447754,
0.4537314176559448,
-0.748711109161377,
0.45003023743629456,
0.4207974374294281,
0.2038268893957138,
0.06508822739124298,
0.8898677825927734,
-0.8411174416542053,
-0.24737800657749176,
-0.3775247633457184,
0.04992789402604103,... |
def _ _ sub _ _ ( self, other ) : return self. _ mathematical _ operator ( self, other, operator. sub ) | [
0.18762633204460144,
0.03710388392210007,
0.6568817496299744,
0.8641934990882874,
-1.6251400709152222,
0.20114760100841522,
-0.19948221743106842,
-0.8570073246955872,
-0.27026763558387756,
-0.629815936088562,
-0.4695703685283661,
-0.2300591766834259,
0.39028555154800415,
-1.041020631790161... |
def test _ dilation _ with _ padding ( ) : _ assert _ inout _ for _ expected _ output ( input _ length = 6, expected = 6, dilation = 3, kernel _ size = 3, padding = 3 ) | [
0.985041081905365,
1.2378005981445312,
0.5158747434616089,
0.984550416469574,
-0.06365077942609787,
0.451702356338501,
-0.20299462974071503,
-0.02135618031024933,
1.203525424003601,
-0.5980087518692017,
-0.3953813314437866,
-0.6668137311935425,
0.4043521583080292,
1.0968276262283325,
0.6... |
def async _ manage _ legacy _ subscription _ issue ( hass : homeassistant, subscription _ info : dict [ str, any ], ) - > none : if subscription _ info. get ( " provider " ) = = " legacy " : ir. async _ create _ issue ( hass = hass, domain = domain, issue _ id = " legacy _ subscription ", is _ fixable = true, severity ... | [
0.8722227811813354,
-0.12192480266094208,
0.6923595666885376,
0.652664840221405,
0.007505446206778288,
-0.4237014651298523,
-1.0573844909667969,
0.6317689418792725,
1.093407154083252,
-0.08002577722072601,
0.42873531579971313,
0.09843115508556366,
0.320496141910553,
0.22443220019340515,
... |
def parse _ options ( ) : parser = optionparser ( ) parser. add _ option ('- f ','- - path - data ', action ='store ', dest ='path _ data ', default ='', help ='path to a csv data file with data columns separated by space') parser. add _ option ('- t ','- - title ', action ='store ', dest ='title ', default ='', help =... | [
0.6419439911842346,
-0.5319862365722656,
0.7835764288902283,
0.008022255264222622,
0.19384409487247467,
0.6357835531234741,
0.3285897374153137,
-0.1675211787223816,
-0.48785459995269775,
0.02569623291492462,
0.452353298664093,
-0.12598727643489838,
-0.01249618548899889,
0.05873826146125793... |
async def voices ( self ) - > voicesiterable : mozilla _ voices = [ voice ( id = " en - us ", name = " en - us ", locale = " en - us ", language = " en ", gender = " f " ) ] for voice in mozilla _ voices : yield voice | [
-0.13098208606243134,
-0.2744881808757782,
0.32824933528900146,
0.5346620678901672,
0.5946565270423889,
0.04183686524629593,
-1.7463781833648682,
-0.3009253740310669,
-0.7504695057868958,
0.2960470914840698,
-0.18453821539878845,
-0.11484257131814957,
0.7895243167877197,
0.6334473490715027... |
def _ _ target _ from _ host ( host ) : default _ hostname = app _ identity. get _ default _ version _ hostname ( ) if default _ hostname is none : return _ unknown _ app _ version if host. endswith ( default _ hostname ) : version _ name = host [ : - ( len ( default _ hostname ) + 1 ) ] if version _ name : return vers... | [
-0.098490409553051,
-0.5087167620658875,
0.5042309761047363,
1.1324987411499023,
0.09658631682395935,
0.5416582822799683,
-0.8107132315635681,
-0.3496819734573364,
-0.46531397104263306,
0.7645824551582336,
0.14494377374649048,
0.2417002022266388,
-0.06774035096168518,
-0.2841951251029968,
... |
def bad _ request ( self, message, code = 400 ) : return jsonify ( error = bad _ request _ msg. get ( message ) ), code | [
-1.5597355365753174,
-0.5271838307380676,
0.5040608048439026,
-0.48104652762413025,
0.2116684466600418,
-1.0487340688705444,
-1.9062410593032837,
-0.5404437780380249,
-0.6022711396217346,
-0.18770670890808105,
0.2575726807117462,
1.5311814546585083,
-0.2172158807516098,
0.4325113296508789,... |
def find _ intermediate _ points ( coverage _ path ) : # init start _ point = ( 0, 0 ) drone _ path = [ start _ point ] for point in coverage _ path : point = ( - 1 * point [ 0 ], point [ 1 ] ) # x needs to be mirrored for webots path _ to _ next = path _ between ( drone _ path [ - 1 ], point, 10 ) for path in path _ t... | [
-0.4810965955257416,
-0.5610759854316711,
0.5168116688728333,
0.11181747913360596,
0.7803789377212524,
0.27390897274017334,
0.7055475115776062,
0.8576542735099792,
0.756588876247406,
0.6931072473526001,
0.06851902604103088,
0.2735629081726074,
-0.13008195161819458,
0.4422760009765625,
0.... |
def plot _ pr ( preds, labels, title = " precision recall curve " ) : # compute values for curve precision, recall, _ = precision _ recall _ curve ( labels, preds ) prc _ auc = auc ( recall, precision ) plt. figure ( ) lw = 2 plt. plot ( recall, precision, color ='darkorange ', lw = lw, label ='prc curve ( area = % 0. ... | [
0.8165004253387451,
0.045895736664533615,
0.8665505051612854,
-1.1124134063720703,
-0.3535026013851166,
0.6782631278038025,
0.02445555292069912,
0.7726341485977173,
0.4833078384399414,
-0.43478819727897644,
1.1785635948181152,
1.6607563495635986,
0.027517838403582573,
-0.6130405068397522,
... |
def help ( self ) : return self. _ _ doc _ _ | [
0.936817467212677,
-0.663912832736969,
0.5074796080589294,
0.11280348151922226,
-0.3358495533466339,
1.1524707078933716,
1.125975489616394,
-0.6556267142295837,
0.1112620010972023,
-0.35473352670669556,
0.6351178288459778,
0.7805373072624207,
0.2973877489566803,
-0.6040340662002563,
-0.0... |
def id ( self ) - > str : return pulumi. get ( self, " id " ) | [
1.2123790979385376,
0.06695873290300369,
0.39627665281295776,
0.439220130443573,
1.2838257551193237,
1.4655324220657349,
-0.4763162434101105,
0.2041633278131485,
1.2207536697387695,
0.31055939197540283,
0.3784306049346924,
0.7317116856575012,
-0.023810407146811485,
-0.9869450926780701,
-... |
def is _ child ( child, parent ) : res = false obj = child while obj is not none and not res : res = obj = = parent obj = obj. parent ( ) return res | [
0.9529802799224854,
-0.5217067003250122,
0.5079418420791626,
0.7062197923660278,
-0.3370955288410187,
0.05240887403488159,
0.527056097984314,
-0.9609439373016357,
0.11934459209442139,
-0.3500351905822754,
-1.0940779447555542,
-0.5263222455978394,
-0.28082212805747986,
-0.8129540085792542,
... |
def lexical _ step ( self, input, hidden, projected _ keys, encoder _ outputs ) : hidden _ states = [ ] # ( 1 ) convert input to an embedding. embedded = self. embeds [ input. item ( ) ]. view ( 1, 1, - 1 ) # ( 2 ) generate the context vector and alphas using the attention # layer provided to the network on initializat... | [
0.607965350151062,
0.3046715259552002,
0.803931474685669,
0.6672337651252747,
-0.671904981136322,
-0.611414909362793,
-0.08927349746227264,
-0.20357686281204224,
-0.42693817615509033,
0.7007380723953247,
-0.34177425503730774,
-0.15424060821533203,
0.0034429419320076704,
0.39534199237823486... |
def hough _ lines ( img, rho, theta, threshold, min _ line _ len, max _ line _ gap, line _ img = none ) : lines = cv2. houghlinesp ( img, rho, theta, threshold, np. array ( [ ] ), minlinelength = min _ line _ len, maxlinegap = max _ line _ gap ) if line _ img is none : line _ img = np. zeros ( ( img. shape [ 0 ], img. ... | [
1.1037341356277466,
-0.7199430465698242,
0.6258531808853149,
0.8116439580917358,
0.3397570550441742,
0.8740501403808594,
-1.022325038909912,
0.584313690662384,
0.6198438405990601,
-0.7015888690948486,
0.4192083179950714,
0.012119799852371216,
-0.15659703314304352,
0.1622871458530426,
0.2... |
def tokens ( self ) : return sorted ( self. _ df ) | [
-0.4769321084022522,
-0.34381189942359924,
0.42758509516716003,
0.18206727504730225,
-0.12890802323818207,
-0.44261062145233154,
-0.2741122543811798,
-0.17413771152496338,
-0.39033809304237366,
-1.3886020183563232,
0.3836532235145569,
1.0882636308670044,
0.33327555656433105,
-0.15963284671... |
def _ _ init _ _ ( self, root : frame ) - > none : root. title ( " image editor " ) ws = root. winfo _ screenwidth ( ) # width of the screen hs = root. winfo _ screenheight ( ) # height of the screen w, h = ws * 0. 6, hs * 0. 7 self. w, self. h = w, h # calculate x and y coordinates for the tk root window x = ( ws / 2 ... | [
0.11933878809213638,
-0.14536747336387634,
0.9235333800315857,
0.228059783577919,
-0.9379963874816895,
-0.49253788590431213,
0.17740584909915924,
-0.5859447717666626,
0.46154075860977173,
-0.3234718441963196,
-0.22379769384860992,
0.04947516694664955,
0.13766330480575562,
1.465006470680236... |
def on _ conversation _ message _ received ( self, sender, message ) : # todo : have smiley object in the stringview to keep image + trigger strv = stringview ( ) if message. content in message. msn _ objects. keys ( ) : print " single emoticon " strv. appendimage ( message. msn _ objects [ message. content ]. _ locati... | [
-0.49108627438545227,
-0.4863678216934204,
0.6063172817230225,
-0.5342998504638672,
-0.5595980882644653,
-0.4042419195175171,
-0.11054164916276932,
0.4863593578338623,
0.951235294342041,
-0.04867958649992943,
-0.3314972519874573,
-0.5101379156112671,
0.2971688508987427,
0.5742721557617188,... |
def method ( self ) : return self. _ _ method | [
-0.19122982025146484,
-0.09455693513154984,
0.22238975763320923,
-0.6486795544624329,
0.37326255440711975,
-0.058762695640325546,
0.966152012348175,
-0.6239429712295532,
0.4423798620700836,
-1.091482162475586,
0.77680903673172,
0.327725350856781,
0.16503632068634033,
-0.16441656649112701,
... |
def f ( u ) : v, theta, x, y = u # passing list to a tuple return np. array ( [ - g * sin ( theta ) - ( c _ d / c _ l ) * ( g / v _ t * * 2 ) * ( v * * 2 ), - g * cos ( theta ) / v + ( g / v _ t * * 2 ) * v, v * cos ( theta ), v * sin ( theta ) ] ) | [
-0.7382980585098267,
0.14445151388645172,
0.3079989552497864,
-0.2033381313085556,
0.22940312325954437,
0.47715047001838684,
0.35126563906669617,
0.45472320914268494,
-0.37608417868614197,
-0.3446967899799347,
-0.8045059442520142,
0.1086488887667656,
0.48787352442741394,
-0.143393009901046... |
def build _ message ( adds _ table, adds _ table _ html, deletes _ table, deletes _ table _ html, company _ name, email _ adds = true, email _ deletes = true ) : text _ msg = " " html _ msg = " " if email _ adds : text _ msg + = " \ nnew jobs posted " + ( " for " + company _ name ) * ( company _ name! = " " ) + " : \ n... | [
0.018268121406435966,
0.361788272857666,
1.0695207118988037,
0.11299753934144974,
-0.22929205000400543,
-0.14674898982048035,
-0.4432447850704193,
0.07040859758853912,
-0.8049773573875427,
0.38769346475601196,
0.4932875335216522,
0.6417708396911621,
-0.2550749182701111,
0.71864914894104,
... |
def possibly _ shared _ cython _ type ( self, t ) : if self. _ use _ shared _ ptr [ t ] : cyt = self. _ shared _ ptrs. get ( t, none ) if cyt is none : self. _ shared _ ptrs [ t ] ='shared _ ptr ['+ self. cython _ type ( t ) +']'cyt = self. _ shared _ ptrs [ t ] else : cyt = self. cython _ type ( t ) return cyt | [
0.39724087715148926,
0.14667649567127228,
0.5610199570655823,
-0.5055200457572937,
0.6360626816749573,
-0.3363956809043884,
1.3650739192962646,
-1.236737608909607,
0.8301323056221008,
0.31226930022239685,
-0.44293147325515747,
0.4418119192123413,
-0.6843917965888977,
0.7979775667190552,
... |
def get _ ip ( self ) : if self. address is none : return empty ( ) else : for ip in self. manager. ips : if ip. address = = self. address : return ip return empty ( ) # line should not be reached | [
-0.5003357529640198,
-0.31015652418136597,
0.5375632047653198,
0.2820538282394409,
-0.3509155213832855,
-0.5021610856056213,
-0.6591419577598572,
0.015982819721102715,
0.39477959275245667,
-0.567237913608551,
0.7818658351898193,
0.033132679760456085,
-0.3290075659751892,
-0.741543889045715... |
def valid _ data _ fields ( report _ fields, summary _ fields, parser ) : if not summary _ fields : summary _ fields = [ " image " ] if not report _ fields : report _ fields = [ " image " ] else : for key in summary _ fields : if key not in report _ fields : parser. print _ help ( ) sys. exit ( " all summary _ fields m... | [
0.36560070514678955,
0.14818227291107178,
0.3062707781791687,
-0.12513962388038635,
0.9198518395423889,
0.9997468590736389,
-0.12109528481960297,
0.48435312509536743,
-0.03765128552913666,
0.5131786465644836,
0.38651618361473083,
0.09060407429933548,
-0.4464717507362366,
0.4348238408565521... |
def _ _ getitem _ _ ( self, key ) : if key > = len ( self. locationperms ) : return 0 self. calcdistance ( self. locationperms [ key ] ) if self. dist < self. threshold : return 1 else : return 0 | [
-0.9925174117088318,
-0.38000163435935974,
0.48714742064476013,
0.0020790607668459415,
-1.054129958152771,
0.17226094007492065,
-0.1859542727470398,
0.7982306480407715,
-0.05651327967643738,
0.23076479136943817,
0.6357182860374451,
-0.17215599119663239,
-0.965111255645752,
-0.3617533743381... |
def underline ( text ) : return wrap _ html ( text, " u " ) | [
0.2703936994075775,
0.27453726530075073,
0.19859160482883453,
-0.059598520398139954,
-0.6201446652412415,
0.7161793112754822,
-0.7504422664642334,
1.0068696737289429,
0.1880727857351303,
-0.9822299480438232,
-0.5465683341026306,
0.43589675426483154,
0.20569591224193573,
-0.5711658000946045... |
def random _ string ( string _ length = 10 ) : letters = string. ascii _ lowercase return''. join ( random. choice ( letters ) for i in range ( string _ length ) ) | [
0.3555711805820465,
-0.5707743763923645,
0.09066837280988693,
-1.4444224834442139,
0.725751519203186,
0.8024771213531494,
-0.4437364339828491,
-0.11615805327892303,
0.827484130859375,
0.2229478806257248,
0.2442423701286316,
0.575783371925354,
-1.151326298713684,
-1.0952194929122925,
-0.9... |
def _ _ str _ _ ( self ) : self. readdatabase ( ) if self. root = = none : return " [ empty task tree ] " else : return self. mode. tostring ( ) | [
-0.5530262589454651,
-0.7782597541809082,
0.6305141448974609,
-0.6276127696037292,
-0.43269211053848267,
0.5555906295776367,
-0.43666839599609375,
-0.17261958122253418,
-0.6323120594024658,
0.8042576313018799,
0.6639412641525269,
-0.4788929522037506,
-0.3483155071735382,
0.1584607660770416... |
def disable ( name, * * kwargs ) : cmd = " update - rc. d { } disable ". format ( name ) return not _ _ salt _ _ [ " cmd. retcode " ] ( cmd ) | [
-0.14919695258140564,
0.08717747777700424,
0.7185937166213989,
-0.035037606954574585,
-1.2256097793579102,
0.8586319088935852,
0.0064440942369401455,
-0.12156882137060165,
0.27818191051483154,
0.5486453771591187,
-0.722236156463623,
-0.42638811469078064,
-2.2613537311553955,
-0.39745706319... |
def sample ( self, n = 100 ) : x = r. uniform ( size = [ n, self. dim ] ) return x | [
-0.6527377367019653,
0.6760051846504211,
0.23494873940944672,
-0.5505949854850769,
-0.6442597508430481,
0.5616904497146606,
-0.10797665268182755,
-0.38793373107910156,
0.8824000954627991,
-0.15099094808101654,
-0.6738325953483582,
0.7001218795776367,
-0.014715245924890041,
-0.0391298308968... |
def test ( epoch, model, test _ loader, grapher, prefix ='test') : return execute _ graph ( epoch, model, test _ loader, grapher, prefix ='test') | [
0.5407580733299255,
0.17213834822177887,
0.36613163352012634,
0.22568385303020477,
-0.19560037553310394,
-0.3888888359069824,
-0.23225203156471252,
-0.4758673906326294,
-0.51686692237854,
0.2745579183101654,
-0.125812366604805,
0.7398591041564941,
-0.26958155632019043,
-0.8963145613670349,... |
def generate _ array ( self ) : if type ( self. cells ) is tuple : raise exception ('the board has already been generated') for i in self. iter : for j in self. iter : if abs ( j - i ) < self. width : self [ i, j ] = none self. cells. append ( ( i, j ) ) self. cells = tuple ( self. cells ) # lock the cells | [
-1.1940760612487793,
0.6857951283454895,
0.5944341421127319,
-0.03930876404047012,
0.8554816246032715,
0.1035371944308281,
0.3540411591529846,
-0.2983693480491638,
-0.34242698550224304,
0.27072110772132874,
0.15095524489879608,
-0.4098782241344452,
-1.1237722635269165,
0.5407597422599792,
... |
def _ _ init _ _ ( self, * args ) : _ topods. topods _ compsolid _ swiginit ( self, _ topods. new _ topods _ compsolid ( * args ) ) | [
0.8851237893104553,
-0.27472034096717834,
0.3900305926799774,
-0.4171723425388336,
0.1427149921655655,
1.313496470451355,
1.1384694576263428,
-0.18283599615097046,
0.47062405943870544,
-0.6474609971046448,
-0.23348073661327362,
-0.19492213428020477,
-0.4478693902492523,
0.5856385827064514,... |
def starttest ( self, method ) : self. _ calls. append ('starttest') | [
0.7244120240211487,
0.9573430418968201,
0.2270301729440689,
0.4008208215236664,
1.0482070446014404,
0.057073190808296204,
0.4651533365249634,
-0.6935876607894897,
0.6673781871795654,
-0.23974119126796722,
-0.2211294174194336,
0.7088367938995361,
-0.9562553763389587,
0.4746226370334625,
-... |
def template _ logwl _ resample ( spectrum, template, wblue = none, wred = none, delta _ log _ wavelength = none, resampler = linearinterpolatedresampler ( ) ) : # build an equally - spaced log - wavelength array based on # the input and template spectrum's limit wavelengths and # smallest sampling interval. consider o... | [
0.34064820408821106,
-0.9919482469558716,
0.9644947648048401,
-0.6618760228157043,
-0.6002712845802307,
-0.2742711007595062,
0.02461378648877144,
1.0399459600448608,
0.056036077439785004,
-0.2949987053871155,
0.04093827307224274,
0.7661867737770081,
-0.3111110329627991,
0.29012182354927063... |
def replaceccdesingtoapplied ( self, * args ) : return _ stepap209. stepap209 _ construct _ replaceccdesingtoapplied ( self, * args ) | [
0.5906869173049927,
-1.1845790147781372,
0.45452097058296204,
-0.5529722571372986,
-0.4951128661632538,
0.5607080459594727,
0.8244392275810242,
1.4450883865356445,
-0.0670701116323471,
-0.7485495805740356,
0.34046584367752075,
0.343298077583313,
-0.43597325682640076,
1.1324936151504517,
... |
def tolowercase ( self, string ) : return string. lower ( ) | [
0.9248602390289307,
-0.949012279510498,
0.279928594827652,
-0.8947159051895142,
0.7115174531936646,
-0.10414322465658188,
-0.2919662892818451,
-0.9296466112136841,
0.6037707328796387,
0.01584983803331852,
0.2163567692041397,
-0.06866676360368729,
-1.6121307611465454,
-0.49926578998565674,
... |
def _ _ repr _ _ ( self ) : return ('model record < id = { }, type = { } > '. format ( self. id, self. type ) ) | [
-0.5216228365898132,
-1.401158094406128,
0.48952358961105347,
-1.5101168155670166,
-0.03380860015749931,
0.8422302007675171,
-0.4905003011226654,
-0.35671383142471313,
-0.08831550180912018,
0.3111568093299866,
-0.2764292359352112,
0.9542816281318665,
0.051507461816072464,
0.014394292607903... |
def do _ update ( self, node _ id ) : _ error _ code, _ msg = ramstkdatamodel. do _ update ( self, node _ id ) if _ error _ code! = 0 : _ error _ code = 2006 _ msg ='ramstk error : attempted to save non - existent'\'milhdbkf record id { 0 : d }. '. format ( node _ id ) return _ error _ code, _ msg | [
-0.1629355400800705,
-0.260028600692749,
0.5754965543746948,
-0.3106856048107147,
0.3748166859149933,
-0.49322709441185,
0.17197036743164062,
0.20359766483306885,
-0.5134273171424866,
1.5013288259506226,
-0.39394888281822205,
0.38322582840919495,
-0.7264072299003601,
0.3082728087902069,
... |
def delegate ( self, msg ) : username = msg ['username'] pass _ hash = msg ['pass _ hash'] cost = msg ['cost'] * self. convert _ ratio bank _ id = msg ['bank _ id'] acc _ id = self. check _ pass ( username, pass _ hash ) if acc _ id : delegation = delegation ( cost, acc _ id, bank _ id ) transaction _ id = self. genera... | [
0.6774094700813293,
0.12342743575572968,
0.6219451427459717,
0.2781796455383301,
0.2294427901506424,
-0.4913031756877899,
-0.16549994051456451,
0.3390677273273468,
0.06641954928636551,
0.004730480257421732,
0.08092863857746124,
-0.23811958730220795,
-0.8569270372390747,
0.3543291389942169,... |
def out _ put _ symbols _ csv ( ) : from csv import writer with open ( " symbols. csv ", " w " ) as output _ file : writer = writer ( output _ file ) writer. writerow ( [ " name ", " symbol " ] ) for name, symbol in symbols. items ( ) : writer. writerow ( [ name, symbol ] ) | [
-0.7260022759437561,
-0.036925435066223145,
0.14435970783233643,
-1.0518122911453247,
0.03135497495532036,
0.014925132505595684,
0.7959619164466858,
0.0965135246515274,
-0.5627881288528442,
0.26918137073516846,
-0.635269820690155,
0.6290577054023743,
0.9725825190544128,
0.2186068594455719,... |
def cleanup _ folder ( path, max _ files = 10 ) : onlyfiles = [ f for f in listdir ( path ) if isfile ( join ( path, f ) ) ] onlyfiles = sorted ( onlyfiles, reverse = false ) if ( len ( onlyfiles ) > max _ files ) : for remove _ file in onlyfiles [ 0 : - max _ files ] : os. remove ( os. path. join ( path, remove _ file... | [
0.4434978663921356,
0.5829061269760132,
0.7487463355064392,
-0.10371772944927216,
-0.11747244745492935,
-0.25515225529670715,
0.6315286159515381,
0.6904889345169067,
0.041804391890764236,
0.26181718707084656,
-0.3589058518409729,
-0.24130447208881378,
-0.16779842972755432,
0.22483979165554... |
def get _ geotargets ( beta, wh, xmat ) : delta = get _ delta ( wh, beta, xmat ) whs = get _ geoweights ( beta, delta, xmat ) targets _ mat = np. dot ( whs. t, xmat ) return targets _ mat | [
-0.018389951437711716,
-0.535212516784668,
0.24473930895328522,
-0.4906572997570038,
1.3532512187957764,
0.4745759665966034,
-0.48528265953063965,
-0.3207971751689911,
-1.1991790533065796,
0.37508267164230347,
0.9064005613327026,
0.34595030546188354,
-0.3078151047229767,
-0.114261128008365... |
def test _ learning _ curve _ output ( ) : # test to validate learning curve output make _ learning _ curve _ data ( ) config _ template _ path = join ( _ my _ dir,'configs ','test _ learning _ curve. template. cfg') config _ path = fill _ in _ config _ paths ( config _ template _ path ) # run the learning curve experi... | [
0.05546164512634277,
0.2906642556190491,
0.6785075664520264,
-0.17664800584316254,
0.22892695665359497,
0.460355281829834,
0.2942112386226654,
0.0029350302647799253,
-0.5389350056648254,
-0.42956626415252686,
-0.27134793996810913,
0.040656790137290955,
0.6511572599411011,
-0.21670657396316... |
def make _ axis _ equal _ 3d ( x _ data, y _ data, z _ data, axes, to _ scale = " xyz " ) : import numpy as np # create cubic bounding box to simulate equal aspect ratio max _ range = np. array ( [ x _ data. max ( ) - x _ data. min ( ), y _ data. max ( ) - y _ data. min ( ), z _ data. max ( ) - z _ data. min ( ) ] ). m... | [
0.6267164349555969,
-0.06328259408473969,
1.237051248550415,
-0.40417951345443726,
0.016039134934544563,
0.6468796730041504,
-0.0007779257721267641,
-0.02291867695748806,
0.12785238027572632,
0.3957115113735199,
-0.20913510024547577,
0.7164707183837891,
0.12510940432548523,
-1.061989545822... |
def calc _ eval _ metrics ( scores : evalscores ) - > dict [ str, float ] : if scores. true _ pos = = 0 and scores. false _ pos = = 0 : precision = 0. 0 else : precision = scores. true _ pos / ( scores. true _ pos + scores. false _ pos ) if scores. true _ pos = = 0 and scores. false _ neg = = 0 : recall = 0. 0 else : r... | [
0.1294524371623993,
-0.18183709681034088,
0.7356018424034119,
-0.9284876585006714,
-0.4979894757270813,
-0.30553311109542847,
-0.2817777097225189,
0.5722529888153076,
0.1505221426486969,
0.5930535793304443,
0.22511982917785645,
-0.5774453282356262,
0.44182732701301575,
0.18992523849010468,... |
def main ( ) : currentdt = datetime. datetime. now ( ) date = currentdt. strftime ( " % y - % m - % d _ % h - % m " ) dnacip = " 172. 16. x. x " dnacpw = " basic ywrtaw46qzfzyza = " directorypath ='dnac /'print ( f " \ ndnac getconfig api demo \ ndnac : { dnacip } \ nconfigs will be saved in { directorypath } \ n " ) c... | [
-0.44628310203552246,
0.45823195576667786,
0.6510922312736511,
0.2939433455467224,
0.7423719763755798,
-0.18809537589550018,
-0.18293990194797516,
-0.11837092787027359,
-0.5394408702850342,
-0.27683010697364807,
-0.49957120418548584,
0.7111755609512329,
0.24988240003585815,
0.0115773854777... |
def _ _ len _ _ ( self ) : return self. client. llen ( self. key ) | [
-0.05231232941150665,
-0.23250187933444977,
0.2624776065349579,
-1.8243664503097534,
0.10885465145111084,
0.061217423528432846,
-0.48777034878730774,
0.30728986859321594,
0.49948805570602417,
0.11069850623607635,
-0.5752113461494446,
-0.3997855484485626,
0.054999157786369324,
-0.5645644664... |
def check _ rbl ( self, msg, zone _ set, rbl _ server, subtest = none, target = none ) : return self. _ check _ rbl ( msg, rbl _ server, qtype = " a ", subtest = subtest ) | [
0.005959590431302786,
-0.35512685775756836,
0.3263709247112274,
0.037161316722631454,
0.7757347226142883,
0.027282914146780968,
0.5124866366386414,
-0.8157129883766174,
0.6438661813735962,
0.293268620967865,
0.32792213559150696,
1.438118815422058,
-1.7377218008041382,
1.030802607536316,
... |
def acquisition _ list _ as _ list ( self ) : return self. acquisition _ list. rstrip ( ','). split ( ',') | [
-0.7942454218864441,
-0.7616026997566223,
0.4769477844238281,
0.294766366481781,
0.5870271921157837,
0.3788057863712311,
-1.4134466648101807,
0.807672381401062,
1.295196771621704,
0.9986332058906555,
-0.27764275670051575,
0.6886158585548401,
0.5683727860450745,
0.44947266578674316,
-0.27... |
def solve _ any ( expr, vars ) : lhs _ values, _ = _ _ solve _ for _ repeated ( expr. lhs, vars ) try : rhs = expr. rhs except indexerror : # child 1 is out of range. there is no condition on the rhs. # just see if we have anything on the lhs. return result ( len ( repeated. getvalues ( lhs _ values ) ) > 0, ( ) ) resu... | [
-0.9192197322845459,
0.17655214667320251,
0.6920889616012573,
0.5246960520744324,
0.34156736731529236,
-0.5447097420692444,
-0.40688005089759827,
0.4059944450855255,
-1.0181924104690552,
0.2324213832616806,
-0.7165259718894958,
-0.49522238969802856,
-0.7227296829223633,
0.7818132638931274,... |
def cidrmatch ( i, ipaddrs, cidr _ length = 32 ) : try : c = cidr ( i, cidr _ length ) for ip in ipaddrs : if cidr ( ip, cidr _ length ) = = c : return true except socket. error : pass return false | [
0.298980176448822,
0.557738721370697,
0.4589042663574219,
0.20542995631694794,
-0.40612831711769104,
0.19199565052986145,
-0.6687290668487549,
0.4357199966907501,
0.027400752529501915,
0.7804267406463623,
-0.32679393887519836,
-1.4079769849777222,
-1.4536789655685425,
-1.1466383934020996,
... |
def readpicasso ( infile ) : mali = alignlib _ lite. py _ makemultiplealignment ( ) while 1 : line = infile. readline ( ) if not line : break x = re. search ( " \ d + \ s + ( [ a - z \ - \. ] * ) \ s + \ d + ", line ) if x : s = x. groups ( ) [ 0 ] a = alignlib _ lite. py _ makealignatumfromstring ( s ) a. thisown = 0 ... | [
-0.44255706667900085,
-1.4760441780090332,
0.669796884059906,
-0.3852895200252533,
-1.298384189605713,
0.14314155280590057,
0.5773332118988037,
1.0350428819656372,
0.23015011847019196,
-0.20828302204608917,
-0.10182133316993713,
-0.894490659236908,
-0.38647180795669556,
-0.706702470779419,... |
def get _ valid _ users _ list ( share _ id ) : l = none try : db _ path, err = config. get _ db _ path ( ) if err : raise exception ( err ) l, err = db. get _ multiple _ rows ( db _ path,'select * from samba _ valid _ users where share _ id = % s'% share _ id ) if err : raise exception ( err ) except exception, e : re... | [
-0.038273025304079056,
0.05710645765066147,
0.6770439743995667,
0.699623703956604,
0.1327325403690338,
0.05558417737483978,
-0.010025246068835258,
0.8718230128288269,
0.27395913004875183,
0.3955284655094147,
-0.3915436863899231,
-0.1871652603149414,
-0.7467573881149292,
0.5383540987968445,... |
def settotalcount ( self, totalcount ) : self. totalcount = totalcount | [
0.5174415111541748,
-0.6150609850883484,
0.20564258098602295,
-0.3855096697807312,
0.5825920104980469,
0.14121754467487335,
0.6420494318008423,
0.8699235320091248,
-0.12363313883543015,
0.22117184102535248,
-0.9534558057785034,
-0.45543724298477173,
0.11638493835926056,
-0.4065676927566528... |
def ingest _ rss ( event, context ) : topic _ arn = os. environ. get ('page _ add _ topic') for message in event [ " records " ] : # process the feed, return a list of page urls info, links = feeds. ingest _ rss ( message [ " body " ] ) # add the pages to pagequeue for url in links : utils. sns _ send ( url, topic _ ar... | [
0.8073775768280029,
0.15366128087043762,
0.6519774794578552,
-0.07834494858980179,
1.7339074611663818,
-0.5243273377418518,
-0.9796701669692993,
-0.07245039939880371,
0.5689136981964111,
0.3352670669555664,
0.4276675879955292,
0.07218915969133377,
-0.06999798864126205,
1.1543248891830444,
... |
def _ dict _ like ( x ) : try : _ = dict ( x ) except ( typeerror, valueerror ) : return false return true | [
-1.048279881477356,
0.837007999420166,
0.6906136870384216,
-0.7800309062004089,
-1.700438141822815,
0.6601375341415405,
-0.9542335271835327,
-0.4605571925640106,
-0.15881383419036865,
-0.6013172268867493,
0.15663674473762512,
-0.30786749720573425,
-0.05284598842263222,
-0.09895748645067215... |
def screencap ( self ) : s = self. device _ session _ factory ( ). exec _ stream ('screencap | gzip - 1') data = recvall ( s, 4194304 ) s. close ( ) data = zlib. decompress ( data, zlib. max _ wbits | 16, 8388608 ) w, h, f = struct. unpack _ from ('iii ', data, 0 ) assert ( f = = 1 ) return ( w, h, data [ 12 : ] ) | [
-0.05863488093018532,
0.19872429966926575,
0.9188710451126099,
0.9630184173583984,
-0.6653809547424316,
-0.37306973338127136,
-0.16556112468242645,
-1.534210205078125,
0.12372719496488571,
-0.13694405555725098,
-0.643953263759613,
-0.2601467967033386,
-0.8493331670761108,
0.316358357667923... |
def test _ recipient _ autocomplete _ success ( client, recipients _ data ) : # test for exact match resp = client. post ('/ api / v2 / autocomplete / recipient / ', content _ type ='application / json ', data = json. dumps ( {'search _ text':'lcs123'} ) ) assert resp. status _ code = = status. http _ 200 _ ok assert l... | [
-0.2662552297115326,
-0.42834243178367615,
0.5500952005386353,
-0.857244610786438,
0.06095903739333153,
0.3646288812160492,
-0.6788248419761658,
0.17762458324432373,
0.12294124811887741,
-0.21981661021709442,
-0.6469616889953613,
0.7499096393585205,
-0.2486547976732254,
-0.3994501531124115... |
def create _ status ( msid, dtype, mtype, state, group, ytime ) : ftime = ytime + 2 # # - - - read violation status of the msid # if group in sub _ group _ list : tmsid = msid +'_'+ group. lower ( ) else : tmsid = msid try : out = ved. read _ v _ estimate ( tmsid, dtype, mtype, state ) except : out = [ ] # # - - - if t... | [
0.7034905552864075,
-0.8279226422309875,
0.8130055069923401,
-0.26567888259887695,
-0.5660497546195984,
-0.5837538242340088,
-0.45718204975128174,
-0.038336269557476044,
0.05742696672677994,
0.7559434175491333,
0.43898269534111023,
0.6110231876373291,
-0.17881320416927338,
1.57671499252319... |
def test _ pkcs7 ( self ) : seven = bytearray ( 7 ) self. rng. next _ bytes ( seven ) fifteen = bytearray ( 15 ) self. rng. next _ bytes ( fifteen ) sixteen = bytearray ( 16 ) self. rng. next _ bytes ( sixteen ) seventeen = bytearray ( 17 ) self. rng. next _ bytes ( seventeen ) padding = pkcs7 _ padding ( seven, aes _ ... | [
0.6896796822547913,
0.7579016089439392,
0.9319698214530945,
-0.6421546339988708,
0.07487932592630386,
0.31120580434799194,
0.022900328040122986,
-0.16122187674045563,
1.375990390777588,
-0.04506716504693031,
-0.4466136395931244,
-0.6615296602249146,
0.39515575766563416,
0.798669695854187,
... |
def postprocessor _ movement ( search _ params, result ) : for data in result ['objects'] : data ['position'] = geojson. feature ( geometry = ( to _ shape ( data ['position'] ) ), properties = { } ) return result | [
-0.6243088841438293,
-0.7181792855262756,
0.3195822536945343,
-0.5724698901176453,
0.2433425933122635,
-0.2531798481941223,
0.43359801173210144,
0.3927154242992401,
-0.562811553478241,
0.8728491067886353,
-1.3533008098602295,
-0.29330506920814514,
0.4457175135612488,
-0.22481320798397064,
... |
def should _ preprocess ( in _ path, out _ path, config _ path, full _ build ) : if full _ build : return true if not os. path. exists ( out _ path ) : return true if os. path. getmtime ( in _ path ) > os. path. getmtime ( out _ path ) : return true if os. path. getmtime ( _ _ file _ _ ) > os. path. getmtime ( out _ pa... | [
0.09025423973798752,
-0.4008807837963104,
0.8088173270225525,
0.11407037079334259,
-0.7899497747421265,
0.6400107741355896,
-0.050526101142168045,
0.673674464225769,
-0.3813258409500122,
0.08278801292181015,
-0.07094813138246536,
0.29696282744407654,
-0.1885022073984146,
0.6047466397285461... |
def start ( self ) : _ _ logger _ _. info ('now streaming...') try : self. stream. filter ( track = settings. keywords, languages = settings. languages ) except keyboardinterrupt : self. listener. persist ( ) except : self. stream. disconnect ( ) _ _ logger _ _. info ('stream disconnected. resuming...') self. start ( ) | [
1.0234532356262207,
-0.05373856797814369,
0.3782735764980316,
0.24571526050567627,
0.4439566731452942,
0.09875398874282837,
-0.3197231590747833,
-0.26712363958358765,
-0.5605073571205139,
0.49776604771614075,
-0.05483834445476532,
0.5888195037841797,
-1.279931902885437,
0.5082982778549194,... |
def consumer ( cond ) : logging. debug ('starting consumer thread') with cond : cond. wait ( ) logging. debug ('resource is available to consumer') | [
1.192244529724121,
-0.5985820889472961,
0.43498337268829346,
0.4226101338863373,
-0.03804698586463928,
1.0885858535766602,
0.6856483817100525,
0.7106786966323853,
-0.8187724947929382,
0.6847631931304932,
0.06708570569753647,
0.4992152750492096,
0.639667272567749,
0.48007655143737793,
0.0... |
def put ( user _ id, self, productid ) : args = update _ product _ parser. parse _ args ( ) product _ name = args [ " product _ name " ] product _ category = args [ " product _ category " ] product = { " product _ name " : product _ name, " product _ category " : product _ category } product = product. get _ product _ ... | [
-0.7171791791915894,
-1.0721088647842407,
0.5884131193161011,
0.31474292278289795,
-0.44031715393066406,
0.8126381635665894,
-0.34288713335990906,
-0.1570804864168167,
0.0853208377957344,
0.629925012588501,
-0.27689749002456665,
0.32519567012786865,
-0.6682389974594116,
-0.2090782970190048... |
def user _ get _ subs ( user, project ) : for item in user ['projects'] : if item ['project'] = = project : return item ['subscriptions'] return [ ] | [
0.44808146357536316,
0.336326003074646,
0.38505977392196655,
1.3570504188537598,
-0.1626015603542328,
0.2995268404483795,
-1.522164225578308,
-0.7116780877113342,
-0.48334944248199463,
0.06063122674822807,
-0.16850131750106812,
0.8383578658103943,
-0.03101923130452633,
-0.5385996699333191,... |
def test _ filter _ recipe _ by _ tags ( self ) : tag1 = sample _ tag ( user = self. user, name ='tag1') tag2 = sample _ tag ( user = self. user, name ='tag2') recipe1 = sample _ recipe ( user = self. user, title ='recipe1') recipe2 = sample _ recipe ( user = self. user, title ='recipe2') recipe3 = sample _ recipe ( us... | [
0.5257952213287354,
0.7105646729469299,
0.5159949660301208,
0.16415686905384064,
-0.030885685235261917,
-0.39169788360595703,
-0.8054525256156921,
0.24714185297489166,
-0.8944411873817444,
-0.5466154217720032,
-0.6732200384140015,
-0.17341655492782593,
-0.23098334670066833,
-0.230485200881... |
def mutate ( self, list, mut _ rate ) : for i, bot in enumerate ( list ) : new _ genes = self. model ( ) for param, param _ new in zip ( bot. parameters ( ), new _ genes. parameters ( ) ) : mask = self. torch. rand ( param. data. size ( ) ) < mut _ rate / ( i + 1 ) param. data [ mask ] = param _ new. data [ mask ] | [
-1.0241949558258057,
-0.0827619880437851,
0.5626994967460632,
0.8191385269165039,
0.5207460522651672,
0.7108553647994995,
-0.4439343214035034,
-0.32038116455078125,
-0.1203010156750679,
0.6839264035224915,
-0.6782920360565186,
0.23282884061336517,
-0.21758849918842316,
0.7675349116325378,
... |
async def merge _ request _ created _ event ( event, gl, * args, * * kwargs ) : jsonstr = json. dumps ( event. _ _ dict _ _ )'''create new default issue for newly created mr'''project _ id, gitlab _ clone _ url, namespace, source _ branch, target _ branch, merge _ iid, merge _ error, path _ with _ namespace = await gen... | [
0.0791982039809227,
-0.5385652184486389,
0.7602300643920898,
0.5552194118499756,
0.7622125148773193,
0.4465695917606354,
-0.9161781072616577,
-0.4906800389289856,
-0.05921404808759689,
-0.3449724018573761,
-0.1278616189956665,
0.26486191153526306,
0.09700904786586761,
0.828163206577301,
... |
def waittillcopied ( fname ) : lastsize = 0 while true : thissize = os. path. getsize ( fname ) print ( " size : ", thissize ) if lastsize = = thissize : print ( " size : stable " ) return else : lastsize = thissize time. sleep (. 1 ) | [
0.20238730311393738,
-0.22465097904205322,
0.6530788540840149,
0.4844835102558136,
-0.8126444816589355,
0.9868256449699402,
0.9260531067848206,
-0.18043100833892822,
0.07911515980958939,
0.009870494715869427,
-0.6045511960983276,
0.16268932819366455,
-0.29450687766075134,
0.078692935407161... |
def _ _ init _ _ ( self, pos, centre = false, radius = 0, direction = false, transform = false ) : self. init ( ) self. pos = vec ( pos ) self. point _ type ='aroundcurve'self. radius = radius self. direction = direction self. transform = transform if centre is false or centre is none : self. cp1 = pos else : self. cp1... | [
0.5256145596504211,
-0.9913672804832458,
0.5419519543647766,
0.12212131917476654,
0.24159429967403412,
0.4213835895061493,
0.752712607383728,
0.4092805087566376,
0.5543103814125061,
0.015218246728181839,
-0.5596141219139099,
0.2663058638572693,
-0.4039418697357178,
0.33493414521217346,
0... |
def test _ rollsstats ( ) : def withmargin ( l1, l2 ) : for i in range ( len ( l1 ) ) : assert abs ( l1 [ i ] - l2 [ i ] ) < = 0. 2 withmargin ( rollsstats ( 1, 6, hero = false ), [ 0. 4, 0. 5, 0. 4, 0. 1 ] ) withmargin ( rollsstats ( 1, 8, hero = false ), [ 0. 2, 0. 2, 0. 7, 0. 1 ] ) withmargin ( rollsstats ( 1, 6, he... | [
0.7075496912002563,
0.06468616425991058,
0.7795436978340149,
0.0718722864985466,
0.027834780514240265,
0.4927976131439209,
0.05686776712536812,
-0.177049458026886,
0.5637439489364624,
-0.23407427966594696,
-0.21046531200408936,
0.6890041828155518,
0.29830220341682434,
0.3542575538158417,
... |
def rule _ application ( sensor ) : rules = rule. objects. filter ( sensor = sensor ) # calculate average for rule in rules : count = int ( rule. retrospect _ period / sensor. time _ period ) average = sum ( [ x. value for x in sensordata. objects. filter ( sensor = sensor. name ) [ : count ] ] ) / count # if rule. thr... | [
0.5800907015800476,
-0.453390896320343,
0.663188636302948,
0.2598133683204651,
0.5146999955177307,
0.7251890301704407,
0.7445443272590637,
0.1360919028520584,
-0.038610443472862244,
0.8794419765472412,
0.6099210381507874,
0.04509187117218971,
0.8790417909622192,
0.4579983353614807,
0.237... |
def create _ stats _ all ( dict _ stats, headers ) : # loop through position stats, retrieve stat columns ( add zeros if missing ), and concatenate them together stats _ df _ lst = [ ] for k, df _ pos _ stats in dict _ stats. items ( ) : df _ standardized _ stats = pd. dataframe ( ) for col in headers : df _ standardiz... | [
0.3485364019870758,
-0.09326644986867905,
0.5231003165245056,
-0.23303310573101044,
0.8561663031578064,
-0.34868350625038147,
-0.6527807116508484,
-0.26621153950691223,
0.13422858715057373,
-0.15990574657917023,
0.9388619065284729,
-1.3705376386642456,
0.7324273586273193,
-0.42407798767089... |
def findcandidatepairs ( self, nsamples = 5000, fva _ filter = true ) : if self. verbose : print ('finding candidate ordered reaction pairs') if fva _ filter : fvaout = self. getextremefluxes ( ) fvamin, fvamax = fvaout ['fvamin'], fvaout ['fvamax'] else : fvamin, fvamax = none, none # fluxsample = np. round ( self. ge... | [
-0.645074188709259,
-0.7277769446372986,
0.5439947843551636,
-0.02097392827272415,
-0.5779004693031311,
-0.7024209499359131,
0.683668851852417,
0.1892227679491043,
0.2567329704761505,
-0.49046069383621216,
-0.15355436503887177,
-0.1274196356534958,
-0.7785706520080566,
0.6666922569274902,
... |
def _ _ init _ _ ( self, addr, requesthandler = simplejsonrpcrequesthandler, logrequests = true, encoding = none, bind _ and _ activate = true, address _ family = socket. af _ inet, config = jsonrpclib. config. default, thread _ pool = none ) : # normalize the thread pool if thread _ pool is none : # start a thread poo... | [
-0.5449738502502441,
-0.2468281090259552,
0.8674427270889282,
-0.23045305907726288,
-0.5159494876861572,
0.1903049796819687,
-0.23419469594955444,
-0.11886291205883026,
1.120347023010254,
-0.7854143977165222,
-0.23155677318572998,
0.414791077375412,
-0.7482107281684875,
0.21947044134140015... |
def _ _ add _ _ ( self, other ) : return self. _ mathematical _ operator ( self, other, operator. add ) | [
-0.08419638127088547,
-0.521518349647522,
0.7653596997261047,
0.5710428357124329,
-0.7276939749717712,
0.43852514028549194,
-0.5678448677062988,
-1.7285232543945312,
0.6280390620231628,
-0.19884108006954193,
0.36879655718803406,
-0.1259583979845047,
0.2270188182592392,
-0.4023993909358978,... |
def _ lookup _ name _ abbrev ( state _ str ) : # look up by abbreviation if state _ str. upper ( ) in abv _ state _ map : state _ str = state _ str. upper ( ) return abv _ state _ map [ state _ str ], state _ str if state _ str in state _ abv _ map : return state _ str, state _ abv _ map [ state _ str ] raise keyerror ... | [
-0.16790097951889038,
-1.584738850593567,
0.84096759557724,
-0.8715876340866089,
-1.4055668115615845,
0.41441482305526733,
-0.43465831875801086,
-0.3864358961582184,
0.2722100019454956,
0.25966325402259827,
0.8732308149337769,
0.11704746633768082,
0.9764258861541748,
-0.22324223816394806,
... |
def _ _ populate _ grid ( self, d, n, m, corner, room ) : # iterate x - and y - axis axis for x, gx in enumerate ( self. x _ interp ) : for y, gy in enumerate ( self. y _ interp ) : # set active node node = mcl. point ( self. x _ interp [ x ], self. y _ interp [ y ] ) # get distance from corner to node if in line of si... | [
-1.0898761749267578,
-0.22629036009311676,
0.7979450225830078,
-0.8174730539321899,
0.4954199492931366,
0.05041974410414696,
0.0387311726808548,
-0.5673953890800476,
-0.33653539419174194,
0.9970518350601196,
0.27577677369117737,
-0.06914080679416656,
0.3818310499191284,
0.19411994516849518... |
def _ getsourcecolumnsfromfeature ( feature : schema _ pb2. feature ) - > list [ path. columnpath ] : if feature. type = = schema _ pb2. featuretype. struct : result = [ ] for child _ feature in feature. struct _ domain. feature : result. extend ( path. columnpath ( [ feature. name ] + list ( child _ path. steps ( ) ) ... | [
-0.6690125465393066,
0.1688728779554367,
0.541107714176178,
1.1508625745773315,
0.0906153991818428,
0.12447228282690048,
0.8579990863800049,
0.027470504865050316,
-0.18797698616981506,
-0.41516026854515076,
-1.3113638162612915,
-0.1980161815881729,
0.12101797759532928,
0.28856179118156433,... |
def begin _ update _ address ( self, address _ name : str, resource _ group _ name : str, address _ update _ parameter : union [ _ models. addressupdateparameter, io ], if _ match : optional [ str ] = none, * * kwargs : any ) - > lropoller [ _ models. addressresource ] : api _ version = self. _ get _ api _ version ('be... | [
-1.3051706552505493,
-0.5879361033439636,
0.978849470615387,
-0.2283499836921692,
-1.3322056531906128,
-0.6937453150749207,
0.462410569190979,
-0.1325252205133438,
0.8433669805526733,
0.9269177913665771,
0.203628808259964,
1.1819583177566528,
-0.717684805393219,
-0.009476556442677975,
-0... |
def move _ agent ( self ) : pass | [
-0.4625507891178131,
-1.8434147834777832,
0.1264665126800537,
0.6584650874137878,
0.15303951501846313,
0.15906916558742523,
0.24647246301174164,
-0.1512664258480072,
-0.05120624601840973,
0.5618405938148499,
-0.4860903024673462,
0.4248811602592468,
0.18926003575325012,
-0.16005347669124603... |
def _ _ init _ _ ( self, buffer, encoding = none, errors = none, newline = none, line _ buffering = false ) : self. name ='' self. buffer = buffer self. encoding = encoding self. errors = errors self. newlines = newline self. line _ buffering = line _ buffering | [
0.9066879749298096,
-0.3360832631587982,
0.517794668674469,
0.23783516883850098,
-0.7089285850524902,
-0.13835491240024567,
-0.8640257716178894,
-0.12989541888237,
0.03311656415462494,
-0.8291714191436768,
-1.2853740453720093,
0.29021307826042175,
-0.10690513253211975,
0.7378014326095581,
... |
def main ( ) : args = get _ arguments ( ) if not os. path. exists ( args. save ) : os. makedirs ( args. save ) if args. model = ='deeplabmulti': model = deeplabmulti ( num _ classes = args. num _ classes ) elif args. model = ='oracle': model = res _ deeplab ( num _ classes = args. num _ classes ) if args. restore _ fro... | [
0.5791108012199402,
0.21548080444335938,
0.996054470539093,
0.30174964666366577,
-0.048854440450668335,
0.4127788543701172,
0.6574122905731201,
0.6351751685142517,
0.12362267822027206,
-0.31824991106987,
-0.6137208938598633,
-0.05400903895497322,
0.20321814715862274,
-0.6590983271598816,
... |
def gettabwidgetbyid ( self, id _ ) : for tw in self. tabwidgets : if id ( tw ) = = id _ : return tw return none | [
-0.151038259267807,
-1.1174511909484863,
0.1630643606185913,
-0.15709376335144043,
-0.6902287006378174,
-0.27978670597076416,
-0.3853624761104584,
-1.3594903945922852,
-0.7863844037055969,
0.07407335937023163,
-0.7911901473999023,
0.3145255744457245,
0.14547599852085114,
0.2819346189498901... |
def usage ( self, query : dict = none ) : return self. bynder _ request _ handler. get ( endpoint ='/ api / media / usage / ', params = query or { } ) | [
-1.168686866760254,
0.47347694635391235,
0.5071811079978943,
0.11218670010566711,
0.1632438749074936,
-1.6239763498306274,
0.23728708922863007,
-0.45195674896240234,
0.15086281299591064,
0.10455501824617386,
0.9301825761795044,
0.9798616170883179,
-0.38277459144592285,
0.7301238775253296,
... |
def accuracy ( output, target, topk = ( 1, ) ) : with torch. no _ grad ( ) : maxk = max ( topk ) batch _ size = target. size ( 0 ) _, pred = output. topk ( maxk, 1, true, true ) pred = pred. t ( ) correct = pred. eq ( target. view ( 1, - 1 ). expand _ as ( pred ) ) res = [ ] for k in topk : correct _ k = correct [ : k ... | [
-0.7888464331626892,
-0.5859820246696472,
0.6807271838188171,
0.7689267992973328,
-0.5349292755126953,
-0.4578985273838043,
1.1418228149414062,
0.7968666553497314,
-0.3669600784778595,
0.6510764956474304,
0.169838547706604,
0.34088608622550964,
1.326282024383545,
0.31283384561538696,
-0.... |
def instance _ type ( self ) - > pulumi. output [ optional [ str ] ] : return pulumi. get ( self, " instance _ type " ) | [
0.7762637734413147,
0.24777726829051971,
0.4526239335536957,
0.1269923597574234,
0.5487972497940063,
1.2703841924667358,
0.2366887927055359,
-0.05239442363381386,
0.34757623076438904,
0.31457260251045227,
0.34600555896759033,
1.1926265954971313,
-0.9577357172966003,
-0.9497827291488647,
... |
def start ( self ) : if getattr ( self. _ ds,'closed ', true ) : logger. debug ('opening dataset for vrtsourceband') self. _ ds = rasterio. open ( str ( self. path ),'r') | [
0.30034399032592773,
-0.015116347931325436,
0.2531740665435791,
-0.40243059396743774,
-0.5296042561531067,
0.818876326084137,
0.8550107479095459,
0.2731478810310364,
0.2745552659034729,
-0.9607068300247192,
0.09873775392770767,
0.6905761361122131,
-0.03971391171216965,
-0.23869086802005768... |
def change _ meters _ per _ px ( self, px ) : if px < 0 and self. zoom _ index > 0 : self. zoom _ index = self. zoom _ index - 1 if px > 0 and self. zoom _ index < len ( self. zoom _ levels ) - 1 : self. zoom _ index = self. zoom _ index + 1 self. meters _ per _ px = self. zoom _ levels [ self. zoom _ index ] self. upd... | [
-0.9830031394958496,
-0.35718414187431335,
0.6257486939430237,
0.5440773963928223,
-0.6863734722137451,
0.6733590364456177,
-0.2869472801685333,
-0.46838027238845825,
0.69541335105896,
-0.612915575504303,
0.5072854161262512,
-0.28916943073272705,
-0.3069131076335907,
0.49876442551612854,
... |
def test _ cancel _ free _ non _ block _ cl _ creates _ transfer _ block ( self ) : event = baker. make _ recipe ('booking. future _ pc ', cost = 10, max _ participants = 3 ) booking = baker. make _ recipe ('booking. booking ', user = self. user, event = event, paid = true, payment _ confirmed = true, free _ class = tr... | [
0.4616931974887848,
0.8777997493743896,
0.7161999940872192,
1.055777907371521,
-0.574635922908783,
1.343283772468567,
0.1506650298833847,
-0.1167973130941391,
-0.15743939578533173,
-0.2529575228691101,
-0.6514682769775391,
0.02178364247083664,
0.013165725395083427,
0.5852600336074829,
0.... |
def _ _ init _ _ ( self, beta : float = 1. 0, gamma : float = 0. 1, apply _ fit : bool = false, apply _ predict : bool = true, ) - > none : super ( ). _ _ init _ _ ( is _ fitted = true, apply _ fit = apply _ fit, apply _ predict = apply _ predict ) self. beta = beta self. gamma = gamma self. _ check _ params ( ) | [
0.2794303596019745,
-0.044985998421907425,
0.7607927918434143,
1.0526880025863647,
0.6812547445297241,
0.09879418462514877,
-0.17698688805103302,
0.8431373834609985,
-0.7021096348762512,
-0.3077544867992401,
-0.08167590945959091,
0.8884159326553345,
0.2683165967464447,
1.3195245265960693,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.