text
stringlengths
25
2.19k
embedding
listlengths
768
768
def setpdm ( self ) : print ( " set pdm " ) pdm = int ( self. qlepdm. text ( ) ) if ( ( pdm > = pdm _ min ) and ( pdm < = pdm _ max ) ) : self. pdm = pdm if self. comboboxtech. currenttext ( ) = = " lte " : self. phone. set _ lte _ pdm ( self. pdm ) elif self. comboboxtech. currenttext ( ) = = " wcdma " : self. phone. ...
[ -0.8428513407707214, -0.5439340472221375, 0.7196542620658875, -0.08981236070394516, -0.041016269475221634, 0.8601475954055786, -0.13124410808086395, -0.5864920616149902, -0.047579988837242126, -1.0336744785308838, -0.0011544486042112112, -0.12697364389896393, -0.5492613911628723, 0.3864875...
def db _ connect ( set _ params = false, path = dbpath ) : connection = sqlite3. connect ( path, timeout = 10, detect _ types = sqlite3. parse _ decltypes ) if set _ params is true : # speed up insertions : only called while creating the database connection. execute ('pragma main. journal _ mode = wal ;') connection. e...
[ -0.24157406389713287, 0.7544341087341309, 0.45904913544654846, 0.1690923422574997, -0.10650929063558578, -0.2162272036075592, -0.2885994017124176, 0.18071386218070984, -0.8232825398445129, 0.8686431050300598, 0.5810493230819702, -0.39976978302001953, -0.9978250861167908, 0.3712722361087799...
def unknown _ to _ nan ( df, xlsx, missing _ keyword ='unknown ', rename _ columns = none ) : # load mapping in xlsx format xlsx = pd. read _ excel ( xlsx, header = 1 ) # extra column called unnamed that seems like an index duplication, i will drop it xlsx. drop ( columns = ['unnamed : 0'], inplace = true ) xlsx ['attr...
[ -0.10430081933736801, -0.041814468801021576, 0.8294512629508972, 0.6655545234680176, -0.501798689365387, 0.3273408114910126, 0.0810917317867279, 0.9319874048233032, -0.5496110916137695, 0.0717422217130661, -0.2439931035041809, 1.1062904596328735, 1.4347622394561768, 0.4464361369609833, 0...
def start ( ) : return render _ template ('start. html')
[ 0.8115906715393066, 0.09052764624357224, 0.320310115814209, 0.7252593636512756, 0.01859457790851593, 0.36272937059402466, 0.3981991708278656, 1.257737159729004, -0.4763849079608917, 0.4389927387237549, 0.057300761342048645, -0.12621301412582397, 0.030976509675383568, -0.06473446637392044, ...
def reset ( self, state ) : self. score = 0 self. _ update _ states ( state )
[ -0.7794351577758789, 0.13999034464359283, 0.3440784513950348, -0.010913807898759842, 0.7358126044273376, -0.14377771317958832, 0.4541143476963043, -0.5499992370605469, 0.44094207882881165, 0.589404821395874, -0.5402368903160095, 0.12425579875707626, -0.15499667823314667, -0.476857960224151...
def crib _ drag _ all _ ciphers ( crib : str, ciphers : [ str ], target : str ) - > [ ( int, int, str, [ str ] ) ] : all _ crib _ matches = [ ] # run every cipher against the target for index in range ( len ( ciphers ) ) : xor _ message = xor _ strings ( ciphers [ index ], target ) crib _ matches = crib _ drag ( crib, ...
[ -0.8698545694351196, 0.08303170651197433, 0.5048930048942566, 0.30510833859443665, -0.49265071749687195, 0.23976895213127136, 0.168033167719841, -0.5895592570304871, -0.2731877267360687, 0.8402807712554932, -0.8876315355300903, 0.3407401740550995, -1.147129774093628, -0.22130857408046722, ...
def put ( self, request, * args, * * kwargs ) : params = querydict ( request. body ) self. edited _ user = request. user try : self. _ init _ user _ details ( params ) self. _ is _ info _ updated ( ) if self. is _ updated _ info : with transaction. atomic ( ) : self. edited _ user. updated _ user _ info ( name = self. ...
[ -1.338598608970642, -0.9003387689590454, 0.6671009063720703, 0.4066220819950104, -0.16109560430049896, 0.4584253430366516, 0.5325552821159363, -0.9752587676048279, 0.008342689834535122, 0.48755890130996704, -0.43781787157058716, 0.17046746611595154, -0.6407557725906372, -0.2797939777374267...
def _ calculate _ node _ importance _ scores ( self, model, ranking _ subset, metric _ name ) : cut _ fqs = [ ] node _ importance _ score = { } eu. select _ evaluation _ dataset ( self. _ engine ) convolution _ fq _ nodes = [ node for node in model. get _ nodes _ by _ type ( ['fakequantize'] ) if self. _ can _ set _ fq...
[ -0.601980447769165, 0.35214748978614807, 0.4916575253009796, -0.5581165552139282, -0.46689048409461975, -0.9571801424026489, 0.4793402850627899, -0.4388470947742462, -1.0042991638183594, 0.7203510999679565, -0.35024839639663696, 0.24567736685276031, 0.21434514224529266, 0.12174492329359055...
def uniformcrossover ( self, inda, indb ) : exchange _ genes = [ random. randint ( 0, 1 ) for i in range ( self. gensize ) ] # creating inital child chromosome child1 = [ inda. genes [ x ] if exchange _ genes [ x ] = = 1 else none for x in range ( self. gensize ) ] # child2 = [ indb. genes [ x ] if exchange _ genes [ x...
[ 0.3132787048816681, 0.07263966649770737, 0.913496732711792, 0.15390458703041077, -0.1449233740568161, 0.3156661093235016, 0.5888754725456238, 0.3688623309135437, 0.170400470495224, 0.29800283908843994, -0.08591817319393158, 0.08126906305551529, -1.1078009605407715, -0.2734913229942322, -...
def build _ item _ list ( path _ to _ directory, exclude _ list ) : item _ list = [ ] all _ files = os. listdir ( path _ to _ directory ) # build list of files. exclude project file download _ readme. txt for entry in all _ files : if entry not in exclude _ list : item _ list. append ( path _ to _ directory + os. sep +...
[ -0.5490049123764038, -0.2918490171432495, 0.4665659964084625, 0.5433313250541687, 0.2438858449459076, 0.9425840973854065, -0.2313016951084137, 1.2508057355880737, 0.20731353759765625, 0.48920688033103943, -0.1283387988805771, 0.10958345979452133, 0.3088287115097046, -0.34418925642967224, ...
def _ get _ middle _ value ( self, valuelist ) : valuelist. remove ( max ( valuelist ) ) valuelist. remove ( min ( valuelist ) ) return valuelist [ 0 ]
[ -0.5164486765861511, -0.012493224814534187, 0.4476432800292969, 0.439107745885849, -0.5066400170326233, -0.17475683987140656, -1.3910956382751465, -0.1356263905763626, 0.2183028608560562, 0.4618271291255951, -0.192195326089859, 0.4076501727104187, -0.749975860118866, -0.1418132781982422, ...
def ignore _ regex _ test ( self ) : reactor = filereactor ( root _ dir = self. _ root, pool _ dir = self. _ pool, method ='copy ', ignore _ regex = ". * d. * n. * ve. * " ) trie = trie ( reactor = reactor ) trie ['a'] = ['foo'] trie ['ab'] = ['bar ','baz'] key _ ab = os. path. join ( self. _ root,'a ','b') to _ keep =...
[ 0.04940525069832802, 0.02834424003958702, 0.9226078391075134, -0.916229248046875, 0.7954148650169373, 0.4971061646938324, 1.1334251165390015, 0.7921320796012878, -0.3994826078414917, -0.018287036567926407, -0.1632828265428543, -0.1815379559993744, -0.61622154712677, -0.6244490146636963, ...
def get _ eel _ server ( example _ py, start _ html ) : test = none try : with tempfile. namedtemporaryfile ( mode ='w ', dir = os. path. dirname ( example _ py ), delete = false ) as test : # we want to run the examples unmodified to keep the test as realistic as possible, but all of the examples # want to launch brow...
[ -0.10189870744943619, -0.4747888743877411, 0.6190946698188782, -0.44892677664756775, 0.46713024377822876, 0.1792413890361786, 0.5882086157798767, 0.5345153212547302, 0.059931106865406036, 0.2878834009170532, -0.012145904824137688, 0.36441048979759216, -0.05005902796983719, 0.07777612656354...
def add _ node ( self, value ) : self. nodes. append ( node ( value ) ) self. length = self. length + 1
[ -1.0112874507904053, 1.0106055736541748, 0.2668749690055847, -0.6018117070198059, 0.26970013976097107, 0.6785630583763123, 0.08984604477882385, 0.38194403052330017, 0.7905418872833252, -0.359576553106308, -0.6912635564804077, 0.5045396089553833, -0.10538499802350998, 0.408943235874176, -...
def test _ get _ customer _ list ( self ) : self. _ create _ customer ( ) self. _ create _ customer ( ) resp = self. app. get ( " / customers " ) self. assertequal ( resp. status _ code, status. http _ 200 _ ok ) data = resp. get _ json ( ) self. assertequal ( len ( data ), 2 )
[ -0.21108315885066986, 0.23558294773101807, 0.5731461048126221, 0.6430023312568665, 1.3324520587921143, 0.120876245200634, -0.6086393594741821, 0.6214176416397095, -0.4533277153968811, -0.5197746157646179, -1.0911641120910645, 0.2513713240623474, 0.9009687304496765, 0.39717206358909607, -...
def get _ dequeue _ op ( self, batch _ size, dataset, preprocessing _ fn = none, multiple _ examples = 1, data _ types = none, data _ shapes = none, queue _ capacity = 1000, cache _ preprocessed = false, threads = 2 ) : if data _ types is none and data _ shapes is none : data _ types = [ tf. int32, tf. float32, tf. int...
[ 0.38507717847824097, 0.7823542356491089, 0.8602077960968018, -0.3834403157234192, -0.03384920582175255, -0.832985520362854, 0.276750773191452, 0.5969321727752686, -0.2047847956418991, 0.06009635701775551, -0.5622329115867615, 0.45514822006225586, 0.42023319005966187, 0.01661095768213272, ...
def polystr _ to _ arr ( polystr ) : try : polystrlst = polystr. split ( ',') except exception : polystrlst = ['' ] if polystrlst = = ['' ] : polyarr = np. array ( [ ] ) else : polyarr = np. array ( [ float ( x ) for x in polystrlst ] ). reshape ( - 1, 2 ) # close the polygon if not already closed if not np. all ( poly...
[ 0.07512880861759186, -1.4780856370925903, 0.5647925138473511, -0.1109573170542717, -0.03360896557569504, 0.6425118446350098, -0.20973089337348938, -0.1989150494337082, 0.8276119828224182, 0.37691953778266907, -0.01201444398611784, 0.5401045680046082, -0.738990068435669, -0.0675268322229385...
def analysis ( ) : plt. figure ( ) start _ pos = 221 lamda = [ 0, 10, 100, 1000 ] initial _ theta = np. zeros ( ( x _ new. shape [ 1 ] ) ) for i in range ( len ( lamda ) ) : plt. subplot ( start _ pos ) start _ pos + = 1 theta = fmin _ bfgs ( costfunction, initial _ theta, fprime = gradient, args = ( x _ new, y, lamda ...
[ 0.35962986946105957, 0.5679529309272766, 0.6720113754272461, 0.18501581251621246, 0.5540015697479248, -0.24903154373168945, 0.41031381487846375, 0.12417059391736984, -0.41631242632865906, -0.020704194903373718, -0.1273638904094696, 1.0004464387893677, -0.18065379559993744, 1.36778616905212...
def _ std _ basis ( pytree : pytree ) - > pytree : leaves, _ = tree _ flatten ( pytree ) ndim = sum ( map ( np. size, leaves ) ) dtype = jax. dtypes. result _ type ( * leaves ) flat _ basis = np. eye ( ndim, dtype = dtype ) return _ unravel _ array _ into _ pytree ( pytree, 1, flat _ basis )
[ -0.4730377197265625, 0.11895769834518433, 0.6015638113021851, 0.13715974986553192, -0.3968771696090698, 0.027532195672392845, 0.2960316240787506, -0.7672065496444702, 0.6613942384719849, 0.44771671295166016, -0.16625608503818512, 0.12664681673049927, 0.21585765480995178, 0.1949440687894821...
def add _ mask ( self, mask _ name, mask ) : assert mask _ name not in self. _ grid _ masks. keys ( ),'mask already added : {! s } '. format ( mask _ name ) self. _ grid _ masks [ mask _ name ] = mask
[ -0.40492361783981323, 0.02143576182425022, 0.31131574511528015, 0.5464905500411987, 1.0076390504837036, 0.3465947210788727, -0.9168468117713928, -0.890691876411438, 0.05208547040820122, 0.0011100857518613338, -0.1815764456987381, 0.21710973978042603, 0.0792466476559639, 0.04062985256314277...
def pool _ forward ( a _ prev, hparameters, mode = " max " ) : ( m, n _ h _ prev, n _ w _ prev, n _ c _ prev ) = a _ prev. shape f = hparameters [ " f " ] stride = hparameters [ " stride " ] n _ h = int ( 1 + ( n _ h _ prev - f ) / stride ) n _ w = int ( 1 + ( n _ w _ prev - f ) / stride ) n _ c = n _ c _ prev a = np. ...
[ 0.033922646194696426, 0.6137434244155884, 0.8418787121772766, -0.373928964138031, 0.1431610882282257, -0.08482274413108826, 1.4073330163955688, -0.07987678050994873, -0.8967947959899902, 0.9990842938423157, 0.25027403235435486, 0.5934442281723022, 0.12365381419658661, 0.31275704503059387, ...
def main ( ) : args = get _ args ( ) temp _ dict = { } temp _ cnt = 0 img _ list = glob. glob ( f'{ args. dir } / * / *. tif') print ( img _ list ) if not os. path. isdir ( args. outdir ) : os. makedirs ( args. outdir ) for one _ img in img _ list : temp _ cnt + = 1 date = one _ img. split ('/') [ - 3 ] [ - 10 : ] plot...
[ 0.020042259246110916, 0.4189545810222626, 0.8488683700561523, -0.6731666326522827, 0.2778230309486389, 0.16065436601638794, 1.2375333309173584, 0.3514288067817688, -0.40693923830986023, 1.1482858657836914, -0.025636550039052963, 0.17540417611598969, 0.8484876155853271, 0.6445367932319641, ...
def build ( self, xmlraw ) : try : xmltree = dom. parsestring ( xmlraw ) except : raise ioerror ( " could not parse the given string as xml - instance " ) name = str ( ( ( xmltree. getelementsbytagname ( " name " ) [ 0 ] ). firstchild. data ) ). strip ( ) compproblem = str ( ( ( xmltree. getelementsbytagname ( " comput...
[ -0.0740884318947792, 0.3749144971370697, 0.5485138297080994, 0.21708497405052185, -1.3297119140625, 0.12425632029771805, 0.2202623039484024, 0.5686481595039368, -0.23276287317276, -0.4761614203453064, -0.49201273918151855, -0.7003223896026611, 0.4831967055797577, -0.3892139792442322, -0....
def _ uninstallallextpacks ( self ) : svbox = self. _ getvboxinstallpath ( ffailifnotfound = false ) ; if svbox is none : return true ; sextpackdir = os. path. join ( svbox,'extensionpacks') ; if not os. path. exists ( sextpackdir ) : return true ; frc, _ = self. _ sudoexecutesync ( [ self. getbintool ('vts _ rm'),'- r...
[ 0.461724191904068, 0.402022123336792, 0.8826470971107483, 0.9035556316375732, -0.3859774172306061, -0.14070655405521393, 0.291642963886261, 0.437142550945282, 0.8117006421089172, 0.439415842294693, -0.5031166672706604, -0.20779486000537872, -0.7528725862503052, 0.19263648986816406, -0.92...
def setg ( self, parent _ value = none ) : if parent _ value : self. g = parent _ value + self. weight else : self. g = self. weight return self. g
[ 0.1788504421710968, 1.3098176717758179, 0.5746265053749084, -0.156487375497818, -0.5938885807991028, 0.7857769727706909, 0.4527808129787445, -0.6155783534049988, -0.8292874693870544, -0.3116813898086548, 0.30157169699668884, 0.07809854298830032, -0.6424834728240967, 1.3750510215759277, -...
def _ _ init _ _ ( self, slotscount, slotssize, keepalloc = true ) :...
[ 0.965250551700592, -0.26762551069259644, 0.7174514532089233, 0.2799876928329468, -1.2617874145507812, 0.6667960286140442, 0.43034031987190247, 0.24422745406627655, 0.1985311508178711, -0.023900190368294716, 0.07912863790988922, -0.3981134593486786, -0.02573871612548828, 0.2612181007862091,...
def argmax ( l ) : besti = 0 for i in range ( len ( l ) ) : if l [ besti ] < l [ i ] : besti = i return besti
[ -0.2398109883069992, -0.4838084280490875, 0.5485473871231079, 0.22847287356853485, -0.30335476994514465, 0.7035678029060364, -0.6421187520027161, 1.2133432626724243, -0.19903875887393951, 0.012350786477327347, -0.7648391723632812, -0.06271232664585114, -0.2671107053756714, 0.96886825561523...
def smooth _ geo _ path ( path, smooth _ factor = 0. 1 ) : interpolated _ x = [ ] interpolated _ y = [ ] for index, rows in path. iterrows ( ) : if index = = 0 : pass else : smooth _ x, smooth _ y = smooth _ geo _ path _ points ( path. iloc [ index - 1 ] ['lon'], path. iloc [ index - 1 ] ['lat'], path. iloc [ index ] [...
[ -0.4660007953643799, -0.17703846096992493, 0.5009269714355469, 0.05717480182647705, 0.18234699964523315, 0.6743637323379517, 0.204994335770607, 0.43088942766189575, -0.47700074315071106, 0.7632347941398621, 0.4364810585975647, 0.09185684472322464, 0.30998843908309937, -0.17661258578300476,...
def labels ( filedata : bytes, encoding : str, shape = none, dtype = none, block _ size = none, background _ color : int = 0 ) - > np. ndarray : if filedata is none or len ( filedata ) = = 0 : return np. zeros ( ( 0, ), dtype = dtype ) elif encoding = = " raw " : img = decode ( filedata, encoding, shape, dtype, block _...
[ -0.4944801926612854, -0.4028305411338806, 0.6672885417938232, -0.2923681139945984, -0.0377824530005455, -0.44201284646987915, -0.5101308822631836, 0.24079301953315735, -0.10246437042951584, 0.46112731099128723, -0.02310122363269329, 0.36751610040664673, 0.18650220334529877, 0.1828720271587...
def setup ( self ) : userfactory. reset _ sequence ( ) self. user = userfactory ( ) self. client = client ( ) self. client. login ( username = self. user. username, password ='password')
[ -0.6779883503913879, -0.13473524153232574, 0.2718524634838104, 0.7035552263259888, -0.1654975414276123, 0.1314506232738495, 0.9231237173080444, -0.3969397246837616, 0.09269087016582489, -0.5079610347747803, -0.7579886317253113, 0.26323822140693665, 0.09365043044090271, -0.3007526993751526,...
def build _ image _ cycle ( path ) : imgs = imagesequence ( os. path. join ( path,'*. tif *') ) return cycler ( pe1 _ image = [ i for i in imgs ] )
[ -1.1842762231826782, -0.32227763533592224, 0.47592610120773315, 0.10779481381177902, -0.15079852938652039, 0.3857322633266449, 0.49572092294692993, -0.0746147409081459, -0.5855381488800049, 1.0996575355529785, 0.48490628600120544, -0.07118456810712814, -0.03787994384765625, 0.2924095094203...
def jsonpair ( self, p _ json, p _ key ) : l _ json = json _ tools. decode _ json _ unicode ( p _ json ) try : l _ val = l _ json [ p _ key ] except ( keyerror, valueerror ) as e _ err : l _ val ='error on jsonpair for key " { } " { } { } '. format ( p _ key, e _ err, l _ json ) print ( l _ val ) return l _ val
[ -0.9708036184310913, -1.1103931665420532, 0.5550882816314697, -0.4842194616794586, -1.4252498149871826, 0.3573356568813324, -0.6880586743354797, -0.1777690351009369, -0.32573920488357544, 0.40504032373428345, 0.3922306299209595, 0.2917560636997223, -0.6137246489524841, 0.35444363951683044,...
def test _ not _ allow _ invalid _ dev _ id ( self ) : with assert _ setup _ component ( 1, device _ tracker. domain ) : assert setup _ component ( self. hass, device _ tracker. domain, test _ platform ) device _ tracker. see ( self. hass, dev _ id ='hello - world') config = device _ tracker. load _ config ( self. yaml...
[ -0.05406823009252548, 0.5413205623626709, 0.36859479546546936, 0.5429224967956543, -0.15018023550510406, 0.869735836982727, 0.34534379839897156, 0.09895481169223785, 0.4147911071777344, -0.754583477973938, 0.07966510206460953, 0.0553685687482357, 0.2797246277332306, 1.3495897054672241, 1...
def clear _ auth ( self ) : self. token = none self. base _ url = none
[ -0.6354713439941406, -0.8076561093330383, 0.2419411689043045, 0.2918182611465454, 0.17238764464855194, -0.2744036912918091, -0.626157283782959, -0.17161376774311066, 0.10670530050992966, -0.2509436309337616, -0.6069265604019165, 1.6598416566848755, 0.4377897381782532, -0.3222367465496063, ...
def create _ iaa _ data ( summed _ results, text, annotators, dummy _ label, flexible, add _ missing = true ) : iaa _ data = [ ] for current _ annot _ ix, annotator in enumerate ( annotators ) : annotations = summed _ results [ annotator ] [ text ] anonym _ annot = anonymize _ annotator ( current _ annot _ ix ) for edg...
[ -0.7863015532493591, -0.6229828596115112, 0.7123032212257385, -0.21159638464450836, -0.1538764089345932, 0.1869049221277237, 0.13168483972549438, -0.19005650281906128, 0.4686875343322754, 1.021538496017456, -0.32179704308509827, -0.043544553220272064, 0.0851994976401329, -0.016286905854940...
def _ api ( self, endpoint, get _ data = dict ( ), post _ data = dict ( ) ) : # @ todo move away from sanction oauth2 library, make this ( and callers ) async if get _ data : request _ parameter = " { }? { } ". format ( endpoint, urlencode ( get _ data ) ) else : request _ parameter = endpoint try : encdata = urlencode...
[ -1.5527204275131226, 0.483220636844635, 0.8622152805328369, 0.02330239862203598, -0.41226741671562195, -0.7956115007400513, -0.5661060214042664, 0.2697737216949463, 0.5732084512710571, -0.39688917994499207, 0.7060938477516174, 0.48277413845062256, 0.19067886471748352, -0.009420277550816536...
def jacobid ( n, a, b, x, nopt = 1 ) : z = np. zeros ( ( len ( x ), 1 ) ) if n = = 0 : px = z else : px = 0. 5 * np. hstack ( ( z, jacobi ( n - 1, a + 1, b + 1, x, nopt ) * \ ( ( a + b + 2 + np. arange ( n ) ) ) ) ) return px
[ 0.428577184677124, 0.48969072103500366, 0.29543378949165344, 0.42508453130722046, -0.29257676005363464, 0.2534487247467041, -0.08778847754001617, -0.9718323945999146, 0.9225425124168396, 0.5139578580856323, -0.07021720707416534, -0.26028621196746826, -0.8189638257026672, 0.1258054971694946...
def listing ( page = 0 ) : # 1. request all documents from db documents = document. query. order _ by ( document. timestamp. desc ( ) ). all ( ) all _ docs = [ ] for doc in documents : all _ docs. append ( document. retrieve _ document ( doc. id ) ) # 2. provide data to template engine return render _ template ('list. ...
[ -0.19489750266075134, 0.3782649636268616, 0.5320947766304016, -0.05508352071046829, 0.4273654520511627, -0.2654251456260681, -0.5564531683921814, 0.8038376569747925, 0.16475054621696472, 0.27110978960990906, 0.2676266133785248, -0.6120933890342712, 0.20705963671207428, 0.9020676016807556, ...
def indicators ( ) : country = request. args. get ('country') indicator = request. args. get ('indicator') years = request. args. get ('years') countries = country. split ( ',') indicators = indicator. split ( ',') if indicator = ='all': if country! ='all': sub _ df = df. loc [ df [ " country code " ]. isin ( countries...
[ -1.0757503509521484, 0.16495203971862793, 0.8482978940010071, 0.022435802966356277, -0.9404357075691223, 0.20599403977394104, 0.04937173053622246, 0.3347388207912445, -0.5533917546272278, 0.8687980771064758, -0.12152628600597382, 0.5370235443115234, -0.6365423202514648, -1.056627631187439,...
def visualize _ results ( self ) : keys = self. results. keys ( ) values = self. results. values ( ) plt. bar ( keys, values ) plt. savefig ( " classification. png " ) plt. show ( )
[ -0.4935687482357025, 0.5702093243598938, 0.41762566566467285, -0.5029021501541138, -0.4343349039554596, 1.3834608793258667, 0.519701361656189, 0.6282612681388855, -1.0036654472351074, -0.6314550042152405, 0.038963787257671356, 1.0386693477630615, 0.7245789766311646, 1.1145321130752563, 0...
def declaration _ general ( self ) : return self. token. value [ : - 1 ]. strip ( ). split ( none, 2 )
[ -0.3486329913139343, -0.2743653953075409, 0.5447118282318115, -0.25684303045272827, 0.6536519527435303, -0.0978412926197052, -0.9237598180770874, 0.19699640572071075, -0.56246018409729, 0.02984742261469364, -0.19378715753555298, 0.8133338689804077, 0.16900134086608887, 1.2157866954803467, ...
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, showrecordingdetailresponse ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _
[ -0.18436190485954285, -0.24115976691246033, 0.6238577365875244, -0.5415581464767456, -0.14708326756954193, 0.07965098321437836, 0.9412343502044678, -0.3871784806251526, 2.0483686923980713, 0.039919547736644745, -1.0377004146575928, 0.5894243717193604, 0.025985509157180786, -0.0349736697971...
def require _ group ( self, name ) : if name in self : if not self. is _ sub _ group ( name ) : raise typeerror ( " incompatible object ( dataset ) already exists " ) handle = self. _ handle _ factory ( self. _ handle, name ) else : if not self. _ handle. mode ( ). can _ write ( ) : raise valueerror ( " cannot create g...
[ 0.05047127977013588, 0.47128090262413025, 0.5271376967430115, -0.2581452429294586, -0.9129528999328613, 0.5642969608306885, 0.9550971984863281, -1.2563376426696777, -0.427565336227417, -0.8391014933586121, 0.15585452318191528, 0.27381768822669983, -0.6285760402679443, -0.13371554017066956,...
def test _ get _ module _ non _ exosims _ error _ no _ modtype ( self ) : module = ( " tests. testmodules. planetpopulation. planetpopulationerrormissingmodtype " ) modtype = " planetpopulation " with self. assertraises ( assertionerror ) : m = get _ module ( module, modtype )
[ -0.34634310007095337, 0.013150840997695923, 0.22769306600093842, 0.43893977999687195, 1.075715184211731, 0.9642271995544434, -0.07343725115060806, -0.48975634574890137, 0.4330447018146515, 0.39335185289382935, 0.10816291719675064, 0.903741717338562, -0.40980690717697144, 1.0905238389968872...
def network _ interfaces ( self ) - > optional [ pulumi. input ['launchtemplatenetworkinterfacesargs'] ] : return pulumi. get ( self, " network _ interfaces " )
[ -0.09492074698209763, 0.5372745990753174, 0.38342511653900146, 0.5946845412254333, 0.9946993589401245, 0.8347426652908325, 0.28629857301712036, 0.1369706690311432, 0.904818594455719, -0.8681098222732544, -1.274519920349121, -0.573030412197113, -0.5808495283126831, 0.3490200340747833, -1....
def admit ( self, start, end ) : raise notimplementederror
[ -0.08829408884048462, -0.14354652166366577, 0.37972885370254517, 0.03643035888671875, -0.10344403982162476, 1.207481861114502, -0.4224346876144409, -0.6017857789993286, -1.5689852237701416, 0.8309183716773987, 0.28604385256767273, 1.6310715675354004, -0.7791775465011597, 0.1299689412117004...
def _ start _ event _ dispatch ( self ) : # gateway host and port to compose url : # todo commented # host = cfg. get _ safe ('server. oms. host ', " localhost " ) # port = cfg. get _ safe ('server. oms. port ', " 5000 " ) # path = cfg. get _ safe ('server. oms. path ', " / ion - service / oms _ event " ) # the above a...
[ 0.5168195366859436, -0.3764743506908417, 0.5822281241416931, -0.12014827132225037, 1.0619088411331177, -0.30163031816482544, -0.30742573738098145, 1.0468459129333496, -0.04449485242366791, -0.4198698401451111, -0.14315883815288544, 0.8217916488647461, 0.41700392961502075, 0.389028191566467...
def password ( self ) : raise attributeerror ('password is not a readable attribute')
[ 0.8258880376815796, -0.05071697756648064, 0.5645047426223755, 0.820376992225647, -0.047580067068338394, 1.4083783626556396, 0.9182671904563904, 0.32856154441833496, 0.37135758996009827, -0.03989208862185478, 0.7527645826339722, -0.1639084368944168, 0.44963082671165466, 0.22678643465042114,...
def teardown ( self ) : user. objects. all ( ). delete ( ) # clean up the user database.
[ 0.9659772515296936, 0.041230443865060806, 0.15401539206504822, 0.5452190637588501, 0.5018473267555237, 0.7559139728546143, 1.3709218502044678, 0.2766219973564148, 0.7799273133277893, -0.23670314252376556, -0.19092682003974915, -0.2673281133174896, -0.2776413857936859, 0.2135019451379776, ...
def start _ time ( self ) : return self. start _ time _ value
[ -0.03738845884799957, -0.29631125926971436, 0.2555152177810669, 0.012339647859334946, 0.3075487017631531, 0.4490738809108734, 0.07230821996927261, 0.5578553676605225, 0.0366939902305603, 0.9580267667770386, -0.3990766406059265, 0.634064793586731, -0.46024182438850403, 0.28557372093200684, ...
def update _ item ( event, updated _ attributes, calendar _ item _ update _ operation _ type ) : root = m. updateitem ( m. itemchanges ( t. itemchange ( t. itemid ( id = event. id, changekey = event. change _ key ), t. updates ( ) ) ), conflictresolution = u " alwaysoverwrite ", messagedisposition = u " sendandsavecopy...
[ -0.5665716528892517, -0.06775831431150436, 0.7541751861572266, 0.15080060064792633, -0.7592858672142029, 0.23640799522399902, -0.14163553714752197, 0.5020235180854797, 0.22389838099479675, 1.0807008743286133, -0.26196780800819397, 0.2086411565542221, 0.0904264822602272, -0.4459464251995086...
def check _ utime _ sanity ( self ) : nr _ 1utime = defaultdict ( int ) warn _ utime = { } for pid _ dict in self. utimes. values ( ) : for pid, utime in pid _ dict. items ( ) : if isinstance ( utime, float ) and utime > 0. 9 : nr _ 1utime [ pid ] + = 1 if nr _ 1utime [ pid ] > 5 : warn _ utime [ pid ] = max ( nr _ 1ut...
[ 0.05214212089776993, 0.5007815957069397, 0.5429736375808716, -0.6132809519767761, 0.16182562708854675, 0.20174625515937805, -0.3323242962360382, -0.3220335841178894, -0.05636494979262352, 0.5276121497154236, 0.7254883646965027, -0.03935283049941063, 0.26816684007644653, 0.9170441031455994,...
def from _ shc ( cls, filepath, *, name = none, leap _ year = none, source = none, meta = none ) : if name is none : # get name without extension name = os. path. splitext ( os. path. basename ( filepath ) ) [ 0 ] source ='internal'if source is none else source leap _ year = true if leap _ year is none else leap _ year...
[ 0.44574710726737976, 0.2667649984359741, 0.8142676949501038, -0.156772181391716, -0.8490868806838989, 0.2582728862762451, -0.5134694576263428, -0.397639662027359, 0.27153098583221436, 0.5259154438972473, -0.9467533230781555, -0.2407653033733368, 0.4477778673171997, -0.554499089717865, -0...
def _ _ call _ _ ( self, interval ) : # local imports needed when calling functions on different executors in parallel on spark import modules. interval _ x as intx import modules. evaluate as evaluate # number of ensembles ( window start position and averaging length combinations ) n _ ens = interval. shape [ 1 ] ret ...
[ -0.0661298856139183, 0.1678151786327362, 0.8083829283714294, -0.021051809191703796, 0.2586713433265686, 0.0827367901802063, 0.1367339938879013, 0.672159731388092, -0.860356330871582, 0.2797211706638336, 0.2867407202720642, 0.9961373805999756, 0.6991034150123596, 1.2124484777450562, 0.134...
def getmd5 ( filename ) : md5 = db. session. query ( file ). filter ( file. name = = filename ). one ( ). md5 # gets md5 of the file requested from sqlite return md5
[ -0.36679092049598694, -0.03785087913274765, 0.4425899088382721, 0.13169334828853607, 0.09561200439929962, -0.2598699927330017, 0.4863564372062683, -0.279910683631897, -0.8198112845420837, 0.044208697974681854, 0.05984550341963768, -0.6629037857055664, -0.48818933963775635, -0.2762363851070...
def resize ( self, event ) : # get geometry info from the root window. wm, hm = self. _ root ( ). winfo _ width ( ), self. _ root ( ). winfo _ height ( ) # choose a font height to match # note subtract 30 for the button we are not scaling. # note we assume optimal font height is 1 / 2 widget height. fontheight = ( hm -...
[ 0.35497331619262695, -0.2392602562904358, 0.8082709908485413, 0.30038705468177795, -0.3453126847743988, -0.436787486076355, -0.5820995569229126, 0.2440527379512787, 0.44989892840385437, -0.2666124403476715, 0.0683937817811966, 0.5401321649551392, -0.11037034541368484, 0.10155417025089264, ...
def format _ heading ( level, text ) : underlining = ['= ','- ','~ ', ] [ level - 1 ] * len ( text ) return'% s \ n % s \ n \ n'% ( text, underlining )
[ -0.17644062638282776, -0.28486213088035583, 0.6062690615653992, -0.5708383917808533, -0.8957011699676514, 0.02210249938070774, -1.0357465744018555, -0.40396562218666077, -1.0527287721633911, 0.7507856488227844, 0.34736940264701843, 0.2555828392505646, -0.3197464644908905, -0.02189418300986...
def maxsubmatrix ( m, c ) : row = c colum = c n = len ( m ) maximum = m [ c ] [ c ] for j in range ( c, n ) : for k in range ( c, n ) : maxtemp = m [ k ] [ j ] if ( fabs ( maximum ) < fabs ( maxtemp ) ) : maximum = maxtemp colum = j row = k return row, colum
[ 1.210028886795044, -0.2941071391105652, 0.6003132462501526, 0.4538569450378418, -1.1352260112762451, -0.34729528427124023, 0.13705889880657196, 0.01437024399638176, -0.643469512462616, 0.22412629425525665, -0.09136607497930527, 0.04514414817094803, 0.11975332349538803, 0.2532205581665039, ...
def insert _ aligned _ tablets ( self, tablet _ lst ) : status = self. _ _ client. inserttablets ( self. gen _ insert _ tablets _ req ( tablet _ lst, true ) ) logger. debug ( " insert multiple tablets, message : { } ". format ( status. message ) ) return session. verify _ success ( status )
[ -1.7103904485702515, 0.8640915155410767, 0.5239479541778564, 0.7874502539634705, 0.638782799243927, 1.236939787864685, 0.21962516009807587, -0.633418083190918, -0.8232628107070923, 0.5646490454673767, -1.5169384479522705, -0.9818981289863586, -0.8075147867202759, 0.9286906123161316, -0.9...
def luma _ matrix _ vertical _ size ( self ) : # type : ( ) - > int return self. _ luma _ matrix _ vertical _ size
[ 0.7525613307952881, -0.36481836438179016, 0.23725861310958862, 0.8177281618118286, 0.058966461569070816, 0.11589670181274414, 0.931204617023468, 0.36297380924224854, -0.2962936758995056, -0.6227730512619019, -0.3487897217273712, 0.7151647210121155, -0.5483790040016174, -0.3192058205604553,...
def set _ input _ value ( self, selector, value ) : script ='document. queryselector ( " % s " ). setattribute ( " value ", " % s " )'script = script % ( selector, value ) self. evaluate ( script )
[ -0.9194908738136292, -0.21312092244625092, 0.4595160484313965, -0.35574856400489807, -0.4888373613357544, -0.16351740062236786, 0.46126729249954224, -0.1904316544532776, -0.08223873376846313, 0.006996557582169771, -0.2520410418510437, 0.3233949542045593, 0.44633838534355164, -0.02375405840...
def take _ my _ medication ( self ) : text _ index = 0 text _ from _ xml, ids, eng _ list = self. util. get _ text _ from _ xml ( self. string _ xml, " takemymedication ", " trans - unit ", config. selected _ language. strip ( ) ) xpath = self. util. read _ xpath _ list _ from _ xml ( self. object _ repo, " takemymedic...
[ -0.2864539623260498, -0.5550838112831116, 1.0007429122924805, -0.51027512550354, -0.8621121048927307, 0.30143600702285767, 0.7482917308807373, -0.6623674631118774, 0.14679215848445892, 0.5455799698829651, -0.1440436989068985, 0.0768980011343956, -0.9533328413963318, 0.13838936388492584, ...
def edit _ all _ item _ text ( self, item _ id ) : try : self. linker. edit _ all _ item _ text ( self. active _ category. rstrip ( " s " ), item _ id ) except exception as e : _ logger. warning ( e ) self. customdialog ( " item text error ", f " could not edit item text. error : \ n \ n { e } " ) else : self. refresh ...
[ 0.28670671582221985, -1.2505534887313843, 0.40461796522140503, -0.01842695102095604, -0.15146006643772125, -0.2118033468723297, 0.2572228014469147, 0.23100413382053375, 0.6574934720993042, 0.6133427619934082, -0.43967410922050476, 0.5018613934516907, 0.06718695163726807, -0.118651568889617...
def _ _ ne _ wrapper _ _ ( self, * args ) : return _ topods. topods _ shape _ _ _ ne _ wrapper _ _ ( self, * args )
[ -1.6822965145111084, -0.22979618608951569, 0.42609068751335144, -0.47293591499328613, -0.017020776867866516, 0.7000945210456848, -0.021313462406396866, -0.866580069065094, 0.02915564551949501, 0.4069443643093109, 0.29772254824638367, -0.5555490851402283, 0.8213385343551636, 0.0170556027442...
def delete _ place ( place _ id ) : obj = storage. get ( place, place _ id ) if obj is none : abort ( 404 ) storage. delete ( obj ) storage. save ( ) return jsonify ( { } ), 200
[ -0.28846752643585205, -0.5994554758071899, 0.587191641330719, 0.3906835615634918, 0.5001538991928101, -0.9697386622428894, -0.05643080919981003, 0.8229759335517883, 1.3138396739959717, 0.174373060464859, -0.14814038574695587, -0.0005714492290280759, -0.5970454812049866, 0.41760489344596863...
def get _ value ( self ) : return self. _ _ genome
[ -0.15179596841335297, -0.2581835687160492, 0.5674992799758911, 0.3018029034137726, 0.11165402829647064, 0.39139488339424133, -0.24367299675941467, -0.19822613894939423, -0.7280601859092712, -0.6783345341682434, 0.27289310097694397, 1.4497804641723633, -0.47092562913894653, 0.45772838592529...
def check _ board _ iter _ order ( board _ iter, row _ count, col _ count ) : last _ value = none for board in board _ iter : value = get _ board _ int _ value ( board, row _ count, col _ count ) if last _ value and value > = last _ value : return false last _ value = value return true
[ 0.3909680247306824, 0.2172013819217682, 0.583116352558136, 0.7535775899887085, 0.01626266911625862, 0.484638512134552, 0.07136758416891098, -1.017229676246643, -1.3063910007476807, 0.10857684910297394, 0.3843778073787689, -0.5649551749229431, -0.4854031205177307, 1.150384783744812, -0.13...
def search _ records ( self, filter _ choice, keyword ) : if filter _ choice = = " author " : qry = self. session. query ( person ) result = qry. filter ( person. first _ name. contains ('% s'% keyword ) ). all ( ) records = [ ] for record in result : for book in record. books : records. append ( book ) result = record...
[ -0.1960086226463318, -0.4292951226234436, 0.7639904618263245, 1.0467948913574219, -0.674147367477417, 0.09981168061494827, -0.9307107925415039, 0.04390496760606766, -0.4201746881008148, 0.5979227423667908, 0.6530864834785461, -0.0800912082195282, -0.6883301138877869, 0.4204893112182617, ...
def testcomovingdistance ( self ) : h0 = 73. 0 for om0 in numpy. arange ( start = 0. 15, stop = 0. 56, step = 0. 2 ) : for ok0 in numpy. arange ( start = - 0. 1, stop = 0. 11, step = 0. 2 ) : for w0 in numpy. arange ( start = - 1. 1, stop = - 0. 85, step = 0. 2 ) : for wa in numpy. arange ( start = - 0. 1, stop = 0. 11...
[ 0.4507784843444824, -0.19442753493785858, 0.6796029806137085, 0.34458211064338684, 0.15419283509254456, 0.7685632109642029, 0.7388998866081238, -0.10937217622995377, 0.30013662576675415, 0.07102588564157486, -0.508036732673645, -0.7002628445625305, -0.9647754430770874, 0.9537423849105835, ...
def _ save _ images ( num _ images ) : global driver extensions = [ " div [ 1 ] / img ", " img " ] _ img _ name = [ ] for n in range ( num _ images ) : try : driver. find _ element _ by _ class _ name ( " pyenc " ) continue except noerror : for ext in extensions : xpath = _ xpath _ base [ " many " ] + ext try : photo =...
[ -1.5127218961715698, 0.7101134061813354, 0.895898699760437, 0.44052422046661377, 0.455937922000885, -1.133750557899475, 0.2415502816438675, -0.08327990770339966, 0.41804569959640503, 0.5886183977127075, -0.8971863985061646, -1.2088398933410645, -0.038375500589609146, 1.149229884147644, 0...
def add _ pkcs _ pad ( msg, block _ size ) : missing _ len = block _ size - ( len ( msg ) % block _ size ) if len ( msg ) % block _ size = = 0 : return msg. encode ('ascii') if ( missing _ len = = 0 ) : return msg. encode ('ascii') + bytes ( [ block _ size ] ) * block _ size else : return msg. encode ('ascii') + bytes ...
[ 1.013743281364441, 0.5443272590637207, 0.7458920478820801, -0.17067034542560577, -0.4259541928768158, 0.22244365513324738, -0.6845329403877258, -0.6553645133972168, 0.7656512260437012, 0.13689900934696198, 0.5918340086936951, -0.38138049840927124, -0.9403615593910217, 1.275669813156128, ...
def _ scale _ and _ crop ( img, seg, crop _ size, train ) : h, w = img. shape [ 0 ], img. shape [ 1 ] if train : # random scale scale = random. random ( ) + 0. 5 # 0. 5 - 1. 5 scale = max ( scale, 1. * crop _ size / ( min ( h, w ) - 1 ) ) #?? else : # scale to crop size scale = 1. * crop _ size / ( min ( h, w ) - 1 ) i...
[ -0.27796804904937744, -0.7418641448020935, 0.9585360288619995, -0.2391500324010849, -0.4691118896007538, -0.4941001832485199, -0.1465190201997757, 0.0993957668542862, 0.8727396130561829, 0.9283851981163025, 0.5081641674041748, -0.5944302082061768, 0.8776912093162537, -0.12381989508867264, ...
def extra _ create _ kwargs ( self ) : return { }
[ -0.28752297163009644, -0.29765814542770386, 0.3511292636394501, -0.3236398696899414, -0.14500832557678223, 0.945822536945343, -0.48163917660713196, -0.4021364748477936, -0.27049508690834045, -0.037644702941179276, -1.6830745935440063, -0.20368832349777222, -0.2851700484752655, 1.4022096395...
def token _ span ( self ) : return self. _ token _ span
[ -0.04548819735646248, -0.3670493960380554, -0.011967047117650509, -0.37617263197898865, -0.2084675133228302, 0.8469011783599854, 0.7342547178268433, 0.32613232731819153, 1.0765928030014038, -1.3457213640213013, -0.158030167222023, 0.9164970517158508, 0.5899027585983276, -0.1615086942911148...
def setformat ( path, filename = none ) : lines = [ ] if filename = = none : with open ( path,'r') as file : for line in file : lines. append ( line. replace ( ", ", ". " ) ) with open ( path,'w') as file : for line in lines : if line = = " " : pass else : file. write ( line ) else : with open ( path + filename,'r') as...
[ 0.4542132616043091, -0.7815610766410828, 0.8020355105400085, 0.09976761788129807, -0.01817839778959751, -0.03292865306138992, -0.18552647531032562, 1.031618595123291, 0.014484294690191746, -0.21595390141010284, 0.4151723086833954, 0.10806886851787567, 0.05313108116388321, 1.010091066360473...
def serialize ( self ) - > str : total = config. magic _ bytes + self. header ( serialised = true ) # tx _ count tx _ count = var _ int ( len ( self. txns ) ) total + = tx _ count # tx _ data for tx in self. txns : total + = tx. serialize ( ) return total
[ 0.11517933756113052, -0.05175020173192024, 0.4693213403224945, -0.8166264295578003, -0.16898006200790405, -0.3828716576099396, 0.17787602543830872, -0.29334381222724915, 0.5301817059516907, 0.017568213865160942, -0.6507203578948975, -0.6829895377159119, -0.45879730582237244, -0.14936736226...
def tokenize ( text ) : text = re. sub ( r " [ ^ a - za - z0 - 9 ] ", " ", text. lower ( ) ) words = nltk. word _ tokenize ( text ) return [ w for w in words if w not in stopwords. words ('english') ]
[ -0.5562459230422974, -0.8966938257217407, 0.5717801451683044, -0.1241173967719078, -0.30328160524368286, 0.6127178072929382, -0.6092850565910339, 0.9974552392959595, 0.01130262017250061, 0.29619312286376953, -1.0358940362930298, -0.4817383885383606, -0.5802375674247742, 0.7868333458900452,...
def bias _ variable ( shape, name = none ) : initial = tf. constant ( 0. 1, shape = shape ) if name = = none : return tf. variable ( initial ) return tf. variable ( initial, name = name )
[ 0.5132386684417725, -0.04271361604332924, 0.461958646774292, -0.23069097101688385, -0.15567483007907867, -0.0047208634205162525, 0.054884590208530426, 0.03813225030899048, -0.6024422645568848, 0.4332869052886963, -1.075749397277832, 1.3151354789733887, 0.13330765068531036, -0.9971281886100...
def total _ consumption ( self ) - > float : return sum ( [ c. c for c in self. cs ] )
[ 0.4134189188480377, -0.34444648027420044, 0.44947734475135803, 0.14121246337890625, 0.6929205656051636, -0.1308096945285797, 0.49939680099487305, -0.6305704116821289, 0.024628382176160812, 0.3597048223018646, -0.29459768533706665, -0.3148115575313568, 0.6508250832557678, -0.369517028331756...
def get _ edges _ specs ( graph, positions ) : df = pd. dataframe ( columns = ['xs ','ys ','alphas'], index = range ( len ( graph. edges ( ) ) ) ) weights = [ d ['weight'] for u, v, d in graph. edges ( data = true ) ] max _ weight = max ( weights ) calc _ alpha = lambda h : 0. 1 + 0. 6 * ( h / max _ weight ) # example ...
[ -0.2924891412258148, -0.2137996256351471, 0.5556905269622803, -0.6126790046691895, 0.00931442528963089, -0.6235290765762329, -0.08655150979757309, 0.6667759418487549, -0.7010290622711182, 0.3677366077899933, 0.6137681007385254, -0.19463959336280823, 0.8634554743766785, -0.5913407802581787,...
def set _ entity _ attributes ( e, d, nf = nf _ uri ) : if e. tag! = " { % s } entitydescriptor " % ns ['md'] : raise metadataexception ( " i can only add entityattribute ( s ) to entitydescriptor elements " ) for attr, value in d. items ( ) : a = _ eattribute ( e, attr, nf ) velt = etree. element ( " { % s } attribute...
[ -0.21028965711593628, 0.20916584134101868, 0.3852280080318451, -0.49702441692352295, 0.272932767868042, 0.6426566243171692, -0.7603752017021179, 0.9098038673400879, 0.39484015107154846, 0.5320125222206116, 1.0091960430145264, 0.16896794736385345, 0.9193315505981445, 1.352756142616272, -0...
def test _ 02 _ sunrise ( self ) : l _ time ='sunrise'l _ time, l _ seconds = timefield ( ). _ rise _ set ( l _ time, self. m _ riseset ) # print ('d1 - 02 - a - seconds { } - " { } " \ n '. format ( l _ seconds, l _ time ) ) self. assertequal ( l _ seconds, ( 6 * 60 + 31 ) * 60 + 56 )
[ -0.33175891637802124, 0.1265183687210083, 0.37788257002830505, 0.07532046735286713, -0.358492910861969, 0.08677445352077484, 0.1364586055278778, -0.6562905311584473, -0.0011368254199624062, -0.45015302300453186, -0.9624854922294617, 0.28415536880493164, 0.42097073793411255, 0.4073077142238...
def login _ required ( func ) : @ wraps ( func ) def view _ wrapper ( * args, * * kwargs ) : if g. user is none : return redirect ( url _ for ('sessions. login ', next = request. path ) ) return func ( * args, * * kwargs ) return view _ wrapper
[ -1.3084526062011719, -0.4640040695667267, 0.7416139245033264, 0.2650795578956604, -0.4661672115325928, 0.5192408561706543, 0.7310625314712524, -0.37693822383880615, 1.2279433012008667, -0.6903433203697205, 0.6402573585510254, 0.8192294836044312, 0.8762607574462891, -0.231484055519104, 0....
def write _ csv ( search, latitude, longitude, places ) : with open ( " csv / { }. { }. { }. csv ". format ( search, latitude, longitude ), " w " ) as f : header ='name, street, city, state, zipcode, latitude, longitude, category'f. write ( header + " \ n " ) for place in places : line = get _ fields ( place ) f. write...
[ -0.46789997816085815, -0.029119838029146194, 0.37609806656837463, 0.05764525383710861, 0.7571642994880676, 0.7737328410148621, -0.1779659539461136, 0.870750904083252, -0.3354383111000061, -0.36737656593322754, -0.31627124547958374, 0.2798844277858734, 0.21872615814208984, -0.05311255902051...
def enzyme _ catalysed _ reaction ( name ) : cat _ model = bgt. new ( name = name ) # construct the external ports. substrate = bgt. new ( " ss ", name = " s " ) product = bgt. new ( " ss ", name = " p " ) # here we build the reaction, again with the rate as a control variable. # again, we assume parameterised have be ...
[ 0.6554393172264099, -0.06724844872951508, 0.752544641494751, -0.10129805654287338, 0.0232754647731781, -0.12085248529911041, 0.12582606077194214, 0.6747597455978394, -0.7715359330177307, 0.014381404034793377, -0.12962685525417328, 0.04672069847583771, 0.570320725440979, 0.12720507383346558...
def get _ 5gnr _ exppwr ( self ) : rdstr = self. queryfloat ( f'conf : nrmm : meas : rfs : enp?') return rdstr
[ -0.17981000244617462, 0.8643829822540283, 0.2864857614040375, -0.3479871451854706, 0.08834866434335709, 0.04082144424319267, -0.26737457513809204, -0.7650457620620728, -0.08856156468391418, 0.3623773157596588, 0.9904001951217651, -0.5804045796394348, -1.732710361480713, 1.0407878160476685,...
def sgf ( self, * * xargs ) - > str : def node _ sgf _ str ( node ) : return " ; " + " ". join ( [ prop + " ". join ( f " [ { v } ] " for v in values ) for prop, values in node. sgf _ properties ( * * xargs ). items ( ) if values ] ) stack = [ " ) ", self, " ( " ] sgf _ str = " " while stack : item = stack. pop ( ) if ...
[ 0.16308648884296417, 0.6181414723396301, 0.769103467464447, 0.33315202593803406, -0.3515952527523041, -0.4656105637550354, -0.26213231682777405, -0.2961154282093048, -0.9151482582092285, 0.18570226430892944, -0.30519238114356995, 0.06475286185741425, -0.29962432384490967, -0.36790391802787...
def fmt _ endereco ( self ) : template = " % s, % s % s < br / > % s < br / > % s < br / > % s - % s " logradouro = self. getlogradouro ( ) numero = self. getnumero ( ) complemento = self. getcomplemento ( ) bairro = self. getbairro ( ) cep = self. getcep ( ) if cep : cep = " % s - % s " % ( cep [ : 5 ], cep [ - 3 : ] ...
[ -0.060839105397462845, -0.6182336211204529, 0.8699407577514648, -0.5371577143669128, -0.4829801619052887, -0.07763135433197021, 0.044390153139829636, 0.40373581647872925, -1.0287461280822754, -0.41342827677726746, -0.025398962199687958, -0.5770469307899475, -0.4821683466434479, -0.12284006...
def teardown ( self ) : db. session. rollback ( )
[ 1.0300740003585815, -0.019555186852812767, 0.4658117890357971, -0.46504002809524536, 1.0761524438858032, 0.39602425694465637, 1.584749460220337, 0.6574591994285583, 0.6843608617782593, 0.0712207555770874, 0.8028147220611572, 0.1937798708677292, -0.5011807084083557, -1.020398736000061, -0...
def rm _ allfiles _ recursively ( self, path ) : path = self. fix _ path ( path ) if self. node _ exists ( path ) : files = self. get _ folder _ contents ( path ) for f in files : if f. entry _ type = = " document " : self. rm _ file ( f. entry _ path ) else : self. rm _ allfiles _ recursively ( f. entry _ path ) self....
[ 0.0925321951508522, 0.3035854399204254, 0.7446330785751343, 0.34810835123062134, -0.2885112166404724, 0.09206404536962509, 0.4759919345378876, -0.3507940173149109, 0.07300202548503876, -0.24216440320014954, 0.0790809765458107, -0.4941450357437134, -0.5566160678863525, 0.9227044582366943, ...
def get _ neighbour _ dict ( array, row, col ) : house _ colour = array [ row, col ] # find the composition of the neighbourhood neighbour _ rows = range ( row - 1, row + 2 ) neighbour _ cols = range ( col - 1, col + 2 ) sub _ array = array. take ( neighbour _ rows, mode ='wrap ', axis = 0 ). take ( neighbour _ cols, m...
[ -0.004903718363493681, 0.19737333059310913, 0.5208225846290588, -0.3442244827747345, -1.0232234001159668, -0.5887966156005859, 0.7828969359397888, 0.5378910303115845, -0.25754642486572266, 0.20174944400787354, -0.2842903733253479, 0.24019770324230194, -0.0856594368815422, 0.628116905689239...
def validate ( self ) : hosts = self. host _ storage. load _ hosts ( ) if not hosts : logger. info ('skip : workers validation.') return logger. info ('init : workers validation.') valid _ hosts, invalid _ hosts = [ ], [ ] for host in hosts : run _ id = self. common _ utils. get _ run _ id _ from _ host ( host ) if ( n...
[ -0.15348930656909943, 0.034311819821596146, 0.5925706028938293, 0.2497011423110962, 0.12274525314569473, 0.34237179160118103, 0.526980996131897, 0.2881310284137726, -0.8341630101203918, -0.012220975011587143, 0.15350955724716187, 0.16425077617168427, -0.22713439166545868, 0.623177528381347...
def acl6pktsallowedrate ( self ) : try : return self. _ acl6pktsallowedrate except exception as e : raise e
[ 1.0064042806625366, 0.474968284368515, 0.36092138290405273, -0.013408309780061245, -0.91944819688797, 0.44413793087005615, 0.045429572463035583, 0.13000313937664032, 0.5620009303092957, -0.2749306559562683, 0.7558844089508057, -0.17746584117412567, -1.0430110692977905, -1.001288890838623, ...
def _ _ init _ _ ( self, ai _ game ) : self. screen = ai _ game. screen self. screen _ rect = ai _ game. screen. get _ rect ( ) # load the card deck image self. image1 = pygame. image. load ('219525 - 200. png') self. rect1 = self. image1. get _ rect ( ) self. rect1. midbottom = self. screen _ rect. midbottom self. ima...
[ -1.0088391304016113, -0.13830725848674774, 0.9305170774459839, -0.49228185415267944, 0.17422378063201904, -0.6538801789283752, -0.3367539048194885, -0.0013707191683351994, -0.30758029222488403, 0.14666521549224854, 0.24937258660793304, -0.5980936288833618, 0.993069052696228, 0.974548041820...
def _ fast _ inference _ init _ state ( input _ signature, buffer _ length ) : def zeros _ for ( batch _ size, shape _ dtype ) : shape, dtype = shape _ dtype. as _ tuple ( ) depth = shape [ - 1 ] return jnp. zeros ( ( batch _ size, buffer _ length, depth ), dtype = dtype ) batch _ size = input _ signature [ 0 ]. shape ...
[ -0.12319499254226685, -0.06302060931921005, 0.5881924629211426, 0.10819731652736664, -0.16384023427963257, -0.3733461797237396, 0.43720829486846924, -0.22306708991527557, -0.1876339316368103, 0.43213194608688354, -0.9645622968673706, 0.01450762152671814, 0.40554919838905334, 0.186109066009...
def create ( filename, config _ file, cancel _ on _ blocking _ job _ failure, minutes _ per _ job, shuffle, strip _ whitespace, verbose, ) : level = logging. debug if verbose else logging. warning setup _ logging ( " auto _ config ", none, console _ level = level ) config = genericcommandconfiguration. auto _ config ( ...
[ -0.05094844102859497, 0.14718034863471985, 0.5370734930038452, 0.39613762497901917, 0.4073609411716461, -0.030951613560318947, 0.4822130501270294, 0.4966413676738739, -1.5651193857192993, 0.23779180645942688, -0.3599206209182739, -0.11906994879245758, 0.3623237609863281, 0.6880039572715759...
def control _ end _ wc ( self, errormsg ) : self. ctx. successful = false self. ctx. abort = true self. report ( errormsg ) # because return _ results still fails somewhen self. return _ results ( ) # self. abort _ nowait ( errormsg ) self. abort ( errormsg )
[ -0.14330820739269257, 0.0674637034535408, 0.4467697739601135, -0.09616505354642868, 0.6624500751495361, 0.4472443759441376, 0.659927487373352, -0.5680477023124695, 0.05086059868335724, -0.25992879271507263, 0.6536105871200562, 0.18073441088199615, -0.8954864740371704, 0.3782537579536438, ...
def debounce ( wait ) : def decorator ( fn ) : def debounced ( * args, * * kwargs ) : def call _ it ( ) : fn ( * args, * * kwargs ) try : debounced. t. cancel ( ) except ( attributeerror ) : pass debounced. t = timer ( wait, call _ it ) debounced. t. start ( ) return debounced return decorator
[ 1.1970304250717163, -0.16529281437397003, 0.7996929883956909, 0.22766925394535065, -0.4332706034183502, -0.10397608578205109, -0.08271560072898865, 0.1524888575077057, 0.13444724678993225, 0.09607864916324615, -0.29562458395957947, -0.1945001631975174, 0.4611795246601105, 0.472906202077865...
def set _ light _ intensity ( self, channel, intensity ) : msg = self. device. send ( " set - actinic - light - intensity ", channel, intensity ) return not msg. iserror ( )
[ -0.708781361579895, -0.2957620322704315, 0.5825233459472656, -0.6193771958351135, 0.20948027074337006, 0.23448659479618073, -0.48077502846717834, -0.43537721037864685, 0.058262284845113754, 0.2851054072380066, -1.2432562112808228, 0.15654680132865906, -1.5651030540466309, -0.49896699190139...
def read _ odometer ( self ) : print ( " this car has " + str ( self. odometer _ reading ) + " miles on it. " )
[ 0.018248209729790688, -0.5921652913093567, 0.6196115016937256, -1.069322943687439, -0.5172501802444458, 0.23296579718589783, -1.2236746549606323, -0.18438424170017242, 0.0981157049536705, 0.11151561141014099, 0.2507237493991852, 0.7578744888305664, -0.4183492064476013, -0.26252031326293945...