text
stringlengths
25
2.19k
embedding
listlengths
768
768
def has _ name ( self ) : return self. name is not none
[ 0.15253064036369324, -0.848193883895874, 0.3926805555820465, -0.3674868941307068, 0.16580408811569214, -0.5030457377433777, -0.8719318509101868, 0.01856541633605957, -0.042979106307029724, 0.35177528858184814, -1.1644636392593384, -0.5600957274436951, 0.08879102766513824, 0.748997390270233...
def check _ answer ( answer, question, incorrect _ answers _ this _ episode, e, corrects, incorrects, is _ last _ action, default _ r, found _ candidate _ r, penalty, success _ r, verbosity _ level ) : reward = default _ r if answer. text. lower ( ) in question. candidates _ lower : if answer. text. lower ( ) = = quest...
[ 0.010846227407455444, -1.1041474342346191, 0.561693549156189, 0.3596356511116028, 0.15742367506027222, -0.14555762708187103, -0.6695472598075867, -0.3372061550617218, 0.2793266177177429, 1.415634036064148, 0.7801975607872009, 0.4444124102592468, -0.44076281785964966, 0.011120107024908066, ...
def compare _ priorities ( title _ set : set [ datnode ], report _ on _ match : bool ) - > set [ datnode ] : title _ set _ temp : set [ datnode ] = title _ set. copy ( ) for title _ 1, title _ 2 in itertools. combinations ( title _ set _ temp, 2 ) : if ( title _ 1. short _ name = = title _ 2. short _ name and title _ 1...
[ 0.4079919457435608, 0.20126841962337494, 0.8690735697746277, -0.3495529592037201, -0.6059744954109192, 0.443132221698761, -0.10053569078445435, -0.8027755618095398, 0.1820332556962967, 0.060214150696992874, -0.06816023588180542, 0.695145308971405, -0.4921264052391052, 0.06471354514360428, ...
def getint ( self, key, default = _ unset ) : if not self. cf. has _ option ( self. main _ section, key ) : if default is _ unset : raise nooptionerror ( key, self. main _ section ) return default return self. cf. getint ( self. main _ section, key )
[ -0.15924662351608276, 0.8961297273635864, 0.5998151302337646, 0.11058281362056732, 0.48755136132240295, -0.5440092086791992, 0.47800466418266296, -0.9179323315620422, -0.7063332796096802, 0.5569840669631958, 0.512968122959137, -0.3071800470352173, -1.323575735092163, 0.420668363571167, 0...
def perform _ create ( self, serializer ) : serializer. save ( user _ profile = self. request. user )
[ -0.2417776733636856, 0.17417138814926147, 0.09975461661815643, 0.9588860869407654, 1.1546984910964966, 0.1706794947385788, 0.5720841288566589, -0.2275126874446869, -0.2979155480861664, 0.19201534986495972, -1.0729516744613647, -1.0406445264816284, 0.09253683686256409, -0.8222004175186157, ...
def spot _ instance _ type ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " spot _ instance _ type " )
[ -0.1937832087278366, -0.008976212702691555, 0.3236770033836365, -0.3421643078327179, 0.745064914226532, 1.9408347606658936, 0.4125298261642456, -0.2167208343744278, 0.6343297958374023, 0.12675951421260834, 0.24956907331943512, 0.9269978404045105, -0.8091763854026794, -1.0784833431243896, ...
def deform _ grid _ from _ deflection ( deflection _ field, pixel _ size, mirror _ grid _ dist, grid _ pitch, img _ upscale = 4, oversampling = 5, img _ noise _ std = none ) : if img _ upscale < 1 : raise valueerror ( " the upscaling has to be larger or equal to one. " ) # upscale the deflection field to produce a high...
[ 0.11951588094234467, 0.3032390773296356, 0.9400061964988708, -0.8201195001602173, -0.0995478704571724, -0.09755747020244598, 0.2174226939678192, 0.1890137940645218, 0.23465374112129211, 0.4051947295665741, -0.08072130382061005, 0.18312060832977295, 0.25553324818611145, 0.36345499753952026,...
def fill _ g ( self, points ) : for point in points : self. add _ point ( point )
[ -0.1980472058057785, 1.4524253606796265, 0.34297093749046326, 0.7081209421157837, 1.60061776638031, 1.5560688972473145, -0.47860991954803467, -0.17255131900310516, -0.047732044011354446, 0.3811293840408325, -0.2722665071487427, -0.212361142039299, 0.20928990840911865, 1.0749366283416748, ...
def convert _ data ( self ) : # new code data _ size = len ( self. _ data _ x ) data _ x = np. zeros ( [ data _ size, self. seq _ length, self. sentence _ length ] ) data _ y = np. zeros ( [ data _ size, self. seq _ length, self. sentence _ length ] ) data _ target = np. zeros ( [ data _ size, self. seq _ length, self....
[ 0.0030230109114199877, -0.42740675806999207, 1.1206198930740356, -1.3345683813095093, 0.07543225586414337, -0.33372336626052856, 0.12789426743984222, -0.5000733137130737, 0.3259506821632385, 0.475469172000885, -0.08621162176132202, 1.249932050704956, 0.5836944580078125, 0.138910710811615, ...
def cleanup _ firebase ( ) : try : cronutils. require _ cron ( request. headers ) parkingeventrepository ( ). remove _ dead _ events ( ) return'', 201 except cronutils. notcroncallerexception as e : logger. exception ( e ) abort ( 401 ) except exception as e : logger. exception ( e ) abort ( 500 )
[ -0.2090081125497818, 0.280975341796875, 0.7277554273605347, 0.925571858882904, 0.24205434322357178, 0.10497841984033585, 0.12975771725177765, 0.18386119604110718, 0.42576077580451965, -0.08331768214702606, -0.23523877561092377, -0.790008544921875, -0.8142451643943787, 0.7598527073860168, ...
def get _ siblings ( self, indiv ) : for i in self : if self [ i ]. pat _ id = = self [ indiv ]. pat _ id or self [ i ]. mat _ id = = self [ indiv ]. mat _ id : yield self [ i ]
[ 0.06550435721874237, 0.11019771546125412, 0.6013123393058777, 0.2853010296821594, -0.3520798087120056, 0.83066326379776, 0.5760568380355835, -0.8678818941116333, 0.20232057571411133, 0.04255624860525131, -0.49919629096984863, 0.6011295914649963, -0.6382932066917419, -0.09743177145719528, ...
def determine _ field _ list ( arbor, fields, update ) : if fields in [ none, " all " ] : # if this is an update, don't resave disk fields. field _ list = arbor. analysis _ field _ list. copy ( ) # add in previously saved analysis fields if update : field _ list. extend ( [ field for field in arbor. field _ list if arb...
[ 0.06727314740419388, -0.3126472234725952, 0.4903353750705719, 0.3258785605430603, 1.002280354499817, 0.12963604927062988, -0.47452470660209656, 0.4116988182067871, 0.4773668348789215, -0.07679667323827744, 0.14147688448429108, -0.70196133852005, 0.4263990819454193, -0.22992083430290222, ...
def get _ terraref _ metadata ( self ) : return self. terraref _ metadata
[ -0.11736167967319489, -0.2750481963157654, 0.24231965839862823, -0.6540316343307495, 1.2728548049926758, 0.9321035146713257, 0.023778975009918213, -0.7279536128044128, -0.7974980473518372, 0.5222226977348328, 0.2007029503583908, 0.6205633878707886, 0.014227384701371193, -0.1605091840028762...
def check _ user ( self ) : if os. environ. has _ key ('http _ cookie') and os. environ ['http _ cookie']! = " " : c = simplecookie ( os. environ ['http _ cookie'] ) # # # python2. 4 related # phpsessid = str ( c ['phpsessid'] ). split ( " = " ) [ 1 ] [ : - 1 ] # # # python2. 5 + phpsessid = str ( c ['phpsessid'] ). sp...
[ -0.4220251142978668, -0.362725168466568, 0.9274770617485046, 0.2529575228691101, -1.4005208015441895, -0.012923143804073334, 0.18939104676246643, -1.0274806022644043, -0.24717417359352112, 0.5571277737617493, 0.0768430083990097, -0.4985831379890442, -0.5627171993255615, -0.2419167757034301...
def test _ insert _ tablet ( self, tablet ) : status = self. _ _ client. testinserttablet ( self. gen _ insert _ tablet _ req ( tablet ) ) logger. debug ( " testing! insert one tablet to device { } message : { } ". format ( tablet. get _ device _ id ( ), status. message ) ) return session. verify _ success ( status )
[ -1.1732395887374878, 1.7216389179229736, 0.306683748960495, 0.14032034575939178, 0.8659722805023193, 0.7928101420402527, 0.8730120062828064, -0.8969533443450928, -0.42141029238700867, -0.6793283224105835, -0.9191649556159973, -0.1957087516784668, -1.3476563692092896, 0.3853638768196106, ...
def is _ configured ( command ) : return command in commands
[ 0.027426859363913536, 0.22385162115097046, 0.31126341223716736, 0.6504722237586975, 0.21629934012889862, -0.9507858157157898, -1.179914951324463, 0.46171578764915466, 0.5306885838508606, 0.14451874792575836, -0.1407628357410431, -0.012637217529118061, 0.1880209892988205, 1.4383224248886108...
def update _ data ( self ) : # invoke render to update any changes. self. render ( ) # propagate the data _ changed event. self. data _ changed = true
[ -0.00549586396664381, -0.19971409440040588, 0.24282674491405487, -0.40083399415016174, 0.2725387215614319, 0.6416887640953064, -0.3863705098628998, 1.0405941009521484, -0.2383357584476471, -0.9126350283622742, -0.4960729479789734, 1.133618712425232, 0.14323154091835022, 0.9208418726921082,...
def get _ sec ( time _ str ) : h, m, s = time _ str. split (':') return float ( h ) * 3600 + float ( m ) * 60 + float ( s )
[ 0.8840465545654297, -0.7469704747200012, 0.2465672343969345, 0.09278524667024612, -0.18822771310806274, -0.155671626329422, -0.24948982894420624, -0.6523899435997009, -1.0318900346755981, 0.8037858605384827, -0.9906466007232666, -0.29256024956703186, -0.5946986079216003, -0.494959264993667...
def get _ domain _ min ( d ) : if isinstance ( d, ( tuple, list ) ) : d = d [ 0 ] if isinstance ( d, ( tuple, list ) ) : d = d [ 0 ] return d
[ -1.1863306760787964, 0.6876235008239746, 0.520940363407135, 0.8366456627845764, 0.1675158441066742, -0.0498470738530159, -0.43583565950393677, -0.5896615386009216, 0.8559095859527588, -0.7163111567497253, 0.8499427437782288, 0.6720346808433533, 0.07836735993623734, 0.2907407581806183, -0...
def get _ samples ( self ) : samples = self. raw _ samples [ self. burn _ num : : self. thinning _ factor ] if len ( samples ) = = 0 : return np. zeros ( ( 0, self. dims ) ) return np. vstack ( samples )
[ -0.18342621624469757, -0.0028316080570220947, 0.6274937391281128, 0.12257874757051468, 0.9799084067344666, -0.38244086503982544, -0.14279097318649292, -0.03640083223581314, 0.6021602153778076, 0.08107461035251617, 0.6916859149932861, 0.7723157405853271, -0.03551246598362923, 0.312298536300...
def testflatlcdm ( self ) : h0 = 50. 0 for om0 in numpy. arange ( start = 0. 1, stop = 0. 91, step = 0. 4 ) : universe = cosmologyobject ( h0 = h0, om0 = om0 ) og0 = universe. omegaphotons ( redshift = 0. 0 ) onu0 = universe. omeganeutrinos ( redshift = 0. 0 ) self. assertalmostequal ( universe. omegamatter ( redshift ...
[ 0.2114979773759842, -0.28673049807548523, 0.7668725848197937, -0.49790963530540466, 0.17640909552574158, 0.48846638202667236, 0.5283946394920349, 0.03593526408076286, 0.2139028161764145, -0.8850793242454529, -0.4614548683166504, -0.3461274206638336, -0.07414177060127258, 1.473081111907959,...
def sample _ covariance ( self ) : pass
[ 0.23136883974075317, -1.1407456398010254, 0.43406084179878235, 0.902035653591156, -0.4996882379055023, 0.31053227186203003, 0.9023635387420654, -0.04383811354637146, 0.00687938928604126, 0.5806338787078857, -0.8370301723480225, 0.9705080389976501, 0.0918157622218132, 0.05987128987908363, ...
def add _ transaction ( self, sender, receiver, amount ) : self. transactions. append ( {'sender': sender,'receiver': receiver,'amount': amount } ) previous _ block = self. get _ previous _ block ( ) return previous _ block ['index'] + 1
[ 0.05433165282011032, 0.7673208117485046, 0.7229779362678528, -0.7053713202476501, -0.37353241443634033, -1.174580693244934, 0.42031192779541016, -0.30902794003486633, 0.18341529369354248, -0.24136097729206085, -0.6266636848449707, -0.4244210720062256, -0.6842008233070374, -0.68472659587860...
def test _ register _ input _ and _ user _ name _ too _ long ( self, * _ ) : self. open ( base _ url +'/ logout') # go to main page self. open ( base _ url +'/ register') # validate that the user is taken to / login assert self. get _ current _ url ( ) = = base _ url +'/ register'self. type ('# email ','test _ frontend...
[ -0.44291743636131287, 0.7560337781906128, 0.5038711428642273, 0.19562634825706482, 0.07957552373409271, 0.29024481773376465, 0.41736117005348206, -0.1438416987657547, -0.2447987198829651, -0.5229483842849731, -1.1947685480117798, 0.70892733335495, -0.06209598481655121, 1.0524412393569946, ...
def sign _ request ( secret, s3 _ canonical _ path, content _ type, date, acl ) : pstr = " " " put { content _ type } { date } x - amz - acl : { acl } / { s3 _ canonical _ path } " " ". format ( content _ type = content _ type, date = date, acl = acl, s3 _ canonical _ path = s3 _ canonical _ path ). strip ( ) hashed = ...
[ -0.3665730357170105, -0.47897234559059143, 0.5631057024002075, 0.0008475218783132732, -0.4000511169433594, 0.05788212642073631, -1.0208885669708252, 0.2331789880990982, -0.26831912994384766, 0.501008152961731, 0.05334940552711487, 0.3871479332447052, -0.30879417061805725, -1.22320568561553...
def writemodeller ( outfile, mali, line _ width = 60, identifiers = none, skip _ first = 0, gap _ char = none ) : mali _ width = mali. getwidth ( ) mali _ length = mali. getlength ( ) for x in range ( skip _ first, mali _ width ) : if identifiers : outfile. write ( " > " + str ( identifiers [ x ] ) + " \ n " ) else : o...
[ -0.5879401564598083, -0.16144123673439026, 0.7503551244735718, -0.3499937653541565, -0.29030612111091614, 0.7286501526832581, 0.15584814548492432, 0.7405305504798889, -0.1627955138683319, -0.19069929420948029, -0.16975340247154236, -0.18444116413593292, 0.6501805186271667, 0.64657688140869...
def verify _ password ( self, password ) : userhash = self. get _ hash ( ) if userhash is none : return false return hash. verify ( password, userhash )
[ 0.8264937996864319, 0.22693699598312378, 0.32255232334136963, 1.502472162246704, 0.1894097477197647, 0.3185015916824341, -0.3661873936653137, 0.16084125638008118, 0.6326521039009094, -0.4944884479045868, -0.8276891708374023, -0.1834292858839035, -0.4426800310611725, 0.9703685641288757, -...
def _ _ getitem _ _ ( self, idx ) : row = self. _ dataframe. iloc [ idx ] # build sample data by iterating through format columns. samples = [ ] zygosities = [ ] format _ keys = sorted ( self. _ format _ vcf _ key _ counts. keys ( ) ) for call in self. _ sample _ names : call _ data = [ ] for k in format _ keys : count...
[ -0.7508341073989868, -0.11718110740184784, 0.6881459951400757, -0.40592971444129944, -0.42189547419548035, -0.923835277557373, 0.12363932281732559, -0.8292706608772278, -0.20839454233646393, -0.22745558619499207, -0.05960005894303322, 0.5413573980331421, 0.5882546901702881, -1.117478966712...
def extract _ cogzymes _ from _ enzymes ( node, gene _ cog _ dict ) : genes _ not _ found = [ ] enzymes _ not _ found = [ ] if node [ " type " ] = = " reaction " : node [ " cogzymes " ] = [ ] for enzyme in node [ " enzymes " ] : cog _ list = [ ] missing _ cog = 0 for gene in enzyme. gene _ list : if gene not in gene _ ...
[ -0.4873073399066925, 0.23242399096488953, 0.39657071232795715, 0.19803784787654877, -0.006034497171640396, -0.10045192390680313, 0.012846667319536209, 1.157309889793396, -0.31426456570625305, 1.100016713142395, -0.12444854527711868, 0.2508177161216736, -0.10394607484340668, 0.8291655778884...
def run _ sims ( opt _ path : str ='images / optimized. png ', on _ off _ path : str ='images / on _ off. png') : dff = pd. read _ csv ( base _ path /'data / test _ data. csv') energy _ cost = dff ['energy _ cost']. values outdoor _ temp = dff ['outdoor _ temp']. values hs = runsim ( energy _ cost, outdoor _ temp, verb...
[ -0.19253093004226685, 0.46159133315086365, 0.4490664601325989, 0.45338180661201477, -0.00868026353418827, 0.627707302570343, -0.30697253346443176, 0.451071172952652, -0.19797392189502716, 0.3911803364753723, -0.37564507126808167, 0.36527907848358154, -0.04770142212510109, -0.16224448382854...
def get _ ack _ nak _ subject ( ) : swiftwriter _ config = get _ config _ from _ fparameter ('fswiftwriterconfig') ack _ nak _ subject = getattr ( swiftwriter _ config,'acknaksubject ', none ) if not ack _ nak _ subject : notifier. info ( " fparameter acknaksubject is not defined. setting default ack nak message subjec...
[ 0.8592516183853149, 0.342151939868927, 0.26005980372428894, -0.4927535057067871, -0.24469998478889465, -0.045383673161268234, 0.6771757006645203, -0.4226070046424866, -0.3885704576969147, 0.26518863439559937, 0.45348989963531494, 0.157822385430336, 0.21556402742862701, 0.7869269251823425, ...
def home ( request ) : return render ( request,'the _ snowmen _ snowpack _ viewer / home. html')
[ 0.6890549063682556, 0.39171817898750305, 0.23071524500846863, 0.6581723093986511, -0.3384644687175751, 0.042203690856695175, 0.7663252353668213, 0.7684187889099121, 0.5837611556053162, -0.537081778049469, 0.5335552096366882, 0.2564834952354431, -0.016220929101109505, 0.2416122555732727, ...
def saveruntime ( full _ path, job _ start _ time, abbrev, algorithm, cvcount ) : runtime _ file = open ( full _ path +'/ runtime / runtime _'+ abbrev [ algorithm ] +'_ cv'+ str ( cvcount ) + '. txt ','w') runtime _ file. write ( str ( time. time ( ) - job _ start _ time ) ) runtime _ file. close ( )
[ 0.2563028931617737, -0.9515524506568909, 0.6768559217453003, -0.15253886580467224, 0.21579912304878235, 0.41187208890914917, 0.015446541830897331, 0.41150012612342834, -0.9825480580329895, 0.3850802779197693, -1.1758408546447754, 0.23722676932811737, -0.4714122414588928, 0.3821033835411072...
def get _ iou _ from _ masks ( self, single _ blob _ mask _ 1, single _ blob _ mask _ 2 ) : # todo find variable assert len ( single _ blob _ mask _ 1. shape ) = = 2 # should be a greyscale image assert len ( self. get _ area _ of _ blobs ( single _ blob _ mask _ 1 ) ) = = 1 # mask should only have one blob in it asser...
[ -0.5346291661262512, -0.2640732228755951, 1.204302430152893, 0.6847969889640808, 0.36097708344459534, 0.22349131107330322, 0.9056203961372375, -0.23440775275230408, -0.16173630952835083, 0.1979285180568695, 0.4304253160953522, -0.09613214433193207, -0.6096997857093811, 0.24414114654064178,...
def test _ runnerdebuggerdefaultstopdb ( self ) : self. parseoptions ( ['- - debug ','twisted. trial. test. sample'] ) pdbrcfile = filepath ( " pdbrc " ) pdbrcfile. touch ( ) self. runcall _ called = false def runcall ( pdb, suite, result ) : self. runcall _ called = true self. patch ( pdb. pdb, " runcall ", runcall ) ...
[ -0.7703257203102112, 0.7471446990966797, 0.6906255483627319, 0.012623301707208157, 0.9015402793884277, 0.7593011856079102, 0.15804925560951233, 0.3515891134738922, -0.34323084354400635, -0.617099940776825, -0.915745735168457, -0.2964687645435333, -0.9169526100158691, 0.09425981342792511, ...
def check _ django _ stack _ ready ( ) : apps. check _ apps _ ready ( )
[ -0.27300506830215454, 0.45173072814941406, 0.31125712394714355, 1.2803131341934204, 0.5104848146438599, 0.43776312470436096, 0.06009048968553543, -0.3921155333518982, -0.6121453046798706, 1.4355554580688477, -1.3666223287582397, 0.1743413805961609, 0.5548319816589355, 1.4999854564666748, ...
def parse ( self, source _ code : str ) - > iterator [ optional [ kal _ ast. node ] ] : self. tokens = lexer ( source _ code ). tokens ( ) self. _ _ eat _ tok ( ) while self. curr _ tok. type! = tokentype. eof : if ( top _ level : = self. _ parse _ top _ level ( ) ) is not none : yield top _ level
[ -0.3468906581401825, 0.16853661835193634, 0.6237410306930542, 0.03462136909365654, -0.9949247241020203, -0.509326159954071, -0.2984160780906677, 0.08814305812120438, 0.11714570224285126, 0.49761149287223816, 0.3291323781013489, 0.043466269969940186, 0.20926877856254578, 0.5714591145515442,...
def handle _ card _ click ( message, consumer ) : channel _ message = none group _ name ='' ws _ message = none try : game = models. game. objects. get ( pk = uuid. uuid ( message [ " gameid " ] ) ) except models. game. doesnotexist : print ( " error : handle _ card _ click : user _ name = " + consumer. username + ", g...
[ -0.1514638513326645, -0.04766527935862541, 0.8520246148109436, -0.7303330898284912, 0.07018347084522247, -0.8826658725738525, -0.31823042035102844, -0.7886561751365662, 0.026286303997039795, 0.9509367942810059, 0.8187848925590515, 0.21549250185489655, -0.33933281898498535, 0.45449566841125...
def arrayrange ( start, stop = none, step = 1, typecode = none, axis = none, attributes = none, id = none, dtype = none ) : dtype = _ convdtype ( dtype, typecode ) if stop is none : maresult = numpy. ma. arange ( start, step = step, dtype = dtype ) else : maresult = numpy. ma. arange ( start, stop = stop, step = step, ...
[ -0.6073299646377563, -0.24027514457702637, 0.5995156764984131, 0.2947787344455719, -0.5875605940818787, -1.0844706296920776, -0.10141529887914658, -0.015596840530633926, -0.6764804124832153, 0.21013040840625763, -0.30579689145088196, 1.0558170080184937, 0.24045473337173462, -0.643115341663...
def append ( self, i, v ) : if _ _ debug _ _ : # make sure that order is preserved try : assert self. _ index [ - 1 ]. uid < i. uid, ( self. _ index [ - 1 ]. uid, i. uid ) except indexerror : # don't care about an empty list pass self. _ index. append ( i ) self. _ value. append ( v )
[ -0.7646331787109375, -0.34293121099472046, 0.35081371665000916, 0.24595913290977478, 0.13553546369075775, 0.7608163356781006, -0.0848681852221489, -0.17003528773784637, 0.648490309715271, -0.3079596757888794, -0.42536336183547974, 0.3315229117870331, -0.717841625213623, -0.0844170823693275...
def create _ server _ connection ( db _ host, db _ user, db _ passwd ) : connection = none try : connection = connect ( host = db _ host, user = db _ user, passwd = db _ passwd, ) except error as err : raise dberror ('cannot connect to mysql server') from err return connection
[ 0.2177712619304657, -0.12830232083797455, 0.38824430108070374, 0.2100605070590973, -0.05890737473964691, 0.09656158834695816, -0.6989906430244446, -0.35153019428253174, -0.8927867412567139, 0.03621668741106987, -0.09805819392204285, -0.08438318222761154, -0.6471017599105835, 0.085230663418...
def allow _ vpc _ to _ remote _ classic _ link ( self ) - > optional [ pulumi. input [ bool ] ] : return pulumi. get ( self, " allow _ vpc _ to _ remote _ classic _ link " )
[ -0.1748441904783249, -0.26127198338508606, 0.6225913166999817, 0.2508772313594818, 0.4626658260822296, 2.7555997371673584, -0.005037663038820028, 0.0579422228038311, -0.6756723523139954, 0.051684968173503876, -0.37716376781463623, 1.4328197240829468, -0.8447008728981018, -1.109095573425293...
def dz _ var _ in _ pixel ( gas, header, center _ list, r _ max _ list, lz _ list = none, \ height _ list = none, pixel _ res = 2, depletion = false, cosmological = true, labels = none, \ foutname ='dz _ variation _ per _ pixel. png ', style ='color ', log = true ) : # get plot stylization linewidths, colors, linestyle...
[ -0.013452650979161263, 0.04186572507023811, 0.8738704919815063, -0.005009026732295752, -0.6814613938331604, 0.28392094373703003, 0.30351677536964417, 0.27955806255340576, -0.133155956864357, 0.013181409798562527, 0.2602863013744354, 0.5971860289573669, 0.1167445182800293, 0.156006038188934...
def elapsed _ ticks ( self ) - > int : if self. _ elapsed _ time is none : raise timererror ( f " timer is not running. use. start ( ) to start it " ) return int ( self. _ elapsed _ time * 10000000 )
[ 0.8639508485794067, 0.8416953086853027, 0.38533738255500793, -0.024977385997772217, 0.2300933301448822, 0.16656270623207092, 0.6380243897438049, 0.700947105884552, -0.24026460945606232, -0.5183234214782715, -0.2085583209991455, 0.016806170344352722, -0.18833288550376892, 1.3979599475860596...
def get _ test _ predictions ( args, clip, r, score ) : c = args. clip _ y [ clip ] a _ train = r ['train _ mode'] a _ test = r ['test _ mode'] # mean across cv folds t _ cv = np. mean ( a _ train ['t _ train _ % s'% score ] [ c ], axis = 0 ) v _ cv = np. mean ( a _ train ['t _ val _ % s'% score ] [ c ], axis = 0 ) if ...
[ -0.45643728971481323, -0.9880001544952393, 0.8066639304161072, 0.07148217409849167, -0.6479227542877197, 0.2278071790933609, 0.8662318587303162, 0.2288409322500229, 0.1536436378955841, 1.1780024766921997, 0.44862452149391174, 0.2653653621673584, 1.3369230031967163, -0.03818432241678238, ...
def get _ scorefunction _ name ( self ) : return self. scorefunction
[ -0.20721368491649628, -0.45639780163764954, 0.5947815179824829, 0.2651325762271881, 0.18920956552028656, -0.18526127934455872, 0.5015811920166016, -0.8754398822784424, -0.45603814721107483, 0.6728991866111755, -0.26996728777885437, 0.27382490038871765, -0.10195939242839813, -0.922993898391...
def initializegpu ( self, * args ) : self. gfunction, self. blocksize, self. grid = args
[ -0.09082064032554626, 1.1242119073867798, 0.512647807598114, 0.9436786770820618, 1.3603180646896362, -0.27699947357177734, 0.5222446322441101, -0.8275156617164612, -1.3549588918685913, -0.2854776978492737, -0.3509383201599121, 0.991799533367157, -0.9585387110710144, 0.6576749086380005, 0...
def get _ feedback ( self, block ) : pass
[ -0.2139238715171814, -0.5298570394515991, 0.3521170914173126, 1.2315481901168823, 0.3981435000896454, -0.3523288071155548, 0.5683742761611938, -1.1549155712127686, -0.5510557889938354, -0.8737172484397888, -1.1940690279006958, 0.607607364654541, -0.46766397356987, 0.7288064360618591, 0.3...
def scale _ pdf ( k, factors ) : x1, y1, x2, y2 = k scaling _ factor _ x, scaling _ factor _ y, pdf _ y = factors x1 = scale ( x1, scaling _ factor _ x ) y1 = scale ( abs ( translate ( - pdf _ y, y1 ) ), scaling _ factor _ y ) x2 = scale ( x2, scaling _ factor _ x ) y2 = scale ( abs ( translate ( - pdf _ y, y2 ) ), sca...
[ -0.1425359547138214, -1.056828260421753, 0.8764645457267761, -1.1975350379943848, 0.04336477071046829, -0.1926790177822113, -0.965405285358429, -0.2909223139286041, -1.073154091835022, 0.5049068927764893, 0.43988001346588135, -0.5962682962417603, 0.5952901244163513, -0.5879197716712952, ...
def get _ selected _ items ( self ) : datas = [ i. data ( noderole ) for i in self. view. get _ indices ( ) ] items = [ d for d in datas if d is not none ] # filter nones return items
[ -0.6646677851676941, -0.2894822955131531, 0.3753488063812256, -0.270151287317276, 0.13442263007164001, -0.6562631726264954, -0.2694421708583832, -0.2859647870063782, 0.20038577914237976, 0.11122957617044449, -0.41520553827285767, 0.9441565275192261, 0.2302514761686325, -0.4528777301311493,...
def get _ config _ logger ( self, logfile, level = logging. info, max _ bytes = 5242880, log _ console = false ) : pathutils ( ). ensure _ has _ paths ( logfile, is _ filename = true ) self. logger = logging. getlogger ('gregor') formatter = logging. formatter ( u'% ( asctime ) s - % ( name ) s - % ( levelname ) s - % ...
[ 0.09652744233608246, 0.046633847057819366, 0.6044397950172424, -0.30919256806373596, 0.34543320536613464, 0.11451757699251175, -0.3096722662448883, 0.339432954788208, -1.3515000343322754, -0.346158891916275, -0.5832142233848572, -0.4701908826828003, 0.08636084198951721, 1.1643798351287842,...
def filter _ elevation _ data ( lidar ) : # t = lidar [ ele ] < lidar [ ele ]. min ( ) + ( ( lidar [ ele ]. max ( ) - lidar [ ele ]. min ( ) ) / 4 ) # t = lidar [ ele ] < lidar [ ele ]. mean ( ) t = lidar [ ele ] < ( np. median ( lidar [ ele ] [ lidar [ ele ] < np. median ( lidar [ ele ] ) ] ) ) # elevations in the fir...
[ -0.15445011854171753, -0.4879330098628998, 0.6658408641815186, -0.8500088453292847, -0.6363099217414856, 0.6905446648597717, -0.533994734287262, -0.35571402311325073, -0.5836407542228699, 0.3994499146938324, 0.24889294803142548, -0.01596936769783497, 0.353866308927536, -0.5637431144714355,...
def _ get _ active _ iscsi _ ips ( self, mg _ conn ) : active _ gw _ iscsi _ ips = [ ] interfaces _ to _ skip = ['lo ','vlan10 ','eth1 ','eth2 ','eth3'] bn = " / net / interface / config / * " intf _ list = mg _ conn. basic. get _ node _ values ( bn ) for i in intf _ list : do _ skip = false for s in interfaces _ to _ ...
[ -0.8283225297927856, -0.7208994030952454, 0.7201516032218933, 0.4026106894016266, 0.25084078311920166, 0.21945466101169586, 0.10692411661148071, 0.1705586165189743, -0.6404247879981995, 0.5753965377807617, -0.10304950922727585, 0.2419506311416626, -0.8824231624603271, -0.6731546521186829, ...
def post ( request, ptype, pk ) : action = reverse ( " forum. views. % s " % ptype, args = [ pk ] ) if ptype = = " new _ thread " : title = " start new topic " subject ='' elif ptype = = " reply " : title = " reply " subject = " re : " + thread. objects. get ( pk = pk ). title return render _ to _ response ( " forum / ...
[ -0.0454072542488575, 0.09480615705251694, 0.6545966863632202, 0.46265652775764465, 0.15150944888591766, 0.2292337864637375, -0.4122921824455261, -0.428501158952713, 0.36120885610580444, -0.39659884572029114, 0.7121465802192688, 0.2982161045074463, -0.9028943777084351, 0.5983129143714905, ...
def newgeneration4 ( self ) : for i in range ( 0, len ( self. population ) ) : " " " depending of your experiment you need to use the most suitable algorithms for : 1. select two candidates 2. apply crossover 3. apply mutation " " " ia, ib = self. stochasticuniversalsampling ( ) # * * * * single child implementation * ...
[ -0.4094209372997284, -0.13994288444519043, 0.6265753507614136, 1.4573560953140259, -0.3237249255180359, 0.917799174785614, 0.6273529529571533, 0.05806591734290123, 0.11832335591316223, 0.7616376280784607, -0.6173629760742188, -0.5139843821525574, -0.41385510563850403, 0.2105475664138794, ...
def select ( self, alphabet ) : # - > array :...
[ -2.2474169731140137, -0.904235303401947, 0.24883924424648285, 0.144800066947937, 0.9851818084716797, -0.6830987930297852, 0.534761905670166, -1.1837081909179688, 0.7216934561729431, 0.3626815974712372, -1.4411934614181519, 1.420324444770813, -1.540897250175476, -0.13589178025722504, 0.13...
def move ( self, liste ) : # alte position speichern alt _ xpos = self. xpos alt _ ypos = self. ypos # bewegen self. xpos + = int ( self. richtung [ 0 ] * self. geschwindigkeit ) self. ypos + = int ( self. richtung [ 1 ] * self. geschwindigkeit ) # kollisionsabfrage wand bx, by = self. collision _ wand ( ) # richtung a...
[ -0.2948817312717438, -1.2920817136764526, 0.8264127373695374, 0.06786449253559113, 0.05330450087785721, 0.39620065689086914, 0.5877223610877991, -0.6083006262779236, -0.2039303034543991, 0.814747154712677, -1.0603752136230469, -0.8459186553955078, -0.15786193311214447, 0.360844224691391, ...
def get _ authenticated _ subjects ( cert _ pem ) : if isinstance ( cert _ pem, str ) : cert _ pem = cert _ pem. encode ( " utf - 8 " ) return d1 _ common. cert. subjects. extract _ subjects ( cert _ pem )
[ -0.17372941970825195, 0.49233266711235046, 0.19125083088874817, 0.5523594617843628, -1.176434874534607, 0.10558620095252991, -0.1849251240491867, -0.6994543075561523, 0.7361330986022949, 0.211643248796463, -0.08369381725788116, 0.5736745595932007, -1.213775634765625, -1.6800227165222168, ...
def _ _ track ( ) : if key. _ _ current _ volume = = none : key. _ _ current _ volume = 0 for i in range ( 0, 50 ) : key. volume _ up ( )
[ -0.5746815204620361, -0.6103698015213013, 0.6650989055633545, 0.17984983325004578, 0.4706208109855652, 0.03817010298371315, 0.1852673441171646, -0.41976815462112427, -1.039381742477417, 0.7174160480499268, 0.2679048180580139, 0.24196645617485046, -0.8069305419921875, 0.5597477555274963, ...
def pre _ replace _ jacobian ( pre _ replacements, dim _ in ) : dim _ out = len ( pre _ replacements ) mask = pre _ replacements > = 0 position _ in = pre _ replacements [ mask ] position _ out = np. arange ( dim _ out ) [ mask ] jacobian = np. zeros ( ( dim _ out, dim _ in ) ) jacobian [ position _ out, position _ in ...
[ -0.5164372324943542, -0.41297978162765503, 0.3480116128921509, -0.3900526762008667, -0.7029465436935425, -0.22370575368404388, 1.2706634998321533, 1.3338565826416016, -0.032084666192531586, -0.27112430334091187, -0.3784967064857483, 1.2582577466964722, -0.1295376867055893, -0.0481341816484...
def ttl ( self, key ) : if self. get ( key, with _ age = true )! = false : temp _ value, temp _ time = self. get ( key, with _ age = true ) return temp _ time else : return false
[ -0.8797603249549866, -0.013212737627327442, 0.6656261086463928, -0.8582067489624023, -0.8481407165527344, 0.09297119826078415, -1.0221905708312988, -0.34153228998184204, 0.05998209863901138, 2.1391167640686035, -0.5871695876121521, -1.3020731210708618, -0.35564470291137695, 0.9016227722167...
def _ dispatch ( self, event : union [ str, callable ], payload : dict = { } ) - > none : ( event, handlers ) = self. _ get _ handlers ( event, payload ) for handler in handlers : handler ( event )
[ -0.07938306033611298, 0.16415569186210632, 0.36252981424331665, 0.29578426480293274, 0.10231991112232208, 0.15424543619155884, -0.5839142799377441, 0.28657305240631104, 0.0022908037062734365, -0.5799592137336731, -0.567044198513031, -0.06128827482461929, 1.0292164087295532, 0.6576380133628...
def get _ greenwich _ earthlocation ( ) : site _ registry = earthlocation. _ get _ site _ registry ( force _ builtin = true ) return site _ registry. get ('greenwich')
[ -0.371003657579422, 1.110705852508545, 0.4247843027114868, -0.16877354681491852, 0.6828840374946594, 0.660037100315094, 1.031354546546936, -0.33381471037864685, -0.2214062660932541, -0.0758400410413742, -0.4301038980484009, 1.1752418279647827, -0.34526973962783813, -0.007209859322756529, ...
def run _ rf _ full ( x _ train, y _ train, x _ test, y _ test, randseed, i, param _ grid, n _ trials, timeout, do _ plot, full _ path, use _ uniform _ fi, primary _ metric ) : # check whether hyperparameters are fixed ( i. e. no hyperparameter sweep required ) or whether a set / range of values were specified for any ...
[ 0.10893740504980087, 0.8517462611198425, 0.9832763671875, 1.083229422569275, 0.018978526815772057, -0.14615826308727264, 0.6544562578201294, 0.6379859447479248, -0.6142836213111877, -0.0478840097784996, -0.036352261900901794, 0.390215665102005, 0.19633524119853973, 0.5109848976135254, -0...
def amenitygetter ( amenity _ id ) : amenity = storage. all ( amenity ). values ( ) if amenity _ id is not none : for obj in amenity : if obj. id = = amenity _ id : return jsonify ( obj. to _ dict ( ) ) abort ( 404 )
[ -0.5181668996810913, -1.0729494094848633, 0.7051036953926086, 0.13169702887535095, -0.0875154584646225, -0.8576013445854187, -0.8902547955513, -0.9475487470626831, 0.49482181668281555, 0.5293601751327515, 0.05374109745025635, 0.9302652478218079, 0.6224604249000549, 0.23455175757408142, -...
async def web _ handler ( request ) : return web. response ( content _ type = " text / html ", body = desktop _ html )
[ 0.10175728052854538, 0.48623326420783997, 0.5295212268829346, 1.5505750179290771, -0.6437810063362122, 0.27935999631881714, 0.2106533944606781, 0.11325021088123322, -0.4650685489177704, -0.2746773362159729, 0.47723841667175293, -0.4533153176307678, 0.13643309473991394, 0.3747909963130951, ...
def get _ filter _ space _ domain ( self, real = true ) : if not self. cache _ space _ domain : self. cache _ space _ domain = self. inverse _ fourier _ transform ( self. cache _ filtered _ frequency ) if real : return np. real ( self. cache _ space _ domain ) else : return self. cache _ space _ domain
[ -0.8532318472862244, 0.5388315320014954, 0.39795276522636414, 0.9860149025917053, -0.2722852826118469, 0.12460682541131973, 0.2927219867706299, -0.08382882922887802, 0.5699656009674072, -0.7685745358467102, -0.04956351965665817, 1.759676456451416, 0.0004604678542818874, -0.0396168306469917...
def plot _ to _ png ( self, plot _ y, plot _ x ) : plot _ height, plot _ width = self. plot _ shape png _ height, png _ width = self. png _ shape plot _ y + = self. plot _ origin [ 0 ] plot _ x + = self. plot _ origin [ 1 ] png _ y = plot _ y * ( png _ height / plot _ height ) png _ y = ( png _ height - 1 ) - png _ y p...
[ -0.3933904469013214, -0.34226322174072266, 0.8338110446929932, -0.8752301931381226, -0.18249386548995972, 0.45932066440582275, -0.39530906081199646, -0.4265506863594055, -0.3965834081172943, 0.5986988544464111, -0.45420771837234497, 0.6684980988502502, 0.8742472529411316, -0.40069389343261...
def generate _ nums ( n ) : return ( " ". join ( seq ) for seq in itertools. product ( " 01 ", repeat = n - 2 ) )
[ -0.7977110743522644, 0.8720711469650269, 0.5863515138626099, 0.5066969394683838, -0.03661997616291046, -0.023579342290759087, -0.3029499053955078, -0.09624970704317093, 0.26909133791923523, -0.5484045147895813, -1.261960506439209, -0.43055424094200134, 0.4375925660133362, 0.733262062072753...
def unlock _ status ( self ) : self. _ lock _ status = false
[ 0.2166191041469574, -0.20914417505264282, 0.2310952991247177, 0.15862026810646057, -0.03269622474908829, 0.5017486810684204, 0.3373563289642334, 1.388187289237976, -0.4219113886356354, -0.42460864782333374, -0.2932332754135132, 0.9356587529182434, -0.3565889596939087, -0.7992956638336182, ...
def open _ slide ( filename, image = false ) : if isinstance ( filename, path ) : filename = filename. _ _ fspath _ _ ( ) if image : return imageslide ( filename ) else : return openslide ( filename )
[ -0.6860040426254272, -0.6296436786651611, 0.4583064913749695, 0.19354498386383057, -0.7586250305175781, 0.2605295777320862, 0.5877204537391663, 0.480508029460907, -0.2896873354911804, -0.29358094930648804, 0.7620174884796143, -0.36164048314094543, -0.10546527802944183, 0.41004154086112976,...
def check _ view _ permissions ( self ) : return false
[ -0.2863503694534302, 0.666767954826355, 0.4568759500980377, 1.1217138767242432, -1.3624215126037598, 0.2403651773929596, 0.7061461210250854, 0.2585742175579071, -0.1770346462726593, -0.8517131209373474, 0.6427077651023865, 0.10188727080821991, -1.001761555671692, 0.27277085185050964, -1....
def read _ namefiles ( ) : return pd. read _ json ( readfiles + r " \ femalenames. json " ), pd. read _ json ( readfiles + r " \ malenames. json " ), pd. read _ json ( readfiles + r " \ surname. json " )
[ -1.217623233795166, -0.26842188835144043, 0.6859393119812012, -0.7160061001777649, -0.3643520474433899, 0.23976807296276093, -0.5912632942199707, -0.8897686004638672, -1.0500743389129639, 0.6971777677536011, -0.7850258350372314, -0.13215534389019012, 0.18838052451610565, -0.580382347106933...
def _ _ init _ _ ( self, req ) : super ( gateway, self ). _ _ init _ _ ( req ) self. started _ response = false self. env = self. get _ environ ( ) self. remaining _ bytes _ out = none
[ 0.34644046425819397, -0.33595481514930725, 0.5032661557197571, 0.27105963230133057, 0.322662353515625, 0.1966712921857834, 0.6082067489624023, 0.09686241298913956, 0.08503414690494537, -0.4740988314151764, -0.4526887834072113, 0.22424495220184326, -0.9717177152633667, 2.0078158378601074, ...
def check _ ldd ( self, path : str, env : str ) : #'| | exit 0'prevents ldd from failing due to non executables stdout, stderr, code = run _ command ( commands. run, " - n ", env, " ldd ", path, " | | ", " exit ", " 0 " ) log. debug ( f " ldd stdout :'{ stdout } ', stderr :'{ stderr } ', code : { code } " ) for line in...
[ 0.41235554218292236, -0.49016523361206055, 1.0414000749588013, -0.24658997356891632, -0.472836434841156, 0.8377550840377808, -0.6552113890647888, -0.293559730052948, -0.10876719653606415, -0.17399172484874725, 1.0070669651031494, 0.464265376329422, -0.5061438679695129, 1.5069185495376587, ...
def match _ window ( eyes, path ) : # pylint : disable = protected - access logger. info ('matching file against baseline : { } '. format ( path ) ) if not eyes. _ running _ session : eyes. _ start _ session ( ) eyes. _ match _ window _ task = _ match _ window _ task. matchwindowtask ( eyes, eyes. _ agent _ connector, ...
[ -0.3718147277832031, -0.9144355654716492, 0.7564165592193604, 0.3000525236129761, -0.5627924799919128, -0.12692776322364807, 0.1530386358499527, 0.26666197180747986, -0.042399998754262924, 0.8976221680641174, 0.46538299322128296, 0.2638806700706482, -0.09382594376802444, 0.1650287806987762...
def apply ( sch, target, layout ) : if sch. is _ lowered ( ) : raise apierror ( ". reform ( ) must be called before lowering " ) filename, lineno = get _ src _ loc ( ) loc = ast. location ( filename, lineno ) reform _ op = ast. reformop ( target, layout, loc ) sch. ast. top _ func. body. append ( reform _ op ) op = ref...
[ -0.3133620023727417, 0.5077522397041321, 0.6822623610496521, -0.2506614923477173, -0.8533775210380554, -0.35478857159614563, 0.7106723189353943, 1.0399843454360962, 0.2823677957057953, 0.21244071424007416, 0.7240132093429565, 0.26658695936203003, 0.3236543834209442, -0.2710861563682556, ...
def valid _ ife ( self, ife ) : if ife ['length'] : return true self. logger. warning ( " invalid ife % s, 0 length ", ife ['id'] ) return false
[ -0.9831545948982239, 0.5358182191848755, 0.4036158323287964, 0.1005558967590332, -0.12256123870611191, 0.24113690853118896, -0.2256106585264206, 0.37277132272720337, -0.17179156839847565, -0.20330031216144562, -0.11814809590578079, -0.46532127261161804, -0.7098146080970764, 0.2497242242097...
def cli ( path ) : cmd = f " pytest { path } - v - - cov ='myapp'" return subprocess. call ( cmd, shell = true )
[ 0.33916184306144714, -0.1501350849866867, 0.4832763969898224, -0.021410277113318443, 0.19250793755054474, 0.620955765247345, 0.44820648431777954, -0.8452379703521729, 0.027518320828676224, -0.0847340077161789, 0.5297864079475403, 0.5487661361694336, -0.023780234158039093, -0.44635391235351...
def print _ results ( self ) : self. report ('\ n'+'='* 75 ) total _ injections = len ( self. hash _ found ) + len ( self. hash _ notfound ) if len ( self. hash _ found ) + len ( self. hash _ notfound ) = = 0 : pass else : self. report ( " [ * ] final results : " ) self. report ('='* 75 +'\ n') self. report ( " - injec...
[ -0.06380133330821991, -0.06145172193646431, 0.7886602878570557, -0.558734118938446, 1.0433169603347778, -0.41799256205558777, 0.5033594369888306, -0.10510394722223282, -0.963302493095398, -0.5243304371833801, -0.4155075252056122, -0.26505687832832336, -0.2602163553237915, 0.796592235565185...
def _ cast ( obj : any ) - > expr : return obj if isinstance ( obj, expr ) else constant ( obj )
[ 0.06604016572237015, -0.5159809589385986, 0.4902620315551758, 0.3888675570487976, -0.23016388714313507, 0.43283811211586, 0.25341570377349854, 0.09265942871570587, 0.8728836178779602, 0.7807335257530212, 0.28452765941619873, 1.1659871339797974, -0.8722931146621704, -0.44918957352638245, ...
def send ( self, request, context ) : context. set _ code ( grpc. statuscode. unimplemented ) context. set _ details ('method not implemented!') raise notimplementederror ('method not implemented!')
[ -1.514092206954956, 0.16594873368740082, 0.7065281271934509, 0.529302179813385, 0.6596908569335938, 0.6526119112968445, 0.35862433910369873, -0.6481000781059265, 0.292415589094162, 0.12385337054729462, -0.07441886514425278, 0.9659700989723206, -0.5653787851333618, 0.36317163705825806, -0...
def objective _ rf ( trial, est, x _ train, y _ train, randseed, hype _ cv, param _ grid, scoring _ metric ) : params = {'n _ estimators': trial. suggest _ int ('n _ estimators ', param _ grid ['n _ estimators'] [ 0 ], param _ grid ['n _ estimators'] [ 1 ] ),'criterion': trial. suggest _ categorical ('criterion ', para...
[ 0.6175361275672913, 0.3608373701572418, 1.0241974592208862, 0.6165147423744202, 0.16136302053928375, -0.6005297899246216, -0.3590071499347687, 0.17285378277301788, -1.0727193355560303, 1.0175892114639282, 0.494533896446228, 0.8979623317718506, 0.3305959105491638, -0.32395532727241516, 0....
def wrapped _ call ( * args ) : result = sdk _ func ( * [ type _ ( arg ) for type _, arg in zip ( argtypes, args ) ] ) check _ status ( result )
[ -1.084412932395935, 0.9639027118682861, 0.6762669682502747, 0.7603055238723755, 0.827623724937439, -0.2940308749675751, -0.8717278838157654, -0.6185789108276367, -0.5295627117156982, 0.5526515245437622, 0.3646284341812134, 0.45770251750946045, 0.18781554698944092, 0.20728366076946259, -0...
def _ symbol _ to _ channel ( self, symbol, channel _ type ) : if channel _ type = = " kline " : channel = " market. { s }. kline. 1min ". format ( s = symbol. replace ( " / ",'' ). lower ( ) ) elif channel _ type = = " depth " : channel = " market. { s }. depth. step0 ". format ( s = symbol. replace ( " / ",'' ). lowe...
[ -0.20180702209472656, -0.28042659163475037, 0.39372190833091736, -1.3628941774368286, 0.3395024836063385, -0.7520639300346375, -0.11061649024486542, -1.1313363313674927, -0.20835961401462555, 0.3339359760284424, 0.20709101855754852, 1.295975923538208, 0.15310804545879364, 0.079325534403324...
def pick _ random _ player ( players ) : global bye _ player prev _ bye = true while prev _ bye : random. shuffle ( players ) bye _ player = players [ 0 ] prev _ bye = execute _ query ( " select bye from players \ where player _ id = % s ", ( bye _ player [ 0 ], ) ) [ 0 ] [ 0 ] standings = player _ standings ( ) standi...
[ -0.8215054273605347, -0.6498523354530334, 0.739879310131073, -0.01036621443927288, 0.43647950887680054, -0.2778341472148895, 0.3736380338668823, -0.08501898497343063, 0.02414175495505333, 0.7481846213340759, -0.1736992448568344, 0.03869347646832466, -1.0648012161254883, -0.2727476954460144...
def get _ single _ stock _ target ( stockname ) : query _ url = " https : / / teknodeneyim. com / stocks / single / { } " res = requests. get ( query _ url. format ( stockname ) ) data = res. json ( ) if data = = none : return { } return data
[ -1.8335695266723633, 0.31820452213287354, 0.44795486330986023, -0.3122866749763489, 0.5355764031410217, -0.820606529712677, -0.7507975101470947, -0.9779144525527954, -0.15245012938976288, 0.11826916038990021, -0.24490369856357574, 0.5325705409049988, -0.15012449026107788, -0.21984700858592...
def add _ test _ type ( self, status : str, case _ log : list ) - > none : self. status = status self. case _ log = case _ log
[ 0.19140782952308655, -0.5189002156257629, 0.31934136152267456, 0.23871909081935883, 0.78109210729599, 0.9834936261177063, -0.35440850257873535, 0.25678274035453796, 0.7875398397445679, 0.03381066396832466, -0.8202499151229858, 0.234810471534729, -0.3411020338535309, 0.8970128893852234, 0...
def fullfact ( levels ) : n = len ( levels ) # number of factors nb _ lines = np. prod ( levels ) # number of trial conditions h = np. zeros ( ( nb _ lines, n ) ) level _ repeat = 1 range _ repeat = np. prod ( levels ) for i in range ( n ) : range _ repeat / / = levels [ i ] lvl = [ ] for j in range ( levels [ i ] ) : ...
[ 0.05954517796635628, -0.08319366723299026, 0.6113870143890381, 0.0268182884901762, 0.20406131446361542, -0.15897072851657867, 0.3910170793533325, 0.18362738192081451, 0.013064255006611347, -0.02173207513988018, 0.0039010164327919483, -0.0007872026762925088, -0.4279143512248993, 0.477322578...
def right _ mouse _ menu ( self, pos ) : active = self. view. currentindex ( ) # index under mouse active = active. sibling ( active. row ( ), 0 ) # get first column globalpos = self. view. viewport ( ). maptoglobal ( pos ) menu = qtwidgets. qmenu ( self. view ) # direct assignment apply _ action = qtwidgets. qaction (...
[ -0.25191745162010193, -0.7123194336891174, 0.7277835607528687, -0.046386901289224625, -0.7282404899597168, -0.1707458198070526, 0.8295862674713135, -0.5754584074020386, 0.08924713730812073, 0.3493778705596924, -0.3801923394203186, 0.7025867104530334, 0.2643006145954132, -0.5845217704772949...
def export ( self ) : ( inten, aop, dop ) = self. polarization nbr, nbc = self. rgb. shape [ 0 ], self. rgb. shape [ 1 ] fina = np. zeros ( ( nbr * 2, nbc * 2, 3 ), dtype ='uint8') aop _ colorhsv = np. uint8 ( cv2. merge ( ( ( aop + np. pi / 2 ) / np. pi * 180, np. ones ( aop. shape ) * 255, np. ones ( aop. shape ) * 2...
[ -0.6991457939147949, -0.4385053217411041, 0.8366649150848389, -0.4076026380062103, 0.3669912815093994, -0.11410760879516602, 0.1507878452539444, -0.6078774929046631, 0.7349376678466797, 0.567861795425415, -0.13345855474472046, 0.052401646971702576, -0.8523233532905579, 0.03409262374043465,...
def signal _ handler ( sig _ num, frame ) : signames = dict ( ( k, v ) for v, k in reversed ( sorted ( signal. _ _ dict _ _. items ( ) ) ) if v. startswith ('sig') and not v. startswith ('sig _') ) logging. warning ('received { } signal. '. format ( signames [ sig _ num ] ) ) logging. debug ('program has stopped.') log...
[ -0.12266315519809723, -0.4955161213874817, 0.6979374885559082, 0.2335272580385208, -0.13314731419086456, -0.11484438180923462, 0.4097851812839508, 0.20491234958171844, -0.4756544530391693, 0.36749714612960815, -1.289070725440979, 0.09924114495515823, 0.21392063796520233, 0.6094735264778137...
def convolutiondistance ( input _ batch, weights, verbose ) : with tf. variable _ scope ('convolutiondistance') : # compute the convolution distance between each weight ( or som neuron ) and the input _ batch per map. # input tensor shape weights : [ 1, num _ maps, num _ som _ neurons, weight _ vector _ size ] # input ...
[ 0.22379855811595917, -0.5229328870773315, 0.9395231008529663, 1.172513484954834, -0.19706474244594574, 0.1704520285129547, 0.08273288607597351, 1.004791021347046, 0.5384894609451294, 0.2828920781612396, -0.1454654186964035, -0.00637460732832551, 0.1701684445142746, 0.39770060777664185, 0...
def handle _ join _ game ( message, consumer ) : channel _ messages = [ ] group _ names = [ ] ws _ message = none try : user = models. user. objects. get ( pk = consumer. user _ name ) except models. user. doesnotexist : print ( " warning : handle _ join _ game : user has not user _ name = " + consumer. user _ name ) w...
[ -0.14493653178215027, 0.29238951206207275, 1.2491177320480347, 0.15551170706748962, 0.13127584755420685, -0.21912787854671478, 0.22240911424160004, -0.9472548365592957, -0.894822895526886, 1.421714425086975, 0.4988372325897217, 0.020869135856628418, -0.5643927454948425, 0.3496791124343872,...
def divide ( x, y ) : return str ( int ( x ) / int ( y ) )
[ -0.07598893344402313, -0.46359941363334656, 0.5703868269920349, -0.8124805092811584, -0.8780881762504578, 0.2286636233329773, -1.3866496086120605, -1.905610203742981, -0.6022111773490906, 0.5548749566078186, 0.7260955572128296, -0.2647835612297058, 0.13171353936195374, -0.7728349566459656,...
def allocate _ space _ for _ n _ lines ( n, lines ) : text = lines [ : n ] value = ('\ n'). join ( text ) return value
[ 0.2750692069530487, 0.5665014386177063, 0.20055243372917175, -0.054861925542354584, -0.13268093764781952, -0.2783498167991638, -1.161309003829956, -0.5930617451667786, 0.023802656680345535, -0.5048903226852417, 0.8966970443725586, -0.521342396736145, 0.8829109072685242, 0.37042945623397827...
def _ _ lshift _ _ ( self ) : return self. bus [ 1 : ] + self. bus [ : 1 ]
[ -0.23560060560703278, 0.04958873242139816, 0.5671893358230591, 0.2821851372718811, 0.0333450548350811, 1.1033436059951782, -0.10140524804592133, -0.8331782221794128, 0.690996527671814, -0.45735055208206177, -0.12138623744249344, 0.41368982195854187, -1.3380167484283447, 0.16775867342948914...
def shuffle ( self, seed : optional [ int ] = none, generator : optional [ np. random. generator ] = none, keep _ in _ memory : bool = false, load _ from _ cache _ file : bool = true, indices _ cache _ file _ name : optional [ str ] = none, writer _ batch _ size : optional [ int ] = 1000, new _ fingerprint : optional [...
[ -1.0924595594406128, 0.06939434260129929, 0.7443639039993286, 0.20782898366451263, -0.3340664803981781, -0.321043998003006, 0.8576052188873291, 0.17405816912651062, 0.7275413274765015, -0.7317568063735962, 1.0087205171585083, 0.6345699429512024, 0.1110631451010704, -0.05808933079242706, ...
def validate _ songs ( songs : typing. list [ str ] ) - > bool : known = [ ] # type : typing. list [ str ] for id in songs : if id in known : return false known. append ( id ) return true
[ -0.7602813839912415, -0.13760098814964294, 0.5576299428939819, 0.3707001507282257, 0.9402941465377808, 1.6314923763275146, -0.731963574886322, 0.05156493932008743, -0.6942154765129089, 0.6371193528175354, -0.773710310459137, -0.6009478569030762, -0.8122914433479309, 0.4505428373813629, -...
def generate _ ini ( self, extra _ lines = [ ] ) : f = open ( self. ini, mode = " w " ) starting _ lines = [ " detectors = [ h1, l1 ] ", f " outdir = { self. outdir } ", " accounting = accounting. group ", " submit = true ", " trigger - time = 0 ", ] lines = starting _ lines + extra _ lines for ll in lines : f. write (...
[ 0.020169993862509727, -0.3073282837867737, 0.33466121554374695, 0.9568582773208618, -0.2596072256565094, 0.73307865858078, 0.5389047861099243, 1.4330403804779053, -0.5540395379066467, -0.8679847717285156, -0.4217584431171417, -0.16504642367362976, -0.048726726323366165, 0.3855865001678467,...