text
stringlengths
25
2.19k
embedding
listlengths
768
768
def fetch _ instances ( self, name : optional [ str ] = none, include _ invalid : bool = false ) - > list [ dict ] : if not self. schemaspace _ exists ( ) : # schemaspace doesn't exist - return empty list if name : # if we're looking for a specific instance and there's no schemaspace, raise metadatanotfound raise metad...
[ -0.16275927424430847, 0.08069170266389847, 0.8038482069969177, -0.35934993624687195, -0.7888074517250061, -0.2246382236480713, -0.7129414677619934, 0.8422365784645081, 0.4819456934928894, 1.0139942169189453, 0.3439773917198181, 0.3576441705226898, -0.15854784846305847, 0.885815441608429, ...
def create _ time _ from _ timestamp ( timestamp ) - > datetime. time : args = timestamp. split ( " : " ) if len ( args )! = 3 : raise valueerror ( " timestamp must have the format hh : : mm : : ss " ) hours = int ( args [ 0 ] ) minutes = int ( args [ 1 ] ) seconds = int ( args [ 2 ] ) is _ valid _ time = ( 0 < = hours...
[ 0.35197266936302185, 0.10993728041648865, 0.5893750190734863, 0.5934038758277893, -0.2942095696926117, 0.41123253107070923, -1.02047860622406, -0.5002394914627075, 0.3557940423488617, 0.8147664070129395, -0.3777948021888733, -0.8040705919265747, -0.9172650575637817, -1.296510100364685, 0...
def test _ probability _ density ( self, scipy _ mock ) : # setup class scipywrappersubclass ( scipywrapper ) : model _ class ='mock _ model'probability _ density ='pdf'cumulative _ distribution = none percent _ point = none sample = none model _ instance _ mock = magicmock ( spec = ['pdf'] ) model _ instance _ mock. p...
[ -0.7802395820617676, -0.1353038102388382, 0.5969496965408325, -0.40422722697257996, 0.2544834613800049, 0.9016924500465393, -0.5395097136497498, -0.020239580422639847, -0.0530022531747818, -0.9869920015335083, 0.6183162927627563, -0.40741193294525146, -0.6366240382194519, 0.149640679359436...
def is _ ok ( self ) : if self. zip. testzip ( ) is none : return true return false
[ -0.06711796671152115, -0.38676539063453674, 0.44175463914871216, 0.47497817873954773, 0.2558523118495941, 0.022746630012989044, 0.07155894488096237, 0.28480666875839233, 1.1463828086853027, -0.18934352695941925, -0.24948224425315857, -0.2740379273891449, -0.9818617105484009, -0.21869793534...
def data _ model ( input _ dict, results _ dict = none ) : # create the root of the datamodeldict output = dm ( ) output ['calculation - grain - boundary - search'] = calc = dm ( ) # assign uuid calc ['key'] = input _ dict ['calc _ key'] calc ['calculation'] = dm ( ) calc ['calculation'] ['script'] = _ _ calc _ name _ ...
[ 0.28404954075813293, 0.14333999156951904, 0.9167202115058899, -0.2976107895374298, -0.49278223514556885, 0.8369562029838562, 0.4737652838230133, -0.22747042775154114, -1.1051677465438843, -0.1388496607542038, -0.9477422833442688, -0.10787490755319595, 0.31851083040237427, 0.496227532625198...
def train ( output _ directory, log _ directory, checkpoint _ path, warm _ start, warm _ start _ force, n _ gpus, rank, group _ name, hparams ) : # setup distributed hparams. n _ gpus = n _ gpus hparams. rank = rank if hparams. distributed _ run : init _ distributed ( hparams, n _ gpus, rank, group _ name ) # reproduca...
[ -0.09469923377037048, -0.1979905217885971, 0.7429346442222595, 0.008414031006395817, 0.3735218644142151, -0.20508453249931335, -0.008552205748856068, 0.3626735210418701, -0.5676873922348022, 0.012317361310124397, -0.2157616764307022, 0.17896217107772827, 0.6953495740890503, 0.7384393811225...
def read _ data ( self, sourcefile ) : f = open ( sourcefile,'r') num _ point = 0 # number of datapoints f. readline ( ) # skip over header for line in f : num _ point + = 1 f. seek ( 0 ) # rewind header _ text = f. readline ( ) feature _ names = np. array ( header _ text. split ( ',') [ 0 : - 1 ] ) # count number of c...
[ -0.5388002395629883, -0.2633036673069, 0.6506730914115906, -0.7870723009109497, 0.34001263976097107, 0.2710287272930145, -0.2489488273859024, 1.0466227531433105, -0.9148834943771362, 0.2360094040632248, -0.674882709980011, 1.0100196599960327, 0.45484820008277893, -0.2525510787963867, 0.1...
def get ( self, xpath ) : xpath = self. _ applybase ( xpath ) results = self. context. xpatheval ( xpath ) finalresults = [ ] for result in results : finalresults. append ( xmlfragment ( result ) ) return finalresults
[ -0.8276743292808533, 0.6355695724487305, 0.6106541752815247, -0.27241969108581543, 0.13330869376659393, -0.9169777631759644, -0.941311776638031, 0.1973140388727188, 0.5917081236839294, -0.5961857438087463, -0.055481918156147, -0.38860011100769043, -0.7689187526702881, -0.015497368760406971...
def read _ all ( self, collab _ id : str, project _ id : str, expt _ id : str ) : return self. _ execute _ operation ( operation = " get ", url = self. _ generate _ bulk _ url ( collab _ id = collab _ id, project _ id = project _ id, expt _ id = expt _ id ), payload = none )
[ 0.10541307926177979, 0.29078349471092224, 0.6875290870666504, 0.5327273607254028, 1.2275482416152954, -0.0702105313539505, -2.2799715995788574, 0.035967547446489334, -0.120636947453022, 0.6514549851417542, 1.0056040287017822, 1.4304695129394531, -1.0075438022613525, -0.9349685311317444, ...
def test _ more _ closure ( a, b ) : z = 1 def f ( ) : return a + z def g ( ) : return b + 2. 0 return f ( ) * g ( )
[ 0.1784784346818924, 0.03855312988162041, 0.4109618663787842, 0.5670657157897949, -0.3492581248283386, -0.3527173399925232, 1.0987374782562256, -0.6836931705474854, 0.3031567335128784, -0.8394865989685059, 0.018236972391605377, -0.12505635619163513, -0.21478089690208435, -0.6664993166923523...
def main ( ) : os. system ( " taskkill / im iexplore. exe / f " ) os. system ( " taskkill / im firefox. exe / f " ) os. system ( " taskkill / im chrome. exe / f " ) # logspath = r'\ \ fs \ temp \ alex \ logs \ \'logspath = raw _ input ( " please input the directory where logs are in : " ) if'volog. log'in os. listdir (...
[ 0.08692368865013123, -0.26473763585090637, 0.8068097829818726, 1.142434000968933, 0.4390990734100342, -0.2594240605831146, 0.7677839398384094, 0.5047446489334106, 0.06011982262134552, 0.06094751134514809, 0.10412929207086563, 0.8314515948295593, 0.5402144193649292, 0.29022860527038574, 0...
def app _ factory ( global _ conf, * * kwargs ) : # create the galaxy application unless passed in if'app'in kwargs : app = kwargs. pop ('app') else : try : from galaxy. app import universeapplication app = universeapplication ( global _ conf = global _ conf, * * kwargs ) except : import traceback, sys traceback. print...
[ 0.07705232501029968, -0.16180630028247833, 0.731415867805481, 0.3810788691043854, -0.19859200716018677, 0.36441272497177124, 0.7654072642326355, 0.7272405624389648, 0.6300219297409058, -0.5814526677131653, 0.11024575680494308, 0.5837517380714417, 0.12676726281642914, 0.6427637338638306, ...
async def _ load _ ra3 _ control _ stations ( self, area ) : area _ id = area [ " id " ] area _ name = area [ " name " ] station _ json = await self. _ request ( " readrequest ", f " / area / { area _ id } / associatedcontrolstation " ) if station _ json. body is none : return station _ json = station _ json. body [ " ...
[ -0.9741389751434326, -0.19002358615398407, 0.37532925605773926, -0.35442915558815, 0.24576696753501892, 0.20002003014087677, -0.04876861348748207, -0.5857937335968018, 0.8844333291053772, 0.9584916830062866, -0.1709214150905609, -0.8634723424911499, -0.4751098155975342, 0.24392853677272797...
def clone _ or _ pull _ repo ( repo _ name, repo _ path ) : if " hardware " in repo _ name : version = hw _ version elif " primary " in repo _ name or " secondary " in repo _ name \ or " tools " in repo _ name or " documentation " in repo _ name : version = sw _ version else : version = sw _ version program = " git " i...
[ 1.1784629821777344, -0.16612890362739563, 0.8468454480171204, 0.8544766902923584, -0.06535408645868301, 0.613497793674469, -0.4278668165206909, -0.15880832076072693, 0.11049060523509979, 0.023076467216014862, -0.27589482069015503, 0.19646011292934418, -0.4712832570075989, -0.37877631187438...
def analytics ( self, analytics ) : self. _ analytics = analytics
[ -0.25314801931381226, -0.007967387326061726, -0.0773770809173584, 0.06820198148488998, 0.3514236807823181, 0.3584553599357605, 0.7483363747596741, -0.4256570041179657, -0.5145853161811829, -0.644935131072998, -0.1802903413772583, -0.3428706228733063, 1.3279846906661987, 0.3007397949695587,...
def matrix _ generating _ function ( m ) : num _ var = 10 dimx = m. nrows ( ) dimy = m. ncols ( ) d = dict ( ) for x in range ( dimx ) : for y in range ( dimy ) : d [ ( x, y ) ] = m [ x, y ]. get _ generating _ function ( ) return matrix ( polynomialring ( zz, ['x'+ str ( i ) for i in range ( num _ var ) ] ), d )
[ -0.08022481203079224, 0.014850365929305553, 0.37556275725364685, -0.5924012064933777, -0.42348745465278625, -0.5061838626861572, 0.33791378140449524, 0.06758657842874527, -0.36026957631111145, -0.1478417068719864, 0.0110438521951437, -0.12828442454338074, 0.34643256664276123, -0.3630276024...
def _ get _ next _ parent _ for _ subpop ( self, budget ) : parent _ id = self. de [ budget ]. parent _ counter self. de [ budget ]. parent _ counter + = 1 self. de [ budget ]. parent _ counter = self. de [ budget ]. parent _ counter % self. _ max _ pop _ size [ budget ] return parent _ id
[ -0.2489045113325119, 0.8327617049217224, 0.6831926703453064, 0.3982090353965759, -0.8543984293937683, 0.6476978659629822, 0.4766708016395569, -0.4793996512889862, 0.007442949805408716, -0.25731170177459717, -0.3071228563785553, -0.0344020277261734, -0.045184504240751266, -0.303374916315078...
def _ ratio _ enum ( anchor, ratios ) : w, h, x _ ctr, y _ ctr = _ whctrs ( anchor ) size = w * h size _ ratios = size / ratios ws = np. round ( np. sqrt ( size _ ratios ) ) hs = np. round ( ws * ratios ) anchors = _ mkanchors ( ws, hs, x _ ctr, y _ ctr ) return anchors
[ -0.062344975769519806, 0.027190841734409332, 0.4645274877548218, -1.219570279121399, -0.09846489131450653, -0.48571300506591797, 0.17477066814899445, -0.9190278649330139, 1.1105619668960571, 0.34291791915893555, 0.5151565670967102, -0.17996154725551605, 0.5218169093132019, -0.7301446795463...
def _ _ init _ _ ( self, x : num, y : num, z : num ) : super ( ). _ _ init _ _ ( x, y, z )
[ 0.4308040142059326, -0.07703083753585815, 0.5382413864135742, 0.9184417724609375, 0.302706778049469, 0.6414558291435242, 0.15358133614063263, 0.19888904690742493, 0.0697767585515976, -0.6775234937667847, -0.9259814023971558, -0.23963379859924316, 0.03777593374252319, -0.4292316138744354, ...
def _ load _ one _ date _ data ( self, universe, path _ templates, current _ date, date _ data, dims ) : if universe. stock _ secu _ code _ number : file _ path = path _ templates [ 0 ]. format ( current _ date. year, current _ date. month, current _ date. day ) with open ( file _ path, " r " ) as f : self. _ read _ on...
[ -0.6953887343406677, 0.15362682938575745, 0.48607179522514343, 0.009373015724122524, -0.10178159177303314, 0.3296201825141907, -0.06626451760530472, 0.4277893006801605, -0.374806672334671, -0.25662603974342346, 0.3001394271850586, 0.2662830948829651, 0.09736937284469604, 0.1553618460893631...
def recordset _ from _ json ( data, schema ) : recordset = [ x for x in from _ json ( data, schema ) ] if len ( recordset ) = = 0 : return pd. dataframe ( recordset ) elif type ( recordset [ 0 ] ) is list : return np. matrix ( recordset ) elif type ( recordset [ 0 ] ) is not dict : return pd. series ( recordset ) else ...
[ -0.3975019156932831, 0.1757499873638153, 0.6096136569976807, -0.4825085997581482, -0.17346082627773285, -1.0786652565002441, -0.7010869383811951, -0.005387372802942991, 0.3179817795753479, -0.09874679148197174, 0.9647160172462463, 1.323819875717163, -0.4804781377315521, -0.653804361820221,...
def test _ complain _ if _ multiple _ bar _ sizes ( self ) : def mock _ get _ history _ db _ config ( db ) : if db = = " usa - stk - 1d " : return { " bar _ size " : " 1 day ", " universes " : [ " usa - stk " ], " vendor " : " ibkr ", " fields " : { " close " : " float ", " open " : " float ", " high " : " float ", " l...
[ -0.08308441191911697, 0.21445608139038086, 0.8220189809799194, -0.14816409349441528, 0.28426578640937805, 0.09850127249956131, 0.7419717311859131, -0.28557056188583374, -0.1984613686800003, 0.1148885041475296, -0.28830912709236145, -0.3201076090335846, -0.5785717368125916, 0.79236102104187...
def save _ errors ( self, n _ models ) : min _ max _ errors = self. _ binary _ flags _ to _ list ( self. ret [ 1, : ], n _ models ) nan _ errors = self. _ binary _ flags _ to _ list ( self. ret [ 2, : ], n _ models ) self. _ write _ error _ file ( min _ max _ errors, self. minima _ error _ file ) self. _ write _ error ...
[ -1.1642755270004272, -0.25291940569877625, 0.1699226051568985, 0.38160204887390137, 1.8316341638565063, 0.7442218661308289, 0.6526681184768677, -0.07915331423282623, -0.7488394975662231, 0.30119624733924866, -1.6867552995681763, -0.26092851161956787, -0.25033363699913025, 0.593666374683380...
def getselectedworldpoints ( self ) : return [ self. _ pointslist [ i ] ['world'] for i in self. _ grid. getselectedrows ( ) ]
[ -0.4429073929786682, -0.2766420841217041, 0.4550743103027344, 1.5248051881790161, 0.017234792932868004, 0.33094337582588196, 0.2574298083782196, -0.13559995591640472, 0.508634626865387, 1.3811733722686768, -0.46405884623527527, 1.019875168800354, -0.2924349009990692, 0.4879666268825531, ...
def update _ cache ( self ) : self. groups = dict ( ) self. hosts = dict ( ) for region in self. regions : self. conn = ovh. client ( endpoint = region ) if self. retrievevps = = " yes " : self. get _ vps ( region ) if self. retrievededicated = = " yes " : self. get _ dedicated ( region ) self. write _ to _ cache ( sel...
[ -1.0042229890823364, -1.1285206079483032, 0.28428423404693604, -0.1706158071756363, 0.7402111291885376, 0.6167256236076355, -0.18227210640907288, -0.1119484156370163, -0.7316628694534302, 0.7905955910682678, 0.5053214430809021, -0.1900414675474167, -0.42143547534942627, 0.2293376922607422,...
def update _ user _ admin ( email ) : cur. execute ( " update users set role = % s where email = % s ; ", ( 1, email ) ) config. conn. commit ( )
[ -0.44106772541999817, 0.49829819798469543, 0.33053532242774963, -0.5827876925468445, -0.26599857211112976, 0.3731512129306793, -0.045637886971235275, -0.13953791558742523, -0.19603580236434937, 1.347328782081604, -0.11366458982229233, 0.8322119116783142, -0.29223793745040894, -0.3859920501...
def exploreandmerge ( docs _ dir, nav, output ='', level = 0 ) : if type ( nav ) is str : nav = [ nav ] for d in nav : if type ( d ) is str : filepath = os. path. join ( docs _ dir, d ) f = open ( filepath,'r') path = os. path. dirname ( filepath ) s = f. read ( ) + " \ n " # modification of image and links paths s = r...
[ -0.8197590112686157, -0.10770983248949051, 0.8907263278961182, -0.029525402933359146, -0.5330682992935181, -0.35832318663597107, 0.7064822316169739, 0.1790543645620346, 0.34278708696365356, -0.3854891359806061, 0.19763432443141937, -0.5952195525169373, 0.10215146094560623, 0.64666581153869...
def test _ wj _ create _ dict ( self ) : r1 = { " id " : 2, " width " : 2, " height " : 3, " x " : 4, " y " : 0 } r2 = { " id " : 9, " width " : 5, " height " : 6, " x " : 7, " y " : 8 } r1c = rectangle. create ( * * r1 ) r2c = rectangle. create ( * * r2 ) self. assertequal ( " [ rectangle ] ( 2 ) 4 / 0 - 2 / 3 ", str ...
[ -0.49041494727134705, -0.7375461459159851, 0.5586124062538147, -0.5006030797958374, -0.13806386291980743, 0.4499451220035553, 0.7326933741569519, -0.7677462697029114, -0.36668771505355835, 0.017768336459994316, -0.009501315653324127, -0.8199661374092102, -0.2521868944168091, 0.302387923002...
def testdeletevaluesforquery ( self ) : securetagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) objectid1 = uuid4 ( ) objectid2 = uuid4 ( ) # fixme replace this with securetagvalueapi once the index is # integrated values = { objectid1 : { u'username / bar': 42 }, objectid2 : { u'username / ba...
[ -0.2672235369682312, 0.4895860552787781, 0.34610071778297424, -0.1510811448097229, 0.6416888236999512, 0.4905007481575012, -0.11427707970142365, -0.5313761830329895, -0.3747067451477051, -0.8243855834007263, -0.10055425018072128, -0.003609022591263056, 0.27676963806152344, -0.0876138880848...
def execute ( self, config, args, host = none ) : oldversion = config. version version = args. version mmp = oldversion. split ( ". " ) mmp [ 0 ] = str ( int ( mmp [ 0 ] ) + 1 ) if version = = major else mmp [ 0 ] mmp [ 1 ] = str ( int ( mmp [ 1 ] ) + 1 ) if version = = minor else ( mmp [ 1 ] if version = = patch else ...
[ -0.16219091415405273, -0.7232706546783447, 0.8200173377990723, -0.07286552339792252, 0.7787724137306213, 0.06884581595659256, 0.4906170666217804, 0.8064132928848267, 0.059908412396907806, 0.957659900188446, -0.7615532279014587, 0.5749725103378296, -0.14284081757068634, 0.23975823819637299,...
def _ set _ taille ( self, size ) : self. _ taille = size
[ 0.2517573833465576, 0.5518864989280701, 0.36988258361816406, -1.9944486618041992, 0.11864756047725677, 0.5040306448936462, 0.05459253862500191, -0.6585369110107422, -1.0210922956466675, 0.41303467750549316, -1.1073707342147827, 0.4006739556789398, -0.20333795249462128, -0.13912148773670197...
def run ( self ) : biil _ recordset = self. filtered ( lambda a : a. location _ id = = self. env. ref ('batch _ vendor _ invoice _ import _ new. batch _ invoice _ import _ location') ) other _ recordset = self - biil _ recordset super ( irattachmentmetadata, other _ recordset ). run ( ) for attachment in biil _ records...
[ -0.29853737354278564, -0.505102276802063, 0.8919535875320435, 0.5769897699356079, 0.7895776629447937, 0.7074769735336304, 0.6484097242355347, -0.4457453787326813, -0.6682342290878296, 0.8295451402664185, 0.182473286986351, 0.8688886165618896, -0.028562072664499283, -0.05760890245437622, ...
def _ _ init _ _ ( self, emb _ size, emb _ dimension, p, sigma, wvector, cvector ) : super ( finetunemodel, self ). _ _ init _ _ ( ) self. emb _ size = emb _ size self. emb _ dimension = emb _ dimension self. p = p self. sigma = sigma self. i _ embeddings = nn. embedding ( emb _ size, emb _ dimension ) # unchange pretr...
[ 0.7961357235908508, 0.46093371510505676, 0.8635581135749817, 1.243811845779419, -0.33052051067352295, 0.4829208552837372, 1.019901990890503, 0.28886446356773376, 0.20354841649532318, 0.09826653450727463, -0.5911985635757446, -0.10598012804985046, 0.332650750875473, 0.13780933618545532, -...
def get _ result _ class ( action ) : msg _ type = get _ result _ type ( action ) # verify message type was found. if not msg _ type : return none return roslib. message. get _ message _ class ( msg _ type )
[ -0.5889466404914856, -0.037506457418203354, 0.44134703278541565, 0.7649392485618591, 1.0547150373458862, -0.8775040507316589, 0.37642931938171387, -2.0087740421295166, 0.691573441028595, -0.5724536180496216, 0.5990814566612244, 0.8849948644638062, -0.48855626583099365, 0.6439695954322815, ...
def savetodb ( self ) : try : db. session. add ( self. file ) db. session. commit ( ) print ('record was successfully added') except exception as e : print e
[ -0.16587290167808533, -0.1251482516527176, 0.7420873641967773, 0.07184963673353195, 1.282844066619873, 1.1651077270507812, 0.16178074479103088, 0.608868420124054, -1.1447936296463013, 0.39611589908599854, -0.32808274030685425, -0.48746535181999207, -1.1136622428894043, 0.6246379613876343, ...
def _ _ create _ visualisation _ gui _ section ( self ) : self. c _ logger. info ( " starting to create visualisation gui section. " ) ttk. separator ( self. main _ window, orient = tk. horizontal ). grid ( row = 6, column = 0, columnspan = 2, sticky = " we " ) visualisation _ label = ttk. label ( self. main _ window, ...
[ 0.27364158630371094, 0.9392877221107483, 0.9182937145233154, -0.4927089214324951, -0.16160452365875244, 0.5718421936035156, 1.128798007965088, -0.7685863971710205, -0.8546150922775269, 0.15331074595451355, 0.319675087928772, -0.1306488960981369, 0.131711944937706, 1.1408308744430542, 0.8...
def get _ response ( self, as _ json : t. literal [ false ] =... ) - > service _ pb2. modelinferresponse :
[ -0.6278330683708191, -0.4769619405269623, 0.5198966860771179, 0.41818878054618835, 0.2610458433628082, -0.23242664337158203, 0.2150512933731079, -1.2066359519958496, 0.1770554780960083, -0.360010027885437, -0.764559268951416, 0.14225685596466064, -0.27037739753723145, -0.28869253396987915,...
def _ init _ data _ model ( self ) : # pylint : disable = no - self - use logging. info ( " intializing data model " )
[ -0.34299609065055847, -0.061286695301532745, 0.13503339886665344, 0.11633691191673279, 0.5245449542999268, 0.7838187217712402, 0.25685450434684753, 0.6123258471488953, -1.1101304292678833, -0.599997341632843, -1.4236953258514404, 0.3065527379512787, 0.8909324407577515, 0.3995489180088043, ...
def test _ basic _ list ( self ) : assert { * keys ( [ 0, 1, 2 ] ) } = = { ('0 ', ), ('1 ', ), ('2 ', ) }
[ -1.5244712829589844, -0.08094250410795212, 0.2955099642276764, -0.4858226478099823, 0.6148926019668579, -0.030333533883094788, -0.747999370098114, -0.021138252690434456, 0.2955904006958008, -0.3481252193450928, -1.4195255041122437, -1.133388638496399, -0.2689981162548065, 0.066600896418094...
def is _ prefix ( self, word ) : word = word. replace ( '. ','' ). upper ( ) return word in self. prefixes
[ 0.034081753343343735, -0.06641419231891632, 0.5013495087623596, 0.4342612624168396, -0.5860781669616699, -0.19861233234405518, -0.860956609249115, 0.09892045706510544, 1.3861650228500366, 0.6173056960105896, 0.02563335746526718, 1.241282343864441, -1.0978522300720215, 0.6227198243141174, ...
def tversky ( x, y, alpha = 0. 5, beta = 0. 5 ) : x = set ( x ) y = set ( y ) len _ x _ y = len ( x & y ) return len _ x _ y / float ( len _ x _ y + alpha * len ( x - y ) + beta * len ( y - x ) )
[ 0.765092670917511, 0.39637264609336853, 0.5405700206756592, -1.7639782428741455, -0.04188699275255203, -0.5863834619522095, -1.0404413938522339, -0.7690433263778687, -1.1440844535827637, 1.9372413158416748, 0.06974853575229645, 0.1554158627986908, -0.37370339035987854, -0.0291892122477293,...
def supports _ images ( self ) : return false
[ -1.0965564250946045, 1.2537649869918823, 0.46446141600608826, 0.659919023513794, -0.32369357347488403, 0.8222242593765259, -0.5295044183731079, 0.6931003928184509, -0.46510419249534607, -0.41534528136253357, -0.12133945524692535, -0.7969821691513062, -0.8681848645210266, 1.0753017663955688...
def sum _ add ( first, second ) : return sum ( [ first, second ] )
[ -0.29131898283958435, -0.5005350708961487, 0.4365456700325012, 0.13054780662059784, 0.0026772336568683386, -0.20367294549942017, -1.1536325216293335, -0.984155535697937, -0.8164662718772888, -0.1750757098197937, -0.945583164691925, 0.9405704140663147, 0.057337284088134766, -0.4349627196788...
def center _ ship ( self ) : self. rect. midbottom = self. screen _ rect. midbottom self. x = float ( self. rect. x )
[ -0.5944852828979492, -0.6500629782676697, 0.605097770690918, -0.45073431730270386, 0.6083663105964661, 0.2604302763938904, -0.48178768157958984, -0.3792704641819, 0.5012720823287964, 0.4812946319580078, 0.41445598006248474, 0.6949265599250793, 0.3066583573818207, 0.2968795895576477, 0.05...
def test _ invalid _ list _ channel _ presence ( ) : with pytest. raises ( valueerror ) : mob. channel _ presence ( ['in ','valid ','list'] )
[ 0.3162078857421875, -0.6493038535118103, 0.4224316477775574, 0.20993000268936157, 1.1435681581497192, 0.4279862642288208, -1.168473720550537, 0.9209765195846558, 0.20569536089897156, 0.19609171152114868, -0.4600297808647156, -0.500710129737854, -0.6113315224647522, 0.9796805381774902, 0....
def send _ packet _ out ( self, datapath, buffer _ id, src _ port, dst _ port, data, queue _ set = false ) : out = self. build _ packet _ out ( datapath, buffer _ id, src _ port, dst _ port, data, queue _ set ) if out : datapath. send _ msg ( out )
[ 0.23481854796409607, 0.6895880699157715, 0.20511269569396973, -0.7254753112792969, -0.3837299942970276, -0.07385359704494476, -0.17119371891021729, -0.2573366165161133, -0.3886170983314514, -0.21319085359573364, -0.30569785833358765, 1.326461911201477, 0.20364980399608612, -0.0594278499484...
def get _ tpid ( self ) : return self. get _ word ( 0 )
[ 0.6700782775878906, -0.05597313120961189, 0.4891037940979004, -0.9571226835250854, 0.3127584457397461, 0.2984098792076111, 0.12928465008735657, -0.34975072741508484, 0.039983704686164856, 1.563169002532959, 0.7768654227256775, -0.18372641503810883, -1.1586418151855469, -1.0864026546478271,...
def net _ structure ( self ) : x = input ( shape = self. input _ shape, name = " input _ variable " ) x _ = { } for k in range ( self. data. dimensions ) : x _ [ k ] = lambda ( lambda z : z [..., k ] ) ( x ) e _ = { } if self. has _ exog ( ) : e = input ( shape = self. exo _ shape, name = " exos _ variables " ) for k i...
[ 0.10052979737520218, 0.138981893658638, 0.8585246801376343, -0.21682526171207428, 0.09570645540952682, -0.7243202328681946, 0.5281132459640503, -0.08788235485553741, -0.5626373291015625, 0.057646382600069046, -0.543894350528717, 0.3198377788066864, 0.6812039017677307, 0.3552519381046295, ...
def add _ property ( cls, prop _ data ) : new _ property = cls ( * * prop _ data ) db. session. add ( new _ property ) db. session. commit ( ) # add property listing data to elasticsearch index add _ to _ index ( new _ property. id, prop _ data [ " name " ], prop _ data [ " desc " ], prop _ data [ " location " ] )
[ -0.4185214340686798, -0.7186638712882996, 0.5901709198951721, 0.41356924176216125, 1.0228018760681152, 1.0555700063705444, -0.9739012122154236, 1.0078908205032349, 0.5162830948829651, -0.025638457387685776, 0.6179414391517639, -0.19935566186904907, -0.5511186122894287, -1.060827612876892, ...
def test _ idtoken _ response ( self ) : data = {'client _ id': self. client _ no _ access. client _ id,'redirect _ uri': self. client _ no _ access. default _ redirect _ uri,'response _ type': next ( self. client _ no _ access. response _ type _ values ( ) ),'scope':'openid email ','state': self. state,'nonce': self. ...
[ -0.5131862163543701, -0.40932807326316833, 0.4608897268772125, -0.6636601686477661, 0.4390805661678314, 0.6683439016342163, 0.31776687502861023, -0.7752525806427002, 0.3705204427242279, -1.1056078672409058, -0.9574289917945862, 0.09858201444149017, -0.33174869418144226, -0.5744159817695618...
def is _ prime ( number, prime _ numbers ) : # take square root of number and remove all primes below it from list : square _ root = number * * ( 1 / 2. 0 ) prime _ numbers = [ n for n in prime _ numbers if n < = square _ root ] # loop through already known primes : for prime in prime _ numbers : # if number is divisib...
[ -0.31238988041877747, 0.46641284227371216, 0.5405294299125671, 0.7136430144309998, 0.4041973948478699, 0.24779708683490753, -0.7982770800590515, 0.5421221852302551, 1.5025746822357178, 0.48329856991767883, -0.5147773027420044, -0.652809739112854, -0.8524386286735535, 0.7615471482276917, ...
def test _ profile _ no _ task ( self ) : profile = profilefactory ( user = self. user ) response = self. client. get ( self. url ) self. assertcontains ( response,'href = " { 0 } " '. format ( reverse ( " tasks : create _ task " ) ), status _ code = 200 )
[ 0.6610226631164551, 1.197593331336975, 0.40019649267196655, 0.5105195641517639, 0.6752527952194214, 1.1821156740188599, 1.160681962966919, -0.16497981548309326, -0.568814218044281, -1.1191743612289429, -0.634951114654541, -0.5968433022499084, 0.353884756565094, 0.3847786784172058, -0.983...
def is _ opened ( self ) : return self. browser. is _ displayed ( self. ul )
[ -1.166341781616211, -0.48861798644065857, 0.4743371307849884, 0.5283891558647156, -0.20967215299606323, 0.0343417190015316, 0.16244594752788544, 1.3982696533203125, 1.3032594919204712, -0.708480179309845, -0.24620844423770905, -0.22357165813446045, -0.05542333796620369, 0.9089800715446472,...
def info ( user _ id, group _ id ) : client = get _ admin _ client ( ) qos _ cli. info ( client, user _ id = user _ id, group _ id = group _ id )
[ 0.649174153804779, 0.8724291920661926, 0.3776719272136688, 0.12765005230903625, 0.06504561007022858, -0.589962899684906, -0.4309922754764557, -1.7343883514404297, -0.8360092043876648, 0.32441213726997375, 0.5093489289283752, 1.9806660413742065, -0.13251444697380066, -0.1929038017988205, ...
def g1dlisttspinitializator ( genome, * * args ) : lst = [ i for i in xrange ( genome. getlistsize ( ) ) ] random. shuffle ( lst ) genome. setinternallist ( lst )
[ -0.7640666365623474, 0.42434069514274597, 0.32369089126586914, -0.45285674929618835, -0.08141033351421356, 1.316561222076416, -0.1445407271385193, 1.2808330059051514, 0.9037929177284241, -0.16413599252700806, -1.5682144165039062, 0.26082611083984375, -0.7463297843933105, 0.8967646956443787...
async def pull ( self, ctx, noreload : typing. optional [ str ] = none ) : # await ctx. trigger _ typing ( ) try : output = subprocess. check _ output ( ['git ','pull'] ). decode ( ) await ctx. send ('` ` ` git \ n'+ output +'\ n ` ` `') except exception as e : return await ctx. send ( str ( e ) ) if noreload is not no...
[ -0.414338618516922, 0.7781096696853638, 0.6286575198173523, 0.0006867324118502438, 0.030446510761976242, -0.11543023586273193, -0.4956732392311096, 0.18027248978614807, -0.14198626577854156, 0.19994178414344788, -0.1140705868601799, 0.9935563802719116, -1.2416658401489258, -0.4722929000854...
def on _ login ( self, data ) : try : safe _ data = t. dict ( { t. key ( u " username " ) > > " username " : t. string, t. key ( u " password " ) > > " password " : t. string, } ). check ( data ) except t. dataerror : self. emit ( " loginfailed ", { " reason " : " invalidrequest " } ) logging. exception ( " received in...
[ -0.3638441562652588, -0.19687165319919586, 0.5348396301269531, 0.6719975471496582, -0.48339560627937317, 0.10199877619743347, -0.9043309092521667, 0.3077060580253601, 0.5983659029006958, -0.09183529019355774, -0.8951255679130554, 0.3284245729446411, -0.5019370317459106, -0.3820192515850067...
def get _ refseq _ type ( name ) : prefix = name [ : 3 ] return refseq _ prefix _ lookup. get ( prefix, ( none,'' ) ) [ 0 ]
[ -0.5691189169883728, -0.04665547236800194, 0.5595209002494812, -0.5283704996109009, -0.034645386040210724, -0.5818090438842773, 0.15847483277320862, -1.268104076385498, 0.8004341721534729, 0.7599216103553772, -0.4573018252849579, -0.18827873468399048, -0.44686490297317505, 0.55824303627014...
def test _ lmdb _ insert _ null _ value _ ok ( ) : with temporarydirectory ( ) as dbpath : env = lmdb. open ( dbpath ) with env. begin ( write = true ) as txn : key = b'foo'data = none txn. put ( key, data ) with env. begin ( ) as txn : cursor = txn. cursor ( ) assert cursor. first ( ) assert cursor. value ( ) = = b'' ...
[ 0.15999293327331543, 0.17806245386600494, 0.3596113920211792, -0.44399845600128174, 0.43283966183662415, -0.0502205453813076, -0.0048668175004422665, 0.451803594827652, -0.4477579891681671, -0.2759270966053009, -0.6904539465904236, -0.06289359927177429, -1.2991262674331665, 0.5350472927093...
def _ send _ input ( self ) : # notify server the team the client wants to be on _, writable, _ = select ( [ ], [ self. _ to _ server ], [ self. _ to _ server ] ) if writable : send ( writable [ 0 ], self. _ team ) else : raise runtimeerror ( " lost connection with server " ) clock = pygame. time. clock ( ) # control t...
[ -0.9358388781547546, 0.21646369993686676, 0.7267268896102905, -0.8456819653511047, 0.2379339337348938, 0.14039552211761475, 0.7414124608039856, -0.9513198137283325, -0.6293232440948486, 0.29645729064941406, -0.4872220456600189, 0.7316932678222656, -0.7393304109573364, -0.531514048576355, ...
def equity _ score ( self, equity _ score ) : self. _ equity _ score = equity _ score
[ 0.4626767933368683, -0.5660731792449951, 0.2289271354675293, -1.0223480463027954, 1.6057612895965576, 0.3268986642360687, -0.4774641692638397, 0.7408732771873474, -0.8608450293540955, 0.35777586698532104, -0.5101724863052368, -1.1417301893234253, -0.7639879584312439, -0.17055001854896545, ...
def disable ( self ) : self. laffmeter. destroy ( ) del self. laffmeter if hasattr ( self,'purchasebutton') : self. purchasebutton. destroy ( ) del self. purchasebutton # clean up the book self. newsbuttonmgr. request ('off') self. book. unload ( ) del self. optionspage del self. shardpage del self. mappage del self. i...
[ 0.035226911306381226, -0.1331930309534073, 0.6216380000114441, 0.4343947172164917, -0.08155757188796997, 1.1393635272979736, 0.05559153854846954, -0.025642095133662224, 0.38898542523384094, -0.657923698425293, -0.19088231027126312, -0.5163062810897827, -0.6494407057762146, 1.43196141719818...
def grating _ pair _ dispersion ( lamb, lamb, theta _ inc, order ) : theta _ diff = np. arcsin ( np. sin ( theta _ inc ) + order * lamb / lamb ) beta = 2 * pi / lamb * 2 * np. cos ( theta _ inc - theta _ diff ) / np. cos ( theta _ inc ) beta _ 2 = - lamb * * 3 * 2 / ( 2 * pi * si ['c'] * * 2 * lamb * * 2 * np. cos ( th...
[ 0.46566104888916016, 0.18562650680541992, 1.014992117881775, -0.5732091665267944, -0.14534172415733337, 0.4846682846546173, -0.2669028043746948, -0.33094626665115356, -0.8797095417976379, 0.07700476050376892, -0.2315649539232254, 0.36470332741737366, -1.3533269166946411, 0.6025121212005615...
def _ to _ streamlines _ coordinates ( inds, lin _ t, offset ) : inds = inds - offset streamline = np. dot ( inds, np. linalg. inv ( lin _ t ) ) # streamline = streamline - [ 1, 1, 1 ] return streamline
[ 0.13474389910697937, -0.5929943919181824, 0.3881063163280487, -0.7810357809066772, 0.06084301322698593, 0.8548905253410339, -0.06430049240589142, 0.3601900339126587, 0.37353694438934326, 0.8107263445854187, -0.45571932196617126, 0.8576746582984924, 0.2558870017528534, -1.056494116783142, ...
def send _ reset _ password _ instructions ( self, user ) : token = self. security _ utils _ service. generate _ reset _ password _ token ( user ) reset _ link = url _ for ('security _ controller. reset _ password ', token = token, _ external = true ) self. send _ mail ( _ ('flask _ unchained. bundles. security : email...
[ -0.25972601771354675, 0.5942719578742981, 0.3772948980331421, 0.5929859280586243, 0.3228937089443207, -0.5099658966064453, 0.8968914151191711, -0.4321715533733368, -0.2549399733543396, 0.0635257288813591, -0.9858574271202087, 1.3896726369857788, 0.4512976109981537, -0.39881420135498047, ...
def minimax ( board ) : if terminal ( board ) = = true : return none best _ action = none alpha = - float ('inf') beta = float ('inf') if player ( board ) = = x : best _ value = - float ('inf') for action in actions ( board ) : new _ board = result ( board, action ) v = score ( new _ board, alpha, beta ) if v > best _ ...
[ 0.006067948881536722, -0.7702534198760986, 0.8489899635314941, 0.6919106245040894, -0.20468449592590332, -0.1827540248632431, -0.052474480122327805, -0.5179023742675781, 0.2059962898492813, 0.27797508239746094, -0.179965540766716, 0.46633097529411316, -0.709755539894104, 0.2891071736812591...
def with _ continuous _ variables ( self, indexes ) : self. _ continuous _ variables = indexes
[ 0.2854040563106537, -0.3537868559360504, 0.33007004857063293, 0.5157647728919983, 0.25247418880462646, 1.417129635810852, 0.48040008544921875, 0.5882366299629211, -0.564404308795929, -0.06640205532312393, -0.9007818698883057, -0.0023214234970510006, -0.5071980953216553, -0.7369887828826904...
def data _ convert _ voxel _ mc ( self, vrm _ system, dataset, point _ index, kcc _ data = pd. dataframe ( {'a': [ ] } ) ) : def get _ dev _ data ( x1, x2, y1, y2, z1, z2 ) : if ( abs ( x1 ) > abs ( x2 ) ) : x _ dev = x1 else : x _ dev = x2 if ( abs ( y1 ) > abs ( y2 ) ) : y _ dev = y1 else : y _ dev = y2 if ( abs ( z1...
[ 0.512983500957489, -0.6362199187278748, 0.8297235369682312, 0.04266684129834175, -0.22548434138298035, -0.06040806695818901, -0.005896504502743483, -0.22922010719776154, 0.22689878940582275, 0.36223575472831726, 0.3106166422367096, 0.40998151898384094, -0.41551128029823303, 0.0492790825664...
def html _ table ( df, heading = { }, href = true, * * kw ) : t = df. to _ html ( * * kw ) t = t. replace ('< td > < strong > ','< td class = " index " > < strong >') # what pandas generates for index column for h, item in heading. items ( ) : try : newhead, title = item. split ( ', ', 1 ) except : print'* * * fail to ...
[ -0.6182942986488342, 0.9625959396362305, 0.8510611653327942, 0.35754111409187317, -0.6955177783966064, -0.01699642278254032, -0.2712845504283905, 0.09795206785202026, -0.46872442960739136, -0.04994469881057739, 0.35114654898643494, 0.03617609664797783, 0.9446304440498352, -0.16773553192615...
def ntk _ vp _ fn ( cotangents : pytree ) - > pytree : vjp _ out = vjp ( f2, params ) [ 1 ] ( cotangents ) jvp _ out = jvp ( f1, ( params, ), vjp _ out ) [ 1 ] return jvp _ out
[ 0.38910192251205444, 0.03918379172682762, 0.15220889449119568, 0.20983318984508514, -1.0131816864013672, -0.7413209080696106, -0.10602476447820663, -0.16711030900478363, -0.3436221480369568, 1.3248106241226196, 0.30298537015914917, -0.23551706969738007, 0.6099849939346313, -0.3137076497077...
def extract _ audio ( inputfile, output, bitrate = 3000, fps = 44100 ) : return [ " ffmpeg ", " - y ", " - i ", inputfile, " - ab ", " % dk " % bitrate, " - ar ", " % d " % fps, output ]
[ 0.040778618305921555, -0.5972245931625366, 0.48357731103897095, 0.9088430404663086, 0.09345166385173798, -0.7908663153648376, 0.16464637219905853, -0.45933616161346436, -0.4259984791278839, 0.7706432938575745, -0.14448004961013794, -0.049538347870111465, 0.03283603489398956, 0.552004277706...
def longestpath ( self ) : self. topordering ( ) # generate the topological order self. nodes [ self. startnode ]. score = 0 # initialize the score of the start node to be 0 # slice the self. toporder to start with self. startnode and end with self. endnode for a in self. toporder [ self. toporder. index ( self. startn...
[ -0.6816889047622681, 0.3301472067832947, 0.5486963391304016, -0.24832147359848022, -0.021942585706710815, -0.139896422624588, 0.7784140706062317, 1.1863079071044922, 0.32059624791145325, -0.0478806309401989, 0.10104218870401382, -0.25867959856987, -0.24185992777347565, 0.19309550523757935,...
def merge ( self, nums1 : list, m : int, nums2 : list, n : int ) - > none : n1 _ i, n2 _ i, t _ i = m - 1, n - 1, m + n - 1 while n1 _ i > = 0 and n2 _ i > = 0 : if nums1 [ n1 _ i ] > = nums2 [ n2 _ i ] : nums1 [ t _ i ] = nums1 [ n1 _ i ] n1 _ i - = 1 else : nums1 [ t _ i ] = nums2 [ n2 _ i ] n2 _ i - = 1 t _ i - = 1 ...
[ -0.4169043004512787, -0.08993364870548248, 0.7353267669677734, 0.8070115447044373, -0.2792932987213135, 0.37333303689956665, -0.03666456788778305, -0.19641418755054474, -0.6517193913459778, -0.14014163613319397, -0.93367600440979, 0.39274343848228455, -0.17415300011634827, 0.22602623701095...
def readvectorfile ( v _ file ) : matrix = [ ] weights = false # read in the header of the file and do some error checking. # fp = openfile ( v _ file,'normalized frequency vector file :') line = ensure _ string ( fp. readline ( ) ) field = line. split (':') num _ vect = field [ 0 ] if len ( field ) = = 2 : if not'w'in...
[ -0.005227199289947748, -0.9806289672851562, 0.533587634563446, 0.2728574573993683, -0.04667142033576965, 0.18476185202598572, 0.9986175298690796, 0.49333831667900085, -0.18470138311386108, -0.014442586340010166, 0.765228807926178, 0.29728972911834717, -0.5725321173667908, 0.105977840721607...
def reset _ to _ prologue ( ) : pyautogui. hotkey ('command ','r') time. sleep ( 2. 2 ) press _ key ('enter ', 2, 2 ) press _ key ('s') press _ key ( "'", 2, 0. 5 ) time. sleep ( 1. 8 ) press _ key ('a') press _ key ( "'" ) time. sleep ( 2 ) press _ key ('enter ', 4, 1. 5 )
[ -0.18322570621967316, -0.0734889805316925, 0.8005474209785461, 0.5602321624755859, 0.21849466860294342, -0.36201977729797363, 1.137109637260437, 0.182734414935112, -0.8346694111824036, 0.5664865970611572, -0.5664545297622681, 0.82937091588974, -0.28231528401374817, 0.5280007719993591, 0....
def reset ( self ) : self. end _ game = false self. ship. reset ( ) self. bg. reset ( ) self. hourglass. reset ( ) for pipe in self. pipes : pipe. reset ( )
[ -1.1808363199234009, -0.3332698345184326, 0.2782727777957916, -0.6816202998161316, 1.1923222541809082, 0.14232705533504486, 0.39106619358062744, -0.4927082061767578, -1.209591269493103, 0.7763108611106873, 0.09280846267938614, 0.4170702397823334, -0.47713279724121094, 0.1600026935338974, ...
def status ( self ) : return self. _ status. text ( )
[ -0.11916891485452652, -1.2412842512130737, -0.0011326749809086323, -0.09512210637331009, -0.7947407364845276, 0.5519745945930481, -0.7920541167259216, 0.39899012446403503, 0.9496871829032898, 0.11412248015403748, -0.6132795810699463, 0.29641857743263245, -0.07637916505336761, -0.3769197463...
def plan ( self ) : self. run _ kubectl ( command = " plan " )
[ -0.00392618915066123, 0.10561369359493256, -0.020959535613656044, 0.6236616969108582, 0.6123150587081909, 1.0298988819122314, -0.797484815120697, -0.34213733673095703, -0.2741258144378662, -0.41868817806243896, -0.11032652854919434, 1.3256995677947998, 0.18796150386333466, -0.1249850690364...
def do _ make _ composite _ ref _ des ( self, node _ id = 1 ) : _ return = false _ pref _ des ='' # retrieve the parent hardware item's composite reference designator. _ node = self. tree. get _ node ( node _ id ) if self. tree. get _ node ( _ node. bpointer ). data is not none : _ pref _ des = self. tree. get _ node (...
[ 0.044463980942964554, 0.17323370277881622, 0.8435542583465576, -0.6716548204421997, 0.7483129501342773, 0.2882276177406311, -0.020762404426932335, 0.3504657447338104, -0.1727992594242096, -0.09524469822645187, -0.013651169836521149, 0.2171485722064972, -0.3497963845729828, 0.65819358825683...
def combine _ similar _ titles ( extracted _ strings ) : # iterate through each possible pair of title keys, including both permutations of each pair for title _ pair in permutations ( extracted _ strings, 2 ) : # if the first title is a subset of the second then combine their scores, taking the shorter one as the key ...
[ -0.04524173215031624, -0.718317449092865, 0.8737191557884216, -0.18150517344474792, -0.2795667052268982, 0.1573343724012375, 0.1345469355583191, -0.5931302309036255, -0.1119542121887207, 0.68239825963974, 0.02590932324528694, -0.08332543075084686, -0.2705307900905609, -0.9327790141105652, ...
def test _ unused _ name ( self ) : self. assertequal ( self. preview. unused _ name ('field1'),'field1 _ _')
[ -0.69968581199646, 0.3420899212360382, 0.24015380442142487, -0.9534396529197693, -0.6430891752243042, 0.6718401312828064, 0.44699153304100037, -0.4731633961200714, -0.040042754262685776, -0.4308672845363617, -1.2475636005401611, -0.27632132172584534, -0.16107404232025146, 0.473685860633850...
def fit _ transform ( self, x ) : return self. fit ( x ). transform ( x )
[ -0.6965709328651428, -0.8413556814193726, 0.36835595965385437, 0.07993733137845993, -0.3341471552848816, 0.03962590917944908, -0.8496166467666626, -0.4641808569431305, 0.886343240737915, -1.0878514051437378, -1.5839718580245972, 0.6687516570091248, 0.11108734458684921, -0.5718383193016052,...
def keep _ data ( data ) : from. consoleapp import _ nexpy _ dir, _ tree if'w0'not in _ tree : _ tree ['w0'] = nxload ( os. path. join ( _ nexpy _ dir,'w0. nxs'),'rw') ind = [ ] for key in _ tree ['w0'] : try : if key. startswith ('s') : ind. append ( int ( key [ 1 : ] ) ) except valueerror : pass if ind = = [ ] : ind ...
[ -0.32599490880966187, -0.334199458360672, 0.6282699704170227, -1.223595380783081, -1.080094337463379, 0.03173772245645523, -0.0010035051964223385, -0.6841986775398254, 0.7824053764343262, -0.016594810411334038, -0.6904458403587341, -0.08431874215602875, -0.33598601818084717, 0.406335681676...
def dq _ team _ keys ( self, dq _ team _ keys ) : self. _ dq _ team _ keys = dq _ team _ keys
[ -0.6138730645179749, 0.21886730194091797, -0.1475496143102646, -0.14932094514369965, -0.3895861804485321, 0.6335155367851257, 0.034225862473249435, -0.30177074670791626, -1.5257173776626587, 0.05805465951561928, -0.6375858187675476, -0.2706957459449768, 0.0680847018957138, -0.5102643370628...
async def async _ turn _ on ( self, percentage : int | none = none, preset _ mode : str | none = none, * * kwargs : any, ) - > none : await self. async _ run _ script ( self. _ on _ script, run _ variables = { attr _ percentage : percentage, attr _ preset _ mode : preset _ mode, }, context = self. _ context, ) if prese...
[ -0.29257097840309143, 0.21971395611763, 0.5912920236587524, 0.3897455334663391, 0.003859141143038869, -0.28491881489753723, 0.014508471824228764, 0.47870543599128723, 0.0037418692372739315, 0.23122863471508026, -0.3455756604671478, 0.43813925981521606, 0.08796725422143936, 0.19092935323715...
def render ( self, id = 0, tablename = " default ", page = 1, order = 0 ) : response = current. response response. files. append ( url ('static ','plugins / comments / css / plugin. comments. css') ) response. files. append ( url ('static ','plugins / comments / js / plugin. comments. js') ) self. tablename = tablename...
[ -0.11455205827951431, -0.6368424296379089, 0.7378232479095459, -0.05389268696308136, -0.279258131980896, -0.6648209691047668, 0.09833146631717682, 0.20187418162822723, -0.327949196100235, 0.42452266812324524, 0.2734324634075165, -0.46741318702697754, -0.6280584931373596, 0.2270630896091461...
def freedisk ( path ) : cmd = " df - h % s " % path stdout, stdin = popen2. popen2 ( cmd ) stdin. close ( ) print " < pre > " print " > ", cmd for line in stdout : print line, print " < / pre > "
[ -0.2984074652194977, 0.7325225472450256, 0.7252828478813171, 0.4898604452610016, 0.011959648691117764, -0.19190219044685364, 0.5017701387405396, -0.5984058380126953, -1.7695484161376953, -1.1505757570266724, 0.22048419713974, 0.19270773231983185, -0.018853142857551575, 0.804024338722229, ...
def _ _ init _ _ ( self, mean = {'a': [ 0., 0., 0. ],'b': [ 0., 0., 0. ],'c': [ 0., 0., 0. ] }, cov = { key : 0. 8 * np. ones ( shape = ( 3, 3 ) ) - ( 0. 8 - 1 ) * np. eye ( 3 ) for key in ['a ','b ','c'] }, coefs = {'a': [ 1, 1, 1 ],'b': [ 1, 1, 1 ],'c': [ 1, 1, 1 ] }, pi = {'a': 0. 25,'b': 0. 25,'c': 0. 5 }, n = 1000...
[ 0.16026350855827332, 0.48694247007369995, 1.0896285772323608, -0.4296274781227112, -0.12386356294155121, -0.22669073939323425, 0.07095403224229813, 0.02770889550447464, -0.14470896124839783, 0.27117490768432617, -1.1396006345748901, 0.8069460391998291, 0.5545235872268677, -0.28400859236717...
def get _ iterable _ element _ type ( tp : type ) - > type : if not is _ iterable _ type ( tp ) : raise valueerror ('get _ iterable _ element _ type ( ) called with non - iterable type.') return tp. _ _ args _ _ [ 0 ]
[ -0.8533463478088379, 0.4683701694011688, 0.529058039188385, 0.37676742672920227, 0.8054540157318115, 0.6881216764450073, 0.9506182670593262, -0.7587622404098511, 0.07964008301496506, 0.6007182002067566, -0.16057276725769043, 0.00634135864675045, -0.5153830051422119, 0.26342687010765076, ...
def objective ( self, args ) : num _ layers, hidden _ size, learning _ rate, batch _ size = args num _ layers = int ( num _ layers ) hidden _ size = int ( hidden _ size ) batch _ size = int ( batch _ size ) print ('' ) print ('attempting run with :') print ('num _ layers = % d'% num _ layers ) print ('hidden _ size = %...
[ -0.13019932806491852, -0.415184885263443, 1.0685832500457764, 0.3615681231021881, 0.5542140007019043, 0.023576470091938972, 0.14882905781269073, -0.6555142402648926, -1.015828251838684, 0.0893552377820015, 0.07087694108486176, 0.04012201353907585, -0.002679761266335845, 0.4018458425998688,...
def update _ document ( _ id ) :'''note : borrowed from user _ tags @ param product _ id - @ param delivery _ time -'''new _ doc = dict ( ) doc = dict ( ) metadata = dict ( ) metadata [ " tags " ] = " deprecated " doc [ " metadata " ] = metadata new _ doc [ " doc " ] = doc es. update ( index = " grq _ v2. 0 _ acquisiti...
[ -0.38927099108695984, -0.42837265133857727, 0.5337353348731995, -0.06450136005878448, -0.1917819231748581, -0.5490572452545166, -0.13128359615802765, -0.10916746407747269, -0.44686880707740784, 0.9275214076042175, -0.26357415318489075, 0.8032205104827881, -0.021095577627420425, -0.48756477...
def get _ continuous _ signal _ for _ channel _ group ( self, channel _ group ) : ind = indices _ where _ tetrode _ nrs _ in _ tetrode _ nrs ( self. channel _ map [ channel _ group ] ['tetrode _ nrs'], self. continuous ['tetrode _ nrs'] ) return self. continuous ['continuous'] [ :, ind ]
[ -0.2921500504016876, -0.7402345538139343, 0.3891536295413971, -0.6302174925804138, -0.09742332249879837, 0.1707555204629898, -0.0034293788485229015, -0.8010910153388977, -0.551343560218811, 0.7925406098365784, 0.36379921436309814, -0.09259922057390213, -0.6474711298942566, -0.1141056641936...
def control _ view ( self, request, pk ) : if not isinstance ( request. data, dict ) : raise validationerror ( { " detail " : " data must be a dictionary. " } ) if request. data. get ( " action " ) not in ( " scale ", " scroll " ) or request. data. get ( " direction " ) not in ( " up ", " down ", " reset " ) : raise va...
[ -0.8508570194244385, 0.28020715713500977, 0.827518105506897, -0.008328653872013092, -0.29665541648864746, 0.2517761290073395, 0.44830846786499023, -0.6987608671188354, 0.34192773699760437, 0.5316486954689026, -0.12215202301740646, -0.10067185759544373, 0.10866983234882355, 0.34326970577239...
def model _ task ( self ) : return self. _ model _ task
[ -0.3409968316555023, -0.05478660389780998, 0.31988346576690674, 0.6488380432128906, 0.4580647647380829, 1.168127179145813, 0.8630279302597046, -0.26613178849220276, -0.27368801832199097, 0.4936382472515106, -1.495054841041565, 0.3000747859477997, 0.7594553828239441, -0.4042285978794098, ...
def initialize _ connection ( self, volume, connector ) : self. _ login ( ) igroup = none if self. config. use _ igroups : # # most drivers don't use igroups, because there are a # number of issues with multipathing and iscsi / fcp where # lun devices either aren't cleaned up properly or are # stale ( from previous sca...
[ -0.5252091288566589, -0.991217851638794, 0.7517341375350952, -0.3236216902732849, 0.1809787154197693, -1.1884686946868896, -0.8520022034645081, 0.3157050311565399, 0.011553696356713772, -0.06602141261100769, -0.5029724836349487, 0.05597126483917236, -0.6145225167274475, -0.4936832785606384...
def state ( self, state ) : self. _ state = state
[ -0.6938380599021912, 0.2647537887096405, -0.05033043771982193, -0.46604734659194946, 0.013013267889618874, 0.6952746510505676, 0.47958868741989136, 0.8855622410774231, -0.21200717985630035, -0.7060412168502808, -1.1696633100509644, -0.4392821490764618, -0.044606778770685196, 0.869578361511...
def visit _ tryexcept ( self, node ) : # pylint : disable = invalid - name try _ id = self. create _ ast _ component ( node, component. try _ except ) self. create _ composition ( try _ id, * self. composition _ edge ) new _ node = copy ( node ) with self. exc _ handler ( ) as internal _ handler : new _ node. body = se...
[ -0.9803410172462463, 0.03108878806233406, 0.80344158411026, -0.9634798765182495, -0.6466919183731079, 0.4267430603504181, 0.5672097206115723, -0.017581192776560783, 0.5978018045425415, 0.3900366425514221, 0.15084269642829895, 0.29728963971138, -0.5283569097518921, -0.3091578781604767, 0....
def update _ inventory ( all _ products ) : with open ('products. csv ','w ', newline ='' ) as csv _ file : fieldnames = ['id ','product _ name ','buy _ date ','buy _ price ','expiration _ date ','sell _ date ','sell _ price ', ] product _ writer = csv. dictwriter ( csv _ file, fieldnames = fieldnames ) product _ write...
[ -0.9215593338012695, -1.1298284530639648, 0.6077324748039246, 0.9372433423995972, 0.8462485074996948, 0.5970650911331177, -0.13388922810554504, 0.239826962351799, -0.33140864968299866, 0.536440908908844, -0.35035568475723267, 0.0032124104909598827, 0.41924208402633667, -0.3047772943973541,...
def deser160 ( self ) : # ported from pixel _ dtb. cpp self. daq _ open ( dtb. bufsize ) self. pg _ setcmd ( 0, dtb. pg _ tok ) data = [ ] goodvalues = [ ] print ( " 0 1 2 3 4 5 6 7 " ) for y in range ( 20 ) : print " % 2d : " % y, for x in range ( 8 ) : self. daq _ select _ deser160 ( x ) self. sig _ setdelay ( dtb. s...
[ -0.3300682306289673, 0.4639016389846802, 0.9630385041236877, -0.5547344088554382, -0.36163803935050964, -0.11748392879962921, 0.335648775100708, 0.11336513608694077, -0.6761453747749329, -0.19018994271755219, -0.04532890021800995, -0.18961136043071747, -0.4703800678253174, 0.71038120985031...
def wrap _ html ( text, tag, * * kwargs ) : args = [ " { } = \ " { } \ " ". format ( i, j ) for i, j in kwargs. iteritems ( ) ] args = " ". join ( args ) sep = " " if args else " " return " < { tag } { sep } { args } > { text } < / { tag } > ". format ( tag = tag, text = text, sep = sep, args = args )
[ 0.4091051518917084, 0.3211580216884613, 0.388015478849411, 0.2320013791322708, -0.8274360299110413, 0.12401889264583588, -0.930482029914856, 0.06411883234977722, -0.7950189113616943, 0.1643597036600113, 0.7320908308029175, 0.022636346518993378, -0.19615110754966736, 0.08945970982313156, ...