text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def output ( self ) : self. trigger ( ) return self. result | [
-0.1998795121908188,
-0.011644396930932999,
0.366415411233902,
0.5025670528411865,
-0.5241131782531738,
-0.9726696014404297,
0.8490842580795288,
-0.1379951536655426,
-0.06638998538255692,
-1.47453773021698,
-0.7381389737129211,
-0.458626925945282,
-0.9172971248626709,
-0.7128849029541016,
... |
def process _ payloads _ ipfuzzing ( self, payloads ) : # ip fuzzing ( dword ) if self. options. dwo : resulting _ payloads = [ ] for payload in payloads : payload [ " payload " ] = self. process _ ipfuzzing ( payload [ " payload " ] ) resulting _ payloads. append ( payload ) return resulting _ payloads return payloads | [
-1.3126702308654785,
0.6319370865821838,
0.42815348505973816,
0.19717489182949066,
0.07357998192310333,
-0.45107701420783997,
-0.48679205775260925,
-1.122029185295105,
0.3275313079357147,
0.17887769639492035,
-0.2446100264787674,
-1.1619912385940552,
-0.6478023529052734,
1.169816255569458,... |
def test _ logon _ robot _ controller _ with _ username _ correct ( self ) : is _ logged _ in, _ = user _ auth. logon _ robot _ controller _ with _ username ( self. controller,'default user ','robotics') self. asserttrue ( is _ logged _ in ) | [
0.1668272763490677,
-0.29722514748573303,
0.15112492442131042,
0.901462733745575,
0.5232405662536621,
0.411115437746048,
0.36292728781700134,
-0.04299500212073326,
0.3073250353336334,
-0.425256609916687,
-1.3374468088150024,
0.22940483689308167,
-0.025413112714886665,
-0.3838423490524292,
... |
def test _ addition _ array ( ctx _ factory ) : context = ctx _ factory ( ) queue = cl. commandqueue ( context ) a = np. array ( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] ). astype ( np. float32 ) a _ gpu = cl _ array. to _ device ( queue, a ) a _ added = ( a _ gpu + a _ gpu ). get ( ) assert ( a + a = = a _ added ). all ( ) | [
0.40486618876457214,
0.07699807733297348,
0.8392124176025391,
0.33703291416168213,
1.2842048406600952,
0.616157591342926,
0.2517223060131073,
-1.1340398788452148,
0.7465482950210571,
-0.3067987859249115,
0.31011834740638733,
0.35474732518196106,
0.28001633286476135,
0.5263065099716187,
0... |
def get _ child _ partition _ keys _ of _ parent ( self, dynamic _ partitions _ store : dynamicpartitionsstore, parent _ partition _ key : optional [ str ], parent _ asset _ key : assetkey, child _ asset _ key : assetkey, current _ time : datetime, ) - > sequence [ str ] : child _ partitions _ def = self. get _ partiti... | [
-0.06177340820431709,
-0.4869742691516876,
0.6425836086273193,
0.24721123278141022,
-0.3260105550289154,
-0.5513139963150024,
-0.0865398421883583,
-0.34440547227859497,
-0.969971239566803,
0.6056292057037354,
-0.5406894683837891,
-0.08389878273010254,
0.6145333647727966,
-0.087824232876300... |
def addme2me ( self, x ) : return x + x | [
-0.9218138456344604,
-0.45391109585762024,
0.5258178114891052,
-0.5663115382194519,
-0.6679383516311646,
1.3577584028244019,
-0.7935361266136169,
-1.2027226686477661,
0.18504387140274048,
-0.7983137965202332,
-0.6248019337654114,
0.3533138036727905,
-0.002148370025679469,
-0.81746566295623... |
def complemented ( self, * args ) : return _ topods. topods _ shape _ complemented ( self, * args ) | [
0.23727703094482422,
-0.6283721923828125,
0.33880284428596497,
-0.12727664411067963,
0.472934752702713,
1.453491449356079,
0.5753312706947327,
-0.931169867515564,
-0.2060144990682602,
-0.1534290611743927,
-0.835964560508728,
-0.4196372330188751,
-0.2136840969324112,
0.2642415761947632,
-... |
def insert _ tablets ( self, tablet _ lst ) : status = self. _ _ client. inserttablets ( self. gen _ insert _ tablets _ req ( tablet _ lst ) ) logger. debug ( " insert multiple tablets, message : { } ". format ( status. message ) ) return session. verify _ success ( status ) | [
-1.843980073928833,
1.396477460861206,
0.45036065578460693,
1.024072527885437,
0.7509048581123352,
0.9024401307106018,
0.16382406651973724,
-0.8285473585128784,
-0.8129985928535461,
0.5026553273200989,
-1.8651845455169678,
-0.6121456027030945,
-0.865029513835907,
0.5710607767105103,
-0.9... |
def prepare _ sequences ( sequence _ list, warmup = true, split = true ) : if warmup = = true : wo _ warmup = [ sequence [ int ( len ( sequence ) / 2 ) + 1 : ] for sequence in sequence _ list ] else : wo _ warmup = sequence _ list split _ halves = [ ] if split = = true : for seq in wo _ warmup : split _ halves. append ... | [
-1.1431884765625,
-0.3247891962528229,
0.5203233361244202,
-0.008584024384617805,
-0.21534380316734314,
-0.5338512659072876,
0.324197381734848,
0.5230753421783447,
1.138747215270996,
0.8175925016403198,
-0.941647469997406,
-0.5170133709907532,
-0.3665006160736084,
1.133636713027954,
0.35... |
def templatize ( self, template ) : return string. template ( template ). substitute ( * * self. symbols ) | [
-0.30167460441589355,
0.30205345153808594,
0.11033549159765244,
-1.9248993396759033,
-0.3270331919193268,
-1.2914460897445679,
-0.6912600994110107,
0.5560333728790283,
-0.22182562947273254,
-0.32986578345298767,
-0.9746543169021606,
-0.916333019733429,
-0.821936845779419,
-0.19028882682323... |
def scp _ cmd ( self ) : return " scp % s % s " % (''. join ( self. scp _ options ), self. target ) | [
-0.17619474232196808,
-1.0852127075195312,
0.6929858922958374,
-0.5342495441436768,
0.626631498336792,
0.6749725937843323,
-0.7603845000267029,
-0.06327994912862778,
0.4297392964363098,
0.629874050617218,
1.1131709814071655,
1.1162012815475464,
0.23283426463603973,
-1.3237035274505615,
-... |
def _ _ euclidean _ map _ threaded ( self ) : def map _ process ( sensor, i ) : " " " same as _ _ euclidean _ map _ threaded ( ) but must be isolated in a function for multiprocessing. writes populated distance maps to cache _ dir so that we only have to do this once. it's slow. parameters - - - - - - - - - - sensor : ... | [
-0.2926676869392395,
-0.2727826237678528,
1.0289082527160645,
-0.29523766040802,
0.14639844000339508,
0.45088523626327515,
0.6027655005455017,
-0.8095782399177551,
0.023623719811439514,
0.5379152894020081,
0.1804722398519516,
-0.15623584389686584,
0.1666535884141922,
1.030642032623291,
-... |
def test _ has _ node _ neg ( gr ) : gr. add _ node ('val1') assert not gr. has _ node ('val2') | [
-0.21690474450588226,
1.3625361919403076,
0.4417947828769684,
0.7052972316741943,
0.8469755053520203,
1.7004684209823608,
-0.22086185216903687,
-0.000018295404515811242,
-1.1021513938903809,
-0.5380704998970032,
0.13304384052753448,
-0.047077883034944534,
-0.4605437219142914,
0.42867329716... |
def _ create _ cpo _ transition _ matrix ( trmx ) : # verify value size = len ( trmx ) assert size > 0, " transition matrix should not be empty " assert all ( len ( t ) = = size for t in trmx ), " all matrix lines should have the same length " + str ( size ) assert all ( all ( is _ int ( v ) and v > = 0 for v in r ) fo... | [
0.2042558491230011,
-0.34576311707496643,
0.30549171566963196,
0.5128231644630432,
-0.5450174808502197,
0.3821958601474762,
0.750087320804596,
0.16022512316703796,
-0.5147103071212769,
0.8540474772453308,
-0.43708765506744385,
-0.9363242983818054,
-0.7231812477111816,
-0.32599204778671265,... |
def powerset ( iterable ) : xs = list ( iterable ) # note we return an iterator rather than a list return itertools. chain. from _ iterable ( itertools. combinations ( xs, n ) for n in range ( 1, len ( xs ) + 1 ) ) | [
-0.3408966660499573,
0.011900760233402252,
0.46186792850494385,
0.5194958448410034,
-0.05090659111738205,
-0.7286855578422546,
-0.518429696559906,
-0.21894897520542145,
-0.1587698608636856,
-0.2605503797531128,
-0.07325524836778641,
-0.26089298725128174,
-0.45796728134155273,
-0.2256908416... |
def validate _ tt _ parenting ( expected _ parenting ) : @ transient _ function _ wrapper ('newrelic. core. stats _ engine ','statsengine. record _ transaction') def _ validate _ tt _ parenting ( wrapped, instance, args, kwargs ) : try : result = wrapped ( * args, * * kwargs ) except : raise finally : def _ bind _ para... | [
-0.11464834958314896,
0.25828617811203003,
0.6783011555671692,
-0.4170151650905609,
-0.4004795551300049,
-0.10669167339801788,
0.37320688366889954,
-0.736017107963562,
-0.5964041948318481,
1.0003643035888672,
0.45212650299072266,
0.1591784954071045,
0.42751675844192505,
0.23017418384552002... |
def test _ step _ to _ different _ func ( ) : graph = create _ object _ graph ( " example ", testing = true ) def func1 ( graph ) : return func2 def func2 ( graph ) : pass state _ machine = statemachine ( graph, initial _ state = func1 ) next _ func = state _ machine. step ( ) assert _ that ( next _ func, is _ ( equal ... | [
-0.23933294415473938,
0.7372381687164307,
0.3297068774700165,
1.1255590915679932,
0.680108368396759,
0.38823992013931274,
0.2546745240688324,
-0.344749391078949,
-0.47481945157051086,
-1.2935512065887451,
-1.3343387842178345,
0.8722895383834839,
0.507817804813385,
-0.0676785334944725,
0.... |
def _ _ hash _ _ ( self ) : return int ( id ( self ) / 16 ) | [
1.2000586986541748,
0.07184118032455444,
0.48207736015319824,
-0.3498890697956085,
0.12079302966594696,
0.710527241230011,
-0.18283753097057343,
-0.5977990031242371,
0.5149248838424683,
-0.9020446538925171,
-0.7529339790344238,
-0.822248101234436,
-0.9333211183547974,
-0.8065382838249207,
... |
def test _ init _ with _ context ( self ) : vis _ dir = galaxy _ mock. mockdir ( {'config': {'vis1. xml':'' },'static': { },'templates': { }, } ) config = dict ( ) context = dict ( base _ url ='u / wot / m8 ', template _ cache _ dir ='template _ cache ', additional _ template _ paths = ['one'] ) plugin = self. plugin _... | [
-0.6261547803878784,
-0.3911898136138916,
0.44798779487609863,
-0.03174622729420662,
-0.12260851263999939,
0.06602471321821213,
0.21875575184822083,
0.01085436251014471,
1.2411348819732666,
-0.28521987795829773,
-0.792275071144104,
0.21433408558368683,
0.5168947577476501,
0.400635689496994... |
def call ( cmd, * args, * * popen _ kwargs ) : if not args : cmd, * args = shlex. split ( cmd ) proc = subprocess. popen ( [ cmd, * args ], * * popen _ kwargs ) ret _ code = proc. wait ( ) if ret _ code : sys. exit ( ret _ code ) else : return proc | [
0.6437639594078064,
-0.07567834854125977,
0.7641703486442566,
0.23700664937496185,
-0.51140296459198,
0.3406277894973755,
-1.149747610092163,
-0.2236367166042328,
-0.1283961534500122,
-0.5140814185142517,
0.49325689673423767,
-0.09375600516796112,
-0.5438501238822937,
-0.6667896509170532,
... |
def to _ dict ( self ) : result = { } for attr, _ in six. iteritems ( self. swagger _ types ) : value = getattr ( self, attr ) if isinstance ( value, list ) : result [ attr ] = list ( map ( lambda x : x. to _ dict ( ) if hasattr ( x, " to _ dict " ) else x, value ) ) elif hasattr ( value, " to _ dict " ) : result [ att... | [
-0.04636624455451965,
-0.08369676768779755,
1.0921118259429932,
-0.8109134435653687,
-0.32844069600105286,
-0.9963669776916504,
0.6825934648513794,
-0.31763651967048645,
0.5109983682632446,
0.2260308563709259,
-0.1017630472779274,
-0.4115528166294098,
0.13518960773944855,
0.652110159397125... |
def test _ boost ( self, * _ ) : status = models. status. objects. create ( content = " test content ", user = self. local _ user ) boost = models. boost. objects. create ( boosted _ status = status, user = self. local _ user ) activity = boost. to _ activity ( ) self. assertequal ( activity [ " actor " ], self. local ... | [
0.7057282328605652,
-0.03366410732269287,
0.32219648361206055,
0.6224759817123413,
0.8232495784759521,
0.55844646692276,
0.24261876940727234,
-0.13018271327018738,
0.650441586971283,
-0.4519015848636627,
-0.6681488156318665,
0.8093804717063904,
-0.2720367908477783,
0.24908927083015442,
0... |
def check _ usage _ quota ( vol _ size _ in _ mb, tenant _ uuid, datastore _ url, privileges ) : if privileges : error _ msg, total _ storage _ used = get _ total _ storage _ used ( tenant _ uuid, datastore _ url ) if error _ msg : # cannot get the total _ storage _ used, to be safe, return false return false usage _ q... | [
-0.6167111992835999,
-0.19783197343349457,
0.7646592855453491,
0.2823246419429779,
0.24178892374038696,
-0.6780781745910645,
-0.6073558330535889,
0.2696267068386078,
-0.08042919635772705,
0.39069700241088867,
0.8160069584846497,
0.172188863158226,
0.3354007303714752,
-0.5357281565666199,
... |
def _ complex _ wrapper ( function ) : def decorator ( * args, * * kwargs ) : inputs = [ ] for real, imag in zip ( args [ : : 2 ], args [ 1 : : 2 ] ) : inputs. append ( tf. complex ( real, imag ) ) result = function ( * inputs, * * kwargs ) return tf. math. real ( result ), tf. math. imag ( result ) return decorator | [
-0.919416069984436,
-0.6296330690383911,
0.2981712520122528,
0.29429367184638977,
-0.2332407683134079,
-0.29260316491127014,
0.7099621891975403,
-0.13235242664813995,
-0.5947230458259583,
-0.0317496582865715,
0.03966232016682625,
-0.4609017074108124,
0.7009724974632263,
-0.539578914642334,... |
def _ build _ model ( self, params, num _ steps, is _ training ) : record _ files _ placeholder = tf. placeholder ( tf. string, ( ) ) input _ fn, _, _ = \ data _ preprocessing. make _ input _ fn ( ncf _ dataset = self. _ ncf _ dataset, is _ training = is _ training, record _ files = record _ files _ placeholder ) datas... | [
-0.6173098087310791,
0.6814082860946655,
0.49634864926338196,
0.7068613767623901,
0.4748893678188324,
-0.02601417899131775,
0.6367753148078918,
0.7267771363258362,
-0.327718585729599,
0.5544076561927795,
0.5382786989212036,
0.42037153244018555,
0.32517388463020325,
-0.1515098363161087,
-... |
def output _ to _ html ( output, payload _ data ) : output = output. replace ('[ 0m ','< / span >') output = output. replace ('[ 32m ','< span style = " color : green ; " >') output = output. replace ('[ 31m ','< span style = " color : red ; " >') output = output. replace ('[ 33m ','< span style = " color : yellow ; " ... | [
0.2251061201095581,
0.05134553462266922,
0.7037444114685059,
-0.9257875680923462,
-1.4817332029342651,
0.014151851646602154,
-0.5512728691101074,
-0.2542174458503723,
-0.6670997738838196,
0.8035708665847778,
1.0257197618484497,
0.2366965413093567,
0.7327461242675781,
0.4492986798286438,
... |
def size ( self, value ) : if isinstance ( value, int ) : self. _ _ size = value else : raise typeerror ( " size must be an integer " ) if value > = 0 : self. _ _ size = value else : raise valueerror ( " size must be > = 0 " ) | [
-0.7467014789581299,
0.4139765202999115,
0.6570128202438354,
-0.0029101301915943623,
-0.39617177844047546,
1.3397376537322998,
0.7198169827461243,
-0.45283183455467224,
0.08007191866636276,
-0.18283672630786896,
0.42089688777923584,
-0.6154962182044983,
-0.6136104464530945,
0.9851998686790... |
def savehomo ( name, homo ) : # set path path ='config /'+ name + '. json'# dump json - file with open ( path,'wb') as fp : json. dump ( { " homo " : homo. tolist ( ) }, fp ) | [
-0.793631374835968,
-0.5996082425117493,
0.572160005569458,
0.044020138680934906,
0.12953945994377136,
0.6566399335861206,
-0.2816466689109802,
0.13871945440769196,
-0.5786503553390503,
0.8801236152648926,
-2.52559494972229,
0.014893526211380959,
-0.16470225155353546,
0.23834648728370667,
... |
def authenticate ( self, username = none, password = none ) : # do the import inside a method so we can'return'none on error try : import pyrad. packet from pyrad. client import client, timeout from pyrad. dictionary import dictionary except importerror, e : logging. error ( " radius couldn't import pyrad, need to inst... | [
-0.3964005410671234,
-0.4221307039260864,
0.910616397857666,
-0.33982864022254944,
-0.6052656173706055,
-0.2914232313632965,
-0.11138923466205597,
-0.6469863057136536,
0.36870232224464417,
0.1388871967792511,
-0.014821142889559269,
0.7106375694274902,
-1.4427849054336548,
0.220740512013435... |
def create _ expanded _ matrix ( self ) - > none : if self. order > 1 : idx _ gen = product ( range ( self. _ n _ dimensions ), repeat = self. order ) idx = [ i for i in idx _ gen ] self. expanded _ matrix = np. zeros ( ( len ( idx ), len ( idx ) ) ) for i, row in enumerate ( idx ) : for j, col in enumerate ( idx ) : i... | [
-0.34820398688316345,
0.6371089816093445,
0.696424663066864,
0.6903705596923828,
0.04297882318496704,
-0.543372392654419,
0.40338313579559326,
-0.2686113715171814,
0.6047216653823853,
-0.24450741708278656,
0.3328763544559479,
0.29447537660598755,
-0.0558108314871788,
0.4048635959625244,
... |
def test _ defaults ( self ) - > none : self. asserttrue ( self. nlp. vocab. lookups. has _ table ( " phonemes " ) ) self. asserttrue ( doc. has _ extension ( " phonemes " ) ) self. asserttrue ( span. has _ extension ( " phonemes " ) ) self. asserttrue ( token. has _ extension ( " phonemes " ) ) self. asserttrue ( toke... | [
0.5057138204574585,
1.2801896333694458,
0.3803821802139282,
0.40787801146507263,
1.135759949684143,
0.5733847618103027,
-1.0943397283554077,
-0.3565242290496826,
0.4263021945953369,
-0.8080328106880188,
-1.045518159866333,
-1.3940424919128418,
0.11829905211925507,
0.6471384763717651,
-0.... |
def _ filter _ arguments ( commands : list [ str ] ) - > list [ str ] : return list ( filter ( lambda arg : not arg. startswith ( " - " ), commands ) ) | [
-0.04326589033007622,
0.13965676724910736,
0.5500768423080444,
0.2029682844877243,
-0.06340630352497101,
0.3448677062988281,
-0.6066836714744568,
0.17049556970596313,
-0.48381903767585754,
0.7283799648284912,
0.06479814648628235,
0.9935755729675293,
-0.2795209586620331,
0.8800735473632812,... |
def getcollectedfilewriterforpath ( datapath ) : return getbyscheme ( datapath, schemas _ to _ collectedfilewriters, localfscollectedfilewriter ) | [
0.35776612162590027,
-0.998397171497345,
-0.011231102980673313,
-0.5303661823272705,
0.7334387302398682,
-0.7516509890556335,
1.0562663078308105,
-0.21123260259628296,
-0.22931571304798126,
-0.9074915647506714,
0.17971564829349518,
-0.3908560872077942,
0.6993833184242249,
0.343707293272018... |
def get _ batch _ generator ( self, current _ file : protocolfile ) - > resegmentationgenerator : resolution = self. architecture. get _ resolution ( self. task, * * self. architecture _ params ) alignment = self. architecture. get _ alignment ( self. task, * * self. architecture _ params ) return resegmentationgenerat... | [
-0.2400629073381424,
-0.06194804608821869,
0.5274823904037476,
0.42233505845069885,
0.5706682205200195,
0.3420860171318054,
0.3496224284172058,
0.508715808391571,
-1.1493116617202759,
-0.5063374638557434,
-0.22431857883930206,
-0.30473998188972473,
-0.8851734399795532,
0.45830780267715454,... |
def low _ degree ( g, threshold ) : if eligible is none : return [ n for n, d in g. degree ( ) if d < threshold ] return [ n for n, d in g. degree ( ) if d < threshold and g. nodes [ n ] [ eligible ] ] | [
0.4231666326522827,
-0.0008276564185507596,
0.33927246928215027,
-0.07949136942625046,
-0.6171526908874512,
-0.06412489712238312,
-0.5490289926528931,
0.523800790309906,
0.5208327770233154,
-0.013828891329467297,
-0.16567714512348175,
1.0400172472000122,
0.21272146701812744,
-0.08485989272... |
def check _ keyword _ format ( key, value ) : if type ( value )! = list : emsg ='key { 0 } defined in { 1 } is not a list. please check'raise spirouconfig. configerror ( emsg. format ( key, _ _ name _ _ ), level ='error') # value must be a list of length 3 if len ( value )! = 3 : emsg ='key { 0 } defined in { 1 } is no... | [
-0.159190833568573,
-0.32149410247802734,
0.803726077079773,
0.18040649592876434,
-0.9360148310661316,
0.5174596905708313,
-0.7010994553565979,
0.4704549014568329,
-0.04874490201473236,
0.7390220761299133,
-0.07550857216119766,
0.10768289864063263,
-0.5407875776290894,
1.5147347450256348,
... |
def test _ successful _ timeout ( ) : def _ success _ timeout ( in _ dict ) : in _ dict ['num'] + = 1 return in _ dict ['num'] try : _ test _ func = retry. retry ( success = lambda x : x = = 5, timeout = 10, interval = 1 ) ( _ success _ timeout ) _ test _ func ( {'num': 0 } ) except retry. maximumtimeoutexceeded : pyte... | [
0.6256921291351318,
1.0895603895187378,
0.26378002762794495,
0.3803905248641968,
-0.2603496313095093,
0.4050658941268921,
-0.30112263560295105,
0.6489090323448181,
-0.2810457944869995,
0.5308946967124939,
-1.0533877611160278,
-0.20106549561023712,
0.4880465567111969,
-0.4684824049472809,
... |
def isfirst ( self ) : if ( self. storage ). index ( self. storage [ self. currentitem ] ) = = 0 : return true return false | [
-0.5606653094291687,
-0.8830433487892151,
0.5042223334312439,
0.9592145085334778,
0.9054588675498962,
-0.2775609493255615,
-0.26626187562942505,
-0.018979066982865334,
0.3599541485309601,
-0.2802163362503052,
-0.42117032408714294,
0.11404374241828918,
-0.7892592549324036,
0.627222895622253... |
def create _ parser ( ) : # create the parser parser = argparse. argumentparser ( description = " " " solve the 2d - version of the knapsack problem using dynamic programming values and weights are read from a single file which contains an item per line with the following information ( weight, value ). the file is prec... | [
0.3818610608577728,
-1.1521615982055664,
0.8958874344825745,
-0.29373493790626526,
-0.31694257259368896,
0.6531131863594055,
-0.5393314957618713,
0.2238672971725464,
-0.6290788054466248,
-0.22430077195167542,
0.43687060475349426,
-0.22371840476989746,
-0.1717715710401535,
0.478347450494766... |
async def dispatch _ async ( self, event : union [ str, callable ], payload : dict = { } ) - > none : # get dispatcher method for this event dispatch _ method, params = self. _ get _ dispatcher ( event, payload, is _ async = true ) # dispatch this event await dispatch _ method ( * params ) | [
-0.11522471159696579,
0.5681098103523254,
0.5152981281280518,
0.8384497761726379,
0.15040220320224762,
-0.7051882743835449,
-0.632119357585907,
0.16594204306602478,
0.1401853859424591,
0.0875539630651474,
-0.3546361029148102,
0.1698870062828064,
1.0927788019180298,
0.7224841117858887,
0.... |
def test _ calculate _ mil _ hdbk _ 217f _ part _ count _ missing _ environment ( ) : attributes ['hazard _ rate _ method _ id'] = 1 attributes ['application _ id'] = 1 attributes ['environment _ active _ id'] = 100 _ attributes, _ msg = lamp. calculate _ 217f _ part _ count ( * * attributes ) assert isinstance ( _ att... | [
0.7245325446128845,
-0.20735111832618713,
0.553076982498169,
0.1647050827741623,
1.0771218538284302,
0.4048714339733124,
0.27218717336654663,
-0.5034583806991577,
-0.7602481842041016,
0.14372991025447845,
-0.21087785065174103,
-0.7761809825897217,
-0.16870005428791046,
0.7479199171066284,
... |
def cumulative _ normal ( x, mi, sigma ) : return 0. 5 * ( 1 + erf ( ( x - mi ) / ( sigma * sqrt ( 2 ) ) ) ) | [
1.6436227560043335,
-0.48481783270835876,
0.3917093575000763,
1.2793786525726318,
-2.178750991821289,
0.2809755206108093,
-0.12283988296985626,
0.4597645401954651,
-0.14775249361991882,
0.857761025428772,
0.37996840476989746,
0.8644755482673645,
-0.639832615852356,
-1.0024656057357788,
-... |
def test _ can _ delete _ car ( self ) : api _ call ( self, " post ", " / driver / create ", dict ( first _ name = " alan ", last _ name = " turing ", dob = " 23 / 06 / 1962 " ), 200 ) api _ call ( self, " post ",'/ car / create ', dict ( make = " tesla ", model = " model 3 ", year = 2015, assigned _ type = 1, assigned... | [
-0.6499765515327454,
-0.251192182302475,
0.6580502986907959,
0.12934033572673798,
1.080143690109253,
0.28986215591430664,
-0.33260878920555115,
0.18325136601924896,
-0.7774956226348877,
-0.1853983998298645,
-0.3220359981060028,
0.5587000846862793,
-0.06437434256076813,
0.7130435109138489,
... |
def close _ menu ( ) : m = gd. gui. menu. item ('postproc') if m : m. remove ( ) gd. gui. statusbar. removewidget ( gd. gui. postbutton ) | [
0.6925735473632812,
0.12330783903598785,
0.30708643794059753,
0.36803004145622253,
-0.6520423293113708,
1.4192864894866943,
-0.04491715133190155,
0.6610248684883118,
-0.7547471523284912,
-0.3838428258895874,
-0.020695902407169342,
-0.8972185254096985,
-1.926499366760254,
1.6349952220916748... |
def pick _ pool ( pool ) : task = [ ] for idx in range ( len ( pool ) ) : if len ( pool [ idx ] ) > 0 : task. append ( pool [ idx ]. pop ( ) ) return task | [
-0.43390411138534546,
-0.8212885856628418,
0.5574945211410522,
0.5032463073730469,
-0.11888126283884048,
0.08239198476076126,
0.8283158540725708,
-0.1711122989654541,
0.7189192771911621,
1.302170991897583,
-1.2457696199417114,
0.2767126262187958,
-0.5289182662963867,
-0.10763069987297058,
... |
def get _ queues _ consumer _ count ( ) : from app import app with app. app _ context ( ) : secret ='{ } : { } '. format ( current _ app. config ['rabbit _ mq _ username'], current _ app. config ['rabbit _ mq _ password'] ) endpoint = rabbitmq _ consumers _ report _ api. format ( rabbitmq _ host = current _ app. config... | [
0.321423202753067,
-0.9826576709747314,
0.7085431814193726,
0.13356547057628632,
0.41740846633911133,
-1.2592921257019043,
-1.1707382202148438,
-0.18993230164051056,
-0.8063858151435852,
0.9009266495704651,
-1.2383921146392822,
0.9712087512016296,
0.21851497888565063,
0.522582471370697,
... |
def plot _ galaxy _ int _ prop _ vs _ prop _ over _ time ( x _ props, y _ props, snaps, labels = none, x _ criteria ='all ', y _ criteria ='all ', foutname ='prop _ vs _ prop _ over _ time. png ', style ='color - line ', include _ obs = true, connect _ points = true, axes _ args = none ) : snaps = np. array ( snaps ) #... | [
-0.03246080130338669,
0.4640064239501953,
1.0972824096679688,
-0.03719276189804077,
-0.17187413573265076,
0.6901270747184753,
0.23028801381587982,
-0.5773208141326904,
-0.29719021916389465,
-0.06048883497714996,
1.1030107736587524,
0.6297887563705444,
0.6115930676460266,
0.1002086624503135... |
def values ( self ) : # - > tuple [ unknown,... ] | tuple [ any,... ] :... | [
-1.4826768636703491,
0.7571081519126892,
0.5993728637695312,
0.41069844365119934,
1.0881028175354004,
0.546701192855835,
-0.4120526909828186,
0.24341538548469543,
-1.0741589069366455,
-0.5733234286308289,
-1.0117897987365723,
-0.31696510314941406,
0.021964924409985542,
0.38799044489860535,... |
def updateip ( self ) : self. log. info ( " old ip address : % s ", self. bridge _ ip ) # todo this method is deprecated. upgrade! response = requests. get ( " https : / / discovery. meethue. com " ) # get a list of all hue - bridges on the network response = json. loads ( response. text ) self. log. info ( " found % s... | [
-0.6490164995193481,
-0.753221333026886,
0.5092052817344666,
0.42398709058761597,
0.3158409893512726,
0.37604838609695435,
-0.15978048741817474,
0.5795692205429077,
0.7287693023681641,
-0.0893392488360405,
0.01709703914821148,
-0.15491004288196564,
-0.33811649680137634,
0.2709057629108429,... |
def timestr _ 2 _ timedeltas ( t _ strs ) : if isinstance ( t _ strs, list ) : return [ timestr _ 2 _ timedelta ( t _ str ) for t _ str in t _ strs ] else : return [ timestr _ 2 _ timedelta ( t _ strs ) ] | [
-0.9285789132118225,
-0.894274115562439,
0.2604299783706665,
0.30309993028640747,
0.47827452421188354,
0.30911117792129517,
-0.4728879928588867,
0.21350997686386108,
-0.05984983965754509,
0.29856985807418823,
-0.3560389578342438,
0.31241700053215027,
0.08678978681564331,
1.1097815036773682... |
def displaymenu ( self ) : print ( " \ n " ) print ( self. color ) for num, func in enumerate ( self. menuoptions. values ( ), 1 ) : name = " ". join ( [ " " + i if i. isupper ( ) else i for i in func. _ _ name _ _ ] ) print ( f'{ num } : { name. title ( ) }') print ( " \ n " ) | [
-0.5991978645324707,
-0.38829925656318665,
0.7644377946853638,
-0.21897348761558533,
0.2636265456676483,
0.17624671757221222,
0.24748103320598602,
-0.21995769441127777,
-0.42306554317474365,
-0.234024316072464,
-0.029897578060626984,
0.9603697061538696,
-0.08527584373950958,
1.123427510261... |
def _ is _ reference ( explanation ) : eval _ y _ reference = isinstance ( explanation. _ eval _ y _ predicted, str ) eval _ y _ proba _ reference = isinstance ( explanation. _ eval _ y _ predicted _ proba, str ) eval _ data _ reference = isinstance ( explanation. eval _ data, str ) init _ data _ reference = isinstance... | [
-0.7036828398704529,
-0.20917469263076782,
0.7986170649528503,
-0.2328038066625595,
-0.14182975888252258,
0.11698248237371445,
0.7425392866134644,
0.12668673694133759,
0.473917692899704,
0.5729118585586548,
0.9835324883460999,
1.1474297046661377,
-0.2803690433502197,
0.9579306244850159,
... |
def _ _ return _ letter ( self, letter ) : dict _ morse = self. get _ code _ dict ( ) res ='' try : keys = list ( dict _ morse. keys ( ) ) values = list ( dict _ morse. values ( ) ) res = keys [ values. index ( letter ) ] except exception as e : return letter, false return res, true | [
-1.3032783269882202,
-0.3045274317264557,
0.5216165781021118,
-0.1892908811569214,
-0.3309188187122345,
-0.5060095191001892,
0.03829421103000641,
0.3568515479564667,
0.2195810228586197,
0.7633097767829895,
-0.29430103302001953,
-0.392235666513443,
-0.6332607269287109,
0.042496636509895325,... |
def create _ matrix _ from _ bed ( interactions ) : n = len ( interactions ) matr = np. zeros ( ( n, n ) ) return matr | [
-0.7679761648178101,
-0.7046593427658081,
0.06268593668937683,
0.3571595847606659,
1.207326889038086,
0.6265383958816528,
0.1233673244714737,
-0.695909857749939,
0.7505179047584534,
-0.8826300501823425,
0.08015253394842148,
-0.1587585210800171,
-0.5063188672065735,
0.3645787537097931,
0.... |
def _ get _ core _ and _ processing _ field ( length, level, max _ cores ) : processing _ field = 2 * * ( level + 1 ) core _ number = int ( length / processing _ field ) if core _ number > max _ cores : core _ number = max _ cores processing _ field = int ( length / core _ number ) return core _ number, processing _ fi... | [
-0.8849308490753174,
0.3728588819503784,
0.6431204676628113,
-1.0665980577468872,
-0.4345124661922455,
-0.2802199125289917,
0.26871129870414734,
0.7972667217254639,
-0.19002413749694824,
0.5494946241378784,
-0.683203399181366,
0.47547733783721924,
-0.9391268491744995,
0.12300723046064377,
... |
def setup ( self ) : for attribute, ( _, configvar, type ) in self. _ options. items ( ) : if not configvar : continue if getattr ( self, attribute ) is none : # no value specified for this filter instance, # specifically attempt to load it from the environment. setattr ( self, attribute, self. get _ config ( setting =... | [
-0.8410999178886414,
-0.42341896891593933,
0.3562184274196625,
-0.36153849959373474,
0.9634803533554077,
-0.46949923038482666,
0.675385594367981,
-0.2713557183742523,
-0.2670229971408844,
0.6045683026313782,
0.16829784214496613,
0.37123215198516846,
-0.031004460528492928,
1.683836460113525... |
def persist _ changes ( self, processed _ changes ) : | [
-0.7575907111167908,
-0.7201285362243652,
0.20565833151340485,
-0.3810617923736572,
1.0561777353286743,
0.6965561509132385,
0.28748443722724915,
-0.057203810662031174,
0.2551737129688263,
-0.030335748568177223,
-0.7924264073371887,
0.04055248573422432,
-0.26567021012306213,
0.4562424719333... |
def send _ error ( self, code, message = none, explain = none ) : try : shortmsg, longmsg = self. responses [ code ] except keyerror : shortmsg, longmsg = '??? ', '???'if message is none : message = shortmsg if explain is none : explain = longmsg self. log _ error ( " code % d, message % s ", code, message ) self. send... | [
-0.870467483997345,
0.25090160965919495,
0.8143846392631531,
-0.24545049667358398,
0.1387295126914978,
-0.45482397079467773,
0.16804955899715424,
-0.627033531665802,
0.46109893918037415,
-0.16579023003578186,
0.029698625206947327,
0.16910822689533234,
-0.18656790256500244,
0.55837732553482... |
def get _ assignments ( self ) : return assignment. objects. filter ( class _ key _ id = self. id ). all ( ) | [
-0.9919573664665222,
-0.5832205414772034,
0.6036123633384705,
1.0629727840423584,
0.2865694761276245,
-0.2525874376296997,
-0.2607679069042206,
-0.22105741500854492,
-0.5567537546157837,
0.914776086807251,
0.43233969807624817,
0.012150459922850132,
-0.04666217416524887,
0.7668158411979675,... |
def show _ measurements _ in _ template ( self, template _ name : str, pattern : str = " " ) : request = tsquerytemplatereq ( self. _ _ session _ id, template _ name, templatequerytype. show _ measurements. value, pattern, ) response = self. _ _ client. queryschematemplate ( request ) logger. debug ( " show measurement... | [
-0.5307968258857727,
0.7377250790596008,
0.5984894633293152,
-0.9321998953819275,
-0.6133291721343994,
-0.1013450026512146,
0.06431072950363159,
-0.10798383504152298,
0.315666139125824,
0.8024248480796814,
0.16353347897529602,
-0.23671241104602814,
-0.5106512308120728,
0.5832068920135498,
... |
def lookuprowid ( self, label ) : root = self. root rowid = root. lookuprowid ( label ) if rowid! = - 1 : return rowid return - 1 | [
-0.2520318329334259,
0.2544679045677185,
0.7161233425140381,
0.6404791474342346,
-0.11676280945539474,
0.008743058890104294,
0.09189917147159576,
0.2935431897640228,
0.8578007221221924,
0.34918662905693054,
0.9451512694358826,
0.07742190361022949,
-0.7198299765586853,
1.1143572330474854,
... |
def _ calculate ( self ) : rospy. loginfo ('calculating freespace') self. is _ searching _ unknown _ space = true service _ response = none if not self. map _ complete : # search for undiscoverd space by lidar service _ response = self. find _ unknown _ service ( self. blowupcellnum, self. pose _ converted. x, self. po... | [
-0.11053143441677094,
-0.28090572357177734,
0.5609312057495117,
0.011162439361214638,
-0.3721635043621063,
-0.11369901150465012,
0.5709112286567688,
-0.2485019415616989,
0.7369773983955383,
0.1096988096833229,
-0.11556097865104675,
-0.08384691923856735,
-0.408821165561676,
1.10305929183959... |
def _ _ init _ _ ( self, trn : str = none, dev : str = none, tst : str = none, sampler _ builder : samplerbuilder = none, dependencies : str = none, scalar _ mix : scalarmixwithdropoutbuilder = none, use _ raw _ hidden _ states = false, lr = 2e - 3, separate _ optimizer = false, punct = false, tree = true, pad _ rel = ... | [
1.0284144878387451,
0.1954127699136734,
0.5776078701019287,
0.3861967623233795,
-0.23574413359165192,
-0.6758554577827454,
-0.16972917318344116,
0.008332456462085247,
0.7787690758705139,
0.014789777807891369,
-0.775645911693573,
0.3924853801727295,
0.2719959616661072,
0.47103410959243774,
... |
def worker _ socket ( self, settings, context, poller ) : worker = context. socket ( zmq. dealer ) identity = u'% 04x - % 04x'% ( randint ( 0, 0x10000 ), randint ( 0, 0x10000 ) ) worker. setsockopt _ string ( zmq. identity, identity ) poller. register ( worker, zmq. pollin ) worker. connect ('tcp : / / % s : % d'% ( se... | [
-0.9710623025894165,
0.08566304296255112,
0.7783256769180298,
-0.5513387322425842,
-0.2207280695438385,
-0.09964828193187714,
-0.20996978878974915,
-0.5985651612281799,
0.42585957050323486,
-0.2999468445777893,
-0.40237176418304443,
0.20084287226200104,
-0.8273081183433533,
0.0332468785345... |
def gettimeperiod ( self ) : return self. time _ period | [
0.0349416583776474,
-0.4196015000343323,
0.5083479881286621,
-0.2708663046360016,
0.07069961726665497,
0.8487281799316406,
0.01248219609260559,
-0.5850098133087158,
0.5724136829376221,
0.8671627640724182,
0.061779409646987915,
0.0528704933822155,
-0.9545139670372009,
-0.43525806069374084,
... |
def plot _ scatter ( x, y, z = np. array ( [ i for i in range ( 100 ) ] ), nombre ='sigmoide 3d') : fig = plt. figure ( figsize = ( 10, 10 ) ) ax = fig. add _ subplot ( 111, projection ='3d') ax. scatter ( x, y, z ) ax. set _ title ( f " { nombre } " ) ax. set _ xlabel ('x label') ax. set _ ylabel ('y label') ax. set _... | [
0.6132728457450867,
0.7373560667037964,
0.8056426644325256,
-0.17414674162864685,
-0.5039675235748291,
1.1975096464157104,
-0.7737837433815002,
0.6515911817550659,
0.17831283807754517,
0.5665809512138367,
0.11409467458724976,
1.1972657442092896,
-0.18929529190063477,
-1.0702725648880005,
... |
def target _ callback ( self ) : try : self. target _ current = float ( self. target _ current _ entry. get ( ) ) except : self. target _ current _ entry. delete ( 0, end ) self. target _ current _ entry. insert ( 0,'0') self. target _ current = 0 if self. target _ current > 5 : self. target _ current = 5 self. target ... | [
-0.5087215304374695,
-0.7794814109802246,
0.4815017580986023,
-0.8061909079551697,
0.6927995681762695,
-0.06924935430288315,
1.1463055610656738,
0.28514236211776733,
-0.2816782295703888,
1.1331506967544556,
0.905418872833252,
0.6338028311729431,
-0.4139654338359833,
0.31859198212623596,
... |
def bold ( text ) : return wrap _ html ( text, " b " ) | [
0.311318576335907,
0.0001672225771471858,
0.28481993079185486,
1.525080680847168,
0.43745848536491394,
0.4733160734176636,
-0.9146329760551453,
-0.0608576238155365,
0.5520343780517578,
-0.48878759145736694,
0.4445691406726837,
0.7757076025009155,
0.20664720237255096,
0.3530898988246918,
... |
def test _ invalid _ sensor _ config ( ) - > none : with pytest. raises ( vol. invalid ) : # no subs vultr. platform _ schema ( { conf _ platform : base _ vultr. domain } ) | [
1.1090031862258911,
0.6748732328414917,
0.05308046191930771,
0.5206592082977295,
0.2884967625141144,
0.9029244184494019,
-0.2577388882637024,
0.347587913274765,
-0.313477098941803,
-0.7553791999816895,
-0.07762932032346725,
-0.09322237968444824,
-0.11612677574157715,
0.9581292271614075,
... |
def get _ device _ from _ user ( expected _ class, dft = none ) : dft = print _ dev _ from _ class ( expected _ class, dft ) prompt = " % s name from the list " % expected _ class if not dft is none : prompt + = " [ % s ] " % dft prompt + = "? " from _ user = raw _ input ( prompt ). strip ( ) or dft name ='' try : full... | [
-0.6783767342567444,
0.6162691712379456,
0.6175518035888672,
1.2980560064315796,
-0.6940001845359802,
0.4069991707801819,
0.58660888671875,
-0.3058212399482727,
0.3637625277042389,
-0.31245771050453186,
0.21354372799396515,
-0.28780171275138855,
0.5456807017326355,
0.5321325063705444,
1.... |
def _ download _ pom ( self, mavenlib ) : return self. _ maven _ pom _ downloader. download _ pom _ file ( mavenlib ) | [
-0.6329470276832581,
-0.7103037238121033,
0.3816111981868744,
0.5510733723640442,
-0.6198635101318359,
-0.43786901235580444,
-0.6089689135551453,
0.13804543018341064,
-0.07492079585790634,
-0.29075053334236145,
-0.4675861597061157,
-1.0879091024398804,
-1.0218170881271362,
0.05192292854189... |
def _ identify _ oauth ( self, request ) : params = parse _ authz _ header ( request, none ) if params is none : return none if params. get ( " scheme " )! = " oauth " : return none # check that various parameters are as expected. if params. get ( " oauth _ signature _ method " )! = " hmac - sha1 " : msg = " unsupporte... | [
-0.7470526695251465,
-0.17386433482170105,
0.8696759939193726,
1.262913703918457,
0.2993706166744232,
-0.9637507200241089,
0.2514992952346802,
-0.47007620334625244,
0.901199996471405,
0.9348957538604736,
1.1800282001495361,
0.12159784138202667,
-0.2703012526035309,
0.6928524374961853,
0.... |
def print _ and _ get _ user _ choice ( elevator, max _ floor ) : while true : # this loop will continue till user enters value between 1 to 4 print ( f " enter your choice. \ n1. enter a few elevator requests " f " and run the elevator simulation " f ". \ n2. set current elevator floor. " f " for the first time run, "... | [
0.12201656401157379,
0.23546063899993896,
0.7243101000785828,
1.441923975944519,
0.1397945135831833,
0.6428566575050354,
0.5910770297050476,
-0.7758089900016785,
-0.324487566947937,
-0.558603823184967,
0.30902257561683655,
0.19932709634304047,
-0.4377210736274719,
0.2459111213684082,
1.6... |
def old _ tsv _ to _ numpy ( tsv _ path ) : # instantiate arrays to hold values : s _ loglkhd = [ ] l _ loglkhd = [ ] a _ loglkhd = [ ] p _ loglkhd = [ ] t _ loglkhd = [ ] # loop over tsv file and append data to arrays : str2int = {'start': 0,'leader': 1,'adapter': 2,'polya': 3,'transcript': 5 } with open ( tsv _ path,... | [
0.6898906230926514,
-1.4019064903259277,
0.8280364871025085,
-1.5390715599060059,
-0.44874775409698486,
-0.10995236784219742,
-0.9280785918235779,
0.2152484655380249,
-0.3790597915649414,
0.9075754284858704,
-0.7778962850570679,
0.9526125192642212,
0.5169527530670166,
0.40206724405288696,
... |
def get _ subpanels ( self ) : return self. subpanels | [
0.4133172333240509,
-0.038219623267650604,
0.6201316714286804,
0.041199859231710434,
-0.7030868530273438,
0.7759271860122681,
-0.48679524660110474,
-1.1815247535705566,
0.46383923292160034,
-0.806987464427948,
-1.3062093257904053,
0.9736918807029724,
-1.0532357692718506,
-0.443155199289321... |
def _ _ len _ _ ( self ) : return len ( self. _ df ) | [
-0.2271432876586914,
0.1888498067855835,
0.22788704931735992,
-1.077620029449463,
0.5832412242889404,
-0.3702177107334137,
0.35379672050476074,
0.843292236328125,
0.008817972615361214,
-1.458174467086792,
-0.6848178505897522,
-0.12867245078086853,
0.8122119307518005,
-0.9343085885047913,
... |
def fmin ( self ) : if self. _ fmin is not none : return self. _ fmin elif self. _ interval is not none : return self. interval. min ( ) | [
-0.6373867988586426,
-1.0384602546691895,
0.5520201921463013,
0.32266920804977417,
0.001731575932353735,
0.32005220651626587,
-0.39604637026786804,
-0.7451556921005249,
0.7532000541687012,
-1.4994248151779175,
1.2344752550125122,
0.012012705206871033,
-1.251027226448059,
0.8498996496200562... |
def current ( ) : return generate ( curr ( ) ) | [
-1.3327617645263672,
-0.9713683724403381,
0.4398750960826874,
-0.21653908491134644,
-0.7003659605979919,
0.6939722299575806,
0.7035722136497498,
0.07047279924154282,
-1.2230784893035889,
-1.1734899282455444,
1.0622626543045044,
0.5215381383895874,
-0.3475704789161682,
-0.5146790742874146,
... |
def button ( x, y, w, h, text, font, fill = 255, outline = 50, text _ fill = 0 ) : # todo : fix it img = image. new ('l ', ( w + 1, h + 1 ), color = white ) rect = imagedraw. draw ( img,'l') rect. rectangle ( [ ( 0, 0 ), ( w, h ) ], fill = fill, outline = outline ) btn = add _ text ( img, text, font, xposition = " cent... | [
0.015109752304852009,
-0.4290228486061096,
0.6921961307525635,
-0.8342339396476746,
-0.7464243173599243,
0.43269461393356323,
-0.8559104204177856,
-0.22190028429031372,
0.7011183500289917,
-0.1688830554485321,
-0.47147664427757263,
0.09799889475107193,
0.08806685358285904,
-0.1097700670361... |
def _ is _ special _ name ( name ) : return name. startswith ( " _ _ " ) and name. endswith ( " _ _ " ) | [
-0.5368323922157288,
-0.06771437078714371,
0.7347297668457031,
0.10688107460737228,
-0.9787411689758301,
-0.17425090074539185,
-0.9282197952270508,
-0.13889990746974945,
0.7181566953659058,
0.37094780802726746,
-1.3179117441177368,
0.17106413841247559,
0.5012834668159485,
0.325828552246093... |
def _ 3 _ only _ match _ objects ( self, z _ sup, z _ sup _ std = none, obj _ appearances = none ) : # scale to 0, 1 to match appearance information which is already in 0, 1 z = ( z _ sup + 1 ) / 2 m _ idx = [ 2, 3 ] if obj _ appearances is not none : z = torch. cat ( [ z, obj _ appearances ], - 1 ) if self. c. debug _... | [
-0.33357635140419006,
-0.7513059377670288,
0.7213772535324097,
0.23741935193538666,
-0.2496826946735382,
0.23987409472465515,
1.5441278219223022,
-0.009560524486005306,
-0.002375213196501136,
-0.09536723792552948,
-0.6351526975631714,
0.6022801995277405,
0.12219367921352386,
-0.34595671296... |
def displaystrings ( self ) : counts = { } strings = [ ] for item in self : string = item. displaystring ( ) if string in counts : counts [ string ] + = 1 else : counts [ string ] = 1 for string in counts : strings. append ( str ( counts [ string ] ) + " × " + string ) return strings | [
-0.14378957450389862,
-0.6805657744407654,
0.6935732960700989,
-0.7186346650123596,
-0.5298749804496765,
0.08273794502019882,
0.36014774441719055,
-0.06497249752283096,
0.3040351867675781,
0.8557537794113159,
0.6652857065200806,
-0.2719360291957855,
0.49176427721977234,
0.2847735583782196,... |
def _ build _ eval _ specific _ graph ( self, iterator, model _ fn, params, record _ files _ placeholder, num _ eval _ steps ) : def build ( ) : features = iterator. get _ next ( ) estimator _ spec = model _ fn ( features, none, tf. estimator. modekeys. eval, params ) run _ model _ op = tf. group ( * ( update _ op for ... | [
-0.4031970500946045,
-0.027175940573215485,
0.622873067855835,
0.2514980137348175,
-0.2776373028755188,
-0.04566159099340439,
0.8116263151168823,
0.4636459946632385,
-0.9767609238624573,
1.0020228624343872,
0.1426139920949936,
0.1897575408220291,
0.580151379108429,
-0.4383246600627899,
0... |
def _ pressed ( self, evt ) : x, y, widget = evt. x, evt. y, evt. widget item = widget. identify _ row ( y ) column = widget. identify _ column ( x ) if not column or not item in self. _ items : # clicked in the weekdays row or just outside the columns return item _ values = widget. item ( item ) ['values'] if not len ... | [
-0.446040540933609,
0.011499688029289246,
0.6318684220314026,
-0.9232473969459534,
0.0021964514162391424,
-0.31254735589027405,
0.43221789598464966,
0.047293346375226974,
0.9694839715957642,
0.19143493473529816,
-0.04874254763126373,
-0.4345838129520416,
0.5146588683128357,
-0.347622126340... |
def filter _ getdataaveragingmode ( ) : andor _ solis. filter _ getdataaveragingmode. restype = ctypes. c _ uint mode = ctypes. c _ int ( ) result = andor _ solis. filter _ getdataaveragingmode ( ctypes. byref ( mode ) ) check _ status ( result ) return int ( mode. value ) | [
-0.7964375615119934,
0.49201127886772156,
0.6058814525604248,
-0.7214878797531128,
-0.7078486084938049,
0.3575562536716461,
0.6551747918128967,
-0.2676165699958801,
-0.17455460131168365,
0.09270019829273224,
-0.08201399445533752,
1.1186901330947876,
0.3178858458995819,
-0.03944128006696701... |
def is _ armed ( self, location _ name = false ) : alarm _ code = self. get _ armed _ status ( location _ name ) if alarm _ code = = 10201 or alarm _ code = = 10203 : return true else : return false | [
0.030563125386834145,
-1.0137630701065063,
0.5019069910049438,
0.9786086678504944,
0.3628329634666443,
0.3308359682559967,
-1.0008389949798584,
1.168269157409668,
0.5108383297920227,
0.9373576045036316,
-0.5743150115013123,
0.6355040073394775,
-0.268867164850235,
0.14102162420749664,
-0.... |
def getscores ( self ) : # random. seed ( 0 ) # thedict = { } # for i in range ( 100 ) : # thedict [ getrandomint ( 1, 10000 ) ] = getrandomfloat ( 1. 5, 3. 0 ) # return thedict # we return a fake score if we don't use proxies : if not self. useproxies : return { " 0. 0. 0. 0 " : 0. 0 } # first we reset all scores of b... | [
-0.5205944180488586,
-0.007930072955787182,
0.9581852555274963,
0.06538013368844986,
0.27055439352989197,
-0.4191473722457886,
0.2588576078414917,
-0.20626844465732574,
0.32008466124534607,
1.4251989126205444,
-0.20222482085227966,
-0.2872132658958435,
-0.8133566975593567,
1.19534492492675... |
def get _ user ( self ) : return user. get _ user _ by _ username ( self. user ) | [
-0.24337472021579742,
-0.1502528190612793,
0.02764672040939331,
0.909909725189209,
0.48288679122924805,
0.15275874733924866,
0.4778849184513092,
-0.3656872808933258,
-0.654437243938446,
-1.0322476625442505,
-0.20361894369125366,
0.3556338846683502,
-0.18821044266223907,
-0.600463330745697,... |
def ipv6 _ cidr _ block ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " ipv6 _ cidr _ block " ) | [
0.9876741170883179,
-0.008513727225363255,
0.39151716232299805,
0.7516403198242188,
0.4071163535118103,
0.989496111869812,
0.17230533063411713,
-0.2678326368331909,
0.79204922914505,
0.36080247163772583,
-0.3589760661125183,
0.044384509325027466,
-0.2919025719165802,
-1.8055528402328491,
... |
def merge _ experiment _ json ( start _ json, more _ json ) : return _ json = dict ( start _ json ) if more _ json is none : return return _ json def _ recurse _ item ( item _ old, item _ new ) : " " " internal function to merge _ experiment _ json ( ) function " " " # use item types to decide what to do if not isinsta... | [
-0.900852620601654,
-0.975488007068634,
0.9082081317901611,
-0.026314999908208847,
-0.8924532532691956,
-0.5534934997558594,
-0.0974242240190506,
0.0790560320019722,
0.03825726360082626,
0.1950664073228836,
-0.7405732274055481,
0.4895511865615845,
-0.5505905151367188,
0.28290271759033203,
... |
def expand ( self, str, stripdot = true ) : # macros ='slodipvh'end = 0 result ='' for i in re _ char. finditer ( str ) : result + = str [ end : i. start ( ) ] macro = str [ i. start ( ) : i. end ( ) ] if macro = ='% %': result + ='%'elif macro = ='% _': result + ='' elif macro = ='% -': result + ='% 20'else : letter =... | [
-0.30109596252441406,
0.2688733637332916,
0.9160764217376709,
-0.06930000334978104,
-1.234927773475647,
0.03523624688386917,
0.2528168559074402,
0.6220521330833435,
0.46836763620376587,
0.006373673211783171,
0.42253679037094116,
-0.1411525160074234,
-0.9467483758926392,
-0.0534227825701236... |
def udpreceive ( ) : while true : data, addr = s _ rx. recvfrom ( 128 ) data = data. replace ( " \ " ", " " ). strip ( " \ 0 " ) # strip termination byte and possible node _ data _ key = node _ data [ addr [ 0 ] ] # indicate node is connected node _ data _ key [ node _ connected ] = connect _ watchdog print addr [ 0 ] ... | [
-0.007356089539825916,
0.25339412689208984,
0.6616213917732239,
-1.3845573663711548,
-0.24902403354644775,
0.18719610571861267,
-0.14119502902030945,
0.24346096813678741,
-0.5173876285552979,
-0.14997142553329468,
-0.160089910030365,
0.6906498074531555,
0.18900340795516968,
-0.462222903966... |
def target _ portal _ member _ id ( self, target _ portal _ member _ id ) : self. _ target _ portal _ member _ id = target _ portal _ member _ id | [
-0.30140236020088196,
-1.7770345211029053,
-0.21686142683029175,
-0.10441285371780396,
-0.07448158413171768,
1.6986780166625977,
-0.22587540745735168,
0.28237536549568176,
0.026339933276176453,
0.2015746533870697,
0.4195650815963745,
0.9790229797363281,
-0.2303827404975891,
-0.528134524822... |
async def _ delete _ folder ( self, path, * * kwargs ) : if not path. full _ path. endswith ('/') : raise exceptions. invalidparameters ('not a folder : { } '. format ( str ( path ) ) ) prefix = path. full _ path. lstrip ('/') contents = self. bucket. objects. filter ( prefix = path. full _ path ) content _ keys = [ co... | [
-0.6726853847503662,
-0.14703233540058136,
0.755473792552948,
0.2656761705875397,
-0.02521500177681446,
-0.40892109274864197,
-0.2551111876964569,
-0.4248894453048706,
-0.2852436900138855,
0.28208670020103455,
-0.281296044588089,
-0.4212862551212311,
-0.6053683757781982,
0.0006447791820392... |
def add _ user ( self ) - > user or int : try : user _ identity = uuid. uuid4 ( ) authorization _ data = authorizationdata ( id = str ( user _ identity ), login = self. _ _ login, password = self. _ _ password ) database. session. add ( authorization _ data ) database. session. flush ( ) userprofile = userprofiles ( na... | [
-0.47476544976234436,
0.7724028825759888,
1.0603867769241333,
0.5613111257553101,
0.05839218199253082,
0.45770737528800964,
0.7369270920753479,
-0.10129246860742569,
0.2594892382621765,
-0.3354506492614746,
-0.3478785455226898,
-0.9101144075393677,
-0.39278778433799744,
-0.4796549379825592... |
def pack _ id ( self, pack _ id ) : self. _ pack _ id = pack _ id | [
0.4694370925426483,
-0.23474779725074768,
0.048806145787239075,
0.7643075585365295,
0.21223849058151245,
0.6733863949775696,
-0.30871355533599854,
1.0779616832733154,
0.7158819437026978,
-0.7516583800315857,
-1.2699142694473267,
0.3015587627887726,
-0.2687532603740692,
1.1243705749511719,
... |
def get _ dateframe ( self, on _ or _ after, before ) : if isinstance ( on _ or _ after, str ) : on _ or _ after = datetime. strptime ( on _ or _ after,'% y - % m - % d') if isinstance ( before, str ) : before = datetime. strptime ( before,'% y - % m - % d') if not before : before = datetime. today ( ) if on _ or _ aft... | [
0.25958681106567383,
-0.5760367512702942,
0.9500864744186401,
0.20711393654346466,
-0.37644457817077637,
-0.32892975211143494,
-0.4680241644382477,
-0.314830482006073,
0.20332016050815582,
-0.287202924489975,
0.9787808060646057,
0.9259741902351379,
-0.02570023015141487,
0.20685730874538422... |
def test _ add _ node ( gr ) : gr. add _ node ('value') assert'value'in gr. node _ dict | [
0.19728654623031616,
1.5903370380401611,
0.38454651832580566,
-0.4994407594203949,
1.0874640941619873,
0.7310643792152405,
-0.10743178427219391,
0.1714244931936264,
-0.4241800606250763,
-0.05071348696947098,
0.3940486013889313,
0.2417265623807907,
0.1788044273853302,
-0.13857682049274445,
... |
def retarget _ with _ change _ points ( song, cp _ times, duration ) : analysis = song. analysis beat _ length = analysis [ beat _ dur _ key ] beats = np. array ( analysis [ " beats " ] ) # find change points cps = np. array ( novelty ( song, nchangepoints = 4 ) ) cp _ times = np. array ( cp _ times ) # mark change poi... | [
-0.2803773283958435,
-0.4105302393436432,
0.7413743138313293,
-0.08166846632957458,
-0.20569251477718353,
0.11549162119626999,
0.8772422671318054,
0.1623965948820114,
-0.6337736248970032,
0.7603278756141663,
0.35462889075279236,
0.9202128052711487,
-0.38282570242881775,
-0.6678693890571594... |
def main ( ) : cities = { " mos " : " moskva ", " spb " : " sankt - peterburg ", " ekb " : " sverdlovskaya - oblast / ekaterinburg ", } app _ type = { " sec " : " kvartira ", " new " : " novostroyka ", } # create file with offers urls'city _ key _ app _ key _ links. txt'create _ links _ file ( cities, app _ type ) for ... | [
0.17219021916389465,
0.17006514966487885,
0.6568288803100586,
0.7573909759521484,
-0.5217892527580261,
0.94606614112854,
0.3376398980617523,
0.7806967496871948,
-0.6455190181732178,
0.13894648849964142,
0.44257840514183044,
1.0626410245895386,
0.11269517242908478,
-0.05952207371592522,
0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.