text
stringlengths
25
2.19k
embedding
listlengths
768
768
def extractdata ( filename ) : data = pd. read _ csv ( filename, sep ='; ', dtype = {'ejercicio': int,'tipo _ institucion': str,'bd _ tipo _ institucion': str,'institucion': str,'bd _ institucion': str,'unidad _ pres': str,'bd _ unidad _ pres': str,'linea _ trabajo': str,'bd _ linea _ trabajo': str,'area _ gestion': st...
[ 0.28355419635772705, -0.41162919998168945, 0.950036883354187, -0.13451114296913147, -0.015884069725871086, 0.6630770564079285, 0.003987074829638004, 0.6111879348754883, -0.18594500422477722, -0.2959282696247101, 0.3982802927494049, 0.2350742518901825, 0.4240507185459137, 0.2261954247951507...
def deriv2angle ( deriv ) : tan _ alpha = deriv alpha = math. degrees ( math. atan ( tan _ alpha ) ) alpha = ( 360 - alpha + 90 ) % 360 return alpha
[ -0.6072574257850647, -0.5746799111366272, 0.5320919156074524, -0.4925692081451416, -0.371305912733078, 0.3633250892162323, 0.10079041868448257, 0.44148120284080505, -0.4010371267795563, -0.5069910287857056, -0.23989979922771454, -0.2708273231983185, 0.17108027637004852, -0.4502232074737549...
def test _ unauthorized _ message _ delete ( self ) : message = message ( id = 0xf00f, text = " hello world ", user _ id = self. testuser. id ) db. session. add ( message ) db. session. commit ( ) with self. client as c : with c. session _ transaction ( ) as session : session [ curr _ user _ key ] = self. testuser2. id...
[ 0.4402455687522888, 0.02197028510272503, 0.5885192155838013, 0.3393089771270752, 0.2673192322254181, 0.42826589941978455, 0.2604151964187622, 0.057916682213544846, 0.4591112732887268, -0.7023202776908875, 0.4214523434638977, 0.8503440618515015, -0.767072319984436, 0.33726534247398376, 0....
def setzeroes ( self, matrix : list [ list [ int ] ] ) - > none : if not matrix or not matrix [ 0 ] : return m = len ( matrix ) n = len ( matrix [ 0 ] ) zero _ first _ col = false for row in range ( m ) : if matrix [ row ] [ 0 ] = = 0 : zero _ first _ col = true break zero _ first _ row = false for col in range ( n ) :...
[ -0.3666921555995941, 0.31496021151542664, 0.7648782730102539, 0.1155061349272728, 0.4882686734199524, -0.2850635349750519, 0.6243377923965454, 0.014650044962763786, 0.012242683209478855, 0.4970208704471588, -0.07115056365728378, -0.17170000076293945, -0.21181076765060425, 1.740904331207275...
def test _ steps _ muting ( self ) : support. create _ project ( self,'larry') support. run _ command ('steps add first. py') r = support. run _ command ('steps mute s01 - first. py') self. assertfalse ( r. failed,'should not have failed') r = support. run _ command ('steps unmute s01 - first. py') self. assertfalse ( ...
[ 0.31548410654067993, 0.2065863162279129, 0.41929954290390015, 0.6994407773017883, 1.1387161016464233, 1.2531746625900269, -0.5566798448562622, -0.29302865266799927, -0.03447287529706955, -0.7251550555229187, -0.6488601565361023, -0.010122240521013737, -0.5160349011421204, 1.122920632362365...
def get _ flag _ from _ type ( typ ) : if typ in ['uint32 _ t ','int32 _ t ','dword ','int'] : return ida _ bytes. dword _ flag ( ) elif typ in ['uint64 _ t ','int64 _ t ','long long'] : return ida _ bytes. qword _ flag ( ) elif typ in ['uint16 _ t ','int16 _ t'] : return ida _ bytes. word _ flag ( ) else : return ida ...
[ 0.014081569388508797, 0.26440805196762085, 0.5491213798522949, -0.6086915135383606, -0.3695557117462158, 0.5730679631233215, -0.09177163243293762, -1.2124817371368408, 0.25212472677230835, 0.02128950133919716, -0.5776426792144775, 0.527624785900116, -0.9321590662002563, 0.48903152346611023...
def run _ model ( self ) : self. model = adaboostregressor ( n _ estimators = 1 ) self. model. fit ( self. x _ train, self. y _ train ) # self. scoring = roc _ auc _ score ( self. y _ train, model. predict ( self. x _ train ) )
[ -0.05479741469025612, 0.21105889976024628, 0.5338886380195618, 0.4075857996940613, 1.5237623453140259, 0.6855251789093018, -0.5237796902656555, 0.2641517221927643, -0.5962933301925659, -0.6245420575141907, -0.7638383507728577, 0.006803334690630436, 0.2516281008720398, 0.03190423548221588, ...
def compute _ two _ page _ representatives ( self, n _ dim, deg ) : # return if nothing to compute if self. hom [ 1 ] [ n _ dim ] [ deg ]. dim = = 0 : return coordinates _ hom = self. hom [ 1 ] [ n _ dim ] [ deg ]. coordinates rep _ chains = [ local _ chains ( self. nerve _ spx _ number [ n _ dim ] ) ] prev = 0 # local...
[ 0.058170024305582047, -0.47649911046028137, 0.7432675957679749, -0.26118844747543335, 0.24984528124332428, 0.1508118361234665, 0.29069119691848755, 0.024422677233815193, -0.4177488386631012, 0.05435032770037651, 0.03863295912742615, 0.5311700105667114, 0.34378355741500854, 0.56350344419479...
def convert _ char _ to _ player _ id ( char ) : return {'1': 1,'2': 2,'3': 3,'4': 4,'5': 5,'6': 6,'7': 7,'8': 8, }. get ( char, 0 )
[ -0.658153235912323, -1.4535393714904785, 0.8095979690551758, -0.6212391257286072, 0.23400354385375977, -0.6000831127166748, 0.7348549962043762, -0.8600772023200989, 0.6073739528656006, 1.3441259860992432, -1.047067403793335, -0.15310943126678467, -0.48435136675834656, -0.14227138459682465,...
def test _ view _ single _ question ( self ) : response = self. client. get ('/ api / v2 / questions / 1 ', data = json. dumps ( self. questions ), headers = self. authheaders ) self. assertequal ( response. status _ code, 200 )
[ -0.19633059203624725, -0.11571580916643143, 0.34909820556640625, -0.25252386927604675, 0.12556907534599304, 0.9505230188369751, -0.27872222661972046, 0.5147517919540405, 0.4002562463283539, -0.9687995314598083, 0.24954843521118164, 0.4509180188179016, 0.23645704984664917, -0.26050114631652...
def write _ user ( user _ hash : str, data : dict ) : data, write _ needed = merge _ data ( user _ hash, data ) if not write _ needed : return data cache. cache ( ). write ( _ key ( user _ hash ), data ) return data
[ -0.608278214931488, 0.03990853205323219, 0.43835321068763733, 0.3247935473918915, 0.004360095132142305, 0.6460774540901184, -0.4046051502227783, -0.06687937676906586, 0.35157766938209534, 0.059684619307518005, -0.8445818424224854, -0.04388882964849472, -0.5019603371620178, -0.0236123297363...
def computermsd ( actual, predicted ) : out = math. sqrt ( np. sum ( np. square ( actual - predicted ) ) / actual. shape [ 0 ] ) return out
[ 0.6455152630805969, -0.6702402234077454, 0.5618075132369995, -0.2220841646194458, -0.3646065294742584, 0.3390551209449768, -0.22049018740653992, 0.3437645435333252, -0.45480817556381226, 0.5015687346458435, 0.8024245500564575, 0.20079700648784637, 0.4939255714416504, 0.35832273960113525, ...
def get _ short _ name ( self ) : return self. nombre
[ 0.5418422818183899, -0.20539449155330658, 0.4406466782093048, 0.03186117857694626, -0.6148458123207092, 0.5620981454849243, -0.6403555274009705, -1.0819895267486572, -0.14854709804058075, -0.26781806349754333, 0.253981351852417, 0.709816038608551, 0.05246433988213539, -0.39446821808815, ...
def snconv2d ( input _, output _ dim, k _ h = 3, k _ w = 3, d _ h = 1, d _ w = 1, sn _ iters = 1, update _ collection = none, name ='snconv2d') : with tf. variable _ scope ( name ) : w = tf. get _ variable ('w ', [ k _ h, k _ w, input _. get _ shape ( ) [ - 1 ], output _ dim ], initializer = tf. contrib. layers. xavier...
[ 0.3738546371459961, -0.5313016176223755, 0.4814048707485199, 0.6686741709709167, -1.389252781867981, -0.03656971454620361, -0.6049942374229431, 0.2560645341873169, -0.6410140991210938, 0.3324284851551056, -0.20082934200763702, 0.46775567531585693, 0.14496666193008423, -0.1623542755842209, ...
def write _ vocab ( vocab, filename ) : print ( " writing vocab... " ) with open ( filename, " w " ) as f : for i, word in enumerate ( vocab ) : if i! = len ( vocab ) - 1 : f. write ( " { } \ n ". format ( word ) ) else : f. write ( word ) print ( " - done. { } tokens ". format ( len ( vocab ) ) )
[ -0.2585894763469696, -0.6799509525299072, 0.3698354959487915, 0.43720167875289917, 1.2079118490219116, -0.42968180775642395, 0.4152480661869049, 0.9968427419662476, 0.07750484347343445, 0.6586381196975708, -0.5063299536705017, 0.44459250569343567, -0.33761703968048096, 0.5576984882354736, ...
def words ( self ) : # work here!!
[ -0.08350477367639542, -0.3015125095844269, 0.30631375312805176, 0.428337961435318, 0.8356245160102844, 0.19826550781726837, 0.8396670818328857, 0.45459356904029846, 0.30276793241500854, 0.032985471189022064, -0.6194679737091064, -0.37807968258857727, -0.5787467956542969, 1.3206348419189453...
def get _ link _ quaternion ( self, link : str, q : arraytype, base _ link : str ) - > casadiarraytype : quat _ l _ w = quaternion. fromvec ( self. get _ global _ link _ quaternion ( link, q ) ) quat _ b _ w = quaternion. fromvec ( self. get _ global _ link _ quaternion ( base _ link, q ) ) return ( quat _ l _ w * quat...
[ -0.17567740380764008, -0.9281186461448669, 0.5800468921661377, -0.20090407133102417, 0.19563978910446167, -0.11004944145679474, -0.7524978518486023, -0.335202693939209, 0.331392765045166, -0.6921380162239075, -0.4995897114276886, 1.3091917037963867, -0.6546244621276855, -0.2774909734725952...
def get _ contact _ flow _ output ( contact _ flow _ id : optional [ pulumi. input [ optional [ str ] ] ] = none, instance _ id : optional [ pulumi. input [ str ] ] = none, name : optional [ pulumi. input [ optional [ str ] ] ] = none, tags : optional [ pulumi. input [ optional [ mapping [ str, str ] ] ] ] = none, type...
[ -0.3594478964805603, -0.5845115780830383, 0.36548757553100586, 0.3252882957458496, -0.010469355620443821, -0.4955503046512604, 0.17314600944519043, -0.3670876920223236, 0.6738618612289429, -0.873257577419281, 0.07478383928537369, 0.6028125286102295, -0.776409924030304, -0.8681959509849548,...
def get _ complete _ user _ details ( email : str ) : user = accountprocessor. get _ user ( email ) bot = accountprocessor. get _ bot ( user [ " bot " ] ) account = accountprocessor. get _ account ( user [ " account " ] ) user [ " bot _ name " ] = bot [ " name " ] user [ " account _ name " ] = account [ " name " ] user...
[ 0.04660097882151604, 0.2870115637779236, 0.633001446723938, -0.673885703086853, -0.24591678380966187, -0.035648420453071594, 0.04376069828867912, -0.9493650794029236, -0.6384913325309753, 0.35194092988967896, -1.1381441354751587, -0.02795588970184326, 0.4732309877872467, -0.256503760814666...
def dump _ data ( ) : config _ db = config. config [ config _ constants. database ] database _ path = " % s /.. /.. /.. / database / % s " % ( os. path. dirname ( _ _ file _ _ ), config _ db ) db = pymongodb. get _ db ( ) print " dumping % s database data " % config _ db print " target directory : % s " % database _ pa...
[ -0.13553917407989502, 0.013867451809346676, 0.7294576168060303, -0.6174351572990417, 1.0492074489593506, 0.8178218007087708, 0.7176937460899353, -0.5129549503326416, -0.584532618522644, 0.040187619626522064, -0.9582133889198303, 0.28725361824035645, -0.014391664415597916, 0.615383327007293...
async def get _ and _ update _ json ( self, get _ params : dict = none, json _ data : dict = none, filters : dict = none, put _ method : bool = false, patch _ method : bool = false ) - > dict : data = await super ( ). get _ data ( params = get _ params, filters = filters ) try : try : pks = [ element [ " id " ] for ele...
[ -1.6493011713027954, 0.53310227394104, 0.6548632979393005, -0.0975341945886612, -0.024225305765867233, -0.10621745884418488, -0.2175251543521881, -0.22034011781215668, 0.24572981894016266, 0.5862439274787903, 0.022354606539011, 0.09168089181184769, -0.24580055475234985, 0.4748382866382599,...
def wrapper ( * params ) : if self. session is not none : # use session authentication auth = {'authmethod': " session ",'session': self. session } else : # yes, this is the " canonicalization " method used. args = canonicalize ( params ) args. sort ( ) msg = " [ " + " ". join ( args ) + " ] " # we encode in utf - 8 be...
[ -0.7724215388298035, 0.3642091453075409, 0.670131266117096, 0.08492910116910934, 0.292285293340683, -0.9616424441337585, -0.2336113601922989, -0.2873469591140747, 0.10533197224140167, 0.189127579331398, 0.5022711157798767, 0.47118544578552246, 0.3581501245498657, 0.06732916086912155, 0.1...
def hess _ free ( f, x0, y, max _ steps = 5000, tol = 1e - 6 ) : # get an initial value for gradient f0, df0 = f ( x0, y ) # define initial direction d0 = - df0 # need an epsilon to find directional derivative along x. e0 = 0. 0001 # step a distance e0 in two directions, find gradients there _, df _ x = f ( x0 + e0 * x...
[ 0.8055617809295654, 0.30654019117355347, 0.9709653258323669, -0.2309340536594391, -1.1375079154968262, -0.6842724084854126, -0.005655485671013594, 0.014361778274178505, -1.0973706245422363, 0.4051905572414398, -0.3276037573814392, -0.2282860428094864, 0.751457154750824, 0.8901442289352417,...
def _ on _ path _ changed ( self, path, platform ) : # does the path only contain slashes? only _ slashes = path. replace ( " / ", " " ). replace ( " \ \ ", " " ) = = " " # does it end in a slash? trailing _ slash = path. endswith ( " / " ) or path. endswith ( " \ \ " ) # the name of the storage being edited storage _ ...
[ 0.0826963558793068, -0.2731974422931671, 0.6002945899963379, 0.614279568195343, -0.4828731119632721, -0.08358495682477951, 0.503758430480957, -0.45043569803237915, -0.4472825825214386, 0.1964930146932602, -0.22796986997127533, 0.33623892068862915, 0.02178058587014675, 0.26655152440071106, ...
def init _ db ( ) : db. create _ all ( )
[ 0.4342682659626007, 0.920492947101593, 0.4900161921977997, 1.0947669744491577, 1.685290813446045, 0.8639451265335083, -0.13860711455345154, 0.14845527708530426, -0.3787747323513031, -0.16070909798145294, -0.9152934551239014, 0.07437602430582047, -0.32667097449302673, 1.139879584312439, -...
def _ setdefaults ( self ) : self. logger. debug ( " entering _ setdefaults " ) config _ defaults = { " input device " : 0, " output device " : 0, " sample rate " : 44100, " fft size " : 2 * * 18, " noise samples " : 1000, " impulse constant " : 15, " impulse threshold " : 0. 02, " gain " : 0. 5 } self. savesettings ( ...
[ -0.19159099459648132, 0.4573976993560791, 0.5950722098350525, 0.09448852390050888, 1.083482265472412, -0.3601204454898834, 0.22113776206970215, -0.41763684153556824, -0.28322920203208923, 0.05868910625576973, -1.376829743385315, -0.5349797606468201, -0.22940410673618317, 0.822580099105835,...
def _ _ init _ _ ( self ) : self. _ text _ elements : textdict = {'start': {'string':'to start, press enter. ','color': arcade. color. black,'font _ size': 24,'start _ x': none,'start _ y': none } } self. _ sprite _ elements : spritedict = { } self. _ rectangle _ elements : rectangledict = {'background': none }
[ -0.5283390879631042, 0.19704864919185638, 0.47296953201293945, -0.559389054775238, 0.2934989631175995, 0.003939534537494183, 0.6104621291160583, 0.03651611506938934, -0.050151992589235306, 0.024239812046289444, -0.8593605756759644, -0.06681378185749054, 0.21957877278327942, 0.6277982592582...
def filter _ define ( self, name, filtertype, freq, param, dbgain = 0 ) : assert name not in self. filters self. nfilters + = 1 if isinstance ( name, int ) : numid = name else : numid = self. nfilters + 1 assert numid > = 2 f = filter. butter ( filtertype = filtertype, freq = freq, samplerate = samplerate, numid = numi...
[ -0.5213650465011597, 0.2696115970611572, 0.6767138838768005, 0.45617204904556274, -0.21206440031528473, -0.5456786751747131, 0.1382889598608017, -0.4884231388568878, 0.031553659588098526, -0.852022111415863, -0.2415464222431183, 0.5403538942337036, -0.7007309198379517, 1.2920385599136353, ...
def _ check _ prepsteps ( self, row, colstart ) : nsteps = 0 for ss in range ( colstart, colstart + self. maxsteps * self. nperstep, self. nperstep ) : se = ss + self. nperstep # print ( ss, se ) tmp _ df = self. df. iloc [ row, ss : se ] if check _ null ( tmp _ df ) : nsteps + = 1 return nsteps
[ 0.285072386264801, 0.8819243311882019, 0.4951002597808838, 0.441893070936203, -0.2302316129207611, -0.7264952659606934, 0.05196552723646164, -0.10766056180000305, 0.5720032453536987, -0.07289526611566544, -0.10885512083768845, -0.22548919916152954, 0.4418189525604248, 1.018422245979309, ...
def conbine ( word _ list, window = 2 ) : if window < 2 : window = 2 # iterate all the possible window sizes for x in range ( 1, window ) : # the window's length is longer than words'number if x > = len ( word _ list ) : break word _ list2 = word _ list [ x : ] # each time, we return a pair of words # the distance betw...
[ 0.13530616462230682, 0.6400260329246521, 0.9316298961639404, 0.9914109706878662, -0.7535579800605774, -0.09150397032499313, 0.0880691409111023, 0.2508130669593811, 0.10555721074342728, 1.2347441911697388, -0.40873846411705017, 0.3415660560131073, -1.3294293880462646, 1.4423555135726929, ...
def push _ antihub ( self, n ) : self. _ bnd _ hub ( n,'antihub')
[ -0.2931745946407318, 0.47362056374549866, 0.39482980966567993, 0.7228139042854309, 0.6198168992996216, 1.077739953994751, -0.3386954367160797, -0.44769933819770813, 0.27031731605529785, 0.44280269742012024, -0.5292956233024597, 0.6548799872398376, -0.9227209687232971, 1.1510556936264038, ...
def createdb ( dbname ='ddsassignment3') : # connect to the default database con = getopenconnection ( dbname ='postgres') con. set _ isolation _ level ( psycopg2. extensions. isolation _ level _ autocommit ) cur = con. cursor ( ) # check if an existing database with the same name exists cur. execute ('select count ( *...
[ -0.46703383326530457, 0.8208942413330078, 0.7504873871803284, 0.3550677001476288, 0.7953254580497742, 0.3740372359752655, 0.15838773548603058, 0.2668229341506958, -0.45836886763572693, -0.012045166455209255, -0.002741871401667595, -0.47278130054473877, -1.0471341609954834, 0.04649170860648...
def check _ labels ( self, labels ) : if len ( np. unique ( labels ) ) = = 1 and labels [ 0 ] = ='noi': raise valueerror ( " all minority samples identified as noise " )
[ 0.04021371528506279, 0.5706716775894165, 0.4629116356372833, 0.24314722418785095, 1.4688949584960938, 0.7144225239753723, -0.4122445285320282, -0.5684940218925476, 0.06269794702529907, 0.5946237444877625, 0.8085238337516785, -0.15394534170627594, -0.7701503038406372, 1.3082276582717896, ...
def add _ player ( self, player : player ) : if player. idx not in self. players : with self. _ lock : # use first town on the map as player's town : player _ town = self. map. towns [ 0 ] player _ home _ point = self. map. point [ player _ town. point _ id ] player. set _ home ( player _ home _ point, player _ town ) ...
[ -0.9034918546676636, 0.10893404483795166, 0.5599532127380371, -0.44169604778289795, 0.9729844331741333, 0.33016112446784973, 0.29855260252952576, -0.29340070486068726, -0.16822625696659088, -0.035992223769426346, -0.417655348777771, -0.16119565069675446, -0.31264910101890564, 0.00907005183...
def de _ duplicate ( self ) : for ix in range ( len ( self. records ) - 1 ) : if self. cf. skiprecord ( self. records [ ix ] ) : continue for jx in range ( ix + 1, len ( self. records ) ) : if self. cf. skiprecord ( self. records [ jx ] ) : continue if self. records [ ix ] ['ip'] = = self. records [ jx ] ['ip'] : if se...
[ -0.8641621470451355, 0.24361050128936768, 0.6584414839744568, -0.18621796369552612, 0.6837937235832214, -0.25131648778915405, 1.0492579936981201, 0.06540469825267792, -0.47608479857444763, 0.8936347961425781, -0.4585241675376892, 0.17931590974330902, -0.3998287320137024, 0.4437995254993438...
def milliseconds ( input _ in _ ms ) : return input _ in _ ms * 0. 001
[ 0.8874208331108093, -0.6446214914321899, 0.17558173835277557, 0.0006722756079398096, -0.390130877494812, 0.05970396101474762, -0.030396433547139168, 0.5263081192970276, 0.7529348134994507, -0.20381411910057068, 0.4991982579231262, 0.10294532030820847, -0.5931109189987183, 0.565235078334808...
def configure _ main _ route ( app ) : @ app. route ('/') def index ( ) : " " " render index. html file : return : html format " " " return render _ template ('index. html') @ app. route ('/ favicon. ico') def icon ( ) : " " " render favicon. ico file : return : html format " " " return'' @ app. route ('/ login ', meth...
[ -0.6531571745872498, 0.1123964786529541, 1.013230323791504, 0.7625055909156799, -0.3252452313899994, 0.22362546622753143, 0.49017250537872314, -0.8107784390449524, 0.5488117933273315, 0.41596516966819763, -0.32799121737480164, -0.43559467792510986, 0.4016711711883545, 0.6757696866989136, ...
def _ record _ step _ name ( self, name ) : self. close _ non _ parent _ step ( ) try : namespace = ( ) if self. active _ step : namespace = self. active _ step. name _ tokens cur _ state = self. _ step _ names. setdefault ( namespace, { } ) cur _ count = cur _ state. setdefault ( name, 0 ) dedup _ name = name if cur _...
[ -0.4371693432331085, -0.13781850039958954, 0.7831488847732544, -0.351426362991333, -0.750983715057373, -0.4567530155181885, -0.0003529595269355923, -1.0117906332015991, -0.023892167955636978, 0.0703197568655014, -1.1114197969436646, -0.23692253232002258, 0.2678369879722595, 0.8415617942810...
def test _ abundance _ of _ fodder _ carnivores ( self ) : assert self. cell. abundance _ of _ fodder _ carnivores = = 0
[ 0.21896915137767792, -0.5813010931015015, 0.4256279766559601, 0.6169813871383667, 1.5389726161956787, -0.5635854005813599, -0.38083982467651367, -0.10148905217647552, -0.5669698715209961, -0.6124104261398315, -0.40088415145874023, 0.7519227862358093, 0.44884246587753296, 0.8243405222892761...
def organize ( self ) : if self. side = ='bottom': for i in range ( len ( self. checkers ) ) : self. checkers [ i ]. moveto ( ( int ( self. x - t _ width / 2 ), int ( self. y - c1 _ radius - ( i % 5 ) * 2 * c1 _ radius ) ) ) else : for i in range ( len ( self. checkers ) ) : self. checkers [ i ]. moveto ( ( int ( self....
[ -0.6446310877799988, -0.2567765712738037, 0.6240561008453369, -0.3131207525730133, 0.9338904619216919, 0.23679205775260925, 0.7140507102012634, -0.6899734735488892, -0.929394006729126, 0.5184746384620667, -0.2031657099723816, -0.014922959730029106, -0.7550448775291443, 0.5706609487533569, ...
def remove _ punctuation ( punctuation : iterable [ str ] ) - > str2strt : translation = str. maketrans ( { str ( char ) :'' for char in punctuation } ) def punctuation _ remover ( doc : str ) - > str : " " " removes the given punctuation characters from a string. parameters - - - - - - - - - - doc : str a document giv...
[ -0.4855276942253113, -0.635536253452301, 0.21037347614765167, -0.21153980493545532, -0.8600870966911316, -0.8237731456756592, -0.04326142370700836, 0.8761774301528931, 0.3196193277835846, 0.36758920550346375, -0.04089675843715668, -0.15035174787044525, -0.08564472943544388, -0.982819199562...
def get ( self, request ) : damages = cardamage. objects. all ( ) return render ( request, " damages. html ", { " damages " : damages } )
[ 0.13210995495319366, -0.7089605927467346, 0.2897529602050781, -0.6776385307312012, 0.3676024377346039, 0.13845129311084747, -1.3697619438171387, 0.7585239410400391, -0.8217952251434326, -0.4284136891365051, 0.4938792288303375, -0.3670913875102997, 0.24417906999588013, 0.2975481152534485, ...
def _ _ get _ thrsh _ point _ angle ( self ) - > float : u = self. u pi = math. pi m _ a = self. m _ a c1 = pi / 2 - m _ a c2 = math. cos ( m _ a ) / nom _ gps _ rad c3 = math. asin ( c2 * np. linalg. norm ( u ) ) return c1 - c3
[ 0.7130637764930725, -0.46426257491111755, 0.27838021516799927, -0.2822614312171936, 0.1246209591627121, 0.2946876585483551, 0.1530853509902954, 0.5538042187690735, 0.25368812680244446, 0.4561935067176819, 0.6304066777229309, 0.040819842368364334, -0.3008831739425659, -0.8839126825332642, ...
def _ find _ dirs ( self ) : base ='/ opt'folders = [ os. path. join ( base, f ) for f in os. listdir ( base ) if not os. path. isfile ( os. path. join ( base, f ) ) and f! = '.'and f! = '..'and f. startswith ('ejabberd') ] if len ( folders ) > 1 : logger. debug ('too many ejabberd folders, picking the last one') if le...
[ -0.7224125862121582, -0.2605424225330353, 0.6915187835693359, 0.05686461552977562, 0.11643591523170471, -0.024122538045048714, 1.390354871749878, -0.8239145278930664, -0.3065696656703949, 0.15740036964416504, 0.10093554109334946, -0.26403146982192993, -0.34246447682380676, 1.26631987094879...
def sample ( self, k, shuffle = false ) : if shuffle : return np. random. choice ( self. datalist, replace = false, size = k ) else : return self. datalist [ 0 : k ]
[ 0.35703057050704956, 0.4917403757572174, 0.5126749277114868, -0.5771642923355103, -0.9455568194389343, 0.6888813376426697, -0.04392538592219353, 0.49358558654785156, 1.1921157836914062, 0.6141059398651123, -0.28439879417419434, 0.24924732744693756, -0.7079828381538391, 0.22243155539035797,...
def check _ gen _ all _ stats ( ) : sw _ info = anturlar. switchinfo ( ) sw _ info _ ls = sw _ info. ls ( ) fid _ now = sw _ info. ls _ now ( ) sw _ ip = sw _ info. ipaddress ( ) fv = anturlar. flowv ( ) fv. toggle _ all ( ) # # # # default is to turn all ports to sim ports fv. genall ( " on " ) f = " % s % s % s " % (...
[ 0.5649899244308472, -0.04673481360077858, 1.0433982610702515, 0.670985758304596, 0.3407052755355835, 0.6476026177406311, 0.6654942035675049, -0.15348860621452332, 0.0342218279838562, -0.5595470666885376, 0.3415188789367676, -0.24309225380420685, 0.16114293038845062, 0.8558676242828369, -...
def get ( self, request, slug ) : question = self. get _ queryset ( ). get ( slug _ _ iexact = slug ) form = answerform ( ) context = {'question': question,'form': form } return render ( request,'quora / question _ detail. html ', context )
[ 0.40826013684272766, -0.6545617580413818, 0.5400449633598328, -1.0906378030776978, 0.1367216259241104, -0.07936763763427734, -0.03639718145132065, -0.17640046775341034, 0.18116529285907745, -0.6649177670478821, 0.3899610936641693, 0.1747453659772873, 0.2744974195957184, -0.0761836692690849...
def rcs _ number ( self, rcs _ number ) : self. _ rcs _ number = rcs _ number
[ -0.2602267563343048, -0.700491189956665, 0.2450861632823944, 0.003001199336722493, 0.5208069682121277, -0.07506562024354935, 1.221461534500122, 0.30855658650398254, -0.2561950385570526, -0.2381587028503418, -1.4804866313934326, -0.11568246781826019, 0.5395797491073608, -0.6232672333717346,...
def _ get _ data _ values ( x ) : if is _ data _ array ( x ) : return x. values return x
[ 0.009320713579654694, 0.9187023639678955, 0.37060609459877014, 0.3201262056827545, 0.01078700553625822, 0.4957723319530487, -1.3064898252487183, -0.5710276961326599, 0.392642617225647, -0.8955220580101013, -0.3325136601924896, 1.3448972702026367, 0.8563920259475708, 0.34817731380462646, ...
def _ _ repr _ _ ( self ) : # type : ( ) - > str return self. to _ str ( )
[ -0.6439896821975708, -1.1700094938278198, 0.3104139566421509, -0.9161983132362366, -0.029520470649003983, 0.861666202545166, -0.10005564242601395, -0.6045036911964417, 0.557485044002533, 0.12814952433109283, 0.5876503586769104, 1.1069161891937256, 0.2843816578388214, -0.8010256290435791, ...
def build _ query ( * args ) : def stringify ( x ) : if isinstance ( x, str ) : return x return': '. join ( str ( el ) for el in x ) return'+ '. join ( list ( map ( stringify, args ) ) )
[ -0.637645423412323, -0.5267036557197571, 0.33777156472206116, -0.2923814654350281, -0.315919429063797, 0.9186375737190247, -1.3573280572891235, 0.7782003283500671, -0.005928532686084509, -0.009400767274200916, 0.6307278871536255, -0.10097172111272812, -0.47105273604393005, -0.4014378786087...
def get _ config ( self, split, args ) : data _ type = args. config. split ('-') [ 0 ]. split ('_') [ - 1 ] config _ script = args. config l _ mix = none if not args. l _ mix else args. l _ mix ul _ mix = none if not args. ul _ mix else args. ul _ mix modality = none if not args. modality else args. modality config _ d...
[ -0.7754284143447876, -0.16193018853664398, 0.9154027104377747, -0.5539833903312683, -0.45136120915412903, -0.258366197347641, 0.4843847453594208, 0.4809495508670807, -0.2740473747253418, 0.43028882145881653, -0.9411342740058899, 0.09520121663808823, 0.3898646831512451, 1.0807701349258423, ...
def remove _ stopwords ( string, extra _ words = none, exclude _ words = none ) : stopword _ list = stopwords. words ( " english " ) extras = [ ] excludes = [ ] if extra _ words! = none : extras = extra _ words. copy ( ) if exclude _ words! = none : excludes = exclude _ words. copy ( ) for extra _ word in extras : if e...
[ -0.31473854184150696, 0.23767362534999847, 0.5120368003845215, -0.6263037919998169, -1.4614925384521484, 0.0769636482000351, -0.5005132555961609, 1.3618465662002563, 0.11746092885732651, 0.9822874069213867, -0.5576976537704468, 0.945687472820282, -0.6374720335006714, -0.2978127896785736, ...
def tick ( self ) : r = none self. frames + = 1 self. ct = pygame. time. get _ ticks ( ) if ( self. ct - self. st ) > = 1000 : r = self. fps = self. frames # print " % s : % d fps " % ( self. _ _ class _ _. _ _ name _ _, self. fps ) self. frames = 0 self. st + = 1000 pygame. time. wait ( 0 ) # note : not sure why, but ...
[ 0.14267945289611816, 0.24130742251873016, 0.5911279320716858, -0.22554336488246918, -0.25174564123153687, -0.7754718065261841, 0.6069031953811646, -1.2504736185073853, 0.13922201097011566, -0.3177341818809509, -0.1588718146085739, -0.1278897076845169, -0.7140011191368103, 0.799676001071929...
async def notify ( self, message ) : for server in self. bot. guilds : if server = = self. homeguild : # announcements channel continue else : async with connect ( db _ name ) as db : channel _ id = await paraderoomdb. get _ parade _ room _ id ( db, server. id ) channel = server. get _ channel ( channel _ id ) if not c...
[ 0.4071899652481079, 0.6150503158569336, 0.6231936812400818, 0.48560279607772827, 0.9532955884933472, -0.2247963398694992, -0.15510961413383484, -0.035323914140462875, -0.4309762418270111, 0.46436721086502075, 0.10211572796106339, 1.5475090742111206, -0.5927112102508545, 1.8708972930908203,...
def getallactivities ( self ) : activities = { } if self. simulate is false : athletes = os. listdir ( self. path ) athletes. remove ( ". ds _ store " ) if self. simulate is false : for athlete in athletes : try : activities [ athlete ] = self. getsingleathleteactivities ( athlete ) except : print ( traceback. format _...
[ 0.18310947716236115, 0.4418933391571045, 0.6405212879180908, 0.5294317007064819, -0.032767780125141144, -0.036675211042165756, 1.1912726163864136, 0.3317563831806183, 0.3832941949367523, -0.36161524057388306, 0.3398912250995636, 0.6813943386077881, -0.5852522253990173, 0.42922651767730713,...
def post _ save _ template ( sender, document, * * kwargs ) : try : template _ schema _ viewer _ api. get _ by _ template _ id ( document. pk ) except exceptions. doesnotexist as e : # upsert if does not exist for this template template _ schema _ viewer = templateschemaviewer ( template = document ) return template _ ...
[ -0.5533864498138428, 0.5510951280593872, 0.48458966612815857, -0.22607369720935822, -0.4118421971797943, -0.9064027667045593, 0.20375290513038635, 0.2205812782049179, 0.4329637885093689, 0.21633556485176086, -0.8513647317886353, -0.8573327660560608, -0.3494555354118347, 0.3653663992881775,...
def switch _ frame ( self, input _ frame ) : new _ frame = input _ frame ( self ) if self. frame is not none : self. frame. destroy ( ) self. frame = new _ frame self. frame. pack ( )
[ -0.4537990391254425, 0.3479185402393341, 0.5584702491760254, 0.37967339158058167, 0.1274837851524353, -0.2679479420185089, -0.22247429192066193, 0.34466278553009033, 0.9343668818473816, -0.03832198306918144, -0.7196968793869019, 0.8256632685661316, -1.118967056274414, 0.052562206983566284,...
def open _ db ( database : str ) - > [ sqlite3. cursor, sqlite3. connection ] : try : connection = sqlite3. connect ( database ) db = connection. cursor ( ) return db, connection except : print ( " couldn't open db. quitting... " ) quit ( )
[ -0.9937775135040283, 0.12860949337482452, 0.2972336411476135, 0.15315543115139008, -0.4216958284378052, 0.041074223816394806, -0.2725805342197418, 0.48047101497650146, 1.3166919946670532, 0.5360423922538757, 0.11517533659934998, -0.6255717873573303, -1.063528060913086, 0.3280392587184906, ...
def matrixrows _ par ( k, nlambda, nk, data _ dir, simple = true ) : mat _ row _ dir = data _ dir +'mat _ rows /'chunk _ dir = data _ dir +'chunked /'istart = time. time ( ) # create memmap of the row krow = np. memmap ( mat _ row _ dir +'k { : 05d }. mmap '. format ( k ), dtype ='float64 ', mode ='w + ', shape = nk ) ...
[ 0.6083207726478577, 0.1604284942150116, 1.2034804821014404, -0.6615685820579529, -0.7443153262138367, -0.00884653627872467, 0.01599712297320366, 0.21853075921535492, 0.1548645943403244, 0.9473974108695984, 0.4903058111667633, -0.29121091961860657, -0.12155624479055405, 0.5461614727973938, ...
def createizhikevichspikingbehaviour ( a : float, b : float, c : float, d : float, v _ rest : float, u _ rest : float, tau _ inv : float = 250, current : float = 1, print : bool = false, time _ print : int = 250, timestep _ print : float = 0. 1 ) - > izhikevichspikingbehaviour : params = izhikevichparameters ( a = a, b...
[ 0.6429358124732971, -0.38340121507644653, 0.8865519762039185, 0.010631946846842766, -0.47004982829093933, 0.43650931119918823, 0.16348515450954437, -0.31436488032341003, 0.29449495673179626, -0.06754617393016815, 0.9479601979255676, 0.8625733256340027, -0.4116029441356659, -0.3245885372161...
def splittable _ variables ( self ) - > list [ int ] : for i in range ( 0, self. _ n _ features ) : if self. _ splittable _ variables [ i ] is none : self. _ splittable _ variables [ i ] = is _ not _ constant ( self. get _ column ( i ) ) return [ i for ( i, x ) in enumerate ( self. _ splittable _ variables ) if x is tr...
[ -1.331754446029663, 0.16666880249977112, 0.5470094084739685, 0.6907870769500732, -0.13958697021007538, -0.03112855926156044, 0.7422633767127991, 0.7260831594467163, -0.905072033405304, 1.0210684537887573, -1.0884400606155396, 0.11497975140810013, -0.9388182163238525, -0.3281412720680237, ...
def get _ sentence _ tokenizer ( language ) : pickle _ path ='sentence _ tokenizer. pickle'try : input _ file = open ( pickle _ path,'rb') sentence _ tokenizer = load ( input _ file ) input _ file. close ( ) except filenotfounderror : data _ file _ paths = [ ] sentences = [ ] try : # get the paths to each file the bot ...
[ -0.3672119379043579, -0.024645626544952393, 0.5654101371765137, 0.0939408615231514, 0.37760666012763977, -0.9378524422645569, 0.08308830857276917, 0.41212424635887146, -0.4570508599281311, -0.1848926842212677, -1.2048825025558472, -0.8443555235862732, -0.7308865189552307, 0.286029398441314...
async def removeme ( self, ctx ) : server = ctx. message. server. id author = ctx. message. author try : del self. json [ server ] [ author. id ] dataio. save _ json ( self. location, self. json ) log. debug ('removed user ( { } ) from server ( { } ) '. format ( author. id, server ) ) await self. bot. say (': white _ c...
[ -0.24752844870090485, -0.08312218636274338, 0.49586907029151917, -0.09791436791419983, 0.012837229296565056, 0.3432769179344177, 0.10588525980710983, 1.0587313175201416, 0.18064314126968384, -0.32270464301109314, -1.0546880960464478, 1.051038146018982, -0.8697147965431213, -0.3705534934997...
def draw ( self, projection, view, model ) : gl. gluseprogram ( self. shader. glid ) # bone world transform matrices need to be passed for skinning world _ transforms = [ node. world _ transform for node in self. bone _ nodes ] bone _ matrix = world _ transforms @ self. bone _ offsets loc = gl. glgetuniformlocation ( s...
[ -0.28923043608665466, 1.1126912832260132, 0.5773816108703613, -0.28727802634239197, 0.22119465470314026, 0.9812328815460205, 0.8047894835472107, 0.3396446406841278, -0.2246672362089157, -0.2187749296426773, 0.27657413482666016, 0.8570466041564941, -0.39978134632110596, 0.3037089705467224, ...
def _ generate _ fit _ guesses ( self, user _ opt : curve. fitoptions ) - > union [ curve. fitoptions, list [ curve. fitoptions ] ] : curve _ data = self. _ data ( ) user _ opt. bounds. set _ if _ empty ( a = ( 0, 1 ), alpha = ( 0, 1 ), b = ( 0, 1 ), ) return self. _ initial _ guess ( user _ opt, curve _ data. x, curve...
[ -0.07957077771425247, -0.3015712797641754, 0.3723263442516327, 0.7273612022399902, 0.4474555552005768, 0.38570547103881836, 0.13515609502792358, -0.6516770720481873, 0.1237439215183258, -0.036457255482673645, -0.6297155618667603, 0.6314361095428467, -0.23400358855724335, 0.3310307264328003...
def tournaments _ data ( self ) : return self. tournament
[ -0.6952848434448242, -0.7817964553833008, 0.12823326885700226, -1.2024579048156738, -0.3681395947933197, 0.8486976623535156, -0.1775222271680832, -0.20846204459667206, 0.4504607617855072, -0.6205045580863953, -0.5203710198402405, 0.10652128607034683, 0.865886926651001, -1.1073054075241089,...
def xyfrommovequc ( self, xy ) : return 0. 0254 * float ( xy )
[ 0.4039209187030792, -0.9018387794494629, 0.36593183875083923, -0.4203487038612366, -0.26003533601760864, -0.5024891495704651, -0.5702105164527893, -1.2892260551452637, -0.1190006360411644, 0.3921746015548706, 0.3255027234554291, -0.43122100830078125, 0.2441888004541397, -0.7956222295761108...
def airmass _ from _ header ( header ) : # get zd, airmass zdstart = header ['zdstart'] zdend = header ['zdend'] zd = ( zdstart + zdend ) / 2 airmass = 1 / np. cos ( np. radians ( zd ) ) return airmass
[ -0.1853085607290268, -1.7125462293624878, 0.3443630039691925, -0.7268011569976807, -0.667537271976471, 0.6723035573959351, -0.22442680597305298, -0.5195494294166565, -0.030742062255740166, -1.1666957139968872, 0.1109052449464798, 0.10047922283411026, -0.5685942769050598, 0.2076486051082611...
def test _ atomic _ id _ enumeration _ 1 _ nistxml _ sv _ iv _ atomic _ id _ enumeration _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - enumeration - 2. xsd ", instance = " nistdata / atomic / id / schem...
[ -0.46338069438934326, -1.103833794593811, 0.5456198453903198, 0.7860012054443359, -0.2254277616739273, 0.023914499208331108, 0.29941725730895996, -0.08859321475028992, 0.06824161857366562, 0.7514806985855103, -0.20647072792053223, 0.6017538905143738, 0.7177090644836426, 0.00239043403416872...
def least _ cost _ path ( graph, start, dest, cost ) : reached = { } events = binaryheap ( ) events. insert ( ( start, start ), 0 ) while len ( events ) > 0 : ( u, v ), time = events. popmin ( ) if v not in reached. keys ( ) : reached [ v ] = u for w in graph. neighbours ( v ) : events. insert ( ( v, w ), time + cost. ...
[ 0.6221460103988647, -0.4870590269565582, 0.7381749153137207, 0.4662957191467285, -0.5180542469024658, -0.640221893787384, -0.013102283701300621, -0.26623061299324036, -0.39898478984832764, 1.0385500192642212, -0.9711533784866333, -0.03177850693464279, -0.6397346258163452, 0.035512052476406...
def grayscale _ gradient ( data, max _ value ) : for value in data : normalized = 255 * value / / max _ value yield normalized yield normalized yield normalized
[ -0.5984721779823303, 0.8928898572921753, 0.3466666340827942, -0.1721498966217041, -0.832024872303009, 0.18859036266803741, -1.0600464344024658, -0.2735578715801239, -0.11477602273225784, 1.0041146278381348, 0.18383996188640594, 0.09281163662672043, 0.17828181385993958, 0.7760326266288757, ...
def show _ histogram ( ability _ name, outcomes ) : l = outcomes [ ability _ name ] plt. hist ( l, normed = true, bins = range ( min ( l ), max ( l ) + 1 ) ) ; plt. show ( )
[ 1.45539391040802, -0.01749754138290882, 0.5429113507270813, -0.4782278835773468, -0.9844027161598206, 0.45227158069610596, 0.4668448567390442, 1.632479190826416, 0.5738449692726135, 0.43183434009552, 0.8320920467376709, 1.3207229375839233, 0.6927449703216553, -0.021302521228790283, 0.973...
def strategy ( hand, num _ die _ sides ) : hand _ discard = gen _ all _ holds ( hand ) score _ max = 0. 0 for held in hand _ discard : num _ free _ dice = len ( hand ) - len ( held ) score _ num = expected _ value ( held, num _ die _ sides, num _ free _ dice ) if score _ num > score _ max : score _ max = score _ num he...
[ 0.19210587441921234, 0.13304176926612854, 0.44984954595565796, 0.07665783166885376, 0.4239100217819214, 0.34023913741111755, -0.12460207939147949, 0.36050450801849365, 0.0488525815308094, -0.011651135049760342, 0.8530304431915283, 0.12836429476737976, 1.0724499225616455, -0.028791924938559...
def generate _ timestamp ( ) : return unicode _ type ( int ( time. time ( ) ) )
[ -0.49746692180633545, 0.597405195236206, 0.7008631229400635, -0.32379716634750366, 0.40601176023483276, 0.07391781359910965, -0.8788730502128601, -0.061726249754428864, 0.36962923407554626, 0.4689967632293701, -0.8844001889228821, -0.9214679598808289, 0.0802123099565506, 0.0325380079448223...
def fc _ with _ initialize ( input _ channels, out _ channels ) : weight = weight _ variable ( ) bias = weight _ variable ( ) return nn. dense ( input _ channels, out _ channels, weight, bias )
[ 0.6711347699165344, -0.8514537215232849, 0.3718833029270172, 0.45699959993362427, 0.5254092216491699, -1.7555954456329346, -0.1165974959731102, -0.43970054388046265, -0.7872895002365112, -0.7328414916992188, 0.2509346306324005, -0.07295897603034973, -0.15744511783123016, -0.070069082081317...
def new _ game ( db _ engine ) : # use the validator class to randomly get a new mystery word mystery = validator. get _ mystery ( ) # record this new game in the sql table " games " # return the id of the last inserted row ( in order to set the session variable in application ) # game _ dict = {'mystery': mystery,'use...
[ 0.15026967227458954, 0.2811337411403656, 0.776526689529419, -0.06707146763801575, 0.29914429783821106, 0.7394701242446899, -0.9528608322143555, 0.3307356536388397, 0.31159600615501404, 0.3874069154262543, -0.38622206449508667, -0.6058974862098694, -1.0128586292266846, 0.6885315179824829, ...
def _ bits _ from _ file ( path ='conf / citiroc _ sc _ profile1. txt') : conffile = open ( path,'r') bitstring = " ". join ( [ line. split ( "'" ) [ 0 ]. replace ('','' ) for line in conffile ] ) conffile. close ( ) return bitstring
[ 0.756697952747345, -0.7518503665924072, 0.34556230902671814, -0.08808630704879761, 0.07130804657936096, 1.1408993005752563, 0.3569457232952118, -0.03826851770281792, -1.2672011852264404, 1.1989210844039917, -0.3342747092247009, 0.7070616483688354, -0.5500378012657166, -0.43901827931404114,...
def run _ server ( port, name2file, range _ hr, play _ queue ) : logger = logging. getlogger ( _ _ name _ _ ) server _ address = ( " localhost ", port ) httpd = grafanaalerthttpserver ( server _ address, name2file, range _ hr, play _ queue ) logger. info ( f " starting http server on port { port }... " ) try : httpd. s...
[ -0.14871469140052795, -1.2803969383239746, 0.6835874319076538, 0.1993647813796997, 0.04214728623628616, 0.8834834694862366, 0.15404005348682404, -0.24338039755821228, -0.6953801512718201, -0.1843710094690323, 0.3100280165672302, 0.598720371723175, -0.15356245636940002, -0.6204672455787659,...
def tags ( self ) - > mapping [ str, str ] : return pulumi. get ( self, " tags " )
[ 0.030009709298610687, 0.5839828252792358, 0.5140965580940247, -0.29313912987709045, 0.7053922414779663, 0.5574056506156921, -0.7490066885948181, 0.1620844602584839, -0.05679154396057129, 0.03232458606362343, -1.1505659818649292, 0.308293879032135, 0.7131442427635193, 0.07460810244083405, ...
def test _ list _ decimal _ pattern _ 1 _ nistxml _ sv _ iv _ list _ decimal _ pattern _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - pattern - 2. xsd ", instance = " nistdata / list / decimal / sc...
[ -0.5963899493217468, -0.4793909192085266, 0.7024500370025635, 1.058802843093872, 0.05506128817796707, -0.053518470376729965, -0.10143895447254181, 0.7127315402030945, 0.6128295063972473, 0.08759886026382446, -0.9696379899978638, -0.02230685204267502, 0.3197350800037384, 0.5209807753562927,...
def create ( self, validated _ data ) : profile _ data = none if " profile " in validated _ data : profile _ data = validated _ data. pop ( " profile " ) validated _ data. update ( { " email " : validated _ data [ " email " ] } ) user = super ( userserializer, self ). create ( validated _ data ) user. set _ password ( ...
[ 0.2736772894859314, -0.162851020693779, 0.37142086029052734, 0.5526526570320129, 0.37037429213523865, 0.3220265805721283, -0.03430189937353134, 0.052501555532217026, 0.1036468893289566, -0.22025661170482635, -1.0124069452285767, -0.5806617736816406, -0.9216101765632629, -1.1637957096099854...
def productid ( self ) : return self. productid
[ 0.7585166096687317, -0.9074055552482605, 0.22892670333385468, 0.5086938738822937, 0.2633230686187744, 2.189724922180176, 1.5854817628860474, -0.04111802205443382, 1.5507946014404297, -0.37521013617515564, 0.08969668298959732, 0.9228978157043457, -0.5993539690971375, -0.10641442984342575, ...
def with _ analyzer ( self, analyzer ) : return self. with _ analyzers ( [ analyzer ] )
[ 0.033803775906562805, -0.273205429315567, 0.15939085185527802, 0.85027676820755, -0.6301308274269104, -0.8633708357810974, 0.10647367686033249, -1.1548329591751099, 0.8943531513214111, -0.7019383311271667, 0.13737578690052032, -0.24112538993358612, 0.4970398247241974, 0.5666382312774658, ...
def cutnode ( self, childindex ) : node = self. childs [ childindex ] self. childs [ childindex ] = none return node
[ -0.47406598925590515, 0.09078284353017807, 0.49312230944633484, -1.532956600189209, -0.2515486180782318, -0.1963757872581482, 0.34117960929870605, -0.616141676902771, 0.4638005793094635, 0.4791158437728882, -0.3567107021808624, 0.7873746156692505, -0.7294129133224487, -2.0734663009643555, ...
def test _ undirected _ edge _ equality ( self ) : v0 = undirectedvertex ( val ='v0') v1 = undirectedvertex ( val ='v1') v2 = undirectedvertex ( val ='v2') e01 = undirectededge ( ( v0, v1 ) ) e02 = undirectededge ( ( v0, v2 ) ) e12 = undirectededge ( ( v1, v2 ) ) e10 = undirectededge ( ( v1, v0 ) ) another _ e01 = undi...
[ -0.3632521629333496, -0.8289071321487427, 0.5467401742935181, -0.5817839503288269, 0.7996784448623657, 0.8245741128921509, 0.6559451818466187, 0.279461532831192, 0.3766911029815674, -0.493533730506897, -0.5605530738830566, -0.22368676960468292, 0.1565261334180832, -0.017992954701185226, ...
def getradius ( self ) : return 3
[ 0.630456805229187, 0.3880036771297455, 0.40559378266334534, 0.16829417645931244, 1.1057541370391846, 1.2571115493774414, 0.0666431188583374, 0.8115656971931458, -0.07300537079572678, -0.3417360186576843, -0.8228726387023926, 0.10982849448919296, -1.408890724182129, -0.14093056321144104, ...
def to _ pandas ( example ) : data = { attr. name : as _ numpy ( ftr ). flatten ( ) for attr, ftr in zip ( example. schema. attributes, example ) } return pd. dataframe ( data )
[ 0.04019002616405487, -0.225723534822464, 0.29838883876800537, -0.11343393474817276, -0.47299298644065857, -0.23071390390396118, -0.030110912397503853, 0.5640431046485901, 0.46002012491226196, 0.10582294315099716, -0.5324010252952576, 1.0328660011291504, 0.09907490760087967, -0.425315886735...
def test _ hash160 ( self ) : # case of non empty stack length = len ( self. testexpressionstack ) # calculate the top item hash, before you process the stack topitemhash = tlcutilities. getsha256ripemdhash ( self. testexpressionstack [ len ( self. testexpressionstack ) - 1 ] ) self. testsmartcontractoperations. operat...
[ 0.9277936220169067, 0.7639156579971313, 0.5610491633415222, 0.13096073269844055, 0.48385122418403625, -0.46471333503723145, 0.2681411802768707, 0.9277312159538269, 0.15889032185077667, -0.5875074863433838, -0.5298774838447571, -0.4617871940135956, -0.0761309340596199, -0.5388267636299133, ...
def scale1drange ( min _ : float, max _ : float, center : float, scale : float, islog : bool ) - > tuple [ float, float ] : if islog : # min and center can be < 0 when # autoscale is off and switch to log scale # max _ < 0 should not happen min _ = numpy. log10 ( min _ ) if min _ > 0. else float32 _ minpos center = num...
[ -0.04847881942987442, -0.8033843040466309, 1.0670753717422485, -0.28464066982269287, -0.1794561892747879, -0.024822203442454338, -0.8393546342849731, -0.19782039523124695, 0.24531230330467224, 0.8930431604385376, 0.18216031789779663, 0.9281235337257385, -0.2626872658729553, 0.2527938187122...
def from _ saved _ model ( self, model _ path ) : model _ dict = dd. io. load ( model _ path ) self. weights = model _ dict ['weights']. astype ( np. float64 ) self. visible _ biases = model _ dict ['visible _ biases']. astype ( np. float64 ) self. hidden _ biases = model _ dict ['hidden _ biases']. astype ( np. float6...
[ 0.10990342497825623, 0.13437867164611816, 0.48326513171195984, -0.18738724291324615, -0.06440700590610504, 0.35325300693511963, 0.2476847767829895, 0.05507611483335495, -0.5470144152641296, 0.2891155779361725, -0.9906389713287354, 0.398017942905426, 0.6569860577583313, 0.07691796123981476,...
def parse _ json _ from _ gcs ( gcp _ conn _ id : str, file _ uri : str ) - > any : gcs _ hook = gcshook ( gcp _ conn _ id = gcp _ conn _ id ) bucket, blob = _ parse _ gcs _ url ( file _ uri ) with namedtemporaryfile ( mode = " w + b " ) as file : try : gcs _ hook. download ( bucket _ name = bucket, object _ name = blo...
[ 0.3051314353942871, -0.9254924058914185, 0.5234822630882263, -0.18084761500358582, -0.07491834461688995, 0.13057388365268707, -0.4184190332889557, -1.0766565799713135, -0.8357767462730408, 0.26008015871047974, -0.1415109485387802, 0.2906985282897949, -0.32469186186790466, -0.63402795791625...
def _ _ init _ _ ( self, rancid _ path ) : self. path = pathlib. path ( rancid _ path )
[ 0.7430613040924072, -1.3586628437042236, 0.023559974506497383, -0.499117910861969, 0.05692027881741524, 0.6784391403198242, 0.431322306394577, 0.0715097039937973, -0.06338242441415787, -1.069262146949768, -0.44055986404418945, -0.016968466341495514, -0.46145009994506836, -0.388908743858337...
def just _ kill ( ) : raise endsteps
[ 0.7125291228294373, -0.4108245074748993, 0.288094162940979, 1.812248945236206, 0.553354024887085, 0.42404797673225403, -0.3890146017074585, -0.09376836568117142, -0.407122403383255, 0.6222280263900757, 0.5101804137229919, -0.017505992203950882, 0.000445734360255301, 0.40999820828437805, ...
def get _ link _ target ( self, name ) - > union [ dataframe, linkeddataframe ] : return self. _ links [ name ]. other
[ -0.795332133769989, 0.0597664900124073, 0.48371437191963196, 0.012307324446737766, 0.6445626616477966, -1.0656720399856567, -0.43958011269569397, -0.9253197908401489, 0.5565946102142334, -1.3878164291381836, 0.6476826667785645, 1.1704612970352173, -0.40014293789863586, -0.6284732222557068,...
def _ calculate _ humidity ( self, msb, lsb ) : return ( msb * 256. 0 + float ( lsb ) ) / 10. 0
[ 0.8066127300262451, 0.009781718254089355, 0.5877718329429626, -0.16311565041542053, 0.16031038761138916, 0.10473360866308212, -0.1668657511472702, -0.17337296903133392, -0.11001709848642349, -0.09302594512701035, -0.42926883697509766, 0.4633130729198456, -1.2940661907196045, 0.348433375358...
def supports _ query ( self, trapi _ query ) : edges = trapi _ query ['message'] ['query _ graph'] ['edges'] if len ( edges )! = 1 : return false self. disease _ to _ chemical _ edge _ id = list ( edges. keys ( ) ) [ 0 ] if isnullorwhitespace ( self. disease _ to _ chemical _ edge _ id ) : return false self. disease _ ...
[ -0.27105140686035156, -0.10053327679634094, 0.6866803169250488, -1.0964137315750122, -0.20453228056430817, 0.00573675287887454, -0.6235554814338684, 0.49328872561454773, 0.24581223726272583, -0.4589323103427887, 0.5087254047393799, 0.48406222462654114, -0.2947692275047302, -0.1466752290725...
def test _ get _ access _ token ( mocker, integration _ context, expected _ token ) : mocker. patch. object ( demisto,'getintegrationcontext ', return _ value = integration _ context ) mocker. patch. object ( client,'_ http _ request ', return _ value = {'access _ token': expected _ token } ) access _ token = client. g...
[ 0.38492652773857117, 0.19912326335906982, 0.3216571509838104, -0.34098607301712036, 0.990949809551239, -0.07206089049577713, 0.4329540729522705, 0.6096625328063965, 0.2542286813259125, -0.9060080051422119, 0.20577165484428406, 1.017307162284851, 0.6858050227165222, -0.7278072834014893, 0...
def play _ opencv _ replay ( full _ replay _ path, valid _ types, playerid = 0, framerate = 1, step _ size = 4, save _ video = false, play _ video = true, show _ text = false ) : # define some params for the visualization : map _ shape = ( 1024, 1024, 3 ) vid _ name = replay _ path. split ('/') [ - 1 ] + '. avi'fourcc ...
[ -0.15176263451576233, -0.05995551496744156, 1.0263313055038452, 0.33242684602737427, -0.17969153821468353, -0.45136553049087524, 0.18489132821559906, 0.07068546116352081, 0.4953542947769165, 0.7570139765739441, -0.07772359251976013, 0.09108662605285645, -0.214341402053833, -0.0547738373279...
def set _ klines _ attr ( self, df ) : self. klines _ open = df ['open'] self. klines _ high = df ['high'] self. klines _ low = df ['low'] self. klines _ close = df ['close'] self. klines _ volume = df ['volume'] self. klines _ trades = df ['cnt _ trades'] self. klines _ timestamp = df [ config. klines _ datetime _ col...
[ -0.1880023032426834, -0.7798332571983337, 0.4170883297920227, -0.11856205761432648, 0.1192011833190918, 0.0053515057079494, -0.34716373682022095, -0.48972150683403015, -0.39075711369514465, 0.7078356742858887, 0.06903505325317383, 0.13349409401416779, 0.8005856871604919, -0.039957266300916...