text
stringlengths
25
2.19k
embedding
listlengths
768
768
def load _ and _ prepare _ data ( tokenizer, max _ len, batch _ size, sentences, labels ) : tokenized _ texts _ and _ labels = [ tokenize _ and _ preserve _ labels ( tokenizer, sent, labs ) for sent, labs in zip ( sentences, labels ) ] tokenized _ texts = [ token _ label _ pair [ 0 ] for token _ label _ pair in tokeniz...
[ 0.11545956879854202, 0.3137405812740326, 0.7316047549247742, -0.35444873571395874, -0.25407665967941284, -0.3736063539981842, -0.07572446018457413, -0.19508866965770721, -0.399882435798645, 0.1838170439004898, -0.2001906782388687, -0.10691622644662857, 0.9542912244796753, -0.56414115428924...
def state _ deleter ( self ) : if not self. _ meta ['config _ getter'] ('allow _ empty') : raise runtimeerror ('state cannot be empty.') attr = self. _ meta ['state _ attribute _ name'] setattr ( self, attr, none )
[ -0.08642478287220001, 0.30951568484306335, 0.4123305380344391, -0.48287808895111084, 0.00614805705845356, 0.38135337829589844, 0.7946756482124329, 0.2009037435054779, 0.32201623916625977, -0.0608152374625206, 0.3527677357196808, 0.3623373806476593, 0.32378652691841125, 0.040644511580467224...
def liststatsby ( ctx, # optional main parameter includevirtualvolumes = none ) : " " " creation of the volume. " " " cli _ utils. establish _ connection ( ctx ) ctx. logger. info ( " " " : " " " " " " includevirtualvolumes = " " " + str ( includevirtualvolumes ) + " " " ; " " " + " " ) try : _ listvolumestatsbyvolumer...
[ 0.4806053936481476, -0.36848923563957214, 0.9479156732559204, 0.15869781374931335, 0.32246556878089905, -0.3737180233001709, -0.07618147879838943, -0.6141197681427002, 0.3440995514392853, 0.20373614132404327, 0.2959652841091156, 0.9314055442810059, -0.39111992716789246, -0.2752186059951782...
def get _ all ( self, brickconfig _ uuid, marker = none, limit = none, sort _ key ='id ', sort _ dir ='asc') : check _ policy ( pecan. request. context,'get _ all') return self. _ get _ configfile _ collection ( brickconfig _ uuid, marker, limit, sort _ key, sort _ dir )
[ -0.671602189540863, 0.4974577724933624, 0.40111491084098816, 1.3119158744812012, 0.49267998337745667, -0.7858524322509766, 0.3204534649848938, 0.4184994399547577, -0.8173241019248962, 0.5097724795341492, -0.6258966326713562, 0.3824270963668823, -0.3423454761505127, 0.11662505567073822, -...
def gauss _ eval ( amplitude, mean, sigma ) : _ norm = 1 / np. sqrt ( 2 * np. pi * sigma * * 2 ) return amplitude * _ norm * np. exp ( - ( gamma - mu ) * * 2 / 2 * sigma * * 2 )
[ 0.490727037191391, -1.065535068511963, 0.1976434886455536, -0.7280881404876709, -1.1499204635620117, 0.2393989861011505, -0.23932841420173645, 0.868626594543457, -0.15739642083644867, 1.1071557998657227, 0.6468195915222168, 1.6727688312530518, -0.6136617660522461, -0.2740095257759094, 0....
def getinfected ( self, city = none ) : base = np. arange ( self. _ _ numpeople ). reshape ( self. grid. shape ) getloc = lambda x : ( x / / base. shape [ 0 ], x % base. shape [ 1 ] ) infected = list ( ) ifx, ify = list ( ), list ( ) if city is none : ifinfected = np. vectorize ( lambda x : true if self. people [ x ]. ...
[ -1.2829843759536743, -1.0823947191238403, 0.8176365494728088, 0.28267282247543335, -0.13690724968910217, -0.24905943870544434, 0.5567265748977661, 0.9669902920722961, 0.5180401802062988, 0.5437248349189758, 0.3568384051322937, 0.1353393942117691, -0.8020887970924377, -0.24582615494728088, ...
def test _ calculation _ df _ split _ with _ different _ variable _ types ( df _ mixed _ types ) : results = { } cut _ offs = { } for split _ col in df _ mixed _ types. columns : test = drophighpsifeatures ( split _ frac = 0. 5, split _ col = split _ col, variables = " all " ) test. fit _ transform ( df _ mixed _ types...
[ -0.26083245873451233, 0.2798159718513489, 0.956849992275238, 0.00216997554525733, 0.6782163977622986, 0.18914742767810822, 1.2913930416107178, 0.3510745167732239, -0.5312135219573975, -0.5089942812919617, -1.3433012962341309, -0.3473828136920929, -0.9635462164878845, 0.5229284763336182, ...
def get _ product _ as _ end _ user _ with _ options ( self, request : servicecatalog _ 20210901 _ models. getproductasenduserrequest, runtime : util _ models. runtimeoptions, ) - > servicecatalog _ 20210901 _ models. getproductasenduserresponse : utilclient. validate _ model ( request ) query = { } if not utilclient. ...
[ -1.4893100261688232, -0.0003142807981930673, 0.6115664839744568, 0.5009208917617798, 0.012244842946529388, -0.05877746269106865, -0.008003875613212585, -1.4418373107910156, 0.48867806792259216, 0.2855389714241028, 0.13250508904457092, 1.234592080116272, -0.5696730017662048, 0.0881156399846...
def name _ get ( self, cr, uid, ids, context = none ) : if not len ( ids ) : return [ ] res = [ ] for record in self. browse ( cr, uid, ids, context = context ) : name = record. employee _ id. name res. append ( ( record. id, name ) ) return res
[ -1.5660043954849243, -0.6320558786392212, 0.5032071471214294, 0.03637365251779556, -0.14244960248470306, -0.39154869318008423, -0.8318809270858765, 0.0780770555138588, 0.25089317560195923, 1.3629059791564941, -0.598343551158905, 0.04790337756276131, -0.19628934562206268, 0.4750248789787292...
def create _ file _ info ( filename, cards _ dict ) : # create file mit keys f = open ( file _ name, " w + " ) for names in cards _ dict : f. write ( names ) f. write ( " \ n " ) f. close ( )
[ -0.09444110840559006, -1.1255886554718018, 0.6033322811126709, -0.7849200963973999, 0.25742587447166443, 0.8523173332214355, -1.0114108324050903, 0.7037401795387268, -1.868703007698059, 0.5163627862930298, -0.5350686311721802, -0.6889241337776184, 1.3371912240982056, -0.005574618466198444,...
def _ _ init _ _ ( self, * args, * * kwargs ) : if kwargs and len ( kwargs ) > 0 : for k, v in kwargs. items ( ) : if k = = " created _ at " or k = = " updated _ at " : setattr ( self, k, datetime. strptime ( v, " % y - % m - % dt % h : % m : % s. % f " ) ) elif k = = " _ _ class _ _ " : pass else : setattr ( self, k, ...
[ -1.0579060316085815, -0.10775540769100189, 0.8592360019683838, 0.6001245975494385, 0.30471423268318176, 0.07975554466247559, -0.31244775652885437, -0.43947136402130127, -0.6279298663139343, -0.18398113548755646, -0.31439414620399475, -0.7652919888496399, 0.18913443386554718, 0.800020635128...
def clients ( ) : app, socketio, _ = api. build _ app ( examples _ dir, false ) app. config [ " testing " ] = true with app. test _ client ( ) as client : socket _ client = socketio. test _ client ( app, flask _ test _ client = client ) yield client, socket _ client
[ 0.3051610291004181, -0.04597611725330353, 0.4224108159542084, -0.2459394633769989, 0.16033123433589935, 0.18253202736377716, 0.38774216175079346, -0.8015357851982117, 0.1945241540670395, -0.23375996947288513, -0.5422700047492981, 1.2117410898208618, 0.20676298439502716, 0.20572920143604279...
def handlelist ( request ) : wob _ type = request. get. get ('type ','' ) class _ id = request. get. get ('class _ id ','' ) print ( wob _ type ) if wob _ type = ='loyalty _ class': results = service. loyaltyclass ( ). list ( issuerid = config. issuer _ id, maxresults ='25'). execute ( ) results = service. loyaltyclass...
[ 0.14122715592384338, -0.5560293197631836, 1.0094990730285645, -0.22443726658821106, 0.6994009017944336, -0.46089717745780945, -0.40434014797210693, -1.0352723598480225, 0.7553028464317322, 0.4185163378715515, 0.4206518232822418, -0.13114191591739655, -0.06532390415668488, 0.930559694766998...
def is _ zone ( char ) : return {'x': true, }. get ( char, false )
[ -0.41722360253334045, 0.19192521274089813, 0.3191421627998352, 0.2681882083415985, -0.4829195737838745, -0.6228718757629395, 0.08345804363489151, -0.20379061996936798, 0.8336132168769836, 0.771491527557373, -1.8169664144515991, -0.10181348770856857, -0.14401282370090485, -0.716738760471344...
def charge _ channel ( channel, charge ) : assert math. isclose ( channel [ - 1 ] [ 1 ], math. inf ) new _ channel = [ ] channel _ iter = iter ( channel ) charge _ iter = iter ( charge ) available, available _ until = next ( channel _ iter ) added, added _ until = next ( charge _ iter ) assert math. isclose ( added, 0,...
[ -0.11762113124132156, -0.33312445878982544, 0.800804615020752, -0.4112420380115509, -0.16133280098438263, -0.13957081735134125, -0.5945484042167664, -0.5153600573539734, -0.018148120492696762, 0.6398504376411438, 0.71909499168396, 0.323750376701355, -0.32225459814071655, -0.187023416161537...
def reset ( self ) : self. move ( 0, 0 )
[ -0.5233460664749146, -0.34150460362434387, 0.18617643415927887, 0.8633061647415161, 1.0662750005722046, -0.10161855071783066, 1.0332121849060059, -0.019734883680939674, -0.468922883272171, 0.27252092957496643, -0.284292995929718, 0.8482269048690796, -0.07470732182264328, -0.809813201427459...
def find _ best _ h _ line ( chars, bounds ) : best _ err = none best _ line = none if len ( chars ) > = min _ rects : w = bounds [ 2 ] - bounds [ 0 ] for left _ ch in chars : if left _ ch. refined _ box [ 0 ] > bounds [ 0 ] + w / 3 : break for right _ ch in reversed ( chars ) : if right _ ch. refined _ box [ 2 ] < bou...
[ 0.09980329871177673, -0.6521047353744507, 0.7004969120025635, 0.226416677236557, 0.09505970776081085, -0.21483388543128967, -0.4555976390838623, -0.7726086378097534, -0.5499130487442017, -0.4472334086894989, -0.4074995815753937, 0.7571135759353638, -0.2106902152299881, 0.5415615439414978, ...
def getinput ( ) : depth = int ( argv [ 1 ] ) if depth < 1 : print " error! depth too small! must be at least 1. exiting. " exit ( 0 ) try : im = image. open ( argv [ 2 ] ) except : print " error : can't open submitted image. exiting. " exit ( 0 ) if im. size [ 0 ] < 10 or im. size [ 1 ] < 10 : # arbitrary dim reqs. li...
[ -1.1722465753555298, 0.6158603429794312, 0.7561432123184204, -0.02090536430478096, -0.33249640464782715, -0.009927760809659958, 0.8473772406578064, -0.26434051990509033, -0.3876875638961792, -0.44761067628860474, 0.12434098869562149, 0.5235671401023865, -0.9528865814208984, 0.4661997258663...
async def setup _ fighters ( self ) : self. users = [ fighter ( * user ) for user in self. users ]
[ -0.33637386560440063, -0.06404761224985123, 0.24270839989185333, 0.7881884574890137, 1.775378942489624, -0.4589529037475586, -0.7869151830673218, 0.520729124546051, -0.7428498864173889, -0.525154709815979, -0.7029582262039185, 0.5692362189292908, 0.009703557007014751, 0.417587548494339, ...
def test _ get _ env ( self ) : pass
[ 0.18722568452358246, 0.10660413652658463, 0.12888015806674957, 1.7039586305618286, 1.0486819744110107, 0.44704243540763855, 1.7036819458007812, -0.4578801095485687, -0.5329557061195374, -1.0388789176940918, -0.2192707061767578, 1.2342534065246582, -0.4685152769088745, -0.25890782475471497,...
def from _ dict ( cls, copula _ dict ) : instance = cls ( ) instance. fitted = copula _ dict ['fitted'] if instance. fitted : x = np. array ( copula _ dict ['dataset'] ) uniques = np. unique ( x ) if len ( uniques ) = = 1 : instance. constant _ value = uniques [ 0 ] else : instance. model = scipy. stats. gaussian _ kde...
[ 0.522462010383606, -0.4545344114303589, 0.3634398877620697, -0.4218127429485321, -0.5372262001037598, 0.6581560373306274, -0.5262168049812317, 0.7343302965164185, 0.7225752472877502, 0.19557036459445953, 0.6637622117996216, 0.06088322773575783, 0.5013431906700134, -0.04339659959077835, 0...
def chunks ( l, n ) : for i in range ( 0, len ( l ), n ) : yield l [ i : i + n ]
[ -0.28746333718299866, 0.5728986859321594, 0.39129558205604553, -0.017834477126598358, -0.16806474328041077, 0.5943095684051514, -1.0199992656707764, -0.4482978880405426, -0.38011491298675537, -0.7051389813423157, -0.6505396366119385, -0.3429277837276459, 0.09863944351673126, 0.609419226646...
def cpcal ( srcdir, destdir = '. / ', fsize = 8400960 ) : # get current date sdate = srcdir. split ('/') [ - 1 ] # get list of current raw calibration files # ( within 10 hours of day changeover ) fspec = os. path. join ( srcdir, " ifu % s _ 0 *. fits " % sdate ) flist = sorted ( glob. glob ( fspec ) ) # record number ...
[ -0.45099619030952454, -0.22598138451576233, 1.0207675695419312, -0.3931812644004822, -1.2819879055023193, 0.3325752913951874, 1.1855813264846802, -0.3567414879798889, 0.5070921182632446, 0.6138706803321838, 0.5805800557136536, 0.11110223084688187, 0.5366116762161255, 0.8766564726829529, ...
def move ( self, direction ) : is _ equal = true for dummy _ tile in self. _ initial _ tiles [ direction ] : temporary _ list = [ ] for dummy _ num in range ( len ( self. _ initial _ tiles [ ( direction + 1 ) % 4 + 1 ] ) ) : temporary _ list. append ( self. _ tiles [ dummy _ tile [ 0 ] + dummy _ num * offsets [ directi...
[ -1.1744898557662964, 0.35307779908180237, 0.878302276134491, -0.40420350432395935, 0.3178887963294983, 0.35575971007347107, 0.8122537136077881, -0.0986756682395935, 0.7024584412574768, 0.24320560693740845, -1.3800435066223145, -0.12172449380159378, -0.6963573694229126, 0.4850967824459076, ...
def predict _ income ( data = { } ) : if ( not'marital _ status'in data or data ['marital _ status'] is none ) : return u'< = 50k'if ( data ['marital _ status'] = ='married - civ - spouse') : if ( not'education _ num'in data or data ['education _ num'] is none ) : return u'< = 50k'if ( data ['education _ num'] > 12 ) :...
[ -0.7082724571228027, -0.3111313283443451, 0.9555445909500122, -0.1327609121799469, -0.9551013708114624, 0.33109554648399353, 0.1650550663471222, 0.3579850196838379, 0.3672536611557007, 0.11439653486013412, 0.04454509913921356, 0.1324976086616516, -0.001415204955264926, 0.2547087073326111, ...
def _ _ init _ _ ( self, size : int = 5, has _ treasure : bool = false ) - > none : assert type ( size ) is int self. maze _ width = size self. maze _ height = size self. size = size self. has _ treasure = has _ treasure self. treasure _ found = 0 self. treasure _ left = 0 self. treasure _ map = none self. position _ a...
[ -0.0543663315474987, -0.05298571661114693, 0.6237327456474304, 0.3377046585083008, 0.1952512562274933, -0.1537349820137024, 1.609570026397705, -0.20590245723724365, 0.8772683143615723, 0.08861402422189713, -0.4400029480457306, -0.5271602272987366, 0.23949424922466278, 0.7782127261161804, ...
def _ _ init _ _ ( self, sequence = none, * * kwargs ) : if sequence : self. sequence = sequence else : # use the default sequence self. sequence = conf. default _ sequence kwargs ['editable'] = false models. bigintegerfield. _ _ init _ _ ( self, * * kwargs )
[ -0.614003598690033, 0.5921311378479004, 0.47088858485221863, 0.37503302097320557, 0.20264825224876404, -0.22517195343971252, 0.28417739272117615, 1.1048914194107056, 0.06756787747144699, -0.10821649432182312, -1.5741972923278809, -0.7606285214424133, -1.1015267372131348, 0.4076370000839233...
def set _ ch _ to _ examine ( self, ch _ to _ examine ) : self. ch _ to _ examine = ch _ to _ examine
[ -0.3125231862068176, -0.36733776330947876, 0.4517384171485901, -0.8017312288284302, 0.34696295857429504, 1.2399407625198364, 0.3810943365097046, -0.23877555131912231, -0.8337398767471313, -1.2945318222045898, 0.2883930206298828, 1.1679562330245972, 0.29820874333381653, -0.1977812796831131,...
def transform _ output _ arg ( dir : str ) - > str : dir = dir. strip ('"') return rf'{ dir } \ % ( title ) s. % ( ext ) s '
[ -0.962325394153595, -0.5023077130317688, 0.6865808367729187, -0.636864960193634, -0.6407508254051208, -0.08112023025751114, 0.15889620780944824, 0.7025799751281738, -0.7086319327354431, 0.4842875897884369, 0.5127692818641663, 0.763423502445221, 0.5522525906562805, -0.2625562846660614, -0...
def transform ( self, x, y = none ) : return np. array ( [ skimage. color. rgb2gray ( img ) for img in x ] )
[ -1.2492040395736694, 0.5392500758171082, 0.6544721722602844, -0.275204062461853, 0.6383402347564697, 0.05496586114168167, -1.1042150259017944, -0.24929416179656982, 0.41935569047927856, 0.5651159286499023, -0.14801473915576935, 1.0379151105880737, -0.0385415256023407, 0.6993387937545776, ...
def test _ list _ integer _ min _ length _ 4 _ nistxml _ sv _ iv _ list _ integer _ min _ length _ 5 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - minlength - 5. xsd ", instance = " nistdata / list / ...
[ -0.3665567636489868, -0.4748590290546417, 0.26317912340164185, 0.44535544514656067, -0.7750458121299744, -0.12907534837722778, -0.08444125205278397, -0.38165730237960815, 0.9632532000541687, 0.660567581653595, -1.2051756381988525, -0.1677890419960022, -1.1624655723571777, 0.703102350234985...
def remove ( self, key : int ) - > none : slot = self. hashkey ( key ) for i, ele in enumerate ( self. table [ slot ] ) : elekey, elevalue = ele if key = = elekey : del self. table [ slot ] [ i ] return
[ -0.42637521028518677, 0.36115631461143494, 0.6350125670433044, 0.14615127444267273, -1.5566318035125732, 0.24787957966327667, 0.434649795293808, 0.9009568691253662, -0.6529936790466309, 0.9314897656440735, -0.14846941828727722, -0.7566662430763245, -0.28290513157844543, 0.897276759147644, ...
def prestage _ images ( context, subcloud, payload ) : prestage _ software _ version = payload. get ( consts. prestage _ request _ release, sw _ version ) extra _ vars _ str = " software _ version = % s " % prestage _ software _ version image _ list _ filename = none deploy _ dir = os. path. join ( deploy _ base _ dir,...
[ -1.151376724243164, 0.06899111717939377, 0.7504214644432068, 0.18416358530521393, 0.3865260183811188, 0.3068011701107025, 0.32455936074256897, 0.9429304003715515, -0.46752479672431946, 1.5096019506454468, -0.8426336646080017, -0.09069877862930298, 0.22379836440086365, 0.7903242707252502, ...
def get _ log ( self ) : lines = self. _ raw _ log _ lines ( ) result _ lines = [ ] log _ pattern = re. compile ( r'^ \ [ (. *? ) \.. *? \ ] \ ] (. + ) $') for line in lines : match _ result = log _ pattern. match ( line ) if match _ result : result _ lines. append ('[ % s ] % s'% ( match _ result. group ( 1 ), match _...
[ -0.19471359252929688, -0.5005704760551453, 0.758945643901825, 0.5953558087348938, 0.08455140143632889, -0.7145797610282898, -0.25041988492012024, 0.06257149577140808, -0.33596527576446533, -0.16603530943393707, -0.19194208085536957, 0.3961688280105591, 0.38377776741981506, -0.2484819293022...
def is _ running ( self ) : return self. _ loop _ implem is not none
[ -0.630776584148407, -0.13339431583881378, 0.4723983705043793, 0.3045741021633148, 0.3381100296974182, 0.5062295794487, 0.12295249849557877, 0.26793166995048523, 0.1010773777961731, 0.009371575899422169, -0.33310309052467346, 0.2993973195552826, -1.2949014902114868, 0.4855582118034363, -0...
async def handle _ status _ command ( self, message : message ) : # get the arguments to the command. _ command, * args = message. content. split ('' ) args =''. join ( args ) matches = re. match ( discord _ status _ pattern, args ) if matches : activity _ type = matches. group ('type') if activity _ type : # discord. ...
[ -0.1624508500099182, 0.017633778974413872, 0.5223603248596191, 0.21971823275089264, 1.3029837608337402, -0.3731858730316162, 0.31171274185180664, 0.39820531010627747, 0.5916352868080139, 0.2685452401638031, 0.16065184772014618, 0.7123128771781921, -0.8215019702911377, 0.23055461049079895, ...
def exec _ shell ( cmd, stdin = none, stdout = none, stderr = none, env = none, cwd = none, wait = false, timeout = none ) : if timeout! = none and float ( timeout ) < 1 : timeout = 1 printw ('changing timeout to 1 second') printi ('- - - pmfuzz run info begin - - - \ n') printi ('cmd : % s \ n'% (''. join ( cmd ) ) ) ...
[ 0.6200534105300903, -0.16008225083351135, 0.9405909180641174, 0.04399074614048004, -0.6986616253852844, -0.09076357632875443, 0.17320944368839264, 0.16402532160282135, 0.11929632723331451, -0.3530791997909546, 0.6351697444915771, 0.08629780262708664, -0.368461012840271, 0.7929208278656006,...
def merge _ artifacts ( cls, dominant, recessive ) : ret = cls ( dominant. groupid, dominant. artifactid, dominant. extension, dominant. classifier, dominant. version, dominant. namespace ) for key in ( " artifactid ", " groupid ", " extension ", " version ", " classifier ", " namespace " ) : if not getattr ( ret, key ...
[ -0.5530440211296082, -0.44147855043411255, 0.37627848982810974, 0.5131232142448425, -0.2882598340511322, 0.12549366056919098, -0.06014324724674225, -0.5595577955245972, -0.11537718027830124, -0.5547584891319275, 0.050053879618644714, 0.16292764246463776, 0.07093492895364761, -0.78290301561...
def createtable ( self ) : self. cursor. execute ('create table if not exists top _ spam ( channel _ id integer not null, stream _ id'' integer not null, spam _ text string, spam _ occurrences integer, spam _ user _ count'' integer, foreign key ( channel _ id ) references channels ( channel _ id ) )')
[ 1.5429872274398804, -0.4089176654815674, 0.5288253426551819, -1.136754035949707, 0.5205106139183044, 0.312271386384964, 0.17128407955169678, 0.6162765622138977, -0.3712518513202667, 0.024324554949998856, -0.45753923058509827, 0.7174975275993347, -1.2438459396362305, 0.4251646399497986, 0...
def toarray ( self, arr = none ) : if arr is none or type ( arr ) is not dicttype : x = { } else : x = arr. copy ( ) x = taskdefinition. toarray ( self, x ) # specific fields x ['registry _ uid'] = self. registry _ uid x ['registry _ description'] = self. registry _ description x ['registry _ url'] = self. registry _ u...
[ -0.9409633874893188, 0.02234276384115219, 0.6215416193008423, 0.3492014408111572, 0.35153087973594666, -0.2475801259279251, 0.48559537529945374, 0.3324227035045624, 0.3446269631385803, 0.7566450834274292, -1.3423479795455933, 1.1359604597091675, 0.42932233214378357, 0.9647541642189026, 0...
def arctanh ( x ) : try : if x. val < = - 1 or x. val > = 1 : raise valueerror ('math domain error') return variable ( x. name, np. arctanh ( x. val ), { k : v / ( 1 - x. val * * 2 ) for ( k, v ) in x. der. items ( ) }, false ) except attributeerror : if x < = - 1 or x > = 1 : raise valueerror ('math domain error') ret...
[ 0.3520381450653076, 0.3245161175727844, 0.45990708470344543, 0.1510760486125946, -0.9733418226242065, 0.8018813729286194, -0.14567700028419495, -0.7241506576538086, -0.29025501012802124, -0.5686436891555786, 0.31569603085517883, 0.9258611798286438, 0.47725021839141846, -0.6758031249046326,...
def test _ atomic _ any _ uri _ length _ 3 _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 4. xsd ", instance = " nistdata / atomic / any...
[ 0.0960720032453537, -0.41639646887779236, 0.34739378094673157, 0.5659175515174866, -0.44484370946884155, -0.37563493847846985, -0.3543756604194641, -0.13641482591629028, -0.3847043812274933, -0.06785174459218979, -0.18657530844211578, -0.5385181903839111, -0.24451227486133575, 0.1281105577...
def base _ url _ defined ( self ) : return self. base _ href
[ 0.5180070400238037, -0.9492763876914978, 0.6413396000862122, 0.9095776677131653, 1.2101688385009766, 0.9528087973594666, -0.2977401912212372, 0.4161607325077057, -0.8784545063972473, -0.14439715445041656, 0.08779207617044449, 0.3539577126502991, -0.6806516647338867, 0.6599390506744385, -...
def test _ update _ env ( self ) : pass
[ -0.4626154899597168, -0.7984892725944519, 0.4091700613498688, 1.3724712133407593, 0.0755196213722229, 1.1067662239074707, 1.6071573495864868, 0.0009159892797470093, -0.3288376033306122, -0.3265742361545563, -0.47735166549682617, 0.7037423253059387, -0.3807343542575836, -0.1360374540090561,...
def obtain _ lock ( lock _ file ) : # check for lockfile. lockfiles should be in afs and should contain the # hostname, the uid, and the pid of the process. retry = 60 while retry < retry _ max and os. path. exists ( lock _ file ) : # if on local machine, see if that pid still exists. if not, continue. try : fh = open ...
[ 0.7784059047698975, -0.4841702878475189, 0.6162784099578857, 0.20742245018482208, 0.853529155254364, 0.3722080886363983, 0.22360900044441223, -0.018479211255908012, -0.7320928573608398, -0.837774395942688, 0.3311687707901001, 0.29753991961479187, 0.27879998087882996, -0.11326787620782852, ...
def urlparse ( url ) : def swap ( a, b, d = false ) : return ( a, b ) if d = = false else ( b, a ) def decode2 ( a, c, left = true ) : b = a. split ( c ) if len ( b ) = = 2 and len ( b [ 0 ] ) = = 0 : raise url ( " illegal format " ) return swap ( b [ 0 ], none, left ) if len ( b ) = = 1 else ( b [ 0 ], b [ 1 ] ) try :...
[ -0.8086293935775757, -0.21290162205696106, 0.7407700419425964, -0.15789727866649628, -0.6937547922134399, 0.124558225274086, -0.09566602110862732, 0.5982275009155273, 0.1210552230477333, -0.5283021926879883, -0.42461469769477844, -0.13018383085727692, -0.9516118168830872, -0.52987474203109...
def voxel _ conv ( input _ tensor, scope, *, n _ filters, filter _ size, stride, pad ='valid ', init _ scale = 1. 0, data _ format ='ndhwc ', one _ dim _ bias = false ) : if isinstance ( filter _ size, list ) or isinstance ( filter _ size, tuple ) : assert len ( filter _ size ) = = 3, \ " filter size must have 2 elemen...
[ 0.5482339859008789, -0.3009975552558899, 1.0365229845046997, 0.03468737751245499, -0.5379086136817932, -0.06316692382097244, -0.17113754153251648, -0.040841538459062576, -0.13538308441638947, 1.1196472644805908, 0.31511634588241577, 1.5004523992538452, 0.24929997324943542, -0.4530029892921...
def _ set _ ipv6 _ network _ details ( self, network, nic ) : nic. address6 = network [ " ip _ address " ] nic. netmask6 = self. _ ipv6 _ netmask _ to _ prefix ( network [ " netmask " ] ) for route in network. get ('routes ', [ ] ) : if route [ " network " ] = = " : : " : nic. gateway6 = route [ " gateway " ]
[ 0.31307142972946167, -0.5384756326675415, 0.4057142436504364, -0.025422831997275352, 1.0078812837600708, -0.6863341331481934, -0.11362189054489136, -0.03607422485947609, 0.2885662913322449, 0.47899752855300903, -0.7188350558280945, -0.5721600651741028, 0.47054624557495117, 0.28220596909523...
def write _ sts _ token ( self, profile, access _ key _ id, secret _ access _ key, session _ token, region = none ) : region = region or self. region output = " json " if not os. path. exists ( self. creds _ dir ) : os. makedirs ( self. creds _ dir ) config = safeconfigparser ( ) if os. path. isfile ( self. creds _ fil...
[ 0.26681312918663025, -1.1143324375152588, 0.5663354396820068, -0.3662886917591095, 0.24417003989219666, -0.011299933306872845, -0.05131426826119423, 0.2846074402332306, -0.15009839832782745, 0.18931236863136292, -1.104131817817688, 0.6966299414634705, 0.5621874928474426, -0.289754629135131...
def id _ from _ uri ( uri ) : return uri. split ( " : " ) [ - 1 ]
[ -0.40943044424057007, -0.5196135640144348, 0.5323876738548279, 0.2515031397342682, 0.2810969054698944, 0.593202531337738, 0.014780540019273758, -0.23806093633174896, 0.5618126392364502, 0.2797694802284241, 0.05804234743118286, -0.5272893905639648, -1.8364771604537964, -1.985576868057251, ...
def freeze _ vars ( model, var _ name, freeze _ bn = false ) : assert var _ name in [ " weight ", " bias ", " popup _ scores " ] for i, v in model. named _ modules ( ) : if hasattr ( v, var _ name ) : if not isinstance ( v, ( nn. batchnorm2d, nn. batchnorm2d ) ) or freeze _ bn : if getattr ( v, var _ name ) is not none...
[ -0.6301764845848083, -0.6346955299377441, 0.48666322231292725, 0.032568566501140594, -0.6552179455757141, 0.9354771375656128, 0.31722235679626465, -0.7929884791374207, -0.918021559715271, 0.69601970911026, -0.5906863212585449, -0.16392549872398376, -0.5099330544471741, 1.6458868980407715, ...
def recommend _ courses _ view ( request ) : user = request. user curr _ courses = request. data. get ( " curr _ courses ", none ) curr _ courses = curr _ courses if curr _ courses is not none else [ ] past _ courses = request. data. get ( " past _ courses ", none ) past _ courses = past _ courses if past _ courses is ...
[ 0.2592300772666931, 0.08891870826482773, 0.9468112587928772, 0.03457820415496826, -0.7882356643676758, -0.09238158166408539, 0.4027208387851715, -0.6214911937713623, -0.5505871176719666, 0.7901225090026855, 1.280432105064392, 0.521797239780426, 0.25667130947113037, 0.07918816804885864, -...
def model _ dump _ to _ file ( model _ file, model ) : with open ( model _ file, " w " ) as f : for segment in model : coord1, coord2 = segment f. write ( " { } { } { } : { } { } { } \ n ". format ( * coord1, * coord2 ) )
[ -0.774117648601532, -1.2773882150650024, 0.4940411448478699, -0.7027041912078857, 1.2208362817764282, 1.6010322570800781, 0.7692091464996338, 0.3775922954082489, -1.2431237697601318, 0.5958605408668518, -0.9405440092086792, -0.4865954518318176, 0.48942580819129944, 0.02764972299337387, -...
def removerows ( self, position, rows = 1, index = qmodelindex ( ) ) : self. beginremoverows ( qmodelindex ( ), position, position + rows - 1 ) del self. cars [ position : position + rows ] self. endremoverows ( ) self. datachanged. emit ( index, index ) return true
[ -0.8307691812515259, 0.546579122543335, 0.5455328822135925, -0.6122334599494934, -1.1739556789398193, -0.5368441939353943, -0.4212871491909027, 0.6141618490219116, 0.24380944669246674, -0.012157779186964035, -0.7445304989814758, -0.9390460252761841, -0.7582168579101562, -0.0454963035881519...
def glauber _ sweep ( self ) : for _ in range ( self. _ x * self. _ y ) : self. glauber _ step ( ) return self. _ spins
[ -0.4602479040622711, -0.2392856776714325, 0.30776429176330566, 0.629178524017334, -0.12196268141269684, 1.31264066696167, 0.6243429183959961, -0.8177905082702637, -0.5709033608436584, -0.1037387102842331, -0.25057274103164673, 0.06382730603218079, -0.38004642724990845, 0.19072195887565613,...
def serve _ werkzeug ( self ) : r = self. flask. run ( debug = self. debug, port = self. port, threaded = true ) logger. info ( " started werkzeug server : % s " % r )
[ 0.12505599856376648, -0.6108458042144775, 0.46330350637435913, -0.13373351097106934, 1.6634855270385742, -0.1094117984175682, 0.5630491375923157, -0.31000182032585144, -0.35536736249923706, -0.21485969424247742, 0.2749350666999817, 1.6868184804916382, -0.9291194081306458, 1.105937600135803...
async def wheeze ( self, ctx, *, text : union [ discord. member, str ] = none ) : if text is none : text = ctx. message. author async with ctx. channel. typing ( ) : wheeze _ img = await self. make _ wheeze ( text ) if wheeze _ img is none : await ctx. send ( " sorry something went wrong! " ) return file = discord. fil...
[ -0.28955066204071045, 0.9792360067367554, 0.6459633708000183, 0.22730262577533722, -0.6477566957473755, 1.0396521091461182, -0.01049040351063013, 0.45260122418403625, -0.15200646221637726, -0.5784436464309692, -0.16395245492458344, 1.4026378393173218, -0.07816054672002792, 0.68438917398452...
def vix _ change _ strategy ( data, vix _ close _ column ='vixclose ', vix _ window _ size = 3 ) : # calculate vix close ma vixma = data [ vix _ close _ column ]. rolling ( window = vix _ window _ size ). mean ( ) vixma. dropna ( inplace = true ) # remove na values we get in prevous step # buy if vix increases data = d...
[ -0.3521541357040405, 0.32367631793022156, 0.9032307863235474, 0.2456863522529602, -0.4527572691440582, 0.19681233167648315, -0.044092610478401184, 0.6661527156829834, 0.2895847260951996, 0.45399239659309387, 0.003974446095526218, 0.5582225322723389, 0.44654566049575806, -0.0584342256188392...
def parse _ image _ meta ( meta ) : image _ id = meta [ :, 0 ] original _ image _ shape = meta [ :, 1 : 4 ] image _ shape = meta [ :, 4 : 7 ] window = meta [ :, 7 : 11 ] # ( y1, x1, y2, x2 ) window of image in in pixels scale = meta [ :, 11 ] return { " image _ id " : image _ id. astype ( np. int32 ), " original _ imag...
[ -0.1424816995859146, -0.6520330309867859, 0.7217261791229248, -0.9968339800834656, -0.6322652101516724, -0.6527585387229919, -0.2809305489063263, -0.38515180349349976, -0.42467647790908813, 1.310897707939148, -0.3049200475215912, 0.2080412656068802, 0.7686789631843567, 0.3404853343963623, ...
def modulereserved ( self ) : return self. modulereserved
[ -0.1932673156261444, -0.2535721957683563, 0.30580276250839233, -0.7963547110557556, 1.093443512916565, 1.1004114151000977, -0.10633750259876251, 0.10167189687490463, 0.7064265608787537, -0.20440946519374847, -0.6438214182853699, 0.9633919596672058, -0.29999712109565735, -0.6879265904426575...
def create _ gradmanager _ and _ optimizers ( self, optimizers _ cfg ) : # check for _, cfg in optimizers _ cfg. items ( ) : if not isinstance ( cfg, dict ) : raise runtimeerror ( " please use'dict of dict'style for optimizers config ( used in grad manager too ) " ) self. gms = build _ gradmanagers ( self, optimizers _...
[ -1.0358703136444092, -0.12942048907279968, 0.1903538852930069, 0.25140392780303955, 0.7438029646873474, 0.6465383768081665, 0.38850900530815125, -0.07645048946142197, -0.2569248676300049, -0.011976849287748337, -0.6196454167366028, 0.06517285108566284, -0.42047959566116333, 1.2215373516082...
def test _ verbose _ initialization ( self ) : with client _ manager ( verbose = true ) as test _ client : assert isinstance ( test _ client. verbose, bool ) assert test _ client. verbose is true test _ client. verbose = false assert test _ client. verbose is false with pytest. raises ( assertionerror ) : for invalid _...
[ 0.7478215098381042, 0.3437293469905853, 0.26233282685279846, 0.136635422706604, 1.1838630437850952, 0.2724120020866394, -0.5139704942703247, -0.0019501885399222374, -0.6571798324584961, 0.01010176632553339, -0.349669873714447, 0.4431907832622528, -0.8652735352516174, 1.2772032022476196, ...
def graph ( self, name ) : return graph ( self. base _ url, name, self. user, self. password, self. token, self. credential _ file )
[ -0.3393317759037018, -0.12959137558937073, 0.27937987446784973, -0.12254314124584198, -0.8132292032241821, 0.03024517372250557, -0.8073810338973999, -0.22864429652690887, 0.12223894894123077, 0.05692967027425766, -0.6643227338790894, 0.5319321751594543, -0.5418087840080261, -1.070423722267...
def _ _ init _ _ ( self ) - > none : self. new _ hash _ table = linearprobehashtable ( 250726, 1000081 ) self. dic = dictionary ( 250726, 1000081 ) # based on task 2 observation self. dic. load _ dictionary ( " english _ large. txt ", 10 ) self. max _ word = ( " ", 0 )
[ 1.0643655061721802, 0.2596528232097626, 0.6356770992279053, -0.045663896948099136, -0.009914213791489601, 0.4005051851272583, -0.10206902772188187, 1.007738709449768, -1.1047019958496094, 0.3096609115600586, -0.6029804348945618, -0.16787904500961304, 0.42952466011047363, 0.9612081050872803...
def create _ properties ( self, vm, t ) : self. d = arheniuscoeff ( self, vm, t, " d _ 0 ", " e _ d ", degree = 2 ) # all materials have the same properties so only checking the first is enough if self. materials [ 0 ]. s _ 0 is not none : self. s = arheniuscoeff ( self, vm, t, " s _ 0 ", " e _ s ", degree = 2 ) if sel...
[ 0.3842267394065857, -0.8205941319465637, 0.49503064155578613, 0.028277777135372162, 0.9729712605476379, -0.10344985127449036, -0.43773308396339417, 0.17133432626724243, -1.067454218864441, 0.03792179748415947, -0.009512977674603462, -0.22097299993038177, 0.47493717074394226, 0.209951132535...
def _ random _ generate _ bernstein2d _ ( fun, num = 1 ) : xmn = fun. xmin ( ) xmx = fun. xmax ( ) ymn = fun. ymin ( ) ymx = fun. ymax ( ) zmx = max ( fun. bernstein ( ). pars ( ) ) i = 0 while i < num : x = _ uniform _ ( xmn, xmx ) y = _ uniform _ ( ymn, ymx ) x = _ uniform _ ( 0, zmx ) v = fun ( x, y ) if v > = z : i...
[ -0.5798806548118591, -0.21302783489227295, 0.4631841778755188, 0.6168990135192871, -1.166673183441162, 0.6784788966178894, 0.17858408391475677, -1.103334665298462, -0.27588003873825073, -0.5177812576293945, -0.18362101912498474, 0.21243959665298462, -0.16502827405929565, 0.0943011865019798...
def test _ callable _ input ( self, graph ) : objective _ return = ( 0, [ 0 ] ) def custom _ method ( * args, * * kwargs ) : " " " mockup of custom - method function fed to ` ` search ` ` " " " return objective _ return result = strawberryfields. gbs. dense. resize ( subgraphs = [ [ 0, 1 ] ], graph = graph, target = 4,...
[ -0.4168991446495056, 1.2419586181640625, 0.45307663083076477, 0.4890369474887848, 0.710765540599823, -0.5161924958229065, 0.8547800183296204, -0.606435239315033, 0.15093813836574554, -0.4369746148586273, -0.15075398981571198, 0.08801671117544174, -0.6555642485618591, -0.4663551449775696, ...
def parent _ invoice _ id ( self, parent _ invoice _ id ) : self. _ parent _ invoice _ id = parent _ invoice _ id
[ 0.9167251586914062, -1.154815912246704, -0.07153663784265518, 0.1825185865163803, -0.2513934373855591, 0.6048557162284851, -0.4355240762233734, 0.5536908507347107, -0.5566388964653015, -0.5202969908714294, 0.148410364985466, 0.31371110677719116, -1.3462309837341309, 0.1703931838274002, -...
def test _ example _ input _ one _ required _ field _ index ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input one " ) input _ page. entity1. e...
[ -0.964678168296814, 0.08780990540981293, 0.6641941070556641, -0.08135618269443512, 0.4926832616329193, 1.0849608182907104, 0.6077916622161865, -0.02588658407330513, 0.23998281359672546, 0.25607866048812866, -1.3605848550796509, 0.04964812844991684, -0.36315858364105225, -0.2535257041454315...
def extract _ parameters ( cls, php _ signature, doc = " " ) : php _ parameters = [ p. strip ( ) for p in php _ signature. split ( ", " ) ] result = [ ] for php _ parameter in php _ parameters : m = cls. re _ signature _ parameter. match ( php _ parameter ) if not m : raise valueerror ( " parameter'% s'has not the expe...
[ -0.4346538484096527, 0.34202826023101807, 0.3231675922870636, 0.991647481918335, 1.3563413619995117, -0.8315305709838867, -0.5585476160049438, 0.3015199899673462, -0.30025264620780945, 0.8583792448043823, -0.9789569973945618, -0.7220066785812378, -0.5041062235832214, 0.8572234511375427, ...
def test _ spatially _ distributed ( ) - > none : dz = np. full ( ( 100, 10 ), 1. 0 ) phi = np. full ( ( 100, 10 ), 0. 5 ) phi _ new = compact ( dz, phi, porosity _ max = 0. 5 ) assert phi _ new [ 0 ] = = approx ( phi [ 0 ] ) assert np. all ( phi _ new [ 1 : ] < phi [ 1 : ] ) assert np. all ( np. diff ( phi _ new, axis...
[ 1.2051713466644287, 0.2802768051624298, 0.378235787153244, 0.441649466753006, 0.4823332726955414, 0.7897259593009949, 0.2688356339931488, 0.28976643085479736, 0.34864723682403564, 0.11335091292858124, -0.48764175176620483, 0.6061893105506897, 0.10037165880203247, 1.105492115020752, -0.02...
def _ _ init _ _ ( self, cameras = none, points = none, num _ cameras = 0 ) : if cameras is none : cameras = [ camera ( ) for i in xrange ( num _ cameras ) ] if points is none : points = [ ] self. cameras = cameras self. points = points
[ 0.38757166266441345, 0.027190933004021645, 0.220253124833107, 1.5416065454483032, 0.5092398524284363, -0.4186197817325592, -0.49493342638015747, 0.2818690240383148, 1.613749623298645, 0.04585232213139534, -0.7436032891273499, 0.04229111969470978, -0.27694621682167053, 0.6812793016433716, ...
def test _ list _ integer _ length _ 1 _ nistxml _ sv _ iv _ list _ integer _ length _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 2. xsd ", instance = " nistdata / list / integer / schem...
[ -0.7444356083869934, -0.4042135775089264, 0.4555422365665436, 0.9461448788642883, -0.28109803795814514, -0.05912238731980324, -0.24199792742729187, 0.5985668301582336, 0.5739779472351074, 0.6840476989746094, -1.0648622512817383, 0.07869096845388412, 0.02924194559454918, 1.079641580581665, ...
def teardown _ module ( module ) : if verbose : print ( " teardown _ module module : % s " % module. _ _ name _ _ )
[ 0.13738006353378296, -0.5192087292671204, 0.3340114653110504, -0.22831697762012482, 0.8455824851989746, 0.9338111281394958, 1.1268267631530762, -0.3151135742664337, 0.6501795053482056, 0.7367995381355286, 0.16290563344955444, 1.64414644241333, -0.5676718950271606, 0.4722723662853241, -0....
def test _ sparse ( self ) : baseline, adjacency, events = self. simulate _ sparse _ realization ( ) learner = hawkessumexpkern ( self. decays, verbose = false ) learner. fit ( events ) np. testing. assert _ array _ almost _ equal ( learner. baseline, baseline, decimal = 1 ) np. testing. assert _ array _ almost _ equal...
[ 0.962639331817627, -0.02850661240518093, 0.39597412943840027, 0.4825828969478607, 0.7727148532867432, 0.451023131608963, 0.2824423015117645, 0.8603528738021851, 0.9347475171089172, -0.8799375295639038, -0.5177022814750671, 0.5577613711357117, -0.48637014627456665, 0.22076179087162018, 0....
def _ generate _ kernel _ code ( ctx, code, _ defines _ template, _ thread _ index _ template, _ shared _ size _ template, kernel _ name, argstring, axes _ mapping, loop _ axis, kernel _ identifier ) : defines = _ defines _ template % { " blksize0 " : axes _ mapping [ 0 ] [ 1 ] * axes _ mapping [ 0 ] [ 3 ], " blksize1 ...
[ -0.17999817430973053, 0.1504102647304535, 0.8358014822006226, -0.20430408418178558, -0.14736229181289673, -0.9089406728744507, 0.45553678274154663, -0.013533157296478748, -0.3197683095932007, -0.051668182015419006, -0.8698198795318604, 0.15297280251979828, -0.0059031154960393906, 0.5160951...
def _ downsampling _ block ( self, input _ layer, block _ idx, filter _ shape = none, downsample _ shape = none ) : if filter _ shape is not none : self. config ['filter _ size'] = filter _ shape if downsample _ shape is none : downsample _ shape = ( 2, ) * self. config ['num _ dims'] if self. config ['residual'] : lay...
[ 0.06820637732744217, 0.14209836721420288, 1.1058567762374878, -0.10594742745161057, -0.455713152885437, 0.33342593908309937, 0.5862379670143127, -0.26667821407318115, 0.3856976628303528, -0.40085673332214355, 0.4830901622772217, 0.6435431241989136, -0.9948155879974365, -0.4510466456413269,...
def on _ pushbutton _ ssd _ search _ clicked ( self ) : # should send many times..... # get current ssd files firsttime = true # receive data # global gsocketbodysize # gsocketbodysize = 36 # self. udpsocketclient. setbufsize ( gsocketbodysize + gsocketheadersize ) testtime = 10 # while ( true ) : for ssdnum in range (...
[ -0.2668383717536926, 0.4282669126987457, 1.048210859298706, -0.19527596235275269, 0.30211347341537476, 0.23626963794231415, 0.6799135208129883, -0.37414392828941345, 0.018129127100110054, -0.06835834681987762, -0.16154281795024872, 0.5694245100021362, -0.7804609537124634, 0.503971695899963...
def _ get _ file _ line ( filename, line _ number ) : file _ content = _ open _ file _ with _ cache ( filename ) if not file _ content : return none return file _ content. splitlines ( ) [ line _ number - 1 ]
[ -0.012761751189827919, -0.5647227168083191, 0.5471168756484985, 0.7974230647087097, 0.6097491979598999, -0.4270630478858948, -0.9064556360244751, -0.3032999634742737, -1.2536039352416992, -0.48519518971443176, 0.27391305565834045, -0.09798507392406464, 0.003724431386217475, -0.740296840667...
def toxmlstring ( self ) : tree = et. elementtree ( self. tojunit ( ) ) buf = bytesio ( ) tree. write ( buf ) return u'<? xml version = " 1. 0 " encoding = " utf - 8 "? >'+ u " \ n " + unicode _ str ( buf. getvalue ( ) )
[ -0.022043978795409203, -0.39474251866340637, 0.5845350623130798, -0.07959522306919098, -0.4978991150856018, 0.34786006808280945, -0.29209235310554504, 0.4486142098903656, 0.8862611055374146, -0.8180385828018188, 0.2929486036300659, 0.0392230823636055, -0.020676687359809875, -0.265729129314...
def _ _ check ( self, * tags : str ) - > tuple [ str,... ] : tags = tuple ( set ( map ( lambda x : str ( x ). upper ( ), tags ) ) ) for tag in tags : if tag not in self. _ _ pos _ tag : allowed _ tags = tuple ( self. _ _ pos _ tag. keys ( ) ) msg = f'unknown pos tag { tag }. must be one of { allowed _ tags }!'raise key...
[ -0.657520592212677, 0.18315570056438446, 0.49615779519081116, 0.1998855471611023, -0.24069280922412872, 0.20836713910102844, -1.3712127208709717, -0.4306270182132721, -1.3309681415557861, 0.38053932785987854, 0.0056851510889828205, -0.5199199318885803, -0.6058558821678162, 0.48128941655158...
def get _ spot _ instances ( cls, ec2 _ tag ) : requests = conn. get _ all _ spot _ instance _ requests ( ) instances = [ ] for request in requests : instances. append ( spotinstance ( ec2 _ tag, request. id, request. instance _ id ) ) return instances
[ -1.3690837621688843, -0.5538710951805115, 0.371849000453949, -0.7868722677230835, 0.1847122758626938, 0.3468823730945587, -0.8179137110710144, -0.13054287433624268, 0.10160832107067108, -0.2555973529815674, -0.12770827114582062, 0.09397949278354645, -0.5657411813735962, 0.4984084367752075,...
def sparse _ tuple _ from ( sequences, dtype = np. int32 ) : indices = [ ] values = [ ] for n, seq in enumerate ( sequences ) : indices. extend ( zip ( [ n ] * len ( seq ), range ( len ( seq ) ) ) ) values. extend ( seq ) indices = np. asarray ( indices, dtype = np. int64 ) values = np. asarray ( values, dtype = dtype ...
[ -1.089556336402893, -0.12614355981349945, 0.7333683967590332, -0.4302939772605896, -0.6078346967697144, -0.6531699299812317, 0.19706299901008606, -0.27890545129776, 0.3368469178676605, 0.9131412506103516, -0.253650039434433, -0.535305917263031, 0.2494259774684906, -0.3477333188056946, 0....
def department _ more _ info ( department ) : department = department. query. filter ( department. name = = department ). first ( ) employees = user. query. filter ( user. department _ id = = department. id ). all ( ) avarege _ salary = 0 counter = 0 if employees : for employee in employees : avarege _ salary + = emplo...
[ -0.09285799413919449, 0.328546941280365, 0.6237691044807434, -0.48590269684791565, -0.4680989384651184, 0.3968192934989929, -0.04504159465432167, -0.2675490379333496, 0.18150340020656586, 0.19129939377307892, 0.483167827129364, -0.34206172823905945, 1.4415135383605957, 0.8743981122970581, ...
def linearization _ recur1 ( root ) : def helper ( root ) : nonlocal new if root : helper ( root. left ) new. right = treenode ( root. val ) new = new. right helper ( root. right ) dummy = new = treenode ( ) helper ( root ) return dummy. right
[ 0.5165536403656006, 0.6426011323928833, 0.5677491426467896, 0.5025627613067627, -0.8054230213165283, -0.21987728774547577, -0.22599251568317413, -0.5220197439193726, 0.29829269647598267, 0.0685049444437027, -0.6380156874656677, 0.5072159767150879, -0.4584134519100189, 1.468901515007019, ...
def getschemas ( self, draft = false, name = none, schematype = none ) : if draft : req = apiclient. allschemasurl % ( self. host, " / draft " ) else : req = apiclient. allschemasurl % ( self. host, " " ) if name or schematype : req + = "? " if name : req + = " name = " + name if schematype : if name : req + = " & " re...
[ -0.8718425631523132, -0.056595731526613235, 0.6360728144645691, 0.11803071945905685, -0.1586158573627472, -0.057713426649570465, -0.965644896030426, 0.2950250208377838, 0.6318960785865784, 0.06453244388103485, -0.7460475564002991, 0.33470773696899414, -1.521145224571228, 0.4387416243553161...
def ldap _ userids ( self ) : query = self. request. form. get ( " searchabletext ", " " ) return self. enumerateusersids ( query )
[ -1.0546283721923828, 0.06413988769054413, 0.40031325817108154, -0.25470930337905884, -0.15744246542453766, -0.43127956986427307, -0.3377602696418762, -0.05038802698254585, 0.7539251446723938, 0.26063376665115356, 0.015871984884142876, 0.7303071618080139, -0.9123155474662781, -0.34360089898...
def data _ csvfile ( csv _ file _ path ) : my _ data = np. genfromtxt ( csv _ file _ path, delimiter = ', ', names = true ) return dataset ( name = " csvfile - % s " % csv _ file _ path. stem, x = my _ data ['x'], y = my _ data ['y'] )
[ 0.49382054805755615, -0.5192224383354187, 0.3244174122810364, -0.3833187222480774, -0.5787325501441956, 1.2173449993133545, -0.11096806079149246, 0.5345341563224792, -0.4104371666908264, -0.5320643186569214, 0.25411951541900635, 0.7942569851875305, 0.2547187805175781, -0.9026792049407959, ...
def _ get _ single _ filtered _ subgraph ( graph : nx. graph, query _ params : " graphqueryparams " ) - > nx. graph : if query _ params. graph _ component = ='node': return get _ node _ filtered _ subgraph _ view ( graph, query _ params ) elif query _ params. graph _ component = ='edge': return get _ edge _ filtered _ ...
[ 0.3141339123249054, 1.0171732902526855, 0.5573905110359192, 0.3978002667427063, -0.45991799235343933, 0.15027502179145813, 0.2828872501850128, 0.15540459752082825, 0.46099936962127686, -0.0046665240079164505, 0.667077898979187, 0.8692677021026611, 0.20312339067459106, -0.8812466859817505, ...
def snmp _ bulkget ( self, snmp _ ver, system _ name, mib _ name = none, mib _ index = none, mib _ value = none, oid _ string = none, communityname = none, snmp _ timeout = 60, nonrepeaters ='0 ', maxrepetitions ='10 ', username = none, authkey = none, privkey = none, authprotocol = none, privprotocol = none, custom _ ...
[ 0.061061643064022064, -0.4218108057975769, 0.6051185131072998, 0.15788064897060394, 0.14314691722393036, -0.8982040286064148, -0.21720488369464874, 0.1312141865491867, 0.49870604276657104, 0.19989541172981262, -0.4868309497833252, 0.3404283821582794, -1.6162593364715576, -0.334968239068985...
def upload _ custom _ files ( ) : themes _ folder ='{ } / zsh - themes '. format ( root _ folder ) plugins _ folder ='{ } / zsh - plugins '. format ( root _ folder ) custom _ folder ='~ /. oh - my - zsh / custom'# custom themes for theme in listdir ( themes _ folder ) : print ('uploading % s...'% theme ) put ('% s / % ...
[ 0.3384350836277008, -0.3224499821662903, 0.7671929597854614, -0.8186315298080444, 0.4847762882709503, -0.26039695739746094, 0.7946745753288269, -0.20280978083610535, -0.28184252977371216, 0.3036922812461853, -1.1108286380767822, 0.8274686932563782, -0.47780516743659973, 0.28686630725860596...
def get _ params ( ) : params = { " k " : agent. k, " d " : agent. d, " l " : agent. l, " lr " : agent. lr, " split _ sr " : agent. split _ sr, " loss _ type " : agent. loss _ type, " batch _ size " : agent. batch _ size, " num _ hidden " : agent. num _ hidden, " temperature " : agent. temperature, " embedding _ size "...
[ -0.009224561974406242, -1.1680490970611572, 0.48724740743637085, -0.3402242660522461, -0.4653070569038391, -0.10313153266906738, -0.15431006252765656, -0.09217188507318497, -0.20013616979122162, 0.5448973774909973, -1.1166971921920776, 0.4122529923915863, 0.7620655298233032, 1.143886327743...
def plot _ epipolar _ line ( im, f, x, epipole = none, show _ epipole = true ) : m, n = im. shape [ : 2 ] line = np. dot ( f, x ) # epipolar line parameter and values t = np. linspace ( 0, n, 100 ) lt = np. array ( [ ( line [ 2 ] + line [ 0 ] * tt ) / ( - line [ 1 ] ) for tt in t ] ) # take only line points inside the ...
[ 0.282614141702652, 0.5362967252731323, 0.7064468860626221, -0.14370913803577423, -0.42578449845314026, 0.8124058246612549, -0.4339463710784912, 0.9907022714614868, 0.08100538700819016, 0.5032109618186951, 0.4581449329853058, 0.3435642719268799, 0.291168749332428, -0.20011454820632935, 0....
def import _ functions ( functions, sections ) : for addr in functions : addr = adjust _ addr ( sections, int ( addr ) ) if addr is none : continue if ida _ funcs. get _ func ( addr ) : continue if not ida _ funcs. add _ func ( addr ) : print ('failed to create function at offset : { : 08x } '. format ( addr ) )
[ 0.17168138921260834, 0.4481269419193268, 0.6777034997940063, -0.4148540794849396, 0.7953935265541077, 0.14523227512836456, -0.02958565391600132, -0.48834893107414246, 0.12475747615098953, -0.07625987380743027, -0.44440972805023193, -0.20725026726722717, -0.2619122564792633, -0.126710295677...
def get _ global _ link _ analytical _ jacobian _ function ( self, link : str, n : int = 1, numpy _ output : bool = false, ) - > cs. function : return self. make _ function ( " j _ a ", link, self. get _ global _ link _ analytical _ jacobian, n = n, numpy _ output = numpy _ output, )
[ -0.20701991021633148, 0.07393975555896759, 0.41684120893478394, 0.43542778491973877, -0.08226989209651947, -0.6836108565330505, 1.433804988861084, -0.8644003868103027, 0.06241879612207413, -0.2912645637989044, 0.006166011560708284, 1.3612792491912842, 0.3439742922782898, -0.388034284114837...
def set _ kk2 _ normal _ activity _ mixture ( self, clip = true, * * kwargs ) : matrix _ shape = [ self. mm, self. nn ] params _ kk1 = [ self. mu _ kk1, self. sigma _ kk1 ] self. kk1 = random _ matrix ( matrix _ shape, params _ kk1, seed = self. seed _ kk1 ) mu _ ss0 = self. mu _ ss0 mu _ eps = self. mu _ eps for key i...
[ -0.7767625451087952, -0.8406323194503784, 0.8590273857116699, 0.5881270170211792, -1.220427393913269, 0.5471987128257751, 0.4356975853443146, 0.1956634223461151, 0.5647339820861816, 0.5151033997535706, 0.7269253730773926, 1.026239275932312, -0.06841269880533218, 0.17160935699939728, -0.1...
def result ( self, timeout : optional [ float ] = none ) - > any : return self. _ future. result ( timeout )
[ -0.2025042623281479, 1.3079971075057983, 0.38671639561653137, 0.7106152772903442, -0.40969333052635193, -0.8475300073623657, -0.8476720452308655, -0.009291799739003181, -0.3119755983352661, -0.689355194568634, -0.2714957594871521, -0.14433330297470093, -0.27208489179611206, -0.702600717544...
def _ filtering _ links ( self, a _ tags ) : self. links = [ ] for i in a _ tags : # getting href attribute and slicing the string to get rid of unneccesary part link = i [ " href " ] start, end = link. index ( " = " ), link. index ( " & " ) img _ link = link [ start + 1 : end ] # this are the symbold we want to replac...
[ -0.7226089835166931, -0.22957481443881989, 0.4901178479194641, -0.8016723394393921, 0.23299981653690338, -0.5061236023902893, -0.29185721278190613, 0.7081118226051331, -0.1675894558429718, 0.15795506536960602, 0.0022719616536051035, 0.3575252890586853, -0.12479455769062042, 0.8766981363296...
def logout ( ) : jti = get _ raw _ jwt ( ) ['jti'] token = revokedtoken ( jti = jti ) db. session. add ( token ) db. session. commit ( ) return construct _ msg ('logged out'), 200
[ 0.07171516120433807, 0.2603340148925781, 0.3943336009979248, -0.8952146172523499, -0.20525145530700684, -0.788229763507843, -0.31481629610061646, 0.4328096807003021, 0.11350744962692261, 0.43381422758102417, -0.6747221350669861, 0.25270646810531616, -0.4261327087879181, -1.5085928440093994...
def firewall _ policy _ name ( self ) - > pulumi. input [ str ] : return pulumi. get ( self, " firewall _ policy _ name " )
[ 0.7121487855911255, 0.09450668841600418, 0.20548197627067566, -0.13851885497570038, 0.022981490939855576, 1.7284061908721924, 0.23697201907634735, -0.10773377120494843, 0.9881576299667358, 0.045377619564533234, 0.01061587780714035, 0.3017919659614563, 0.2841959595680237, -0.419354587793350...