text
stringlengths
25
2.19k
embedding
listlengths
768
768
def naive _ counting _ sort ( int _ lst, bins ) : buckets = [ 0 ] * bins for value in int _ lst : buckets [ value ] + = 1 output = [ ] for value in range ( bins ) : for number in range ( buckets [ value ] ) : output. append ( value ) return output
[ -0.3126958906650543, -0.019774170592427254, 0.5930024981498718, 1.057890772819519, -0.43688344955444336, 0.27304473519325256, -0.2798357307910919, -0.4458080530166626, -0.6576328277587891, -0.1003311425447464, -0.9694744944572449, -0.18733762204647064, 0.18410909175872803, 0.39454987645149...
def load _ ps ( filename ) : all _ keypoints = np. load ( filename ) # has all the keypoints return posesequence ( all _ keypoints )
[ -0.6835253834724426, -0.537310779094696, 0.4302627146244049, 0.7813962697982788, -1.0552550554275513, 0.061104755848646164, -0.8828238248825073, 0.7322676777839661, 0.6336513757705688, 0.2612684369087219, -0.5541325211524963, -1.1157021522521973, -0.7207646369934082, -0.37650397419929504, ...
def payments ( ) : cdate = pay. getlastupdateddate ( ) return render _ template ('payments. html ', cdate = cdate )
[ 0.3120954930782318, 0.37157702445983887, 0.466909259557724, -0.3185795545578003, -0.8153115510940552, -0.22439627349376678, -0.5098609924316406, 0.24224139750003815, -0.05519159510731697, -0.07594197243452072, 1.0376325845718384, -0.6616764068603516, 0.4070783257484436, 0.3736112117767334,...
async def call _ service ( client : rclpy. client. client, req, timeout = 1 ) : fut = client. call _ async ( req ) def on _ timeout ( ) : fut. set _ exception ( httpexception ( 503, " ros service call timed out " ) ) node. destroy _ timer ( timer ) try : timer = node. create _ timer ( timeout, on _ timeout ) return awa...
[ -0.5164977312088013, 0.7240923047065735, 0.5054984092712402, -0.3354591429233551, -0.07381734251976013, -0.34975185990333557, -0.9939228296279907, -0.6250107288360596, -0.17527325451374054, 0.6740097403526306, 0.5224971771240234, 0.714188814163208, -0.6288019418716431, 0.028258485719561577...
def generate _ payloads ( textfile ) : with open ( textfile ) as f : for line in f : yield line. strip ( )
[ 0.5390821695327759, -0.4787314236164093, 0.7491661310195923, -0.8627809286117554, -0.22331953048706055, 1.0734425783157349, -1.426482915878296, 0.32157841324806213, -1.486655592918396, 0.39166444540023804, 0.019330758601427078, -0.45655596256256104, 0.40614354610443115, 0.7192383408546448,...
def reply ( self, message, text, attachments = none, * args, * * kwargs ) : if'channel'not in message. body : log. error ( " cannot reply on message % s " % message ) return if attachments : return self. upload ( attachments, text, message. body ['channel'] ) return self. send ( message. body ['channel'], text, * args,...
[ 0.32038581371307373, 0.14980243146419525, 0.575537383556366, -0.5469253063201904, 0.2351485937833786, -0.0013704347657039762, -1.1456228494644165, -0.6063305139541626, 0.24634253978729248, -0.4016270339488983, 0.10261362046003342, 0.6454050540924072, -1.3896321058273315, 0.331541508436203,...
def _ _ computewidthheight ( self ) : # get width and height from movie using ffprobe cmd ='{ } - v quiet - print _ format json - show _ entries stream = height, width " { } " '. format ( self. _ _ ffprobeexecutable, self. var ('filepath') ) # calling ffmpeg process = subprocess. popen ( cmd, stdout = subprocess. pipe,...
[ -0.3050629496574402, -0.44585445523262024, 0.9214876294136047, 0.27660277485847473, -0.13836118578910828, -0.5172219276428223, 0.03238210827112198, 0.3664572834968567, -0.7049083113670349, 0.7286908626556396, 0.1085381880402565, 0.8233548998832703, -0.4393736720085144, 1.952332854270935, ...
def getlogger ( obj : str, level = default _ loglevel, dest = default _ logdest ) - > logging. logger : if obj in logconfig. active _ loggers : return logconfig. active _ loggers [ obj ] logger = logging. getlogger ( obj ) logger. setlevel ( level ) dest. setformatter ( logging. formatter ( logconfig. logfmt, datefmt =...
[ -0.45934200286865234, -1.091275691986084, 0.666189968585968, -0.1892985850572586, -0.2350185066461563, -0.11903147399425507, -0.8828493356704712, -0.32752254605293274, -0.09003866463899612, 0.10645177960395813, -0.47879302501678467, 0.310341477394104, 0.07248033583164215, -0.10165894776582...
def h _ third ( window, key ) : third _ width = resolution. width / / 3 left = 0 middle = third _ width right = 2 * third _ width if window. width! = third _ width : # make window height of monitor and one third width window. resizeto ( third _ width, full _ height ) pos = window. left if pos = = left : # window is alo...
[ -0.05780531466007233, -0.2683165967464447, 0.9477972388267517, -0.24348926544189453, -0.2681511640548706, 0.3931064009666443, 0.20832595229148865, 0.17793835699558258, -0.07092200219631195, 1.1584137678146362, -0.18868683278560638, -0.22080138325691223, -1.2296926975250244, 0.0082886675372...
def apply _ gradual _ rotation _ transformation ( self ) : image = self. modification _ information. image angle = self. preference. gradual _ rotation _ angle * self. image _ counter transformed _ image = im. rotate ( image, angle ) self. modification _ information. image = transformed _ image
[ -0.6066766977310181, 0.5679255127906799, 0.4939992427825928, -0.8506250381469727, 0.6271116137504578, -0.002153365407139063, 0.5654849410057068, -0.23666393756866455, 0.019837476313114166, -0.35674840211868286, 0.44177311658859253, 0.41795024275779724, -0.5754434466362, 0.46065178513526917...
def test _ single _ value _ check ( ) : test _ obj = uvtest ( ) test _ obj. int1 = np. float64 ( test _ obj. int1 ) pytest. raises ( valueerror, test _ obj. check )
[ 0.2895483672618866, 1.1751394271850586, 0.407737135887146, 1.3909978866577148, 0.9839475154876709, 0.7853677868843079, 0.734591543674469, 0.5250223875045776, 0.2170288860797882, -0.23421889543533325, 0.7071947455406189, -0.03025094047188759, -0.6040076017379761, 0.896184504032135, -0.826...
async def test _ datadisk _ migrate _ too _ small ( coresys : coresys, all _ dbus _ services : dict [ str, dbusservicemock | dict [ str, dbusservicemock ] ], os _ available, ) : datadisk _ service : datadiskservice = all _ dbus _ services [ " agent _ datadisk " ] datadisk _ service. markdatamove. calls. clear ( ) login...
[ -0.02172441966831684, 1.1642626523971558, 0.7702299952507019, 0.18883728981018066, 0.4480471611022949, 0.07151775807142258, 0.14387930929660797, -0.8476632237434387, 0.481598824262619, -0.9146202802658081, -0.267736554145813, 0.3956852853298187, 0.19444045424461365, 0.4604729115962982, 0...
def options _ posed ( self, options _ posed : list [ optionresults ] ) : if options _ posed is none : raise valueerror ( " invalid value for ` options _ posed `, must not be ` none ` " ) # noqa : e501 self. _ options _ posed = options _ posed
[ 0.006503996439278126, -0.6136313676834106, -0.01348255667835474, 0.3205583989620209, 0.991681694984436, 1.013967514038086, 0.15421058237552643, -0.0009320458630099893, -0.5195713043212891, -0.7176828384399414, -1.4234774112701416, -0.6487830877304077, -0.10355479270219803, -0.0153244929388...
def do _ sdn _ controller _ modify ( cc, args ) : try : controller = cc. sdn _ controller. get ( args. uuid ) except exc. httpnotfound : raise exc. commanderror ( " sdn controller not found : uuid % s " % args. uuid ) field _ list = ['ip _ address ','port ','transport ','state'] # use field list as filter user _ specif...
[ -1.0671107769012451, -0.0472455769777298, 0.6419690251350403, 0.07027138024568558, -0.13742972910404205, -0.20021553337574005, 0.33075809478759766, 0.1585407257080078, 0.22045649588108063, -0.00826171413064003, -0.43168193101882935, -0.2523021996021271, 0.1700998842716217, -0.3704129755496...
def accuracy ( output, target, topk = ( 1, ) ) : with torch. no _ grad ( ) : maxk = max ( topk ) batch _ size = target. size ( 0 ) _, pred = output. topk ( maxk, 1, true, true ) pred = pred. t ( ) correct = pred. eq ( target. view ( 1, - 1 ). expand _ as ( pred ) ) res = [ ] for k in topk : correct _ k = correct [ : k ...
[ -0.8147047758102417, -0.6105553507804871, 0.6555483937263489, 0.7511979937553406, -0.49627572298049927, -0.4396093189716339, 1.1140847206115723, 0.8097874522209167, -0.37690964341163635, 0.5769314169883728, 0.1648620218038559, 0.3500502109527588, 1.3381764888763428, 0.32841384410858154, ...
def visit _ annassign ( self, new _ body, node ) : assign _ id = self. create _ ast _ component ( node, component. ann _ assign ) self. create _ composition ( assign _ id, * self. composition _ edge ) self. create _ composition ( self. create _ ast _ component ( node. annotation, component. annotation ), assign _ id, c...
[ -1.1350507736206055, -0.9450260400772095, 0.8368116021156311, 0.0688476711511612, -0.4975394308567047, -0.1788429617881775, 0.5507902503013611, 0.34496545791625977, 0.36494001746177673, 0.884285569190979, -0.348937064409256, 0.3321720361709595, 0.6821384429931641, 0.975117564201355, 0.88...
def _ _ init _ _ ( self, predelay = none, postdelay = none, applyasync _ kwargs = none, retry _ kwargs = none, retry _ queue ='', update _ delay = 0. 1 ) : # options about calling the task self. _ predelay = predelay self. _ postdelay = postdelay self. _ applyasync _ kwargs = applyasync _ kwargs or { } self. _ retry _ ...
[ 0.5872058868408203, 0.10050025582313538, 0.9860265254974365, 0.5473601222038269, -0.32558122277259827, -0.6168683767318726, 0.14259077608585358, 0.9473689794540405, 0.0646786093711853, -0.535640299320221, -0.2835957109928131, -0.006962281186133623, 0.15605340898036957, 1.0958178043365479, ...
def sine _ path ( f _ start, drift _ rate, period, amplitude ) : f _ start = unit _ utils. get _ value ( f _ start, u. hz ) drift _ rate = unit _ utils. get _ value ( drift _ rate, u. hz / u. s ) period = unit _ utils. get _ value ( period, u. s ) amplitude = unit _ utils. get _ value ( amplitude, u. hz ) def path ( t ...
[ 0.5243120193481445, -0.3307768404483795, 0.46102917194366455, 0.4835825562477112, -0.39917629957199097, -0.0023529212921857834, 0.4831134080886841, 0.4738660156726837, -0.3032126724720001, -0.16562986373901367, 0.46305352449417114, 0.05472852289676666, 0.3377090096473694, -0.31422296166419...
def _ _ init _ _ ( _ _ self _ _, *, created _ time : optional [ pulumi. input [ str ] ] = none, custom _ oss _ bucket : optional [ pulumi. input [ str ] ] = none, end _ time : optional [ pulumi. input [ str ] ] = none, instance _ name : optional [ pulumi. input [ str ] ] = none, instance _ type : optional [ pulumi. inp...
[ -0.4484619200229645, 0.3411175310611725, 0.7763400077819824, -0.4733273386955261, -0.07752181589603424, -0.08648959547281265, -1.4835114479064941, 0.3450295627117157, 0.5447191596031189, 0.6677587032318115, -0.6055092215538025, 0.7067359089851379, -0.03550262004137039, -0.7489380240440369,...
def get ( self, request ) : objs = resdata. objects. all ( ) paginator = paginator ( objs, 15 ) # show 15 reataurents per page page = request. get. get ('page') try : restaurents = paginator. page ( page ) except pagenotaninteger : # if page is not an integer, deliver first page. restaurents = paginator. page ( 1 ) exc...
[ -0.604790449142456, 0.2973257005214691, 0.6234649419784546, -0.7724850177764893, 0.18282733857631683, -0.02055571973323822, -0.020132996141910553, 0.7952705025672913, 0.018275616690516472, -0.21734434366226196, 1.0600316524505615, -1.0744634866714478, -0.10503484308719635, -0.0301761832088...
def kilometertomiles ( arg1 : int ) - > float : return arg1 * 1. 6
[ 0.21839231252670288, -0.017690090462565422, 0.39908742904663086, -0.17055106163024902, 0.19578897953033447, 0.08908206224441528, 0.5236721634864807, 0.8170562386512756, -0.5466486215591431, 0.6384935975074768, -0.3844843804836273, -0.8627586960792542, -0.5069333910942078, 0.620983183383941...
def cunia ( x, y, phi, l, nu, e, s ) : # k1 = ( np. cos ( phi ) / np. sin ( phi ) ) + nu * ( np. sin ( phi ) / np. cos ( phi ) ) k2 = ( np. sin ( phi ) / np. cos ( phi ) ) + nu * ( np. cos ( phi ) / np. sin ( phi ) ) ux = ( s / e ) * k1 * ( x - l * np. cos ( phi ) ) uy = - ( s / e ) * k2 * y sigx = s * ( np. cos ( phi ...
[ -0.4341384470462799, -0.10752739757299423, 0.6909701824188232, -0.26232072710990906, -0.01840665191411972, -0.2857705354690552, -0.12733471393585205, 0.41552940011024475, -0.2627294063568115, 0.7715136408805847, -0.27922704815864563, -0.8182112574577332, -0.2874722480773926, -0.56714254617...
def is _ empty ( self ) - > bool : return self. size < = 0
[ -0.6532537937164307, -0.363132119178772, 0.5148491859436035, 0.12936393916606903, 1.021456003189087, 0.5741397738456726, -0.6214550733566284, -0.3708021342754364, -0.08368273079395294, 0.08136856555938721, -0.3669077455997467, 0.17298153042793274, -0.5290426015853882, 0.3079739212989807, ...
def test _ subscription _ api _ with _ wrong _ length _ of _ card _ number ( self ) : data = { " event _ id " : self. event. id, " user _ id " : self. user _ id, " no _ of _ tickets " : 1, " card _ number " : 50393033423, # length is less the 16 " expiry _ year " : 2022, " expiry _ month " : 7, " amount " : 100, " disc...
[ 1.0613168478012085, 0.0463414341211319, 0.9001092910766602, -0.2930513620376587, 0.7793030142784119, 0.35264867544174194, -0.9222001433372498, -0.11013855785131454, 0.11691341549158096, -0.3562842011451721, -0.7666828036308289, 0.26608961820602417, -0.116370789706707, 0.28630128502845764, ...
def payload ( self ) : return self. _ _ payload
[ 0.10393797606229782, -0.6642161011695862, 0.3887709081172943, -0.40950703620910645, -0.608222246170044, 0.8795981407165527, 0.04725627228617668, -0.9925773739814758, 0.5414368510246277, -0.5947214365005493, -0.004328789655119181, -0.21974806487560272, -0.3379734754562378, -0.37321355938911...
def calc _ temps ( start _ date, end _ date ) : return session. query ( func. min ( measurement. tobs ), func. avg ( measurement. tobs ), func. max ( measurement. tobs ) ). filter ( measurement. date > = start _ date ). filter ( measurement. date < = end _ date ). all ( )
[ 0.1250237077474594, 0.4136490225791931, 0.6262882947921753, 0.44460436701774597, -0.7284766435623169, 0.3242355287075043, -0.44153454899787903, -0.23408864438533783, -1.097610354423523, 1.1056725978851318, 0.5138601064682007, 0.0461200475692749, 0.8292750120162964, 0.15442126989364624, -...
def token ( self ) : return self. _ data. get ('inputs ', { } ). get ('hashi _ vault _ token')
[ -0.012594988569617271, -0.39667412638664246, 0.20089954137802124, 0.8183324337005615, 0.8865015506744385, 0.3502386212348938, 0.14079920947551727, -0.15822595357894897, 0.23672480881214142, -0.9818648099899292, -0.3594205677509308, -0.040414948016405106, 0.5275589823722839, -0.705206990242...
def get _ pixfwhm ( wl ) : if wl = = " s " : fwhm = 1. 7328 elif wl = = " m " : fwhm = 2. 3963 elif wl = = " l " : fwhm = 3. 5270 else : print " error!! not a know image " fwhm = - 1000 return fwhm
[ -0.07596617937088013, -0.5159255266189575, 0.6669264435768127, -0.06201600655913353, -0.8054593801498413, -0.46938276290893555, -0.43136870861053467, -0.20418308675289154, 0.8575676679611206, 0.10467381775379181, 0.14875097572803497, 0.11843248456716537, -0.17453940212726593, 1.30016291141...
def flip ( self, request _ iterator, context ) : context. set _ code ( grpc. statuscode. unimplemented ) context. set _ details ('method not implemented!') raise notimplementederror ('method not implemented!')
[ -2.79154109954834, -0.2575063407421112, 0.6353763937950134, 0.19417011737823486, -0.19826284050941467, 0.8001801371574402, 0.7451664805412292, 0.289553701877594, 0.006337304599583149, 0.3441416621208191, 0.5150038599967957, 0.9979478120803833, -0.7324984073638916, 0.40587395429611206, 0....
def make _ part ( self, cpt _ inst ) : part = g. part ( ) part. name = cpt _ inst. instance _ id part. library = self. cpt2lib [ cpt _ inst. library _ id ]. name part. deviceset = self. cpt2deviceset [ cpt _ inst. library _ id ]. name part. device = self. ensure _ device _ for _ component _ instance ( cpt _ inst ). nam...
[ 0.2988038957118988, -0.553225576877594, 0.26459598541259766, -1.4420863389968872, -0.5933403968811035, 0.9760339856147766, 0.009624765254557133, -0.14647573232650757, -0.465230792760849, -0.15980365872383118, -0.013919657096266747, -0.4668457806110382, -0.8152392506599426, -0.8297796845436...
def insert ( g, names, objects ) : for n in range ( len ( names ) ) : g [ names [ n ] ] = objects [ n ]
[ -1.2251949310302734, 0.6977633833885193, 0.4302258789539337, -1.077188491821289, -0.10254692286252975, 0.5546308755874634, -0.08508393913507462, -0.03820493444800377, -1.4619430303573608, 1.3501479625701904, -1.5048645734786987, -0.5660280585289001, -0.4967363476753235, 0.24390949308872223...
def encrypt ( m, k ) : # m = [ int, int, int, int ] # k = [ int, int, int, int, int, int, int, int... ] # key undex ki = 0 for rnd in range ( 1, 18 ) : if rnd % 2 = = 0 : m = even _ round ( m, k [ ki : ki + 2 ] ) ki + = 2 else : m = odd _ round ( m, k [ ki : ki + 4 ] ) ki + = 4 return m
[ -0.8255971074104309, 0.3325994610786438, 0.6262272000312805, -0.2858780324459076, 0.2268601655960083, 0.1016664057970047, 0.09164461493492126, 0.03828783333301544, -0.47540488839149475, 0.6959879398345947, -0.20515406131744385, -0.47292885184288025, -1.1101166009902954, -0.0405479185283184...
def deploy ( stackfile, host, user, password, stackname, env, prune _ env, prune _ stack, pass _ env _ vars, ) : click. echo ( " deploying to portainer @ { host } as { user } ". format ( host = host, user = user ) ) try : portainer = portainer _ for _ host ( host ) except connectionerror as err : show _ error ( str ( e...
[ -0.3854106664657593, -0.10272786766290665, 1.0953905582427979, 0.8586981296539307, 0.201081320643425, 0.4700241684913635, 0.06212496757507324, -0.00044942888780497015, -1.0285946130752563, 0.6315295696258545, 0.06705658882856369, 0.4075011909008026, -0.2679557502269745, -0.1065381839871406...
def add ( self, queue _ name = _ default _ queue, transactional = false ) : return self. add _ async ( queue _ name, transactional ). get _ result ( )
[ -0.8037707209587097, 0.7088346481323242, 0.6469793915748596, 0.1507323980331421, 0.3001813292503357, -1.0718778371810913, -1.336817741394043, 0.17672014236450195, 0.3607802391052246, 0.559010922908783, -0.12763050198554993, -0.41350674629211426, -0.793212890625, -0.12983976304531097, -0....
def rm ( user _ id, group _ id ) : client = get _ admin _ client ( ) qos _ cli. rm ( client, user _ id = user _ id, group _ id = group _ id )
[ 0.6120197772979736, 0.5444140434265137, 0.2367846965789795, -0.10444197803735733, -0.4267398416996002, -0.12207034975290298, -0.5079895853996277, -1.2525568008422852, 0.02169801853597164, 0.44687318801879883, 0.5142024159431458, 1.6684767007827759, -0.9619898200035095, -0.30858930945396423...
def _ _ init _ _ ( sp, line ) : #, sigma _ q = 0. 000484 ) : sp. fields _ nr = line. rstrip ('\ n'). split ( ) if len ( sp. fields _ nr ) = = 13 : s _ index, s _ beta, s _ omega, s _ h, s _ k, s _ l, s _ dr, s _ r, s _ qv, s _ qh, s _ qt, s _ ql, s _ p = sp. fields _ nr [ 0 : 13 ] sp. qt, sp. ql = float ( s _ qt ), flo...
[ 1.022489309310913, -0.4056501090526581, 0.7444605231285095, -0.08046678453683853, 0.07729028165340424, -0.09936413913965225, 0.20072053372859955, 0.032070454210042953, 0.49337032437324524, -0.26240089535713196, -0.7798272371292114, 0.012391570955514908, -0.12696629762649536, 0.048060383647...
def monte _ carlo ( self, path, n, rate, delta _ x, delta _ w1, sv = false, delta _ sigma = none, delta _ w2 = none, rho = 0. 0, jump = false, delta _ j1 = none, delta _ j2 = none, rho _ j = 0. 0 ) : if not isinstance ( n, int ) or n < = 0 : raise valueerror ('number of time intervals must be positive int.') x = self. ...
[ -0.15590885281562805, 0.7853370308876038, 1.0446155071258545, 0.43670177459716797, -0.5731096267700195, 0.40120938420295715, 0.4172725975513458, -0.8293452262878418, -0.29270169138908386, 0.7368650436401367, 0.4590211510658264, -0.07481330633163452, -0.501249372959137, 0.07708537578582764,...
def read ( self, n = none ) : return''
[ -0.5471842288970947, 0.43653836846351624, 0.4582422077655792, 0.1455068737268448, -0.39305379986763, 0.01492585800588131, -0.6645427346229553, -0.9218289256095886, 0.16198131442070007, -1.1158504486083984, -0.037894219160079956, 0.1860869824886322, -0.35582631826400757, -0.332105427980423,...
def showshovelbutton ( self, add = 0 ) : if add : self. shovelbuttonactivecount + = add else : self. showingshovel = 1 self. notify. debug ( " showing shovel % s " % ( self. shovelbuttonactivecount ) ) self. _ _ gardeninggui. show ( ) self. _ _ shovelbutton. show ( )
[ 0.8455560803413391, 0.49886828660964966, 0.49869251251220703, 0.5323835611343384, -0.23464463651180267, 0.8339380621910095, 1.2037262916564941, -0.13822659850120544, 0.20543986558914185, 0.06545183807611465, -0.9371370077133179, 0.34893932938575745, -0.02460010163486004, 0.6854370832443237...
def _ computeccdexposureid ( self, dataid ) : try : visit = dataid [ " visit " ] detector = dataid [ " ccd " ] except exception : raise keyerror ( f " require a visit and ccd to calculate detector exposure id. got : { dataid } " ) return 100 * visit + detector
[ 0.001411055913195014, -0.4742518365383148, 0.2599344253540039, -0.42201343178749084, -0.3538268506526947, -0.3568812906742096, 0.6825130581855774, 0.4145358204841614, 0.8071425557136536, 0.7787544131278992, 0.3588693141937256, 0.35262978076934814, 0.7322637438774109, 0.5170971751213074, ...
def test _ lmdb _ insert _ null _ key _ raises ( ) : with temporarydirectory ( ) as dbpath : env = lmdb. open ( dbpath ) with env. begin ( write = true ) as txn : key = none value = random. randint ( 0, 2 * * 32 - 1 ) data = struct. pack ('< l ', value ) with pytest. raises ( lmdb. badvalsizeerror ) : txn. put ( key, d...
[ 0.4411533772945404, 1.0219262838363647, 0.4842175841331482, -0.6622323393821716, -0.13882610201835632, 0.018586700782179832, -0.9766063094139099, -0.09553181380033493, -0.45538926124572754, -0.3708365559577942, -1.2621960639953613, -0.45873793959617615, -1.0654911994934082, 1.0183084011077...
def dowhilesession ( self ) : pass
[ -0.33158332109451294, 0.03107253834605217, 0.07009740173816681, 0.019780060276389122, 1.3692693710327148, 0.8034067153930664, 1.1062647104263306, -0.9588655233383179, 0.6113619804382324, 0.018805045634508133, -0.2923181653022766, 0.0960385724902153, -0.48176079988479614, -0.545706629753112...
def read _ image ( filename, representation ) : im = imread ( filename ) if representation = = 1 and im. ndim = = 3 and im. shape [ 2 ] = = 3 : im = rgb2gray ( im ) if im. dtype = = np. uint8 : im = im. astype ( np. float64 ) / 255. 0 if im. dtype! = np. float64 : im = im. astype ( np. float64 ) return im
[ -0.9157567620277405, 0.32494810223579407, 0.41792935132980347, -0.14557744562625885, -0.029923388734459877, 0.8502447605133057, -0.10006054490804672, -0.014652152545750141, 0.3331086337566376, 0.6173064112663269, 1.7753878831863403, 0.251151442527771, -0.2827985882759094, -0.15499594807624...
def go _ to _ site ( self ) : return self. driver. get ( self. base _ url )
[ -1.004463791847229, 0.7186412215232849, 0.3427252769470215, 0.2220090627670288, 1.563022255897522, -0.7483364939689636, 0.4352395832538605, -0.6064119338989258, -0.583132266998291, 0.10649756342172623, 0.12109953910112381, 0.2652615010738373, -0.47796717286109924, -0.6746399998664856, -0...
def e _ ml ( tag, messages ) : if not isinstance ( messages, list ) : raise typeerror for message in messages : if message = = " " : continue e ( tag, message )
[ -0.015543049201369286, 0.2503018081188202, 0.41849949955940247, 0.2336350381374359, 1.185079574584961, -0.06262561678886414, 0.18159450590610504, 0.10696739703416824, -0.25798332691192627, 0.5812503695487976, -0.0727611854672432, -0.3529406189918518, -0.6431193947792053, 2.0320050716400146...
def place _ orders ( self, board, actions ) : options = [ ] for ter in board : if ter. owner = = self : options. append ( ter ) for adjacent in ter. adjacent : for check in board : if check. name = = adjacent : options. append ( check ) print ('{ 0 } ` s turn. you have { 1 } points. where do you use them? input h for h...
[ -0.5955873727798462, -0.14030197262763977, 0.849736213684082, 0.5016216039657593, 0.6910645365715027, 0.02821236662566662, 0.42721936106681824, -0.33576473593711853, -0.22494636476039886, 0.68701171875, 0.21035760641098022, -0.13006222248077393, -0.2284933477640152, -0.5237973928451538, ...
def calculatetouristintensity ( nbh _ gdf, year ) : # calculate tourist intensity ( bed per 1000 inhabitants ) # calculate population density ( inhabitant per km2 ) # calculate listingcount if year in list ( nbh _ gdf. columns [ 3 : 7 ] ) : nbh _ gdf ['popdensity _ km2'] = nbh _ gdf ['2018'] / nbh _ gdf ['area _ km2'] ...
[ -0.14689630270004272, 0.13205787539482117, 0.6732351183891296, 0.5413458347320557, 0.045740339905023575, 0.359991192817688, 0.40116703510284424, 0.1862666755914688, -0.24024906754493713, 0.8616272211074829, -0.34655722975730896, -0.4738284945487976, -0.29456669092178345, 0.0167055130004882...
def amountapple ( ) : applefunc = int ( money / cost ) return applefunc
[ 0.39193612337112427, 0.18690095841884613, 0.28013911843299866, 0.6036900877952576, -1.1052395105361938, -0.46174097061157227, 0.9110742807388306, 0.5117372870445251, -0.33832865953445435, 0.2807956635951996, 0.32683584094047546, -0.2049241065979004, 0.4956660270690918, -0.19163525104522705...
def put ( self, key : int, value : int ) - > none : key _ hashcode = self. hashcode ( key ) for each in self. map [ key _ hashcode ] : if each [ 0 ] = = key : each [ 1 ] = value return self. map [ key _ hashcode ]. append ( [ key, value ] ) return
[ -0.684876561164856, 0.007307242136448622, 0.5842338800430298, -0.23270045220851898, -0.3927333652973175, 0.10813243687152863, -0.11782528460025787, 0.3565102219581604, -0.2150588184595108, 0.7111851572990417, -0.4576406180858612, -0.6022117733955383, -0.6017007231712341, 0.4074857234954834...
def unrealised _ pnl ( self ) : return ( self. current _ price - self. avg _ price ) * self. net _ quantity
[ -0.31901857256889343, -0.8293123245239258, 0.3804701566696167, -0.8624427318572998, 0.13104508817195892, 0.8701730966567993, -0.3028409481048584, -0.20082613825798035, 0.09339676797389984, -0.015962926670908928, 0.1757933348417282, -0.9452124834060669, 0.10801316797733307, -0.3544666767120...
def test _ mutual _ info _ score _ functional ( self, preds, target ) : self. run _ functional _ metric _ test ( preds = preds, target = target, metric _ functional = mutual _ info _ score, reference _ metric = sklearn _ mutual _ info _ score, )
[ -0.483670175075531, -0.004532217979431152, 0.3928711414337158, 0.6802453994750977, 0.5681853890419006, 0.34549951553344727, -0.3677036762237549, -0.651522159576416, -0.9771686792373657, -0.6796391606330872, 0.9005725383758545, 0.6944783329963684, 0.47768402099609375, -0.2212096005678177, ...
def get _ url ( self, url _ or _ dict ) : if isinstance ( url _ or _ dict, str ) : url _ or _ dict = {'viewname': url _ or _ dict } try : return reverse ( * * url _ or _ dict ) except noreversematch : if menu _ debug : print ('unable to reverse url with kwargs % s'% url _ or _ dict, file = stderr )
[ -0.7834452986717224, 0.656694233417511, 0.7374597787857056, -0.03487304970622063, -0.325086385011673, 0.043904561549425125, -0.3527894914150238, 0.6605079770088196, 0.18759088218212128, -1.1363149881362915, 0.8605011105537415, -0.18449999392032623, 0.10411074012517929, 0.29757437109947205,...
def start _ client ( self, ec2 _ async _ result ) : self. _ generate _ new _ secret _ key ( ) self. cipher = self. _ construct _ cipher ( ) self. alias = self. _ set _ alias ( ) self. host = fetch _ async _ host _ address ( ec2 _ async _ result ) self. client = client ( self. host, self. port, self. alias, self. cipher...
[ -0.80735182762146, -0.28237131237983704, 0.184365376830101, -0.1837279498577118, -0.2917867600917816, 0.3787298798561096, 0.4880312383174896, 0.03607745096087456, -0.48223093152046204, -0.21553979814052582, -1.2050626277923584, 0.9982937574386597, 0.7275910973548889, -0.6358885169029236, ...
def _ _ hash _ _ ( self ) - > int : return hash ( ( self. modifier, self. color ) )
[ -0.04799852520227432, -0.31752243638038635, 0.43243467807769775, -1.1761778593063354, 0.07712723314762115, -0.08590561896562576, -0.3243013620376587, -0.027988137677311897, 0.3122636377811432, -0.41312211751937866, -0.769916296005249, 0.37921473383903503, -0.2820456027984619, 0.31636738777...
def _ process _ ra3 _ occupancy _ group ( self, occdevice ) : occdevice _ id = id _ from _ href ( occdevice [ " href " ] ) associated _ area = occdevice [ " associatedarea " ] occgroup _ area _ id = id _ from _ href ( associated _ area [ " href " ] ) if occgroup _ area _ id not in self. areas : _ log. error ( " unknown...
[ -0.23642686009407043, 0.12790605425834656, 0.5691402554512024, -1.4327141046524048, 0.29331663250923157, 0.04589898884296417, 0.5607568621635437, -0.15027937293052673, 0.5119637846946716, 0.5171377062797546, 0.8117974400520325, -0.46520280838012695, 0.2986670434474945, 0.39585456252098083,...
async def test _ form ( hass ) : await setup. async _ setup _ component ( hass, " persistent _ notification ", { } ) result = await hass. config _ entries. flow. async _ init ( domain, context = { " source " : config _ entries. source _ user } ) assert result [ " type " ] = = " form " assert result [ " errors " ] = = {...
[ -0.1489536315202713, 0.6760798692703247, 0.5858139395713806, 0.1555652618408203, 1.052995204925537, -0.4960133731365204, 0.2573477625846863, -0.1815139651298523, 0.5471778512001038, -0.5459203720092773, -0.5595576167106628, -0.1545167714357376, 0.5451074838638306, 0.6095518469810486, 0.5...
def _ does _ quack ( cls, explanation ) : if not super ( ). _ does _ quack ( explanation ) : return false if not hasattr ( explanation, explainparams. per _ class _ values ) or explanation. per _ class _ values is none : return false if not hasattr ( explanation, explainparams. per _ class _ rank ) or explanation. per ...
[ -0.5106541514396667, 0.3285816013813019, 0.4920271337032318, 0.4083023965358734, -0.3503168523311615, 0.19430622458457947, 1.1873170137405396, 0.3234894573688507, 0.3984309136867523, 0.03650309145450592, 0.5702897906303406, -0.6185569167137146, 0.2836165428161621, 1.2046939134597778, -0....
def getsoftwareversion ( ) : andor _ solis. getsoftwareversion. restype = ctypes. c _ uint eprom = ctypes. c _ uint ( ) coffile = ctypes. c _ uint ( ) vxdrev = ctypes. c _ uint ( ) vxdver = ctypes. c _ uint ( ) dllrev = ctypes. c _ uint ( ) dllver = ctypes. c _ uint ( ) result = andor _ solis. getsoftwareversion ( ctyp...
[ -0.2771352231502533, -0.6106536388397217, 0.7610766887664795, -0.011929158121347427, -0.854662299156189, -0.23583437502384186, 0.3044975996017456, 0.06919750571250916, -0.14415733516216278, 0.42083778977394104, -0.9602048993110657, 0.19822019338607788, -0.43773242831230164, 0.4212031662464...
def function _ name ( input _ parameters : type ) - > type : return _ type = 0 return return _ type
[ -1.082737922668457, -0.2239585667848587, 0.521693766117096, -0.24735839664936066, 1.2509074211120605, -0.15274013578891754, 0.20773939788341522, -0.4719460904598236, -0.2814489006996155, 0.5668153166770935, -0.20377258956432343, 0.07657875865697861, -0.7759820818901062, -0.3070151209831238...
def setup _ streams ( input _ streams ) : input _ streams. add _ callback ( thirdoperator. assert _ correctness ) return [ ]
[ 0.13312166929244995, -0.5836989879608154, 0.37617185711860657, 0.5425142049789429, 0.8802705407142639, 0.35091134905815125, 0.21756334602832794, -0.24114064872264862, 0.9625939130783081, 0.4661046266555786, -0.03987937420606613, -0.18000617623329163, -1.2809972763061523, 0.6970298886299133...
def prepare _ string ( self, str ) : return str if self. is _ case _ sensitive else str. lower ( )
[ 0.557233989238739, -0.10885903239250183, 0.30766966938972473, -0.03702554851770401, 0.014731325209140778, 0.15429945290088654, -0.19875174760818481, -1.1931562423706055, 0.6986424922943115, 0.032600101083517075, 0.9138816595077515, -0.08441432565450668, -0.7787679433822632, -0.098487928509...
def set _ full _ path ( date, type _ ) : # logger = logging. getlogger ( _ _ name _ _ ) date = datetime. strptime ( date,'% y - % m - % d'). date ( ) # str - > datetime. date access _ rights = 0o755 # readable and accessible by all users, and write access by only the owner path = f'/ / bigshare / выгрузки тф / выгрузки...
[ 0.19771333038806915, -0.3442983031272888, 1.0162714719772339, 0.20999924838542938, -0.2703803777694702, 0.4407491385936737, 1.0790654420852661, 0.18545666337013245, -0.18889223039150238, -0.2173001915216446, 0.6331672072410583, 0.2821044623851776, 0.2834286689758301, 0.3972274661064148, ...
def list _ deviations ( self, source, folder, page _ idx ) : if not type ( source ) is source : raise daexplorerexception ( " argument'source'must be type source. " ) ; if not type ( folder ) is folder and folder! = none : print ( type ( folder ) ) print ( type ( folder ) is none ) raise daexplorerexception ( " argumen...
[ -0.5470246076583862, 0.1449582725763321, 0.6035139560699463, -0.2978430390357971, -0.1699148416519165, -0.3790462017059326, -0.24727730453014374, -0.15249653160572052, 1.2518057823181152, -0.4013015925884247, -0.19073328375816345, 0.5257540345191956, -0.26105138659477234, 1.168234705924987...
def get _ primes ( size, bit _ size, count ) : if count < = 0 : raise valueerror ( f " { count } must be positive value. " ) if size < = 0 : raise valueerror ( f " { size } must be positive value. " ) result = [ ] factor = 2 * size # start with 2 ^ bit _ size - 2 * size + 1 value = 1 < < bit _ size value = value - fact...
[ -0.23073729872703552, -0.23626691102981567, 0.5722292065620422, 0.7707939743995667, -0.18853594362735748, -0.0694180354475975, -0.5490031838417053, -0.5249025225639343, -0.06565776467323303, 0.5977821350097656, -0.32052579522132874, 0.4949534237384796, -0.9252296090126038, 0.77130538225173...
def create _ graph _ templates ( collection ) : for graph in config _ snmp _ dump. graph _ dict : graph _ config = config _ snmp _ dump. graph _ dict [ graph ] for item in graph _ config : ( field1, field2, title, vert _ label, scale ) = item doc = dict ( ) table _ entry = dict ( ) table _ entry [ " type " ] = graph ta...
[ -0.5741679668426514, 0.32142743468284607, 0.518535315990448, -0.24862970411777496, -0.07984118908643723, 0.30218401551246643, -0.2567833960056305, -0.4182315766811371, -0.45085036754608154, 1.1277540922164917, -1.110025405883789, -0.5388375520706177, -0.47717610001564026, -0.15213596820831...
def setup _ components ( self ) : # for example : # # self. logger. debug ( " creating optimizer. " ) # self. optimizers = self. optimizer _ creator ( self. given _ models, # self. config ) pass
[ 0.23917172849178314, -0.38180306553840637, 0.13400393724441528, 0.472965270280838, 1.3733505010604858, 0.34610575437545776, 0.32211747765541077, -0.24057568609714508, -0.05757170543074608, -0.6343979239463806, -0.4900064170360565, -0.6674919724464417, -0.30100125074386597, 0.29121711850166...
def username ( self ) : return self. _ data. get ('inputs ', { } ). get ('username')
[ -0.7214220762252808, 0.03225211054086685, 0.31338196992874146, 0.20152874290943146, -0.022343086078763008, 0.04370737075805664, 0.7977669835090637, -0.02771833725273609, 0.09941674768924713, -0.566234290599823, -0.3828486204147339, 0.03025219962000847, -0.1264801174402237, -0.2973147332668...
def pem _ reg _ loss _ func ( pred _ reg _ score, gt _ iou _ map, bm _ mask, high _ threshold = 0. 7, low _ threshold = 0. 3 ) : gt _ iou _ map = gt _ iou _ map * bm _ mask mask _ high = ( gt _ iou _ map > high _ threshold ). float ( ) mask _ medium = ( ( gt _ iou _ map < = high _ threshold ) & ( gt _ iou _ map > low _...
[ -0.2196706086397171, -0.0037495195865631104, 0.7487140893936157, 0.08085838705301285, -0.3920459747314453, -0.3439541459083557, 0.6322542428970337, 0.38377299904823303, 0.16339817643165588, 0.03008035197854042, 0.056796178221702576, 0.12179093062877655, -0.7940900921821594, -1.014302015304...
def maxpredecessor ( self, a ) : # initialize the maxnode to be - 1 maxnode = - 1 # loop through incoming edges of a for predecessor in self. nodes [ a ]. inedges : # if the score of the predecessor + edge weight is greater than its current node if self. nodes [ predecessor ]. score + self. edges [ ( predecessor, a ) ]...
[ -0.4091845750808716, 0.29258421063423157, 0.7796081304550171, -0.9539680480957031, -1.245422124862671, -0.49497169256210327, 0.7224037647247314, 0.8737953305244446, 1.3536180257797241, 0.8983956575393677, 0.4736199975013733, 0.061830490827560425, -0.09318302571773529, 1.0182266235351562, ...
def get _ subs ( self, project ) : url = self. get _ url ( " subscriptions ", none, project ) return self. get _ resource ( url )
[ -0.14677277207374573, 0.9603990316390991, 0.3004092574119568, 0.7661689519882202, 0.14229083061218262, -0.7633708715438843, -0.9418773651123047, -0.5364686846733093, 0.006982696242630482, -0.5173018574714661, -0.012111121788620949, 0.7810002565383911, -0.8614370226860046, -0.14347493648529...
def assemble _ mass _ matrix ( n, p ) : # calculate h and mk h = 1 / n mk = local _ mass _ matrix ( h ) # construct m _ 0 z = np. zeros ( ( n - 1, n + 1 ) ) m0, z = z, csr _ matrix ( z ) i, j = np. indices ( m0. shape ) # we use these to access the diagonals of m m0 [ i = = j ] = mk [ 1, 0 ] # subdiagonal m0 [ i = = j ...
[ -0.2983238101005554, -0.82999187707901, 0.5977615118026733, -0.20280805230140686, -0.13524506986141205, -0.0653471127152443, 0.06479541212320328, 0.5023040771484375, 0.09887300431728363, -0.35662904381752014, -0.06475569307804108, 0.04858837276697159, -0.10828866809606552, 0.41256192326545...
def test ( r = 1, y0 = 0. 5, t0 = 0, t1 = 5, h = 0. 2 ) : t, u = rungekutta4 ( r, y0, t0, t1, h ) plt. figure ( 1 ) plt. plot ( t, u,'r ', label ='computed solution') plt. plot ( t, solution _ func ( t ),'g - - ', label ='exact solution') plt. xlabel ('t') plt. ylabel ('y ( t )') plt. title ('computed and exact solutio...
[ 0.44613903760910034, 0.19537097215652466, 0.6448373794555664, -0.04286704212427139, 0.17578880488872528, 0.24913504719734192, 1.565609097480774, -0.03460463136434555, -0.9245642423629761, -0.23145389556884766, -0.4090217351913452, 0.5148342847824097, 0.5888387560844421, 0.542813777923584, ...
def init _ env ( config _ fpath, logdir, log _ to _ file ) : log _ dir _ is _ default = ( logdir = = barrele _ constant. barrele _ log _ dir ) log, workspace, barrele _ config = cmd _ general. init _ env ( config _ fpath, logdir, log _ to _ file, log _ dir _ is _ default ) barreleye _ instance = barrele _ instance. bar...
[ -0.1466028094291687, -0.5146071910858154, 0.5486162900924683, -0.2782275378704071, 0.4627784788608551, 0.6493614315986633, 0.0542500801384449, 0.3337933123111725, -1.1200367212295532, 0.49941280484199524, 0.21060486137866974, 0.8309820890426636, 0.38710781931877136, 0.6553329825401306, 1...
def process _ video ( self, context, video _ format ) : available _ formats = self. video _ converter. available _ formats. copy ( ) available _ formats. remove ( video _ format ) self. logger. debug ( " document with supported video format detected " ) self. send _ message ( context, " video _ detected " ) self. send ...
[ 0.03169804811477661, -0.687812864780426, 0.5117501616477966, 0.7948740720748901, 0.40575551986694336, -0.6303284764289856, -0.44974032044410706, -0.1677294820547104, 1.2917895317077637, 0.7076263427734375, -0.00596036110073328, 1.3940764665603638, -0.7313389778137207, 0.9182834625244141, ...
def random _ beam ( complexity : str = " elementary ", units _ count : int = 0 ) - > list [ dict ] : response = requests. post ( mrbeam _ api, data = { " complexity " : complexity, " unitscount " : units _ count } ) if response. status _ code = = 200 : random _ beam = response. json ( ) else : random _ beam = [ ] retur...
[ -1.1427652835845947, 0.017452877014875412, 0.4864511787891388, 1.212506890296936, 0.11330533027648926, -0.08193335682153702, -0.6486238241195679, 0.8328722715377808, 0.497368186712265, 0.05058804526925087, -0.855873167514801, -0.0398048497736454, -0.7245113253593445, 1.3022761344909668, ...
def loadgame ( self, map _ commands ) : number _ of _ homes = 0 positions _ of _ homes = [ ] for command in map _ commands : if command [ 2 ]! = 0 : number _ of _ homes + = 1 positions _ of _ homes. append ( ( command [ 0 ], command [ 1 ] ) ) if command [ 3 ]! = 0 : vampires _ start = ( command [ 0 ], command [ 1 ] ) i...
[ -0.5940911769866943, 0.006404873449355364, 0.8270418047904968, -0.2820909023284912, 0.7253459692001343, 0.028916409239172935, -0.4734024703502655, 0.11063246428966522, -0.4577484726905823, 0.49845826625823975, 0.10953160375356674, -0.5211986303329468, -0.5458876490592957, 0.660077750682830...
def get _ app _ list ( self, request ) : ordering = { " استان ها " : 1, " شهر ها " : 2, " تهدیدات منطقه ای " : 3, " درجات نظامی " : 4, " تخصص ها و رسته ها " : 5, " رشته های دانشگاهی " : 6, " کارت های حفاظتی " : 7, " وضعیت های تجهیزات " : 8, " پایگاه ها " : 9, " اطلاعات حومه " : 10, " دسته بندی های مکان ها " : 11, " مکا...
[ 0.6638970971107483, -0.37373512983322144, 1.039905309677124, -0.17468127608299255, 0.3388802707195282, 0.3261057436466217, 0.3448525667190552, 0.39336439967155457, 0.16476941108703613, 0.8625795841217041, -0.8592885732650757, -0.9117556214332581, 0.5571808218955994, 0.7402787804603577, 0...
def config ( ) : setup _ logging ( " config ", none )
[ 0.5663158893585205, 0.486106812953949, 0.12342151999473572, 0.7267772555351257, 0.6594179272651672, -0.6880876421928406, 1.073191523551941, 1.1022379398345947, -0.575334906578064, 0.12984873354434967, -0.5359746217727661, 0.16816703975200653, 0.35194841027259827, 1.4273525476455688, 0.86...
def on _ connection _ close ( self ) : self. on _ close ( ) self. stream. close ( )
[ 0.8769063949584961, -1.335841178894043, 0.6966425776481628, 0.09711921960115433, 0.08507361263036728, -0.26417744159698486, -0.4348978102207184, -0.4965691864490509, -0.3962186872959137, 0.0008186797495000064, 0.33183255791664124, -0.2619665861129761, -0.6625712513923645, 1.175360321998596...
def is _ scalar ( self, typ : type = _ any ) - > bool : if isinstance ( self. yaml _ node, yaml. scalarnode ) : if typ! = _ any and typ in scalar _ type _ to _ tag : if typ is none : typ = type ( none ) return self. yaml _ node. tag = = scalar _ type _ to _ tag [ typ ] if typ is _ any : return true raise valueerror ('i...
[ -0.3866654634475708, -0.4437568187713623, 0.6854050159454346, 0.5359362363815308, 0.2541482448577881, -0.6000484228134155, -0.20625177025794983, -0.7859731316566467, 0.12947888672351837, -0.07301430404186249, -0.10585984587669373, 1.1758806705474854, -0.2069941610097885, 1.04880952835083, ...
def add _ instance ( self, it ) : self. tests. add ( it )
[ -0.4858004152774811, -0.13174960017204285, 0.34660324454307556, -1.041214942932129, 0.996063232421875, 1.8423525094985962, 0.13274747133255005, 0.3404204547405243, 0.3511718809604645, 0.1420603096485138, 0.19624283909797668, -0.14336028695106506, -1.203993320465088, 0.11474331468343735, ...
def year ( self ) - > int : return self. _ year
[ 0.26384857296943665, -0.07877451181411743, 0.23365207016468048, -0.19982115924358368, -0.2110067903995514, 1.3325673341751099, 1.2717440128326416, 0.10435768216848373, 0.48801785707473755, -1.0564064979553223, -0.4338633120059967, 0.46633535623550415, 0.6609540581703186, -0.242853730916976...
def load _ data ( database _ uri : str, input _ data : dict ) - > pandas. dataframe : return pandas. read _ csv ( database _ uri )
[ -0.37809959053993225, 1.2233961820602417, 0.16773352026939392, -0.08073730766773224, 0.15331429243087769, 0.10854198038578033, -1.031050682067871, 0.7950937151908875, -0.6085375547409058, -0.6019412279129028, 0.9154117107391357, 0.6179165840148926, -0.7996355891227722, -1.5206377506256104,...
def _ create _ workspace _ service ( self, metadata : client. v1objectmeta ) - > none : body = client. v1service ( ) body. metadata = metadata spec = client. v1servicespec ( ) port = client. v1serviceport ( port = 8443, protocol ='tcp') spec. ports = [ port ] spec. selector = { " app " : self. app } spec. type = " node...
[ -0.2501920461654663, 0.4338605999946594, 0.4573134481906891, -0.46276912093162537, 0.5939814448356628, 0.5728365182876587, -0.18962758779525757, -1.3934471607208252, -0.16351290047168732, 0.5699837803840637, -0.07071153819561005, 1.2395904064178467, -1.0682679414749146, 0.16440589725971222...
def target _ image _ folder _ member ( self ) : return self. _ target _ image _ folder _ member
[ -1.0226600170135498, -0.8520799875259399, 0.33258894085884094, -0.25210052728652954, 0.010767840780317783, 0.20715360343456268, 0.6039860248565674, -0.3039945662021637, 0.025071265175938606, -0.8540200591087341, 0.4726152718067169, 0.9885652661323547, 0.3680169880390167, -0.262719988822937...
def get _ auc ( fprs, tprs ) : sorted _ fprs, sorted _ tprs = zip ( * sorted ( zip ( * ( fprs, tprs ) ) ) ) sorted _ fprs = list ( sorted _ fprs ) sorted _ tprs = list ( sorted _ tprs ) if sorted _ fprs [ - 1 ]! = 1. 0 : sorted _ fprs. append ( 1. 0 ) sorted _ tprs. append ( sorted _ tprs [ - 1 ] ) return np. trapz ( s...
[ 0.13307428359985352, -0.7109218239784241, 0.6388065218925476, -0.5976771116256714, 0.16109512746334076, -0.455142617225647, 0.6865907311439514, -0.07178588211536407, 0.12514764070510864, 0.7471516132354736, 1.148021936416626, 0.9576805830001831, 0.266003280878067, -0.35522621870040894, 0...
def request _ google _ maps ( dep _ lat, dep _ long, des _ lat, des _ long ) : # the url to send request api _ key = os. environ ['google _ maps _ key'] url = " https : / / maps. googleapis. com / maps / api / staticmap? key = % s " % ( api _ key ) # the search parameters to pass into request body search _ param = {'si...
[ -1.26450514793396, -0.037393372505903244, 0.9018253684043884, -0.5687843561172485, 0.43169209361076355, 0.36246034502983093, -1.3100823163986206, -0.8360341787338257, -0.68620365858078, 0.13184766471385956, -0.19226007163524628, 0.6007095575332642, 0.10291488468647003, 0.40837401151657104,...
def initialize ( path ) : return none
[ -0.5988588333129883, -1.0253560543060303, 0.21941061317920685, 0.32819971442222595, 0.19082260131835938, -0.3656719923019409, 0.33555278182029724, -0.3484201431274414, 0.46878644824028015, -1.2744603157043457, -1.3596816062927246, -0.21967653930187225, -0.13471749424934387, 0.0444327630102...
def execute _ sp _ none ( self, sql : str, * params ) - > none : cursor = self. _ _ conn. cursor ( ) cursor. execute ( sql, params ) cursor. close ( )
[ 0.17020809650421143, -0.11769337207078934, 0.4390692114830017, 0.6144639253616333, 0.5798860192298889, -0.0736587718129158, -0.703299880027771, -0.5569901466369629, -0.11974544078111649, 0.029335876926779747, 0.3626086413860321, 0.4501861035823822, -1.0248091220855713, 0.22274163365364075,...
def add _ token _ flags ( parser ) : parser. add _ argument ('- - name ','- n ', help ='name of service') parser. add _ argument ('- - version ','- v ', help ='version of service') parser. add _ argument ('- - cmd ','- c ', help ='command to start service') parser. add _ argument ('- - cmd - type ','- t ', help ='comma...
[ 0.40175214409828186, -0.016080455854535103, 0.8953253030776978, -1.1484549045562744, 0.08480489253997803, 0.25986725091934204, -0.33571356534957886, -0.19007636606693268, -0.6721272468566895, -0.32523226737976074, -0.43282848596572876, 0.3883146047592163, -0.27633389830589294, 1.1702140569...
def copy _ move _ ahead ( self, cards ) : forward _ deck = self. copy ( ) for card in cards : forward _ deck. update ( card ) return forward _ deck
[ -0.9941074848175049, -0.49909818172454834, 0.573347270488739, 0.25277167558670044, -1.2470765113830566, 0.5821182727813721, -0.5683586597442627, -0.12244323641061783, 0.15773802995681763, 0.16231785714626312, 0.25932908058166504, -0.25214430689811707, 0.150384783744812, -0.1596209406852722...
def fit ( self, x _ train, y _ train, debug = false ) : data = x _ train for component in self. components : component. fit ( data, y _ train ) if isinstance ( component, transformer ) : data = component. transform ( data ) if debug : return data
[ -0.3082234859466553, -0.7553572058677673, 0.4920249879360199, -0.252925843000412, 0.553339958190918, -0.053060807287693024, -1.3493791818618774, 0.1901695877313614, -0.3645362854003906, -1.3744828701019287, -0.2597956657409668, 0.29734188318252563, -0.36028170585632324, 0.3476411700248718,...
def stemwordporter ( self, word ) : return self. porter. stem ( word )
[ 0.20288316905498505, 0.2787797749042511, 0.11539620161056519, -0.1689257174730301, -0.6940324902534485, 0.6494994759559631, 0.4426301121711731, -0.5435824394226074, 0.04781302064657211, -0.026603173464536667, -0.14985783398151398, 0.0912618637084961, -1.3510353565216064, 0.0981526747345924...
def test _ auto _ cancelled _ booking ( self ) : ev = baker. make _ recipe ('booking. future _ ev ', name = " future event " ) baker. make _ recipe ('booking. booking ', user = self. user, event = ev, status ='cancelled ', auto _ cancelled = true ) # check there are now 5 bookings ( 3 future, 1 past, 1 cancelled ) self...
[ 0.05593525990843773, 0.8013136982917786, 0.37806448340415955, 1.515847086906433, -0.47808003425598145, 0.5181240439414978, -0.059045225381851196, 1.6629663705825806, -0.3249858021736145, -0.34197258949279785, -0.9508141279220581, -0.7895199060440063, 0.164170503616333, -0.03806466981768608...
def open ( self, path = none, * * kwargs ) : # pylint : disable = arguments - differ if not path : raise valueerror ('missing filename.') if os. path. isfile ( path ) : raise ioerror ( ('unable to use an already existing file for output'' [ { 0 : s } ]'). format ( path ) ) options = {'constant _ memory': true,'strings ...
[ -0.6457833647727966, 0.03928366303443909, 0.3399662971496582, 0.2586461305618286, -0.2688646614551544, 0.05272391065955162, 0.8856534361839294, 0.5368695855140686, -0.4852394461631775, -0.5906857252120972, 0.29293519258499146, 0.1686202883720398, -0.2341618686914444, 0.2599627375602722, ...
def deposit ( self, amount ) : self. balance + = amount return self. balance
[ -0.032779984176158905, 0.0638565868139267, 0.6182995438575745, -0.5791929960250854, -0.5394976139068604, 1.00917387008667, 0.5758812427520752, -1.1924372911453247, 0.8236052989959717, -0.7882882952690125, -0.11123576760292053, -0.5973414182662964, -0.7376999258995056, 0.44313016533851624, ...
def _ _ bucket _ scanning _ changed ( self, output = none ) : if output is none : output = self. output return \ output. ui. bucket _ scan and \ self. _ _ bucket _ combo _ box. item _ text ( output. ui. bucket _ scan )! = self. output. bucket _ scanning
[ -0.6248889565467834, -0.5149431824684143, 0.5884836912155151, 1.0887269973754883, -1.020906686782837, 0.20232665538787842, 0.7113949060440063, -0.8723463416099548, -0.2212340384721756, -0.3951188325881958, -0.7013952732086182, 0.016961831599473953, -0.5009447932243347, 0.7000567317008972, ...
def input _ yes _ no _ choice ( message ) : return str ( input ( message ) ). strip ( ). lower ( )
[ 0.3554447293281555, -0.8208742737770081, 0.19358709454536438, -0.44625189900398254, -0.5348143577575684, 1.123297095298767, -0.19221511483192444, -0.9264331459999084, -0.2547292709350586, -0.46245163679122925, 1.0754163265228271, 0.8071615099906921, -1.0059484243392944, 0.5972995162010193,...
def visit ( self, node : ast. if ) : then _ label = self. define _ internal _ lname ( ) continue _ label = self. define _ internal _ lname ( ) predicate _ vinfo = self. visit ( node. predicate ) self. register _ instruction ( cil. cilgotoif, predicate _ vinfo, then _ label ) self. visit ( node. else _ body ) self. regi...
[ -0.6245832443237305, 0.8466940522193909, 0.6962799429893494, -0.06274329870939255, 0.06473882496356964, 0.005349685903638601, 0.5392726063728333, 0.20789463818073273, -0.31947028636932373, 0.6581065058708191, 0.13709209859371185, 0.17651399970054626, 0.2845652103424072, 1.0342776775360107,...
def connect _ to _ sqlite ( db _ name ) : return sqlite3. connect ( db _ name )
[ -0.03832867369055748, 0.21395349502563477, 0.16404522955417633, -0.3477891981601715, -0.6967064738273621, -0.1739664226770401, -0.925973117351532, -0.34713828563690186, 0.15805496275424957, 0.8130057454109192, 0.18627862632274628, -0.9277850985527039, -0.6758769154548645, -0.50013047456741...