text
stringlengths
25
2.19k
embedding
listlengths
768
768
def init ( locale ) : if os. system ('pybabel extract - f babel. cfg - k _ l - o messages. pot.') : raise runtimeerror ('extract command failed') if os. system ('pybabel init - i messages. pot - d recordit / translations - l'+ locale ) : raise runtimeerror ('init command failed') os. remove ('messages. pot')
[ 0.797955334186554, 0.35887956619262695, 0.42663273215293884, 0.2064923644065857, 0.5783572196960449, 0.2256712019443512, 0.8723970651626587, 0.40242519974708557, -0.7288496494293213, 0.17026127874851227, -0.2647485136985779, -0.370536744594574, -0.04827938973903656, 0.541571855545044, 0....
def items ( self, item _ filter = none ) : start = 1 # start at 1 and not 0 since position ( ) returns 1 as the first index stop = self. item _ count + 1 # filter via key, value pair if isinstance ( item _ filter, dict ) : key, value = next ( item _ filter. items ( ) ) if len ( item _ filter ) > 1 : self. logger. warni...
[ -1.0949774980545044, -0.04941338300704956, 0.6112218499183655, 0.3361878991127014, -0.20622645318508148, -0.5135858058929443, 0.1092851534485817, 0.03604825213551521, -0.1339862197637558, -0.3250845670700073, 0.368728905916214, -0.1558738797903061, 0.4928417503833771, -0.3663043677806854, ...
def entity _ extended _ display ( entity, langs = none ) : display = entity. get ('entityid') info ='' for organizationname in filter _ lang ( entity. iter ( " { % s } organizationname " % ns ['md'] ), langs = langs ) : info = display display = organizationname. text break for organizationdisplayname in filter _ lang (...
[ 0.09805363416671753, -0.46283137798309326, 0.8436614871025085, -0.9502841830253601, -1.870573878288269, 0.13340769708156586, -0.6886143088340759, -0.383343905210495, 0.1342676728963852, 0.6841617226600647, 0.48790234327316284, 0.3546917140483856, 0.8737255334854126, 1.499597191810608, 0....
def get _ machine _ volatility _ data ( self, machine _ name ) : from lib. cuckoo. core import scheduler for machine in scheduler. machinery. machines ( ) : if machine. name = = machine _ name : return json. loads ( machine. clean _ volatility )
[ 0.16708144545555115, -0.0196632519364357, 0.29682058095932007, -0.1660248190164566, -1.1957581043243408, 0.16756479442119598, -1.396863341331482, -0.6801173686981201, -0.8569456934928894, 1.29268479347229, -0.6693457961082458, 0.6070444583892822, 0.3191426396369934, 0.5966120958328247, 0...
def getstartindex ( self ) : return _ itkimageserieswriterpython. itkimageserieswriterif3if2 _ getstartindex ( self )
[ 0.20360425114631653, 0.2859213948249817, 0.132948637008667, 0.3549818992614746, 0.3768077790737152, 0.09597796946763992, 0.3016165792942047, 0.2076265662908554, -0.1445896178483963, 0.19807365536689758, -0.37838491797447205, 0.4384011924266815, -0.4525584578514099, -0.2557254731655121, -...
def create _ subgait _ of _ trajectory ( self, joint _ trajectory, subgait _ name ) : normal _ subgait = deepcopy ( self. default _ walk [ subgait _ name ] ) balance _ duration = joint _ trajectory. points [ - 1 ]. time _ from _ start. to _ sec ( ) balance _ joints = [ ] for joint _ index, joint _ name in enumerate ( j...
[ 0.7205268144607544, -0.23634719848632812, 0.7912738919258118, 0.08656258136034012, -0.6401118636131287, 0.8251380920410156, -0.08783263713121414, -0.7873780727386475, -0.10503067076206207, 0.2020370066165924, -0.3950234353542328, 0.29856711626052856, -0.08805042505264282, -0.80955380201339...
def get _ extensions ( ) : dists = pip. get _ installed _ distributions ( ) flows = [ d for d in dists if d. project _ name. startswith ('flowtool') ] return flows
[ 1.2100739479064941, -0.040166571736335754, 0.5291926860809326, 1.4914679527282715, -0.21527408063411713, 0.5680783987045288, -0.5922563672065735, -0.3155738115310669, 1.0782853364944458, -0.17550085484981537, -0.7172747850418091, 0.8720403909683228, 0.4425169825553894, 0.5062828660011292, ...
def add _ jsondict ( self, fieldname ) : marcfield = fieldname. replace ( " hgf _ ", " " ) jsondict = { marcfield : read _ json ( self. curdir, fieldname ) } for key in jsondict. keys ( ) : # todo check if this code is really obsolete # should be solved by our new initial ordering of the fields. # # if key in self. dat...
[ -1.0197442770004272, -0.08090455830097198, 0.8771840333938599, -1.0317952632904053, -0.3214800953865051, -0.5504178404808044, 0.24843233823776245, -0.11614085733890533, -0.09941238164901733, -0.6947553753852844, -0.8558108806610107, -0.035569436848163605, -0.1972011774778366, 0.49615505337...
def _ _ iter _ _ ( self ) : for example, _ in training _ data _ generator ( self. input _ files _ in _ this _ worker, self. vocab _ file, self. encoder _ file, self. max _ sequence _ length, buffer _ size = 1e6, overlap _ size = self. overlap _ size, short _ seq _ prob = self. short _ sequence _ prob, inverted _ mask =...
[ -0.39980363845825195, -0.1889980286359787, 0.6329097151756287, 0.12269581109285355, -0.11237729340791702, 0.6778270602226257, 0.13118018209934235, 0.04540569707751274, -0.6385672092437744, -0.5114402174949646, -0.521579384803772, 0.5643678903579712, 0.14323095977306366, -0.2277830243110656...
def _ get _ pop _ sizes ( self ) : self. _ max _ pop _ size = { } for i in range ( self. max _ sh _ iter ) : n, r = self. get _ next _ iteration ( i ) for j, r _ j in enumerate ( r ) : self. _ max _ pop _ size [ r _ j ] = max ( n [ j ], self. _ max _ pop _ size [ r _ j ] ) if r _ j in self. _ max _ pop _ size. keys ( )...
[ -0.258976012468338, 0.8524513840675354, 0.6298075318336487, -0.2576406002044678, -0.4360746741294861, -0.4589318037033081, 0.13146232068538666, 0.12370876967906952, -0.6224183440208435, 1.3116357326507568, -0.5603413581848145, -0.5682332515716553, 0.27735015749931335, 1.1050362586975098, ...
def test _ translation _ rules _ g _ suite _ delete ( self ) : pass
[ -0.015608131885528564, 1.1257007122039795, 0.20380271971225739, 0.6444740295410156, 0.47680309414863586, 1.0169740915298462, 0.7881238460540771, 0.6203632950782776, -0.41733837127685547, 0.8600004315376282, -0.5276332497596741, -0.23561446368694305, -0.572106122970581, 0.1687861829996109, ...
def getuserbeerurls ( beerlisturl, userid ) : userid = str ( userid ) soup = urltosoup ( beerlisturl, selenium = true ) # # require selenium allurls = soup. find _ all ( " a ", href = true ) pattern = " ( beer /. + " + userid + " / ) " partialurls = parse _ bs4urls ( allurls, key ='href ', pattern = pattern ) fullurls ...
[ -0.9590582251548767, -0.4872172772884369, 0.5398964881896973, 1.0591397285461426, 0.16621379554271698, -0.18488311767578125, 0.10575307905673981, 0.6495077610015869, 0.32593849301338196, 0.5901808738708496, -0.8877698183059692, 0.08088070899248123, 0.042894791811704636, 0.7178091406822205,...
def fit _ training _ data ( self ) : self. model. fit ( self. x _ train, self. y _ train )
[ -0.387297123670578, 0.19246244430541992, 0.24918070435523987, 0.043923575431108475, 0.8325877785682678, 1.0249134302139282, -0.5313773155212402, 0.8593811392784119, -1.4648170471191406, -0.8547695279121399, -0.5860300064086914, 0.3670772910118103, 0.8403645157814026, -0.3902133107185364, ...
def compressalignment ( alignment, gap _ character = " - ", ignore _ beginning = 0 ) : # subsitute all initial lower case characters with a gap if ignore _ beginning : x = re. search ( " [ a - z ] ", alignment ) if x : alignment = gap _ character * x. start ( ) + alignment [ x. start ( ) : ] d = 0 if alignment [ 0 ] = ...
[ 0.14180688560009003, -0.5974575877189636, 0.8909826278686523, -0.31252118945121765, -1.3313943147659302, 0.21264910697937012, 0.712810754776001, 0.2442275434732437, 0.6602386236190796, 0.23183755576610565, 0.6293657422065735, -0.2781762182712555, -0.2072296142578125, -0.42405733466148376, ...
def preprocess ( img, do _ portrait = false, do _ resample = 300, do _ threshold = 250 ) : if do _ portrait : img = portrait ( img ) if do _ resample : img = resample ( img, size = do _ resample ) if do _ threshold : img = threshold ( img, threshold = do _ threshold ) return img
[ 0.03437521681189537, 0.3105560839176178, 0.3572455048561096, -0.11913008987903595, -0.5533685088157654, -0.11528120189905167, -0.47548747062683105, 0.09817463904619217, 0.9924013614654541, -0.20877483487129211, -0.0005552583024837077, -0.23862533271312714, 0.42827707529067993, 0.1709486693...
def process ( curr, matches, limits ) : if len ( curr ) = = 6 : if re. match ( r ". * ( 11 | 22 | 33 | 44 | 55 | 66 | 77 | 88 | 99 ). * ", curr ) and limits [ 0 ] < = curr < = limits [ 1 ] : matches. append ( curr ) return prev = int ( curr [ - 1 ] ) if len ( curr ) > 0 else 0 for i in range ( prev, 10 ) : process ( cu...
[ 0.05181918665766716, -0.10639035701751709, 0.815716028213501, -0.22939150035381317, -0.3643447160720825, -0.6548714637756348, 0.547501802444458, 0.4736660122871399, 0.445149689912796, 0.31599339842796326, 0.17917735874652863, -0.29932090640068054, -0.4120731055736542, -0.9044737219810486, ...
def microvolt _ gain ( self ) : return self. recordings [ 0 ]. microvolt _ gain
[ 0.714938223361969, 0.6934910416603088, 0.30725544691085815, 0.13542118668556213, -0.3093370199203491, 0.1979626715183258, 0.12322645634412766, -0.0162041112780571, -0.4251208007335663, -0.6205991506576538, -0.5298296213150024, 0.9932070374488831, -0.17371585965156555, 0.3078824281692505, ...
def _ _ init _ _ ( self, node _ id, timestamp ) : self. index = ( ( timestamp & timestamp _ mask ) < < timestamp _ offset ) | ( node _ id & node _ mask ) self. lock = threading. lock ( )
[ -0.08092176169157028, 0.4128453731536865, 0.3602752685546875, 0.15638159215450287, 0.18978463113307953, -0.32608652114868164, -0.12845544517040253, -0.32360324263572693, 0.5623630285263062, 0.24611987173557281, -0.21283912658691406, 0.8209887146949768, 0.3085629642009735, -0.91400027275085...
def solve _ system ( n, d, p, eps, mu, f ) : # get the basis for the stochastic system basis = legendre _ chaos ( d, p ) p = len ( basis ) # approximate f xs = np. linspace ( - 1, 1, n + 1 ) f = np. array ( [ f ( x ) for x in xs ] ) # assemble the linear system a = construct _ global _ stiffness _ matrix ( n, basis, d,...
[ -0.2411651611328125, 0.9144846796989441, 0.6382775902748108, -0.0383138582110405, 0.09309254586696625, 0.001014895155094564, -0.7454720735549927, 0.4441319704055786, -0.08644221723079681, -0.2359684705734253, 0.2044636607170105, -0.10883600264787674, -0.10475557297468185, -0.24735137820243...
def list _ partitions ( self, partitioning ) : return [ ]
[ -0.8229126334190369, -0.4215431809425354, 0.4366084933280945, 0.6165284514427185, -0.28248995542526245, -0.2671729326248169, -1.2869102954864502, 0.5022292733192444, 0.8814989924430847, 0.14474931359291077, -0.1079540103673935, -0.35381901264190674, -0.12249482423067093, -0.083902999758720...
def randomrestaurant ( ) : return render _ template ('random _ button. html ', login _ session = login _ session )
[ -1.0251619815826416, 0.5683702230453491, 0.30251139402389526, -0.09706874191761017, 0.12368999421596527, 0.5542467832565308, 0.23783105611801147, 1.3577570915222168, 0.6010361909866333, -0.41993480920791626, -0.5480627417564392, 0.07735737413167953, -0.7795602083206177, -0.0049456628039479...
def make _ instance ( self, cpt _ inst, symattr ) : inst = g. instance ( ) return inst
[ -0.15240219235420227, 0.11972341686487198, 0.13762947916984558, -1.2702981233596802, -0.7220656275749207, 0.573943555355072, 0.8529188632965088, -0.01632588542997837, -1.0022865533828735, -0.29107803106307983, 0.07391093671321869, 0.6046613454818726, -0.39150068163871765, -0.92887246608734...
def forward ( self, x _ d : torch. tensor, x _ s : torch. tensor = none ) \ - > tuple [ torch. tensor, torch. tensor, torch. tensor ] : if self. concat _ static or self. no _ static : h _ n, c _ n = self. lstm ( x _ d ) else : h _ n, c _ n = self. lstm ( x _ d, x _ s ) h _ n = self. dropout ( h _ n ) # last _ h = self....
[ -0.23516611754894257, 0.6555447578430176, 0.5174341797828674, -0.05171768367290497, -0.0840773656964302, -0.2760712504386902, -0.10299039632081985, 0.3322089612483978, -0.5106706023216248, -0.5947121977806091, -0.24073569476604462, -0.3227182924747467, 0.983169674873352, 0.0006703083636239...
def garden _ directory ( ) : gardeners = db. session. query ( user ). order _ by ( user. user _ id. desc ( ) ). first ( ) return render _ template ('/ garden _ areas. html ', gardeners = gardeners )
[ 0.015806419774889946, 0.16257180273532867, 0.32877296209335327, 0.56590735912323, -0.23985718190670013, 0.06676003336906433, 0.7683366537094116, 0.15115712583065033, -0.09612362831830978, -0.6006922125816345, 0.9563199877738953, 0.4952045977115631, 0.179050475358963, 0.5689775943756104, ...
def handles ( self ) : log. debug ( " executing volatility handles plugin on { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] command = self. plugins [ " handles " ] ( self. config ) for pid, handle, object _ type, name in command. calculate ( ) : new = { " process _ id " : int ( pid ), " handle _...
[ -0.2977449595928192, -1.3025070428848267, 0.42972391843795776, -0.7248089909553528, 1.3035615682601929, -0.3289991021156311, -0.24209575355052948, -0.3674519658088684, -0.36332178115844727, 0.0070715839974582195, -0.560741126537323, 0.3667219281196594, -0.5152215957641602, -0.0015597088495...
def fromarray ( partials ) : partial _ list = [ ] for label, matrix in partials : times = matrix [ :, 0 ] if len ( times ) > 1 and times [ - 1 ] - times [ 0 ] > 0 : freq = matrix [ :, 1 ] amp = matrix [ :, 2 ] phase = matrix [ :, 3 ] bw = matrix [ :, 4 ] partial = partial ( label, times, freq, amp, phase, bw ) partial ...
[ 0.07710516452789307, -0.8692927956581116, 0.5842761993408203, -0.31033650040626526, -0.8781371712684631, -0.08231250196695328, -0.2155110239982605, -0.5176604986190796, 0.5642049312591553, -0.14264248311519623, 0.2104160189628601, -0.4748276472091675, -0.8807096481323242, 0.326064169406890...
def on _ volume _ balance ( data _ df, window = 14 ) : if window + 1 > data _ df. shape [ 0 ] : return np. nan data _ sub _ df = data _ df. iloc [ - window - 1 : ] obv _ delta = data _ sub _ df ['volume'] * np. sign ( data _ sub _ df ['close']. diff ( ) ) return obv _ delta [ - window : ]. sum ( )
[ 0.1447700411081314, -0.35676175355911255, 1.0495187044143677, 0.1931646168231964, 0.04802669584751129, 0.4695315659046173, 0.671176016330719, -0.6816601753234863, 0.14038830995559692, -0.09948019683361053, 0.7435041666030884, 0.8439652919769287, -0.2741352319717407, 0.15439602732658386, ...
def setseriesformat ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriteriuc3iuc2 _ setseriesformat ( self, * args )
[ -0.5920539498329163, 0.18999367952346802, 0.1879063844680786, -0.1437082290649414, -0.2293837070465088, 0.16007795929908752, -0.1453617364168167, 0.021687451750040054, -0.08048655837774277, -0.07194225490093231, -0.43094149231910706, 1.06180739402771, -0.12945100665092468, -0.1166298463940...
def test _ show _ due _ date _ time _ event _ with _ payment _ time _ allowed ( self, mock _ tz ) : mock _ tz. now. return _ value = datetime ( 2015, 2, 1, tzinfo = dt _ timezone. utc ) event. objects. all ( ). delete ( ) booking. objects. all ( ). delete ( ) event = baker. make _ recipe ('booking. future _ pc ', advan...
[ -0.12112215906381607, 0.7700067758560181, 1.1110212802886963, 0.6466813087463379, -0.7390080094337463, 0.348157674074173, 0.09569951146841049, 0.7897154688835144, -0.4240685701370239, 0.1232084110379219, -0.23708024621009827, -0.21649156510829926, 0.19561561942100525, 0.493452787399292, ...
def setupcontainer ( self ) : return timeseries ('test _ timeseries ', list ( range ( 100, 200, 10 ) ),'siunit ', timestamps = list ( range ( 10 ) ), resolution = 0. 1 )
[ 0.3280121982097626, 1.0220816135406494, 0.4389031231403351, 0.019559327512979507, 0.2833283245563507, -0.808304488658905, 0.28658539056777954, 0.01748662255704403, 0.6297833323478699, -0.5192461609840393, 0.050410617142915726, -0.4920578896999359, 0.14223481714725494, 0.013882743194699287,...
def create _ speed _ regulation ( excel _ file _ path, base _ geodatabase, output _ geodatabase, roads _ fc, jurisdiction ) : municipal _ boundary = os. path. join ( base _ geodatabase, " municipal _ boundary " ) state _ boundary = os. path. join ( base _ geodatabase, " neighboring _ states " ) # import excel table new...
[ 0.5461155772209167, -0.037888769060373306, 0.75450199842453, -0.17065414786338806, 0.032556068152189255, -0.12322527170181274, 0.22493115067481995, 0.14897865056991577, -0.6244834661483765, 0.28863412141799927, 0.43166008591651917, -0.1704866886138916, 0.26231467723846436, -0.0982548147439...
def findtitle ( string ) : stack = [ ] for i, c in enumerate ( string ) : if c = ='(': stack. append ( i ) elif c = =')'and stack : start = stack. pop ( ) if len ( stack ) = = 0 : return string [ start + 1 : i ]
[ -0.09469712525606155, 0.34421271085739136, 0.8792346119880676, 0.2297132909297943, -0.6139647364616394, -0.6971205472946167, 0.3252091109752655, -0.9459055662155151, -0.11162789911031723, 1.1097275018692017, 0.2654286026954651, 0.37767064571380615, -1.8324605226516724, -0.5243622064590454,...
def finalize ( self, info : optional [ infodict ] = none ) - > none : self. _ viewer. close ( force = self. close )
[ -0.09665684401988983, 0.2233022004365921, 0.33824554085731506, -0.19964614510536194, -0.6460556387901306, 0.3995901644229889, 0.5504423379898071, 0.5126891732215881, -0.5110154747962952, -1.5729960203170776, 0.004749027080833912, 0.29733121395111084, -0.2526513636112213, 1.3643724918365479...
def setmodes ( self, debug = false, verbose = - 1 ) : self. debug = debug self. verbose = verbose
[ -0.07203271239995956, -0.037247855216264725, 0.5283365249633789, 0.21600490808486938, 1.7328896522521973, 0.0716664046049118, -0.7270058393478394, -0.05589189752936363, -0.5721981525421143, 0.006640132982283831, -0.11411164700984955, 0.35080838203430176, -0.3102665841579437, 1.661351680755...
def set _ default _ permissions ( request ) : school _ id = g. user. school _ id # check permissions not created yet. if permission. query. filter _ by ( school _ id = school _ id ). first ( ) is not none : raise customerror ( 401, message ='permissions already setup.') # create permissions for permission in permission...
[ -0.5887936949729919, 0.5424399375915527, 0.5431909561157227, 0.5082859992980957, 1.8862993717193604, -0.49633124470710754, 0.29196587204933167, -0.5133664608001709, 0.07778789103031158, 0.962565541267395, -0.25863903760910034, -0.22843226790428162, 0.06682898104190826, 0.7390804290771484, ...
def odps _ set ( self ) - > optional [ pulumi. input [ bool ] ] : return pulumi. get ( self, " odps _ set " )
[ -0.45250222086906433, 0.3037748336791992, 0.6743040084838867, -0.6068108677864075, 0.5387522578239441, 1.1445106267929077, -0.5945927500724792, -0.6193764209747314, 0.9871651530265808, 0.3281864523887634, 0.4208897054195404, 0.19168376922607422, -0.4479367434978485, -1.3719701766967773, ...
def test _ cannot _ update _ for _ cancelled _ event ( self ) : event = baker. make _ recipe ('booking. future _ ev ', cancelled = true ) booking = baker. make _ recipe ('booking. booking ', user = self. user, event = event ) resp = self. _ get _ response ( self. user, booking ) # test redirect to permission denied pag...
[ 0.43386104702949524, 0.5719607472419739, 0.43020346760749817, 1.6467933654785156, -0.7793447375297546, 1.1697498559951782, -0.0012973776319995522, 1.4002162218093872, -0.005823677871376276, -0.21884453296661377, 0.29021477699279785, -0.7460623383522034, -0.024644315242767334, -0.3373807072...
def _ _ init _ _ ( self, name, balance = 0. 0 ) : self. name = name self. balance = balance self. variable = 2
[ 0.7632368803024292, -0.9028284549713135, 0.6302346587181091, 0.40556371212005615, -0.6857810020446777, 0.14289578795433044, -0.3064977526664734, -0.3943888247013092, -0.24909597635269165, 0.16687387228012085, -0.9883036017417908, -0.3501286506652832, 0.03233475610613823, 0.9824140071868896...
def fit ( self, pos _ seqs, neg _ seqs = none, times = 2, order = 2 ) : if neg _ seqs is none : neg _ seqs = list ( seq _ to _ seq ( pos _ seqs, modifier = shuffle _ modifier, times = times, order = order ) ) self. estimator = fit ( pos _ seqs, neg _ seqs, self. vectorizer, n _ jobs = self. n _ jobs, cv = 10, n _ iter ...
[ -0.6423749327659607, -0.03975817933678627, 0.578585147857666, 0.6478139758110046, -0.45180535316467285, -0.19964838027954102, -0.7605745196342468, 0.8952612280845642, 0.3426300585269928, 0.4804205000400543, -0.3172883689403534, 0.018135735765099525, -0.5897691249847412, 0.4789639413356781,...
def note ( self, pfields, absp2mode = 0 ) : return self. pt. scoreevent ( absp2mode,'i ', pfields )
[ -0.8428994417190552, -0.05890532210469246, 0.30656111240386963, 0.44215384125709534, 0.5477703809738159, 1.2611627578735352, 0.32918626070022583, -1.0772477388381958, -1.0121290683746338, 0.330247700214386, -0.04154780134558678, -0.3554074466228485, -0.3205370008945465, -0.4925712049007416...
def multidb _ wrapper ( module : str, use _ new _ client : bool = false, log _ traceback : bool = false ) - > none : wrapper = multidbwrapper ( ) wrapper. wrap _ algorithm ( module, use _ new _ client, log _ traceback )
[ -0.26036298274993896, 0.168534517288208, 0.5008077621459961, 0.9370978474617004, -0.5963646769523621, 0.8705427050590515, -0.39892908930778503, 0.10201376676559448, 0.15682587027549744, 1.0124253034591675, -0.24640032649040222, 0.428122341632843, -0.01670040935277939, 1.1372172832489014, ...
def getdefs ( self, astsv = false ) : defs = self. defs return ( " \ n ". join ( f " { name } \ t { self. repkind ( kind ) } \ t { self. repmixed ( mixed ) } " for ( name, kind, mixed ) in defs ) if astsv else defs )
[ -0.7748649716377258, -0.10529395937919617, 0.2655523717403412, -0.2150340974330902, -0.02313394472002983, -0.3997228145599365, -1.168178915977478, 0.046583954244852066, -0.17570850253105164, -0.0016157951904460788, -0.5901498198509216, 0.4819992780685425, 0.5837065577507019, 1.410104751586...
async def farm _ block ( self, * * kwargs ) : farmer = self. nobody if'farmer'in kwargs : farmer = kwargs ['farmer'] farm _ duration = datetime. timedelta ( block _ time ) farmed = await self. sim. farm _ block ( farmer. puzzle _ hash ) for k, w in self. wallets. items ( ) : w. _ clear _ coins ( ) for kw, w in self. wa...
[ -0.13216504454612732, 0.9721192717552185, 0.8087615370750427, 0.27833858132362366, -0.13271839916706085, -0.10098238289356232, 0.1310114562511444, -0.9085698127746582, -0.20848673582077026, 0.886491060256958, -0.4957036077976227, 0.4310542047023773, -1.0637586116790771, 0.4860280454158783,...
def report _ error ( context, error ) : title = type ( error ). _ _ name _ _ +':'+ context message _ box = qtwidgets. qmessagebox ( ) message _ box. settext ( title ) message _ box. setinformativetext ( str ( error ) ) message _ box. setstandardbuttons ( qtwidgets. qmessagebox. ok ) message _ box. setdefaultbutton ( qt...
[ 0.5248900651931763, 0.44837960600852966, 0.7246332168579102, -0.9387239813804626, -0.46180981397628784, -0.36275404691696167, -0.16662980616092682, -0.33382952213287354, 0.6322749853134155, -0.3648316264152527, 0.13036535680294037, 0.37785762548446655, -0.23520275950431824, 0.1464928090572...
def get _ tag ( self, index ) : index = self. _ _ validate _ tag _ index ( index ) return ethernettag ( self. get _ long ( 12 + 4 * index ) )
[ -0.20910021662712097, 0.9930325746536255, 0.2819092571735382, -0.3298509120941162, 0.9933385252952576, 0.012302937917411327, -0.6975930333137512, -1.6657613515853882, 0.43824541568756104, -0.39208513498306274, -0.42232251167297363, -0.4825352728366852, -0.3673337399959564, -0.1612913310527...
def precisionatk ( self, resultsids, relevantids, k ) : res = resultsids [ 0 : k ] hit = 0 for r in relevantids : if r in res : hit + = 1 return hit / k
[ 0.1847728192806244, -0.6034325957298279, 0.38502100110054016, -0.44772854447364807, 0.14200972020626068, -0.6989683508872986, 0.03374597802758217, 0.44808071851730347, -0.39605623483657837, 0.8864158391952515, 1.0652045011520386, -0.45042675733566284, -0.3244628608226776, -0.77494728565216...
def create _ volume _ from _ snapshot ( self, volume, snapshot ) : src _ volume = none vgid = none # detect whether a member of the group. snapshotid = snapshot ['id'] # try to get cgid if volume belong in the group. src _ volumeid = snapshot ['volume _ id'] cgsnapshotid = snapshot. get ('group _ snapshot _ id ', none ...
[ -0.3482343554496765, 0.38541045784950256, 0.6173065304756165, 0.22113493084907532, -0.3147684633731842, -0.39026033878326416, -0.09665962308645248, 0.1478760689496994, 0.43679341673851013, 0.25120651721954346, -0.09505990892648697, 0.04684765636920929, 0.018122175708413124, -0.137718871235...
def getqvalue ( self, state, action ) : " * * * your code here * * * " util. raisenotdefined ( )
[ -0.34795302152633667, -0.499019056558609, 0.3554275631904602, 1.0477925539016724, -0.1872771978378296, 0.20517981052398682, 0.07590935379266739, -0.5680444240570068, 0.22563952207565308, -0.7023889422416687, -0.6715006232261658, 1.4447979927062988, 0.2759976089000702, -0.009550539776682854...
def get _ cats ( df _ path, xml _ filename = " train - 2017 - 09 - 15. xml ", part _ task = " aspect " ) : tree = et. parse ( df _ path + xml _ filename ) df = convert _ df ( tree ) cats = [ ] if part _ task = = " aspect " : cats = df. aspect. unique ( ) cats = np. delete ( cats, 2 ) # delete nan cats = np. append ( ca...
[ -0.21641115844249725, -0.22895625233650208, 0.49167579412460327, 0.00519926380366087, 0.13770855963230133, -0.007953710854053497, -0.7606677412986755, 0.20994532108306885, -0.3138446509838104, -0.8315847516059875, 0.5635295510292053, -0.39303988218307495, 1.085656762123108, -0.053232230246...
def build _ database _ ingredients ( f, ingredients, aliases ) : categories = os. listdir ( ingredients _ dir ) # write category nodes for category in categories : f. write ('_ : { } < dgraph. type > \ " category \ ". \ n '. format ( category ) ) f. write ('_ : { } < cname > \ " { } \ ". \ n '. format ( category, categ...
[ -0.9941625595092773, -0.215238556265831, 0.47259974479675293, -1.0707560777664185, 0.2750214636325836, 0.26054298877716064, 0.1309695988893509, 1.3241277933120728, -1.0127919912338257, 0.28675511479377747, 0.23766157031059265, -0.19774828851222992, 1.0216343402862549, -0.03154554218053818,...
def test _ check _ xarrays ( ) : # call checker function chmap, landmap, basevalues, time _ window, dim0 = mob. check _ inputs ( ch _ xarr, basevalues _ idx = [ 0 ], window _ idx = 1, landmap = land _ xarr ) # assert types assert dim0 = ='time'assert isinstance ( chmap, xr. dataarray ) is true assert isinstance ( landm...
[ -0.13494256138801575, -0.31232932209968567, 0.5788588523864746, 0.34770408272743225, 0.025506194680929184, 0.8169369101524353, -0.2706971764564514, -0.6495864987373352, 0.21536265313625336, -0.1816379874944687, -0.015430093742907047, 0.4145410656929016, -0.5709664821624756, 1.1480382680892...
def import _ azure _ monitor ( self ) - > pulumi. output [ optional [ bool ] ] : return pulumi. get ( self, " import _ azure _ monitor " )
[ 0.5302510857582092, 0.5004674196243286, 0.5507559180259705, 0.5214256644248962, 0.21164856851100922, 1.5778639316558838, -0.1206170842051506, -0.37309959530830383, 0.5609620809555054, 0.5540907979011536, -0.6785206198692322, 0.30657675862312317, -0.5709418058395386, -0.31412428617477417, ...
def _ mgui _ set _ choice ( self, choice _ name : str, data : any ) - > none : for btn in self. _ btn _ group. buttons ( ) : if btn. text ( ) = = choice _ name : # otherwise update its data btn. _ data = data else : # if it's not in the list, add a new item self. _ add _ button ( choice _ name, data )
[ -0.8257573246955872, -0.3665043115615845, 0.4635620415210724, 0.3224923014640808, 0.3351297378540039, 0.3124476373195648, -1.141644835472107, -0.35575246810913086, 0.3357340395450592, 0.8162858486175537, -0.9031767845153809, 0.4239167869091034, -0.20923711359500885, 0.3814198076725006, 0...
def mysql _ cursor _ context ( db : typing. union [ str, mara _ db. dbs. mysqldb ] ) - >'mysqldb. cursors. cursor': import mysqldb. cursors # requires https : / / github. com / pymysql / mysqlclient - python if isinstance ( db, str ) : db = mara _ db. dbs. db ( db ) assert ( isinstance ( db, mara _ db. dbs. mysqldb ) )...
[ -0.5295254588127136, -0.5138631463050842, 0.6446219682693481, -0.1938248723745346, -1.3215394020080566, -0.2198706865310669, -0.02015090361237526, -0.3040943741798401, 1.179499864578247, -0.1786511093378067, 0.22801083326339722, -0.2636854350566864, -0.3757650852203369, 0.2863897383213043,...
def to _ dict ( self ) : result = { } for attr, _ in six. iteritems ( self. swagger _ types ) : value = getattr ( self, attr ) if isinstance ( value, list ) : result [ attr ] = list ( map ( lambda x : x. to _ dict ( ) if hasattr ( x, " to _ dict " ) else x, value ) ) elif hasattr ( value, " to _ dict " ) : result [ att...
[ -1.0025804042816162, 0.05218510329723358, 0.9232099056243896, -0.6458604335784912, -0.8525808453559875, -0.7080870270729065, -0.054667871445417404, -0.5359979271888733, 0.2701573967933655, -0.030146826058626175, -0.00342924683354795, -0.20152588188648224, 0.28327319025993347, 0.90665280818...
def safesolvepnp ( objpts, imgpts, cammat, discoeffs, methodflag, rot, trans ) : if not torch. is _ tensor ( rot ) : retval, rvec, tvec = cv2. solvepnp ( objpts, imgpts, cammat, discoeffs, none, none, 0, methodflag ) if not retval : rvec = np. zeros ( 3 ) tvec = np. zeros ( 3 ) return [ rvec. reshape ( [ - 1 ] ), tvec....
[ -0.26672112941741943, 0.028117334470152855, 0.5543988943099976, 0.6459236741065979, 0.46333205699920654, -0.3903515934944153, 0.13977684080600739, -0.7650672793388367, 0.8408072590827942, 0.5735722780227661, -0.0842660441994667, -0.8258254528045654, -0.8314914107322693, -0.2906498908996582...
def _ connect ( self, recursion = none ) : # create ciomsclient : oms _ uri = self. _ driver _ config ['oms _ uri'] log. debug ( " % r : creating ciomsclient instance with oms _ uri = % r ", self. _ platform _ id, oms _ uri ) self. _ rsn _ oms = ciomsclientfactory. create _ instance ( oms _ uri ) log. debug ( " % r : c...
[ -0.4219874441623688, -0.1425648033618927, 0.4096356928348541, 0.4261743724346161, 0.3466823697090149, -0.46760478615760803, 0.4752686023712158, 0.7924562692642212, 0.1860671192407608, -0.25465258955955505, 0.21216054260730743, -0.11593984067440033, -0.10461653023958206, 0.10227079689502716...
def get _ data ( filename ) : ds = gdal. open ( filename, gdal. ga _ readonly ) band = ds. getrasterband ( 1 ) data = np. float64 ( band. readasarray ( ) ) ds = none return data
[ -0.1681012213230133, -0.2964206635951996, 0.3651864230632782, -0.013795335777103901, 1.057753562927246, 0.8258726596832275, 0.5649793148040771, -0.46951088309288025, -0.4758387804031372, -0.5985525846481323, 0.40369969606399536, 0.9956314563751221, 0.20700860023498535, 0.11805446445941925,...
def basc _ init _ collectd _ up ( self, log ) : if not self. basc _ is _ up ( log ) : self. basc _ running _ collectd = - 1 return self. basc _ running _ collectd = \ self. basc _ agent. bea _ collectd _ running ( log ) if self. basc _ running _ collectd < 0 : self. basc _ failed = true
[ 0.22318214178085327, -0.9544702768325806, 0.7172505855560303, 0.07416054606437683, 0.25528571009635925, 0.6823304295539856, 0.9737311601638794, -0.3820268511772156, -0.34943366050720215, 0.10966497659683228, -0.10271055996417999, 0.8625484704971313, 0.21433401107788086, -0.0398203507065773...
def is _ valid _ number ( input _ square ) : return input _ square > = 0 and input _ square < = 8
[ -0.9521912336349487, -0.5123509764671326, 0.3928205370903015, 0.85546875, -0.4100216329097748, 0.505778431892395, -0.12514854967594147, -0.11437727510929108, 0.9575768113136292, -0.5987129807472229, -0.08053359389305115, 0.4280245006084442, -0.006298862863332033, 0.5632040500640869, 0.42...
def list _ product _ families _ metadata ( self, skip _ token : optional [ str ] = none, * * kwargs : any ) - > iterable [ " _ models. productfamiliesmetadatadetails " ] : api _ version = self. _ get _ api _ version ('list _ product _ families _ metadata') if api _ version = ='2020 - 12 - 01 - preview': from. v2020 _ 1...
[ -1.8092151880264282, 0.022174835205078125, 0.90696120262146, -0.028778210282325745, 0.37700799107551575, 0.07238999009132385, -0.6027142405509949, -1.408691644668579, 0.03864998742938042, 0.5463212132453918, -0.7772341966629028, 0.9676204919815063, 0.2573606073856354, -0.5147455930709839, ...
def unify ( self, s1, s2, theta ) : if'failure'in theta : return theta if s1 = = s2 : return theta elif is _ variable ( s1 ) : return self. unify _ var ( s1, s2, theta ) elif is _ variable ( s2 ) : return self. unify _ var ( s2, s1, theta ) elif isinstance ( s1, predicate ) and isinstance ( s2, predicate ) : return sel...
[ -0.5247385501861572, 0.04477353394031525, 0.6010428071022034, -0.0807943195104599, -0.1565907597541809, -0.4740937054157257, -0.24999219179153442, 0.3854040801525116, -0.8628825545310974, 0.2895297706127167, -0.6088266372680664, 0.8829273581504822, -0.34341153502464294, -0.3283467292785644...
def preferred _ actions ( root, max _ depth = none ) : seq = [ ] treedebugger. _ preferred _ actions _ helper ( root, 0, seq, max _ depth = max _ depth ) return seq
[ -1.2797318696975708, 0.3716931641101837, 0.5545790195465088, 1.1708588600158691, -0.297481894493103, -0.9198206067085266, 0.07591723650693893, -0.06765919178724289, 0.2966170012950897, 0.3627813756465912, -0.34619659185409546, 0.8657469153404236, 0.18022119998931885, 1.2498186826705933, ...
def not _ implemented ( parent ) : msg = translate ( " asterstudy ", " not implemented yet " ) q. qmessagebox. information ( parent, " asterstudy ", msg )
[ 0.28093811869621277, 0.20835953950881958, 0.22661113739013672, -1.4305092096328735, -0.7571821212768555, 0.020068015903234482, 0.6374702453613281, -0.305857390165329, 0.3419327437877655, -0.3168843686580658, 0.11938353627920151, 0.4049222469329834, 0.5821567177772522, 0.5205900073051453, ...
def test _ check _ config _ params _ nb _ commits _ before _ checkpoint _ wrong _ type ( gitdelver _ config _ params _ fixture : callable [ [ none ], dict [ str, str ] ] ) : config _ params = gitdelver _ config _ params _ fixture config _ params [ " nb _ commits _ before _ checkpoint " ] = " test " with pytest. raises ...
[ 0.3255448341369629, 0.8892204761505127, 0.5535929203033447, 0.7140390276908875, 0.684093177318573, 0.4792041480541229, 0.26822274923324585, -0.30091139674186707, -0.5213857889175415, 0.931001603603363, -0.6174226999282837, -0.18316538631916046, -0.4753170311450958, 1.3586100339889526, 0....
def _ process _ step ( self, step ) : if isinstance ( step, versionpick ) : # version pick passed, coerce it... step = step. pick ( self. browser. product _ version ) if isinstance ( step, tuple ) : image = step [ 0 ] step = step [ 1 ] if isinstance ( step, versionpick ) : # version pick passed, coerce it... step = ste...
[ -1.6340848207473755, -0.9893428087234497, 0.3683170676231384, 0.6505988240242004, 0.08903588354587555, -0.49699968099594116, 0.3320426344871521, -0.42425960302352905, -0.2742081582546234, 0.43109193444252014, -0.10265845060348511, -0.022669903934001923, 0.6567941904067993, 0.97898972034454...
def test _ pod _ io ( pre _ upgrade _ filesystem _ pods, post _ upgrade _ filesystem _ pods, pre _ upgrade _ block _ pods, post _ upgrade _ block _ pods, fio _ project, resume _ cluster _ load, ) : log. info ( f " pods using filesystem created before upgrade : " f " { pre _ upgrade _ filesystem _ pods } " ) log. info (...
[ 0.056020960211753845, -0.56455397605896, 0.7129355669021606, 0.4279435873031616, 0.5766032934188843, -0.4065483510494232, 0.913975715637207, -0.681293249130249, -0.26402461528778076, 0.08147216588258743, -0.34634798765182495, -0.4250725209712982, -0.5682523846626282, -0.36787766218185425, ...
def quicksort ( lst : list ) - > list : tamanho = len ( lst ) # if tamanho < 2 : # # this is the base case # return lst [ : ] # else : # pivot = lst [ 0 ] # smaller, bigger = _ partition ( lst [ 1 : ], pivot ) # # smaller = quicksort ( smaller ) # bigger = quicksort ( bigger ) # # return smaller + [ pivot ] + bigger if...
[ 0.16404739022254944, 0.22947880625724792, 0.6160666346549988, 0.8060757517814636, -0.004540629219263792, -0.3895159959793091, -0.929158627986908, -0.4301196336746216, 0.6519187092781067, -0.7110347151756287, -1.4794278144836426, -0.8896932005882263, -0.2522677481174469, 0.44718092679977417...
def draw ( self, file _, show _ boundary : bool = false ) - > none : file _. write ( " < text x = \ " " + str ( self. point. x ) + " \ " y = \ " " + str ( self. point. y ) + " \ " " ) file _. write ( " style = \ " " ) file _. write ( str ( self. style ) ) file _. write ( " \ " > " ) file _. write ( str ( self. text ) )...
[ 0.21005788445472717, 0.12254699319601059, 0.7463017702102661, -0.21252094209194183, -0.15704047679901123, 1.267522931098938, 0.021397028118371964, 0.76017826795578, -0.6602710485458374, -0.1220795214176178, 0.014888198114931583, 0.22799493372440338, 0.43219971656799316, 0.170086070895195, ...
def test _ dry _ decay ( ) : dryfrac = mob. calculate _ channel _ decay ( chmap, fsurf, basevalues _ idx = basevalue, window _ idx = time _ window ) assert np. all ( dryfrac = = np. array ( [ [ 0. 75, 0. 6875, 0. 625, 0. 5625, 0. 5 ] ] ) )
[ 0.06652189791202545, -0.31978845596313477, 0.3965819478034973, 0.03707035630941391, 0.928129255771637, 0.5100648403167725, 1.1282106637954712, -0.872394323348999, -0.08326005190610886, -1.7522590160369873, -0.08121371269226074, -0.06849369406700134, 0.03004288859665394, 0.8306601643562317,...
def _ _ init _ _ ( self, max _ output _ num ) : self. max _ output _ num = max _ output _ num
[ -0.4919387400150299, -0.22512803971767426, 0.35897019505500793, 1.003641963005066, -0.5738211274147034, -0.9267027974128723, 0.6143787503242493, 0.6553003787994385, -0.32265207171440125, -0.7168431282043457, -0.40775927901268005, -0.510476291179657, 0.4737473130226135, -0.05316442251205444...
def test _ order _ status ( self ) : t4 = taskfactory ( name = " closed ", creator = self. user, status = task. status. closed ) t2 = taskfactory ( name = " assigned ", creator = self. user, status = task. status. assigned ) t3 = taskfactory ( name = " completed ", creator = self. user, status = task. status. completed...
[ -0.14054197072982788, 0.07184191793203354, 0.659815788269043, 0.347582072019577, -0.00888703390955925, 0.558539867401123, 0.02719571813941002, -0.45717853307724, -0.5414563417434692, -0.09184623509645462, -0.7020005583763123, -0.27296629548072815, 1.025882601737976, 1.01076340675354, -0....
def show _ available _ products ( ) : mongo = mongodbconnection ( ) with mongo : # connect to mongo db = mongo. connection. hp _ norton # name the first collection we will work on products = db [ " products " ] customers = db [ " customers " ] rentals = db [ " rentals " ] for name in products. find ( ) : logging. debug...
[ 0.6603225469589233, -0.7301418781280518, 0.6048158407211304, -0.10160858184099197, 0.4899401366710663, 0.8524802327156067, -0.34065601229667664, 0.3350580334663391, -0.5554221272468567, 1.287192463874817, 0.13559430837631226, 0.5693942308425903, 0.022991184145212173, 1.2382937669754028, ...
def compute _ tstats ( data, ranges, var, by _ var, verbose = true ) : if verbose : print ( f "... { var } : " ) mat = pd. dataframe ( columns = ranges, index = ranges ) for idx1, r1 in enumerate ( ranges ) : for idx2 in range ( idx1 + 1, len ( ranges ) ) : r2 = ranges [ idx2 ] ttest = compare _ means ( r1, r2, by _ va...
[ -0.39636656641960144, 0.43455052375793457, 0.39645498991012573, -0.032209135591983795, 0.37799450755119324, -0.23359057307243347, 0.007129423785954714, 0.18862293660640717, -0.856217086315155, 0.5788204669952393, 0.21774764358997345, 0.9028390645980835, 0.04330179840326309, -0.362919598817...
def join _ continuation ( lines ) : lines = iter ( lines ) for item in lines : while item. endswith ( " \ \ " ) : try : item = item [ : - 2 ]. strip ( ) + next ( lines ) except stopiteration : return yield item
[ 1.1370062828063965, -1.134245753288269, 0.8345454335212708, 0.5678161382675171, -0.38411715626716614, 0.3076067268848419, -0.5493117570877075, 0.42347458004951477, -0.867242693901062, -0.2132301926612854, 0.8972005248069763, -0.4180091619491577, -0.5557000041007996, -0.6583009362220764, ...
def _ check _ header _ type ( line _ num ) : current _ buffer = vim. current. buffer line = current _ buffer [ line _ num - 1 ] if " ( " in line and line. endswith ( " ; " ) : return " func _ dec " elif " ( " in line and ( line. endswith ( " { " ) or line. endswith ( " ) " ) ) : return " func _ bod " elif " class " in ...
[ 0.4918872117996216, -0.73987877368927, 1.0184838771820068, 0.36483749747276306, 0.28983503580093384, -0.8839195966720581, 0.045193079859018326, -1.013994812965393, -0.24672091007232666, -0.3545133173465729, -0.08635596185922623, 0.6162291169166565, -0.8193686008453369, -0.03522960841655731...
def by _ image ( self, image _ id ) : response = self. _ client. get ('container - security / api / v1 / jobs / image _ status ', params = {'image _ id': image _ id } ) return sctestjob. from _ json ( response. text )
[ 0.5596349239349365, 0.214971661567688, 0.16910777986049652, -0.17727124691009521, 0.25863099098205566, -0.6451594233512878, -0.7952437400817871, -0.14634761214256287, 0.2161906361579895, 0.22782912850379944, 0.27245020866394043, 0.23426447808742523, -0.24443070590496063, 0.3205203711986542...
def _ try _ unary _ operation ( self, operator : operator, x : int ) - > none : if isinstance ( operator, unaryoperator ) : value = operator. compute ( x ) self. _ buffer. append ( value ) else : raise expressionerror
[ -0.1250562220811844, 1.5440733432769775, 0.6768592000007629, 0.4056757390499115, -0.7038726210594177, -0.27682095766067505, -0.15673278272151947, -0.29448047280311584, 0.18072842061519623, -0.6264507174491882, -0.2262744903564453, 0.09729401767253876, -0.09564454108476639, -0.5081545114517...
def num _ locations ( self ) : return len ( self. locations )
[ -0.3641650676727295, 0.19955997169017792, 0.2360846996307373, -0.2309689074754715, 0.44705817103385925, 0.5961467623710632, 0.5866009593009949, 1.3048521280288696, 0.574113667011261, -1.5119985342025757, -0.14467501640319824, -0.47116994857788086, 0.6184477806091309, -0.524016797542572, ...
def _ _ init _ _ ( self, input _ pipes, p = none ) : self. input _ pipes = input _ pipes self. p = [ float ( el ) / sum ( p ) for el in p ]
[ -0.04048394784331322, -0.13370418548583984, 0.3666864037513733, 0.18471090495586395, 0.21909572184085846, 0.6845341324806213, -0.18275019526481628, 1.2725541591644287, -0.30364662408828735, -0.08232079446315765, -0.22542941570281982, -0.6507114768028259, -1.0987812280654907, 0.213734418153...
def oss _ bucket _ set ( self ) - > optional [ pulumi. input [ bool ] ] : return pulumi. get ( self, " oss _ bucket _ set " )
[ -0.015672411769628525, 1.0750958919525146, 0.6939223408699036, 0.4308764338493347, 0.2406359165906906, 1.4184759855270386, -0.03219608590006828, -0.5605842471122742, -0.07791644334793091, -0.17869047820568085, -0.23669162392616272, 0.556769847869873, 0.05394591763615608, -0.750696659088134...
def _ _ ne _ _ ( self, other ) : return not self = = other
[ -1.2292824983596802, -0.6514386534690857, 0.6120245456695557, 0.16604311764240265, 0.13938051462173462, 0.4793989956378937, -0.7392147779464722, -1.1260026693344116, -0.082207590341568, -0.27900615334510803, -0.7796158790588379, -0.17859119176864624, -0.23501822352409363, -0.33838322758674...
def or ( q1, q2 ) : return openlegislationset ( q1, q2,'or')
[ 0.25816047191619873, -0.7831177711486816, 0.44253307580947876, -1.018568515777588, -1.219718098640442, 0.10618028789758682, -1.126220464706421, -0.5182850360870361, -0.1422259658575058, -1.218732476234436, 1.4287251234054565, -0.43755608797073364, 0.18168681859970093, -1.9130014181137085, ...
def discard ( self, key ) : try : self. _ cache. pop ( key ) except keyerror : pass
[ 0.4488367736339569, 0.6857069730758667, 0.37515074014663696, -0.20882026851177216, -0.8190279603004456, 0.5623001456260681, -0.5357185006141663, 0.1586204618215561, -0.03084740974009037, 0.7505663633346558, 0.23312491178512573, -0.268443763256073, -0.3290460705757141, 0.5317964553833008, ...
def test _ mixed _ ne ( ) : # payoff = np. array ( [ [ 1, - 1 ], [ - 1, 1 ] ] ) # matching pennies payoff = np. array ( [ [ 0, - 1, 1 ], [ 1, 0, - 1 ], [ - 1, 1, 0 ] ] ) # rock, paper, scissors attack _ strategy, defense _ strategy, utility = find _ mixed _ ne ( payoff ) print ( attack _ strategy, defense _ strategy )
[ -0.19589337706565857, 0.006772895809262991, 0.6283355355262756, 0.1846935898065567, 0.4573782682418823, 0.44251081347465515, -0.32908540964126587, -0.9318209886550903, 0.7220996022224426, 0.17364445328712463, -0.09279649704694748, -0.46360671520233154, 0.14479060471057892, 0.02660722658038...
def create _ dummy _ computation _ lambda _ empty ( ) : value = computation _ factory. create _ lambda _ empty _ tuple ( ) type _ signature = computation _ types. functiontype ( none, [ ] ) return value, type _ signature
[ -0.6449109315872192, 0.29623833298683167, 0.628284215927124, -0.4504139721393585, 1.2726565599441528, -0.18239140510559082, 0.6085474491119385, -0.2469726949930191, -0.5593810081481934, -0.024952607229351997, -1.5905581712722778, 0.19409702718257904, 0.3018164038658142, 0.43570229411125183...
def gather _ fortran _ data _ at _ klevel ( path : str, cn : int, var : str, klevel : int ) : ts _ size = len ( xr. open _ dataset ( path + " / atmos _ custom _ fine _ inst. tile1. nc ", decode _ times = false ) [ " time " ] ) total _ tiles = 6 fortran _ data = np. zeros ( ( ts _ size, total _ tiles, cn, cn ) ) for ran...
[ 0.0105369808152318, 0.2750447392463684, 0.41561639308929443, -0.676090657711029, -0.30661576986312866, -0.3332860469818115, -0.15608052909374237, -0.7215180993080139, -1.2839150428771973, 0.5083370804786682, -0.22075718641281128, 0.6538816690444946, 0.4869309663772583, 0.4814637303352356, ...
def test _ index _ with _ multiple _ projects ( self ) : create _ project _ and _ milestones ( " title 1 ", 0 ) create _ project _ and _ milestones ( " title 2 ", 0 ) response = self. client. get ( reverse ('projects : index') ) self. assertcontains ( response, " title 1 " ) self. assertcontains ( response, " title 2 "...
[ -0.3051803410053253, 0.9424175024032593, 0.44831180572509766, -0.0020686464849859476, 0.9421876072883606, 1.4718067646026611, 0.014277304522693157, -0.21302418410778046, 0.5960114002227783, -0.3616718351840973, 0.13273276388645172, -0.6488638520240784, -0.4204752445220947, -0.3642150461673...
def aggregate ( self, graph, idx ) : if ( int ) ( self. y [ idx ] [ 0 ] ) = = 1 : self. gl1count = self. gl1count + 1 edges = graph. edges for v1, v2 in edges : self. aggrgl1 [ v1 ] [ v2 ] = self. aggrgl1 [ v1 ] [ v2 ] + 1 self. aggrgl1 [ v2 ] [ v1 ] = self. aggrgl1 [ v2 ] [ v1 ] + 1 else : self. gl0count = self. gl0co...
[ -0.2488025277853012, 0.6759583353996277, 0.838448166847229, -0.549811840057373, 0.1462750881910324, -0.3789208233356476, 0.6919164061546326, -0.5778566598892212, 0.741213321685791, 0.12067398428916931, -0.12694162130355835, 0.5484962463378906, -0.24614056944847107, 0.5502735376358032, 0....
def test _ delete _ snapshot _ dep ( self ) : pass
[ -0.3756011128425598, 0.4853333532810211, 0.1861693561077118, 0.9898966550827026, -0.9188785552978516, 0.4757658541202545, 1.4743818044662476, 0.6723842620849609, 1.107668161392212, -1.2499940395355225, -0.9213871955871582, -0.7173885107040405, 0.5445927381515503, 0.7256446480751038, -0.0...
def transport ( self ) - > smartdevicemanagementservicetransport : return self. _ client. transport
[ -0.203414648771286, 0.6371588110923767, 0.15959039330482483, 0.013412833213806152, -0.10943770408630371, 0.1804244965314865, 0.6125839948654175, -1.4180786609649658, 1.249967098236084, -1.6062878370285034, -0.05982337146997452, 0.9888502359390259, -0.2966022789478302, -0.4239887297153473, ...
def draw _ handler ( canvas ) : # # # # # drawing back of board board _ topleft = ( board _ center [ 0 ] - board _ width, board _ center [ 1 ] - board _ height ) board _ topright = ( board _ center [ 0 ] + board _ width, board _ center [ 1 ] - board _ height ) board _ bottomright = ( board _ center [ 0 ] + board _ widt...
[ 0.29562631249427795, 0.37792742252349854, 1.3581916093826294, -0.6449629068374634, -0.3308808207511902, 0.26779505610466003, 0.6288796663284302, 0.031028514727950096, -0.2123045027256012, -0.5409465432167053, -0.5469252467155457, -0.21016991138458252, -0.2122359424829483, -0.25460928678512...
def find _ order ( self ) : graph = dict ( ( k, set ( v ) ) for k, v in list ( self. graph. items ( ) ) ) while graph : # find all items without a parent leftmost = [ l for l, s in list ( graph. items ( ) ) if not s ] if not leftmost : raise valueerror ('dependency cycle detected! % s'% graph ) # if there is more than ...
[ 0.16488617658615112, 0.3294786810874939, 0.811246395111084, 0.42433395981788635, -0.14265239238739014, -0.020628344267606735, 0.12420865148305893, -0.7248581051826477, -0.8353592157363892, 0.39384588599205017, -0.028918683528900146, -0.4427146911621094, -0.22884248197078705, 1.081390380859...
def get _ groups ( self, start, end, logged _ in _ user _ id, access _ token, client _ token, * * kwargs ) : kwargs ['_ return _ http _ data _ only'] = true if kwargs. get ('callback') : return self. get _ groups _ with _ http _ info ( start, end, logged _ in _ user _ id, access _ token, client _ token, * * kwargs ) el...
[ -0.5056394338607788, 0.47636422514915466, 0.7676963806152344, 0.533896803855896, -0.3145804703235626, -0.049329183995723724, -0.4641513228416443, -1.1859043836593628, -0.228944331407547, -0.3929588794708252, 0.5708655118942261, 1.2538806200027466, -0.7284096479415894, -0.05135536566376686,...
def encoderdecodermask ( ) : def f ( decoder _ input, padding _ mask ) : padding _ mask = jnp. reshape ( padding _ mask, ( padding _ mask. shape [ 0 ], 1, 1, padding _ mask. shape [ - 1 ] ) ) # final mask shape is [ batch, 1 for heads, decoder - len, encoder - len ]. return padding _ mask + jnp. zeros ( ( 1, 1, decoder...
[ -0.6466904282569885, 0.4195987582206726, 0.6928917169570923, 0.5789157152175903, -0.6597633361816406, -0.8530255556106567, 0.65516197681427, -0.44522348046302795, 0.2847665250301361, -0.20571818947792053, -0.2639399766921997, 0.8034837245941162, 0.8143287301063538, 0.24181638658046722, 0...
def idcg ( gains, k ) : # put the ranks in an order gains. sort ( ) # invert the list gains = gains [ : : - 1 ] ideal _ dcg = sum ( [ g / log ( j + 2 ) for ( j, g ) in enumerate ( gains [ : k ] ) ] ) return ideal _ dcg
[ 0.13311749696731567, 0.5151844024658203, 0.3253477215766907, -0.1158914566040039, -0.7732661366462708, -0.3559776246547699, -0.9081878662109375, 0.4160940647125244, -0.6274189949035645, 1.2816156148910522, -0.6163697838783264, 0.296998530626297, -0.7541440725326538, 0.29951170086860657, ...
def _ save _ environments ( self, instance, environments ) : # delete serviceenv for missing environments serviceenvironment. objects. filter ( service = instance ). exclude ( environment _ _ in = environments ). delete ( ) current _ environments = set ( serviceenvironment. objects. filter ( service = instance ). value...
[ -0.7357885837554932, -0.38362759351730347, 0.5019657611846924, -0.3923003673553467, 0.717738151550293, 1.0274224281311035, 0.06403844058513641, -0.045100629329681396, -0.14469681680202484, 1.0191583633422852, -0.6784335374832153, -0.31585007905960083, -0.49507176876068115, 1.21312975883483...
def chunks ( l, n ) : for i in range ( 0, len ( l ), n ) : yield l [ i : i + n ]
[ -0.28746387362480164, 0.5728985071182251, 0.39129555225372314, -0.017833421006798744, -0.16806411743164062, 0.5943106412887573, -1.019998550415039, -0.4482986330986023, -0.38011443614959717, -0.7051392793655396, -0.6505395174026489, -0.3429281711578369, 0.0986400693655014, 0.60941970348358...
def get _ expenses _ for _ user ( self, username ) : if username in self. database : return self. database [ username ] else : return { }
[ -1.1722865104675293, 0.31302410364151, 0.24700556695461273, -0.3034147620201111, -0.9567012786865234, -0.4168306887149811, -0.2438373565673828, 0.015371655113995075, -0.1275521069765091, 0.3053109347820282, -1.2720268964767456, -0.803328275680542, -0.3453068733215332, 0.6523629426956177, ...
def test _ invalid _ slug _ handling ( self ) : response = self. client. get ( reverse ('validate - slug - view ', kwargs = {'slug':'lion - the - eric ','pk': 1, } ) ) valid _ url = " / forum / test - valid - slug / eric - the - fish - 1 / " self. assertequal ( response ['location'], valid _ url )
[ -0.36829161643981934, -0.2072591781616211, 0.31265732645988464, 0.2907383441925049, 0.5644786953926086, 0.3135983943939209, 0.6674392819404602, 1.1334812641143799, 0.21904021501541138, -2.0322647094726562, -0.02076531946659088, 0.19269171357154846, -0.2592780590057373, 0.17966891825199127,...