text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ list _ recent _ history _ for _ user ( self ) : user _ id = none # change me!! r = self. client. list _ recent _ history _ for _ user ( user _ id )
[ 0.3225041329860687, 0.9538347125053406, 0.32029345631599426, 1.244602918624878, 0.36100634932518005, 0.019912485033273697, 0.35860997438430786, -0.6175462603569031, 0.6988314986228943, -1.1141753196716309, -0.45356616377830505, 0.7198390960693359, 0.23080500960350037, 0.6078249216079712, ...
def get ( self, host _ name, service _ description ) : mongo _ s = self. request. mongo _ connection. alignak _ live. services. find _ one ( { " host _ name " : host _ name, " service _ description " : service _ description }, ) return live _ service. liveservice ( * * mongo _ s )
[ 1.1164989471435547, -0.15560652315616608, 0.36737892031669617, 0.3793623447418213, 0.5255019068717957, 0.21544164419174194, -1.454276442527771, 0.049771498888731, -0.4682105481624603, -0.3565814197063446, 0.9943764805793762, 0.35698387026786804, -0.7180612683296204, 0.2936251163482666, -...
def call ( self, x, * args, * * kwargs ) : # preprocessing : apply layer normalization training = kwargs [ " training " ] y = self. layer _ norm ( x ) # get layer output y = self. layer ( y, * args, * * kwargs ) # postprocessing : apply dropout and residual connection if training : y = tf. nn. dropout ( y, rate = self....
[ -0.3967743515968323, 0.3780117332935333, 0.8420221209526062, 0.17034152150154114, -0.6087597608566284, 0.654232919216156, -0.287203311920166, -0.6980597376823425, 0.17477844655513763, -0.027402836829423904, 0.009160226210951805, -0.15723346173763275, -0.7072266936302185, -0.013401594944298...
def v _ rsj ( i, ic, rn, io, vo ) : if ic < 0 or rn < 0 : v = 1e10 else : v = np. zeros ( len ( i ) ) n = i > io + ic ; v [ n ] = rn * np. sqrt ( ( i [ n ] - io ) * * 2 - ic * * 2 ) + vo n = i < io - ic ; v [ n ] = - rn * np. sqrt ( ( i [ n ] - io ) * * 2 - ic * * 2 ) + vo n = np. logical _ and ( i > = io - ic, i < = i...
[ 0.4113767445087433, -0.1961904764175415, 0.43271374702453613, -0.3803703486919403, -0.09681662172079086, -0.518616259098053, 0.4413393437862396, -0.4309978783130646, 0.1931610107421875, 0.7819977402687073, -0.07357287406921387, 0.13485124707221985, -0.4897248446941376, -0.40269845724105835...
def init _ states ( self, * args : any, * * kwargs : any ) - > nestedmap : def init _ fn ( block, * args, * * kwargs ) : assert isinstance ( block, stackedtransformer ) return block. init _ states ( * args, * * kwargs ) return self. repeat. init _ states ( init _ fn, * args, * * kwargs )
[ -0.7814556956291199, 0.23522499203681946, 0.5498084425926208, 0.004348093643784523, 0.33746999502182007, -0.8418862819671631, 0.6436861753463745, -0.44062677025794983, -0.5464072227478027, -0.8020580410957336, -1.3588168621063232, -0.21758593618869781, 0.6065506339073181, 0.134182125329971...
def load _ addresses _ from _ file ( filename ) : addresses = [ ] try : for line in open ( filename, " r " ) : line = line. strip ( ) if not line. startswith ( " # " ) : host, port = line. split ( ) addresses. append ( ( host. decode ( " utf - 8 " ), int ( port ) ) ) except : pass return addresses
[ -0.528776228427887, -0.4133578836917877, 0.49268102645874023, -0.8027096390724182, -0.36156556010246277, 0.28194981813430786, 0.21704278886318207, 0.9297951459884644, -0.708509087562561, 0.66075599193573, -0.48341789841651917, -0.1987139880657196, -0.4791772663593292, 0.21936242282390594, ...
def plugout ( self ) : self. stream. dispatch = none self. stream. debug = none self. stream. features = none self. stream. destroy ( )
[ 0.2650483250617981, -0.5529611110687256, 0.19719451665878296, -0.6578415632247925, 0.62862229347229, -0.6532682180404663, 0.29719698429107666, 0.2642332911491394, -0.18704476952552795, -0.886914849281311, -0.8701253533363342, 0.9510232210159302, -0.4093116521835327, 1.3734937906265259, 0...
def comment ( id, cmt, * * repeatable ) : res = utils. string. to ( cmt ) return idaapi. set _ struc _ cmt ( id, res, repeatable. get ('repeatable ', true ) )
[ -0.7878624200820923, -0.6501040458679199, 0.3737397789955139, -1.2768269777297974, 0.4687190353870392, -0.1667160838842392, 0.4134049713611603, -0.6407787203788757, -0.30263325572013855, 0.2734801173210144, -1.1141788959503174, 0.036862947046756744, -0.5836170315742493, -0.809935986995697,...
def compute _ mmd ( x, y ) : x _ kernel = compute _ kernel ( x, x ) y _ kernel = compute _ kernel ( y, y ) xy _ kernel = compute _ kernel ( x, y ) mmd = x _ kernel. mean ( ) + y _ kernel. mean ( ) - 2 * xy _ kernel. mean ( ) return mmd
[ 0.07803215831518173, -0.35021933913230896, 0.7488961815834045, -0.3311181962490082, -0.325969934463501, 0.2298978567123413, -1.6573330163955688, -0.37271904945373535, 0.2642250061035156, 0.910333514213562, 1.163913369178772, 1.0479881763458252, 0.051031362265348434, 0.32956963777542114, ...
def reversemove ( self, movable _ statement ) : pred = movable _ statement. predicate sl = movable _ statement. terms newlist = [ pred, sl [ 0 ], sl [ 2 ], sl [ 1 ] ] self. makemove ( statement ( newlist ) )
[ -0.365215539932251, -0.40438753366470337, 0.43471768498420715, -0.029385974630713463, -0.43303611874580383, -0.22946609556674957, -0.4141903221607208, 1.40316641330719, -0.9772325754165649, 0.7488656640052795, -0.6396554708480835, 0.5586643815040588, -0.19265098869800568, -0.54283356666564...
def domains ( self, response _ key = true, * * kwargs ) : key = none if response _ key : key ='domain _ entries'return self. _ get ( " / os - floating - ip - dns ", key, * * kwargs )
[ -0.6337270140647888, 1.2415220737457275, 0.38160765171051025, 0.6622288823127747, 0.4220408797264099, -0.6621448993682861, -0.2643177807331085, -0.6637217402458191, 0.3001250922679901, -0.7061797380447388, -0.37995103001594543, 0.5460173487663269, 0.12592722475528717, 0.6292281150817871, ...
def projective _ forward _ ods ( src _ images, order, intrinsics, jitter _ pose, pos, depths ) : n _ layers, n _ batch, height, width, channels = src _ images. get _ shape ( ). as _ list ( ) pixel _ coords = [ ] for i in range ( n _ batch ) : pixel _ coords _ batch = [ ] pixels = spherical. intersect _ ods ( jitter _ p...
[ -0.3093755841255188, 0.6909807920455933, 0.6601234078407288, -0.4963904023170471, -0.13370279967784882, -0.495269775390625, 0.24314475059509277, 0.1375180184841156, -0.018608642742037773, 0.8818572163581848, 0.6222636699676514, -0.07848922163248062, 0.3718971312046051, -0.21276907622814178...
def turtleturn ( actions, x, y, heading, steps ) : remaining = [ steps ] def target _ pos _ callback ( ) : if remaining [ 0 ] < = 0 : return none # signals stopping else : remaining [ 0 ] - = 1 return x, y, heading return approacher ( actions, lambda : succeed ( target _ pos _ callback ( ) ) )
[ -0.6447138786315918, -0.46801483631134033, 0.3833085000514984, 0.019706808030605316, -0.22525885701179504, -0.30926406383514404, -0.3653038442134857, -0.8011996150016785, -0.8182926177978516, 0.39993032813072205, -0.1268339455127716, -0.35524412989616394, 0.08921196311712265, -0.5697930455...
def _ _ abs _ _ ( self ) - > float : return self. norm ( )
[ 0.12121732532978058, -1.3413223028182983, 0.60825115442276, 0.525230884552002, -0.09200502932071686, 0.29121312499046326, -0.05193600058555603, -0.42507418990135193, -0.1148364394903183, -0.4168650209903717, 0.46327775716781616, 0.5563026070594788, -0.01183357648551464, 0.9056161642074585,...
def prepare _ output _ dir ( path ) : if not os. path. isdir ( path ) : os. makedirs ( path ) mode = os. stat ( path ). st _ mode & 0o777 new _ mode = mode | 0o222 # must be writable by all if new _ mode! = mode : os. chmod ( path, new _ mode ) return path
[ -0.3145003020763397, -0.18589267134666443, 0.6655721068382263, 0.317528635263443, -1.1806763410568237, -0.00837197620421648, 1.6438655853271484, -0.45834246277809143, 0.26332950592041016, -0.2045581340789795, 0.6618918776512146, -0.5705283880233765, 0.16305290162563324, -0.5059896111488342...
def threaded ( fn ) : def wrapper ( * args, * * kwargs ) : # thread = thread ( target = fn, args = args, kwargs = kwargs ) # newthread = thread ( parent = self, target = compute _ core ) if threading. currentthread ( ). name = = " mainthread " : args [ 0 ]. running = true def isfinish ( ) : args [ 0 ]. running = false ...
[ 0.009406186640262604, -0.30431583523750305, 0.6708357334136963, -0.24528847634792328, 0.6456578373908997, 0.4868153929710388, -0.09125228226184845, -0.22715407609939575, 0.2685542404651642, -0.10589342564344406, 0.41291242837905884, -0.08988092094659805, -0.464919775724411, 0.1503693312406...
def get ( self ) : allresultstempl = env. get _ template ( " allmetricresults. html " ) runid = int ( self. request. arguments ['runid'] [ 0 ] ) self. write ( allresultstempl. render ( runlist = runlist, runid = runid ) )
[ -0.25654423236846924, 0.4482571482658386, 0.36738815903663635, 0.3074913024902344, 0.2178557813167572, 0.09606029838323593, 0.46122103929519653, 0.22254279255867004, -0.614324152469635, -0.2976815700531006, 0.5611459612846375, 0.19470077753067017, -0.9269465208053589, 1.2268166542053223, ...
def currency ( f ) : @ wraps ( f ) def wrapper ( * args, * * kwargs ) : return'{ } { } '. format ('$ ', f ( * args, * * kwargs ) ) return wrapper
[ -0.6513585448265076, -0.19876088201999664, 0.5536665320396423, -0.5507581233978271, -0.7423092722892761, -0.04976454749703407, -0.2976488471031189, 0.3059725761413574, 0.3942044675350189, 0.6631209254264832, 1.1499754190444946, 0.24385325610637665, 0.5912179946899414, 0.30357828736305237, ...
def board ( self ) : self. buffer. setmap ( self. now. board [ : : - 1 ] ) t = self. now. istrunk ( ) if t = = 0 : print ('= = = = = = = = = no.'+ str ( self. count ) +'step = = = = = = = = =') else : print ('= = = = = = = = = no.'+ str ( self. count ) +'step ( branch'+ str ( t ) +') = = = = = = = = =') print ( self. n...
[ -0.08846008777618408, -0.021571477875113487, 0.8681932091712952, -0.2891235649585724, 0.5629637241363525, 0.41651272773742676, 0.7908215522766113, -0.08042144030332565, -1.204017162322998, -0.36059123277664185, -0.48969578742980957, 0.5826044678688049, -0.5970693230628967, 1.28597235679626...
def get _ val ( self, key ) : raise notimplementederror
[ -0.7827840447425842, 0.46621349453926086, 0.23246325552463531, 0.5676797032356262, -0.359284907579422, 0.2654518187046051, -0.666849672794342, -0.1963086724281311, -0.5515317916870117, -0.14334575831890106, -0.1759423464536667, 0.21386896073818207, 0.8560965061187744, 0.6983261108398438, ...
def to _ json ( value ) : if value = = none : return none return json. dumps ( value )
[ -0.7262888550758362, -0.5468828678131104, 0.33270978927612305, -0.7714909911155701, -0.34184926748275757, -1.1118052005767822, 0.1226930245757103, -1.1971943378448486, 0.8768978118896484, 0.20615603029727936, -0.794129490852356, 0.5973905324935913, 0.16028355062007904, 0.009564340114593506...
def pre _ build _ hook ( player, builddata ) :
[ -0.8492594957351685, -1.47457754611969, 0.45363399386405945, 0.5158334970474243, 0.6485624313354492, 1.2241944074630737, 1.0829471349716187, 0.10916262865066528, 0.6105408072471619, -0.7308301329612732, -0.5778146386146545, 0.32091522216796875, -0.2289721667766571, -0.008366082794964314, ...
def plugin ( self, owner ) : self. _ init ( ) for method in self. _ old _ owners _ methods : if method. _ _ name _ _ = ='send': self. _ owner _ send = method ; break self. _ owner. lasterrnode = none self. _ owner. lasterr = none self. _ owner. lasterrcode = none self. streaminit ( )
[ -0.10322829335927963, 0.14400070905685425, 0.6344225406646729, 0.20916537940502167, 0.32530081272125244, -1.6224677562713623, 0.8749810457229614, -0.5301842093467712, 0.6805488467216492, -0.16535897552967072, -0.9581273794174194, 1.307515263557434, 0.11695606261491776, 0.8347011208534241, ...
def test _ get _ module _ non _ exosims _ notthere _ module ( self ) : module = " tests. testmodules. timekeepingnotthere " modtype = " timekeeping " with self. assertraises ( valueerror ) : m = get _ module ( module, modtype )
[ -0.3300986588001251, 0.6555306911468506, 0.24422937631607056, 0.36702093482017517, 2.1015396118164062, 0.5668403506278992, -0.5812419056892395, -0.9068180322647095, 0.542624294757843, 0.8187262415885925, -0.02245619334280491, 1.0117087364196777, -0.2757796049118042, 0.8852207660675049, 0...
def check ( self, params : str, username : str ) - > str : if not params : return self. errors ['incorrect _ name'] if len ( params. split ('' ) ) > 1 : return self. errors ['spaces _ not _ allowed'] room = list ( self. db. select ('rooms ', {'name': params } ) ) if not room : return self. errors ['room _ not _ exists'...
[ -1.2680013179779053, 0.3697766661643982, 0.6635533571243286, 0.6334422826766968, -0.3141557574272156, 0.6221955418586731, -0.10542317479848862, 0.1899879276752472, -0.4477593004703522, 1.3607256412506104, 0.5952159762382507, 0.19470342993736267, -0.6621150374412537, 1.2298439741134644, -...
def _ websocket _ main ( args ) : loop = asyncio. get _ event _ loop ( ) loop. run _ until _ complete ( _ websocket _ async _ main ( args, loop ) )
[ 0.270746111869812, 0.018133200705051422, 0.5239701867103577, 0.06501206755638123, -0.0667431652545929, -0.29611510038375854, 0.30742204189300537, -0.38266250491142273, -0.02068026177585125, 0.9582896828651428, 0.30683010816574097, 0.6806908249855042, 0.1354009360074997, 0.1846502721309662,...
def updatedartmove ( self, context = none, residuelist = none ) : if residuelist = = none : residuelist = self. residuelist if context = = none : context = self. nc _ context stateinfo = context. getstate ( true, true, false, true, true, false ) olddartpos = stateinfo. getpositions ( asnumpy = true ) olddartpe = statei...
[ -0.8434863090515137, -1.0617172718048096, 0.8232496976852417, -0.032415829598903656, -0.16490720212459564, -0.033699411898851395, -0.2787720859050751, 0.5813091397285461, 0.6725757718086243, 0.47365275025367737, 0.07395604252815247, -0.07270746678113937, -0.24844573438167572, 0.29538220167...
def test _ runswithstandardresult ( self ) : result = pyunit. testresult ( ) self. holder. run ( result ) self. asserttrue ( result. wassuccessful ( ) ) self. assertequal ( 1, result. testsrun )
[ -0.4134483337402344, 0.461841881275177, 0.5722540616989136, 1.2666027545928955, -0.07405561953783035, 0.9293118119239807, 0.2116359919309616, 0.2439076155424118, 0.3421269357204437, -1.7029337882995605, -0.9410534501075745, -0.44260793924331665, -0.5727881193161011, -0.0509379543364048, ...
def make _ move ( self, request ) : game = get _ by _ urlsafe ( request. urlsafe _ game _ key, game ) user = game. user. get ( ) if game. game _ over : return game. to _ form ('game has ended!') secretword = list ( game. target ) score = [ ] [ score. append ('_') for i in range ( len ( secretword ) ) ] guess = request....
[ -0.5086867213249207, 0.32944175601005554, 0.9180684685707092, 0.5320956110954285, -0.09195802360773087, 0.008340309374034405, 0.1538034826517105, -0.23368126153945923, -0.187207892537117, 0.6619114875793457, -0.019688131287693977, 0.1699972152709961, -0.5097402334213257, 0.2203621715307235...
def delete _ favorite ( favorite, connection ) : database = connection ['test'] collection = database ['favorites'] collection. remove ( { " _ id " : objectid ( favorite [ " _ id " ] ) } )
[ 0.11346188187599182, 0.603198230266571, 0.30133289098739624, 0.2633482813835144, 0.532920241355896, 0.10304177552461624, -0.6120341420173645, 0.3181721866130829, -0.3097887337207794, 0.6605685353279114, -0.8143627643585205, 0.1792280226945877, -0.7572064399719238, -0.4775596559047699, 0....
def list _ pids ( ) : pid = popen ( [ " pidof ", " qemu - kvm ", " qemu - system - x86 _ 64 ", " kvm " ], stdout = pipe ) return pid. communicate ( ) [ 0 ]. decode ( ). split ( )
[ 0.4487378001213074, -0.46908336877822876, 0.5337427258491516, -0.08712772279977798, -0.07644875347614288, -0.1311686635017395, -1.715169906616211, 0.20315329730510712, 0.2287560999393463, 0.9733878374099731, 0.09266658127307892, 0.5711269974708557, -0.39685848355293274, -0.0174249466508626...
def make _ nn _ funs ( layer _ sizes, l2 _ reg, noise _ variance, nonlinearity = np. tanh ) : shapes = list ( zip ( layer _ sizes [ : - 1 ], layer _ sizes [ 1 : ] ) ) num _ weights = sum ( ( m + 1 ) * n for m, n in shapes ) # don't need vectorized weights ( only one sample... ) def unpack _ layers ( weights ) : num _ w...
[ 0.26550284028053284, 0.07798880338668823, 1.0396093130111694, 0.15442390739917755, -0.13402920961380005, -1.2691539525985718, 0.4500504732131958, -0.3216699957847595, -0.9554723501205444, -0.09588038176298141, -0.75742107629776, 0.32225602865219116, 0.5681012272834778, 0.17374181747436523,...
def age ( self, row, col ) : line = self. ages. take ( row, axis = 0, mode ='wrap') age = line. take ( col, mode ='wrap') return age
[ -0.11108684539794922, -0.4024799168109894, 0.565513014793396, -0.21106019616127014, -0.18756066262722015, 0.41732680797576904, -0.3336857855319977, -0.49248039722442627, -0.37432271242141724, 1.2334764003753662, 1.0338982343673706, 0.692465603351593, 0.9935558438301086, -0.3009746074676513...
def show ( self ) : print " amsnwindow. show " pass
[ 1.3439691066741943, -0.2543236315250397, -0.024093877524137497, 0.4537964463233948, -0.6183508038520813, 0.6754469275474548, 0.432110071182251, 0.35698965191841125, 1.0267035961151123, -0.5335145592689514, -0.035938505083322525, 1.4636969566345215, 0.45697861909866333, 0.8218815922737122, ...
def test _ get _ module _ non _ exosims _ error _ naming ( self ) : module = " tests. testmodules. planetpopulation. planetpopulationerrornaming " modtype = " planetpopulation " with self. assertraises ( assertionerror ) : m = get _ module ( module, modtype )
[ -0.3855048418045044, 0.073758564889431, 0.27633270621299744, 0.46413150429725647, 0.6898703575134277, 1.2059533596038818, -0.3153645396232605, -0.668882429599762, 0.47400185465812683, 0.5612884759902954, 0.22143371403217316, 0.856090784072876, 0.06505647301673889, 0.9876736402511597, 0.7...
def append _ data ( data1, data2 ) : buff = data1. append ( data2 ) return buff [ ~ buff. index. duplicated ( keep ='first') ]
[ 0.14821329712867737, 0.4142422378063202, 0.5843042135238647, -0.00867544487118721, -0.2845437228679657, 0.8132282495498657, -1.7757537364959717, -0.7545512318611145, 0.2696473300457001, -0.2146444022655487, -0.8778270483016968, 1.5601935386657715, -0.3172248303890228, 0.012597577646374702,...
async def fcregister ( self, message, fc, notify ) : fc = self. verify _ fc ( fc ) if not fc : await client. send _ message ( message. channel,'{ }, that \'s an invalid friend code. '. format ( message. author. name ) ) return if ( notify. lower ( ) = = " true " ) : notify = true elif ( notify. lower ( ) = = " false " ...
[ 0.19982478022575378, 0.944287896156311, 0.9701964855194092, 1.2567976713180542, 1.2517993450164795, -1.2233251333236694, -0.36655092239379883, 0.1781148910522461, -0.6292642951011658, -0.6212519407272339, -0.38753506541252136, 0.04632677510380745, -0.9793808460235596, 0.7915864586830139, ...
async def call ( self, callback, * args, * * kwargs ) : return await asyncio. wrap _ future ( self. submit ( callback, * args, * * kwargs ) )
[ -0.3557826578617096, 0.7307983636856079, 0.6190094351768494, 0.2159920483827591, -0.3106973171234131, -0.21385660767555237, -1.976007342338562, -0.04896417632699013, 0.02230815961956978, -0.18886011838912964, 0.13897860050201416, 0.23896373808383942, -0.5230937600135803, 0.4406580328941345...
def get _ students ( self ) : membership _ list = classmembership. objects. filter ( class _ taking = self, is _ educator = false ) students _ list = [ ] for membership in membership _ list : students _ list. append ( membership. user ) return sorted ( students _ list, key = lambda x : x. user. last _ login, reverse = ...
[ -0.8082937598228455, -0.7239726185798645, 0.7814768552780151, 0.9817236661911011, 0.24013879895210266, 0.5062627792358398, -0.14667069911956787, -0.24101513624191284, 0.07128015160560608, 0.5799180269241333, 0.1213909462094307, 0.26069316267967224, -0.17261435091495514, 0.301379919052124, ...
def norm ( x ) : x = ( x - x. min ( ) ) / ( x. max ( ) - x. min ( ) ) return 2 * x - 1
[ -0.536451518535614, -0.8436239361763, 0.47872915863990784, 1.2945244312286377, -0.6598561406135559, 0.15920253098011017, -0.2375842183828354, -0.3763059973716736, 0.5445154309272766, -0.6339496970176697, -1.1137961149215698, 0.6570224165916443, 0.19174426794052124, -0.4383455216884613, 0...
async def async _ setup _ entry ( hass, config _ entry, async _ add _ entities ) : hkid = config _ entry. data ['accessorypairingid'] conn = hass. data [ known _ devices ] [ hkid ] def async _ add _ service ( aid, service ) : if service ['stype']! ='security - system': return false info = {'aid': aid,'iid': service ['i...
[ 0.4356757402420044, 0.15338082611560822, 0.4747011065483093, -0.03714809939265251, 0.790642499923706, 0.15201590955257416, -0.23477596044540405, -0.5216599702835083, 0.6257988214492798, 0.45427942276000977, 0.5183911919593811, -0.35581451654434204, -0.09822623431682587, 0.7930070161819458,...
def _ _ init _ _ ( _ _ self _ _, *, code : str, created _ time _ utc : str, level : str, message : str ) : pulumi. set ( _ _ self _ _, " code ", code ) pulumi. set ( _ _ self _ _, " created _ time _ utc ", created _ time _ utc ) pulumi. set ( _ _ self _ _, " level ", level ) pulumi. set ( _ _ self _ _, " message ", mes...
[ -0.19757874310016632, 0.9367654919624329, 0.5799229145050049, -0.3312329351902008, 1.4204202890396118, 0.636354923248291, -1.4390491247177124, 0.0464746318757534, -0.6342159509658813, -0.23595185577869415, -1.0861866474151611, 0.6298874616622925, 0.45026323199272156, 0.05312807485461235, ...
def return _ all _ loans ( finance _ db, uid, simplify ) : loans = [ ] finance _ cursor = finance _ db. cursor ( ) sql ='select * from debts where uid = % s'val = ( uid, ) finance _ cursor. execute ( sql, val ) loan _ details _ list = finance _ cursor. fetchall ( ) if not loan _ details _ list : return false for loan _...
[ -0.12758290767669678, 0.5186262130737305, 0.7403684854507446, -0.04033827409148216, 0.09949807077646255, 0.6717079281806946, -1.1792751550674438, 0.22149300575256348, 0.12187332659959793, -0.33415478467941284, 0.3365946412086487, -0.610808253288269, -0.4895108938217163, 0.9146397113800049,...
def get _ vars ( self ) : return self. children
[ -0.6077053546905518, -0.24148842692375183, 0.4840005338191986, -0.20891568064689636, -0.6349811553955078, 0.3272952735424042, -0.1704399436712265, -1.206258773803711, -0.5476584434509277, -0.8900068998336792, -0.4440234303474426, 0.9361327290534973, -0.34944307804107666, 0.4792675375938415...
def create _ point ( x, y ) : p = point ( ) p. x = x p. y = y return p
[ 0.5207161903381348, -1.028382420539856, 0.4147731363773346, -0.4534545838832855, 0.26616549491882324, 1.1596193313598633, -1.5978001356124878, -0.8374679684638977, 0.07767776399850845, 0.3706989288330078, 0.2173026204109192, 0.5723376870155334, -0.09724272042512894, -1.3086094856262207, ...
async def async _ step _ init ( self, user _ input = none ) : errors = { } description _ placeholders = { " error _ info " : " " } if user _ input is not none : if len ( errors ) = = 0 : try : self. _ meters = [ ] calculated = await self. hass. async _ add _ executor _ job ( tauronamiplusconnector. get _ available _ me...
[ -0.2965813875198364, 0.04161868244409561, 0.6922736167907715, 0.509229838848114, -0.07434762269258499, -0.3517172336578369, 0.260862797498703, 0.5173797607421875, -0.6430387496948242, -0.668653666973114, 0.18052351474761963, 0.15439121425151825, 0.33562031388282776, 1.0491119623184204, 0...
def user _ accept _ terms ( backend, user, uid, social _ user = none, * args, * * kwargs ) : logger. debug ( " user _ accept _ terms " ) if termsandconditions. get _ active _ terms _ not _ agreed _ to ( user ) : return redirect _ to _ terms _ accept ( " / " ) else : return { " social _ user " : social _ user, " user " ...
[ 0.034674521535634995, -0.5018942356109619, 0.37374603748321533, 0.1418634057044983, -0.8921871781349182, -0.05658137425780296, 0.32836511731147766, 0.06974835693836212, -0.1807502955198288, 0.636444091796875, 0.8051214814186096, 0.14349335432052612, 0.3145752251148224, 0.10852480679750443,...
def click ( self, event ) : souris _ x, souris _ y = event. x, event. y print ( " click x - > ", souris _ x ) self. x, self. y = canvas. coords ( self. image ) if self. x < = souris _ x < = self. x + self. hauteur _ img and self. y < = souris _ y < = self. y + self. hauteur _ img : # si je clique sur la catapulte alors...
[ 0.505763828754425, -0.41704222559928894, 0.8650418519973755, -1.0805819034576416, 0.10944955796003342, 0.4195651710033417, -0.9964398741722107, -0.06792719662189484, -0.5646569728851318, -0.1401173174381256, 0.020488355308771133, -0.2350122630596161, -0.052968498319387436, -0.2939169406890...
def read _ data ( filename = " births. csv " ) : try : csvfile = open ( filename, newline ='' ) # open for reading csvrows = csv. reader ( csvfile ) # creates a csvrows object all _ rows = [ ] # we need to read the csv file for row in csvrows : # into our own python data structure all _ rows. append ( row ) # adds only...
[ -0.24680663645267487, -0.47258880734443665, 0.35930368304252625, 0.870923638343811, -0.36185112595558167, 0.8386209607124329, -0.34188663959503174, 1.078798532485962, 0.47493910789489746, 0.1484832912683487, 0.17140796780586243, 0.5222739577293396, -0.12455626577138901, 1.3032814264297485,...
def byte ( a, b ) : b ='{ 0 : 064x } '. format ( b ) return int ( b [ a * 2 : ( a + 1 ) * 2 ], 16 ) if a < 32 else 0
[ 0.5947672724723816, 0.10061734169721603, 0.6352603435516357, 0.3060621917247772, -0.17206186056137085, 0.11430572718381882, -0.6748190522193909, -0.13466224074363708, -0.01003095880150795, -0.6421149969100952, 0.031321655958890915, 0.7835993766784668, -0.19576293230056763, -0.7164459228515...
def disable _ encryption ( drive, backend _ path = backend _ binary _ path ) : if drive : command = [ backend _ path,'- d ', drive,'- n'] try : proc = subprocess. popen ( command, close _ fds = true, stdin = subprocess. pipe, stdout = subprocess. pipe ) cmd _ out, cmd _ err = proc. communicate ( ) return proc. returnco...
[ 0.17127206921577454, -0.6739488244056702, 0.864699125289917, -0.19423040747642517, -0.3977516293525696, -0.06858370453119278, 0.49607136845588684, 0.2924962341785431, -0.5961194038391113, 0.6532494425773621, 0.7844604253768921, 0.4274995028972626, -1.145974040031433, 0.0810735747218132, ...
def q _ i ( q _ min, i, j, k ) : if i < k or j < k : return float ( i = = j ) else : return q _ min [ i - k ] [ j - k ]
[ 0.5932120084762573, -0.7995001077651978, 0.17291101813316345, 0.14538384974002838, -0.843536376953125, 0.015490814112126827, -0.5339590311050415, -0.9211459755897522, -0.793048620223999, 0.5491774678230286, -0.08275852352380753, -0.20596595108509064, -0.671909749507904, -0.6212548613548279...
def _ test _ transformer ( self, field, field _ name, transformer ) : transformer _ name = type ( transformer ). _ _ name _ _ try : changed _ field = transformer. fit _ transform ( field. values. reshape ( - 1, 1 ) ) # 결과를 반환하기 결과 형태 변환 show _ changed _ field = self. _ convert _ to _ return _ shape...
[ -0.3296363353729248, 0.09515344351530075, 0.7959266304969788, -0.9197155833244324, -0.551520824432373, -0.4669000208377838, 1.0254613161087036, 0.477840781211853, -0.19453994929790497, 0.4532929062843323, -0.872033417224884, 0.7076215147972107, -0.1255088895559311, 0.8981291651725769, 1....
def accept ( self, visitor ) : raise notimplementederror ( )
[ -1.199865698814392, -0.09460069984197617, 0.5004225969314575, -0.4664781391620636, -0.916370153427124, 1.1421644687652588, 1.3052436113357544, 0.1685217022895813, -0.4172086715698242, -0.4765509366989136, 0.07442547380924225, 0.0481797456741333, 0.6704800724983215, 0.6180846095085144, -0...
def remove ( self, item ) : self. client. lrem ( self. key, self. client. encode ( item ) )
[ -0.519256055355072, -0.05184558033943176, 0.1115894466638565, -0.16330140829086304, -0.6370970606803894, 0.5315633416175842, -0.9111430644989014, 0.1024412140250206, 0.7265377640724182, 0.49371641874313354, -1.7470589876174927, -0.1735498458147049, -1.2162768840789795, -0.8469998836517334,...
def time _ left ( self, bound _ below = true ) : if self. timeout = = 0 or self. timeout is none : return self. timeout dtime = self. end - time. time ( ) if bound _ below : dtime = max ( dtime, 0. ) return dtime
[ 0.4530611038208008, 0.19085684418678284, 0.7531195282936096, 0.23310503363609314, -0.3097441494464874, 1.1327601671218872, -0.5156103372573853, -0.26818233728408813, -0.11164262145757675, 0.7620230913162231, -0.015369920991361141, -0.6555454134941101, -1.33407461643219, 1.2333561182022095,...
def test _ rot _ job _ succeeded _ 4 ( self ) : phaser _ z _ score = 8 data = self. ps. _ rot _ job _ succeeded ( phaser _ z _ score ) self. assertfalse ( data )
[ -0.46253716945648193, 0.46261507272720337, 0.2450793981552124, 0.15607663989067078, 0.35135141015052795, 1.236378788948059, 0.051039207726716995, -0.43782880902290344, -0.05768658220767975, -0.5725530385971069, -0.8435768485069275, -0.22717776894569397, -1.1482539176940918, -0.396938323974...
async def test _ update _ reports _ light _ is _ on ( hass : core. homeassistant ) : await setup _ platform ( hass, light _ domain, ceiling _ fan ( " name - 1 " ) ) with patch ( " homeassistant. components. bond. bond. getdevicestate ", return _ value = { " light " : 1 } ) : async _ fire _ time _ changed ( hass, utcnow...
[ 0.7012158036231995, 0.31783878803253174, 0.5629744529724121, 0.43349263072013855, 0.5613887906074524, 0.39858922362327576, -0.31354230642318726, 0.40514710545539856, 0.448668509721756, -0.4605772793292999, -1.0763205289840698, 0.06001537665724754, -0.8822758793830872, 0.1543046087026596, ...
def set _ cache _ value ( self, key : str, value : str ) - > bool : return self. sqldata. set _ cache _ value ( key, value )
[ -1.2654651403427124, 0.8553087115287781, 0.48339420557022095, -0.10333558917045593, -1.471601963043213, 0.6409648060798645, -1.7903213500976562, -0.226362407207489, -1.0443308353424072, 1.2421059608459473, -0.44202721118927, 0.1571921557188034, -0.13084687292575836, -0.22266876697540283, ...
def have _ tensorcore ( compute _ version = none, target = none ) : if compute _ version is none : if tvm. cuda ( 0 ). exist : compute _ version = tvm. cuda ( 0 ). compute _ version else : if target is none or " arch " not in target. attrs : warnings. warn ( " tensorcore will be disabled due to no cuda architecture spe...
[ -0.2339777648448944, 0.46486034989356995, 0.8639459609985352, 0.4295205771923065, -0.5170201063156128, -0.2687745690345764, -0.22672802209854126, 0.4082612991333008, 0.03710365667939186, 1.4913495779037476, 0.25114065408706665, 0.059039000421762466, -0.12921936810016632, 0.3698848187923431...
def hint _ pose _ qz ( self, qz ) : if not number. is _ real _ number ( qz ) : raise validationerror ( " quarternion z component must be a number ( value is % s ) " % qz ) elif not number. is _ finite ( qz ) : raise validationerror ( " quaternion z component must be a finite number " " ( value is % s ) " % qz ) else : ...
[ 0.004235987551510334, -0.693574845790863, 0.578235387802124, 0.028686856850981712, -0.48487919569015503, 1.1417690515518188, 1.1969090700149536, -0.6793380975723267, 1.023169994354248, -1.151291012763977, -0.4128884971141815, -0.2449793964624405, -0.7156484127044678, 0.04904619976878166, ...
def favourite ( self ) : return max ( self. _ game _ counter )
[ 0.5901658535003662, 0.2546457052230835, 0.6024870872497559, 0.497092068195343, 0.10201220959424973, 0.77351313829422, -0.3819635510444641, -0.31685715913772583, -0.5480048656463623, -0.3281811773777008, 0.3037984371185303, 0.1597926765680313, -0.5197620391845703, -0.22529259324073792, 0....
def y _ max ( self ) - > float : return self. ny * self. dy
[ -0.10729100555181503, 0.8464137315750122, 0.5682398080825806, 0.095650315284729, 0.4272761344909668, -0.3632485270500183, -0.9432317614555359, -0.3994743227958679, 0.3059629499912262, -0.8281667828559875, -0.49752911925315857, 0.03490472584962845, 0.6986856460571289, 0.36268824338912964, ...
def get ( cls, id, using = none, index = none, context = none, strict = false, * * kwargs ) : # if a context is given, us the index for search if isinstance ( context, context ) : index = context. index _ name context = none # the exact index is known, use the parent get method if context is none : try : return super (...
[ -0.5066859722137451, 0.32837697863578796, 1.0445783138275146, -0.12759201228618622, 0.21668274700641632, -0.4249933958053589, -0.636989414691925, -0.6538070440292358, 0.9605414867401123, 0.3071797788143158, 1.0156446695327759, 0.40116459131240845, -0.33708062767982483, -0.8182412981987, ...
def plot _ next _ field ( date _ string, obs _ num, ephem, window _ size = 7., max _ airmass = 2., min _ moon _ sep = 50., max _ bin _ area = 1., save = none ) : import matplotlib. pyplot as plt import matplotlib. gridspec import matplotlib. colors # location of mayall at kpno. where = astropy. coordinates. earthlocati...
[ 0.3776645362377167, 0.362554132938385, 0.8619014620780945, -0.5507566928863525, -0.8835669159889221, 0.16057175397872925, 0.2414843738079071, -0.02392490580677986, 0.3508732318878174, 0.5910140872001648, -0.23822440207004547, 1.1370540857315063, 0.20859640836715698, 0.190761998295784, 1....
def checkformat ( file _ path, trigger _ rules = { } ) : badlines = [ ] duplicates = [ ] for line in open ( file _ path,'r') : if line. count ('#') or not line. count (';') : continue rule = triggerclasses. triggerrule ( ) if not rule. readline ( line ) : badlines. append ( line. rstrip ('\ n') ) continue if rule. gett...
[ 0.8520042896270752, -0.443172812461853, 0.9833884239196777, -0.14026786386966705, 0.3933149576187134, -0.2327018678188324, -0.20897606015205383, 0.4457259476184845, -0.42902135848999023, 0.7049477696418762, -0.2329498678445816, 0.11697760969400406, 0.5391025543212891, 0.6326379179954529, ...
def gridprinter ( num ) : num = num / / 2 row ='-'space ='' plus ='+'col ='|'fullrow = plus + ( row * num ) + plus + ( row * num ) + plus +'\ n'partialrow = fullrow. replace ( plus, col ) partialrow = partialrow. replace ( row, space ) print ( fullrow + ( partialrow * num ) + fullrow + ( partialrow * num ) + fullrow )
[ 0.21400514245033264, 0.14529918134212494, 0.9317219853401184, 0.09240034222602844, -0.6939312219619751, 0.05393550172448158, 0.3364083170890808, -0.14401192963123322, 0.22758595645427704, -0.8040923476219177, 0.16748227179050446, 0.10343784838914871, -0.3185163140296936, 0.5113879442214966...
def setstudents ( self, students ) : self. students = students
[ -1.3491452932357788, -0.8852750062942505, -0.05229400470852852, 0.04147495701909065, 0.3691619038581848, 0.6997271180152893, -0.24860185384750366, 0.626221776008606, -0.1309136301279068, 0.6379616856575012, -1.0435035228729248, 0.34036940336227417, -0.8050767183303833, 0.4727019667625427, ...
def test _ replace ( ) : print ('testing replace ( )') result = funcs. replace ( ( 5, ), 5, 4 ) introcs. assert _ equals ( ( 4, ), result ) result = funcs. replace ( ( 1, 2, 3, 1 ), 1, 4 ) introcs. assert _ equals ( ( 4, 2, 3, 4 ), result ) result = funcs. replace ( ( 1, 2, 3, 1 ), 4, 1 ) introcs. assert _ equals ( ( 1...
[ -0.5079922080039978, 0.07240992784500122, 0.6745607852935791, 0.07557154446840286, -0.17556197941303253, -0.8689498901367188, 0.821740984916687, 0.8103256225585938, 0.33606165647506714, -0.948698103427887, -1.0213654041290283, -0.07140009105205536, -1.1718547344207764, -0.3776935935020447,...
def list _ properties _ of _ key _ versions ( self, name : str, * * kwargs : " any " ) - > " asynciterable [ keyproperties ] " : return self. _ client. get _ key _ versions ( self. vault _ endpoint, name, maxresults = kwargs. pop ( " max _ page _ size ", none ), cls = lambda objs : [ keyproperties. _ from _ key _ item ...
[ -0.7705328464508057, -0.42528027296066284, 0.5444279313087463, 0.5595456957817078, -0.5560728311538696, -0.5484059453010559, -1.0959340333938599, -0.6327459216117859, 0.1749417930841446, 1.3570139408111572, -0.8148894906044006, 0.5199998021125793, -0.14059992134571075, -0.0750148743391037,...
def _ _ get _ cloud _ init _ custom _ data ( self, configdict ) : srcpath, srcfile = os. path. split ( configdict ['cloud _ init _ script _ template'] ) env = environment ( loader = filesystemloader ( srcpath ) ) template = env. get _ template ( srcfile ) tmpl _ vars = self. _ _ get _ common _ tmpl _ vars ( configdict ...
[ -0.6339762806892395, 0.13838599622249603, 0.30107447504997253, -1.0156344175338745, -0.5901265740394592, 0.09949702769517899, -0.22247833013534546, 0.6541099548339844, -1.4247775077819824, 0.5757550597190857, -0.43288153409957886, -0.16961011290550232, 0.02393805794417858, 0.52560460567474...
def deeplabv3 _ resnetd101b _ cityscapes ( pretrained _ backbone = false, classes = 19, aux = true, * * kwargs ) : backbone = resnetd101b ( pretrained = pretrained _ backbone, ordinary _ init = false, bends = ( 3, ) ). features del backbone. final _ pool return get _ deeplabv3 ( backbone = backbone, classes = classes, ...
[ -0.2757018506526947, 1.1103110313415527, 0.5897506475448608, 0.2156399041414261, 0.4875490069389343, 0.8761780261993408, 0.2122746855020523, 0.4958264231681824, 0.3564097583293915, 0.27977800369262695, -0.5940776467323303, -0.08865272253751755, -0.7337537407875061, -0.8168773055076599, -...
def zoom _ fit _ x ( self ) : # establish full range of x limits = self. get _ limits ('data') x _ lo, x _ hi = limits [ 0 ] [ 0 ], limits [ 1 ] [ 0 ] self. zoom _ limit _ x ( x _ lo, x _ hi )
[ -0.055573657155036926, 0.5703864097595215, 0.47071847319602966, 0.15831492841243744, -0.49919116497039795, -0.0852736160159111, -0.736682116985321, -0.04962655529379845, 0.11020615696907043, -0.6986057758331299, -0.9442122578620911, 1.4859036207199097, 0.3392793536186218, -0.79488253593444...
def synchronize ( self, queue ) : self. get _ sync _ kernel ( ) ( queue, ( self. num _ work _ items, ), self. wg _ size, self. state. data )
[ -0.7733858227729797, 0.306735098361969, 0.15486027300357819, -0.13914375007152557, -0.18009378015995026, -1.023429036140442, 0.01094546914100647, -0.8205601572990417, 0.15608547627925873, -0.013671319000422955, -1.3127704858779907, 0.41572272777557373, 0.25740572810173035, 0.56753301620483...
def load _ ready _ trees ( root, pattern, target _ tree, transform = none ) : class empty : pass res = empty ( ) res. _ _ class _ _ = trees # bypassing int and processing data _ list = list ( ) res. seqs = list ( ) res. root = root res. target _ tree = target _ tree res. alns _ dir = root res. transform = transform res...
[ -0.27938807010650635, -0.8328076004981995, 0.6786797046661377, -0.540420651435852, 0.16895626485347748, -0.7043488025665283, 0.4654000699520111, -0.1129165068268776, 0.039813511073589325, 0.6207606196403503, -0.14036382734775543, -0.017229339107871056, 0.8271092772483826, -0.16012139618396...
def parse ( self, * * kwargs ) : calc = self. node # type : spexcalculation spexcalculation = calc. process _ class should _ retrieve = calc. get _ attribute ( " retrieve _ list " ) has _ spex _ outfile = false has _ inpxml _ file = false try : output _ folder = self. retrieved except notexistent : self. logger. error ...
[ 0.2303435206413269, -0.3388686180114746, 0.9718431234359741, 0.2830767035484314, -0.30055737495422363, 0.03769560530781746, 0.8995696306228638, 0.8065229654312134, 0.17022614181041718, -0.8956599235534668, 0.541273295879364, -0.25741952657699585, -0.2969539761543274, 0.5332685708999634, ...
def create _ user ( lightsuri : str, device : str ) - > str : try : resp = requests. post ( " { } / api ". format ( lightsuri ), json = { " devicetype " : device } ). json ( ) [ 0 ] if " success " in resp : return resp [ " success " ] [ " username " ] else : return none except exception : return none
[ -0.8161493539810181, 0.1363338977098465, 0.6647747755050659, 0.7167847752571106, 0.0461631640791893, 0.042022280395030975, -0.688483715057373, -1.1747652292251587, -0.010880190879106522, -0.3131984770298004, -0.11172903329133987, -0.1567961424589157, -0.9009460806846619, -0.452696532011032...
def generate _ certificate ( dir _ name, file _ name, key _ length, key _ type = " rsa " ) : config = globals ( ) ['config'] private _ key = openssl. crypto. pkey ( ) if key _ type = = " rsa " : private _ key. generate _ key ( openssl. crypto. type _ rsa, key _ length ) elif key _ type = = " dsa " : private _ key. gene...
[ -0.01062312163412571, 0.5729466080665588, 0.8867097496986389, 0.4833972752094269, 0.19180788099765778, 0.24110178649425507, 0.43250948190689087, 0.47613775730133057, -0.035036955028772354, 0.4105969965457916, -0.7884124517440796, -0.2860989272594452, -0.5101207494735718, 0.9545981287956238...
def _ inmask ( addr ) : if not cfg ['udpmasks'] : return false for i in cfg ['udpmasks'] : i = i. replace ('* ', '. *') if re. match ( i, addr ) : return true
[ -0.43871408700942993, 0.675768256187439, 0.6255831122398376, 0.7162125110626221, -0.9873669743537903, -0.20455610752105713, 0.5773910880088806, 0.4729996621608734, 0.26190078258514404, 0.39415109157562256, -0.33677005767822266, -0.13494795560836792, -0.05875082686543465, -0.181183844804763...
def test _ else _ that _ can _ be _ removed _ in _ module ( assert _ errors, parse _ ast _ tree, template, code, default _ options, ) : tree = parse _ ast _ tree ( template. format ( code, code ) ) visitor = ifstatementvisitor ( default _ options, tree = tree ) visitor. run ( ) assert _ errors ( visitor, [ uselessretur...
[ -0.00535960029810667, 1.136367917060852, 0.33436256647109985, -0.050445616245269775, 0.3744334578514099, -0.3865184187889099, 0.20424188673496246, 0.4508260488510132, 0.15167008340358734, 0.2450849413871765, -0.20540422201156616, -0.3122420907020569, -0.3063378930091858, 0.4945127367973327...
async def pin _ message ( self :'telegramclient ', entity :'hints. entitylike ', message :'typing. optional [ hints. messageidlike ] ', *, notify : bool = false, pm _ oneside : bool = false ) : return await self. _ pin ( entity, message, unpin = false, notify = notify, pm _ oneside = pm _ oneside )
[ -0.6504771709442139, 1.1316413879394531, 0.6768907308578491, -0.0567941814661026, -0.0706687942147255, 0.8956213593482971, -0.5215874314308167, -0.7696321606636047, 0.20975451171398163, 0.64743971824646, 0.11345899105072021, 0.5364078879356384, -1.0528801679611206, 0.6552324295043945, 0....
def is _ legal ( self, spot _ taken ) : for row in range ( self. num _ rows ) : for col in range ( self. num _ cols ) : # see if this position is taken. if spot _ taken [ row ] [ col ] : # see if this position attacks another queen. # check the row. for c in range ( self. num _ cols ) : if ( c! = col ) and spot _ taken...
[ 0.32896092534065247, -0.6253579258918762, 0.731898307800293, -1.0685399770736694, -0.37589946389198303, 0.13388308882713318, 0.5331030488014221, -0.02723369561135769, 0.43857893347740173, -0.19850172102451324, -0.06674642860889435, -0.2910118103027344, -0.1447913944721222, -0.4423555731773...
def _ _ corner _ offset ( self, corners, i, eps = 1 / 1e3 ) : # circular buffer behavior for list edges il = i - 1 if il < 0 : il = - 1 ir = i + 1 if ir > len ( corners ) - 1 : ir = 0 # isolate corner triplet around corner of interest pl = corners [ il ] pc = corners [ i ] pr = corners [ ir ] # get complex direction of...
[ -0.19721321761608124, -0.7259447574615479, 1.0213755369186401, -1.37516188621521, -0.32818078994750977, 0.586035430431366, 0.677842378616333, 0.39894044399261475, 0.4285224974155426, 0.8117417693138123, 0.03017786704003811, 0.10605817288160324, -0.2052840143442154, -0.21317008137702942, ...
def get _ authentication ( self ) : return self. authentication
[ -1.2949495315551758, -0.7171955108642578, 0.2364046573638916, 1.4748190641403198, -0.575587809085846, -0.2118179351091385, 0.5881893038749695, -0.5585762858390808, 0.45235493779182434, -0.5590291619300842, -0.501332700252533, 0.35055065155029297, -0.4108617305755615, -1.2128119468688965, ...
def execute ( ids, files, parameters, type, password, group _ id, network, dns ) : # build list of file - based assets to exec bps = [ ] if files is not none and len ( files ) : for file in files : if not os. path. isfile ( file ) : bpformation. output. status ('error ', 3, " blueprint json file'% s'not found " % file ...
[ -1.0581612586975098, -0.8575399518013, 0.9900068044662476, 0.1625724583864212, 0.6116011142730713, 0.16219165921211243, -0.10075743496417999, -0.5108551979064941, -0.9341732263565063, 0.602500855922699, 0.022857602685689926, 0.22036994993686676, -0.2578525245189667, 0.3617715537548065, 0...
def get ( self, item ) : if item is none : raise valueerror ( "'none'not accepted as key. " ) return self. _ map. get ( item )
[ -0.4153335392475128, 0.025200147181749344, 0.27194371819496155, 0.057452719658613205, 0.5266637802124023, -0.3081378638744354, -0.3096447288990021, -0.6633775234222412, 0.3100270926952362, 0.19648700952529907, -0.03625049442052841, 0.538582444190979, -0.25886446237564087, -0.96904069185256...
def test _ set _ with _ normal _ dict _ syntax ( config ) : assert " exists " not in config. data assert " exists / now " not in config. data config [ " exists / now " ] = " yay " assert config. data [ " exists " ] = = { " now " : " yay " } assert ( " exists / now " not in config. data ), " path sections should not be ...
[ -0.46463313698768616, -0.28794991970062256, 0.37882524728775024, -0.6212934255599976, -0.17690779268741608, 0.8510884642601013, -0.37237977981567383, 0.23253588378429413, -0.4476068615913391, 0.06490413844585419, -0.37855854630470276, -0.37058377265930176, 0.688579797744751, 0.726132035255...
def verify _ signature ( public _ key : str, signing _ data : str, signature : str ) - > none : public _ key = public _ key. strip ( ) if public _ key. startswith ( " 0x " ) : public _ key = public _ key [ 2 : ] bls _ public _ key = blspubkey ( bytes. fromhex ( public _ key ) ) if not bls _ pop. _ is _ valid _ pubkey (...
[ 1.0347620248794556, 0.44011545181274414, 0.4644395411014557, 0.8168524503707886, 0.17762576043605804, 0.045767080038785934, -0.9389458298683167, 0.17622122168540955, -0.29524022340774536, 0.6586156487464905, -1.1146382093429565, 0.39072465896606445, -0.42452019453048706, 0.1180828362703323...
def build _ model ( transformer ) : transformer ( [ tf. zeros ( [ 64, 1 ] ), tf. zeros ( [ 64, 1 ] ) ] )
[ -1.357109785079956, 0.12968334555625916, 0.1811772882938385, 0.180796280503273, 0.10363606363534927, 0.45530790090560913, 0.2031145840883255, 0.5228537917137146, -0.052003759890794754, -0.2959708273410797, -0.6811239123344421, -0.6003036499023438, 0.5655801296234131, 0.11985720694065094, ...
def includeme ( root ) : configure. scan ('guillotina _ contentrules. api') configure. scan ('guillotina _ contentrules. install') configure. scan ('guillotina _ contentrules. utility') configure. scan ('guillotina _ contentrules. subscribers') configure. scan ('guillotina _ contentrules. conditions') configure. scan (...
[ 1.2748721837997437, 0.08474257588386536, 0.47063496708869934, 0.6630961894989014, 0.04776483401656151, 0.3046007454395294, 0.36824074387550354, 0.8297847509384155, -0.2050762176513672, -0.07177556306123734, 0.08427660912275314, -0.1488083153963089, -0.6469942331314087, 0.5308665037155151, ...
def enable _ all _ jobs ( self ) : for j in self. jobs : j. enable ( )
[ 0.45452481508255005, -0.8606860637664795, 0.5028502941131592, 0.7436509728431702, 0.28199365735054016, 0.29424849152565, -0.4871538281440735, 1.5095423460006714, -0.16289778053760529, -0.7044523358345032, -0.6441522836685181, 0.014225444756448269, -0.8081889748573303, 0.7596821188926697, ...
def _ load _ drivers ( self ) : try : self. driver = importutils. import _ object ( cfg. conf. lbaas. driver _ fqn, self ) except importerror : log. exception ( _ ( " error loading lbaas driver % s " ), cfg. conf. lbaas. driver _ fqn )
[ -0.3466130197048187, -0.7788406014442444, 0.4606618881225586, 0.12116815894842148, 1.038866400718689, -0.41030383110046387, -0.5275236368179321, -0.0850248634815216, 0.3473617136478424, -0.48870691657066345, -0.3504050672054291, -0.24782736599445343, -0.7314282655715942, -0.303817689418792...
def _ _ init _ _ ( self, first _ name, last _ name, user _ name ) : self. first _ name = first _ name self. last _ name = last _ name self. user _ name = user _ name self. login _ attempts = 0
[ 0.050377409905195236, -0.4583607316017151, 0.4606483578681946, 0.0011937207309529185, 0.08456141501665115, 0.337626576423645, -0.9715330004692078, 0.3390117585659027, -0.7095048427581787, -0.8736070394515991, -0.118646539747715, 0.21750210225582123, -0.619069516658783, 0.4155336618423462, ...
def available _ offices ( self ) : available _ offices = [ ] for room in self. all _ created _ rooms. values ( ) : if room. type _ = = " office " and not room. is _ full ( ) : available _ offices. append ( room ) return available _ offices
[ -0.9872514605522156, -0.7012724876403809, 0.35413500666618347, 0.9544070959091187, -0.2906428277492523, 0.9706860780715942, -0.4151008427143097, 0.9663230180740356, 0.7337223887443542, 1.4691414833068848, -0.6412241458892822, -0.24199743568897247, -0.40708985924720764, 1.0346150398254395, ...
def valid ( self, event, pos ) : g, row, col = pos # check that event does not exist already at that time for group in range ( len ( self. matrix ) ) : if self. matrix [ group ] [ row ] [ col ] = = event and group! = g : return false # make sure event does not occur more than 3 times in a week count = 0 for i, r in enu...
[ -0.24462908506393433, 0.019157810136675835, 0.8980010151863098, -0.3348545432090759, -0.41620174050331116, 0.5421590209007263, 0.5953329801559448, -0.08803281933069229, 0.1723519265651703, -0.08934387564659119, 0.4068877398967743, -0.490986168384552, -0.2141343057155609, -0.235359907150268...
def get _ all _ version _ string _ data ( self, session, project _ id = none ) : versions = [ ] for vers _ url in self. _ get _ discovery _ url _ choices ( project _ id = project _ id ) : try : d = get _ discovery ( session, vers _ url ) except exception as e : # ignore errors here - we're just searching for one of the...
[ 0.01653643138706684, -0.0932861715555191, 0.3160843849182129, 0.7363827228546143, 0.5426529049873352, 0.45533448457717896, -1.0687097311019897, -0.29808712005615234, 0.1219191625714302, -0.11682891845703125, 0.2335674911737442, 0.3649510145187378, 0.47984281182289124, 0.8509058952331543, ...
def get _ ips ( self, vnfr ) : ips = [ ] for i in vnfr ['vdur'] : for ip in i ['interfaces'] : ips. append ( ip ['ip - address'] ) return ( ips )
[ -1.6075106859207153, -0.4415026307106018, 0.25168925523757935, 0.051534347236156464, 0.2095033824443817, -0.8254872560501099, -0.8341191411018372, 0.7209969758987427, 0.4629826247692108, 1.1526716947555542, 0.32877814769744873, -0.4007986783981323, -0.4804244041442871, -0.3046780526638031,...
def test _ srv _ metric _ dist _ and _ geod ( self ) : geod = self. srv _ metric _ r3. geodesic ( initial _ curve = self. curve _ a, end _ curve = self. curve _ b ) geod = geod ( self. times ) srv = self. srv _ metric _ r3. srv _ transform ( geod ) srv _ derivative = self. n _ discretized _ curves * ( srv [ 1 :, : ] - ...
[ 0.4990346431732178, -0.18903058767318726, 0.4998883605003357, -0.11133590340614319, -0.11776367574930191, 1.133548617362976, 0.19793996214866638, -0.27502843737602234, -0.12808160483837128, -0.20614908635616302, 0.19167141616344452, 0.5952527523040771, 0.5343196392059326, 0.174119159579277...
def write _ to _ file ( file _ name, file _ data ) : robot _ file = open ( file _ name, " a + " ) robot _ file. write ( file _ data + " \ n " ) robot _ file. close ( ) print " [ * ] file created : " + file _ name
[ 0.15531331300735474, -0.5787466168403625, 0.30486181378364563, 0.013742325827479362, 1.1268603801727295, 1.1769475936889648, -0.5097567439079285, 0.9786826372146606, -1.069915533065796, -0.1657835692167282, -0.03147237375378609, 0.4807446300983429, 0.4382559061050415, 0.09395847469568253, ...
def save _ model ( model, network _ type, algorithm, appliance, save _ model _ dir ) : # model _ path = " saved _ models / " + appliance + " _ " + algorithm + " _ " + network _ type + " _ model. h5 " model _ path = save _ model _ dir if not os. path. exists ( model _ path ) : open ( ( model _ path ),'a'). close ( ) mod...
[ -0.3328741192817688, 0.014013493433594704, 0.4451453983783722, 0.2693103849887848, 0.8958016037940979, 0.40058138966560364, 0.6680818796157837, -0.7741162776947021, -0.3535993695259094, 0.5907092690467834, -0.7037484645843506, -0.715646505355835, 0.15524698793888092, 0.5165389776229858, ...