text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
async def listen _ for _ new _ credentials ( self, callback _ function = none, timeout = none ) : url = " { } { } : { } / ws / credentials / new / current _ operation ". format ( self. _ ws, self. _ server _ ip, self. _ server _ port ) if callback _ function : task = await self. stream _ output ( url, callback _ functi... | [
0.0415751114487648,
-0.04822840914130211,
0.5645645260810852,
0.2823193073272705,
-0.8713769316673279,
-0.5081474781036377,
0.31953027844429016,
0.14518149197101593,
-0.050615131855010986,
0.2209380716085434,
0.07814274728298187,
1.0452979803085327,
-0.05417419597506523,
0.525461733341217,... |
def parse _ arguments ( ) : parser = argparse. argumentparser ( description ='check a consul service health') parser. add _ argument ('- t ','- - token ', default = none ) parser. add _ argument ('service') parser. add _ argument ('- h ','- - host ', default ='localhost') parser. add _ argument ('- p ','- - port ', def... | [
0.4100838601589203,
-0.394314706325531,
0.6622422933578491,
-0.8182200193405151,
0.639849066734314,
0.15981519222259521,
-0.924916684627533,
0.1866011619567871,
-0.5883968472480774,
0.02383597008883953,
-0.32650160789489746,
0.058876730501651764,
-0.7668658494949341,
0.46539247035980225,
... |
def remove ( self, job ) : logging. debug ('attempt to remove job'+ str ( job ) ) self. lock. acquire ( ) try : if job is self. running : logging. debug ('job'+ str ( job ) +'is running. attempt stop.') job. stop ( ) logging. debug ('job'+ str ( job ) +'removed.') else : if not job in self. queue : logging. debug ('job... | [
-0.48525863885879517,
-0.588195264339447,
0.2400524616241455,
-0.348308801651001,
-0.1966547667980194,
-0.2827349007129669,
-0.38066890835762024,
0.1377505511045456,
0.42803969979286194,
0.22331342101097107,
-0.12628725171089172,
-0.03472689166665077,
-1.3920153379440308,
-0.02764467522501... |
def test _ create _ phone _ number ( lst, phone _ number ) : from create _ phone _ number import create _ phone _ number _ func assert create _ phone _ number _ func ( lst ) = = phone _ number | [
-0.2634177505970001,
-0.7816305756568909,
0.25458845496177673,
1.3191033601760864,
1.2453917264938354,
0.17653901875019073,
-0.05336347222328186,
0.4050682783126831,
0.9657179117202759,
-1.1918115615844727,
-1.614976167678833,
-0.07029680907726288,
0.8356866240501404,
0.32016411423683167,
... |
def mouse _ rgb ( event, x, y, flag, param ) : b = image [ y, x, 0 ] g = image [ y, x, 1 ] r = image [ y, x, 2 ] if event = = cv2. event _ mousemove : current _ color [ : ] = [ b, g, r ] elif event = = cv2. event _ lbuttondown : selected _ color [ : ] = [ b, g, r ] | [
-0.1335904747247696,
-1.2411525249481201,
0.6974716186523438,
0.3407323658466339,
0.5926698446273804,
0.3977945148944855,
0.3442888855934143,
-0.2711959183216095,
-0.23110206425189972,
0.9193642735481262,
-0.8080552816390991,
1.190229892730713,
0.25737980008125305,
0.1842116266489029,
0.... |
async def get _ all _ disabled _ commands _ profiles ( self ) - > mythicresponse : url = " { } { } : { } / api / v { } / operations / disabled _ commands _ profiles ". format ( self. _ http, self. server _ ip, self. _ server _ port, self. _ server _ api _ version ) resp = await self. get _ json ( url ) if resp. respons... | [
0.2195529192686081,
-0.052459716796875,
0.6412994861602783,
0.5298769474029541,
0.6384109854698181,
-0.16676609218120575,
0.013679279945790768,
-0.651896059513092,
0.48930421471595764,
-0.3461574912071228,
-0.5603508949279785,
0.07784664630889893,
-1.1242574453353882,
0.6522524356842041,
... |
def test _ profile _ looks _ up _ subs _ by _ logged _ in _ user ( authn _ policy, subscriptions _ model ) : request = dummyrequest ( ) authn _ policy. authenticated _ userid. return _ value = " acct : foo @ bar. com " profilecontroller ( request ). profile ( ) subscriptions _ model. get _ subscriptions _ for _ uri. as... | [
0.7821860909461975,
0.49608707427978516,
0.34940677881240845,
0.7654229402542114,
0.7073083519935608,
0.7469314336776733,
0.30429184436798096,
-1.1690062284469604,
0.42595425248146057,
-1.3349837064743042,
-0.05854547396302223,
0.0800848975777626,
0.9177250862121582,
-0.6748923063278198,
... |
def create _ instance ( self ) : raise notimplementederror ('subclasses must define this method.') | [
-0.22442372143268585,
-0.3884275555610657,
0.499582439661026,
-0.13950525224208832,
-0.08109033107757568,
1.502192497253418,
0.4425623118877411,
0.03000442124903202,
-0.36833781003952026,
-0.1330614984035492,
-0.4699256420135498,
-0.07125245779752731,
-0.1826620250940323,
0.195104360580444... |
def get _ mt _ pyobject _ from _ confirmation ( confirmation ) : mt _ swift _ py _ obj = none custom _ data = dict ( ) if confirmation : if confirmation. isinfant ( ) and confirmation. oid ( ) < 0 : mt _ type = get _ mt _ type _ from _ acm _ obj ( confirmation ) if mt _ type : mt _ type = " mt " + str ( mt _ type ) fmt... | [
0.34977486729621887,
-0.653706431388855,
0.5536616444587708,
0.29993972182273865,
-0.3331025242805481,
0.040963102132081985,
0.03580648452043533,
-0.45592138171195984,
-0.5245698094367981,
-0.06567946821451187,
-0.3496549427509308,
0.4551068842411041,
0.5795727968215942,
1.0809894800186157... |
def to _ fhir _ json ( msdf : mappingsetdataframe ) - > dict : df : pd. dataframe = msdf. df # intermediary variables metadata : dict [ str, any ] = msdf. metadata if msdf. metadata is not none else { } mapping _ set _ id = metadata. get ( " mapping _ set _ id ", " " ) name : str = mapping _ set _ id. split ( " / " ) [... | [
-0.6153072714805603,
-1.120158314704895,
0.6500522494316101,
-1.1309360265731812,
-0.9499878883361816,
-0.5488495230674744,
0.21550974249839783,
-0.444019079208374,
0.19899600744247437,
-0.45122233033180237,
-0.04944024980068207,
0.7708415985107422,
0.7558664083480835,
0.4222867786884308,
... |
def _ _ init _ _ ( self, source, readonly = false ) : self. _ readonly = readonly if isinstance ( source, str ) : self. _ tree = _ generatetree ( source ) elif isinstance ( source, _ node ) : # for internal use only. self. _ tree = source else : raise typeerror, " melds must be constructed from ascii strings " | [
-1.2531460523605347,
1.113600254058838,
0.3418627083301544,
0.09133335202932358,
-1.3753383159637451,
-0.2811198830604553,
-0.3621891438961029,
0.7417246103286743,
0.2974757254123688,
-0.012707243673503399,
-0.736372172832489,
0.45683279633522034,
-0.18257926404476166,
1.0203903913497925,
... |
def func _ real _ sensor _ position ( geo _ shape : str ) - > tuple : start _ sensor = ( format _ lat _ lon ( geo _ shape [ 1 ]. find ('lat'). text, geo _ shape [ 1 ]. find ('long'). text ) ) end _ sensor = ( format _ lat _ lon ( geo _ shape [ 2 ]. find ('lat'). text, geo _ shape [ 2 ]. find ('long'). text ) ) real _ s... | [
-0.6264869570732117,
-1.253960371017456,
0.5367274284362793,
-1.0936830043792725,
-0.06341062486171722,
-0.1832040250301361,
-0.5846055746078491,
0.40385502576828003,
-0.5629374384880066,
1.1769095659255981,
-0.7756410241127014,
-1.0205692052841187,
0.607602596282959,
-0.26005682349205017,... |
def register ( ) : requests. post ( register _ url, json = {'github': github,'token': token } ) | [
-0.08056418597698212,
0.6122618317604065,
0.366304874420166,
0.4738774001598358,
2.2331507205963135,
-0.6088216304779053,
-2.0650007724761963,
0.6757442951202393,
-0.8154052495956421,
-0.5636666417121887,
-1.266347885131836,
1.182625412940979,
-0.7003803253173828,
0.1953093707561493,
1.0... |
def get _ external _ value _ using _ ael ( recon _ item ) : externalvaluesencoded = recon _ item. external _ values archive = acm. fxmlarchive ( ) archive. load ( externalvaluesencoded ) externalvalues = archive. contents ( ) if externalvalues and externalvalues. at ('externalvalues') : externalvalues = externalvalues.... | [
0.32356905937194824,
-0.4309225082397461,
0.40030238032341003,
-0.21135154366493225,
-0.7879296541213989,
-0.04918081685900688,
-0.9366703033447266,
0.056732483208179474,
0.2783008813858032,
0.11843818426132202,
-0.228287935256958,
0.4723058044910431,
0.32902461290359497,
-0.23936213552951... |
def googlenet ( pretrained = false, * * kwargs ) : if pretrained : if'transform _ input'not in kwargs : kwargs ['transform _ input'] = true if'aux _ logits'not in kwargs : kwargs ['aux _ logits'] = false if kwargs ['aux _ logits'] : warnings. warn ('auxiliary heads in the pretrained googlenet model are not pretrained,'... | [
0.1329997479915619,
0.14323201775550842,
0.6118103265762329,
-0.4720059633255005,
-0.6719015836715698,
0.6605643033981323,
-0.42953985929489136,
-0.18576771020889282,
0.41711705923080444,
-0.011178930290043354,
-0.7868379354476929,
0.7515289187431335,
-0.2034790962934494,
0.406996726989746... |
def load _ data ( messages _ filepath, categories _ filepath ) : # load messages dataset messages = pd. read _ csv ( messages _ filepath ) # load categories dataset categories = pd. read _ csv ( categories _ filepath ) # merge datasets df = pd. merge ( messages, categories, on ='id') # df = messages. merge ( categories... | [
-0.13627223670482635,
0.21674439311027527,
0.47599875926971436,
-0.6942744851112366,
0.5415980815887451,
0.8187248110771179,
-0.45442143082618713,
-0.3847866654396057,
-0.5508623719215393,
-0.8219111561775208,
0.5036960244178772,
0.34937578439712524,
-0.34796375036239624,
-0.15573048591613... |
def sendmessage ( dataframe, smtp _ server, smtp _ port, sender _ login, sender _ password, reciever _ email, subject, begin _ message ) : length = len ( dataframe. index ) if ( length % 10 ) = = 1 and ( length % 100 )! = 11 : finalofmessage = " строку. " elif ( length % 10 ) < 5 and ( length % 10 ) > 1 and ( ( length ... | [
-0.1407162845134735,
0.6161898970603943,
0.8225399851799011,
0.1862192153930664,
0.3732643127441406,
-0.09167792648077011,
0.5681307315826416,
-0.10938210040330887,
-0.5366467833518982,
0.286315381526947,
-0.16875506937503815,
0.5404109358787537,
-0.4873991310596466,
-0.7069674134254456,
... |
def beamsearch ( nqueennum, numstates = 10, stoplimit = 1000 ) : currstates = [ ] for i in range ( numstates ) : nextstate = nqueens ( nqueennum ) nextstate. setprintmode ( full = false ) currstates. append ( nextstate ) maxvalue = currstates [ 0 ]. getmaxvalue ( ) sortbyvalue ( currstates ) count = 0 foundoptimal = fa... | [
0.3113378882408142,
-0.2633906602859497,
0.987637996673584,
0.29026156663894653,
-0.6705858707427979,
-0.27030348777770996,
-0.10525438189506531,
-0.15854816138744354,
0.10662786662578583,
-0.0191661287099123,
-0.5836736559867859,
-0.24000096321105957,
-0.020806821063160896,
0.492792874574... |
def replace _ baseline ( self, selection, newcomponentversionbaseline ) : text = selection. text p = re. compile ( r'baseline \ s * = \ s * " [ ^ " ] * " ', re. ignorecase ) matches = p. findall ( text ) replaced = false if matches : if len ( matches ) > 1 : print " not replacing baseline, where it is several times in ... | [
-0.18345628678798676,
-0.6577839851379395,
0.6699501276016235,
-0.21080642938613892,
0.07068318128585815,
-0.4602946639060974,
-0.1442650407552719,
1.154306411743164,
-0.0625375360250473,
1.3184770345687866,
-1.2023626565933228,
0.15261998772621155,
-1.7184669971466064,
0.12653236091136932... |
def is _ a _ quadratic _ residue ( self, a ) : if not isinstance ( a, integersmoduloprimeelement ) : raise valueerror ( " only check an object " ) return legendre ( a. val, self. mod ) = = 1 | [
-0.23090176284313202,
-0.29429128766059875,
0.5030872225761414,
0.21936200559139252,
0.09807224571704865,
0.16955284774303436,
-0.2599032521247864,
-0.42180097103118896,
1.6651766300201416,
-0.0401030108332634,
0.02760254219174385,
0.35736891627311707,
-1.0781384706497192,
-0.0177887156605... |
def configured ( self ) - > pulumi. input [ bool ] : return pulumi. get ( self, " configured " ) | [
0.18590949475765228,
0.34848129749298096,
0.37173759937286377,
0.6664291024208069,
1.125018835067749,
0.7926775813102722,
-0.04781704023480415,
0.6216182708740234,
0.39798158407211304,
0.6513965725898743,
-0.45489266514778137,
0.49644458293914795,
-0.2711149752140045,
-0.3373790383338928,
... |
def calc _ delta ( d1, t, callput, q = 0. 00 ) : # https : / / github. com / 732jhy / delta - hedging / blob / master / delta % 20hedging % 20sim. ipynb callput = callput. upper ( ) if callput = ='call': delta1 = stats. norm. cdf ( d1 ) * np. exp ( - q * t ) elif callput = ='put': delta1 = ( stats. norm. cdf ( d1 ) * n... | [
-0.2941564917564392,
0.5441872477531433,
0.6386597156524658,
-0.07937249541282654,
-0.5924909114837646,
0.9569196701049805,
0.2539023160934448,
-0.19077607989311218,
0.009460370987653732,
0.08682505041360855,
0.0879451334476471,
-0.032429713755846024,
-0.20050689578056335,
-0.0550322495400... |
def run _ sensitivity _ analysis ( method, fun, variable, * args, * * kwargs ) : from pyapprox. surrogates. polychaos. adaptive _ polynomial _ chaos import ( adaptiveinducedpce ) from pyapprox. surrogates. interp. adaptive _ sparse _ grid import ( combinationsparsegrid ) if method = = " surrogate _ sobol " : if issubcl... | [
0.1014818325638771,
-0.5918666124343872,
0.7757359743118286,
0.1073755994439125,
-0.36804690957069397,
-1.0009253025054932,
-0.258001446723938,
-0.6216652989387512,
0.32869309186935425,
-0.044088978320360184,
0.6101671457290649,
0.7728339433670044,
0.13021008670330048,
-0.06713224947452545... |
def flatten ( self ) - > list [ list [ tuple [ int, int, int ] ] ] : # base case has an extra condition for unit cell if len ( self. children ) = = 0 : if self. level! = self. max _ depth : sol = [ ] for _ in range ( 2 * * ( self. max _ depth - self. level ) ) : temp = [ self. colour ] * ( 2 * * ( self. max _ depth - s... | [
-0.6774767637252808,
0.20245686173439026,
0.6594838500022888,
1.215157389640808,
0.4508570432662964,
-0.037122972309589386,
0.6088651418685913,
0.056524064391851425,
0.1066303476691246,
-0.20532798767089844,
-0.1903337985277176,
-0.1867278814315796,
-0.6643680930137634,
1.2235616445541382,... |
def _ _ init _ _ ( self, value = 0, per _ channel = false, name = none, deterministic = false, random _ state = none ) : self. value = value | [
0.270155668258667,
0.11132901161909103,
0.5384880900382996,
0.2300746589899063,
-0.774333119392395,
0.4904565215110779,
0.021736303344368935,
0.16004030406475067,
0.36327052116394043,
-0.1400156319141388,
-0.5948792695999146,
-0.27116063237190247,
-0.19961100816726685,
1.3196489810943604,
... |
def handle _ command ( command, channel ) : response ='not sure what you mean. available commands : \ n ` random ` to get a random restaurant \ n ` random _ number _ ` to get a random restaurant from a category \ n ` categories ` to list available restaurant categories'if command. startswith ('categories') : response =... | [
-0.6442822217941284,
0.24193742871284485,
0.6513476967811584,
-0.009846679866313934,
1.3568178415298462,
0.058332525193691254,
-0.20192570984363556,
-0.3476437032222748,
-0.020786214619874954,
-0.6074544787406921,
-0.34809568524360657,
0.8174905776977539,
-0.5443595051765442,
0.82263392210... |
def find _ mates ( ref _ r2 _ file _ piece ) : ref _ ip _ dir = " tmp _ r2 _ pieces " ref _ ip _ file = ref _ ip _ dir + " / " + ref _ r2 _ file _ piece to _ lookup _ dir = " op _ tmp _ r1 _ pieces _ after _ classify " classed _ as _ y _ ip _ r1 _ file = ref _ r2 _ file _ piece + " _ op _ r1 " r1 _ file = to _ lookup _... | [
-0.3701746463775635,
-1.6075023412704468,
0.9373587965965271,
-0.23088207840919495,
-0.7734906673431396,
0.1263784021139145,
0.8286368250846863,
-0.5659067034721375,
-0.6263160109519958,
0.18407967686653137,
0.7427905797958374,
-0.03541325032711029,
-0.7904704809188843,
1.021522879600525,
... |
def tenant _ id ( self ) - > str : return pulumi. get ( self, " tenant _ id " ) | [
1.5923850536346436,
-0.04197866842150688,
0.19152386486530304,
0.3103882968425751,
0.6688103079795837,
1.230747938156128,
0.061411671340465546,
0.8225630521774292,
1.063809871673584,
0.36837390065193176,
0.29538190364837646,
1.0447977781295776,
0.26842015981674194,
-1.3585461378097534,
-... |
def install _ openlayers ( ) : ol _ dir ='/ var / www / openlayers'cmd ='svn checkout http : / / svn. openlayers. org / trunk / openlayers / % s'% ol _ dir run ( cmd, verbose = true ) cmd ='chown - r www - data : www - data % s'% ol _ dir run ( cmd, verbose = true ) | [
0.5232419371604919,
-0.9110018610954285,
0.7699248194694519,
-0.11947708576917648,
0.24539993703365326,
0.5408678650856018,
0.2465408742427826,
0.06517311930656433,
0.4190259873867035,
-0.0430636927485466,
0.22274348139762878,
0.4444039762020111,
-0.11711078137159348,
-0.20820161700248718,... |
def stochasticuniversalsampling ( self ) : # calculation of new fitness and sum of fitness new _ fitness = [ ] # sum _ of _ fitness = 0 unit = 1 / self. popsize # print ( " unit : ", unit ) for i in range ( self. popsize ) : calc _ fitness = 1 / ( self. matingpool [ i ]. fitness ) sum _ of _ fitness + = calc _ fitness ... | [
-1.2397340536117554,
-0.4876987636089325,
0.8483031392097473,
0.5384259223937988,
-0.6285279393196106,
0.750454843044281,
0.39341843128204346,
0.23886577785015106,
-0.016740623861551285,
1.3883556127548218,
-0.5092697143554688,
0.4810582101345062,
-0.7371295094490051,
-0.09346400201320648,... |
def applyshifts ( sc, regdict, optimization = false, shifts = none, usegroupshifts = false ) : if shifts is none : shifts = regdict ['newshifts'] flylines = regdict ['flylines'] allshiftsarraybc = sc. broadcast ( shifts ) def xyvolumeplanaralign ( kv ) : key, im = kv key = np. array ( key [ 0 ] ). astype ( int ) from s... | [
-0.15860341489315033,
0.44701331853866577,
0.8545358777046204,
-0.0386609211564064,
-0.6188814640045166,
0.005843128077685833,
-0.10068494826555252,
0.31475603580474854,
0.9457447528839111,
0.4707723557949066,
0.3192024230957031,
0.4197397530078888,
0.2215043306350708,
1.0346651077270508,
... |
def address ( self ) : return self. _ addr | [
-0.3549148142337799,
-1.3434003591537476,
0.30771565437316895,
0.20750880241394043,
-0.042936090379953384,
1.0718326568603516,
1.0281902551651,
0.1716589480638504,
1.2773959636688232,
-1.3061069250106812,
0.9661147594451904,
1.1494749784469604,
-0.19015522301197052,
-0.6505072712898254,
... |
def get _ decoder _ 1step _ net ( prev _ state, emb _ token ) : l _ dec = lstmlayer ( incoming = emb _ token, num _ units = hidden _ layer _ dimension, hid _ init = prev _ state, grad _ clipping = grad _ clip, nonlinearity = lasagne. nonlinearities. tanh, only _ return _ final = true, name = " lstm _ decoder " ) l _ de... | [
0.5403082370758057,
-0.19661088287830353,
0.6496678590774536,
-0.13539890944957733,
0.005345883313566446,
-0.11622180789709091,
-0.33933258056640625,
0.1459442675113678,
-0.14209894835948944,
-0.4016748368740082,
-0.6946115493774414,
-0.08412635326385498,
0.32662928104400635,
1.13222634792... |
def _ statistic ( self ) - > transformation : cls = self ['aggregate'] try : obj = cls ( * * { key : value for key, value in self. items ( ) if key not in ['aggregate ','input ','group _ by'] } ) except typeerror : raise virtualproductexception ( " transformation { } could not be instantiated ". format ( cls ) ) self. ... | [
-0.01761328987777233,
0.5253551006317139,
0.2684707045555115,
0.29156243801116943,
0.4015021026134491,
-0.18769189715385437,
0.5370153188705444,
-1.2665290832519531,
0.6212362051010132,
0.7017858624458313,
0.21314959228038788,
-0.525753378868103,
0.1191139817237854,
-0.6204997897148132,
... |
def frequency ( g, k, h ) : omega = np. sqrt ( g * k * np. tanh ( k * h ) ) return omega | [
1.0259003639221191,
-0.18062910437583923,
0.3234647810459137,
0.009708232246339321,
-0.03499222919344902,
-0.45857715606689453,
-0.5341070890426636,
0.03372311592102051,
-1.1056691408157349,
0.24627457559108734,
0.17924268543720245,
-0.08672749996185303,
-0.33950597047805786,
0.04480123519... |
def fill _ address _ form ( self, address : addressbook ) - > " addaddresspage " : self. _ change _ text _ field _ data ( self. driver. find _ element ( * addaddresslocators. firstname _ field ), address. first _ name ) self. _ change _ text _ field _ data ( self. driver. find _ element ( * addaddresslocators. lastname... | [
-0.4235176742076874,
0.550204336643219,
1.0341671705245972,
-0.6590414047241211,
-0.0859299823641777,
0.20829084515571594,
0.510964572429657,
-0.16794395446777344,
0.8933923244476318,
0.15245985984802246,
-0.2271692305803299,
-0.15263335406780243,
-0.07292423397302628,
0.6460448503494263,
... |
def remove _ drink ( data ) : drink = data ['drink'] drinks = list. query. get ( data ['list _ id'] ). drinks if int ( drink ['drink _ id'] ) in [ drink. drink _ id for drink in drinks ] : list _ drink. query. filter ( and _ ( list _ drink. drink _ id = = drink ['drink _ id'], list _ drink. list _ id = = data ['list _ ... | [
-0.6795286536216736,
-0.4207996129989624,
0.41609930992126465,
-0.46638908982276917,
-0.11627025157213211,
-0.6389681696891785,
-0.25174596905708313,
1.2407788038253784,
0.5866847634315491,
0.9095752239227295,
-0.7718318700790405,
-0.40202003717422485,
-0.6666099429130554,
0.82623571157455... |
def process ( cdr _ xml _ str ) : cleaned = cdr _ xml _ str. encode ('ascii ','replace') logger. debug ( cleaned ) dom = minidom. parsestring ( cleaned ) # first try to use the account _ id ( which is set in the dialplan. xml # template ). if that fails, fallback to " domain _ name ", which # is set in the " web dialou... | [
-0.1354767233133316,
-0.16113492846488953,
0.659382164478302,
-0.43219897150993347,
-0.6817900538444519,
-0.4062771499156952,
0.3441738188266754,
-0.7981084585189819,
0.682086169719696,
0.5672562718391418,
-0.40579190850257874,
-0.7282781600952148,
-0.029112765565514565,
-0.012501445598900... |
def other ( self, data ) : logging. error ('{ 0 } : unrecognized action { 1 } '. format ( self. name, data ['action'] ) ) return false | [
-0.5416460037231445,
-0.18834783136844635,
0.563199520111084,
0.29860687255859375,
0.6022011041641235,
0.3116529583930969,
-0.19086696207523346,
-0.5281727313995361,
0.7353136539459229,
0.16937576234340668,
-0.6643008589744568,
0.7121707201004028,
-0.025716017931699753,
0.41456958651542664... |
def readdata ( s, type, strict = false ) : import units, string out = [ ] data = string. split ( s, ',') if strict and len ( data )! = len ( type ) : raise runtimeerror, " data do not match type specifier % s \ ndata :'% s'" % ( type, s ) for t, d in zip ( type, data ) : # print ( t, d ) if len ( d ) = = 0 : break v = ... | [
0.03317764773964882,
-0.9968270659446716,
0.6195124387741089,
-0.5362441539764404,
0.10322155803442001,
0.10596846789121628,
-0.488432377576828,
0.027228688821196556,
-0.10281465947628021,
-0.03850254416465759,
0.3277007043361664,
0.7911286354064941,
-0.5426238775253296,
-0.042567070573568... |
def is _ cpo _ expr ( expr, type = none ) : return isinstance ( expr, cpoexpr ) and ( type is none or expr. type = = type ) | [
-0.30684933066368103,
-0.6493117809295654,
0.29875290393829346,
1.1880614757537842,
-0.542555034160614,
-0.3229519724845886,
0.18809236586093903,
0.16955159604549408,
0.633124589920044,
1.387205958366394,
-0.23190775513648987,
0.8009499907493591,
-1.2435370683670044,
0.18531431257724762,
... |
def read _ league _ results ( num _ rounds ) : for i in range ( num _ rounds ) : read _ round _ results ( " resultados _ rodada " + str ( i + 1 ) ) | [
-0.43473827838897705,
0.17752328515052795,
0.2844202518463135,
-0.9656400084495544,
0.8514073491096497,
-0.6092304587364197,
0.25744375586509705,
-0.8340551853179932,
-0.7485336065292358,
-0.35635045170783997,
-0.08724866807460785,
0.28465041518211365,
0.3987538814544678,
-0.72559797763824... |
def _ parse ( self ) : self. _ argdict = vars ( self. _ parser. parse _ args ( ) ) if self. help : self. _ parser. print _ help ( ) sys. exit ( 1 ) | [
0.008917642757296562,
0.21357916295528412,
0.30788421630859375,
-0.31950780749320984,
-0.12731225788593292,
0.04033397510647774,
-0.16824916005134583,
0.3976951539516449,
-1.1266311407089233,
-0.4269801080226898,
0.04805415868759155,
-0.668655276298523,
0.06224855035543442,
1.1398484706878... |
def build _ weighted _ dann _ loss ( source _ tensor, target _ tensor, nodes, weight, variables, scope = none ) : with tf. variable _ scope ( scope ) : source _ batch _ size = tf. shape ( source _ tensor ) [ 0 ] target _ batch _ size = tf. shape ( target _ tensor ) [ 0 ] samples = tf. concat ( axis = 0, values = [ sour... | [
-0.41578999161720276,
-0.5609249472618103,
0.650164008140564,
-0.5245157480239868,
-0.27246716618537903,
-0.37313371896743774,
0.11665523052215576,
0.2712535262107849,
0.28009337186813354,
0.7868547439575195,
0.06299702078104019,
0.9572011828422546,
0.9490873217582703,
-0.5904868841171265,... |
def load _ territory ( t _ id ) : added _ count = 0 for doc in get _ new _ docs ( t _ id ) : add _ address ( t _ id, doc ) added _ count = added _ count + 1 return added _ count | [
-1.0005208253860474,
0.029513325542211533,
0.701316773891449,
-1.3784853219985962,
0.428774356842041,
-0.4882444739341736,
-0.5436621904373169,
-0.40061870217323303,
0.3829767107963562,
0.3351885974407196,
-0.7378596067428589,
-0.3306971788406372,
0.26583132147789,
0.12720376253128052,
-... |
def expandpalindromes ( c, st, out ) : for str in st : out. add ( str ) out. add ( c + str + c ) | [
0.4799819886684418,
0.09803885966539383,
0.37750667333602905,
-0.6356320381164551,
-0.7950064539909363,
0.5039504170417786,
-0.17990542948246002,
0.7044686675071716,
0.19658257067203522,
-0.19707231223583221,
0.473958820104599,
0.2785405218601227,
-0.8083116412162781,
-0.8853567242622375,
... |
def diagonalise ( density _ matrix, option = 0 ) : if option = = 0 : return eig ( density _ matrix. toarray ( ) ) if option = = 1 : return eigh ( density _ matrix. toarray ( ), eigvals _ only = true ) | [
-0.6191859245300293,
0.09748437255620956,
0.48055681586265564,
0.19088825583457947,
0.8758286833763123,
0.10922180116176605,
0.09584403783082962,
0.46773043274879456,
0.015261542052030563,
0.5151591897010803,
1.0886261463165283,
-0.2814401090145111,
-0.0243192370980978,
0.2729794979095459,... |
def main ( ) : # if we have command line params, parse them and exit if len ( sys. argv ) > 1 : args = sys. argv [ 1 : ] do _ command ( args ) exit ( ) # else we'll run our own interactive cli # readline histfile = os. path. join ( os. environ [ " home " ], ". installerhist " ) try : readline. read _ history _ file ( h... | [
0.44996413588523865,
-0.3003917336463928,
0.8006694316864014,
1.3652856349945068,
1.1817762851715088,
0.11207366734743118,
0.5428121089935303,
0.9871565699577332,
-0.873565137386322,
0.44799676537513733,
0.7091134786605835,
0.2596726715564728,
0.07996512949466705,
0.49345019459724426,
0.... |
def get _ name ( player _ posn ) : return players [ player _ posn ] ['name']. title ( ) | [
-0.8227994441986084,
-1.2665237188339233,
0.32155513763427734,
-1.1086726188659668,
-0.4402264654636383,
-0.6279649138450623,
-1.4752670526504517,
-0.4094966650009155,
0.01091703586280346,
1.3256791830062866,
-0.562072217464447,
-0.7027735114097595,
0.33368760347366333,
-1.0494402647018433... |
def player _ play ( player _ posn, hand _ num = 0 ) : while get _ player _ status ( player _ posn, hand _ num ) = ='playing': print _ board ( false, player _ posn, hand _ num ) print ( " { }'s turn - hand { } \ n ". format ( get _ name ( player _ posn ), hand _ num + 1 ) ) if check _ 21 ( player _ posn, hand _ num ) : ... | [
0.1814897507429123,
0.010490966029465199,
0.9816864728927612,
0.5914537906646729,
-0.0974237397313118,
0.32800230383872986,
0.8972527384757996,
0.12590578198432922,
-0.10273901373147964,
0.024745261296629906,
-0.2583468556404114,
0.18974843621253967,
-0.14853939414024353,
-0.98252278566360... |
def setdatfilelist ( self, lastdatfile ) : i = 0 while self. dirlist [ i ]! = lastdatfile : i = i + 1 self. dirlist = self. dirlist [ i : ] | [
-1.0316569805145264,
0.2996138632297516,
0.7072898745536804,
-0.10927735269069672,
0.5131320357322693,
0.4948331117630005,
0.9857303500175476,
0.3219183087348938,
0.2831951677799225,
-0.1880187839269638,
-1.186286449432373,
0.7323446869850159,
-0.17129427194595337,
0.8601679801940918,
-0... |
def pick _ random _ parents ( pop ) : mom = random. choice ( pop ) dad = random. choice ( pop ) return mom, dad | [
-1.099137544631958,
-0.3188224732875824,
0.3472335934638977,
-0.7185781002044678,
-0.6139751076698303,
0.31235599517822266,
0.5149786472320557,
-0.7194217443466187,
0.6223803162574768,
1.2404972314834595,
-0.24934738874435425,
-0.7760668396949768,
-0.046408820897340775,
0.03164041414856911... |
def increment _ login _ attempts ( self ) : self. login _ attempts + = 1 | [
-1.300078272819519,
-0.38356295228004456,
0.3958669900894165,
-0.1577599048614502,
0.0747363492846489,
0.6722456216812134,
-0.3426564037799835,
0.04718868434429169,
0.15331722795963287,
-1.0565062761306763,
-0.1484280675649643,
0.7642114758491516,
-0.34477096796035767,
-0.3523634374141693,... |
def update _ prices ( self, tickers, update = false, refresh = false ) : # we use the fast psycopg2 connection conn = self. metadata. bind. raw _ connection ( ) cur = conn. cursor ( ) for ticker in tickers : ( headers, mempage ) = self. pull _ tickerdata ( ticker, self. daysback ) ticker = ticker. replace ('% 5e ','' )... | [
-0.8218540549278259,
0.11354371160268784,
0.9234699606895447,
0.1032787337899208,
-0.3253563344478607,
0.4050825834274292,
0.04163671284914017,
-0.188057541847229,
-0.23118044435977936,
0.8038760423660278,
0.6672024130821228,
-0.7800060510635376,
-0.5502474904060364,
0.9795596599578857,
... |
def run ( self ) : return self | [
-0.15710443258285522,
-1.2403926849365234,
0.22196169197559357,
0.17832939326763153,
-0.029684480279684067,
1.0736849308013916,
1.0996098518371582,
-0.2911900579929352,
0.46458500623703003,
-1.6485739946365356,
-0.38389426469802856,
0.6284041404724121,
-1.2570676803588867,
-0.7235894203186... |
def sell _ product ( args ) : with open ('products. csv ', newline ='' ) as csv _ file : product _ reader = csv. dictreader ( csv _ file ) all _ products = [ product for product in product _ reader ] # non - perishable goods to be sold are filtered based on being # non - expiring and perishable goods are filtered based... | [
-0.8420894145965576,
-1.069478154182434,
0.6486526131629944,
0.23461943864822388,
0.3726232647895813,
1.1794906854629517,
-0.3693659007549286,
-0.2970508337020874,
-0.2705494165420532,
0.48863106966018677,
0.3411310017108917,
0.462663859128952,
-0.22171464562416077,
-0.0924416035413742,
... |
def download _ iers ( out _ days = 7, dir _ to = none ) : if dir _ to is none : home = str ( path. home ( ) ) dir _ to = home +'/ src / iers /'eop _ file ='finals2000a. all'leapsecond _ file ='leap _ second. dat'dir _ eop _ file = dir _ to + eop _ file dir _ leapsecond _ file = dir _ to + leapsecond _ file url _ eop ='... | [
-0.7103581428527832,
0.05632362887263298,
0.9575437903404236,
-0.9956298470497131,
0.4780520796775818,
-0.36268359422683716,
-0.33045095205307007,
-0.09616492688655853,
0.1389382928609848,
0.17278920114040375,
0.776612401008606,
-0.06724929064512253,
0.030241960659623146,
0.452656656503677... |
def fix _ eux _ ice _ first _ bar _ volume ( repo _ l1 = '. / repo _ l1 ', repo _ hist = '. / repo ', sday = none, eday = none ) : if sday is none : sday ='00000000'if eday is none : eday ='99999999'eur _ sym = l1. ven _ sym _ map ['eux'] ice _ sym = l1. ven _ sym _ map ['ice'] # for sym in eur _ sym + ice _ sym : for ... | [
0.2790297567844391,
-0.05060908943414688,
0.8433651328086853,
0.017431337386369705,
0.7940925359725952,
0.33564522862434387,
0.699549674987793,
0.2878442406654358,
-0.3481113016605377,
0.14026032388210297,
0.34574154019355774,
0.5703000426292419,
0.0493294894695282,
1.1256455183029175,
0... |
def menu ( shooters ) : while 1 : result = player _ menu ( shooters ) print result selection = result [ 0 ] status = result [ 1 ] print " selection : " + ` selection ` print " status : " + ` status ` if status = ='shoot'and selection! = - 1 : shooter = shooters [ selection ] newscore = letshoot ( shooter ) print " curr... | [
-0.944145679473877,
-0.7170961499214172,
0.7041893005371094,
0.6932293772697449,
0.02537314034998417,
0.28176993131637573,
-0.5695526003837585,
-0.5960488319396973,
0.44645851850509644,
0.6193700432777405,
-0.2041984349489212,
0.04850007966160774,
-0.7098461985588074,
0.9343475699424744,
... |
def test _ rotation ( ) : tests = [ ( 0, 0, 1 ), ( 0. 5, 0. 5, 0. 5 ), ( np. pi, 0, - 1. 5 ) ] for rot in tests : x, y, z = rot m = rotation3d ( x, y, z ) m4 = rotation ( x, y, z ) assert _ array _ equal ( m, m4 [ : 3, : 3 ] ) back = rotation _ angles ( m ) assert _ almost _ equal ( actual = back, desired = rot, decima... | [
0.17983098328113556,
0.6773673892021179,
0.5731924176216125,
0.3697548508644104,
0.7554283738136292,
0.07962185889482498,
0.9228314757347107,
-0.6901549100875854,
0.16241297125816345,
-0.04838354513049126,
-0.40358468890190125,
-0.9137587547302246,
-1.3749202489852905,
-1.5802196264266968,... |
def check _ if _ exists ( path _ to _ check, create = false ) : if not os. path. exists ( path _ to _ check ) : if create : pathlib. path ( path _ to _ check ). mkdir ( parents = true, exist _ ok = true ) return print ( f " { path _ to _ check } created " ) else : return none else : return true | [
-0.1386774182319641,
0.49040108919143677,
0.6612488031387329,
0.38606271147727966,
0.7996293306350708,
1.2677068710327148,
0.5479311943054199,
-0.4407974183559418,
-0.6173420548439026,
-0.6193061470985413,
0.48386257886886597,
-0.5663278102874756,
-0.2192731499671936,
-0.1319042444229126,
... |
def listerfichiers ( ftp ) : ret = [ ] ftp. dir ( " ", ret. append ) ret = [ x. split ( ) [ - 1 ] for x in ret if x. startswith ( " - " ) ] return ret | [
-0.26100799441337585,
0.03717305138707161,
0.7792620658874512,
-0.21951743960380554,
0.026484578847885132,
0.5987181067466736,
-0.6224817037582397,
0.226292684674263,
0.06573280692100525,
-0.21498526632785797,
-0.39400482177734375,
0.5473156571388245,
-0.8545759916305542,
0.802167057991027... |
def run _ svm _ full ( x _ train, y _ train, x _ test, y _ test, randseed, i, param _ grid, n _ trials, timeout, do _ plot, full _ path, training _ subsample, use _ uniform _ fi, primary _ metric ) : # check whether hyperparameters are fixed ( i. e. no hyperparameter sweep required ) or whether a set / range of values ... | [
0.34546709060668945,
0.7045440673828125,
1.0818229913711548,
0.9690038561820984,
-0.21046648919582367,
0.09839887171983719,
0.40457242727279663,
0.7406463623046875,
-0.0831475704908371,
0.5033388733863831,
0.34935009479522705,
0.4456787705421448,
0.41516801714897156,
-0.0837082490324974,
... |
def comp ( self, input1, option ) : if isinstance ( input1, list ) : input1 =''. join ( map ( str, input1 ) ) elif not isinstance ( input1, str ) : input1 = str ( input1 ) result = bin ( int ( input1, 2 ) ^ int ( len ( input1 ) *'1 ', 2 ) ) [ 2 : ] temp = bin ( int ( result, 2 ) + int ('1 ', 2 ) ) [ 2 : ] if str ( opti... | [
-0.45268645882606506,
-0.057481780648231506,
0.8238523602485657,
0.7650106549263,
-0.22279079258441925,
0.5338447093963623,
1.1446770429611206,
0.5413851737976074,
0.8039782047271729,
0.19102008640766144,
-0.330727219581604,
-0.4285920560359955,
-1.1261106729507446,
0.38709020614624023,
... |
def get _ most _ likely ( self ) : highest _ prob = np. amax ( self. trans _ matrix ) indices = np. where ( self. trans _ matrix = = highest _ prob ) goals = list ( zip ( indices [ 1 ], indices [ 0 ] ) ) return highest _ prob, goals | [
-0.2886108458042145,
-0.43568864464759827,
0.6066081523895264,
0.7693954706192017,
0.16647052764892578,
-0.2616836428642273,
-0.5692043304443359,
0.2407495230436325,
-0.2676502764225006,
0.43288666009902954,
0.5204958915710449,
-0.1873796135187149,
0.013762039132416248,
0.22197401523590088... |
def init _ subscriber ( self, frame _ 1, frame _ 2, frame _ 3 ) : self. frame _ robot = frame _ 1 self. frame _ sensor = frame _ 2 self. frame _ global = frame _ 3 rospy. subscriber ( self. pc2 _ topic, pointcloud2, self. online _ mode ) rospy. spin ( ) | [
0.6499282717704773,
-0.5884044766426086,
0.5277891159057617,
1.0410078763961792,
0.9003304839134216,
0.36480528116226196,
-0.77131587266922,
0.18247541785240173,
-0.8885505199432373,
-0.18179479241371155,
-0.43319907784461975,
-0.05119069665670395,
-0.6729106307029724,
0.3642842173576355,
... |
def gf _ sub _ mul ( f, g, h, p ) : return gf _ sub ( f, gf _ mul ( g, h, p ), p ) | [
0.9429682493209839,
0.6989604830741882,
0.40454426407814026,
0.8664925694465637,
-0.5868988037109375,
0.59602952003479,
-0.5962133407592773,
0.9784018397331238,
-1.4320228099822998,
0.14731614291667938,
-0.33530014753341675,
-0.028312060981988907,
-0.5655442476272583,
-1.0445739030838013,
... |
def spec ( self ) : self. _ _ spec = ( " [ { 0 } ] ". format ( _ _ name _ _ ), " host = string ( default ='127. 0. 0. 1') ", " port = integer ( 1, 65535, default = 80 ) ", " timeout = integer ( 0, 600, default = 3 ) ", " status _ uri = string ( default ='/ status') ", " user = string ( default = none ) ", " password = ... | [
0.37155085802078247,
0.18813380599021912,
0.524111270904541,
-0.09972746670246124,
0.10013307631015778,
-0.13838163018226624,
-0.21109899878501892,
-0.17731347680091858,
-0.5625396966934204,
0.24851465225219727,
-0.29272741079330444,
-0.5949448943138123,
-0.3910837769508362,
0.413235604763... |
def _ set _ edge _ weights ( self ) : # mapping node id's to their positions, so we don't have to search later id _ to _ pos _ map = { } for node in self. nodes : id _ to _ pos _ map [ node. get _ id ( ) ] = node. get _ pos ( ) for i, edge in enumerate ( self. edges ) : xs, ys = id _ to _ pos _ map [ edge. get _ source... | [
-0.43427732586860657,
-1.0635747909545898,
0.3599027693271637,
-1.0425883531570435,
0.349505752325058,
0.2550276815891266,
0.4013853967189789,
0.49809935688972473,
-0.7772796154022217,
1.1426275968551636,
-0.2726214826107025,
-0.1340540647506714,
0.3831701874732971,
0.13186605274677277,
... |
def get _ table _ index ( table, t, direction, split _ text = false, flag _ size = false, strip _ text = " " ) : r _ idx, c _ idx = [ - 1 ] * 2 for r in range ( len ( table. rows ) ) : if ( t. y0 + t. y1 ) / 2. 0 < table. rows [ r ] [ 0 ] and ( t. y0 + t. y1 ) / 2. 0 > table. rows [ r ] [ 1 ] : lt _ col _ overlap = [ ]... | [
-0.2203357219696045,
-0.884045422077179,
0.9245635271072388,
0.10326100885868073,
-0.6713850498199463,
0.3145360052585602,
1.2771273851394653,
0.21435704827308655,
-1.1167047023773193,
0.6456872224807739,
-0.748326301574707,
-0.05514137074351311,
0.4995644986629486,
-0.4737485349178314,
... |
def bind _ endpoint ( device, endpoint, setup _ curve = false ) : sck = ctx. socket ( device ) auth = none if opts. curve _ enable and setup _ curve : log ( " setup curve support " ) from jomiel. curve import setup auth = setup ( sck ) # must come before bind. try : sck. bind ( endpoint ) except zmqerror as error : log... | [
-0.4929133355617523,
0.008181333541870117,
0.5090600848197937,
1.138651728630066,
-0.44210225343704224,
-0.15616904199123383,
0.007833749055862427,
-0.5647885799407959,
0.6320937871932983,
0.4908082187175751,
0.32464829087257385,
1.2631590366363525,
-0.7907330393791199,
-0.4839630722999573... |
def _ initialize _ output ( self, time _ len, id _ len ) : log ('initializing new file % s'% self. cf _ compliant _ file,'info') self. cf _ nc = dataset ( self. cf _ compliant _ file,'w ', format ='netcdf3 _ classic') # create global attributes log ('globals ','debug ', self. print _ debug ) self. cf _ nc. featuretype ... | [
0.199506938457489,
-0.3666822612285614,
0.5454250574111938,
-0.7312525510787964,
0.36800557374954224,
0.0972660705447197,
0.11281242966651917,
-0.335024893283844,
-0.9853774309158325,
-0.3552149832248688,
-0.17599332332611084,
-0.231692835688591,
0.5603057742118835,
0.5406481027603149,
0... |
def simulate _ tick ( self ) : for task _ id in self. running : self. finished [ task _ id ] = true self. running = { } for node in self. get _ signatures _ to _ run ( ) : self. running [ node. id ] = true if self. running : return true | [
-0.8528701066970825,
0.9596870541572571,
0.3772279620170593,
-0.13495169579982758,
0.442655473947525,
0.23403015732765198,
0.7287921905517578,
0.07922618836164474,
-1.5685991048812866,
0.7452236413955688,
-1.608251929283142,
-0.5804106593132019,
-0.5961374044418335,
0.3586963415145874,
-... |
def all _ accounts ( self ) : return sorted ( self. config ['accounts']. keys ( ) ) | [
0.3292955756187439,
-0.4915132522583008,
0.40908125042915344,
1.389890432357788,
0.2432752549648285,
0.8681209087371826,
-0.132516548037529,
-0.28603988885879517,
0.5152788758277893,
-0.09239887446165085,
0.1896573156118393,
0.7664109468460083,
0.27900996804237366,
0.4087691009044647,
-0... |
def _ _ init _ _ ( self, left, top, width, height, level ) : if width < 3 or height < 3 : raise attributeerror ( " room too small! " ) self. left = left self. top = top self. width = width self. height = height self. level = level self. doors = list ( ) self. floor = self. floor _ tiles ( ) self. set _ floor _ tiles ( ... | [
-0.2822286784648895,
-0.04175170883536339,
0.5933812260627747,
0.8800270557403564,
-0.7532215714454651,
0.3475918173789978,
0.05475248768925667,
-0.22997263073921204,
-0.006158046890050173,
-0.06970157474279404,
-0.4034785330295563,
-1.1818212270736694,
-0.617228090763092,
1.55460941791534... |
def curve ( * * named ) : return _ newnode ( geometry. vpcurve, named ) | [
0.11862815171480179,
0.12135095149278641,
0.44063666462898254,
0.28288090229034424,
-0.3166641891002655,
0.27344927191734314,
-0.8373345136642456,
-0.8541181683540344,
-0.0132606728002429,
0.14083780348300934,
-0.6706497073173523,
0.6558375954627991,
-0.21688194572925568,
-1.55728983879089... |
def squareofsums ( n ) : return pow ( n * ( n + 1 ) / 2, 2 ) | [
-0.35427749156951904,
0.40682530403137207,
0.3412817418575287,
0.6051126718521118,
0.058469463139772415,
-0.7537598013877869,
0.1937110871076584,
-0.7222947478294373,
0.5752289891242981,
-0.5982934832572937,
-0.7217624187469482,
-0.181901752948761,
0.4684021472930908,
0.28323879837989807,
... |
def _ _ init _ _ ( self ) : self. root ='/ home / jbang36 / eva'self. class _ names = ['car ','bus ','others ','van'] self. class _ dict = { class _ name : i for i, class _ name in enumerate ( self. class _ names ) } x _ train _ norm, x _ test _ norm, y _ train _ dict, y _ test _ dict = get _ uadetrac ( ) anno _ dir = ... | [
-0.20444516837596893,
-0.10531497746706009,
0.7397725582122803,
-0.1118219643831253,
0.47225475311279297,
0.3378963768482208,
0.036131516098976135,
0.4229547083377838,
0.017316795885562897,
-0.8147691488265991,
0.02196560986340046,
-0.42397573590278625,
0.7625216245651245,
-0.2758755385875... |
def generate _ risk _ body ( ) : body = { " id " : 10, " title " : " external risk ", " slug " : " slug ", " description " : " description ", " risk _ type " : " external risk ", " created _ at " : datetime. datetime ( 2019, 1, 1, 12, 30 ), " updated _ at " : datetime. datetime ( 2019, 1, 2, 13, 30 ), " external _ id "... | [
-0.09863404929637909,
-0.4905344247817993,
0.840839684009552,
-1.2385766506195068,
0.3471159338951111,
0.3200981914997101,
-1.327282428741455,
-0.7257570028305054,
-0.4036640226840973,
0.5928991436958313,
-1.0933783054351807,
0.25072553753852844,
-0.39392516016960144,
-0.3366599678993225,
... |
def get _ vanishing _ point _ callback ( color _ image _ msg, vdisp _ line, cv _ bridge, cuda _ context, gabor _ kernels _ gpu, vanishing _ point _ pub, gabor _ filter _ kernels _ pubs = none, gabor _ energies _ pubs = none, gabor _ combined _ energies _ pub = none, vp _ candidates _ region _ pub = none ) : color _ ima... | [
0.8617995381355286,
0.07015150785446167,
0.7518913745880127,
0.5488840341567993,
0.5963858962059021,
-0.1049378514289856,
-0.018532726913690567,
-0.08035653084516525,
0.4200262129306793,
1.0420271158218384,
0.6503556966781616,
0.18431910872459412,
0.03949226066470146,
-0.14867626130580902,... |
def filter ( self, function : optional [ callable ] = none, with _ indices = false, input _ columns : optional [ union [ str, list [ str ] ] ] = none, batch _ size : optional [ int ] = 1000, remove _ columns : optional [ list [ str ] ] = none, keep _ in _ memory : bool = false, load _ from _ cache _ file : bool = true,... | [
-0.5890331864356995,
0.16134220361709595,
0.8293204307556152,
-0.09574566781520844,
-0.8781219124794006,
-0.6839977502822876,
0.17292286455631256,
0.20506468415260315,
0.10564281046390533,
-0.6932644248008728,
0.09064503014087677,
0.7951893210411072,
0.673802375793457,
-0.5819120407104492,... |
def get _ spectral _ index ( self, run ) : return self [ str ( run ) ]. get _ spectral _ index ( ) | [
-1.2377651929855347,
-0.8428730368614197,
0.23157788813114166,
-0.3507053852081299,
-0.8749894499778748,
0.06979060918092728,
0.25677305459976196,
-1.003566861152649,
-0.552677571773529,
-0.11489449441432953,
0.3449003994464874,
1.8139395713806152,
-0.7421016097068787,
-0.15040525794029236... |
def extract _ unmasked _ data ( radar, field, bad = - 32768 ) : return radar. fields [ field ] ['data']. filled ( fill _ value = bad ) | [
-0.15653613209724426,
0.45409324765205383,
0.35305967926979065,
-0.6586302518844604,
0.8969919085502625,
0.647341787815094,
-0.4094451665878296,
-0.7117347121238708,
-0.062251102179288864,
-0.04278833791613579,
-0.6897656321525574,
0.1821753829717636,
-0.3774179518222809,
0.272863447666168... |
def load _ from _ results _ logger ( self, results _ logger ) : try : for configuration, r in results _ logger. get _ results ( self. config _ space ) : budget = r [ 0 ] loss = np. inf if r [ 2 ] is none else r [ 2 ] [ " loss " ] self. add _ configuration ( configuration, budget, loss ) except : print ('except') # star... | [
-0.48289310932159424,
0.006943569052964449,
0.4848274886608124,
0.3808695673942566,
0.33869609236717224,
-0.24519485235214233,
-0.34483230113983154,
-0.6379765868186951,
-0.05408341810107231,
0.3401477634906769,
-0.12712763249874115,
-1.1904999017715454,
0.2225014716386795,
1.2347649335861... |
def items ( self ) : return self. cf. items ( self. main _ section ) | [
-0.2266836166381836,
-0.5046059489250183,
0.21115431189537048,
0.30444657802581787,
0.2168029546737671,
0.005324633326381445,
-0.177472785115242,
-0.19648030400276184,
-1.0083096027374268,
-0.7262150049209595,
0.4946824014186859,
-0.6070773601531982,
0.13891912996768951,
0.4447895288467407... |
def test _ get ( ) : with patch. object ( swift, " _ auth ", magicmock ( ) ) : assert swift. get ( ) assert swift. get ( " mycontainer " ) assert swift. get ( " mycontainer ", path = " myfile. png ", return _ bin = true ) assert swift. get ( " mycontainer ", path = " myfile. png ", local _ file = " / tmp / myfile. png ... | [
-0.36803752183914185,
0.12390141934156418,
0.5650269985198975,
-0.2878977954387665,
0.8459941148757935,
0.39293214678764343,
-0.09409994632005692,
0.06961879134178162,
-0.09937500208616257,
-1.083487629890442,
0.4238794445991516,
0.4678668677806854,
0.18811827898025513,
-0.0006008701166138... |
def compute _ semester _ gpa ( model ) : # pass return np. mean ( [ a. grade for a in model. schedule. agents ] ) | [
-0.2801661491394043,
-1.0352383852005005,
0.7220113277435303,
0.41202256083488464,
-0.9719660878181458,
0.801798939704895,
0.5000908374786377,
0.566145658493042,
0.26066839694976807,
0.8571062684059143,
0.6207152605056763,
0.2095186710357666,
-0.2560626268386841,
0.4380623996257782,
-0.8... |
def data _ places _ points ( self, p, game, results, participants ) : if game. score _ kind = ='points': self. points _ data ( p, game, results, participants ) if game. score _ kind = ='places': self. places _ data ( p, game, results ) | [
-0.1755213439464569,
0.44597020745277405,
0.4079177975654602,
0.2237066626548767,
0.4549771249294281,
0.9563870429992676,
-0.3853488862514496,
0.4161919951438904,
0.2857254445552826,
0.5980098843574524,
0.7410194277763367,
0.7194007039070129,
0.02047792635858059,
0.0866265669465065,
-0.1... |
def getupperandlowerlimit ( self, values, multiplier ) : mean = numpy. mean ( values ) std = numpy. std ( values, ddof = 1 ) upper = mean + ( multiplier * std ) lower = mean - ( multiplier * std ) return lower, upper | [
-0.11718530207872391,
0.22562508285045624,
0.544625461101532,
-0.022147465497255325,
-0.9038233160972595,
0.5395249724388123,
0.6681531667709351,
-0.11562079936265945,
1.202230453491211,
0.05969487875699997,
-0.13010188937187195,
0.8730442523956299,
-0.6251281499862671,
0.6018444895744324,... |
def v _ center _ id ( self ) - > optional [ str ] : return pulumi. get ( self, " v _ center _ id " ) | [
1.7068140506744385,
-0.7505950927734375,
0.40778982639312744,
0.5865753293037415,
0.6132939457893372,
0.6312728524208069,
-0.42789748311042786,
-0.262189656496048,
1.8846715688705444,
1.4711651802062988,
0.4871726334095001,
1.3746278285980225,
-0.20484815537929535,
-0.9140395522117615,
-... |
def parse _ arguments ( ) : parser = argparse. argumentparser ( ) parser _ command = parser. add _ subparsers ( dest ='command') _ = parser _ command. add _ parser ( " conftest ", help = " configtest help " ) command _ createkeytab = parser _ command. add _ parser ( " createkeytab ", help = " createkeytab command help ... | [
-0.05835545435547829,
-0.13552019000053406,
0.9071962237358093,
0.037773799151182175,
0.6434338092803955,
0.621065616607666,
0.03474278748035431,
0.2196824699640274,
-1.0620907545089722,
0.07584934681653976,
-0.3792426884174347,
-0.2328391969203949,
-0.17532958090305328,
0.9080018401145935... |
def extreme _ supported _ nondominated _ points ( self ) : return self. _ extreme _ supported _ nondominated _ points | [
-0.3340180218219757,
0.32019877433776855,
0.2098209708929062,
0.44231998920440674,
-0.06806839257478714,
1.8958779573440552,
-0.8921306133270264,
0.6401771306991577,
0.19706353545188904,
0.47480449080467224,
-1.4409998655319214,
0.6244395971298218,
-0.4238405227661133,
0.019761361181735992... |
def bri _ inc ( id, value ) : return put _ state ( id, { " bri _ inc " : value } ) | [
-0.1626005619764328,
0.6702927947044373,
0.32003042101860046,
0.9005053043365479,
-0.48116809129714966,
0.7869932055473328,
0.16944792866706848,
-0.08571735769510269,
-0.07168637216091156,
0.0005061112460680306,
-1.3988019227981567,
0.38102051615715027,
-0.5767991542816162,
-0.998860716819... |
def train ( model, ts, vs, es = none, * * kwargs ) : n = int ( kwargs. get ('test _ epochs ', 5 ) ) do _ early _ stopping = bool ( kwargs. get ('do _ early _ stopping ', true ) ) epochs = int ( kwargs. get ('epochs ', 20 ) ) model _ file = get _ model _ file ('classify ','tf ', kwargs. get ('basedir') ) if do _ early _... | [
-0.4593155086040497,
0.907219648361206,
0.6158688068389893,
0.44926437735557556,
0.6146108508110046,
-0.12142177671194077,
0.5545230507850647,
0.1972184181213379,
-1.128470778465271,
-0.30263254046440125,
-0.49017614126205444,
-0.4992956519126892,
0.667646586894989,
-0.5071834921836853,
... |
def next _ flow ( self, request ) : ctx. log. warn ( " - - - - - - - - - - - - - - - - - - - - - - - - - - - - start hashing request - - - - - - - - - - - - - - - - - - - - - - - - - \ n " ) hsh = self. _ hash ( request ) ctx. log. warn ( " - - - - - - - - - - - - - - - - - - - - - - - - - - finished hashing request - ... | [
-0.24184440076351166,
-0.4855269491672516,
0.7379021048545837,
0.4158271551132202,
-0.7071838974952698,
-0.018510188907384872,
0.22033198177814484,
-1.4131025075912476,
0.7225823402404785,
-0.4543413817882538,
0.39665913581848145,
0.24208936095237732,
-1.047750473022461,
-0.164156362414360... |
def prove _ in _ model _ full ( formula : formula, model : model ) - > proof : assert formula. operators ( ). issubset ( {'t ','f ','- > ','~ ','& ','|'} ) assert is _ model ( model ) # optional task 6. 6 | [
0.16354066133499146,
0.369498610496521,
0.558792769908905,
0.8352410793304443,
-0.10732844471931458,
-0.007744663394987583,
0.39316853880882263,
0.2940019965171814,
-0.601320743560791,
0.10311022400856018,
-0.5762316584587097,
-0.68674236536026,
0.045858219265937805,
0.7663446664810181,
... |
def calcversionvalue ( ver _ str = " 0. 0. 0 " ) : ver _ str =''. join ( [ char for char in ver _ str if char. isdigit ( ) or char = = '.'] ) ver _ lvl = ver _ str. split ( u ". " ) if len ( ver _ lvl ) < 3 : return 0 major = int ( ver _ lvl [ 0 ] ) * 1000 minor = int ( ver _ lvl [ 1 ] ) if len ( ver _ lvl [ 2 ] ) < = ... | [
0.25861337780952454,
-0.6477431654930115,
0.7221419811248779,
0.6402668952941895,
-1.1724680662155151,
-0.3375491499900818,
0.5325317978858948,
0.773597002029419,
0.20940716564655304,
-0.09055722504854202,
-0.5645295977592468,
0.009837809950113297,
-0.8600925803184509,
-0.18105833232402802... |
def searchforplan ( some _ plan, left, right, boat, backup ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # to do : # add your search code below. mind the following constraints : # you are not to use graph s... | [
0.12565205991268158,
0.36011621356010437,
0.8256086707115173,
0.31934162974357605,
-0.25804996490478516,
0.10959633439779282,
-0.009171716868877411,
-1.157983660697937,
-0.5323162078857422,
-0.31985607743263245,
-0.6281904578208923,
0.3630825877189636,
-1.27390456199646,
0.2343788594007492... |
def take _ card ( self, player ) : if self. keep is true : bank. cards. remove ( self ) self. player. inventory. place _ card ( self ) else : return false | [
-0.1369805932044983,
-0.1833069920539856,
0.6998673677444458,
-0.42616596817970276,
0.275075763463974,
1.1106985807418823,
0.47178390622138977,
0.26964685320854187,
-0.13719290494918823,
0.5614202618598938,
-0.6993952393531799,
-0.8652979135513306,
-1.1064720153808594,
-0.34632954001426697... |
def test _ multiple _ gen _ nexts _ closed _ in _ different _ order ( self ) - > none : id _ gen = self. _ create _ id _ generator ( ) async def test _ gen _ next ( ) - > none : ctx1 = id _ gen. get _ next ( ) ctx2 = id _ gen. get _ next ( ) ctx3 = id _ gen. get _ next ( ) # request three new stream ids. self. asserteq... | [
-0.5987915992736816,
-0.10861892998218536,
0.8432117700576782,
-0.04286360740661621,
0.7146033048629761,
0.5349715948104858,
0.25380727648735046,
-0.6938040256500244,
-0.14656144380569458,
-0.5751880407333374,
-1.1202577352523804,
-0.10594847053289413,
-0.6191319823265076,
0.08493053168058... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.