text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def test _ match _ redetect _ one _ image ( self ) : for image in ( vlimage _ one _ face, vlimage _ small ) : for detector in self. detectors : with self. subtest ( detectortype = detector. detectortype ) : bboxrect = detector. detectone ( image = image ). boundingbox. rect redetectone = detector. redetectone ( image =... | [
0.2611422836780548,
0.08425679057836533,
0.4930504262447357,
1.1509674787521362,
0.797770619392395,
-0.2299908846616745,
0.4285622835159302,
0.31156885623931885,
0.8312981128692627,
-0.3373091220855713,
-0.608150064945221,
-0.6995581388473511,
0.4261133372783661,
0.8190481066703796,
-0.3... |
def transposing ( self ) : self. table = list ( map ( list, zip ( * self. table ) ) ) | [
-0.6638746857643127,
0.47028252482414246,
0.4597851037979126,
0.06363820284605026,
0.31217581033706665,
-0.36611098051071167,
-0.1467638462781906,
1.515348196029663,
-0.2866051197052002,
1.3688606023788452,
-0.9500924348831177,
-0.7715274691581726,
-0.10035654902458191,
0.9546729922294617,... |
def show _ raw _ data ( df ) : next = input ('\ ndo you want to see the raw data? ( y / yes to continue, any other key for no ) :'). lower ( ) if not ( next = ='y'or next = ='yes') : return print ('\ nshowing the raw data... \ n') start = 0 while start < df. size : end = start + 5 if end > df. size : end = df. size pri... | [
-0.20830243825912476,
1.0223925113677979,
0.6412645578384399,
-0.5418068766593933,
-1.205112338066101,
0.00007886793900979683,
0.8408347368240356,
-0.941058874130249,
-0.5103333592414856,
-0.12058144062757492,
-0.2627802789211273,
1.2078644037246704,
-0.09848044812679291,
0.083188958466053... |
def _ _ init _ _ ( self, log _ target _ func, position _ init, total _ samples = 1000, leapfrog _ steps = 20, step _ size = 1e - 1, burn _ in = 0. 1, thinning _ factor = 1, mass = 1. 0, random _ seed = none, progress = false, wb _ settings = false, ) : # initialize w & b logging ( optional ) : self. wb _ settings = wb ... | [
0.7308590412139893,
-0.2502632439136505,
1.0443171262741089,
0.41004419326782227,
0.0939200147986412,
-0.3522654175758362,
0.5611959099769592,
0.04539398476481438,
-0.47528213262557983,
0.10001397132873535,
0.02794395573437214,
0.40414997935295105,
-0.09992325305938721,
0.9741765260696411,... |
def train ( self, x ) : logger. info ( " start training word embeddings " ) if ( not self. input _ column ) and ( not self. tokens _ column ) : raise valueerror ( " " " please specify one of the following keyword argument when instanciating an embedding class object : - input _ column argument ( containing raw text ) -... | [
-0.7057054042816162,
0.7630625367164612,
0.6903253793716431,
0.7698569893836975,
-0.2427666187286377,
0.33517324924468994,
0.5041809678077698,
-0.22013968229293823,
-0.09142137318849564,
-0.10238729417324066,
-0.7324411869049072,
0.8096993565559387,
-0.08297480642795563,
0.8680224418640137... |
def getnumpyarray ( self ) : return self. _ numpyarray | [
-0.7005083560943604,
-1.3264925479888916,
0.2933065593242645,
-0.11316283792257309,
0.4172062277793884,
-0.08256204426288605,
0.67243891954422,
-0.8614041209220886,
0.5827208757400513,
-1.079286813735962,
0.042420584708452225,
1.4231761693954468,
-0.5873053669929504,
0.5540509819984436,
... |
def unregister ( self, event, callback ) : if self. _ events _ tree [ event ]. islisted ( callback ) : self. _ events _ tree [ event ]. remove ( callback ) self. _ events _ cbs [ event ] [ 0 ] = self. _ events _ tree. getcallbackssequence ( ) else : self. _ events _ cbs [ event ] [ 1 ]. remove ( callback ) | [
0.0923532024025917,
0.25982579588890076,
0.5983588695526123,
0.02349092811346054,
0.24080276489257812,
-0.7593764662742615,
-0.04174688830971718,
1.5088003873825073,
0.4508608281612396,
0.6477789878845215,
-0.9315508008003235,
0.7085208892822266,
-1.180210828781128,
0.9479533433914185,
0... |
def make _ dict ( keylist, value ) : tree _ dict = { } for i, key in enumerate ( reversed ( keylist ) ) : val = value if i = = 0 else tree _ dict tree _ dict = { key : val } return tree _ dict | [
-0.6574599742889404,
0.5914223194122314,
0.5533604025840759,
-0.07191819697618484,
-1.2978302240371704,
0.12331563979387283,
-0.3332462012767792,
0.08377145230770111,
-1.4648140668869019,
0.10556100308895111,
-0.9434617161750793,
-0.3509414494037628,
-0.3747095465660095,
0.7176621556282043... |
def stat _ model ( self, new _ stat _ model ) : self. _ stat _ model = new _ stat _ model self. _ stats _ calculated = false | [
0.009811482392251492,
-0.4523266553878784,
0.31663352251052856,
0.5726182460784912,
0.1266389787197113,
1.0712382793426514,
0.7833945155143738,
-0.24018898606300354,
-0.7722230553627014,
-0.0007821321487426758,
-1.7974342107772827,
0.11671549081802368,
0.9352718591690063,
0.185791939496994... |
def reversesub ( a ) : n = len ( a ) x = [ 0 ] * n for j in range ( n - 1, - 1, - 1 ) : if a [ j ] [ j ]! = 0 : # una manera de evitar una excepcion en matriz singular x [ j ] = ( a [ j ] [ n ] - sum ( a [ j ] [ k ] * x [ k ] for k in range ( j + 1, n ) ) ) / float ( a [ j ] [ j ] ) else : print'matriz singular, la ecu... | [
0.39173439145088196,
0.6759371757507324,
0.6667740345001221,
0.29500460624694824,
-0.5282998085021973,
-0.32425370812416077,
0.024141555652022362,
1.3196227550506592,
0.7893287539482117,
0.22184869647026062,
0.4081610441207886,
-0.10525558143854141,
0.15168820321559906,
0.26427844166755676... |
def test _ remove _ available _ languages ( self, mock _ sync ) : org = factories. org ( available _ languages = ['en ','es'], language ='en ', ) self. data ['available _ languages'] = ['en'] form = self. form _ class ( data = self. data, instance = org ) self. asserttrue ( form. is _ valid ( ), form. errors ) form. sa... | [
0.10038834065198898,
0.4004014730453491,
0.40095627307891846,
-0.5316563248634338,
0.08744996041059494,
0.5376043915748596,
-0.259453147649765,
1.164723515510559,
-0.3086327910423279,
0.21225915849208832,
-1.3052395582199097,
-0.6651085019111633,
-0.12568198144435883,
-0.2691839039325714,
... |
def get _ flight _ id ( flight _ info _ dict ) : # search if flght is already saved in database search _ flight _ in _ db = flight. query. filter ( flight. departure _ airport = = flight _ info _ dict [ " departure _ airport " ], flight. destination _ airport = = flight _ info _ dict [ " destination _ airport " ], flig... | [
-0.102753646671772,
-0.31922805309295654,
1.1307822465896606,
-0.08818427473306656,
0.8062771558761597,
0.5247592329978943,
-0.5979673862457275,
-0.2109704166650772,
-0.25503450632095337,
-0.6320196986198425,
-0.9274128079414368,
-0.7851025462150574,
-0.36877909302711487,
0.797997355461120... |
def add _ plot ( data, mat, var, ax, scale, ylabel = none, title = none, lw = 1. 5, arrowheight = 0. 05 ) : # start plot showing means and error bars sns. barplot ( y = var, x ='cohort ', data = data, ax = ax ) # aesthetics ax. set ( ylabel = ylabel, xlabel = " " ) ax. set _ title ( title, pad = 15 ) ax. spines ['right... | [
0.5555644631385803,
0.32617729902267456,
0.9012425541877747,
-0.7164099812507629,
-0.9392866492271423,
0.8580626249313354,
0.07700296491384506,
0.09805689007043839,
0.07685544341802597,
-0.13747479021549225,
0.24421977996826172,
1.6883989572525024,
0.48619237542152405,
0.27053970098495483,... |
def get ( self, queue _ name = none, block = true ) : while true : message = self. _ try ('basic _ get ', queue = queue _ name or self. default _ queue _ name ) if message : parsed = self. _ parse _ message ( message ) if parsed : return parsed if block : time. sleep (. 5 ) else : return none, none | [
0.1937558799982071,
-0.5966184735298157,
0.7814627885818481,
-0.14545831084251404,
0.06455529481172562,
-1.0578243732452393,
-1.426375389099121,
-0.9643163084983826,
-0.8409098982810974,
-0.40294334292411804,
-0.34767839312553406,
0.6908367276191711,
-1.0968194007873535,
0.0598879978060722... |
def get _ debate _ metrics ( debate : debate ) : return [ activity. objects. filter ( content _ type = debate, object _ id = debate. id, activity _ type = activity. activitychoices. report ), activity. objects. filter ( content _ type = debate, object _ id = debate. id, activity _ type = activity. activitychoices. upvo... | [
0.17578135430812836,
-0.22045473754405975,
0.6657013297080994,
-0.30072715878486633,
0.9439370036125183,
0.5772713422775269,
0.6091755032539368,
-0.49422529339790344,
0.4846189022064209,
0.7481451630592346,
0.52885901927948,
0.44700688123703003,
-0.43339741230010986,
0.2402443289756775,
... |
def insacoint _ pairs ( self ) : # runs the adf _ check and keeps only those that are non - stationary for s _ c in self. data _ ins : if self. adf _ check ( self. data _ ins [ s _ c ],'ct') = = 0 : self. data _ ins. drop ( s _ c, axis = 1, inplace = true ) # creates a list of all possible pairs of those series that ar... | [
-0.12616650760173798,
0.33843889832496643,
0.5808459520339966,
-0.24884048104286194,
-0.17411549389362335,
0.14682862162590027,
0.6820950508117676,
0.7450819611549377,
-0.01054448913782835,
0.5830099582672119,
0.1905488520860672,
0.08343400061130524,
-1.2670190334320068,
0.5184710621833801... |
async def _ load _ devices ( self ) : _ log. debug ( " loading devices " ) device _ json = await self. _ request ( " readrequest ", " / device " ) # if / device has no body, this probably isn't caseta if device _ json. body is none : return for device in device _ json. body [ " devices " ] : _ log. debug ( device ) dev... | [
-0.9983254671096802,
-0.24536459147930145,
0.6800796985626221,
-0.3081371784210205,
0.6791217923164368,
-0.12084341794252396,
-0.2508263885974884,
-0.16757282614707947,
0.3540174663066864,
-0.19046203792095184,
-0.3831445872783661,
-0.5060599446296692,
0.23698708415031433,
0.64916425943374... |
def testupdatevaluesforquerieswithboolvalue ( self ) : securetagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) objectid = uuid4 ( ) # fixme replace this with securetagvalueapi once the index is # integrated values = { objectid : { u'username / bar': 42 } } valuesapi = securetagvalueapi ( self.... | [
-0.30847758054733276,
0.16556106507778168,
0.3216237425804138,
0.0934055745601654,
0.03293343260884285,
0.811743438243866,
-0.17207756638526917,
0.0449378527700901,
-0.32110124826431274,
-0.14699174463748932,
-0.5469449162483215,
-0.4160621166229248,
-0.06511127948760986,
-0.25448361039161... |
def vnf _ to _ internal ( ext ) : internal = { } internal [ " vnf _ name " ] = ext [ " vnfid " ] internal [ " processing _ time " ] = ext [ " processing _ latency " ] internal [ " failure _ rate " ] = ext [ " failure _ rate " ] if " cp " in ext : internal [ " cp " ] = copy. deepcopy ( ext [ " cp " ] ) if " location " i... | [
-0.9103387594223022,
-0.680413544178009,
0.672214686870575,
-1.6683543920516968,
-1.4750391244888306,
-0.37012919783592224,
-0.9401765465736389,
-0.4911031424999237,
-0.3711094260215759,
0.7518882751464844,
-1.0660529136657715,
0.46135902404785156,
-0.5220017433166504,
-0.00920454785227775... |
def parse _ airbnb ( lodging _ response _ dict ) : # set key - value pair for new flight dictionary lodging _ info _ dict = { " airbnb _ id " : lodging _ response _ dict [ " search _ results " ] [ 0 ] [ " listing " ] [ " id " ], " address " : lodging _ response _ dict [ " search _ results " ] [ 0 ] [ " listing " ] [ " ... | [
-0.5087661147117615,
-0.7505442500114441,
0.6979114413261414,
-0.4399278163909912,
-0.7722017765045166,
1.0478177070617676,
-0.5429271459579468,
-0.19927644729614258,
-0.18028011918067932,
-0.4326176047325134,
-0.5794836282730103,
-0.3107774555683136,
0.14492763578891754,
0.567768037319183... |
def is _ finished ( ) : for p in psutil. process ( os. getpid ( ) ). children ( recursive = true ) : if p. name ( ). startswith ( " hick " ) : try : return p. cpu _ percent ( interval = 2 ) = = 0. 0 except psutil. nosuchprocess : return | [
0.8552206754684448,
0.07027989625930786,
0.7305469512939453,
1.0628446340560913,
0.5480915307998657,
-0.29340967535972595,
-0.4880906939506531,
-0.334299772977829,
-0.730785071849823,
-0.3238493502140045,
-0.7794713973999023,
0.019401950761675835,
-0.443501740694046,
1.3905380964279175,
... |
def getdataandcornerplot ( freq _ begin, freq _ end, normalizationbool, cornerplotbool ) : " get the data " cands4y = get _ data ( flag4 ='y ', frange = ( freq _ begin, freq _ end ) ) # pandas dataframe cands1n2n = get _ data ( flag1 ='n ', flag2 ='n ', flag3 ='y ', frange = ( freq _ begin, freq _ end ) ) # pandas data... | [
1.0801260471343994,
0.881474494934082,
0.8936254382133484,
-0.1542375385761261,
0.1624601036310196,
-0.015434575267136097,
0.5904970765113831,
0.2850764989852905,
-0.36231136322021484,
-0.06432326138019562,
0.5066438913345337,
0.40348830819129944,
-0.3520399034023285,
0.7586272358894348,
... |
def text _ parser ( file _ name, * * kwargs ) : file _ content = str ( pkgutil. get _ data ( " pylighter ", file _ name ), " utf - 8 " ) file _ content = file _ content. replace ( " \ n ", " " ) for key in kwargs : file _ content = file _ content. replace ( f " < % { key } % > ", kwargs [ key ] ) return file _ content | [
0.5847436189651489,
-0.818470299243927,
0.48645642399787903,
-0.3577049672603607,
-1.1578203439712524,
-0.12371864914894104,
-1.5926687717437744,
0.767084538936615,
-1.2832989692687988,
0.9020448327064514,
0.04862057417631149,
-1.3571341037750244,
-0.009882482700049877,
0.4645320773124695,... |
def read _ file _ data ( self ) : with open ( self. input _ path + self. timeout _ file, " r " ) as fp : self. timeout = int ( fp. readline ( ) ) self. in _ file = open ( self. input _ path + self. input _ filename, " r " ) self. out _ file = open ( self. output _ path + self. output _ filename, " w " ) # process the h... | [
0.09220194816589355,
-1.0008641481399536,
0.722874104976654,
-0.3503659665584564,
0.14210423827171326,
0.4217129051685333,
0.24944408237934113,
0.30084091424942017,
-0.8986984491348267,
0.3065621852874756,
0.15391451120376587,
-0.20617198944091797,
-0.48131832480430603,
-0.5172643661499023... |
def setlives ( self, lifeclass, num ) : for _ in xrange ( num ) : pos = ( random. randrange ( self. width ), random. randrange ( self. height ) ) life = lifeclass ( self, pos ) # register in this land self. register ( life ) | [
-0.8116188049316406,
0.5957145690917969,
0.3016476631164551,
-0.2937825918197632,
0.5289986729621887,
1.0613431930541992,
-0.5883349180221558,
-0.3711031377315521,
0.7950212359428406,
-0.476428359746933,
-1.028271198272705,
-0.8024640679359436,
-0.05952240899205208,
0.7278128862380981,
-... |
def test _ cancelled _ booking _ shown _ in _ booking _ list ( self ) : ev = baker. make _ recipe ('booking. future _ ev ', name = " future event " ) baker. make _ recipe ('booking. booking ', user = self. user, event = ev, status ='cancelled') # check there are now 5 bookings ( 3 future, 1 past, 1 cancelled ) self. as... | [
0.05680540204048157,
0.9434790015220642,
0.3206515610218048,
1.3103593587875366,
-1.0093166828155518,
0.6008586287498474,
-0.37230026721954346,
1.9365228414535522,
-0.10657551884651184,
-0.053071700036525726,
-0.6860871315002441,
-0.8923243284225464,
0.25461724400520325,
0.4497711956501007... |
def prtm ( protein ) : # define the dictionary of masses masses = {'a': 71. 03711,'c': 103. 00919,'d': 115. 02694,'e': 129. 04259,'f': 147. 06841,'g': 57. 02146,'h': 137. 05891,'i': 113. 08406,'k': 128. 09496,'l': 113. 08406,'m': 131. 04049,'n': 114. 04293,'p': 97. 05276,'q': 128. 05858,'r': 156. 10111,'s': 87. 03203,'... | [
0.2739711403846741,
-0.15793359279632568,
1.1049439907073975,
-1.248125433921814,
0.5771942138671875,
0.6014875173568726,
-0.08577898889780045,
0.4018345773220062,
0.22951094806194305,
0.7916340231895447,
-0.3181200325489044,
-0.5301675796508789,
-0.5734841227531433,
0.5516611337661743,
... |
def delete ( self, key, type ='faster _ and _ simpler') : if self. size > 1 : remove = getattr ( self,'_ % s _ remove'% type,'faster _ and _ simpler _ remove') remove ( self. root, key ) self. size - = 1 elif self. size = = 1 and self. root. key = = key : self. root = none self. size - = 1 else : raise keyerror ('error... | [
-0.11597274988889694,
0.18875856697559357,
0.6983457803726196,
0.3311530649662018,
-0.49933233857154846,
-0.5982629656791687,
0.49877631664276123,
0.21856386959552765,
0.09748038649559021,
0.3788048326969147,
0.12004733085632324,
0.14912927150726318,
-0.602154552936554,
1.34274160861969,
... |
def _ title ( self ) : return self. browser. element ( self. title, parent = self ) | [
0.37888747453689575,
-0.32377374172210693,
0.3720911741256714,
-0.17027141153812408,
-1.0706123113632202,
0.20854772627353668,
-0.33779236674308777,
-0.9128791689872742,
0.814000129699707,
-0.7561900615692139,
0.6111283898353577,
-0.2793421447277069,
-0.2918128967285156,
-0.554637491703033... |
def go ( self ) : last _ pose = none frame _ curr = self. _ frame for target in self. _ path : # target has ( command, pose, dur, linspeed, rotspeed ) command = target [ 0 ] if command = ='target': pose = frame _ curr * target [ 1 ] dur = target [ 2 ] linspeed = target [ 3 ] rotspeed = target [ 4 ] if last _ pose : dis... | [
-0.5717546939849854,
0.4566454291343689,
0.5579346418380737,
-0.08866595476865768,
0.49629318714141846,
-0.17122364044189453,
1.07776939868927,
-0.1744270622730255,
-0.4254407584667206,
0.049545273184776306,
-0.39445188641548157,
0.1644786298274994,
-0.17891302704811096,
0.8152036070823669... |
def list _ order _ at _ resource _ group _ level ( self, resource _ group _ name : str, skip _ token : optional [ str ] = none, * * kwargs : any ) - > iterable [ " _ models. orderresource " ] : api _ version = self. _ get _ api _ version ('list _ order _ at _ resource _ group _ level') if api _ version = ='2020 - 12 - ... | [
-1.6289101839065552,
-0.13379500806331635,
0.8173518180847168,
-0.2425564080476761,
-0.2701733112335205,
-0.2004210501909256,
-0.12827683985233307,
-1.3494936227798462,
-0.09779013693332672,
0.40925174951553345,
-0.3847084045410156,
0.09933557361364365,
-0.3859202265739441,
0.2640749216079... |
def feedforward ( self, a ) : for b, w in zip ( self. biases, self. weights ) : # one complete forward pass a = sigmoid ( np. dot ( w, a ) + b ) return a | [
0.384335994720459,
0.016077309846878052,
0.36956337094306946,
-0.5571959018707275,
-0.12731963396072388,
-0.1749291867017746,
0.8483830690383911,
-0.1953631192445755,
0.5167418718338013,
-0.5639691948890686,
0.47276484966278076,
0.9056082963943481,
-0.331865131855011,
0.668303370475769,
... |
def rate _ member ( self, member ) : if not member. rating is none : # don't rerate! it's expensive return none task = member. get _ simulation _ resources ( ). task pipeline = member. get _ member _ resources ( ). pipeline try : run = openml. runs. run _ model _ on _ task ( task, pipeline ) except exception as ex : me... | [
0.2943268120288849,
0.6628387570381165,
0.6842914819717407,
0.0028294839430600405,
-0.10576039552688599,
-0.0745503231883049,
-0.43463608622550964,
-0.22429846227169037,
-0.41360825300216675,
0.6483877301216125,
0.24392522871494293,
0.3343329131603241,
-0.8537455201148987,
-0.2961824834346... |
def test _ connectioninitialized ( self ) : self. xmlstream. dispatch ( self. xmlstream, xmlstream. stream _ authd _ event ) self. assertin ('component. example. org ', self. router. routes ) self. assertidentical ( self. xmlstream, self. router. routes ['component. example. org'] ) | [
0.9064438939094543,
-0.9970254898071289,
0.5022534728050232,
0.17469213902950287,
0.6377852559089661,
0.1294333040714264,
0.04625901207327843,
0.1864810585975647,
0.6429040431976318,
-0.9522731304168701,
-0.2876317799091339,
0.182054802775383,
0.35416287183761597,
0.37296396493911743,
-0... |
def _ _ str _ _ ( self ) : return _ sparsefit _ string _ template % ( self. model _ type, self. fitted _ v _ pen, self. fitted _ w _ pen, np. diag ( self. v ), ) | [
0.8727572560310364,
-1.2811764478683472,
0.2952231764793396,
-0.6944429278373718,
-0.6789951920509338,
0.31582093238830566,
0.39073705673217773,
-0.4363250732421875,
0.437075674533844,
0.534120500087738,
0.004122840240597725,
0.5486400723457336,
-0.4502493143081665,
-1.1082744598388672,
... |
def fix _ path ( self, path ) : if path. endswith ( " / " ) : path = path [ : - 1 ] if not path. startswith ( " document " ) : return " document / { } ". format ( path ) else : return path | [
0.158718541264534,
-0.5752975344657898,
0.6132756471633911,
0.47713345289230347,
-0.3084053695201874,
0.8052695989608765,
0.1051713228225708,
-0.49799293279647827,
0.14354117214679718,
0.3369271159172058,
1.217413067817688,
0.2523418962955475,
-0.9113976359367371,
0.39636993408203125,
-0... |
def testtensorsrealistically ( self ) : def fakescalarsummary ( tag, value ) : value = summary _ pb2. summary. value ( tag = tag, simple _ value = value ) summary = summary _ pb2. summary ( value = [ value ] ) return summary directory = os. path. join ( self. get _ temp _ dir ( ), " values _ dir " ) if tf. io. gfile. i... | [
0.2781166732311249,
0.714769184589386,
0.7778467535972595,
0.05858277156949043,
0.7978146076202393,
-0.15959717333316803,
1.1336389780044556,
-0.30371642112731934,
-0.17180144786834717,
0.009660746902227402,
-0.19325105845928192,
0.25219038128852844,
0.9604418873786926,
-0.4606930911540985... |
def _ get _ oct _ mode ( name ) : return salt. utils. files. normalize _ mode ( oct ( name. stat ( ). st _ mode & 0o777 ) ) | [
-0.015000254847109318,
-0.08341817557811737,
0.5226798057556152,
-0.5454012155532837,
-0.7280070185661316,
0.7505878210067749,
-0.1208365336060524,
-0.41890859603881836,
-0.10771691799163818,
0.6819326877593994,
0.32921454310417175,
-1.3936916589736938,
0.5088445544242859,
-0.8236538171768... |
def name ( self ) - > optional [ pulumi. input [ str ] ] : warnings. warn ( " " " field'name'has been deprecated from provider version 1. 120. 0. new field'launch _ template _ name'instead. " " ", deprecationwarning ) pulumi. log. warn ( " " " name is deprecated : field'name'has been deprecated from provider version 1.... | [
-0.37365877628326416,
-0.07621736824512482,
0.7089008688926697,
-0.0587642565369606,
-1.0975998640060425,
-0.23276209831237793,
-0.6447390913963318,
0.10056483745574951,
0.5735986828804016,
1.0767161846160889,
-0.8733391761779785,
-0.1827375441789627,
0.40869468450546265,
-0.40141209959983... |
def mean ( v ) : good _ vals = [ ] bad _ mn _ vals = [ ] for i in v : try : good _ vals. append ( int ( i ) ) except valueerror : bad _ mn _ vals. append ( i ) continue if len ( good _ vals ) < 1 : print ( good _ vals ) print ( bad _ mn _ vals ) raise valueerror ( " can't give mean of zero values! " ) mn = sum ( good _... | [
-0.7367845177650452,
0.1179576888680458,
0.3588404059410095,
0.037532396614551544,
-0.3318087160587311,
0.6617947816848755,
0.24935555458068848,
0.2638450264930725,
0.8858364224433899,
0.32593682408332825,
0.3969802260398865,
0.5330865979194641,
-0.9754027128219604,
1.0945888757705688,
0... |
def refreshscreen ( ) : updatescreen ( all _ up _ frame ) updatescreen ( all _ down _ frame ) | [
-0.919187605381012,
-0.7193450331687927,
0.303412526845932,
1.2779324054718018,
0.08844873309135437,
-0.06491980701684952,
-0.2555617392063141,
-1.6016747951507568,
0.7250691056251526,
0.39694127440452576,
0.2282763421535492,
0.13849614560604095,
-0.2523421347141266,
1.3438717126846313,
... |
def wait ( seconds : union [ int, float ] ) - > none : if seconds < = 0 : return message ='sleeping for { seconds :. 1f } seconds, { now }'\. format _ map ( {'seconds': seconds,'now': time. strftime ('% y - % m - % d % h : % m : % s ', time. localtime ( ) ) } ) if seconds > config. noisysleep : pywikibot. info ( messag... | [
-0.1725492626428604,
0.6681804060935974,
0.5072092413902283,
-0.13951361179351807,
-0.0759071633219719,
0.43491625785827637,
-0.694486141204834,
-1.0500189065933228,
-0.6933667659759521,
-0.6477910280227661,
-0.6115221381187439,
0.3167966902256012,
0.5453284978866577,
0.6769222617149353,
... |
def add _ edge ( self, v1, v2 ) : if isinstance ( self. vertices [ v1 ], list ) : self. vertices [ v1 ]. append ( v2 ) | [
-0.37233221530914307,
-0.008941602893173695,
0.5173923373222351,
0.8899433612823486,
0.36019307374954224,
0.8489552140235901,
-1.590459942817688,
0.26149213314056396,
0.7518495917320251,
0.8104175329208374,
-0.23079776763916016,
0.9720720648765564,
-0.9705201983451843,
0.5249843597412109,
... |
def test _ single _ survey _ package _ instance _ fail ( self, client, all _ survey _ package _ instances ) : with pytest. raises ( castorexception ) as e : client. single _ survey _ package _ instance ( " 115df660 - a00a - 4927 - 9e5f - a07d030dfake " ) assert str ( e. value ) = = " 404 survey package invitation not f... | [
-0.7905111312866211,
0.7263985872268677,
0.3954743444919586,
-0.17455995082855225,
0.03665316849946976,
1.2065492868423462,
0.297612726688385,
0.5702579021453857,
0.3194030821323395,
0.45826292037963867,
-0.020897196605801582,
-0.13661423325538635,
-0.1591947078704834,
0.35616153478622437,... |
def integer ( self ) : res ='' while self. c _ char is not none and self. c _ char. isdigit ( ) : res + = self. c _ char self. advance ( ) return int ( res ) | [
0.9603855609893799,
0.17453423142433167,
0.42189913988113403,
-0.13622349500656128,
-0.3153001070022583,
-0.03601484000682831,
0.9448192119598389,
-0.30074790120124817,
-0.7469130754470825,
-1.1248189210891724,
-0.11131219565868378,
-0.008495301939547062,
-0.9579715728759766,
-0.0154826119... |
def _ _ unicode _ _ ( self, * args, * * kwargs ) : # real signature unknown pass | [
-0.5396957397460938,
-0.8881718516349792,
0.5338668823242188,
0.5598093271255493,
0.3723854720592499,
-0.016261126846075058,
0.5781787037849426,
0.22605018317699432,
-0.05210977420210838,
-0.4462728798389435,
-1.5372689962387085,
-0.09179041534662247,
0.2207643836736679,
-0.102086022496223... |
def setup _ logger ( name, level = logging. info ) : set _ colour _ coded _ levels ( ) # create a custom logger log = logging. getlogger ( name ) # only the messages of level and above will be logged log. setlevel ( level ) # create handlers c _ handler = logging. streamhandler ( ) # create formatters and add it to han... | [
-0.05063086003065109,
-0.919337809085846,
0.6964508295059204,
-0.9538766741752625,
-0.7244644165039062,
-0.5381739139556885,
-0.696354866027832,
-0.07282014936208725,
-0.04198356345295906,
-0.34637367725372314,
-0.4053882956504822,
-0.12300942838191986,
-0.1597447395324707,
1.1226754188537... |
def parsequery ( query ) : try : queryre = parsequery. _ regex except attributeerror : import re parsequery. _ regex = queryre = re. compile ( r'[ & ; ]') query _ dict = { } for key, val in [ pair. split ('= ', 1 ) for pair in queryre. split ( query ) if'='in pair ] : query _ dict. setdefault ( key, [ ] ). append ( val... | [
-0.6645985841751099,
-0.12626178562641144,
0.4383467137813568,
-0.3676128685474396,
-1.2219476699829102,
-0.5605804324150085,
-0.11432664096355438,
0.4851614534854889,
0.15701155364513397,
0.37811464071273804,
-0.4336586594581604,
-0.15537779033184052,
-0.23048998415470123,
0.5567024350166... |
def read _ data ( file _ name : str, names : list | none = none ) - > pd. dataframe : return pd. read _ table ( file _ name, sep = r'\ s + ', names = names ) | [
0.6121861934661865,
0.699832558631897,
0.37540748715400696,
-0.0386706106364727,
-0.1116585060954094,
-0.013201597146689892,
-0.904218316078186,
0.46152058243751526,
-1.4480608701705933,
-0.5549852252006531,
0.24303488433361053,
0.43535271286964417,
-0.04475263133645058,
-0.547369718551635... |
def test _ replace _ feature ( self ) : pass | [
0.3928452730178833,
0.019370783120393753,
-0.02443906106054783,
1.0073450803756714,
0.7634375095367432,
-0.7346275448799133,
1.4158450365066528,
1.1749205589294434,
0.27121201157569885,
-1.4175935983657837,
-1.658967137336731,
0.7296763062477112,
-1.2445515394210815,
-0.27788546681404114,
... |
def create _ global ( self, name, width = 1, is _ clock = false, bind _ to _ position = none, bind _ to _ subblock = none ) : if name in self. _ globals : raise prgaapierror ( " global wire named'{ }'is already created ". format ( name ) ) elif width! = 1 : raise prgaapierror ( " only 1 - bit wide global wires are supp... | [
-0.4182828962802887,
1.0728988647460938,
0.6029157638549805,
0.4570111632347107,
-0.765753984451294,
1.0286777019500732,
0.07921914011240005,
-0.40028685331344604,
-0.1067500114440918,
0.7191468477249146,
-0.4568561911582947,
0.5938463807106018,
-1.4690017700195312,
1.0490256547927856,
-... |
def session _ manager ( ) : session = session ( ) try : yield session except exception as e : session. rollback ( ) raise e finally : session. close ( ) | [
-0.1675214171409607,
-0.1381683349609375,
0.8561367392539978,
0.1129835695028305,
-0.5916921496391296,
-0.5966007709503174,
0.34640201926231384,
-0.6064379215240479,
1.0387225151062012,
0.030746452510356903,
1.0867173671722412,
-0.6123626232147217,
-0.4816678762435913,
-0.27741697430610657... |
def payments _ fees ( ) : f = request. args. get ('days ','90') # todo : member id, pass in from member page? member = { } dt = " " " datetime ('now ','- % s days') " " " % f sqlstr = " " " select member, amount, fee _ date, fee _ name, fee _ group, fee _ description from feespaid where fee _ date > % s " " " % dt fees... | [
0.34352490305900574,
1.2117714881896973,
0.6021406054496765,
-0.8355637788772583,
-0.4829593002796173,
-0.37410563230514526,
-0.5633677244186401,
-0.2767197787761688,
-0.7537368535995483,
-0.626430094242096,
1.1528630256652832,
-0.13272356986999512,
0.548133373260498,
1.1105339527130127,
... |
def _ _ call _ _ ( self, trigger, artist, action ) : # check that the trigger is valid if trigger not in self. _ actions : raise valueerror ( " % s invalid - - - valid triggers are % s " \ % ( trigger, ", ". join ( self. events ) ) ) # register the trigger callback self. _ actions [ trigger ] [ artist ] = action # main... | [
0.3238554894924164,
-0.03556375578045845,
0.2160228043794632,
-0.07482589781284332,
0.38379526138305664,
-0.4903363883495331,
-0.28112515807151794,
0.5768458843231201,
0.8124860525131226,
-0.41192761063575745,
-1.163794994354248,
0.8514305949211121,
-0.2575785219669342,
-0.2460304349660873... |
def pre _ selection ( self ) : clf = extratreesclassifier ( n _ estimators = 10, criterion = " gini " ) clf = clf. fit ( self. data, self. target ) print " feature importances : " print clf. feature _ importances _ model = selectfrommodel ( clf, threshold ='0. 25 * mean ', prefit = true ) # eliminate variables that hav... | [
-0.12240632623434067,
0.023282891139388084,
0.4384932816028595,
-0.6707029938697815,
0.6006279587745667,
-0.04020820930600166,
0.49406513571739197,
0.5646005272865295,
-0.07925166934728622,
0.24058093130588531,
-0.933347225189209,
1.2259706258773804,
-0.14705143868923187,
0.207474872469902... |
def _ _ init _ _ ( self, amplitude = 1., mean = 0., stddev = 1. ) : self. amplitude = amplitude self. mean = mean self. stddev = stddev | [
0.7026024460792542,
0.11970730125904083,
0.7215991616249084,
0.5231223702430725,
-0.7496586441993713,
0.7285326719284058,
0.18662749230861664,
-0.10854243487119675,
-0.28085973858833313,
-0.026492169126868248,
-0.26238444447517395,
1.254653811454773,
0.0972009003162384,
0.9721084237098694,... |
def get _ group _ followers _ with _ http _ info ( self, group _ id, start, end, logged _ in _ user _ id, access _ token, client _ token, * * kwargs ) : all _ params = ['group _ id ','start ','end ','logged _ in _ user _ id ','access _ token ','client _ token ','fields'] all _ params. append ('callback') all _ params. ... | [
-0.5207464098930359,
0.3900015354156494,
1.0008153915405273,
0.5810773968696594,
-0.1835356503725052,
-0.0653732493519783,
0.23293137550354004,
-1.27254319190979,
-1.1408390998840332,
0.055941615253686905,
-0.07209622114896774,
0.9998733997344971,
-0.897468626499176,
0.5484363436698914,
... |
def update _ current _ price ( self, market _ price, dt = none ) : self. _ check _ set _ dt ( dt ) if market _ price < = 0. 0 : raise valueerror ('market price " % s " of asset " % s " must be positive to'' update the position.'% ( market _ price, self. asset ) ) else : self. current _ price = market _ price | [
-0.57551109790802,
-0.7526289820671082,
0.3895847797393799,
0.29087260365486145,
-0.3362443745136261,
0.9355720281600952,
-0.451784610748291,
-0.40171924233436584,
-0.8480740189552307,
1.0745741128921509,
0.9017180800437927,
-0.2231854796409607,
-0.5106980204582214,
-0.042930956929922104,
... |
def _ try _ get _ opengl _ canvas ( view ) : from phy. plot. base import basecanvas if isinstance ( view, basecanvas ) : return qwidget. createwindowcontainer ( view ) elif isinstance ( getattr ( view,'canvas ', none ), basecanvas ) : return qwidget. createwindowcontainer ( view. canvas ) return view | [
0.9893337488174438,
0.22590304911136627,
0.5969331860542297,
-0.5495893359184265,
-0.8524197936058044,
-0.6989242434501648,
0.8243828415870667,
-2.1303224563598633,
1.2180591821670532,
-2.213477373123169,
1.6191596984863281,
0.6541345119476318,
-0.04572707787156105,
0.3926835358142853,
-... |
def do _ log ( level, message ) : print ( level, message, flush = true ) | [
0.4221940040588379,
0.09213322401046753,
0.3698677718639374,
-0.19222679734230042,
0.3790750503540039,
0.43568024039268494,
-0.4050264358520508,
-0.407687246799469,
-1.6873490810394287,
-0.061588309705257416,
0.3405432105064392,
1.5236951112747192,
-0.3093414902687073,
0.6522772908210754,
... |
def listfields ( self, * args, * * kwargs ) : # real signature unknown pass | [
-0.7132790088653564,
0.07887566834688187,
0.41750648617744446,
-0.058508288115262985,
0.7254249453544617,
0.07751289010047913,
0.0516597144305706,
-0.2693791389465332,
0.12564878165721893,
-0.690025269985199,
-1.1838093996047974,
0.2975767254829407,
-0.7968944311141968,
-0.2671132087707519... |
def find _ combination ( name, combinations _ to _ make ) : for i, combination in enumerate ( combinations _ to _ make ) : if combination [ " name " ] = = name : return reaction _ plate. wells ( i ) raise valueerror ( " could not find combination \ " { 0 } \ ". ". format ( name ) ) | [
0.04683467373251915,
0.30254462361335754,
0.24850204586982727,
0.03841821849346161,
-0.05849803239107132,
-0.4178571403026581,
0.24843887984752655,
-0.9069691896438599,
-0.29825058579444885,
0.11900340020656586,
-0.220875084400177,
-0.4272350072860718,
-0.8345539569854736,
-0.5386653542518... |
def request _ userlist ( ) : return userentry. get _ online _ users ( ) | [
-0.8085024952888489,
0.04972727224230766,
0.2069803774356842,
1.5177433490753174,
0.9005409479141235,
0.029495036229491234,
-1.1449874639511108,
0.4533390998840332,
0.25027376413345337,
0.0659186914563179,
-0.7236737012863159,
0.5878008604049683,
-0.44966498017311096,
-0.09677842259407043,... |
def evaluate ( annotations, results, relevant _ labels, dataset, quiet ) : pr, map = [ ], [ ] iterations = viewitems ( annotations ) if not quiet else tqdm ( viewitems ( annotations ) ) for query, gt _ sets in iterations : if query not in results : print ('warning : query { } is missing from the result file '. format (... | [
-0.23052561283111572,
-0.2165307104587555,
0.7469033598899841,
-0.8699675798416138,
0.2952386140823364,
0.11654753237962723,
0.30057093501091003,
-0.4518173038959503,
-0.007038509007543325,
0.4451710879802704,
0.7678173184394836,
0.6581698060035706,
-0.042277466505765915,
0.553985118865966... |
def post ( self ) : data = get _ info _ token ( ) ip _ = request. environ. get ('http _ x _ real _ ip ', request. remote _ addr ) try : classname = str ( request. get _ json ( ) ['classname']. encode ('utf - 8'). strip ( ). decode ( " utf - 8 " ) ) payload = { " classname " : classname } insert _ request _ log ( " / pr... | [
-1.2144229412078857,
0.010054460726678371,
1.2562744617462158,
0.7765167951583862,
-0.47096696496009827,
0.2608049213886261,
-0.385382741689682,
-0.38576745986938477,
-0.46134719252586365,
0.2719910144805908,
0.6058744788169861,
0.3529985249042511,
-0.3559277057647705,
-0.4603167474269867,... |
def get _ all _ usernames ( self ) : pass | [
-0.32380229234695435,
-0.13806292414665222,
0.38435986638069153,
1.5324110984802246,
0.3159002959728241,
0.17961838841438293,
-1.0022801160812378,
0.6076414585113525,
0.34819090366363525,
-0.6152167916297913,
-0.9428815245628357,
0.4835875332355499,
0.05275517329573631,
0.7722680568695068,... |
def setflowrate ( self, flowrate ) : flowrate = str ( flowrate ) if len ( flowrate ) > 5 : flowrate = flowrate [ 0 : 5 ] flowrate = remove _ crud ( flowrate ) logging. warning ( " % s : flow rate truncated to % s ul / min ", self. name, flowrate ) else : flowrate = remove _ crud ( flowrate ) self. write ( " ulm " + flo... | [
-0.5193633437156677,
-0.4107934236526489,
0.4344732165336609,
-0.194841668009758,
-0.15665365755558014,
-0.32732057571411133,
-0.06506937742233276,
-0.6373010873794556,
1.0431149005889893,
-0.8270615339279175,
0.08253529667854309,
-0.2832644283771515,
-1.1703509092330933,
-0.39019286632537... |
def _ update _ display ( self ) : # fill the background with color. self. screen. fill ( self. settings. bgcolor ) # display bullets. for bullet in self. bullets. sprites ( ) : bullet. display _ bullets ( ) # display ship and target. self. ship. display _ ship ( ) self. target. display _ target ( ) self. _ display _ me... | [
-0.46164068579673767,
-0.7906973958015442,
0.4679742157459259,
-0.3682211637496948,
0.17353452742099762,
0.219988614320755,
0.25843626260757446,
-1.3386272192001343,
0.3706021308898926,
0.8417381048202515,
0.4001631438732147,
0.49510058760643005,
0.3100838363170624,
0.6201466917991638,
0... |
def plot _ 1d _ features ( data ) : # add histogram data x1 = data [ ['acousticness'] ]. t. squeeze ( ) x2 = data [ ['danceability'] ]. t. squeeze ( ) # group data together hist _ data = [ x1, x2 ] group _ labels = ['acousticness ','danceability'] # create distplot with custom bin _ size fig = ff. create _ distplot ( h... | [
0.22494876384735107,
0.45861467719078064,
0.37744659185409546,
-0.1168060153722763,
-0.39749130606651306,
0.36679142713546753,
0.6490305066108704,
0.23586124181747437,
0.0877409279346466,
-0.9672057628631592,
-0.012664895504713058,
1.0950374603271484,
-0.6564009189605713,
0.996057510375976... |
def generate ( self, z _ mu = none ) : # if z _ mu is none : # # z _ mu = np. random. normal ( size = self. network _ architecture [ " n _ z " ] ) # z _ mu = np. random. normal ( size = ( self. batch _ size, self. n _ time _ steps, self. network _ architecture [ " n _ z " ] ) ) zs = [ ] # z _ 0 from prior prior _ mean ... | [
-0.8842269778251648,
0.3362261950969696,
0.820659339427948,
0.37075507640838623,
-0.06234735995531082,
0.22475109994411469,
1.0143378973007202,
0.0642089918255806,
0.293867290019989,
0.09974083304405212,
-0.3079984188079834,
0.5056523680686951,
0.5739181041717529,
0.676281213760376,
-0.0... |
def aggregate _ metrics ( metrics : list [ metrictype ] ) - > list [ metrictype ] : return metrics | [
-0.42549875378608704,
1.3901193141937256,
0.14334990084171295,
0.9291843771934509,
1.1908433437347412,
0.3899884521961212,
0.46210411190986633,
-0.3902355432510376,
0.4170590937137604,
0.4380437135696411,
0.3092365860939026,
0.2999413311481476,
-0.1776547133922577,
0.7996458411216736,
-0... |
def _ _ init _ _ ( self ) : self. c ='' self. isword = false # same to a random number for a complete word self. children = { } # { c : trienode } | [
0.6562544107437134,
0.38511818647384644,
0.31261539459228516,
-0.4984690546989441,
-0.3355836570262909,
0.4765305519104004,
0.9837812185287476,
1.1144105195999146,
0.23312348127365112,
0.17436514794826508,
-1.2561309337615967,
-0.29278117418289185,
-0.6606569886207581,
0.9023130536079407,
... |
def create _ post _ comment ( * * kwargs ) - > postcomment : kwargs. setdefault ('name ', faker. name ( ) ) kwargs. setdefault ('comment ', faker. words ( 10 ) ) kwargs. setdefault ('post ', create _ post ( ) ) kwargs. setdefault ('anonymous _ user ', create _ anonymous _ user ( ) ) return postcomment. objects. create ... | [
0.33539867401123047,
-0.0641074851155281,
0.49195539951324463,
0.6800581216812134,
0.18936803936958313,
0.4191189408302307,
-0.5729725360870361,
0.31370940804481506,
-0.8440941572189331,
0.26017865538597107,
-1.2690119743347168,
-1.003335952758789,
-0.679500162601471,
0.3397811949253082,
... |
def score ( self ) : return self. _ stats ['score'] | [
0.4092252552509308,
-0.07892468571662903,
0.19596388936042786,
0.1434037983417511,
0.79436194896698,
0.1927090883255005,
0.14718097448349,
-0.8265883922576904,
0.415833055973053,
-0.25319233536720276,
0.3753811717033386,
-0.18295666575431824,
0.09650423377752304,
-0.6709330081939697,
-0.... |
def import _ data ( products _ file, customers _ file, rentals _ file ) : # def import _ data ( directory _ name, products _ file, customers _ file, rentals _ file ) : mongo = mongodbconnection ( ) with mongo : # connect to mongo db = mongo. connection. hp _ norton # name the first collection we will work on products =... | [
0.48307785391807556,
-0.11857058852910995,
0.8496110439300537,
0.24100033938884735,
0.7914385795593262,
0.5655808448791504,
-0.09980146586894989,
-0.04143339395523071,
-0.7707723379135132,
0.2577352523803711,
-0.26873335242271423,
-0.3452227711677551,
-0.19206875562667847,
0.09207558631896... |
def transform _ image ( fixed _ im _ name, moving _ im _ name ) : trans _ file ='temp _ trans _ file. txt'angle = random. uniform ( 0, 1 ) tr _ x = random. uniform ( 0, 1 ) tr _ y = random. uniform ( 0, 1 ) theta = ( angle - 0. 5 ) * ( math. pi / 2 ) # print ('angle : { } \ ntr _ x : { } \ ntr _ y : { } \ ntheta : { } ... | [
-0.11238157749176025,
0.23670829832553864,
0.828493595123291,
0.08441068232059479,
0.16496609151363373,
-0.7203070521354675,
0.733471691608429,
-0.1720171421766281,
-0.5920867323875427,
0.6605355739593506,
-1.0493675470352173,
-0.7115119099617004,
0.05687933415174484,
-0.001354301930405199... |
def peek ( self ) : " " " queue is empty, returns none. " " " return self. head. val if self. head else none | [
0.08238591253757477,
-0.10579820722341537,
0.7546630501747131,
-0.1729290634393692,
-0.4290143549442291,
-0.6956990957260132,
-0.5510309934616089,
-1.3983021974563599,
0.11299379169940948,
-0.8033987283706665,
-0.15020851790905,
1.2021398544311523,
-0.25465768575668335,
0.47354674339294434... |
def _ check _ if _ reachable ( self, start, target ) : if not self. _ is _ in _ game _ bounds ( start ) or not self. _ is _ in _ game _ bounds ( target ) : return false occupied = false if start [ 0 ] = = target [ 0 ] and start [ 1 ] = = target [ 1 ] : return false elif start [ 0 ] = = target [ 0 ] : # squares are in t... | [
-1.3937044143676758,
-0.24220342934131622,
1.0948662757873535,
-0.05991772934794426,
-0.5239410400390625,
-0.6665695309638977,
0.3493904173374176,
-0.5740681886672974,
-0.8308227062225342,
1.0171959400177002,
-0.037325017154216766,
0.11755755543708801,
-0.047325290739536285,
-0.64795410633... |
def mids _ to _ verts ( self, sm, gtype ='tri') : if gtype = ='tri': assert ( len ( sm ) = = self. n _ tedges ), " length of array passed to grad is not edges length " mm _ inv = np. abs ( self. delta _ tri _ 0. t ) path _ len = np. dot ( mm _ inv, self. vor _ edge _ len ) sv = np. dot ( mm _ inv, sm * self. vor _ edge... | [
0.27431726455688477,
0.10284245759248734,
0.7691317200660706,
-0.23726323246955872,
-0.6597405672073364,
-0.08036540448665619,
0.554309606552124,
-0.27801722288131714,
0.8773680329322815,
0.9870255589485168,
-0.010037343949079514,
0.7912408709526062,
-0.6325141191482544,
0.4863196909427643... |
def _ convert _ edge _ in _ projected _ space _ to _ edge _ in _ original _ space ( self, edge ) : additional _ dim _ 2 _ value = { self. _ primary _ objective _ index : edge. z3 ( ) } return typeconversionutilities. edge _ in _ two _ dimension _ to _ edge ( additional _ dim _ 2 _ value, edge, self. _ projected _ space... | [
-0.17344830930233002,
-0.5054524540901184,
0.6137387156486511,
-0.18228596448898315,
-0.7514774203300476,
0.5510945320129395,
-0.09860072284936905,
0.7926836013793945,
0.07449907064437866,
0.5075375437736511,
1.0543562173843384,
1.2114924192428589,
-0.029315151274204254,
0.1332838833332061... |
def _ get _ object _ name ( self ) : try : if self. acl6name is not none : return str ( self. acl6name ) return none except exception as e : raise e | [
0.5621944069862366,
-1.145046353340149,
0.6465340256690979,
0.0077676610089838505,
-0.6181294918060303,
-0.41854849457740784,
0.3090549111366272,
-0.6342200636863708,
0.4926605224609375,
1.1298600435256958,
0.5897464156150818,
-0.1200142353773117,
0.5619542002677917,
-1.1353174448013306,
... |
def lemmatize _ text ( words ) : lemmatizer = nltk. wordnetlemmatizer ( ) word _ tags = nltk. pos _ tag ( words ) words = [ lemmatizer. lemmatize ( w, wordnet _ pos ( t ) ) for ( w, t ) in word _ tags ] return words | [
0.2135287970304489,
-0.6917095184326172,
0.3691475987434387,
-0.38491377234458923,
0.19540314376354218,
-0.21391744911670685,
-1.6883336305618286,
0.8159992694854736,
-0.1889711171388626,
0.8664035201072693,
-0.8415548801422119,
-0.9164097309112549,
-0.8172950148582458,
1.2638423442840576,... |
def _ releaseconnectioninvokecallback ( self, conn, callback ) : # first invoke the callback to let the program know we're done # with the transaction. callback ( conn ) # now check to see if we have any pending clients. if so pass # them the newly released connection. if self. _ waiting _ on _ connection : callback = ... | [
0.3056934177875519,
-0.2845992147922516,
0.6153490543365479,
-0.1815197914838791,
0.1162211149930954,
-0.9800224304199219,
-0.6939089894294739,
0.0913078784942627,
0.01107985619455576,
0.5858672857284546,
0.2498645931482315,
-0.31394854187965393,
-0.9725770950317383,
0.22181233763694763,
... |
def list _ recursive ( root _ path ) : root _ path = os. path. abspath ( root _ path ) for ( dirpath, dirnames, filenames ) in os. walk ( root _ path ) : folder = dirpath [ len ( root _ path + " / " ) : ]. replace ( " \ \ ", " / " ) if folder! = " " : folder + = " / " for filename in filenames : yield folder + filename | [
0.24351152777671814,
-0.08901873975992203,
0.8778619766235352,
0.18941108882427216,
-0.8819549679756165,
-0.10612736642360687,
0.3003922700881958,
0.11810239404439926,
0.6627957820892334,
-0.4549592435359955,
0.3820078670978546,
-0.13862794637680054,
0.1955847591161728,
1.0575681924819946,... |
def runtwalk ( self, t ) : x0 = self. siminitvalues ( ) xp0 = self. siminitvalues ( ) while any ( abs ( x0 - xp0 ) < = 0. 001 ) : # with 0 is the test in pytwalk sleep ( 0. 005 ) xp0 = self. siminitvalues ( ) self. twalk. run ( t = t, x0 = x0, xp0 = xp0 ) | [
-0.16616180539131165,
-0.6002164483070374,
0.2882421314716339,
0.06435032188892365,
-0.03619140014052391,
1.240951418876648,
0.8143266439437866,
-0.811538577079773,
-0.39756250381469727,
-0.5484482049942017,
-0.40512382984161377,
-0.7095156908035278,
-0.10907860845327377,
0.853171408176422... |
async def say ( self, text : str, voice _ id : str, * * kwargs ) - > bytes : flite _ cmd = [ " flite ", " - voice ", shlex. quote ( str ( self. voice _ dir / f " { voice _ id }. flitevox " ) ), " - o ", " / dev / stdout ", " - t ", shlex. quote ( text ), ] _ logger. debug ( flite _ cmd ) proc = await asyncio. create _ ... | [
0.5302236080169678,
0.5492479801177979,
0.6840437054634094,
0.46124544739723206,
-0.2620938718318939,
-0.4751844108104706,
-0.9616548418998718,
-0.9618698954582214,
-0.08491961658000946,
0.1478586047887802,
0.008776992559432983,
0.7661682367324829,
-0.9044917821884155,
-0.11311338096857071... |
def get ( org _ id ) : try : org = orgservice. find _ by _ org _ id ( org _ id, allowed _ roles = ( * client _ admin _ roles, staff ) ) response, status = org. get _ payment _ info ( ), http _ status. http _ 200 _ ok except businessexception as exception : response, status = {'code': exception. code,'message': exceptio... | [
0.5357619524002075,
0.18817754089832306,
0.7390789985656738,
-0.11373759061098099,
0.10190184414386749,
-0.7013747096061707,
-0.16923582553863525,
-0.2464989721775055,
-0.24200597405433655,
0.675219714641571,
-0.08766147494316101,
1.0796964168548584,
-0.08377213776111603,
0.578805208206176... |
def _ reflect _ constraint ( self, model, conname, type, definition, module, msg ='' ) : if not module : # no need to save constraints for custom models as they're not part # of any module return assert type in ('f ','u') cr = self. _ cr query = " " " select type, definition, msg from ir _ model _ constraint c, ir _ mo... | [
-0.947563648223877,
-0.3165759742259979,
0.7862837314605713,
-0.4735220968723297,
0.23374058306217194,
-0.22708120942115784,
0.35096603631973267,
-0.04401843622326851,
-0.5871521234512329,
1.1450508832931519,
-0.12441330403089523,
-0.06657911092042923,
-0.629438579082489,
0.822934627532959... |
def random _ sentence ( word _ count = none ) : if word _ count is none : word _ count = random. randint ( 1, 20 ) words = [ random _ word ( ) for x in range ( word _ count - 1 ) ] words. insert ( 0, str ( uuid. uuid1 ( ) ). split ('-') [ 0 ] ) return'% s.'%''. join ( words ) | [
0.46958914399147034,
0.2981858551502228,
0.6962918639183044,
-0.39931997656822205,
-0.06350778043270111,
-0.6248772740364075,
-0.007266100961714983,
0.5505152940750122,
-0.0429033562541008,
1.0052359104156494,
0.28735417127609253,
-0.05941353738307953,
-1.2365518808364868,
0.22168558835983... |
def get _ image _ info ( row : tuple ) - > tuple [ str, str ] : img _ url = row [ imageurl _ col _ idx ] final _ path = img _ url. split ( " / " ) [ - 1 ] filename = final _ path. split ( "? " ) [ 0 ] return f " 12 + { filename } ", img _ url | [
-1.1738979816436768,
-0.02029016800224781,
0.6226646304130554,
-0.6290526986122131,
0.27048665285110474,
-1.0284719467163086,
0.15895886719226837,
0.5416268110275269,
-0.05756951868534088,
0.6899410486221313,
0.45386284589767456,
-0.3478488326072693,
1.6353589296340942,
0.01180969271808862... |
def _ lookup _ users _ for _ comments ( comments ) : author _ set = set ( ) _ populate _ authors _ for _ comments ( comments, author _ set ) users = user. objects. filter ( username _ _ in = author _ set ). select _ related ( " profile " ) return { user. username : user for user in users } | [
0.010629472322762012,
-0.39939314126968384,
0.38378795981407166,
0.001432883320376277,
0.5154870748519897,
-0.42827674746513367,
0.43467822670936584,
-0.7803648114204407,
-0.4768172800540924,
0.5599181652069092,
0.03254139795899391,
-1.0042649507522583,
0.19018493592739105,
-0.358641773462... |
def teardownclass ( self ) : print ( " removing airflow variable... " ) variable. delete ( " rb _ status _ " + self. report _ form _ sample. report _ title. data ) | [
1.2888168096542358,
-0.6346191167831421,
0.20907481014728546,
-0.30424395203590393,
0.34787943959236145,
0.5737200975418091,
0.47962579131126404,
0.35873669385910034,
0.3836451768875122,
-0.8299696445465088,
0.4261843264102936,
0.6190361380577087,
-1.4494096040725708,
0.5510832071304321,
... |
def file _ changes _ reloader ( ) : logging. basicconfig ( level = logging. info, format = " % ( asctime ) s - % ( message ) s ", datefmt = " % y - % m - % d % h : % m : % s ", ) path = sys. argv [ 1 ] if len ( sys. argv ) > 1 else " templates / " path _ to _ metrics = sys. argv [ 1 ] if len ( sys. argv ) > 1 else " me... | [
0.2499021738767624,
-0.22514022886753082,
0.8626590371131897,
0.1292092502117157,
-0.19524507224559784,
0.07853618264198303,
1.2473324537277222,
0.42218902707099915,
-1.4573769569396973,
-0.2569923996925354,
0.1787785142660141,
0.018948456272482872,
0.17135614156723022,
0.7347274422645569,... |
def psi _ 0 ( u _ ) : return 0. 5 * lmbda * tr ( eps ( u _ ) ) * * 2 + mu * eps ( u _ ) * * 2 | [
0.28673362731933594,
-0.16336455941200256,
0.5484148859977722,
-0.5991938710212708,
-0.9532263875007629,
0.3891831934452057,
-0.04880642145872116,
0.7016321420669556,
0.29483041167259216,
-0.2663549780845642,
0.2687145173549652,
0.5560637712478638,
-0.6219860911369324,
-0.4782545566558838,... |
def uniform ( shape : sequence [ int ], dtype : union [ tf. dtype, np. dtype ] = np. float32, low : float = - 1. 0, high : float = 1. 0, ) - > np. ndarray : # pytype doesn't understand the ternary with tf as " any " dtype = ( dtype. as _ numpy _ dtype if isinstance ( dtype, tf. dtype ) else dtype ) # pytype : disable =... | [
-0.5608231425285339,
0.10365068912506104,
0.5466029047966003,
-0.7766595482826233,
0.6480445861816406,
-0.12389929592609406,
0.15118663012981415,
-0.3498004376888275,
0.1278277188539505,
0.6600136756896973,
-0.5368456244468689,
1.0713502168655396,
-0.1292438954114914,
0.2992803156375885,
... |
def test _ startservicehandlerdispatch ( self ) : events = [ ] class testhandler ( xmpphandler ) : def connectioninitialized ( self ) : fn = lambda obj : events. append ( obj ) self. xmlstream. addobserver ('/ / event / test ', fn ) testhandler ( ). sethandlerparent ( self. component ) self. component. startservice ( )... | [
1.0186967849731445,
-0.47778618335723877,
0.5187143683433533,
0.04451461508870125,
0.08814797550439835,
0.5892364382743835,
0.4630244970321655,
0.10830844193696976,
0.299883633852005,
-1.7510101795196533,
-0.7462397217750549,
-0.38283464312553406,
0.08100023120641708,
0.7589182257652283,
... |
def write _ tau ( tau ) : with open ( f'tau. out ','w') as fout : taus _ max = { } for key, values in tau. items ( ) : try : taus _ max [ key ] = max ( values ) except valueerror : taus _ max [ key ] = 0 for key, value in sorted ( taus _ max. items ( ), key = lambda x : x [ 1 ], reverse = true ) : try : fout. write ( f... | [
-0.19854268431663513,
-0.2609553933143616,
0.6083430051803589,
0.21470171213150024,
0.5108615159988403,
0.14503708481788635,
0.054945606738328934,
0.49693557620048523,
0.3625105023384094,
-0.5381308794021606,
-0.147581547498703,
0.14511023461818695,
1.0273836851119995,
1.3859935998916626,
... |
def movie _ playing ( self, value ) : self. movie _ playing _ value = value | [
-0.4885548949241638,
-0.7660108804702759,
0.4632629156112671,
0.3958481252193451,
-0.5654122829437256,
1.2556875944137573,
-0.0373138003051281,
0.2516215443611145,
-0.4516715109348297,
0.6854316592216492,
-0.3218315839767456,
0.36789849400520325,
-0.02023334614932537,
0.48777520656585693,
... |
def delete _ fileupload ( cmd, app _ id : str, token : str, api _ version = api _ version, central _ dns _ suffix = central _ endpoint ) - > fileuploadga : api _ version = api _ version result = _ make _ call ( cmd, app _ id, " delete ", token = token, api _ version = api _ version, central _ dns _ suffix = central _ d... | [
0.582365095615387,
0.2914623022079468,
0.5553247928619385,
0.052338939160108566,
0.3536382019519806,
-0.10316428542137146,
-0.5849072337150574,
0.1801287829875946,
-0.07753023505210876,
0.1474803388118744,
0.09629742056131363,
0.8853055834770203,
0.1128765121102333,
-0.4640624225139618,
... |
def generate _ s _ curve _ profile ( max _ v, max _ a, time _ to _ max _ a, dt, goal ) : t _ rec = [ 0. 0 ] x _ rec = [ 0. 0 ] v _ rec = [ 0. 0 ] a _ rec = [ 0. 0 ] j = max _ a / time _ to _ max _ a short _ profile = max _ v * ( time _ to _ max _ a + max _ v / max _ a ) > goal if short _ profile : profile _ max _ v = m... | [
0.6938209533691406,
0.43290236592292786,
0.8734511137008667,
0.15014657378196716,
-0.327382355928421,
-0.270232230424881,
-0.05313990265130997,
-0.3236038386821747,
-0.36411118507385254,
1.016880989074707,
-0.6853693127632141,
-0.18191426992416382,
0.7147999405860901,
-0.3742165267467499,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.