text
stringlengths
25
2.19k
embedding
listlengths
768
768
def onchange _ notice _ start ( self ) : context = self. env. context or { } if context. get ('active _ model ','' ) = ='hr. employee': employee _ id = context. get ('active _ ids') employee = self. env ['hr. employee']. browse ( employee _ id ) if self. notice _ start _ date : contract = employee. get _ current _ cont...
[ 0.10866808146238327, -0.810032069683075, 0.5527368783950806, -0.06421315670013428, 0.7359922528266907, -0.2663564383983612, -0.15608105063438416, -0.07924184948205948, 0.3171926438808441, 1.05708909034729, -0.13378195464611053, 1.5222251415252686, 0.7985455393791199, 1.2341173887252808, ...
def test _ bad _ get _ cis ( sample _ labels, sample _ predictions, population _ size, population _ flagged _ count, confidence _ level, exact _ precision, n _ iters, plot _ filename, ) : classification _ confidence _ intervals = classificationconfidenceintervals ( sample _ labels = sample _ labels, sample _ prediction...
[ 0.7542408108711243, 0.3355633318424225, 0.4813327193260193, 1.1363435983657837, 0.41809341311454773, 0.8013417720794678, 0.3271244466304779, -0.21503140032291412, -0.9724381566047668, 0.004157531075179577, 0.033395200967788696, 0.7110550403594971, -0.09306813776493073, 0.09128183871507645,...
def range ( start, limit = none, delta = 1, dtype = none, name = " range " ) : # pylint : disable = redefined - builtin if limit is none : start, limit = 0, start with ops. name _ scope ( name, " range ", [ start, limit, delta ] ) as name : if not isinstance ( start, tensor _ lib. tensor ) : start = ops. convert _ to _...
[ -0.3637896180152893, 0.17347967624664307, 0.8385537266731262, 0.31148236989974976, -0.13324731588363647, -0.33647656440734863, 0.8698495626449585, -0.34679239988327026, -0.2911915183067322, 0.3255684971809387, -0.044543541967868805, 0.4252111315727234, 0.27907878160476685, -1.1917175054550...
def check _ confirm ( self, cr, uid, ids, context = none ) : if type ( ids ) in ( int, long, ) : ids = [ ids ] data _ pool = self. pool. get ('ir. model. data') unconfirmed _ ids = [ ] if context is none : context = { } for registration in self. browse ( cr, uid, ids, context = context ) : total _ confirmed = registrat...
[ -1.0838093757629395, 0.5538529753684998, 0.6930898427963257, 0.32347604632377625, -0.023083554580807686, -1.1399856805801392, 1.0117073059082031, 0.4106253981590271, 0.06488267332315445, 0.6321868300437927, -0.3300434947013855, 0.18462491035461426, 0.22101056575775146, 1.3053967952728271, ...
def set _ image _ dim _ ordering ( dim _ ordering ) : global _ image _ dim _ ordering if dim _ ordering not in {'tf ','th'} : raise valueerror ('unknown dim _ ordering : ', dim _ ordering ) _ image _ dim _ ordering = str ( dim _ ordering )
[ -0.300523579120636, 0.5267976522445679, 0.35373643040657043, 0.20548270642757416, -0.20993375778198242, 0.1536150723695755, 0.19343972206115723, 0.05656440928578377, -0.552678108215332, 0.4644160568714142, -0.5851360559463501, -0.08458921313285828, 0.8639779686927795, 0.6290279030799866, ...
def _ remove _ tags ( self ) : [ tag. extract ( ) for tag in self. soup. find _ all ( self. tags ) ]
[ -0.20876115560531616, -0.2391425371170044, 0.41424643993377686, -0.44301384687423706, 0.600109875202179, -0.48440393805503845, -0.502348005771637, 0.7296072840690613, -0.7082831859588623, 0.2361340969800949, -0.9974849820137024, -0.6417903900146484, -0.017833925783634186, 1.016438484191894...
def feature _ maps _ plot ( feature _ maps, path, n _ cols = 5 ) : n _ time _ steps = feature _ maps. shape [ 1 ] n _ filters = feature _ maps. shape [ - 1 ] n _ rows = math. ceil ( n _ time _ steps / n _ cols ) for n in range ( n _ filters ) : for t in range ( n _ time _ steps ) : ax = plt. subplot ( n _ rows, n _ col...
[ -0.6055713295936584, 0.3706316351890564, 0.5379652380943298, 0.3628515899181366, -0.4004262685775757, 0.3022001087665558, 0.8033510446548462, 0.01680733449757099, -0.517411470413208, 0.09961176663637161, -0.11896022409200668, 0.1228342354297638, 0.7843372821807861, 0.5434269309043884, 0....
def list _ cluster ( datacenter = none, cluster = none, host = none, vcenter = none, username = none, password = none, protocol = none, port = none, verify _ ssl = none ) : if salt. utils. platform. is _ proxy ( ) : details = _ _ salt _ _ [ " vmware _ info. get _ proxy _ connection _ details " ] ( ) else : details = _ ...
[ -0.2566264271736145, 0.7635678648948669, 0.7152636647224426, -0.31004661321640015, -0.15583349764347076, -0.9110407829284668, -0.988975465297699, 0.47656258940696716, 0.6709777116775513, 0.5310387015342712, 0.4274424910545349, 1.4543757438659668, -0.7383180856704712, -0.10696021467447281, ...
def handle _ watch _ movie ( self, instance ) : # movie object is saved to btn. movie > > instance. movie current _ movie = instance. movie # toggle between watch / unwatch current _ movie. is _ watched = not current _ movie. is _ watched # load movie to the gui list for immediate sorting self. load _ movies ( ) # show...
[ 0.23832392692565918, -0.6688251495361328, 0.6332617402076721, 0.21734291315078735, 0.5792952179908752, 0.5077002644538879, 0.4323866367340088, 0.3726183772087097, -0.657034158706665, 0.16273170709609985, -0.47456127405166626, 0.5738521814346313, 0.12469018995761871, 0.5466595888137817, -...
def draw ( self ) : self. drawboard ( ) self. drawhero ( self. hero _ top, true ) self. drawhero ( self. hero _ bottom, false ) self. drawdeck ( self. hero _ top. deck, configuration. top ) self. drawdeck ( self. hero _ bottom. deck, configuration. bottom ) self. drawheroboard ( self. hero _ top, configuration. top ) s...
[ -0.5945726633071899, 0.9242407083511353, 0.8036250472068787, 0.254549503326416, 0.33850428462028503, 0.9799709916114807, 0.4283480942249298, 0.4798447787761688, -0.563113272190094, -0.48714008927345276, -0.4739682674407959, -0.3422091603279114, 0.37299492955207825, 0.6568983197212219, 0....
def validate _ email ( email, allow _ smtputf8 = true, allow _ empty _ local = false, check _ deliverability = true ) : # allow email to be a str or bytes instance. if bytes, # it must be ascii because that's how the bytes work # on the wire with smtp. if not isinstance ( email, ( str, unicode _ class ) ) : try : email...
[ -0.7197584509849548, 0.39677107334136963, 0.6877906322479248, -0.6050291657447815, -0.8316706418991089, -0.5736746191978455, -0.12398557364940643, 0.5904306769371033, -0.7253211140632629, 0.39266252517700195, -0.6917082071304321, 0.9011554718017578, 0.31816720962524414, -0.2286065518856048...
def _ set _ ready ( self ) : self. _ ready = true
[ -0.19939441978931427, -0.31750917434692383, 0.30470433831214905, -0.9717874526977539, 0.42028599977493286, 0.4287123382091522, -0.08077342808246613, 0.5427523255348206, -0.8655654788017273, -0.012806300073862076, -1.1805837154388428, 0.5417832732200623, 0.5682926177978516, 0.27671077847480...
def init _ params _ bi ( options ) : params = ordereddict ( ) # embedding params ['wemb'] = norm _ weight ( options ['n _ words _ src'], options ['dim _ word'] ) # encoder : gru params = get _ layer ( options ['encoder'] ) [ 0 ] ( options, params, prefix ='encoder ', nin = options ['dim _ word'], dim = options ['dim'] ...
[ 0.31075888872146606, 0.09749070554971695, 0.7643470764160156, 0.16609066724777222, -0.15596610307693481, -0.5773094296455383, 0.32254189252853394, -0.01611287333071232, -0.8888088464736938, 0.6073523163795471, -0.7949615120887756, 0.32927560806274414, -0.5047073364257812, 1.064521789550781...
def ang2disc ( nside, lon, lat, radius, inclusive = false, fact = 4, nest = false ) : vec = ang2vec ( lon, lat ) return query _ disc ( nside, vec, radius, inclusive, fact, nest )
[ 0.5123873353004456, -0.30785053968429565, 0.35505232214927673, -1.058743953704834, -0.20097139477729797, -0.29902005195617676, -0.5738258361816406, -0.14563938975334167, -0.45328041911125183, -0.48068857192993164, 0.2279139906167984, 0.29966095089912415, 0.3082348108291626, -0.506376087665...
def get _ messages ( basepath, mtype ) : # get message list path = os. path. join ( basepath,'_ messages _'+ mtype + '. json') messages = [ ] if os. path. exists ( path ) : with open ( path,'r') as msgfile : messages = json. loads ( msgfile. read ( ) ) return messages
[ -0.8535563349723816, -1.0494449138641357, 0.6962342262268066, -0.33401480317115784, 0.49801021814346313, 0.07071277499198914, -0.5715377926826477, -1.4006303548812866, -0.49199044704437256, 0.9102606177330017, -0.5606464147567749, 0.4351784586906433, -0.1810666024684906, 0.8792328238487244...
def _ schedule _ senddao ( self, firstdao = false ) : assert self. mote. dagroot is false # abort if dao disabled if self. settings. rpl _ daoperiod = = 0 : return asnnow = self. engine. getasn ( ) if firstdao : asndiff = 1 else : asndiff = int ( math. ceil ( random. uniform ( 0. 8 * self. settings. rpl _ daoperiod, 1....
[ 0.0588688924908638, 0.43784016370773315, 0.544432520866394, 0.2918124198913574, -0.614046573638916, -0.21634843945503235, 0.7186758518218994, 0.2517966032028198, 0.4007634222507477, 0.03694145008921623, -0.183329775929451, 0.4841423034667969, 0.9987854957580566, 0.5881015062332153, -0.27...
def test _ list _ integer _ min _ length _ 2 _ nistxml _ sv _ iv _ list _ integer _ min _ length _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - minlength - 3. xsd ", instance = " nistdata / list / ...
[ -0.24827484786510468, -0.6404508948326111, 0.4083748757839203, 0.2985333204269409, -0.5647745132446289, 0.22979409992694855, -1.0240694284439087, 0.001504272222518921, 1.2798658609390259, 0.6890912652015686, -0.9956185221672058, 0.2229824811220169, -0.4834817051887512, 0.43152227997779846,...
def _ _ init _ _ ( self, num _ populations ) : self. num _ populations = num _ populations self. populations = [ ] self. matrix = [ ] # init populations for i in range ( self. num _ populations ) : self. populations. append ( population ( i + 1 ) ) # i + 1 is population id # init dispersion matrix for y in range ( self...
[ 0.14659050107002258, 0.3702533543109894, 0.8340160846710205, 0.4335620105266571, 0.022756444290280342, 0.5014631748199463, 0.7224896550178528, -0.2204868048429489, 0.787572979927063, 0.7283331751823425, -0.11963807046413422, -0.8826100826263428, -0.15495657920837402, 0.796798825263977, 0...
def adds _ square _ mission ( self, alocation, asize ) : cmds = self. vehicle. commands print ( " clear any existing commands " ) cmds. clear ( ) print ( " define / add new commands. " ) # add new commands. the meaning / order of the parameters is documented # in the command class. # add mav _ cmd _ nav _ takeoff comma...
[ -0.37935301661491394, -0.8571606278419495, 0.9294389486312866, -0.4643252193927765, 0.4461144506931305, -0.5257715582847595, -0.10231049358844757, -0.21850717067718506, 1.0012015104293823, 0.32067662477493286, 0.11582988500595093, -0.0482453815639019, 0.2906704545021057, 0.4386642277240753...
def stream ( self, name : str ) - > none : job _ object = self. _ get _ job ( name ) if _ is _ pipeline _ child _ job ( job _ object ) : raise pipelinechildjoberror ( job _ id = job _ object. id ) self. _ stream _ logs _ until _ completion ( self. _ runs _ operations, job _ object, self. _ datastore _ operations, reque...
[ 0.3156159818172455, 0.4196144640445709, 0.6380360722541809, -0.21839651465415955, -0.6637571454048157, -0.39534786343574524, 0.33111125230789185, -0.894152820110321, -0.37727898359298706, 0.0061714742332696915, -0.9665160775184631, 0.81002277135849, 0.23459364473819733, 0.1370817869901657,...
def p700 _ verify ( self ) : ctx = self. item _ start ( ) # always first line of test # teensy should be re - enumerating on usb, using a simple delay to let that happen self. log _ bullet ( f " { ctx. item. delay } s wait for boot " ) time. sleep ( ctx. item. delay ) self. log _ bullet ( " done wait " ) port = self. _...
[ -0.0001823238271754235, -0.23198780417442322, 0.7836955785751343, 0.43451130390167236, 1.0654054880142212, -0.49564069509506226, 0.4342072010040283, -0.9114705920219421, -0.15662012994289398, -0.44056543707847595, -1.0320453643798828, -0.006629880052059889, -0.8138166666030884, 0.379349589...
def test _ scriptsinsvn ( self ) : basedir = self. mktemp ( ) os. mkdir ( basedir ) os. mkdir ( os. path. join ( basedir,'bin') ) os. mkdir ( os. path. join ( basedir,'bin ','proj') ) f = open ( os. path. join ( basedir,'bin ','proj ','exy'),'w') f. write ('yay') f. close ( ) scripts = dist. getscripts ('proj ', basedi...
[ 0.1548871546983719, 0.08877965062856674, 0.624406635761261, 0.2773505747318268, 0.8092837333679199, -0.08604998886585236, -0.045960038900375366, -0.37182357907295227, -0.08589138090610504, -0.3150656819343567, -0.0675029307603836, 0.2038373500108719, -0.6983807682991028, 0.1969507336616516...
def square _ images ( path ) : files = glob ( os. path. join ( path,'*. png') ) + glob ( os. path. join ( path,'*. jpg') ) for file in files : im = image. open ( file ) im _ squared = get _ square _ image ( im ) im _ squared. save ( file )
[ -1.1172000169754028, -0.4273955821990967, 0.7958753705024719, 0.3726780116558075, 0.5721806883811951, -0.09705309569835663, 1.0484453439712524, -0.5588593482971191, -0.13151432573795319, 0.3645121455192566, -1.4473297595977783, -0.4549570083618164, 0.6518669128417969, 1.0899399518966675, ...
def wx _ 3 _ koloruj ( self, kolor, lista ) : # koloru nie dzialaja. wszystko na czerowono jest if type ( lista ) = = list : if len ( lista )! = 0 : for x in lista : self. grid. setcellbackgroundcolour ( x [ 0 ], x [ 1 ], kolor ) self. grid. forcerefresh ( )
[ -0.42204031348228455, 0.3148699700832367, 0.5159001350402832, 0.7199146151542664, 0.03173389285802841, -0.041027676314115524, -0.22078494727611542, 0.09324558824300766, 0.6550726294517517, 0.8877700567245483, -0.8497985601425171, 0.4011108875274658, -0.5826944708824158, 1.2291101217269897,...
def _ _ init _ _ ( self ) : self. fermi _ coupling _ constant = ufloat ( 1. 1663786e - 5 * unit. gev * * - 2, 0 * unit. gev * * - 2, tag = " g _ f " ) self. b _ meson _ mass = ufloat ( 5279. 26 * unit. mev, 0. 17 * unit. mev, tag = " m _ b " ) self. b _ meson _ lifetime = ufloat ( 1. 638e - 12 * unit. s, 0. 004e - 12 *...
[ 0.40003564953804016, -0.14204682409763336, 0.9176414608955383, -0.3682114779949188, 0.5374601483345032, 0.09126225113868713, -0.48754769563674927, 0.40687182545661926, -1.1136589050292969, -0.5145748853683472, -0.6104713082313538, 0.06538024544715881, 0.29673588275909424, 1.173700571060180...
def ignore _ subsequent ( instance _ method ) : @ functools. wraps ( instance _ method ) def ignore _ method ( self, * args, * * kwargs ) : pass @ functools. wraps ( instance _ method ) def first _ method ( self, * args, * * kwargs ) : instance _ method ( self, * args, * * kwargs ) setattr ( self. _ _ class _ _, instan...
[ -0.7732661962509155, -0.41733792424201965, 0.9206394553184509, -0.5016087293624878, -0.1230909526348114, -0.005182058550417423, 0.8260436654090881, -0.4248359799385071, 0.6662319898605347, 0.17177337408065796, 0.041837554425001144, 0.22743265330791473, -0.07022345811128616, 0.7004699707031...
def clearweights ( attribute ) : sel = om2. mselectionlist ( ) sel. add ( attribute ) plug = sel. getplug ( 0 ) emptyarray = om2. mdoublearray ( ) datafn = om2. mfndoublearraydata ( ) obj = datafn. create ( emptyarray ) plug. setmobject ( obj )
[ -0.3788745701313019, -0.518302857875824, 0.6089866757392883, -0.5133368372917175, -0.1966381072998047, 0.3205568492412567, 0.2740980088710785, -0.7813835144042969, 0.9427276253700256, 0.6156183481216431, -0.547039270401001, 1.085412859916687, 0.09733526408672333, 0.534294843673706, -0.17...
def root _ name ( self ) : return self. _ root _ name
[ 0.7015589475631714, -0.6290174126625061, 0.25277915596961975, 0.5092774033546448, -0.6794052720069885, 0.6874528527259827, 0.27245864272117615, -0.47363629937171936, 0.7226598262786865, 0.4813447892665863, 0.2344173789024353, 1.339270830154419, 0.27710050344467163, 0.18680360913276672, 0...
def withdraw _ funds ( self, amount ) : url = lendingclub _ url ('accounts ', self. investor _ id,'funds ','withdraw') request _ data = { " amount " : amount } response = self. session. post ( url = url, data = json. dumps ( request _ data ) ) response. raise _ for _ status ( ) return namedtuple _ from _ json ('lending...
[ -1.1154100894927979, 0.35493505001068115, 0.4476645886898041, -0.4280216693878174, 0.259121298789978, -0.38201674818992615, -0.4160825312137604, -1.1186004877090454, -0.07303798943758011, -0.75276118516922, -0.7447974681854248, -0.16432197391986847, -1.364900827407837, -0.02070474997162819...
def get _ depth _ l2 _ snapshot25 ( instrument : str ) : client = publicbitwyrewsclient ( ) client. depth _ l2 _ snapshot25 ( instrument ) while true : print ( " " ) print ( " receiving message " ) success, response, error _ code, error _ msg = client. receive _ conn ( ) if not success : exit _ message ( response, erro...
[ -0.7844431400299072, 0.12663249671459198, 0.7612296342849731, -0.5369784235954285, -0.7317231297492981, 0.21393005549907684, 0.28649547696113586, -1.687729835510254, -0.8817665576934814, -0.9131516814231873, -0.9028964638710022, 1.6201163530349731, -0.2198069840669632, 0.2703118622303009, ...
def get _ errors ( self ) : return self. session ['errors']
[ -0.805280327796936, -0.6224164366722107, 0.1952582448720932, 0.19353318214416504, 0.2446022927761078, -0.13360020518302917, -0.5337786674499512, -1.1401854753494263, 1.0520427227020264, -0.6151151061058044, -0.7545936703681946, 0.34040114283561707, 0.2986886203289032, -0.8319125175476074, ...
def _ make _ dir ( path ) : try : os. mkdir ( path ) except oserror : pass
[ 0.1733817607164383, 0.5650179386138916, 0.4402555227279663, -0.1977662444114685, -0.34441596269607544, 1.6147836446762085, 0.9248420000076294, -1.0910474061965942, -0.44637879729270935, -1.0984740257263184, 0.25155192613601685, -0.7439079284667969, 0.5565966963768005, -0.9409719705581665, ...
def draw _ circle ( pos _ center, radius, img _ shape ) : im = np. zeros ( img _ shape ) x, y = _ draw _ disk ( pos _ center [ 0 ], pos _ center [ 1 ], radius, shape = im. shape [ : 2 ] ) im [ x, y ] = true return im
[ -0.4506075382232666, -0.36038652062416077, 0.2830864191055298, -1.0227872133255005, -0.11884251236915588, -0.21859228610992432, -0.6092466115951538, 0.172732412815094, -0.5213766694068909, 0.5688908696174622, 0.4173271954059601, 0.572162926197052, 0.7025535702705383, -0.7150322198867798, ...
def flatnt _ compare _ plots ( file1, file2, keys, out _ dir = ". / ", ofile _ name = " ", suffix = " " ) : print " error : : not yet setup to make comparison plots from histograms " return
[ 0.34690040349960327, -0.8245229125022888, 0.4379236400127411, 0.5631375312805176, -0.5682595372200012, 0.9398636817932129, 0.5842102766036987, 0.2547970414161682, -0.8311283588409424, -0.01825215481221676, 0.14358976483345032, 0.8848357200622559, -0.5522303581237793, 0.8210545778274536, ...
def test _ build _ umat _ ext ( tmpdir ) : with working _ dir ( tmpdir ) : returncode = build _ umat ( neohooke _ umat, cwd = ". " ) if not len ( glob. glob ( " _ umat *. so " ) ) : assert 0, f " umat not found in { tmpdir } " if " _ umat " in sys. modules : # remove so it can be loaded below del sys. modules [ " _ uma...
[ -0.9081276059150696, 0.3934660851955414, 0.7734842300415039, 0.26260024309158325, -0.09189736098051071, 0.5878388285636902, 0.4796938896179199, -0.2576724588871002, 1.0994317531585693, -0.42061910033226013, -0.8161731362342834, -0.2770133912563324, 0.4399639070034027, 0.3513053059577942, ...
def getallgenderedactivities ( self, gender ) : if gender. lower ( )! = " male " and gender. lower ( )! = " female " : print ( " enter a valid gender ( male / female ) " ) return false gendersortedfiles = [ ] athletes = os. listdir ( self. path ) for athlete in athletes : if gender. lower ( ) = = " male " and " male " ...
[ -0.6942856311798096, 0.13286595046520233, 0.7255663871765137, -0.2020992934703827, -0.3457605540752411, 0.42989158630371094, 0.6576910018920898, -0.14425109326839447, -0.3989141881465912, -0.4615435302257538, -0.5006484389305115, 0.7855768203735352, -0.4642731845378876, 1.4583301544189453,...
def plot _ learning _ curve ( estimator, title, x, y, ylim = none, cv = none, n _ jobs = 1, train _ sizes = np. linspace (. 1, 1. 0, 5 ) ) : plt. figure ( ) plt. title ( title ) if ylim is not none : plt. ylim ( * ylim ) plt. xlabel ( " training examples " ) plt. ylabel ( " score " ) train _ sizes, train _ scores, test...
[ 0.838645875453949, 0.8109681010246277, 0.9117037057876587, 0.08100380003452301, -0.7831009030342102, -0.10324843227863312, 0.14326193928718567, -0.4104049801826477, -0.620127260684967, 0.7070764303207397, 0.08796826750040054, 1.1196242570877075, 0.7473074197769165, 0.06791838258504868, -...
def test _ example _ input _ one _ clone _ close _ entity ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ one ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. table. clone _ row ( " dummy _ input _ one " ) self. assert _ ...
[ -0.21444867551326752, 0.5198912024497986, 0.578001856803894, 1.3000303506851196, 0.06946359574794769, 1.2474368810653687, 0.22239524126052856, -0.17250071465969086, 0.6697524189949036, 0.5344792008399963, 0.574649453163147, -0.10622626543045044, -0.3015851080417633, 0.1392873376607895, 0...
def create _ strings ( self, data ) : out _ tweets = list ( ) for tweet in data : out = " % s | % s " % ( tweet ['retweets'], tweet ['text']. replace ( " \ n ", " " ). replace ( " \ r ", " " ) ) out _ tweets. append ( out ) return out _ tweets
[ 0.37187856435775757, -0.8887494802474976, 0.5386308431625366, -0.630193829536438, 0.061597224324941635, -0.13338521122932434, -0.6340585947036743, 0.17709246277809143, -0.3236391842365265, 0.593784511089325, -0.010266635566949844, -0.1624690294265747, 0.21802005171775818, 0.808253407478332...
def get _ users ( request, search _ text = none, distance _ settings = none, available _ for _ work = none, page = 0, limit = 50 ) : def db _ wrapper ( * args, * * kwargs ) : users = get _ users _ from _ db ( request. db _ session, page, limit, search _ text ) if search _ text : count = len ( users ) else : count = get...
[ -1.069847583770752, 0.35474109649658203, 0.6167346835136414, 0.3087916076183319, -0.3457182049751282, -0.17415492236614227, -0.29185032844543457, 0.24852778017520905, 0.6254923939704895, 0.7604906558990479, 0.0039752935990691185, -0.3205994963645935, 0.0634610578417778, -0.1173212900757789...
def model _ 2 ( seq _ length, embedding _ layer, num _ categories ) : model _ input = input ( shape = ( seq _ length, ), dtype ='int32') embed = embedding _ layer ( model _ input ) fc = timedistributed ( dense ( 100, activation = " relu " ) ) ( embed ) rnn = bidirectional ( lstm ( units = 100, return _ sequences = fals...
[ 0.5936456322669983, -0.35069695115089417, 0.6179376840591431, 0.5642762184143066, -0.41748371720314026, 0.045026201754808426, 0.10954006016254425, -0.05665311962366104, -0.21809400618076324, 0.20555351674556732, -1.038232445716858, -0.03784257918596268, 0.9087834358215332, 0.31339117884635...
def answer _ command ( cmd ) : # get command cmd = cmd. split ('' ) command = cmd [ 0 ] args = cmd [ 1 : ] result = [ ] try : process = subprocess. popen ( cmd, stdout = subprocess. pipe, stderr = subprocess. stdout ) except : # todo : except more specific exceptions? return'command returned non zero exit code'for line...
[ 0.35571181774139404, -1.141890287399292, 0.9618374109268188, 0.12037096172571182, -0.1032710149884224, -0.36955490708351135, 0.3146957755088806, -0.1218988299369812, 0.15517617762088776, 0.16911554336547852, 0.36962172389030457, -0.30396807193756104, -0.5592398047447205, 0.2927157282829284...
def sense ( self, asteroids, bullets ) : return self. _ brain. sense ( self, asteroids, bullets )
[ -0.9263901710510254, -0.17392636835575104, 0.15171225368976593, -0.09392371773719788, 0.2623920142650604, 0.028495103120803833, -0.7915651202201843, -1.5509238243103027, 0.4124683439731598, 0.3136560022830963, -0.7208197116851807, 0.13265259563922882, -0.1189436987042427, -0.69635003805160...
def index ( ) : # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # dataset url or file # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - dataset ='' # dataset url or file if'dataset'in request. args : dataset = request. args. get ('dataset') # url = " http : / / 0. 0. 0. 0 : 18080 / jetty _ bas...
[ -0.19562628865242004, 0.1948937028646469, 0.8691869378089905, -0.44044703245162964, 0.044297557324171066, -0.3678357005119324, 0.28120851516723633, 0.11190667003393173, -0.38775336742401123, 0.9516906142234802, 0.7335323691368103, 0.016487548127770424, -0.15855517983436584, -0.604103505611...
def door _ pf ( self ) - > int : return self. _ vehicle _ data. get ( " vehicle _ state ", { } ). get ( " pf " )
[ -0.2586316466331482, 0.09047850221395493, 0.3718130588531494, 0.2469666600227356, 0.2734137177467346, 0.001499417470768094, 0.21829894185066223, 0.601759135723114, -0.07622021436691284, -0.0801573172211647, -0.2822573781013489, -0.11080355197191238, -1.2797915935516357, -0.0145678929984569...
def draw _ background ( self ) : arcade. draw _ rectangle _ filled ( ( 1400 / 2 ), ( 800 / 2 ), 1200, 800, arcade. color. ash _ grey ) arcade. draw _ line ( 650, 800, 650, 0, arcade. color. black, 10 ) arcade. draw _ line ( 750, 800, 750, 0, arcade. color. black, 10 ) # draws what wave round you are on arcade. draw _ t...
[ 0.7542206048965454, -0.08515489101409912, 1.1544893980026245, -1.198274850845337, 0.7613499164581299, 0.4088951051235199, 0.1102762445807457, -0.013591021299362183, 1.0077199935913086, -0.2927257716655731, 0.34450316429138184, 1.2161210775375366, -0.6466062664985657, 0.9681571125984192, ...
def _ _ print _ most _ likely _ translations ( evaluations, gold ) : with open ( '.. / output / spanish - 3 / distances. csv ','w') as f : # write down the column names f. write ('spanish word, translation, transmat score, google score, index') for word, trans in evaluations. iteritems ( ) : # get the most likely evalu...
[ 0.2974287271499634, 0.08340522646903992, 0.548747718334198, -0.6326434016227722, 0.4942943751811981, 0.5658543109893799, -0.1406315565109253, 0.08145445585250854, -0.17153701186180115, 0.32725614309310913, -0.1210075244307518, 0.13570107519626617, 0.4458690583705902, 0.20459741353988647, ...
def clean _ viewable ( self ) : input _ viewable = self. cleaned _ data. get ('viewable') if not input _ viewable : input _ viewable = false return input _ viewable
[ -0.5061340928077698, 0.22701072692871094, 0.6613965630531311, 0.32096460461616516, -1.2354315519332886, 0.5918461084365845, 0.05971227213740349, -0.3063264489173889, -0.4870864152908325, 0.16131050884723663, 0.16805948317050934, 0.09055853635072708, -0.8942679762840271, 0.12831242382526398...
def test _ atomic _ any _ uri _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ any _ uri _ pattern _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - pattern - 4. xsd ", instance = " nistdata / atomic / ...
[ -0.13961341977119446, -0.22459514439105988, 0.5453343987464905, 0.8887845873832703, -0.41020408272743225, 0.10864140838384628, 0.3453655242919922, 0.021716389805078506, -0.49460336565971375, -0.057077012956142426, -0.3529030978679657, -0.46670618653297424, -0.5687351226806641, -0.313063085...
def _ _ init _ _ ( self, file ) : self. abn _ ret = { } self. abn _ vol = { } self. illiq = { } self. abn _ volat = { } self. dates = ordereddict ( ) with open ( file ) as f : skip = true for line in f : if skip : # skip header skip = false continue # split line of : 0 : date, 1 : ticker, 2 : ln _ mcap, 3 : illiq, 4 : ...
[ -0.010051858611404896, -1.146625280380249, 0.825749397277832, -0.31015869975090027, -0.48273298144340515, 0.009497981518507004, -0.16321563720703125, 0.11801539361476898, -0.6570490598678589, -0.3148604929447174, 0.3131498396396637, 0.006480967625975609, 0.163580060005188, 0.52730894088745...
def download _ file ( ) : p ='d : \ \ python core \ \ flask _ app \ \ info. csv'return send _ file ( p, as _ attachment = true )
[ 0.47302672266960144, -0.4570026397705078, 0.5471106767654419, 0.7103495597839355, 0.317055344581604, 0.35289278626441956, -0.021162573248147964, -0.5139879584312439, -0.9030758142471313, -0.48716771602630615, 0.2660023272037506, 0.6325536966323853, 0.6062986254692078, -0.07181752473115921,...
def get _ all ( _ cls = true ) : return templateversionmanager. get _ all _ version _ manager ( _ cls )
[ -0.5696424841880798, -0.4241747260093689, 0.513176679611206, 1.0000091791152954, -0.46674659848213196, 0.2577117681503296, -0.7510748505592346, 0.20168046653270721, 0.520961344242096, 0.06203892454504967, -0.8702400326728821, 0.4538325369358063, 0.36861467361450195, 1.2514069080352783, -...
def build _ report ( report _ name ) : with open ( " index. md ", " r " ) as f : lines = [ transform _ line ( line ) for line in f ] with open ( " index _ transformed. md ", " w " ) as f : f. writelines ( lines ) sp. call ( [ " pandoc ", " - - template ", ".. / pandoc _ report _ template. tex ", " - - pdf - engine ", "...
[ 0.8661959767341614, -0.35081946849823, 0.6477880477905273, 0.5067983269691467, -0.10153000056743622, -0.1074352115392685, 0.04691523686051369, 1.0480235815048218, -0.42667680978775024, -0.7697973251342773, -0.08294594287872314, -0.2571715712547302, -0.03386132791638374, -0.4306309223175049...
def mc ( n, mu _ a, mu _ s, mu _ t, g, t, w, x, y, z, mu _ x, mu _ y, mu _ z ) : absorbed, reflected, transmitted = 0, 0, 0 threshold = 0. 0001 m = 10 layer = 0 bounds = [ 0 for _ in range ( len ( t ) + 1 ) ] for i in range ( 1, len ( t ) + 1 ) : bounds [ i ] = bounds [ i - 1 ] + t [ i - 1 ] layer = 0 if mu _ z > 0 els...
[ 0.19106285274028778, 0.40881744027137756, 0.6691395044326782, -0.22508390247821808, -0.7513222694396973, -0.5704607963562012, 0.6126672625541687, 0.05522908642888069, 0.9320024847984314, 0.2498224824666977, 0.10750437527894974, 0.45067209005355835, -0.4775266647338867, 1.1456698179244995, ...
def lost ( self ) : # prints text saying what wave you died on arcade. draw _ text ( ( " all is lost \ n died on wave { } ". format ( ( self. wave - 1 ) ) ), 700, 775, arcade. color. red, 14, width = 200, align = " center ", anchor _ x = " center ", anchor _ y = " center " ) # prints text saying how many enemies you ha...
[ -0.39862170815467834, -0.5444342494010925, 0.861757755279541, -1.3158248662948608, 0.5338397026062012, 0.6168295741081238, 0.49215567111968994, 0.16098901629447937, 0.6965531706809998, -0.42074593901634216, 0.17011886835098267, 0.2741239368915558, 0.5308587551116943, 0.5542293190956116, ...
def page _ num _ to _ arabic ( page _ num ) : if page _ num. isdigit ( ) : # don't do anything if number is already arabic return page _ num rn = {'i': 1,'v': 5,'x': 10 } num _ arabic = 0 count = 0 while count < len ( page _ num ) : if count + 1 = = len ( page _ num ) : # last char in stopiteration num _ arabic + = rn ...
[ -0.5863682627677917, -0.7066894769668579, 0.6940770149230957, -0.5660684108734131, -0.40404772758483887, -0.1957395076751709, 0.8196770548820496, 0.10176337510347366, 0.5543683767318726, 0.6042461395263672, 0.70528644323349, 0.23505763709545135, 0.17556342482566833, -0.704123318195343, 0...
def add _ edge ( self, v : int, w : int ) - > none : self. _ adj [ v ]. add ( w ) self. _ adj [ w ]. add ( v ) self. _ e + = 1
[ -0.5820557475090027, -0.046431466937065125, 0.3392690420150757, -0.547139048576355, 0.638913094997406, 0.4708176255226135, 0.11466962844133377, 0.32553356885910034, 0.5646324157714844, 0.28488889336586, 0.09357166290283203, 0.4502130150794983, -0.06078589707612991, 0.5975367426872253, 0....
def get _ instance ( instance _ id : optional [ str ] = none, location : optional [ str ] = none, project : optional [ str ] = none, opts : optional [ pulumi. invokeoptions ] = none ) - > awaitablegetinstanceresult : _ _ args _ _ = dict ( ) _ _ args _ _ ['instanceid'] = instance _ id _ _ args _ _ ['location'] = locatio...
[ -0.5696942806243896, 0.21959179639816284, 0.8756574392318726, -0.47562137246131897, -0.1820179671049118, 0.2683599591255188, -1.0201207399368286, 0.2961820960044861, 0.1318330466747284, 0.3675178289413452, 0.29100745916366577, 1.533674716949463, -1.045175313949585, -0.47645890712738037, ...
def create _ app ( ) : app = customflask ( _ _ name _ _ ) app. secret _ key = os. urandom ( 24 ) app. config. from _ pyfile ('config. py') configure _ extensions ( app ) configure _ blueprints ( app ) configure _ log _ handlers ( app ) configure _ error _ handlers ( app ) configure _ main _ route ( app ) return app
[ 1.0026870965957642, -0.3878081142902374, 0.5681489109992981, 0.912577748298645, -0.10138373076915741, 0.2715625464916229, 0.002576625207439065, 0.4293355345726013, 0.19726347923278809, -0.3505308926105499, -0.9947451949119568, 0.054761458188295364, 0.13900089263916016, 0.6673985719680786, ...
def get _ cached _ outputs ( metadata _ handler : metadata. metadata, cache _ context : metadata _ store _ pb2. context, ) - > optional [ dict [ str, list [ types. artifact ] ] ] : # only success executions should be the producer of cached outputs. cached _ executions = filter ( execution _ lib. is _ execution _ succes...
[ -0.12835951149463654, -0.13606996834278107, 0.45640134811401367, 1.2174357175827026, -0.23958633840084076, -0.4144592881202698, 0.5802959203720093, -1.0144915580749512, 0.23820480704307556, -0.004702750127762556, 0.23737947642803192, 0.6261733770370483, 0.26171648502349854, 0.4015291333198...
async def test _ authenticated _ socks5 _ request ( ) : network _ backend = httpcore. asyncmockbackend ( [ # the initial socks connect # v5 username / password b " \ x05 \ x02 ", # v1 valid username / password b " \ x01 \ x00 ", # v5 suc rsv ip4 127. 0. 0. 1 : 80 b " \ x05 \ x00 \ x00 \ x01 \ xff \ x00 \ x00 \ x01 \ x0...
[ -0.5960912704467773, -0.0906277522444725, 0.7394349575042725, -0.6089168787002563, 0.710405170917511, -0.21495361626148224, 0.4925748407840729, -0.8450526595115662, -0.24756385385990143, -0.20602349936962128, -0.26992911100387573, 0.38659241795539856, -0.84122234582901, -0.2668057382106781...
def test _ default _ data ( self ) : clients = client. query. all ( ) product _ areas = productarea. query. all ( ) users = user. query. all ( ) assert len ( clients ) = = client. query. count ( ) = = 3 assert len ( product _ areas ) = = productarea. query. count ( ) = = 5 assert len ( users ) = = user. query. count ( ...
[ 0.4337645471096039, 0.7752213478088379, 0.06363163143396378, -0.20163734257221222, 1.1824368238449097, 1.056904911994934, 0.8976195454597473, -0.8820275664329529, -0.044570449739694595, -0.6571239829063416, -0.04778033122420311, 0.04583464190363884, 0.30074170231819153, 0.45018744468688965...
def rule _ group _ name ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " rule _ group _ name " )
[ 0.6995657682418823, 0.48538944125175476, 0.21186235547065735, 0.03488072380423546, 0.504535973072052, 0.9944429397583008, 0.3980010747909546, -0.006157648283988237, -0.23640237748622894, 0.7188001275062561, 0.7234341502189636, 1.1123932600021362, 0.11021339893341064, -0.1274159997701645, ...
def remove _ randomico ( lista, qtd _ remocao ) : for i in range ( qtd _ remocao ) : lista. pop ( random. randrange ( len ( lista ) ) ) return lista
[ -0.11978819966316223, -0.27219292521476746, 0.3401920795440674, 0.36851221323013306, -0.4718235731124878, 0.3972439765930176, 0.4479224681854248, 1.425343632698059, 0.5424942970275879, 0.45552530884742737, -1.1048355102539062, -0.4891645908355713, -0.15867838263511658, 0.16425712406635284,...
def _ _ init _ _ ( self, control _ pathname ) : self. display _ mode ='clearing'self. worker _ count = none self. max _ games _ this _ run = none self. presenter = none self. terminal _ reader = none self. stopping = false self. stopping _ reason = none # map game _ id - > int self. game _ error _ counts = { } self. wr...
[ 0.403925359249115, -0.6733019948005676, 0.82741379737854, 0.22909605503082275, 0.04550829157233238, 0.4044936001300812, 0.9533101320266724, -0.4392266273498535, -0.45786052942276, -0.060117918998003006, 0.01080436259508133, -0.5394217371940613, -0.33963409066200256, -0.13746996223926544, ...
def _ ros _ location _ callback ( self, msg ) : self. _ telegram _ updater. bot. send _ location ( self. _ telegram _ chat _ id, location = location ( msg. longitude, msg. latitude ) )
[ -0.31248414516448975, -1.0532526969909668, 0.2421894371509552, -0.47643986344337463, 0.08496607840061188, 0.5797683000564575, 0.445520281791687, 0.015860771760344505, -0.20000435411930084, 0.6227492690086365, 0.048243824392557144, 0.41424065828323364, 1.016079306602478, 0.01005690172314643...
def build _ from _ module ( cfg, module, default _ args = none ) : assert isinstance ( cfg, dict ) and'type'in cfg assert isinstance ( default _ args, dict ) or default _ args is none args = cfg. copy ( ) obj _ type = args. pop ('type') if isinstance ( obj _ type, str ) : obj _ cls = getattr ( module, obj _ type ) if o...
[ -0.4961319863796234, -0.2976687550544739, 0.5537742972373962, 0.010086415335536003, 0.15721605718135834, 0.5130503177642822, -0.2047615945339203, 0.025018511340022087, -0.2520253360271454, 0.46733206510543823, 0.07903119921684265, 0.5136867165565491, -0.47476255893707275, 0.161687552928924...
def configure _ and _ publish _ to _ aws _ iot ( ) : # see documentation : https : / / github. com / aws / aws - iot - device - sdk - python # id3 # connect to the aws iot service # after being a little confused as to why i need a client _ id # found this : https : / / forums. aws. amazon. com / thread. jspa? threadid ...
[ -0.027418142184615135, -0.6604279279708862, 0.5382522344589233, -0.010485440492630005, 0.3719078004360199, 0.08278597891330719, -0.1933010369539261, -0.7008789777755737, -0.09783151745796204, 0.33641359210014343, 0.4912183880805969, 0.6108831167221069, -0.09185850620269775, 0.1903375983238...
def print _ solution ( data, manager, routing, solution, scale ) : # display dropped nodes. dropped _ nodes ='dropped nodes :'for node in range ( routing. size ( ) ) : if routing. isstart ( node ) or routing. isend ( node ) : continue if solution. value ( routing. nextvar ( node ) ) = = node : dropped _ nodes + ='{ } '...
[ 0.022419001907110214, -0.5238579511642456, 0.8573486804962158, -0.6590291857719421, -0.1614879071712494, -0.19017934799194336, -0.15885254740715027, -0.40486642718315125, -0.40057095885276794, 0.5636842250823975, 0.09311091154813766, 0.389314740896225, 0.5983438491821289, -0.03093584626913...
def test _ add _ node _ cleanup ( self ) : # get info from scale _ data _ file for validation if scale _ data _ file : file _ data = templating. load _ yaml ( scale _ data _ file ) namespace = file _ data. get ( " namespace " ) pod _ obj _ file _ list = file _ data. get ( " pod _ obj _ file _ list " ) pvc _ obj _ file ...
[ 0.4382798969745636, -0.33636197447776794, 0.7428016066551208, -0.5044108033180237, 1.0407240390777588, 0.4878099262714386, 0.4413573741912842, -1.0123777389526367, 0.003964957781136036, -0.3164077699184418, 0.28383952379226685, 0.20710277557373047, 0.5499364137649536, -0.005994881503283977...
def test _ atomic _ any _ uri _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ any _ uri _ pattern _ 4 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - pattern - 4. xsd ", instance = " nistdata / atomic / ...
[ -0.41422760486602783, -0.09594351053237915, 0.5692272186279297, 1.1824860572814941, -0.06933106482028961, 0.2223471999168396, 0.23680301010608673, 0.20577925443649292, 0.07456006854772568, 0.09895000606775284, 0.2732187509536743, -0.4576145112514496, -0.4888225495815277, -0.478403687477111...
def set _ voltages ( values, febs = [ ] ) : # we need a list of febs, if only one is given, # generate a list with a single element if type ( febs ) = = int : febs = [ febs ] # use all connected febs if the given list is empty if not len ( febs ) : febs = _ configs. keys ( ) # we need a list of voltages, if only one is...
[ -0.6514976024627686, 0.7400330901145935, 0.6824954152107239, 0.2713771164417267, 0.22401617467403412, 0.36138036847114563, -0.5912519693374634, -0.46671876311302185, 0.34100455045700073, -0.7521270513534546, -0.593325674533844, 0.06961853057146072, -0.19443413615226746, 1.1493299007415771,...
def do _ get _ organizations ( self, args ) : global token global pp headers = { " region " : datacenter, " x - auth - token " : token } custom _ url = url _ act +'/ organizations'print ( custom _ url ) r = requests. get ( custom _ url, headers = headers ) pp. pprint ( r ) if r. status _ code = = 200 : jso = r. json ( ...
[ -0.40875163674354553, 0.14544086158275604, 0.5959969758987427, -0.09496749192476273, 0.5311905145645142, -0.36787834763526917, 0.0642927810549736, -0.11078228056430817, 0.5354598164558411, -0.009991048835217953, 0.29105108976364136, 0.8675504326820374, 0.15616481006145477, -0.0173357818275...
def show _ terms ( ) : return { " site _ name " : settings. site _ name, " admin _ email " : settings. admin _ email, }
[ 0.4239621162414551, 0.49841636419296265, 0.3623896837234497, -1.2692283391952515, -0.3527403771877289, -0.5731260776519775, -0.7280886173248291, -0.7304481267929077, -0.15567277371883392, 1.6122792959213257, -0.9424591064453125, 1.1856721639633179, 0.29971960186958313, 0.11825454235076904,...
def get _ data _ sets ( fixed = false ) : input _ data = np. load ('{ } / input _ data. npy '. format ( data _ dir _ cr ) ) target _ data = np. load ('{ } / target _ data. npy '. format ( data _ dir _ cr ) ) return nn _ utils. all _ data _ to _ data _ sets ( input _ data, target _ data, 0. 7, 0. 15, fixed )
[ 0.27776697278022766, 0.26989617943763733, 0.4429144859313965, -0.2779693007469177, 0.04289807751774788, 0.22017602622509003, -0.0469653457403183, -0.3413938879966736, -0.6331718564033508, -0.25660428404808044, -0.0888017863035202, 1.1989326477050781, 0.4079670011997223, -0.3582299351692199...
def button _ reg _ close ( self, cr, uid, ids, context = none ) : data _ pool = self. pool. get ('ir. model. data') unclosed _ ids = [ ] for registration in self. browse ( cr, uid, ids, context = context ) : if registration. tobe _ invoiced and not registration. invoice _ id : unclosed _ ids. append ( registration. id ...
[ -0.9436845779418945, -0.29077133536338806, 0.7248221039772034, -0.44794750213623047, -0.12258870154619217, -0.12547385692596436, 0.6519858241081238, 0.3295042812824249, 0.09554160386323929, 0.23197631537914276, 0.1929895430803299, 0.23666174709796906, -0.5734901428222656, 0.617267727851867...
def test _ unauthenticated _ upload _ file ( ) : filename ='jazz3 _ solo. wav'user ='dakobedbard'userid = " dakobedbard @ gmail. com " key ='{ } / { } '. format ( user, filename ) s3 = boto3. resource ('s3') s3. object ( s3 _ _ upload _ bucket, key ). delete ( ) s3 _ client = boto3. client ('s3') assert not verify _ ob...
[ 0.04949824884533882, 0.4562150835990906, 0.8837065100669861, 0.31844544410705566, 0.43253040313720703, 1.2704659700393677, 0.5964458584785461, 0.0759032815694809, 0.1170128807425499, -0.427764356136322, -0.6745752692222595, 0.41007331013679504, -0.108001209795475, 0.1530131846666336, 0.2...
def traverse _ subtree _ pre _ order ( self, position : _ position ) - > generator : if not position. is _ owned _ by ( self ) : raise valueerror ( " position doesn't belong to this tree " ) yield position for i in self. get _ children ( position ) : for j in self. traverse _ subtree _ pre _ order ( i ) : yield j
[ -0.20387309789657593, 0.26338493824005127, 0.7498056292533875, 0.45058736205101013, -0.38973888754844666, -0.4248195290565491, 0.12911593914031982, -0.8631076216697693, 0.19255898892879486, 0.049639660865068436, -0.7277118563652039, -0.5440254211425781, 0.03609457239508629, 0.5176199674606...
def first _ transposition ( key, message ) : # pad message with nones for the matrix left rotation to work padded = pad _ to _ multiple ( message, none, len ( key ) ) chunked = list ( chunk ( message, len ( key ) ) ) # zip the chunk rows together to form the new columns and map the result to lists instead of # tuples, ...
[ -0.15912242233753204, 0.3740953505039215, 0.5853500962257385, -1.203511357307434, -0.11030978709459305, -1.6012824773788452, 0.14271509647369385, -0.15573221445083618, -0.1298368275165558, 1.2672455310821533, -0.34991830587387085, -0.7286783456802368, -0.7132607102394104, 0.375163763761520...
def plot _ conditionwise _ raster ( self, unit _ id ) : _ = [ self. plot _ raster ( cond, unit _ id ) for cond in self. stimulus _ conditions. index. values ]
[ 0.3717009425163269, 0.2838556170463562, 0.16322757303714752, -0.03223378583788872, 0.13314920663833618, 0.5741779804229736, 1.0377686023712158, -0.1557791829109192, -0.09421134740114212, -0.40621137619018555, 1.047380805015564, 0.4794562757015228, -0.15278658270835876, 1.0518821477890015, ...
def facet _ list _ to _ bipartite ( facet _ list ) : g = nx. graph ( ) for f, facet in enumerate ( facet _ list ) : g. add _ node ('f'+ str ( f ), bipartite = 1 ) for v in facet : g. add _ node ('v'+ str ( v ), bipartite = 0 ) g. add _ edge ('v'+ str ( v ),'f'+ str ( f ) ) # differentiate node types return g
[ -0.6628240942955017, 0.46501657366752625, 0.5034617185592651, 0.25158122181892395, 0.04599539563059807, -0.2844563126564026, 0.2454119175672531, 0.06856703013181686, 1.1121143102645874, 0.8767896294593811, -0.9620345234870911, -0.3271189033985138, 0.08037178963422775, -0.014961020089685917...
def find _ nearest _ smpl ( pt, vertices ) : dists = ( vertices [ :, 0 ] - pt [ 0 ] ) * * 2 + ( vertices [ :, 1 ] - pt [ 1 ] ) * * 2 minidx = np. argmin ( dists ) mindist = dists [ minidx ] # print ( mindist ) return minidx, math. sqrt ( mindist )
[ 0.09230997413396835, -0.9321297407150269, 0.3620392978191376, -0.18747478723526, -1.9574095010757446, -0.2025325894355774, -0.3500330448150635, -0.765051543712616, 0.8421981334686279, 0.4619308412075043, -1.2766079902648926, 0.785297155380249, -0.6514467597007751, -0.1340397149324417, -1...
def get _ domain _ record ( self, fqdn : str, record : record ) : url = self. domain _ record _ by _ name _ type _ url. format ( fqdn, record. get _ rrset _ name ( ), record. get _ rrst _ type ( ) ) response = requests. get ( url, headers = self. header ) return response
[ 0.16321519017219543, 0.2664710581302643, 0.3513827323913574, -0.2432476133108139, -0.008280068635940552, -0.6948032379150391, -0.9537649750709534, -1.0499757528305054, 0.03432508558034897, -0.41597580909729004, -0.09560966491699219, 1.4545199871063232, -0.3467356860637665, 0.22070531547069...
def load _ instance ( instance _ type : types, instance _ id : int ) - > any : instance _ manager = commonresourceutils. get _ instance _ manager ( instance _ type ) return commonresourceutils. load _ instance _ from _ manager ( instance _ manager, instance _ id )
[ -0.3766641914844513, -0.7348570823669434, 0.27118805050849915, -1.1166125535964966, -0.3821149170398712, 0.17388814687728882, -0.35525771975517273, -0.2838408052921295, 0.22214825451374054, 0.4315435290336609, 0.4679813086986542, 0.7749934196472168, -0.9816883206367493, 0.1524428278207779,...
def _ get _ unravelled _ value ( input _ val ) : log. debug ( " _ get _ unravelled _ value of { }, type { } ". format ( input _ val, type ( input _ val ) ) ) # return value if it's a single number if isinstance ( input _ val, numbers. real ) : return input _ val # if the input _ val is a maya - object ( ie : attribute ...
[ -0.7047943472862244, -0.2624794542789459, 0.6827381253242493, -0.18626081943511963, -0.7405466437339783, -0.6167321801185608, 0.6652106046676636, -0.04130939394235611, 0.3996420204639435, -0.9962590336799622, -0.03378140181303024, 0.5666788220405579, 0.20497311651706696, 0.4260300695896148...
def test _ atomic _ language _ min _ length _ 3 _ nistxml _ sv _ iv _ atomic _ language _ min _ length _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - minlength - 4. xsd ", instance = " nistda...
[ 0.5173087120056152, -0.7048599123954773, 0.272273987531662, 0.06514857709407806, -0.7886902093887329, -0.055894650518894196, -0.521563708782196, -0.37969985604286194, 0.1366109549999237, 0.3342987895011902, -0.5483847856521606, -0.19188308715820312, -0.4605741798877716, -0.2460085302591323...
def label ( ) : # retrieves unlabeled food log from mongodb or csv # displays tokenized food log # multiple choice options ( labels ) for each token # stores response to mongodb global labels global current _ record _ id # specify where label is none single _ document = collection. find _ one ( {'labels': {'$ exists': ...
[ 0.5809829235076904, -0.25592872500419617, 0.5694708824157715, -0.7996881008148193, 0.23251701891422272, 0.20461852848529816, -0.5109796524047852, 0.48258668184280396, -0.07157731801271439, 0.7386667728424072, 1.0924426317214966, 0.11840350180864334, -0.3842901885509491, 0.23455511033535004...
def currency ( self, currency ) : self. _ currency = currency
[ -0.23939964175224304, -0.11992675811052322, -0.1386030912399292, 0.5459759831428528, -0.16333188116550446, 0.7300717234611511, 0.638565719127655, 0.8794313073158264, -0.06671954691410065, -0.12630438804626465, -0.5080668330192566, -0.9561375379562378, -0.4753630757331848, 0.623744010925293...
def dirname _ or _ default ( path ) : if'/'not in path : dirname = default _ user _ dir else : dirname = os. path. dirname ( path ) return dirname
[ -0.45696118474006653, -0.003087444696575403, 0.3352356255054474, 0.969697892665863, -0.2155374437570572, -0.48703277111053467, 0.578118085861206, 0.10093759745359421, 0.17500168085098267, -0.04238330200314522, 0.6491493582725525, -1.0155718326568604, 0.1019367054104805, -0.5202539563179016...
def printmd ( s, c = none, hd ='' ) : if c : cs = f " { hd } < span style ='color : { c }'> { s } < / span > " else : cs = f'{ hd } { s }'# the extra blank lines are necessary when html + md mix printhtml ( " " " < div style = " float : right ; " > " " " ) ipython. display. display ( markdown ( cs ) ) printhtml ( " " "...
[ 0.6408149003982544, 0.2651473581790924, 0.8484675288200378, -0.35481753945350647, -0.3329044580459595, 0.6213813424110413, -0.302903413772583, -0.03683087229728699, 0.2602843940258026, -0.992411732673645, 0.9593276977539062, 1.134384274482727, -0.288310706615448, 0.43002116680145264, 0.0...
def basic _ clean ( string ) : cleaned _ string = string cleaned _ string = cleaned _ string. lower ( ) cleaned _ string = unicodedata. normalize ( " nfkd ", cleaned _ string ). encode ( " ascii ", " ignore " ). decode ( " utf - 8 ", " ignore " ) cleaned _ string = re. sub ( r " [ ^ a - z0 - 9'\ s ] ", " ", cleaned _ s...
[ 0.96687912940979, -0.913611888885498, 0.49872803688049316, -0.21781668066978455, -1.141233205795288, 0.37362998723983765, -0.36172905564308167, 0.04838961362838745, 0.3284962773323059, -0.28254419565200806, 0.24685059487819672, 0.14721475541591644, -0.7536087036132812, -0.11082640290260315...
def do _ get _ ips ( self, args ) : global token global pp headers = { " region " : datacenter, " x - auth - token " : token } custom _ url = dct [ datacenter ] +'/ ips'r = requests. get ( custom _ url, headers = headers ) if r. status _ code = = 200 : global pp pp. pprint ( r. json ( ) ) print ( " number of ips = " + ...
[ -0.8531202077865601, 0.15989528596401215, 0.6156428456306458, -0.525376558303833, -0.005427584517747164, -0.6997487545013428, -0.05708319693803787, 0.5452016592025757, 0.18000292778015137, -0.27914902567863464, -0.011834227479994297, 0.8696175217628479, 0.08118890225887299, -0.648411214351...
def get _ captcha _ challenge ( http _ body, captcha _ base _ url ='http : / / www. google. com / accounts /') : return gdata. gauth. get _ captcha _ challenge ( http _ body, captcha _ base _ url )
[ -0.8807647228240967, -0.49876949191093445, 0.3858119249343872, 0.5209647417068481, -0.03287939354777336, -0.5227433443069458, -0.7205672264099121, -0.201058030128479, -0.09685366600751877, 0.0979541763663292, -1.010665774345398, 0.6993067860603333, 0.03266767039895058, -0.12089450657367706...
def validate _ token _ request ( self, request ) : # first check for fatal errors # if the request fails due to a missing, invalid, or mismatching # redirection uri, or if the client identifier is missing or invalid, # the authorization server should inform the resource owner of the # error and must not automatically r...
[ -0.6053427457809448, -0.020831480622291565, 0.7970829606056213, -0.09577548503875732, -0.09799420088529587, 0.26622289419174194, 0.13354194164276123, -0.057571157813072205, 0.37737569212913513, -0.6610614061355591, 0.8664863109588623, 0.6947876214981079, 0.44683462381362915, -0.22750160098...
def swap _ tiles ( self, coord _ a : tuple, coord _ b : tuple ) : tile _ a _ coord _ id = f " { chr ( ord ('a') + coord _ a [ 0 ] ) } { coord _ a [ 1 ] + 1 } " tile _ a = self. board _ dict [ tile _ a _ coord _ id ] tile _ b _ coord _ id = f " { chr ( ord ('a') + coord _ b [ 0 ] ) } { coord _ b [ 1 ] + 1 } " tile _ b =...
[ -0.5615018010139465, -0.23795247077941895, 0.759800374507904, -1.2257963418960571, 0.05084075778722763, 0.24506300687789917, 0.21629740297794342, 0.5360726118087769, -0.9527915120124817, 0.31012895703315735, -0.2893550395965576, 1.2746795415878296, 0.0035433913581073284, -0.186999648809432...
def exploit _ and _ explore ( self, better _ trainer, hyperparam _ names, perturb _ factors = [ 1. 2, 0. 8 ] ) : # copy model parameters better _ model = better _ trainer. model better _ state _ dict = better _ model. get _ weights ( ) self. model. set _ weights ( better _ state _ dict ) # copy optimizer state ( includ...
[ 0.14835377037525177, -0.16421952843666077, 0.6951096057891846, 0.5158764719963074, 0.6121482253074646, -0.016548946499824524, 0.139250710606575, 0.30107420682907104, -0.27029433846473694, 0.07459560036659241, -0.7244089841842651, 0.7359848618507385, -0.037509623914957047, 0.306761741638183...
def matrixinverse _ pivot ( m ) : n = len ( m ) # c = ( m | id ) c = [ [ 0. 0 for _ in range ( 2 * n ) ] for _ in range ( n ) ] for i in range ( n ) : for j in range ( n ) : c [ i ] [ j ] = m [ j ] [ i ] c [ i ] [ j + n ] = 0. 0 c [ i ] [ i + n ] = 1. 0 # forward elimination and row swapping ( if necessary ) for i in r...
[ -0.2242986559867859, -0.3506964445114136, 1.0981237888336182, -0.5993903279304504, -0.8319718837738037, 0.2649145722389221, 0.4105059504508972, 1.0522058010101318, -0.12138458341360092, 1.1330565214157104, -0.1881004273891449, -0.662053644657135, -1.1617043018341064, 0.03629196435213089, ...
def dimensions ( self ) : raise notimplementederror ('subclass did not override dimensions!')
[ 0.1852784901857376, 0.5680947303771973, 0.5119715929031372, 0.31218764185905457, 0.051139771938323975, 1.1542155742645264, 0.8894917368888855, 0.00014222126628737897, -0.11179394274950027, -1.2702724933624268, -0.6883812546730042, -0.69968181848526, 0.01601278968155384, 1.1514497995376587,...
def check _ values ( line ) : test _ values = [ i for i in range ( 1, 10 ) ] for element in line : if element! ='_': test _ values. remove ( element ) if len ( test _ values ) = = 1 : return true, test _ values [ 0 ] return false, none
[ -0.48573899269104004, 0.5953859686851501, 0.6631458401679993, 0.024398198351264, 0.8040415644645691, -0.22052055597305298, -0.19967176020145416, 0.38863858580589294, -0.7840650081634521, 0.5166416764259338, -1.149773359298706, -0.16650152206420898, -0.2831173837184906, 0.6602761149406433, ...
def _ _ exit _ _ ( self, exc _ type, exc _ val, exc _ tb ) : if not self. _ best _ model : raise exception ( " failed to build any model " ) mlflow. log _ metric ( self. train _ loss, self. _ best _ train _ loss, step = self. _ next _ step ) mlflow. log _ metric ( self. val _ loss, self. _ best _ val _ loss, step = sel...
[ -0.048640601336956024, -0.3770686984062195, 0.4763461947441101, 0.5685396790504456, 0.6287657022476196, 0.3564441204071045, -0.24454578757286072, 0.19183316826820374, -1.0094990730285645, -0.6539399027824402, 0.13991662859916687, 0.27712148427963257, 0.9723150134086609, 0.6337905526161194,...