text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def filters ( ) : classes = {'state': state,'amenity': amenity,'place': place } states = storage. all ( classes [ " state " ] ). values ( ) amenities = storage. all ( classes ['amenity'] ). values ( ) places = storage. all ( classes ['place'] ). values ( ) return render _ template ('100 - hbnb. html ', states = states,... | [
-0.4894700050354004,
0.6435859799385071,
0.45933011174201965,
-0.26225224137306213,
0.20799309015274048,
0.5763223171234131,
-0.2079230397939682,
0.5216649770736694,
-0.05932285636663437,
0.5750253200531006,
0.14898639917373657,
-0.167962446808815,
0.4936991035938263,
0.26550135016441345,
... |
def fitness _ function ( self, damping _ parameters ) : surface _ area, standard _ deviation = damping _ parameters return self. area _ damping ( surface _ area ) \ * self. std _ damping ( standard _ deviation ) | [
0.17734074592590332,
-0.3160119652748108,
0.36419931054115295,
0.5413820743560791,
-0.05534428358078003,
0.6397162079811096,
1.6496145725250244,
-0.035062890499830246,
0.09023195505142212,
-0.1379062384366989,
-0.023143870756030083,
0.40486061573028564,
-0.47065216302871704,
0.657875359058... |
def radius ( self ) : return math. pow ( self. _ resolution, self. _ max _ depth - 1 ) | [
0.10064017027616501,
0.6099279522895813,
0.42465314269065857,
0.11279317736625671,
0.42858681082725525,
0.11526655405759811,
0.6848694086074829,
0.15984979271888733,
-0.26743248105049133,
-0.382274329662323,
0.25288841128349304,
0.4873669445514679,
-1.2042152881622314,
0.3291958272457123,
... |
def test _ register _ route _ works ( self, * _ ) : # make sure we're logged out self. open ( base _ url +'/ logout') # go to main page self. open ( base _ url +'/ register') # validate that the user is taken to / login assert self. get _ current _ url ( ) = = base _ url +'/ register'self. assert _ text ('register ','h... | [
-1.040884256362915,
0.8010373115539551,
0.3411329686641693,
1.088614583015442,
1.220394253730774,
0.32381364703178406,
-0.025826940312981606,
0.7294790744781494,
-0.37633752822875977,
-0.5901932120323181,
-0.11873041838407516,
0.11638134717941284,
-0.046507708728313446,
-0.1539278626441955... |
async def get _ teacher _ app _ by _ channel ( self, channel _ id : int ) - > list [ str ] : mycursor, db = await the _ database ( ) await mycursor. execute ( " select * from teacherapplication where txt _ id = % s ", ( channel _ id, ) ) teacher _ app = await mycursor. fetchall ( ) await mycursor. close ( ) return teac... | [
-0.350104957818985,
-0.5063803791999817,
0.519202470779419,
-0.5027963519096375,
0.44084227085113525,
0.39826905727386475,
-0.6689850091934204,
-0.26302841305732727,
-0.0366392508149147,
1.5319169759750366,
-0.10030803829431534,
0.10224316269159317,
-0.43531814217567444,
1.0844202041625977... |
def _ _ init _ _ ( self, source = ops. constant ( 1. ) ) : self. _ source = source self. _ event = event. subscribe ( self. _ source, _ ( self ). _ update, self ) | [
-0.10000210255384445,
0.8093845844268799,
0.411306232213974,
0.264385849237442,
-0.9449682831764221,
-0.29367372393608093,
0.1427093893289566,
0.6994918584823608,
0.34854447841644287,
-0.32382848858833313,
-1.5701167583465576,
0.4925362169742584,
0.6476333141326904,
0.344842791557312,
0.... |
def proxy _ id ( self, proxy _ id ) : self. _ proxy _ id = proxy _ id | [
0.8945899605751038,
-0.09678316116333008,
-0.021977687254548073,
-0.03178614750504494,
0.30311280488967896,
0.7962717413902283,
-0.5157237648963928,
1.6057590246200562,
0.06966101378202438,
-0.19115470349788666,
-0.746002197265625,
0.4969809353351593,
-0.7448825240135193,
1.058995366096496... |
def _ vhost _ menu ( domain : str, vhosts : iterable [ virtualhost ] ) - > tuple [ str, int ] : # free characters in the line of display text ( 9 is for'|'formatting ) free _ chars = display _ util. width - len ( " https " ) - len ( " enabled " ) - 9 if free _ chars < 2 : logger. debug ( " display size is too small for... | [
0.040470339357852936,
-0.1576552391052246,
0.6521403193473816,
-0.10423829406499863,
-1.035629153251648,
-0.4975042939186096,
0.40390610694885254,
-0.5067742466926575,
-0.18875336647033691,
0.46247461438179016,
0.3734303116798401,
0.4276079833507538,
0.263110876083374,
0.44368886947631836,... |
def get _ voronoi _ node _ edge ( structure, rad _ dict, write _ nt2 _ file = false ) : with scratchdir ( '.') : name = " temp _ zeo3 " cssr _ file = name + ". cssr " rad _ file = name + ". rad " mass _ file = name + ". mass " out _ file = name + ". nt2 " cssr = zeocssr ( structure ) with open ( cssr _ file,'w +') as f... | [
0.21913176774978638,
-1.176540732383728,
0.686516523361206,
-0.7161581516265869,
0.41971009969711304,
0.39491507411003113,
-0.11701987683773041,
0.4001566469669342,
-0.6515960693359375,
0.12733812630176544,
-0.23397845029830933,
-0.43968406319618225,
0.1815865933895111,
0.539151668548584,
... |
async def get _ objects _ full _ for _ lst ( entities ) : res = await runquerysinglekey ( cacheobjectsfull, entities, " " " select? base? prop? value? datatype where { values? base { % s }? base? prop? value. filter ( isiri (? value ) ). bind ( " iri " as? datatype ) filter (? prop not in ( " " " + ex _ cls + " " " ) )... | [
-1.0477726459503174,
0.3251801133155823,
0.5468194484710693,
-0.1619214117527008,
0.18377238512039185,
-0.0794902965426445,
-0.492171972990036,
0.2979860305786133,
0.24221132695674896,
0.4996616542339325,
-0.0703684613108635,
0.09796358644962311,
-0.02276087924838066,
0.7349714636802673,
... |
def create _ pgraphs ( self, filterlst ) : for p in self. plst : p. dependence ( self ) print'\ nprimgraph'for p in self. plst : p. create _ primgraph ( filterlst ) print'\ ntotgraph \ n'for p in self. plst : p. create _ totgraph ( filterlst ) | [
-0.6176862120628357,
0.6645116209983826,
0.40523475408554077,
0.2924605906009674,
-0.1482751965522766,
1.1599458456039429,
0.5188992619514465,
-0.22779938578605652,
0.15386036038398743,
0.664208173751831,
-1.15329110622406,
0.8433439135551453,
-1.0425134897232056,
-0.2799624502658844,
-0... |
def delete ( self, index ) : if not 0 < = index < self. _ size : raise indexerror ('invalid index') for i in range ( index, self. _ size - 1 ) : self. _ data [ i ] = self. _ data [ i + 1 ] self. _ data [ self. _ size - 1 ] = none self. _ size - = 1 if self. _ capacity / self. quarter = = self. _ size and self. _ capaci... | [
0.05809900164604187,
0.22488060593605042,
0.7353172898292542,
-0.4240092933177948,
-0.02962769754230976,
-0.3746645152568817,
0.7028454542160034,
-0.9885963201522827,
0.6360576152801514,
-0.682965874671936,
-0.3304884135723114,
0.5011405944824219,
-0.4883624315261841,
-0.5490494966506958,
... |
def seed _ wildcard ( df _ in, wildcard _ list, wildcard _ name, r = 0. 1, col ='target') : added _ rows = [ ] for k in range ( len ( df _ in ) ) : temp = df _ in [ col ]. values. tolist ( ) [ k ] for j in wildcard _ list : if j in temp : if random. uniform ( 0, 1 ) < r : added _ rows. append ( [ temp. replace ( j, wil... | [
-0.3915405571460724,
0.17927925288677216,
0.7172342538833618,
0.4001328647136688,
-0.08785803616046906,
0.07638527452945709,
0.28430619835853577,
1.2326616048812866,
0.18419383466243744,
0.6621957421302795,
0.32390132546424866,
0.6668118238449097,
-0.3086543083190918,
-0.07159534841775894,... |
def expectcommands ( cls, * cmds ) : assert not cls. _ in _ test,'mockpopen. expectcommands can not be nested.'cls. _ expected _ commands = list ( reversed ( cmds ) ) cls. _ finished _ commands = [ ] cls. _ in _ test = true try : yield # test runs here cls. _ assertallcommandswererunproperly ( ) finally : cls. _ in _ t... | [
-0.8930420875549316,
-0.22964417934417725,
0.7196062803268433,
0.6565576791763306,
0.578454852104187,
-0.2713834047317505,
0.4369679391384125,
-0.32752835750579834,
-0.27687332034111023,
-0.9576013684272766,
-0.2601132094860077,
-0.10119320452213287,
-0.7438911199569702,
-0.039773870259523... |
def plot _ confusion _ matrix ( content, save _ plot = false, path = none ) : # set sans - serif font. plt. rcparams ['font. serif'] ='times new roman'# set font family. plt. rcparams ['font. family'] ='serif'figure, axis = plt. subplots ( ) # drop axis. axis. axis ('off') # declare a table object. table = axis. table ... | [
0.7089003920555115,
0.44110190868377686,
0.6786580085754395,
-0.13675633072853088,
-0.5504977107048035,
-0.17533379793167114,
1.535309910774231,
0.22047100961208344,
-0.8029959201812744,
0.5287248492240906,
0.3700481951236725,
-0.02397771179676056,
-0.02991868555545807,
0.07447322458028793... |
def add _ view ( self ) : if len ( self. _ _ inps ) = = 0 or len ( self. _ _ fmaps ) = = 0 : raise valueerror ('specify the number of input dimensions and the image size!') nout = int ( self. _ _ fmaps [ - 1 ] * self. _ _ inps [ - 1 ] [ 0 ] * self. _ _ inps [ - 1 ] [ 1 ] ) self. _ _ model. append ('{ } : add ( nn. view... | [
-0.7999928593635559,
-0.14001280069351196,
0.6147154569625854,
-0.46560850739479065,
-0.277635395526886,
-0.3001188337802887,
0.5086871981620789,
-0.316969633102417,
0.2557334303855896,
-1.8035306930541992,
-0.1588689535856247,
-0.07577294856309891,
-0.9098321199417114,
0.7781420946121216,... |
def slugify ( value ) : value = removenonascii ( value ) value = re. sub ( r'[. / ;, ] ','', value ) return value | [
0.9590656161308289,
-0.6172999143600464,
0.471978098154068,
-1.0167604684829712,
-0.6002907752990723,
-0.2744930386543274,
-1.080215334892273,
1.3304938077926636,
-0.04089877009391785,
0.2899606227874756,
-0.36890730261802673,
0.11924638599157333,
-0.5261476635932922,
-0.3750673532485962,
... |
def _ remove _ button _ fired ( self ) : self. remove ( ) | [
1.4148294925689697,
-0.7791858911514282,
0.18146251142024994,
-0.31648701429367065,
0.031397148966789246,
-0.15031331777572632,
0.47976717352867126,
1.1989028453826904,
0.21575257182121277,
-0.13109931349754333,
-1.41239595413208,
-0.36704421043395996,
0.13919034600257874,
0.34551486372947... |
def plasma ( width, height, type = none, factory = none ) : # @ reservedassignment spec ='plasma :'if type : spec + = type return io. read ( spec, width, height, factory = factory ) | [
-0.11541122198104858,
-0.05859967693686485,
0.40725085139274597,
0.088612399995327,
-0.6594230532646179,
-0.4071546196937561,
-1.0361706018447876,
-0.6932258605957031,
-0.5466678738594055,
-0.2628526985645294,
0.9801315069198608,
0.5978131890296936,
-0.26019948720932007,
-0.572669267654419... |
def get _ images ( directory = none ) : if directory = = none : directory = os. getcwd ( ) # use working directory if unspecified image _ list = [ ] # initialize aggregaotrs file _ list = [ ] directory _ list = os. listdir ( directory ) # get list of files for entry in directory _ list : absolute _ filename = os. path.... | [
-1.3983430862426758,
0.049554623663425446,
0.5242438316345215,
-0.2229246348142624,
0.6627278327941895,
-0.3119594156742096,
0.2725045382976532,
0.9514909386634827,
0.4794408082962036,
0.5754541754722595,
0.8287028670310974,
0.34131860733032227,
0.47702234983444214,
1.8524726629257202,
0... |
def from _ dict ( cls, dikt ) - >'zonelist': return util. deserialize _ model ( dikt, cls ) | [
-0.5420653223991394,
-0.3017719089984894,
0.13878870010375977,
-0.3961261212825775,
-0.5598171949386597,
0.24961808323860168,
-0.1947852522134781,
0.19718575477600098,
0.9062629342079163,
0.7609000205993652,
-1.1452374458312988,
-1.1800169944763184,
0.3394874334335327,
-0.34890446066856384... |
def get _ constant _ by _ name ( property _ name ) : constant = [ c for c in _ constants if c. property _ name = = property _ name ] if len ( constant ) = = 0 : return none else : return constant [ 0 ] | [
0.5015287399291992,
-0.9182183742523193,
0.4671635925769806,
0.4178081452846527,
-0.0065618399530649185,
-0.5139477849006653,
-0.5706160664558411,
-0.684210479259491,
-0.502450704574585,
1.1529340744018555,
0.3869484066963196,
-0.057627543807029724,
-0.6186903715133667,
-1.017910122871399,... |
def closing ( self, kernel _ size = 5 ) : return ( cv2. morphologyex ( self. im, cv2. morph _ close, np. ones ( ( kernel _ size, kernel _ size ), np. uint8 ) ) ) | [
-0.6925835013389587,
0.11547259986400604,
0.5948849320411682,
0.8436859846115112,
-1.190788984298706,
0.10385078191757202,
-0.2916099429130554,
-0.5453274846076965,
0.5786740183830261,
0.413529634475708,
0.388407826423645,
-0.0424654558300972,
-0.7409703135490417,
0.7346961498260498,
0.1... |
def edit _ column _ pii _ flag ( self, column _ uuid, pii _ flag ) : q = db. session. query ( columninfo ). filter _ by ( uuid = column _ uuid ) column = q. first ( ) column. pii _ flag = pii _ flag db. session. commit ( ) return column | [
-0.5515238642692566,
-0.5173023343086243,
0.3603070080280304,
-0.04110278934240341,
0.3535606861114502,
0.3093838691711426,
0.02933489717543125,
0.8876656293869019,
-1.3067525625228882,
1.0792732238769531,
-0.5896969437599182,
-0.4630380868911743,
-1.0461410284042358,
-1.5421911478042603,
... |
def add _ player ( self, player ) : self. _ players [ player. name ] = player | [
-1.6649274826049805,
-0.03148190304636955,
0.16265299916267395,
-0.5469926595687866,
0.3186998963356018,
0.8103448748588562,
-0.4018231928348541,
-0.37265416979789734,
0.4086412787437439,
0.2882792055606842,
-0.9125840067863464,
-0.1250038743019104,
-0.7692973017692566,
0.4185841977596283,... |
def is _ metric _ line ( line ) : return all ( [ line. startswith ('metric'), valid _ metric _ type ( get _ field ( metric _ type _ field, line, metric _ field _ count ) ) ] ) | [
0.9000291228294373,
0.32574889063835144,
0.2899191081523895,
1.538314700126648,
0.5140316486358643,
0.863533616065979,
0.06939058005809784,
-0.6231818199157715,
-0.8333146572113037,
0.3762423098087311,
0.2204163521528244,
-0.0172201506793499,
0.2138582170009613,
0.24195566773414612,
-0.8... |
def latest _ successful _ commit ( session, project _ id, branch, batch _ label = none, within _ last = 20 ) : ci _ commits = ( session. query ( cicommit ). options ( joinedload ( cicommit. batches ) ). filter ( cicommit. project _ id = = project _ id, # we try to be accomodating with the usual remote branch name or _ ... | [
0.961986780166626,
-0.8415653109550476,
0.6415275931358337,
0.016422409564256668,
-0.4191235899925232,
0.007094239350408316,
-0.6680357456207275,
0.2331901490688324,
-1.0743769407272339,
-0.051905557513237,
0.8990684151649475,
-0.11651181429624557,
-0.9382103681564331,
-0.31148308515548706... |
def _ init _ value ( self, value : str ) - > none : self. all = value self. prolix = scan ( self. all ) self. featured = add _ observables ( self. prolix, self. language ) self. prolixtokenization = self. _ prolix _ pass ( self. all, self. prolix ) | [
0.013866208493709564,
-0.8067517280578613,
0.38804444670677185,
0.4853886663913727,
-0.6416435837745667,
0.1963317096233368,
-0.442891389131546,
0.24857498705387115,
-0.16176745295524597,
-0.8042694926261902,
-0.501637876033783,
0.12354062497615814,
0.8229255676269531,
1.322471022605896,
... |
def construct _ measurement ( model _ name, gpu _ metric _ values, non _ gpu _ metric _ values, comparator ) : # gpu _ data will be a dict whose keys are gpu _ ids and values # are lists of records gpu _ data = { } for gpu _ uuid, metrics _ values in gpu _ metric _ values. items ( ) : gpu _ data [ gpu _ uuid ] = [ ] gp... | [
-0.07875017821788788,
0.34149041771888733,
0.5582059025764465,
0.1469615399837494,
-0.7060900926589966,
0.5742993354797363,
0.24271157383918762,
0.28396451473236084,
-0.9202624559402466,
0.10342612117528915,
0.19995248317718506,
-0.620100736618042,
-0.48467037081718445,
0.7372146844863892,... |
def get _ query _ string ( self ) : if self. options. postdata : return self. options. postdata elif self. options. getdata : return self. options. getdata return " " | [
-0.030434420332312584,
0.24709856510162354,
0.3755686581134796,
-0.46140018105506897,
0.6093451976776123,
1.1523832082748413,
-1.0285229682922363,
-1.0813044309616089,
0.17870908975601196,
-0.49818047881126404,
1.4960479736328125,
0.5212435126304626,
-0.886052131652832,
0.03016078472137451... |
def shape ( self ) - > tuple [ int, int ] : if self. _ indices is not none : return ( self. _ indices. num _ rows, self. _ data. num _ columns ) return self. _ data. shape | [
-0.723203718662262,
0.4364446699619293,
0.4289136826992035,
-0.5308607816696167,
0.6859040856361389,
-0.005574256647378206,
0.6386240124702454,
0.04587221518158913,
0.25917288661003113,
-0.18880939483642578,
0.2515922784805298,
0.130813866853714,
0.06573749333620071,
-0.5865691304206848,
... |
def load _ user ( user _ id ) : record = get ( user _ id ) return user ( record [ " id " ], record [ " username " ] ) | [
-0.2335101217031479,
-0.027565816417336464,
0.16427280008792877,
-0.5107947587966919,
-0.43128034472465515,
-0.0877440869808197,
-0.5793455839157104,
-0.03687204793095589,
0.31499603390693665,
-0.7594940066337585,
-0.575263261795044,
0.0676596537232399,
-0.04295411333441734,
-0.23573467135... |
def get _ instance ( self, payload : dict [ str, any ] ) - > hostednumberorderinstance : return hostednumberorderinstance ( self. _ version, payload ) | [
-0.013151225633919239,
0.25576159358024597,
0.4148431122303009,
-0.5267646312713623,
-0.9897757172584534,
1.373367428779602,
-0.8657131195068359,
0.27514219284057617,
-0.2782958149909973,
-0.7160877585411072,
-0.7386667728424072,
-0.24454645812511444,
-0.6194808483123779,
-0.45592662692070... |
def _ compute _ least _ common _ multiple ( num1 : int, num2 : int ) : import math return int ( num1 * num2 / math. gcd ( num1, num2 ) ) | [
-0.13426874577999115,
0.002615270670503378,
0.3448885977268219,
-0.39841580390930176,
0.42182251811027527,
-0.0918067917227745,
-0.3748128116130829,
-0.4572485089302063,
-0.7419807314872742,
-0.07061804085969925,
0.5088803172111511,
0.35744941234588623,
-0.9019120931625366,
0.0933668166399... |
def _ _ eq _ _ ( self, other ) : if isinstance ( other, payload ) : return self. _ uuid = = other. uuid return false | [
-0.9336956143379211,
-0.43629950284957886,
0.5773754715919495,
-0.06285662949085236,
-0.3481621742248535,
0.404019832611084,
-0.2211514562368393,
-0.8362806439399719,
0.4364537298679352,
0.4478077292442322,
-0.5612494945526123,
0.09728727489709854,
-0.37052881717681885,
-0.5524362325668335... |
def resource _ path ( relative _ path ) : base _ path = getattr ( sys,'_ meipass ', os. path. dirname ( os. path. abspath ( _ _ file _ _ ) ) ) return os. path. join ( base _ path, relative _ path ) | [
0.5025182962417603,
-1.3206944465637207,
0.6569886803627014,
0.11845247447490692,
-0.6047664880752563,
0.8652135729789734,
1.0248959064483643,
-0.2931325435638428,
0.023868700489401817,
0.23466238379478455,
1.0713856220245361,
-1.228732705116272,
-0.3787382245063782,
-0.347709983587265,
... |
def go _ to _ sign _ in _ page ( self ) : # click on " sign in " button self. wait _ and _ click ( locator _ type = by. xpath, locator = self. constants. sign _ in _ button _ xpath ) self. log. info ('go to sign in form') return registrationandsigninpage ( self. driver ) | [
-0.32875433564186096,
-0.06272996962070465,
0.4309140145778656,
0.03431307524442673,
0.7157031893730164,
0.14931070804595947,
0.17937733232975006,
0.826110303401947,
-0.30682462453842163,
0.5811693072319031,
-0.8175556659698486,
-0.3781275153160095,
-0.451066792011261,
-0.37473297119140625... |
def values ( self ) - > sequence [ str ] : return pulumi. get ( self, " values " ) | [
-0.19903840124607086,
0.6567075252532959,
0.4322796165943146,
0.5168930292129517,
1.906509280204773,
0.9552402496337891,
-0.8001511096954346,
0.06729639321565628,
0.08635388314723969,
0.18722248077392578,
-0.9314318299293518,
0.2700278162956238,
0.5802361965179443,
0.11021056771278381,
-... |
def _ set _ default _ values ( self, privacy _ settings : privacysettings ) : data = self. _ normalize _ data ( privacy _ settings. get _ public _ info ( ) ) for k, v in data. items ( ) : if v : self. fields [ k ]. widget. attrs ['checked'] ='' | [
-0.5267747640609741,
1.1514601707458496,
0.1813165247440338,
0.20610445737838745,
1.4049376249313354,
0.4839893579483032,
-0.20945321023464203,
0.03459637984633446,
-1.0059744119644165,
0.2735024094581604,
-0.3329339623451233,
0.05662291869521141,
-0.8072465658187866,
0.9252737164497375,
... |
def test _ generatezredbkg ( self ) : config _ file = os. path. join ('data _ for _ tests ','testconfig. yaml') config = configuration ( config _ file ) self. test _ dir = tempfile. mkdtemp ( dir = '. / ', prefix ='testredmapper -') config. outpath = self. test _ dir config. bkgfile = os. path. join ( config. outpath,'... | [
-0.07967622578144073,
0.16669109463691711,
0.7176344990730286,
0.7714301943778992,
0.15525464713573456,
0.013625399209558964,
0.6857090592384338,
-0.2853795886039734,
-0.1209515854716301,
-0.30079880356788635,
-0.24501237273216248,
0.1017853245139122,
-0.3676529824733734,
0.880437374114990... |
def read ( self, file _ name : optional [ path ] = none ) : if file _ name is none : if self. file _ name is not none : file _ name = self. file _ name else : raise valueerror ('file _ name must be specified') with open ( file _ name,'rb') as map _ fileobj : # read in the maplet header # skip the first six bytes map _ ... | [
-0.19524021446704865,
-1.382940649986267,
1.0411545038223267,
0.11079148203134537,
-0.23629650473594666,
0.5854694247245789,
-0.4409709870815277,
-0.16998249292373657,
-0.813300609588623,
0.115179643034935,
-0.6191113591194153,
0.02786760777235031,
0.05388718470931053,
0.04894730821251869,... |
def name ( self ) - > str : return pulumi. get ( self, " name " ) | [
0.43013668060302734,
-0.07677990943193436,
0.5298380851745605,
0.0733434334397316,
0.2685459554195404,
0.9129801392555237,
-0.3662375509738922,
-0.18939101696014404,
0.07825518399477005,
0.993715226650238,
0.18270084261894226,
0.5780794024467468,
0.719538152217865,
-0.8229866623878479,
-... |
def launch _ ospf6d ( ospf6dconf, ospf6dpid, zebraapi, loaddr, port, ospf6dbin = ospf6dbin ) : return startospf6d % ( ospf6dbin, ospf6dconf, loaddr, port, ospf6dpid, zebraapi ) | [
0.07867009192705154,
-1.4346615076065063,
0.4529372453689575,
0.235458105802536,
-0.7203406095504761,
0.18914316594600677,
0.2097463309764862,
0.2833839952945709,
0.6109133362770081,
-0.2325536012649536,
0.6580654978752136,
0.18691028654575348,
-0.4153037369251251,
0.500393807888031,
0.1... |
def get ( self, path ) : if path not in self. workspaces : self. workspaces [ path ] = workspace ( path ) return self. workspaces [ path ] | [
-0.5435826778411865,
-0.033232431858778,
0.3206597566604614,
-0.32483401894569397,
-0.2415841668844223,
0.1273038685321808,
0.0997546836733818,
-1.4069446325302124,
1.0635604858398438,
-1.0927377939224243,
0.004092959221452475,
0.7436700463294983,
-0.9604616761207581,
-0.38188281655311584,... |
def hosting _ environment _ service _ urls ( self ) - > optional [ sequence ['outputs. hostingenvironmentservicedescriptionsresponse'] ] : return pulumi. get ( self, " hosting _ environment _ service _ urls " ) | [
-0.5137433409690857,
0.34221911430358887,
0.34209567308425903,
0.5956777334213257,
1.0421323776245117,
1.6501567363739014,
0.03899629786610603,
0.2700203061103821,
-0.7319140434265137,
-0.6392184495925903,
-0.23080970346927643,
0.4692445993423462,
-0.38220661878585815,
0.41526734828948975,... |
def pop ( self, key, default = none ) : with self. lock : temp = ordereddict. _ _ getitem _ _ ( self, key ) if temp = = false : return false else : del self [ key ] temp _ ttl = temp [ 1 ] - time. time ( ) return temp [ 0 ], temp _ ttl | [
-0.7169575095176697,
0.3025292754173279,
0.7135543823242188,
-0.3043631911277771,
-0.7521928548812866,
-0.3106197118759155,
-0.7810176610946655,
-0.09745198488235474,
-0.3989112973213196,
2.411982774734497,
-0.6156505942344666,
-0.6473992466926575,
-1.165122389793396,
-0.43085020780563354,... |
def lda _ collapsed ( document _ word _ matrix, document _ word _ matrix _ test, n _ iter _ doc, n _ iter, k, alpha, eta ) : np. random. seed ( 0 ) d = document _ word _ matrix. shape [ 0 ] w = document _ word _ matrix. shape [ 1 ] w _ array = np. arange ( 0, w, 1 ) bound _ list = [ ] bound _ test = [ ] phi _ n = np. z... | [
-0.2715243995189667,
0.18199358880519867,
0.9447691440582275,
-1.2555729150772095,
-0.07513150572776794,
-0.05077004432678223,
0.8865521550178528,
0.6134563088417053,
0.6168639659881592,
1.246512770652771,
0.38501471281051636,
0.4452877342700958,
-1.0099984407424927,
1.305567741394043,
0... |
def args _ decorator ( sdk _ func ) : # get func name sdk _ func = getattr ( andor _ solis, sdk _ func. _ _ name _ _ ) # set func argtypes sdk _ func. argtypes = argtypes # set return type sdk _ func. restype = ctypes. c _ uint def wrapped _ call ( * args ) : " " " third layer wraps the call and checks return status. "... | [
-0.8433852791786194,
0.4831784963607788,
0.508352518081665,
0.1305096447467804,
0.07206407934427261,
-0.057203516364097595,
-0.5820220112800598,
0.21995507180690765,
0.19943614304065704,
0.6431195139884949,
0.6925240755081177,
-0.05269326642155647,
0.455594003200531,
0.06960786134004593,
... |
async def set ( self, ctx, user : discord. member, amount ) : if amount! = int ( float ( amount ) ) : return await ctx. send ( " uh oh, amount has to be an integer. " ) await self. config. member ( user ). chars. set ( amount ) await ctx. send ( " set { 0 }'s balance to { 1 } points ". format ( user. display _ name, am... | [
0.17513762414455414,
0.22299043834209442,
0.5402210354804993,
0.5862566232681274,
-0.5505853295326233,
0.5881904363632202,
-0.4147220253944397,
-0.9296290874481201,
0.38357245922088623,
0.4966335892677307,
-0.9462592005729675,
1.0548268556594849,
-0.6743966341018677,
-0.057711560279130936,... |
def connect _ db ( app ) : db _ conn _ str = app. config [ " db _ conn _ str " ] if db _ conn _ str is none : raise exception ( " db conn string is undefined in configuration! " ) # configure db app. config [ " mongo _ uri " ] = db _ conn _ str + " / marketdb " return pymongo ( app ) | [
0.6040196418762207,
-0.029814209789037704,
0.5766523480415344,
0.5785138010978699,
0.3178778886795044,
0.496195524930954,
-0.48906147480010986,
0.14205560088157654,
-0.13212673366069794,
0.3112625777721405,
0.8884862661361694,
-0.22534248232841492,
-0.20014779269695282,
0.3507186472415924,... |
def add _ players ( self, game _ player, stat _ player, game ) : if game _ player. name not in self. _ games [ game. name ]. players : self. _ games [ game. name ]. add _ player ( game _ player ) if stat _ player. name not in self. _ players : self. _ players [ stat _ player. name ] = stat _ player | [
-0.6695792078971863,
-0.30949074029922485,
0.7367079257965088,
-0.11105038225650787,
0.9876450896263123,
0.5572181940078735,
-0.8081250786781311,
-0.5964089632034302,
-0.3021106719970703,
1.0257089138031006,
0.23344457149505615,
0.1469893753528595,
-0.5740653276443481,
0.5173278450965881,
... |
def parse ( self, file _ obj ) : host = { " host " : ['*'], " config " : { } } for line in file _ obj : line = line. rstrip ('\ n'). lstrip ( ) if ( line = ='' ) or ( line [ 0 ] = ='#') : continue if'='in line : # ensure proxycommand gets properly split if line. lower ( ). strip ( ). startswith ('proxycommand') : match... | [
-0.3237805962562561,
-0.1285122185945511,
0.7682802677154541,
-0.5055454969406128,
-0.35082054138183594,
0.012662028893828392,
-0.5006740093231201,
0.9508444666862488,
-1.4502042531967163,
0.0687432661652565,
-0.7541544437408447,
-0.521125316619873,
-0.029589850455522537,
0.635831236839294... |
def _ _ init _ _ ( _ _ self _ _, *, location : str, hosting _ environment _ service _ urls : optional [ sequence ['outputs. hostingenvironmentservicedescriptionsresponse'] ] = none, id : optional [ str ] = none, kind : optional [ str ] = none, name : optional [ str ] = none, service _ url : optional [ str ] = none, tag... | [
-0.2548838257789612,
0.22018499672412872,
0.7553183436393738,
-0.11999092251062393,
0.9478784799575806,
0.6957542300224304,
-1.0441161394119263,
0.5999584794044495,
-0.7063878178596497,
0.29839998483657837,
-0.7411292195320129,
0.39393487572669983,
0.15347568690776825,
-0.24598591029644012... |
def _ get _ cpo _ type ( val ) : # check simple types ctyp = _ python _ to _ cpo _ type. get ( type ( val ) ) if ctyp : return ctyp # check cpo expr if isinstance ( val, cpoexpr ) : return val. type # check numpy array scalars ( special case when called from overloaded operator ) if type ( val ) is numpy _ ndarray and ... | [
0.5225011706352234,
0.2539235055446625,
0.5377338528633118,
0.4443534314632416,
-0.5471414923667908,
-0.04889048635959625,
0.6442564129829407,
-0.9760382771492004,
-0.023865018039941788,
0.4957277178764343,
-0.19330230355262756,
0.3328481912612915,
-0.561005175113678,
0.04701033607125282,
... |
def user _ and _ secret _ to _ jwt ( user, secret ) : jwt _ payload = {'sub': user ['userid'],'name': user ['name'],'roles': user ['roles'] } encoded = jwt. encode ( jwt _ payload, secret, algorithm ='hs256') return encoded | [
0.43657758831977844,
-0.9057202935218811,
0.24956540763378143,
0.15633796155452728,
-1.0157159566879272,
-0.4449292719364166,
-1.1197893619537354,
-0.6249871850013733,
-0.57738196849823,
0.377937912940979,
-1.2616198062896729,
1.436420202255249,
1.0793031454086304,
-0.04096078872680664,
... |
async def test _ attributes _ rgbww ( hass : homeassistant, mqtt _ mock : mqttmockhaclient, setup _ tasmota ) - > none : config = copy. deepcopy ( default _ config ) config [ " rl " ] [ 0 ] = 2 config [ " lt _ st " ] = 5 # 5 channel light ( rgbcw ) mac = config [ " mac " ] async _ fire _ mqtt _ message ( hass, f " { de... | [
0.3727632462978363,
-0.24601805210113525,
0.5120848417282104,
-0.45126739144325256,
0.24449539184570312,
0.7595881223678589,
0.06315838545560837,
0.043307773768901825,
0.21894541382789612,
-0.6537626385688782,
-0.6139529943466187,
-0.0502430684864521,
0.29231277108192444,
1.122212409973144... |
def vx _ cmb ( mx, x _ kd ) : return 2. 0e - 4 * 10e6 * temp _ cmb _ formation / mx * np. sqrt ( 1. 0e - 4 / x _ kd ) | [
1.1959679126739502,
-0.7359886169433594,
0.2778920829296112,
0.1114855706691742,
-0.4131355285644531,
0.5891842842102051,
-1.1316863298416138,
-0.07402731478214264,
0.04244760051369667,
0.6827210187911987,
0.33276304602622986,
-0.26016733050346375,
-0.671402633190155,
0.3559076189994812,
... |
def same _ length ( a, b ) : return digits ( a ) = = digits ( b ) # a _ digits = 0 # while a > 0 : # last, a = a % 10, a / / 10 # a _ digits = a _ digits + 1 # b _ digits = 0 # while b > 0 : # last, b = b % 10, b / / 10 # b _ digits = b _ digits + 1 # return a _ digits = = b _ digits | [
0.18544849753379822,
0.1309668868780136,
0.6658365726470947,
-0.977246105670929,
0.6488980054855347,
0.0801989883184433,
0.20429633557796478,
0.4553523361682892,
0.9805452823638916,
0.6483846306800842,
-0.4477311074733734,
0.7212151288986206,
-0.3504853844642639,
-0.0350339375436306,
0.2... |
def execute ( self, rfq = none ) : if rfq is none : rfq = self. response params = {'request _ id': rfq ['request _ id'],'amount': rfq ['amount'],'instrument': rfq ['instrument'],'direction': rfq ['direction'],'total': rfq ['total'], } self. execution = self. call ('trades ','post ', params ) return self. execution | [
-0.7851191163063049,
0.202638640999794,
0.6128135323524475,
-0.12958936393260956,
0.8102073073387146,
-0.39055055379867554,
-0.26744845509529114,
-0.361168771982193,
0.5144176483154297,
-0.3629557490348816,
-0.01777421124279499,
-0.005602836608886719,
-0.7898917198181152,
0.096410781145095... |
def set _ state ( self, state : dict [ str, any ] ) - > none : # the actual storage. self. _ storage = state [ " _ storage " ] self. _ next _ idx = state [ " _ next _ idx " ] # stats and counts. self. _ num _ timesteps _ added = state [ " added _ count " ] self. _ num _ timesteps _ added _ wrap = state [ " added _ coun... | [
-0.7464717626571655,
0.5377337336540222,
0.306659072637558,
-0.3913213908672333,
0.04694952815771103,
-0.3969440162181854,
-0.014567443169653416,
-0.3506312966346741,
0.2890320420265198,
0.13312570750713348,
-1.0138475894927979,
0.3977645933628082,
0.9594096541404724,
0.6901288032531738,
... |
def bcd ( data ) : if len ( data ) % 4! = 0 : print ( " error!, length of data must be divisible by 4 in bcd " ) exit ( ) n _ digits = len ( data ) / 4 num = 0 * data [ 0 ] # # data may be a list of floats, or list of arrays of floats for i in range ( int ( n _ digits ) ) : num + = sum ( [ ( 10 * * i ) * ( 2 * * ind ) ... | [
0.6591463685035706,
0.26952916383743286,
0.7499075531959534,
-0.06619171798229218,
0.45491823554039,
0.018688471987843513,
0.5366848707199097,
0.4858953654766083,
0.6009936928749084,
-0.451088011264801,
-0.7781005501747131,
-0.005315545480698347,
-1.42730712890625,
0.738801896572113,
0.2... |
def get _ tag ( self, resource, params ) : self. _ check _ endpoint _ params ('get - tag ', params ) return self. _ request ('get ','tags / % s'% resource, params ) | [
-0.3573199510574341,
0.4021998941898346,
0.021576756611466408,
0.41826310753822327,
1.3827495574951172,
-0.3587782680988312,
-0.7537112236022949,
-0.9367023706436157,
-0.7231617569923401,
0.27944833040237427,
0.38402512669563293,
1.21018648147583,
-0.33595046401023865,
0.27244359254837036,... |
def sliced _ wasserstein _ sphere ( x _ s, x _ t, a = none, b = none, n _ projections = 50, p = 2, projections = none, seed = none, log = false ) : if a is not none and b is not none : nx = get _ backend ( x _ s, x _ t, a, b ) else : nx = get _ backend ( x _ s, x _ t ) n, d = x _ s. shape m, _ = x _ t. shape if x _ s. ... | [
0.4315340518951416,
-0.31838181614875793,
0.9115839600563049,
-0.14326965808868408,
-0.7511997818946838,
-0.06912060081958771,
-0.4114835262298584,
0.07765679806470871,
0.6055406928062439,
1.1285063028335571,
-0.024357791990041733,
0.6813238263130188,
-0.02551180124282837,
-0.5759238004684... |
def multiply _ numbers ( self, value _ a, value _ b ) : self. result = value _ a * value _ b | [
-0.5069279670715332,
0.4150315821170807,
0.31888869404792786,
0.659877359867096,
1.274020791053772,
-0.43057796359062195,
-0.45006757974624634,
-0.22582896053791046,
-0.17686863243579865,
-0.09798572212457657,
-0.19344930350780487,
-0.5660256743431091,
0.6338530778884888,
0.274891048669815... |
def forward ( self, x ) : m1, w1, w2, b2 = self. weights x _ shape = x. shape x = jnp. reshape ( x, [ - 1, x _ shape [ - 1 ] ] ) # easier to operate on flattened x. # q : check if we need bias and / or put relu after the m1 dot? mask _ logits = jnp. dot ( x, m1 ) # softmax. mask _ logsumexp = fastmath. logsumexp ( mask... | [
-0.3918945789337158,
0.39224907755851746,
0.9873296618461609,
0.24172548949718475,
-0.9254347085952759,
0.19253258407115936,
0.49329623579978943,
-0.09118372946977615,
0.23553438484668732,
0.04908589646220207,
-0.030743716284632683,
1.1205438375473022,
0.5043654441833496,
0.769852340221405... |
def kms _ encrypted _ password ( self ) - > pulumi. output [ optional [ str ] ] : return pulumi. get ( self, " kms _ encrypted _ password " ) | [
0.8933113813400269,
-0.5368853807449341,
0.35156160593032837,
0.6010070443153381,
0.1855638325214386,
0.48242834210395813,
-0.5523210763931274,
0.09206594526767731,
1.238673210144043,
0.43459266424179077,
-0.23382112383842468,
0.8968319892883301,
-0.14715363085269928,
-0.4894807040691376,
... |
def get _ group _ members ( self, uuid, cache = false, * * kwargs ) : if cache : return self. get _ cached _ inventory ('_ _ group _ members ', uuid = uuid, * * kwargs ) return self. request ( f'groups / { uuid } / members ', * * kwargs ) | [
-1.6198447942733765,
0.39415407180786133,
0.2591417133808136,
0.6246049404144287,
0.4704674780368805,
-0.632958173751831,
-0.6670576930046082,
-0.0964890569448471,
-0.6736893653869629,
0.0808710977435112,
-0.2839295268058777,
0.9681335687637329,
-1.248272180557251,
-0.3118315637111664,
-... |
def forward ( self, input ) : # the input is needed when computing the backward pass. self. input = input. clone ( ) output = input. tanh ( ) return output | [
0.15257568657398224,
0.5120230317115784,
0.36123740673065186,
-0.10028932988643646,
-0.3363843858242035,
0.6847434043884277,
0.771684467792511,
-0.4261486530303955,
-0.18841645121574402,
-1.197295904159546,
-0.5184145569801331,
0.5918298363685608,
-0.2508787214756012,
-0.31809359788894653,... |
def current _ user _ friend ( self, current _ user _ friend ) : self. _ current _ user _ friend = current _ user _ friend | [
-0.22395862638950348,
-1.099548101425171,
0.14068908989429474,
1.2353190183639526,
-0.40506985783576965,
1.1101717948913574,
0.5881825089454651,
0.7570763826370239,
-1.8077419996261597,
0.11914274841547012,
-0.6872423887252808,
0.044789306819438934,
0.2962966859340668,
-0.3560740649700165,... |
def _ _ init _ _ ( self, iterable = ( ) ) : self. root = none self. _ size = 0 self. left _ depth = 0 self. right _ depth = 0 self. levels = 0 self. left _ level = 0 self. right _ level = 0 if isinstance ( iterable, ( tuple, list ) ) : for data in iterable : self. insert ( data ) else : self. insert ( iterable ) | [
-0.9803740382194519,
0.997359037399292,
0.5763317346572876,
0.5956293344497681,
0.22518861293792725,
0.07146083563566208,
0.2588304579257965,
0.5648186802864075,
-0.3033946454524994,
0.00008596859697718173,
-0.4631049633026123,
-0.7111226320266724,
-1.201541781425476,
1.063214659690857,
... |
def restart _ database ( self ) : # remove any previously existing db file try : os. remove ( " database / jarvisdb. db " ) except : pass # create the db file jarvisdb _ conn = sqlite3. connect ( " database / jarvisdb. db ", check _ same _ thread = false ) jarvisdb _ cur = jarvisdb _ conn. cursor ( ) return jarvisdb _ ... | [
0.1266944408416748,
-0.10324609279632568,
0.5627384185791016,
0.784119188785553,
0.2779451608657837,
-0.2133936882019043,
0.14922688901424408,
1.0130641460418701,
-0.613349974155426,
0.8266813158988953,
0.2644829750061035,
-0.08557132631540298,
-1.4338951110839844,
-0.2545261085033417,
0... |
def extract _ sd _ config ( config ) : sd _ config = { } if config. has _ option ('main ','sd _ config _ backend') : sd _ config ['sd _ config _ backend'] = config. get ('main ','sd _ config _ backend') else : sd _ config ['sd _ config _ backend'] = none if config. has _ option ('main ','sd _ template _ dir') : sd _ co... | [
0.09237948805093765,
0.015534179285168648,
0.7544811964035034,
0.037102166563272476,
-1.1173571348190308,
-0.4968295395374298,
-0.0449136383831501,
0.2680182158946991,
-0.12341272830963135,
0.807202160358429,
-0.8482344150543213,
-0.37323588132858276,
0.2913880944252014,
0.6153916716575623... |
def handler ( event, context ) : try : # open database # dynamodb = boto3. resource ('dynamodb ', region _ name ='us - west - 1 ', endpoint _ url = " http : / / localhost : 8000 " ) dynamodb = boto3. resource ('dynamodb ', region _ name ='us - west - 1') # get order details for current order id. tableorder = dynamodb. ... | [
-0.541545569896698,
-0.06719370186328888,
0.9300854206085205,
1.4226411581039429,
-0.2757717967033386,
-0.4731423556804657,
0.46418991684913635,
0.531134843826294,
0.0871109813451767,
0.7008991241455078,
-0.9021034240722656,
-0.6336873173713684,
0.8611335158348083,
0.8136240243911743,
0.... |
def get _ range ( self ) : if self. battery _ size = = 75 : range = 260 elif self. battery _ size = = 100 : range = 315 print ( f " range of this car is more or less { range } km with full charged battery. " ) | [
0.19104984402656555,
-1.0273809432983398,
0.5629448890686035,
0.6480721831321716,
0.5379725098609924,
0.1920832097530365,
-0.34000498056411743,
-0.47727110981941223,
-0.7350524663925171,
-0.21382258832454681,
-0.0075476993806660175,
0.35237497091293335,
0.060620542615652084,
0.209759682416... |
def make _ ls _ array ( rel _ path, private _ data, cloud, user _ id ) : # type : ( relativepath, privatedata, cloud, int ) - > optional [ dict [ str, any ] ] if rel _ path is none : return none full _ path = rel _ path. to _ absolute ( cloud. root _ directory ) if not os. path. exists ( full _ path ) : return none per... | [
0.05728352814912796,
-0.05014457181096077,
0.8920918703079224,
-0.27448540925979614,
-0.46283581852912903,
-0.06658873707056046,
0.3638327121734619,
-0.6151543855667114,
0.1302727311849594,
-0.4294549226760864,
-0.12188756465911865,
0.6866047382354736,
0.28696513175964355,
-0.2093972116708... |
def get _ led _ two ( self ) : return self. _ get _ led ( self. command _ get _ led2 ) | [
-0.1333085149526596,
-1.051060438156128,
0.5888113975524902,
0.9145899415016174,
0.01680103875696659,
0.04659435898065567,
-0.374236136674881,
-1.1683636903762817,
-0.262708842754364,
-0.9994659423828125,
-0.7554532289505005,
1.8911364078521729,
-1.0590661764144897,
0.001866680569946766,
... |
def message _ callback _ add ( self, sub, callback ) : if callback is none or sub is none : raise valueerror ( " sub and callback must both be defined. " ) for i in range ( 0, len ( self. on _ message _ filtered ) ) : if self. on _ message _ filtered [ i ] [ 0 ] = = sub : self. on _ message _ filtered [ i ] = ( sub, ca... | [
0.03772931918501854,
0.2901359498500824,
0.9309054613113403,
0.29183006286621094,
-0.5446960926055908,
-0.044767603278160095,
-0.41335514187812805,
-0.9979517459869385,
0.5019554495811462,
0.21820606291294098,
0.21050946414470673,
1.2375048398971558,
-1.0479940176010132,
0.6820818185806274... |
def setup ( self ) : # setup for all test cases. controllers = com. discover _ controllers _ on _ network ( ) self. controller, _, connected = com. connect _ robot _ with _ ipaddr ( controllers,'127. 0. 0. 1') if not connected : print'couldn \'t connect to controller. test will not be run.'sys. exit ( ) # additional se... | [
0.28678199648857117,
0.09594330191612244,
0.37811505794525146,
0.5855944752693176,
0.9192309975624084,
-0.060066454112529755,
0.5871278643608093,
-0.5851289629936218,
0.7595287561416626,
0.03101162798702717,
-0.05064817890524864,
-0.0662933960556984,
-0.19841472804546356,
0.25485959649086,... |
def test _ nfc _ wps _ er _ pw _ token ( dev, apdev ) : try : _ test _ nfc _ wps _ er _ pw _ token ( dev, apdev ) finally : dev [ 0 ]. request ( " wps _ er _ stop " ) dev [ 1 ]. request ( " set ignore _ old _ scan _ res 0 " ) | [
-0.32311102747917175,
0.47004157304763794,
0.42368069291114807,
-0.2955813407897949,
0.6707526445388794,
0.3129991888999939,
-0.31862398982048035,
-0.6702882647514343,
1.0212829113006592,
-0.830246090888977,
0.3487275242805481,
-0.7184256911277771,
-0.19780009984970093,
-0.1365972310304641... |
def send _ to _ arduino ( valor ) : try : comport = serial. serial ('/ dev / ttyusb0 ', 9600, timeout = 1 ) # instancing pyserial module to communicate with arduino param _ caracter = str. encode ( valor ) # encode the variable'valor'to send to arduino # param _ ascii = str ( chr ( 116 ) ) # 116 ='t'# dalay time to con... | [
-0.7072324156761169,
-0.34536346793174744,
0.5756747126579285,
0.17841437458992004,
-0.30652445554733276,
0.4287850856781006,
0.10807812213897705,
-0.8329717516899109,
-0.47055718302726746,
-0.5626204609870911,
-0.436832994222641,
0.47495323419570923,
-0.11132540553808212,
-0.1484430730342... |
def test _ 01 _ one ( self ) : self. m _ pyhouse _ obj. house. schedules [ 0 ]. sched. type ='testing14159'# to set dispatch to testing _ l _ schedule = self. m _ pyhouse _ obj. house. schedules [ 0 ] # print ( prettyformatany. form ( l _ schedule,'c1 - 01 - a - sched') ) # scheduleexecution ( ). dispatch _ one _ sched... | [
0.28493213653564453,
0.11671393364667892,
0.628635823726654,
0.44470906257629395,
0.5999539494514465,
0.7420012354850769,
0.1955413818359375,
0.5593870878219604,
1.33485746383667,
-0.53532475233078,
-0.4695051312446594,
0.55315762758255,
0.06741582602262497,
0.6284343004226685,
-0.132036... |
def decrase _ time _ span ( self ) : self. _ _ time _ span - = 1 | [
-0.07674593478441238,
0.2828262746334076,
0.3509088158607483,
-0.780659019947052,
0.6342554688453674,
0.8715095520019531,
-0.07272571325302124,
-0.1986042708158493,
-0.022558510303497314,
0.3302396535873413,
-0.013310586102306843,
0.1561494767665863,
-0.41097018122673035,
0.945997118949890... |
def interpolate ( self, coeffs, x ) : f = 0 * x # t _ it = chebyshev _ it ( x ) # evaluate chebyshev expansion # # ( interp ) n - 1 # f ( x ) = sum a t ( x ) # i = 0 i i # # the first term in the expansion ( i = 0 ) needs to be halfed. this factor 1 / 2 has # been taken care of by replaing a0 with a0 / 2 in the computa... | [
-0.04831540212035179,
-0.14754340052604675,
0.5332139134407043,
-0.1879386603832245,
0.12388387322425842,
-0.2582954168319702,
-0.83210688829422,
0.11060787737369537,
0.19536004960536957,
0.03260750323534012,
0.0180944986641407,
-1.0457220077514648,
-0.741663932800293,
-1.063153862953186,
... |
def video _ feed ( ) : return response ( gen ( v ), mimetype ='multipart / x - mixed - replace ; boundary = frame') | [
0.49367398023605347,
-0.248025044798851,
0.6003537774085999,
0.5357141494750977,
-0.2843613624572754,
-1.3006055355072021,
-0.7456972599029541,
-0.14853022992610931,
1.0119681358337402,
-0.5908309817314148,
-0.7033993601799011,
1.1138126850128174,
-0.9057413339614868,
-0.09488929808139801,... |
def num _ columns ( self ) - > int : return self. _ data. num _ columns | [
0.104693703353405,
0.9737372994422913,
-0.0006892355741001666,
-0.246247336268425,
0.6971632242202759,
-0.20316535234451294,
0.6295529007911682,
-0.18907126784324646,
-0.12430956959724426,
-0.9746484160423279,
-1.2354305982589722,
0.4747459590435028,
0.7037794589996338,
-1.086411714553833,... |
def predict ( self, i ) : # get the number of vectors in the input dataset predictions _ count = i. shape [ 0 ] # create an empty array to contain the output classes predictions = np. zeros ( predictions _ count ) # loop over the individual vectors for index in range ( 0, predictions _ count ) : # set the current vecto... | [
-1.0190469026565552,
-0.0621841624379158,
0.6628151535987854,
0.22392402589321136,
0.26292121410369873,
-0.19955015182495117,
0.9042538404464722,
0.09884003549814224,
0.0030833506025373936,
-0.4907335937023163,
-0.18743984401226044,
-0.48059219121932983,
0.2542533278465271,
0.0102380150929... |
def count _ words ( sentence ) : # split on spaces, _, \ n, \ t and anything in string. punction words = re. split ( r " [ _ \ n \ t " + string. punctuation + " ] + ", sentence. lower ( ) ) countdict = { } for word in set ( words ) : if ( word not in string. punctuation ) : countdict [ word ] = words. count ( word ) re... | [
0.24250808358192444,
-0.4794817268848419,
0.4005405306816101,
-1.2512682676315308,
-0.8808857202529907,
-0.9705966114997864,
-0.10072983801364899,
0.5346320271492004,
-0.8031436204910278,
0.9657173156738281,
-1.4339922666549683,
-0.4274241626262665,
0.624237060546875,
0.5798107385635376,
... |
def test _ match _ types _ list ( self ) : normalized _ types = {'ipv4': ['sourceipaddress'], } expected _ results = {'ipv4': ['1. 1. 1. 2 ','1. 1. 1. 3'] } test _ record = {'account': 123456,'sourceipaddress': ['1. 1. 1. 2 ','1. 1. 1. 3'] } results = normalizer. match _ types ( test _ record, normalized _ types ) asse... | [
-0.5100440382957458,
0.34636566042900085,
0.48049458861351013,
0.24949415028095245,
-0.05445941537618637,
-0.3342706561088562,
-0.08468034118413925,
0.6694743037223816,
0.4457591772079468,
0.4196249842643738,
-0.6720465421676636,
-0.8957920074462891,
-0.9212214946746826,
-0.122434012591838... |
def test _ manipulated _ redirect _ uris _ are _ rejected ( self ) : data = {'client _ id': self. client. client _ id,'response _ type':'code ','redirect _ uri': self. client. default _ redirect _ uri + "? some = query ",'scope':'openid email ','state': self. state, } response = self. _ auth _ request ('get ', data ) s... | [
-0.8667356371879578,
1.1622424125671387,
0.45324158668518066,
-0.5991090536117554,
0.29128211736679077,
0.5792431831359863,
-0.32484006881713867,
-0.2790972590446472,
0.6465921401977539,
-0.8922982811927795,
-0.02435656078159809,
0.6229274868965149,
-0.751407265663147,
-0.8000367879867554,... |
def hdrlen ( ) : return len ( struct. pack ('ii ', 1, 1 ) ) | [
0.5563446879386902,
-0.08596044778823853,
0.4655120074748993,
-0.2327333241701126,
0.2322055846452713,
0.33892005681991577,
-0.30817118287086487,
-0.12144429981708527,
0.3791877031326294,
-0.2523675262928009,
-1.296570897102356,
-0.5051381587982178,
-0.8880445957183838,
-0.5385833382606506... |
def progress ( self, invalue ) : cmds. progressbar ( self. mmainprogressbar, edit = true, progress = invalue ) | [
-0.48502060770988464,
-0.48397326469421387,
0.7529740333557129,
0.12713780999183655,
-0.5995247960090637,
1.4305611848831177,
1.1880615949630737,
-0.23858806490898132,
-0.325869083404541,
-0.4634460508823395,
0.421048641204834,
-0.6895877122879028,
-1.5205985307693481,
0.8510974049568176,
... |
def is _ full ( self ) : if self. num _ items = = self. capacity : return true else : return false | [
0.20937803387641907,
-0.5489644408226013,
0.6060836315155029,
0.5095959901809692,
0.3033141493797302,
0.0007856333977542818,
-0.7281111478805542,
-0.10988640785217285,
0.07692762464284897,
-0.13205623626708984,
-1.0978479385375977,
-0.3111380338668823,
-0.3866506814956665,
-0.1852863132953... |
def test _ get _ _ no _ followed _ subjects ( self ) - > none : self. client. force _ login ( self. user ) response = self. client. get ( self. path ) assert httpstatus. ok = = response. status _ code self. assertcontains ( response, " follow " ) self. assertcontains ( response, " following ", 0 ) self. assertcontains ... | [
0.14252054691314697,
0.331260621547699,
0.5046511888504028,
-0.04988017678260803,
0.364272803068161,
1.3262802362442017,
0.002365819877013564,
-1.325872778892517,
-0.184030681848526,
-1.4023971557617188,
-0.05288942530751228,
0.8524505496025085,
-0.26853108406066895,
0.2826493978500366,
... |
def close _ streams ( self ) : if hasattr ( self,'_ i2c _ read') : self. _ i2c _ read. close ( ) self. _ log. debug ( " i2c read stream is now closed. " ) if hasattr ( self,'_ i2c _ write') : self. _ i2c _ write. close ( ) self. _ log. debug ( " i2c write stream is now closed. " ) | [
-0.27989107370376587,
-1.4893536567687988,
0.6774235367774963,
-0.8160967230796814,
-0.39176732301712036,
-0.0963028147816658,
1.2808653116226196,
-1.458484172821045,
-0.7890641093254089,
-0.24272997677326202,
1.0291714668273926,
0.06570950150489807,
-0.37811166048049927,
0.504994809627533... |
def convert _ detectors _ input ( string ) : if string is none : raise bilbypipeerror ( " no detector input " ) if isinstance ( string, list ) : string = ", ". join ( string ) if isinstance ( string, str ) is false : raise bilbypipeerror ( f " detector input { string } not understood " ) # remove square brackets string... | [
-0.14483681321144104,
-1.3020015954971313,
0.6462221145629883,
0.22526349127292633,
0.15425701439380646,
-0.16685958206653595,
-0.06040697172284126,
0.5209304690361023,
0.7800520062446594,
0.05260589346289635,
-0.41059839725494385,
0.8233633041381836,
0.12000974267721176,
0.511808454990387... |
def configure _ parser ( sub _ parsers ) : server _ parser = sub _ parsers. add _ parser ('server ', description ='starts mock upstream server ', help ='server subcommand') # setting server subcommand flags server _ parser. add _ argument ('- p ','- - port ', type = int, default = 9090, dest ='port _ flag ', help ='def... | [
-0.21594002842903137,
-0.23716798424720764,
1.0790736675262451,
0.012591050006449223,
0.5685381889343262,
0.5920378565788269,
0.2597067654132843,
0.11873103678226471,
-0.7077645063400269,
-0.02406776323914528,
-1.216801643371582,
0.6985670924186707,
-0.6798716187477112,
1.1105197668075562,... |
def fetch _ icon ( pk, icon _ url, sizes = mkt. content _ icon _ sizes, * * kw ) : website = website. objects. get ( pk = pk ) log. info ( u'[ website : % s ] fetching icon for website ', website. name ) try : response = _ fetch _ content ( icon _ url ) except exception, e : log. error ( u'[ website : % s ] failed to f... | [
-0.47872012853622437,
0.7412155866622925,
0.5131967663764954,
0.042427562177181244,
-0.5739081501960754,
-0.09652183204889297,
0.37168392539024353,
-0.5500137805938721,
0.1162252351641655,
1.135329246520996,
-1.0541774034500122,
-0.8867284655570984,
0.1215580552816391,
-0.21908119320869446... |
def download _ and _ decompress ( archive : dict [ str, str ], path : str ) - > os. pathlike : if not os. path. isdir ( path ) : os. makedirs ( path ) assert'url'in archive and'md5'in archive, \'dictionary keys of " url " and " md5 " are required in the archive, but got : { } '. format ( list ( archive. keys ( ) ) ) fi... | [
0.25811418890953064,
-0.07853187620639801,
0.7745713591575623,
-0.02567066252231598,
-0.5127711296081543,
-0.2848741114139557,
0.8035550117492676,
0.20310555398464203,
0.45888811349868774,
-0.11149026453495026,
-0.241435706615448,
-0.8903286457061768,
0.14178036153316498,
0.296285837888717... |
def bfs _ filter _ asset _ partitions ( self, dynamic _ partitions _ store : dynamicpartitionsstore, condition _ fn : callable [ [ iterable [ assetkeypartitionkey ], abstractset [ assetkeypartitionkey ] ], bool ], initial _ asset _ partitions : iterable [ assetkeypartitionkey ], evaluation _ time : datetime, ) - > abst... | [
0.06987418979406357,
-0.4217202365398407,
0.7483154535293579,
-0.2042291909456253,
-0.12525857985019684,
-0.25908464193344116,
0.08822941035032272,
-0.1716935783624649,
-0.8747849464416504,
-0.22604238986968994,
0.6634120941162109,
0.36040642857551575,
0.24963608384132385,
-0.5648415684700... |
def get _ properties ( entity ) : if isinstance ( entity, dsl _ types. muranotype ) : properties = entity. all _ property _ names result = { } for prop _ name in properties : prop = entity. find _ single _ property ( prop _ name ) if prop. usage not in ( dsl _ types. propertyusages. in, dsl _ types. propertyusages. ino... | [
-0.4694752097129822,
0.3853364884853363,
0.6125774383544922,
-0.13315065205097198,
-0.03236362338066101,
-0.9825811386108398,
0.10471593588590622,
-0.11408688127994537,
-0.14233815670013428,
0.507145881652832,
0.762281596660614,
-0.09708641469478607,
0.5977696180343628,
0.9118037819862366,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.