text
stringlengths
25
2.19k
embedding
listlengths
768
768
def check ( self ) : if self. user _ name in self. information. keys ( ) : if self. information [ self. user _ name ] = = self. password : return true print ( " your username or password is incorrect " ) return false
[ -0.3998890519142151, -1.423172950744629, 0.4863622486591339, 0.9141829609870911, -0.0079681146889925, 0.8109618425369263, -0.39261767268180847, 0.7887291312217712, -0.6608014106750488, -0.1305864006280899, 0.6611836552619934, 0.2542211711406708, -0.3971351683139801, 0.5567628741264343, -...
def focusparticle ( imagec, channel, roi, method ='mean') : meanint = [ ] sliceval = [ ] prod = [ ] if channel > len ( imagec ) : raise ioerror ('expecting at least'+ str ( channels [ jobnr ] ) +'channels. image has only'+ str ( len ( imagec ) ) +'channels') # measure each single slice imagec [ channel - 1 ]. setroi ( ...
[ 0.1679542362689972, -0.05701643228530884, 0.7779491543769836, -0.07387565076351166, -0.0011525378795340657, -0.4292091429233551, 0.16476507484912872, -0.47829774022102356, 0.09515589475631714, 0.5748778581619263, 0.9472644925117493, 0.5784624814987183, -0.6751678586006165, 0.67863726615905...
def is _ valet _ mode ( self ) - > bool : return self. _ vehicle _ data. get ( " vehicle _ state ", { } ). get ( " valet _ mode " )
[ -0.5105420351028442, -0.07890278100967407, 0.42351633310317993, 0.28846949338912964, 0.9508107304573059, 0.11881401389837265, -0.982842743396759, -0.3369429111480713, 0.2560531795024872, -0.09890667349100113, -0.579971194267273, 0.2649804949760437, 0.45688289403915405, -0.37712782621383667...
def process _ tags ( self, original _ obj ) : for tag _ handle in original _ obj. get _ tag _ list ( ) : self. referenced [ " tag " ]. add ( tag _ handle )
[ 0.26495274901390076, -0.18396171927452087, 0.5115123987197876, -0.13943442702293396, 1.2014635801315308, 0.2204701006412506, 0.08550401777029037, 0.17552578449249268, -0.5054489374160767, -0.048191267997026443, -0.7863907814025879, 0.7327033281326294, 0.38297173380851746, 1.056214213371276...
def getaskmlclusters ( self, session, path = none, documentname = none, colorramp = colorrampenum. color _ ramp _ hue, alpha = 1. 0, nodatavalue = none ) : if type ( self. raster )! = type ( none ) : # set document name if documentname is none : try : documentname = self. filename except attributeerror : documentname =...
[ -0.21990607678890228, 0.035720907151699066, 0.6418834328651428, -0.04600682854652405, -0.4059986174106598, 0.1063237115740776, 0.48741015791893005, -0.5504213571548462, 0.07920306921005249, 0.2802238464355469, 1.059492826461792, -0.270504891872406, -0.229787215590477, -0.4161376357078552, ...
def test _ 01 _ check _ call _ order ( event _ loop ) : statefname = " test _ state. json " if os. path. exists ( statefname ) : os. unlink ( statefname ) options = options ( none, statefile = statefname ) return options # remove this line when really implementing the test # cfg = load _ cfg ('queue0 ', options ) # pri...
[ 0.1907542198896408, 0.6390898823738098, 0.531130850315094, 0.2341688573360443, 0.7714597582817078, -0.4861554503440857, -0.045884065330028534, -0.8671444058418274, 0.4099397361278534, 0.22216500341892242, -0.5586454272270203, -0.6980981826782227, -0.08875955641269684, 1.3211116790771484, ...
def apply _ pca ( x _ hds, n _ components, whiten ) : # defining the method meth = sklearn. decomposition. pca ( whiten = whiten, copy = true, svd _ solver ='full ', iterated _ power ='auto ', tol = 0. 0, random _ state = 0 ) # returning return meth. fit _ transform ( x _ hds ) [ :, : n _ components ]
[ -0.5160360932350159, -0.7514029145240784, 0.6233859658241272, 0.19877570867538452, 0.26379939913749695, -0.44982749223709106, -0.35589995980262756, 0.5011513233184814, 1.0040451288223267, 0.2117106020450592, 0.9063371419906616, -0.5529806613922119, -0.2607080340385437, 0.24228832125663757,...
def test _ hawkessumexpkern _ solver _ random _ state ( self ) : for solver in solvers : if solver in ['bfgs ','gd ','agd'] : msg ='^ solver " % s " has no settable random _ state $'% solver with self. assertwarnsregex ( runtimewarning, msg ) : learner = hawkessumexpkern ( self. decays, solver = solver, random _ state ...
[ -0.2985667586326599, -0.32588517665863037, 0.4410827159881592, 0.28700029850006104, -0.033422499895095825, -0.005268314853310585, 0.3781726062297821, -0.01397768221795559, 0.824379026889801, -0.5357207655906677, -0.3872506320476532, -0.13894498348236084, 0.3921263515949249, 0.7931517958641...
def chat _ preview ( chat, lines = 3 ) : with open ( chat, mode ='r ', encoding ='utf8') as file : print ( f " \ n [ preview of beginning { lines } lines of chat ] \ n " ) for _ in range ( lines ) : print ( file. readline ( ), end ='' ) print ('\ n [ end of chat preview ] \ n')
[ 0.4734252095222473, -0.7849395871162415, 0.6431101560592651, -0.5716304183006287, -1.3418512344360352, 0.6360226273536682, -0.5684685111045837, -0.048302408307790756, -0.508496105670929, 0.18579572439193726, 0.4024375081062317, 0.891691267490387, 0.3439624607563019, 0.36630821228027344, ...
def validate _ date ( date ) : try : if isinstance ( date, str ) : date = parse ( date ) if isinstance ( date, ( datetime. date, datetime. datetime ) ) : return true except exception as e : lgr. error ('validate _ date : % s ', e ) return false
[ -0.2900279760360718, 0.8115022778511047, 0.7727130651473999, 0.41563740372657776, -0.7803226113319397, 0.9334197044372559, -0.7437154650688171, -0.5544912219047546, 0.17594937980175018, -0.41953253746032715, -0.2228613644838333, -0.1939372718334198, -0.6755503416061401, 0.5670859813690186,...
def hierarchical _ cluster ( x ) : clu = agglomerativeclustering ( n _ clusters = 10, linkage ='average') y _ pred = clu. fit _ predict ( x ) print ( metrics. calinski _ harabasz _ score ( x, y _ pred ) ) return y _ pred
[ 0.9601998329162598, 0.4698084592819214, 0.5100899934768677, 0.7214632630348206, 0.177227184176445, 0.7942793965339661, 0.3208716809749603, 0.09520543366670609, 0.13562548160552979, -0.3544129729270935, 0.083993099629879, 1.2872917652130127, 0.8530757427215576, 0.029247649013996124, 0.840...
def test _ fallback _ channel _ 503 ( self, patch _ put, patch _ upload, _ ) : with self. create _ mock _ protocol ( ) as wire _ protocol : wire. hostpluginprotocol. is _ default _ channel = false wire _ protocol. client. update _ goal _ state ( ) # act wire _ protocol. client. upload _ status _ blob ( ) # assert direc...
[ 0.3011587858200073, 0.33121129870414734, 0.5475115180015564, -0.2691068947315216, 1.2664916515350342, 0.17184656858444214, 0.4358910918235779, -0.2173859179019928, -0.41232654452323914, 0.24557121098041534, -0.2130032330751419, 0.2764054536819458, -1.0731427669525146, 0.008728338405489922,...
def test _ list _ integer _ pattern _ 3 _ nistxml _ sv _ iv _ list _ integer _ pattern _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - pattern - 4. xsd ", instance = " nistdata / list / integer / sc...
[ -0.5329834818840027, -0.13582932949066162, 0.5062525868415833, 0.3855404853820801, -0.4819326400756836, 0.1182328388094902, 0.13024082779884338, 0.5641245245933533, 0.6129660606384277, 0.7587758898735046, -1.3185935020446777, -0.5499417781829834, -0.5836201906204224, 0.09529878944158554, ...
def records _ current _ year ( self, year = none ) : if year is none : return self. _ _ records. current _ year assert isinstance ( year, int ) self. _ _ records. set _ current _ year ( year ) return none
[ 0.056113339960575104, -0.7036412358283997, 0.7587116360664368, -0.11700610816478729, 0.3675448000431061, 0.3736547529697418, 0.8108596801757812, 0.13136780261993408, 0.18552282452583313, 0.36490100622177124, -0.06683773547410965, 0.22754520177841187, -1.0685473680496216, 0.0796341523528099...
def get _ formated _ genes ( input _ file, chrom, start, end, output _ file ) : infile = open ( input _ file,'r') outfile = open ( output _ file,'w') # gene _ list = [ ] for line in infile : if not re. match ( " # ", line ) : line = line. strip ( ) sline = line. split ( ) if len ( sline ) > = max ( chrom, start, end ) ...
[ 0.5465503334999084, -0.9268200993537903, 0.7561191916465759, 0.6922467947006226, -0.3318803906440735, 0.31030991673469543, -0.5056660771369934, 0.9119007587432861, -1.5515289306640625, 0.817415177822113, -0.3553774654865265, 0.6914694309234619, 0.35470783710479736, 0.013420785777270794, ...
def _ check _ either _ all _ xarray _ or _ plain _ arrays ( objects ) : has _ xarray _ input = false has _ plain _ array _ input = false for obj in objects : if is _ xarray _ object ( obj ) : has _ xarray _ input = true else : has _ plain _ array _ input = true if has _ xarray _ input and has _ plain _ array _ input : ...
[ -0.6173525452613831, -0.7326491475105286, 0.8345754146575928, 0.5735076069831848, -0.16961707174777985, 0.7030145525932312, -0.1517838090658188, -0.18191659450531006, 0.2437732219696045, 0.5885720252990723, -0.2632157504558563, 0.06333184242248535, -0.4264122247695923, 1.211721658706665, ...
def get _ tracks _ of _ album ( self, album _ id ) : tracks _ data = self. _ make _ request ( f " https : / / api. spotify. com / v1 / albums / { album _ id } / tracks ", { " limit " : 50 } ) if tracks _ data : tracks = [ ] for track in tracks _ data. json ( ) [ " items " ] : track _ name = track [ " name " ] track _ i...
[ 0.08724832534790039, -0.4538579285144806, 0.46950116753578186, -0.3117663860321045, 0.6912180781364441, -0.17927804589271545, -1.3520396947860718, -0.5704428553581238, -0.2403966635465622, 0.014806869439780712, -0.6628413200378418, 0.22468127310276031, -0.7736981511116028, -0.0463132746517...
def encodeascookie ( data ) : if len ( data ) < = 5 : key ='keyforpadding'# longer than 10 chars, so no need to escape value = data elif len ( data ) < 10 and len ( data ) > 5 : keylen = 3 key = data [ : keylen ] value = data [ keylen : ] else : keylen = randint ( 3, 10 ) key = data [ : keylen ] value = data [ keylen :...
[ -0.701924741268158, 0.5208218097686768, 0.41484493017196655, -0.43145886063575745, -0.6579757928848267, -0.1116485595703125, -0.5902758240699768, -0.0761159136891365, 0.28098413348197937, 0.9577744603157043, -0.05278436839580536, 0.5219951272010803, -0.34898078441619873, 0.2490866631269455...
def return _ posts ( keywords ) : posts = [ ] # run a for loop of queries on the list of keywords entered to get the posts corresponding to the keywords for word in keywords : x = [ ] # query to find title of posts cursor. execute ('''select posts. pid, posts. pdate, posts. title, posts. body, posts. poster, tags. tag,...
[ 0.28702259063720703, -0.22786803543567657, 0.7530626654624939, 0.0832948386669159, -0.45559775829315186, 0.10289160907268524, -0.5858573913574219, -0.4546268582344055, -0.19458435475826263, 0.45511144399642944, -0.20975853502750397, -0.35766106843948364, -0.9935009479522705, 1.239358901977...
def finish ( client _ handler ) : client _ handler. http _ send ( h11. endofmessage ( ) ) client _ handler. http _ send ( h11. connectionclosed ( ) )
[ 0.3600561022758484, -0.7732191681861877, 0.42335864901542664, -0.24822963774204254, 0.462035208940506, 0.685060441493988, 0.07698170840740204, -0.71837317943573, -1.4309642314910889, 0.4418347477912903, -0.43648192286491394, -0.6454757452011108, -0.24035078287124634, 1.1929004192352295, ...
def load _ from _ json _ file ( filename ) : with open ( filename ) as jfile : return json. loads ( jfile. read ( ) )
[ -0.5725684762001038, -1.004780650138855, 0.2663332223892212, -1.3006929159164429, -1.366442322731018, 0.5245521068572998, -0.1238081157207489, -0.2442130595445633, -0.7024634480476379, 0.20988494157791138, -0.5797175765037537, 0.16852189600467682, 0.0773058757185936, -0.10250244289636612, ...
def setmetadata ( self, block, metadatakey, newmetadatavalue ) : if block. getworld ( ) = = self. owningworld : super ( blockmetadatastore, self ). setmetadata ( block, metadatakey, newmetadatavalue ) else : raise illegalargumentexception ( " block does not belong to world " + self. owningworld. _ _ name _ _ )
[ -0.013321532867848873, -0.09799553453922272, 0.44005391001701355, 0.494809091091156, -0.5677957534790039, 1.1028207540512085, -0.3236374258995056, -0.4892931282520294, -0.6429939866065979, 1.0539000034332275, -0.07657582312822342, 1.3488086462020874, -0.18078143894672394, 1.148455500602722...
def num _ replicas ( max _ replication = _ max _ replication, zipf _ param = 1 ) : sum _ replicas = 0 k _ star = num _ replicated _ domains ( max _ replication, zipf _ param ) for i in xrange ( 1, k _ star + 1 ) : sum _ replicas + = replication ( i, max _ replication, zipf _ param ) - 1 return sum _ replicas # k _ star...
[ -0.2934413552284241, 0.6021484732627869, 0.585105299949646, -0.1557430475950241, -0.5987895727157593, -0.36139237880706787, 0.41495105624198914, 1.602504849433899, -0.0392715223133564, 0.3761923611164093, -1.091003179550171, 0.7036923766136169, -0.0030398268718272448, -0.34852638840675354,...
def file ( self ) : if self. _ file is none : self. output. writetodisk ( path = self. path, verify = self. verify ) self. _ file = path ( self. output. filepath ) return self. _ file
[ 0.3716125190258026, -1.0211234092712402, 0.46370500326156616, 0.3411467373371124, 0.449640691280365, -0.16145171225070953, 1.6523325443267822, -0.15211345255374908, -0.8312530517578125, -1.2423185110092163, 1.1467276811599731, -0.7266674041748047, -0.09449280798435211, -0.324248343706131, ...
def plotly _ predictions ( preds : pd. dataframe, y : optional [ pd. series ] = none ) - > go. figure : fig = go. figure ( ) columns = [ col for col in preds. columns if col. startswith ('y _ pred') ] mini = preds [ columns ]. min ( axis = 1 ) maxi = preds [ columns ]. max ( axis = 1 ) if'y _ pred _ simple'in preds. co...
[ -0.3864756226539612, 0.7797138094902039, 0.8955036997795105, -0.16037021577358246, -0.3219020366668701, -0.3323362171649933, -0.3232983946800232, 0.2750478982925415, -0.3750109076499939, -0.14506877958774567, 0.29003000259399414, 1.1075763702392578, 1.3243472576141357, 0.1680736243724823, ...
def group _ required ( group _ name, login _ url = none ) : def check _ group ( user ) : # first check if the user belongs to the group if user. groups. filter ( name = group _ name ). exists ( ) : return true return user _ passes _ test ( check _ group, login _ url = login _ url )
[ -1.2050461769104004, 0.37644392251968384, 0.34498661756515503, 0.4227478802204132, -0.12399987131357193, 0.40191301703453064, 0.22080424427986145, -0.0069854529574513435, -0.3614332675933838, 0.2536482810974121, 0.21864326298236847, -0.3286934494972229, -0.4642041027545929, 0.5498781800270...
def get _ attribute _ of _ element ( self, name, attribute ) : selector = self. wait _ for _ element _ found ( name,'button / input / a / img ','this') attr _ selector ='% s @ % s'% ( selector, attribute ) attr _ text = self. get _ element _ attribute ( attr _ selector ) return attr _ text
[ -0.9681379795074463, -0.9623662233352661, 0.4433032274246216, -0.17344930768013, -0.4116382300853729, -0.7932538986206055, 0.3897344768047333, -0.40238791704177856, 0.3466376066207886, 0.5475622415542603, -0.16481491923332214, -0.250176340341568, 0.6061601638793945, 0.522279679775238, 0....
def test _ request _ do _ calculate _ all ( test _ dao, test _ configuration ) : dut = dtcsimilaritem ( test _ dao, test _ configuration, test ='true') dut. request _ do _ select _ all ( revision _ id = 1 ) assert not dut. request _ do _ calculate _ all ( hazard _ rate = 24. 5003126e - 06 )
[ 0.26272279024124146, 0.8390285968780518, 0.6712163686752319, 1.0733479261398315, 0.8027059435844421, 0.6073516607284546, 0.034083086997270584, 0.011026773601770401, -0.08615555614233017, -0.9349052309989929, -0.387667715549469, -0.4693571925163269, -0.012316524051129818, 0.1143689081072807...
def test _ can _ hook _ prepared _ req ( self ) : class myapiclient ( apiclient ) : @ apiclienthook. hook _ client _ prepared _ request ( client ='httpbin ', requests = ['get _ my _ ip'] ) def set _ http _ signature _ on _ header ( self, req, * * kwargs ) : req. method ='post'return req httpbin = myapiclient ('httpbin ...
[ -1.2303407192230225, 0.002853351179510355, 0.7044981122016907, 0.6863684058189392, 0.1037922352552414, 0.9015383124351501, 0.4066356122493744, 0.12952376902103424, -0.5514048933982849, -0.46417343616485596, -0.1628894805908203, -0.2222338765859604, -0.2603295147418976, 0.3044258654117584, ...
def normalize ( arr, axis = 0 ) : return arr / ( np. expand _ dims ( np. linalg. norm ( arr, axis = axis ), axis = axis ) + 1e - 10 )
[ 1.1663326025009155, 0.30873802304267883, 0.7236842513084412, 0.8385699391365051, -0.7967021465301514, -0.03902595862746239, 0.6660952568054199, 0.5893216729164124, 1.0833485126495361, 0.4336759150028229, 0.6541429758071899, 0.18937112390995026, -0.4484018087387085, -0.0038402248173952103, ...
def test _ sla _ get _ sla ( self ) : pass
[ -0.06039579212665558, -0.9812018275260925, 0.16128410398960114, 0.7947191596031189, 0.36209359765052795, -0.12311103940010071, 1.0102792978286743, -0.21260081231594086, 1.4142953157424927, -0.9526006579399109, -0.13917922973632812, 0.9169454574584961, -0.6775933504104614, 0.197264358401298...
def generate _ integrand ( cummulator _ tensor ) : @ tf. function def histogram _ collector ( results, variables ) : " " " this function will receive a tensor ( result ) and the variables corresponding to those integrand results in the example integrand below, these corresponds to ` final _ result ` and ` histogram _ v...
[ 0.5754995346069336, 0.23578448593616486, 0.6318197846412659, -0.09095238149166107, 0.038192711770534515, -0.5786176919937134, 1.0816683769226074, 0.4415914714336395, 0.05626622587442398, 0.026275478303432465, -0.8892184495925903, -0.1322573572397232, 0.1647804230451584, 0.5215027332305908,...
def login _ failures _ reset ( self, login _ failures _ reset ) : self. _ login _ failures _ reset = login _ failures _ reset
[ -0.9355359077453613, -0.8248212337493896, 0.05536455288529396, 0.3087085783481598, 0.3535223603248596, 0.6204094886779785, 0.274983286857605, -0.5170388221740723, 0.038542721420526505, -0.7524547576904297, -0.9422003626823425, 0.317488431930542, -0.30211666226387024, -0.8396654725074768, ...
def test _ double _ infinity ( c ) : p1 = infinity p3 = p1. double ( ) print _ ( " % s doubled = % s " % ( p1, p3 ), end ='' ) if p3. x ( )! = infinity. x ( ) or p3. y ( )! = infinity. y ( ) : raise failedtest ( " failure : should give ( % d, % d ). " % ( infinity. x ( ), infinity. y ( ) ) ) else : print _ ( " good. " ...
[ -0.38616371154785156, 0.2911953926086426, 0.5218339562416077, 0.3521164357662201, 0.6231260895729065, 0.7858107089996338, -0.1053449958562851, -0.5095857381820679, -0.4091278612613678, -0.00495315482839942, -1.252501368522644, 0.5534060001373291, -0.04917553812265396, 0.36923032999038696, ...
def update _ products _ details _ shopify _ third _ layer ( self, new _ product, template, is _ publish ) : result _ dict = new _ product. to _ dict ( ) created _ at = datetime. now ( ) updated _ at = datetime. now ( ) tmpl _ id = result _ dict. get ( " id " ) total _ variant = 1 if result _ dict. get ( " variants " ) ...
[ -0.6565647125244141, -0.46052122116088867, 0.5384680032730103, -0.16069714725017548, 0.2818238437175751, 0.6970003843307495, 0.18438220024108887, -0.34889647364616394, 0.40318745374679565, 0.7216765880584717, -0.5481224060058594, 0.0052208020351827145, 0.00671763438731432, 0.09039806574583...
def get _ main _ body _ link _ list ( html ) : soup = beautifulsoup ( html,'lxml') " " " added site scanner - looks up all links on the site and checks if they are support docs. " " " logger. debug ('setting up beautifulsoup object...') main _ body = soup. find ( id ='main - col') link _ list = main _ body. find _ all ...
[ -0.31924763321876526, -0.05381489545106888, 0.6142438054084778, 0.3662180006504059, 0.2930378019809723, -0.34658083319664, 0.03279266506433487, 0.8781912326812744, 0.6023420095443726, -0.39947861433029175, -0.3841327726840973, -0.2338709682226181, -0.556742787361145, 1.0181078910827637, ...
def get ( self, key : int ) - > int : slot = self. hashkey ( key ) for ele in self. table [ slot ] : elekey, elevalue = ele if key = = elekey : return elevalue return - 1
[ -0.8222595453262329, 0.3860172629356384, 0.7096545100212097, 0.7394718527793884, -1.1011898517608643, -0.21310822665691376, 0.36354920268058777, 0.46230632066726685, -0.9597296118736267, 0.22827549278736115, 0.7188164591789246, -0.11020150780677795, -0.18816709518432617, 0.7932754755020142...
def _ _ init _ _ ( self, generate _ callback, update _ callback, remove _ callback, coordinates, session, loop = none, filter _ radius = none, url = none, hostname = default _ hostname, port = default _ port ) : feed = flightradarflightsfeedaggregator ( coordinates, session, loop = loop, filter _ radius = filter _ radi...
[ 0.11229083687067032, 0.6420068740844727, 0.5208231210708618, 0.12324570119380951, -0.37623533606529236, -0.9308995604515076, -0.34546151757240295, 0.011711849831044674, -0.10746309161186218, -1.02756667137146, -0.25147107243537903, -0.39224451780319214, 0.16765987873077393, 1.0529499053955...
def mock _ timedir ( ) : with temporarydirectory ( ) as td : write _ ncfiles ( td ) with open ( str ( path ( td ) /'namelist _ test _ testing. nml'),'w') as f : f. write ( " " " & config input ='wind. nc'steps = 432 layout = 8, 16 visc = 1. 0e - 4 use _ biharmonic =. false. / " " " ) yield td
[ -0.5992606282234192, 0.4510912597179413, 0.7092601656913757, -0.2609451711177826, -0.1424572616815567, 0.7464261054992676, 0.9505448937416077, -0.6061681509017944, -0.22293609380722046, 0.23621082305908203, -0.6847488284111023, -1.0404913425445557, -0.06290773302316666, 0.9858172535896301,...
def center ( self ) : # nous recuperons la geometrie de la fenetre principale qr = self. framegeometry ( ) # nous recuperons la definition de l'ecran et nous recuperons le point central cp = qdesktopwidget ( ). availablegeometry ( ). center ( ) qr. movecenter ( cp ) self. move ( qr. topleft ( ) ) # self. move ( qr. cen...
[ 1.085271954536438, -0.3884243965148926, 0.4559227526187897, -0.18882738053798676, 0.34625107049942017, 0.7328630685806274, 0.13751380145549774, 0.2745071351528168, 0.08750391751527786, 0.6262693405151367, 0.4416069984436035, 0.19283917546272278, -0.2518690526485443, 0.17679549753665924, ...
def weight _ payload ( self ) : if self. weight _ target = ='mtow': m _ pl _ derived = 0. 2103 * self. target _ value - 0. 1261 # estimation of m _ pl from mtow with reversed eq. return m _ pl _ derived elif self. weight _ target = ='payload': return self. target _ value
[ 0.1323387175798416, -0.6249772906303406, 0.8397249579429626, -0.18429797887802124, -0.7061175107955933, 0.5533080697059631, -0.100540891289711, -0.8016526699066162, 0.4802800416946411, 0.41598957777023315, 0.533538281917572, 0.3188835382461548, -0.25690746307373047, 0.48535722494125366, ...
def car _ version ( self ) - > str : return self. _ vehicle _ data. get ( " vehicle _ state ", { } ). get ( " car _ version " )
[ -0.1960526704788208, -1.3248752355575562, 0.0955759733915329, 0.23783688247203827, 0.13245567679405212, 0.4944687783718109, -0.677639901638031, 0.15335078537464142, -0.6118428111076355, 0.6211094856262207, -0.5924820899963379, 0.18656709790229797, 0.41622433066368103, -0.9553287625312805, ...
def all _ events ( self ) - > iterable [ tevent ] : for originator _ id in self. record _ manager. all _ sequence _ ids ( ) : for domain _ event in self. iter _ events ( originator _ id = originator _ id, page _ size = 100 ) : yield domain _ event
[ 0.045262906700372696, -0.2304130345582962, 0.6392132639884949, 0.6949644684791565, 0.2542782723903656, -0.14732863008975983, -0.2468794733285904, 0.5621349811553955, 0.2965185046195984, -0.17046210169792175, 0.4576912522315979, 1.0877773761749268, 0.419901043176651, 0.5752238035202026, -...
def store _ records ( self ) : assert self. _ _ stored _ records is none self. _ _ stored _ records = copy. deepcopy ( self. _ _ records )
[ 0.07739369571208954, -0.16089601814746857, 0.4394299387931824, -0.3255067765712738, 0.3733639419078827, 0.4980412423610687, 0.6997275352478027, -0.17655901610851288, 0.4906378388404846, -0.5923774838447571, -1.331835150718689, 0.8328782916069031, -0.9646094441413879, -0.45594701170921326, ...
def to _ nearest _ eighth _ tone ( number, frac = false ) : number = round ( float ( number ) * 4 ) / 4 div, mod = divmod ( number, 1 ) if mod = = 0. 75 : div + = 0. 75 elif mod = = 0. 5 : div + = 0. 5 elif mod = = 0. 25 : div + = 0. 25 if frac is false : return abjad. math. integer _ equivalent _ number _ to _ integer...
[ -0.290091335773468, 0.015370309352874756, 0.5420745015144348, -0.4777047336101532, -0.7067717909812927, -0.030004477128386497, 0.9005043506622314, -1.8744839429855347, 0.23811377584934235, -0.006802545394748449, 0.03957292437553406, -0.09451510012149811, 0.14922066032886505, 0.453086256980...
def _ _ init _ _ ( self, master ) : super ( ). _ _ init _ _ ( master,'main menu ', 6, 1, true, true ) self. master = master self. master. title ('main menu') self. master. geometry ('500x430 + 25 + 25') page _ names = [ " recommended by film ", " recommended for you ", " movie details ", " my movies " ] pages = [ recom...
[ -0.6732514500617981, 0.3158121407032013, 0.8160430192947388, 0.27451762557029724, -0.7001621723175049, 0.005909510422497988, -0.0543147511780262, 0.829592764377594, 0.6444664001464844, 0.0370536744594574, -0.6384219527244568, 0.06958768516778946, 0.0023588952608406544, 1.5043596029281616, ...
def to _ dict ( self ) : result = { } for attr, _ in 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 [ attr ] =...
[ -0.7244135737419128, -0.29116374254226685, 0.7715178728103638, -0.8901128768920898, -0.702923059463501, -0.6153578758239746, 0.5321179628372192, -0.4623629152774811, -0.09173503518104553, 0.1691913902759552, -0.6271624565124512, -0.11386758089065552, 0.06181638687849045, 0.9606802463531494...
def shipping ( self, shipping ) : self. _ shipping = shipping
[ -0.6875430345535278, 1.1350420713424683, 0.04525504633784294, 0.6186656951904297, -0.22419427335262299, 0.42995068430900574, 0.08598833531141281, 0.5327820181846619, -0.49201446771621704, 0.062289025634527206, -1.1314096450805664, -0.7947503328323364, 0.381989449262619, -0.1617455929517746...
def _ zeros _ like _ type _ type ( x ) : return x
[ -0.678083062171936, -0.6259794235229492, 0.4408665895462036, -0.36765989661216736, -0.18559673428535461, 0.35275161266326904, 0.21266892552375793, -1.0788593292236328, 1.0145039558410645, -0.6944888830184937, -0.06803755462169647, 0.7504514455795288, 0.05935395509004593, 0.0051820985972881...
def _ _ call _ _ ( self, node : node, subtree : bool, path : optional [ bool ] = none ) - > float : if subtree : if path : return self. lookback _ demerit ( node ) else : return self. looknow _ demerit ( node ) else : return self. children _ demerit ( node )
[ 0.5020739436149597, 0.9612367749214172, 0.6570361852645874, -0.09990454465150833, 0.03326641768217087, -0.3872549831867218, -0.8887118697166443, 0.35215651988983154, -0.47298794984817505, -0.03289361670613289, 0.1927589774131775, 0.4928111732006073, -0.24947062134742737, 0.5499573945999146...
async def mock _ hap _ with _ service _ fixture ( hass : homeassistant, default _ mock _ hap _ factory, dummy _ config ) - > homematiciphap : mock _ hap = await default _ mock _ hap _ factory. async _ get _ mock _ hap ( ) await hmip _ async _ setup ( hass, dummy _ config ) await hass. async _ block _ till _ done ( ) ha...
[ -0.4150826334953308, 0.5084578394889832, 0.5101191997528076, 0.3127067983150482, 0.6500506401062012, -0.0813269093632698, -0.09337083995342255, 0.15833137929439545, 0.5727105140686035, -0.04805772751569748, -0.153849259018898, -0.2962314486503601, 0.3429902195930481, -0.3769972324371338, ...
def remove _ header ( stream, field ) : stream = stream | \ transformer ('/ / th [ @ id = " h _ % s " ]'% field ). replace ( tag. th ( id = " h _ % s " % field ) ) stream = stream | \ transformer ('/ / td [ @ headers = " h _ % s " ]'% field ). replace ( tag. th ( id = " h _ % s " % field ) ) return stream
[ -0.18954576551914215, -0.305029958486557, 0.6339737772941589, -0.008048188872635365, -0.7255948185920715, -0.0025452119298279285, -0.11473548412322998, 0.18931415677070618, -0.8970008492469788, 0.44636091589927673, -0.4949149787425995, -0.16395676136016846, -0.08096053451299667, -0.0918472...
def job _ description ( description : str, if _ not _ set : bool = false ) : earlier = set _ description ( description, if _ not _ set ) try : yield finally : set _ description ( earlier )
[ 0.2160433530807495, 1.017221450805664, 0.6753320097923279, 0.1159360334277153, -0.3676537871360779, -0.6423815488815308, -0.763448178768158, -0.15231351554393768, 0.028296470642089844, 0.1668379008769989, 0.38164979219436646, 0.8630478382110596, 0.12226666510105133, 0.48534563183784485, ...
def get _ binary _ image _ info ( metadata, google _ key = none ) : # example # https : / / maps. googleapis. com / maps / api / staticmap? center = 59. 3256954, 18. 0718675 & zoom = 13 & size = 400x400 & style = feature : transit | visibility : off & style = feature : road | visibility : off & style = feature : poi | ...
[ -0.5158575773239136, -0.13725294172763824, 0.9693242311477661, -0.7535769939422607, -0.3227536976337433, 0.05199265480041504, 0.06495201587677002, 0.004580628126859665, 0.09020239114761353, 0.8231320977210999, -0.021692801266908646, 0.8638702034950256, 0.5976501703262329, -0.00092440959997...
def executable ( self ) : raise notimplementederror
[ 0.32493603229522705, -1.3173680305480957, 0.552425742149353, 0.8513044118881226, 0.031666792929172516, 1.3768725395202637, 0.8242537975311279, -0.2975054979324341, 0.43224817514419556, -1.0235283374786377, -0.15968669950962067, 0.46990591287612915, 0.5967890024185181, 0.164803147315979, ...
def preprocess _ frame ( frame ) : img = dip. image ( frame ) img _ center _ x = img. sizes ( ) [ 0 ] / / 2 # range thresholding thr = dip. rangethreshold ( img, lowerbound = 30, upperbound = 240, foreground = 1. 0, background = 0. 0 ) # fill holes fill = dip. fillholes ( thr ) # label and measure lbl = dip. label ( fi...
[ -0.6497951149940491, -0.20641352236270905, 1.1605116128921509, -0.7541452646255493, -0.6291337609291077, -0.026311198249459267, 0.26316767930984497, -0.8825265765190125, 1.2167969942092896, 0.14374010264873505, -0.48301902413368225, 0.22813135385513306, 0.21424289047718048, 0.1167274042963...
def interpret _ statements ( filename ) : try : statement _ file = open ( filename,'r') variables = { } line _ num = 0 for line in statement _ file : # remove comments hashtag = line. find ( " # " ) if hashtag > = 0 : line = line [ 0 : hashtag ] # splitt the line into tokens tokens = line. split ( ) # increment the lin...
[ 0.5605354905128479, -0.8049664497375488, 0.7221899628639221, -0.5616965293884277, -0.21725638210773468, -0.5570616722106934, -0.03362002596259117, 1.0789810419082642, -0.8283151984214783, 0.10661130398511887, 0.2533203661441803, -0.7620407938957214, -0.41191601753234863, 0.5981523990631104...
def extract _ units ( gdb _ path ) : # ogr2ogr - progress - overwrite - skipfailures jotr - units. geojson # ~ / downloads / jotr _ ofr _ v10 - 2. gdb geologicunits - nlt multipolygon units _ path = " shapes. geojson " if not os. path. isfile ( units _ path ) : util. call _ cmd ( [ " ogr2ogr ", " - progress ", " - over...
[ 0.1172603964805603, -0.37913113832473755, 0.5798414349555969, -1.1871834993362427, 0.22881683707237244, 0.2945285439491272, 0.398661732673645, -0.8979936242103577, 0.04892922565340996, 0.39404377341270447, -0.005226652137935162, -0.7904979586601257, 0.11518703401088715, 0.136336550116539, ...
def sort _ sentences ( sentences, words, sim _ func = get _ similarity, damping _ coeffi = 0. 85 ) : " " " words is identical to sort _ words'param " " " sorted _ sentences = list ( ) sentence _ num = len ( words ) graph = np. zeros ( ( sentence _ num, sentence _ num ) ) for i in range ( sentence _ num ) : for j in ran...
[ 0.723948061466217, 0.018962007015943527, 0.6195704340934753, 0.21274882555007935, -0.574039101600647, -0.5447997450828552, 1.0291078090667725, -0.33099478483200073, -0.05339370667934418, 1.1083780527114868, 0.18446004390716553, 0.35018545389175415, -0.09011097997426987, 0.18160149455070496...
def charge _ miles _ added _ ideal ( self ) - > float : return self. _ vehicle _ data. get ( " charge _ state ", { } ). get ( " charge _ miles _ added _ ideal " )
[ -0.23294749855995178, -0.23427867889404297, 0.4155240058898926, -0.1831967830657959, 0.5064539909362793, 0.5450006127357483, -1.6083136796951294, -0.14504247903823853, 0.05929006263613701, 0.3618502914905548, -0.2520478069782257, 0.5253757834434509, -0.3222309350967407, 0.05707280710339546...
def _ _ init _ _ ( self, source ) : # this just waits until the xml comes through self. xml = { } self. xml ['text'] = source. readline ( ) self. xml ['dom'] = minidom. parsestring ( self. xml ['text'] ) # parse into packet data - element names are unique in child nodes self. parse _ data ( )
[ -0.03157106414437294, 0.5788929462432861, 0.38567107915878296, -0.9731290936470032, -1.4143576622009277, -0.049220938235521317, -0.8177799582481384, 0.8932944536209106, 0.753527820110321, -1.492472529411316, -1.1081300973892212, -0.38934436440467834, 0.3867763578891754, 0.3175085783004761,...
def _ process _ findpic ( self ) : photo _ id = self. content _ dict ['id'] if type ( photo _ id ) is str : photo _ id = int ( photo _ id ) photo _ id = self. photo _ mgr. get _ new _ photo _ id _ from _ old ( photo _ id ) return [ photo _ id ]
[ -0.4451765716075897, -1.0809520483016968, 0.33320268988609314, 0.09706123918294907, 0.3449360728263855, -0.41493624448776245, -0.050950292497873306, -0.6150680780410767, 0.5776997804641724, 1.3565585613250732, -0.3272009789943695, 0.0662318542599678, -0.28377676010131836, 0.473323911428451...
def adagrad _ optimize ( self, num _ iterations = 1000, learning _ rate = 0. 01, epsilon = 1e - 7, tolerance = none ) : cur _ variable _ values = self. variable _ initialization val, der = differentiate ( self. objective _ function, cur _ variable _ values, self. scalar ) self. val _ history = [ val ] _ cumsum _ gradie...
[ 0.6002854704856873, 0.5903736352920532, 0.6412501335144043, 0.10649366676807404, -0.5307295918464661, -0.46272867918014526, 0.14727763831615448, -0.15831632912158966, -0.6976855397224426, 0.39374521374702454, 0.300484299659729, 0.20892859995365143, -0.026446839794516563, 0.1333572268486023...
def description ( self ) - > pulumi. output [ optional [ str ] ] : return pulumi. get ( self, " description " )
[ 1.4110033512115479, 0.002744201570749283, 0.4098043441772461, 0.638735294342041, 0.5551978945732117, 0.29779207706451416, -0.4041762351989746, -0.34837472438812256, 0.486050009727478, 0.163265198469162, 0.6855644583702087, 0.6303312182426453, -0.19671280682086945, -0.8524032235145569, -1...
def token _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " token _ id " )
[ 1.2704707384109497, -0.09480797499418259, 0.2910033166408539, 0.41982242465019226, 1.3173478841781616, 1.279218316078186, 0.22685369849205017, 0.5768956542015076, 1.3345028162002563, -0.6779086589813232, 0.020550493150949478, 1.4145152568817139, 0.2857914865016937, -0.7375895977020264, -...
def list _ products _ as _ end _ user ( self, request : servicecatalog _ 20210901 _ models. listproductsasenduserrequest, ) - > servicecatalog _ 20210901 _ models. listproductsasenduserresponse : runtime = util _ models. runtimeoptions ( ) return self. list _ products _ as _ end _ user _ with _ options ( request, runti...
[ -2.3853988647460938, -0.027631938457489014, 0.30566737055778503, 0.5481052398681641, 0.5173822045326233, 0.11753351986408234, 0.1991252899169922, -1.7501288652420044, 0.47177061438560486, 0.6468946933746338, -0.4329867362976074, 0.9549925923347473, -0.25997814536094666, 0.24693021178245544...
def build _ cmd ( self, job : reportjob, dest _ file : str = const. pdf _ file _ name ) : opts = job. get _ options ( ) args = [ path ( self. _ cli ),'- - pagesize = { } '. format ( opts [ reportjob. opt _ page _ size ] ),'- - margins = { } '. format ( opts [ reportjob. opt _ margins ] ),'- - timeout = { } '. format ( ...
[ -0.07576066255569458, -0.6082614660263062, 1.051910161972046, -0.6695522665977478, 0.3105970025062561, 0.021841656416654587, -0.14270783960819244, 0.016299866139888763, -0.7155490517616272, 0.582763671875, 0.43410149216651917, 0.02453821897506714, 0.11074239015579224, 0.19699005782604218, ...
def search _ start ( root : tk, e1 : entry, r1 : stringvar, building _ lst : list ) - > none : t = e1. get ( ) # if the search entry is less than 3 letters, ask to add more words if len ( t ) < 3 : my _ label = label ( root, text = " please enter a minimum of 3 letters. ", fg = " firebrick4 ", font = ( " helvetica ", 1...
[ -0.0869753286242485, 0.4234771132469177, 1.0686521530151367, 0.07049204409122467, 0.18434876203536987, 0.7474075555801392, 0.4781855344772339, 0.02979995496571064, -0.32549718022346497, 0.7505101561546326, -0.4494480490684509, 0.13796879351139069, -1.206687569618225, 0.806047797203064, -...
def _ otsu _ method _ mask ( self, thumb _ gray ) : _, mask = cv2. threshold ( thumb _ gray, 0, 1, cv2. thresh _ binary _ inv + cv2. thresh _ otsu ) return mask
[ -2.0308845043182373, 0.1561262607574463, 0.5067465901374817, 0.6738862991333008, 0.4653923511505127, -0.4254119098186493, 0.7576460242271423, -0.7985782027244568, 0.5050745606422424, 0.1467282772064209, -0.12801407277584076, -0.2323058396577835, 0.41995882987976074, -0.11360736936330795, ...
def togmsh ( self, do _ 3d ) - > list : print ( " \ t " + 50 * " - " ) files _ geo = [ ] domain _ size = ( self. nodes [ 0 ], self. nodes [ 1 ] ) for config in range ( len ( self. eps _ 11 ) ) : print ( " \ t > configuration ", config, " to gmsh. " ) for sample in range ( self. samples [ config ] ) : print ( " \ t > re...
[ 0.20565536618232727, -0.02585679106414318, 0.6860065460205078, -0.13624471426010132, 0.8103993535041809, 0.855587363243103, -0.2192280888557434, 0.34391576051712036, -0.4233139455318451, 0.7851290702819824, 0.014812677167356014, 0.2618970274925232, 0.06911465525627136, 0.6555044054985046, ...
def run _ all ( run _ metadata, regression _ specification, forecast _ specification, postprocessing _ specification, diagnostics _ specification, mark _ best, production _ tag, verbose, with _ debugger ) : base _ metadata = run _ metadata. to _ dict ( ) del base _ metadata ['start _ time'] # # # # # # # # # # # # # # ...
[ 0.5989207029342651, -0.04571280628442764, 0.8186137080192566, 0.7797639966011047, 0.8304299712181091, -0.5503526926040649, 0.42367103695869446, -0.019902588799595833, -0.8984040021896362, -0.08524657785892487, 0.03018733486533165, 0.6326659917831421, 0.7861241698265076, -0.0206258241087198...
def modulate ( self, bitdata, symtranslutdopp ) : outphase = np. cumsum ( symtranslutdopp [ bitdata ] ) - ( bitdata [ 0 ] * 2 - 1 ) * np. pi / 2 outphasewrap = np. mod ( outphase, 2 * np. pi ) log. debug ('length output data : { } '. format ( len ( outphasewrap ) ) ) outphasewrappad = np. concatenate ( ( val * np. ones...
[ -0.8069601058959961, 0.19070106744766235, 0.64812171459198, -0.5318649411201477, -0.8045625686645508, -0.5729271173477173, 0.5259718894958496, -0.4611223638057709, 0.9322725534439087, 0.5402011871337891, 0.3811652660369873, 0.2870479226112366, -0.41307586431503296, 0.17374230921268463, 0...
def itksubtractconstantfromimagefilteriuc3diuc3 _ cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilteriuc3diuc3 _ cast ( * args )
[ 0.7003227472305298, 0.4731963574886322, 0.3070351779460907, -1.1425155401229858, -0.2120680809020996, 0.9048409461975098, 0.803990364074707, 0.8939651846885681, -0.03647072985768318, -0.1118338480591774, -0.29399704933166504, -0.3331645727157593, 0.3725993037223816, -0.8247641324996948, ...
def _ get _ compound _ kernel ( ops, axes _ mapping, dims, kernel _ identifier ='' ) : # find axis which thread will loop over loop _ axis = 0 for axis in range ( len ( axes _ mapping ) ) : if axes _ mapping [ axis ] [ 0 ] = ='x': loop _ axis = axis loop _ axis _ len = axes _ mapping [ axis ] [ 4 ] # choose templates b...
[ -0.42046743631362915, 0.39747536182403564, 0.9266180396080017, 0.31446143984794617, -0.8608235716819763, -1.0136439800262451, 1.0702513456344604, -0.09469790011644363, 0.36302316188812256, 0.20996904373168945, -0.2539214491844177, -0.15338590741157532, -0.24621404707431793, 0.2625172734260...
def set _ kk2 _ normal _ activity ( self, clip = true, * * kwargs ) : matrix _ shape = [ self. mm, self. nn ] params _ kk1 = [ self. mu _ kk1, self. sigma _ kk1 ] self. kk1 = random _ matrix ( matrix _ shape, params _ kk1, seed = self. seed _ kk1 ) mu _ ss0 = self. mu _ ss0 mu _ eps = self. mu _ eps for key in kwargs :...
[ -0.6335349082946777, -0.45915213227272034, 0.8164569735527039, 0.8227688670158386, -1.28749680519104, 0.3709251284599304, 0.2717290222644806, 0.049970582127571106, 0.1953582614660263, 0.7068581581115723, 0.5088030695915222, 1.5028433799743652, 0.3018577992916107, 0.2756933867931366, 0.22...
def killall ( self ) : while self. _ procs : pid, proc = self. _ procs. popitem ( ) proc. interrupt ( )
[ 0.17946772277355194, -1.461556077003479, 0.5897678136825562, 0.0324363075196743, 1.260925531387329, 0.1616617739200592, -0.5162643194198608, -0.22188009321689606, -0.414889931678772, 0.14407102763652802, 0.2346399873495102, 0.0948433130979538, -1.0142756700515747, -0.4224640130996704, 0....
def norm ( x ) : return np. sqrt ( np. sum ( x * * 2 ) )
[ 0.10880600661039352, -0.6938037872314453, 0.19910508394241333, 0.611606776714325, -0.18779419362545013, 0.01870947703719139, -0.08004903048276901, -0.23249882459640503, 1.0934867858886719, -0.1614263653755188, -1.0192573070526123, 0.5918163657188416, 0.3249458074569702, -0.4910386204719543...
def delete _ click _ and _ merge ( self, click ) : # we delete the interval on the right and keep the one on the left ints = [ self. click _ to _ interval ( click, side ) for side in [ left, right ] ] kept _ int = ints [ ( deleted _ interval _ side + 1 ) % 2 ] del _ int = ints [ deleted _ interval _ side ] self. add _ ...
[ -0.4860883057117462, 0.385712593793869, 0.958784818649292, -0.025194628164172173, -0.2194463163614273, -0.20990656316280365, 0.2735675573348999, 0.2628752887248993, 0.7310140132904053, -0.22444097697734833, -0.2327563315629959, -0.252961128950119, -0.5016244649887085, 0.2522708475589752, ...
def get ( self, key : int ) - > int : slot = key % self. tablesize for ele in self. table [ slot ] : elekey, eleval = ele if elekey = = key : return eleval return - 1
[ -1.1144165992736816, 0.1893695592880249, 0.6739389300346375, 0.49083659052848816, -1.605663537979126, -0.2725829482078552, 0.5691729784011841, 0.22613513469696045, -0.6679983735084534, 0.7187777757644653, 0.6038562059402466, 0.14701546728610992, -0.41913872957229614, 0.600328803062439, 0...
def on _ insert _ decoded ( self, record ) : # override the method # call the base class method, just for example self. _ logger. info ( " decoded payload received is : % s " % record )
[ 0.2549923360347748, -0.2608990967273712, 0.7378585934638977, -0.6225001215934753, -0.33987340331077576, 0.2611658573150635, -0.25424864888191223, 0.0874091386795044, -0.08626657724380493, -0.30553656816482544, -1.4372180700302124, -0.11104011535644531, -0.3789500892162323, 0.43374362587928...
def _ injectsqltrackers ( ) : if not hasattr ( sqlcompiler,'_ snoopy _ execute _ sql') : sqlcompiler. _ snoopy _ execute _ sql = sqlcompiler. execute _ sql sqlcompiler. execute _ sql = execute _ sql if not hasattr ( sqlinsertcompiler,'_ snoopy _ execute _ insert _ sql') : sqlinsertcompiler. _ snoopy _ execute _ insert ...
[ 0.24871546030044556, 0.4595475196838379, 0.816922664642334, -0.11912662535905838, 0.8560582995414734, 0.11503501981496811, -0.34459981322288513, -0.7802347540855408, -0.30968573689460754, -0.2488389015197754, -0.3999704420566559, -0.2233116775751114, -0.47665226459503174, 1.412988305091858...
def test _ atomic _ base64 _ binary _ max _ length _ 4 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ max _ length _ 5 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - maxlength - 5. xsd ...
[ 0.05115126818418503, 0.1244400292634964, 0.2267736792564392, 1.4326808452606201, -0.29259192943573, 0.025161659345030785, 0.13851554691791534, -0.36871933937072754, -0.1740482747554779, 0.7466568946838379, -0.7165421843528748, -0.10351020842790604, -0.8594475984573364, 0.29236432909965515,...
def save _ request _ token ( self, token, request ) : raise notimplementederror ( " subclasses must implement this function. " )
[ -1.9239227771759033, -0.77507084608078, 0.6929464936256409, 0.5193837881088257, 0.3511287569999695, 0.35105907917022705, -0.7134317755699158, -0.10402712970972061, -0.07072173804044724, -0.49252527952194214, -0.8999361991882324, -0.07474920153617859, -0.018959473818540573, 0.03672500327229...
def list _ by _ timespan ( self, bucket _ name : str, timespan _ start : datetime, timespan _ end : datetime, versions : bool | none = none, max _ results : int | none = none, prefix : str | none = none, delimiter : str | none = none, match _ glob : str | none = none, ) - > list [ str ] : client = self. get _ conn ( ) ...
[ 0.1269540637731552, -0.594513475894928, 0.8375633358955383, 0.2070733904838562, -0.0018352800980210304, 0.4113418161869049, -0.9268869757652283, -0.5492593050003052, 0.20619426667690277, 0.9649542570114136, -0.6845961809158325, 0.06973474472761154, -0.07810287922620773, -0.1595415771007537...
def test _ atomic _ language _ enumeration _ 2 _ nistxml _ sv _ iv _ atomic _ language _ enumeration _ 3 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - enumeration - 3. xsd ", instance = " nistda...
[ -0.26057085394859314, -0.4191156029701233, 0.5679000616073608, 0.3168724477291107, -0.20379479229450226, 0.4644136130809784, -0.2730347812175751, 0.2422940582036972, 0.8158823251724243, 1.1394199132919312, -0.1962456852197647, -0.2210756093263626, 0.164512038230896, -0.42662379145622253, ...
def batchrunsta ( self, event, plot ) : # print header print ( " grain \ teul1 \ teul2 \ teul3 \ tmaxsf \ tgroup \ tangle \ tsystem \ tdev \ rdr " ) # print information for each grain for idx, grain in enumerate ( self. currmap ) : if grain. pointslist! = [ ] : for group in grain. groupslist : maxsf = np. max ( [ item ...
[ 0.668331503868103, -0.5836765766143799, 0.6916595101356506, -0.2559654414653778, 0.05337746813893318, 0.37561410665512085, 0.560361921787262, 0.15139509737491608, -0.6731200218200684, -0.243246927857399, 0.17412199079990387, 1.2950820922851562, -0.06460743397474289, 0.9561647176742554, 0...
def wake _ depth _ calculation ( self, beam ) : # loading the name of the datafile containing the wake mat _ file = self. filename +'_ pythonfile'# loading the data from the matlab file wake _ data _ file = sio. loadmat ( mat _ file ) analyzed _ beam = wake _ data _ file [ beam ] tm = wake _ data _ file ['tm'] [ 0 ] de...
[ 0.03532136604189873, -0.28467559814453125, 0.744448184967041, 0.534471869468689, -0.15967166423797607, 0.7025627493858337, 0.738244891166687, 0.4687941074371338, 0.30936387181282043, -0.41362181305885315, -0.2524796426296234, 0.6516791582107544, -0.07737013697624207, 0.4579448997974396, ...
def load _ instance _ from _ manager ( instance _ manager : instancemanager, instance _ id : int ) - > any : return instance _ manager. get ( instance _ id )
[ -0.14622071385383606, -0.8432344198226929, 0.1937699019908905, -1.2810078859329224, -1.1788231134414673, 0.07773011922836304, -1.2566769123077393, -0.0413784421980381, -0.04899212718009949, 0.4561080038547516, 0.4349612295627594, 1.0438798666000366, -0.6772354245185852, 0.3988300859928131,...
def zero _ control _ force ( x ) : return 0
[ -0.033035535365343094, -0.675072193145752, 0.16211046278476715, 0.41397973895072937, 1.033542275428772, 0.4630793035030365, 0.09931059926748276, -0.4724576771259308, 0.3281935453414917, -1.4134469032287598, -0.4684499502182007, -0.5073608756065369, -0.3264854848384857, -0.01851137541234493...
def pandas _ dataframe _ to _ arrow _ table ( dataframe : pd. dataframe ) - > pa. table : return pa. table ( { column : pandas _ series _ to _ arrow _ array ( dataframe [ column ] ) for column in dataframe. columns } )
[ 0.2807484269142151, 0.3594224750995636, 0.4744111895561218, 0.061801739037036896, -0.232581228017807, 0.36342495679855347, 0.3881777822971344, -0.749471127986908, 0.5624911785125732, 0.04835063964128494, 0.00858569797128439, 0.8949996829032898, 1.1296292543411255, -0.9713340997695923, 0....
def logout ( self ) : print " logging out. " d = self. proto. logout ( ) return d
[ -0.6548345685005188, 0.1375303417444229, 0.1783689260482788, -0.12822793424129486, -0.49274733662605286, -0.05235010012984276, 0.8343099355697632, -0.026545891538262367, 0.06409511715173721, -0.7975872755050659, 0.032072193920612335, 0.2789551019668579, -0.8411009311676025, -0.810402274131...
def artificial _ validation ( n, q, f, db ) : stats = multi _ run ( n, start ='07 : 00 : 00 ', end ='11 : 00 ', q = q, f = f, db = db ) with open ('artificial _ validation _ { } _ { } _ { }. csv '. format ( q, f, db ),'w +') as csv _ file : csv _ writer = csv. writer ( csv _ file, dialect ='excel ', delimiter = ',') cs...
[ 0.15767692029476166, 0.2372930496931076, 0.7071665525436401, 0.34573841094970703, -0.00885953102260828, 0.9343267679214478, -0.13170628249645233, -0.46432921290397644, -0.750786542892456, 0.14221195876598358, -0.38348397612571716, 0.6641079783439636, 1.4134624004364014, 0.9719516038894653,...
def run _ suite _ tests ( self ) : # uses _ _ enter _ _ and _ _ exit _ _ for context with self : # run the tests for this class, and for all subsuites if self. cmd : passed = self. run _ test ( ) if not passed : self. failed _ suites. append ( self ) for suite in self. subsuites : suite. run _ suite _ tests ( ) if suit...
[ -0.3804849088191986, -0.16213102638721466, 0.5796959400177002, 0.9471534490585327, 0.3616734445095062, 1.2655386924743652, 0.9448992013931274, 0.34279078245162964, 0.11077404767274857, -1.1892492771148682, -0.7572630643844604, 0.3514294922351837, -0.20693735778331757, 0.8802707195281982, ...
def is _ value ( self, value ) : if self. is _ empty ( ) : print ( " список пуст " ) current = self. head while current. value! = value : if current. next is none and current. value! = value : return false current = current. next return true
[ -0.4909479320049286, 0.2552291452884674, 0.6917665600776672, 0.6702158451080322, 0.16174139082431793, 0.01987309195101261, -0.036073263734579086, -0.13512466847896576, 1.2071354389190674, 0.16641640663146973, -1.0023441314697266, 0.2595527768135071, -0.7452206015586853, 0.9379830360412598,...
def test _ log _ successful _ mail _ task ( app, testdata, mocker, users ) : app. config. update ( celery _ task _ always _ eager = true ) mocker. patch ( " invenio _ app _ ils. records. api. patron. get _ patron ", return _ value = patron ( users [ " patron1 " ]. id ), ) succ = mocker. patch ( " invenio _ app _ ils. m...
[ 0.9272026419639587, 0.8341105580329895, 0.608185887336731, 0.062187559902668, -0.2585338354110718, 1.169175386428833, -0.562732458114624, 0.3224635124206543, -0.22989962995052338, -0.15593604743480682, -0.9881083369255066, 1.1913506984710693, 0.7576325535774231, -0.3729665279388428, 0.32...
def sample _ adapt ( self ) : # # step 1 - add newly evaluated points to memory archive # start = time. clock ( ) self. update _ archives ( ) front = self. memory _ archive. contents [ 0 ] fvals = [ rec. fx for rec in front ] fvals = np. asarray ( fvals ) # step 2 - select the new center points maxgen = ( self. maxeval...
[ 0.30284762382507324, -0.7057368159294128, 0.5827727913856506, 0.1979372203350067, -1.0218788385391235, 0.10887781530618668, 0.5929662585258484, 0.4068240225315094, 0.5249074697494507, 0.4876733124256134, 0.4564990997314453, 0.990824818611145, -0.17203201353549957, 0.05906842276453972, 0....
def data _ item ( self ) : if self. site. has _ extension ('wikibasemediainfo') : if not hasattr ( self,'_ item') : self. _ item = pywikibot. mediainfo ( self. site ) self. _ item. _ file = self return self. _ item return super ( ). data _ item ( )
[ -0.14801514148712158, -0.32007572054862976, 0.547318160533905, -0.37305986881256104, -0.27735790610313416, 0.7773128747940063, -0.5146477222442627, -0.2313225418329239, -0.3738354742527008, -1.0036778450012207, -0.4099641442298889, 0.2294880598783493, -0.06214405968785286, 0.98949575424194...
def available _ cash ( self ) : url = lendingclub _ url ('accounts ', self. investor _ id,'availablecash') response = self. session. get ( url = url ) response. raise _ for _ status ( ) return decimal ( response. json ( ). get ( " availablecash " ) )
[ -0.4958617687225342, 0.4725819528102875, 0.45144110918045044, 0.5427308082580566, 0.027532940730452538, -0.5210108757019043, -0.41526493430137634, -0.04223601892590523, -0.3641100823879242, -0.2040620893239975, 0.438866525888443, 0.49442028999328613, -0.8704491853713989, 0.4714798033237457...
def test _ atomic _ qname _ pattern _ 2 _ nistxml _ sv _ iv _ atomic _ qname _ pattern _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - pattern - 3. xsd ", instance = " nistdata / atomic / qname / sc...
[ 0.17865723371505737, -0.32363757491111755, 0.5713951587677002, 0.18035659193992615, -0.20768751204013824, 0.48424267768859863, -0.5875812768936157, -0.7535008192062378, 0.31466397643089294, 0.483150839805603, -0.2062642127275467, -0.17992304265499115, -0.07702124863862991, -0.5652296543121...
def get ( self, topic _ id : str, subtopic _ id : int ) - > none : subtopic _ page = subtopic _ page _ services. get _ subtopic _ page _ by _ id ( topic _ id, subtopic _ id, strict = false ) if subtopic _ page is none : raise self. pagenotfoundexception ('the subtopic page with the given id doesn \'t exist.') self. val...
[ 0.640670120716095, 0.3476046919822693, 0.5727454423904419, 0.009039783850312233, 0.07787857204675674, 0.4240555167198181, -0.8616060018539429, -0.6493855118751526, -0.466413676738739, 0.44897064566612244, -0.11838711053133011, 1.2063781023025513, -0.1407281905412674, -0.3855092227458954, ...