text
stringlengths
25
2.19k
embedding
listlengths
768
768
def import _ images ( folder ) : images = [ ] a = os. listdir ( folder ) # listdir returns a list of the entries in the folder a = natsorted ( a ) for image in a : img = io. imread ( os. path. join ( folder, image ), as _ gray = 1 ) # imread reads an image from a file into an array images. append ( img ) return ( image...
[ -1.0824682712554932, 0.5110288858413696, 0.5011963248252869, -0.11422620713710785, 0.01717497780919075, 0.2861424386501312, 0.0010798736475408077, -0.13674333691596985, -0.1762954443693161, 0.8997573852539062, 0.15777583420276642, 0.6409206390380859, -0.21657425165176392, 1.411768317222595...
def get _ goal _ class ( action ) : msg _ type = get _ goal _ type ( action ) # verify message type was found. if not msg _ type : return none return roslib. message. get _ message _ class ( msg _ type )
[ -0.8949239253997803, -0.1497456580400467, 0.5318379402160645, 0.9165709614753723, 0.5867871046066284, -0.27828291058540344, -0.04463992267847061, -1.485746145248413, 0.012891938909888268, -0.04606218636035919, 0.8701311349868774, 1.1626139879226685, 0.015876594930887222, 0.8842359781265259...
def test _ custom _ git _ dir _ path ( tmp _ path ) : # we will analyze our own git repo. remember where we are. our _ git _ repo = os. getcwd ( ) # then change to a dir without a git repo os. chdir ( str ( tmp _ path ) ) assert not path ( ". git " ). exists ( ) # now invoke the tool, and use git _ dir output _ name = ...
[ 0.9409739971160889, -0.2747001051902771, 0.4918791949748993, -0.41085579991340637, -0.05349264293909073, -0.16273726522922516, 0.7408601641654968, -0.46472299098968506, -0.1355719268321991, -0.5853373408317566, 0.02722470462322235, 0.5650886297225952, 0.6422929763793945, 0.0763758420944213...
async def _ _ call _ _ ( self, http _ auth : optional [ httpauthorizationcredentials ] = depends ( httpbearer ( auto _ error = false ) ), ) - > any : if http _ auth is none : if self. verifier. auto _ error : raise httpexception ( status _ code = status. http _ 401 _ unauthorized, detail = not _ authenticated ) else : ...
[ -0.155172199010849, 0.6582003235816956, 0.5254733562469482, 1.2718497514724731, 0.24113915860652924, -0.1437802016735077, -0.8120784759521484, -0.7388136982917786, 0.28675511479377747, -0.11491300165653229, -0.5669093132019043, 1.2644315958023071, -0.3043850362300873, 0.44212284684181213, ...
def add _ new _ detection ( self ) : # define the minimum distance between lines ( in pixels ) mindist = 4 # get the selected regions ww = np. where ( self. _ fitregions = = 1 ) xfit = self. specx. copy ( ) [ ww ] yfit = self. specdata. copy ( ) [ ww ] from scipy. optimize import curve _ fit # make sure there are enoug...
[ 0.4702740013599396, -0.9489547610282898, 0.6813758015632629, 0.13493385910987854, 0.31353598833084106, 0.012896997854113579, 0.009092102758586407, -0.33926165103912354, 0.4488070011138916, -0.4869140088558197, 0.06439642608165741, 1.0454061031341553, 0.11936749517917633, 0.5654935836791992...
def get _ instance _ security _ groups ( self, context, instance, detailed = false ) : servers = [ {'id': instance. uuid } ] sg _ bindings = self. get _ instances _ security _ groups _ bindings ( context, servers, detailed ) return sg _ bindings. get ( instance. uuid, [ ] )
[ -1.5729429721832275, 0.40026360750198364, 0.31379735469818115, 0.19757388532161713, -0.6184346675872803, -0.21947750449180603, -0.353206992149353, -0.10597570240497589, 0.21609340608119965, 0.6277032494544983, -0.800781786441803, 1.1614032983779907, -0.7779485583305359, 0.22233803570270538...
def load _ icon ( * args, * * kwargs ) : if q. qapplication. instance ( ) is none : return kwargs. get ('default ', none ) return q. qicon ( load _ pixmap ( * args, * * kwargs ) )
[ 0.0559576153755188, -0.06822647899389267, 0.43264007568359375, 0.3113109767436981, -0.15371020138263702, -0.14031913876533508, -0.7981269955635071, -0.01692344807088375, 0.19778579473495483, -0.5036504864692688, -0.6184945106506348, -0.518674373626709, -0.5557147264480591, 0.08728891611099...
def malsysproc ( self ) : log. debug ( " executing volatility malsysproc plugin on " " { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] command = self. plugins [ " malsysproc " ] ( self. config ) for info in command. calculate ( ) : new = {'offset': hex ( int ( info ['offset'] ) ),'processname': s...
[ -0.06499402225017548, -1.0350292921066284, 0.6508767604827881, -1.0510950088500977, 0.17970217764377594, -0.9764319062232971, -0.9356269240379333, 0.019345203414559364, 0.03170499950647354, 0.7031636238098145, -0.6207764744758606, 0.22766241431236267, -0.3581986427307129, 0.661635220050811...
def create _ airfoil _ sections ( prop _ id, rotor _ setting : charmrotorsettingscollection ) : xsec _ surf _ id = vsp. getxsecsurf ( prop _ id, 0 ) num _ xsec = vsp. getnumxsec ( xsec _ surf _ id ) airfoils = [ ] specified _ airfoils = rotor _ setting [ 0 ]. airfoil _ opts default _ af _ opts = rotor _ setting [ 0 ]. ...
[ 0.33223894238471985, -0.308398574590683, 0.6228536367416382, 0.0565602108836174, 0.1136888712644577, 0.43236950039863586, 0.5119257569313049, -1.1503627300262451, 0.4477919340133667, -0.45631733536720276, 0.2743391990661621, 0.6578670144081116, -0.0915386900305748, -0.07617650926113129, ...
def subscriptions ( self ) - > set [ str ] : if self. _ transport : return self. _ transport. subscriptions return set ( )
[ 0.5911520719528198, 0.11408475786447525, 0.6593764424324036, 0.15322087705135345, 0.12829312682151794, 0.30317312479019165, -0.43995290994644165, -1.2118529081344604, 0.12571534514427185, -0.33855417370796204, -0.1535283327102661, 0.5740250945091248, -0.29557347297668457, -0.62511849403381...
def restorecheckpoint ( self, numsteps ) : processedimages = numsteps * self. options. batchsize self. totalepochs = processedimages / self. totalimages self. currentindex = processedimages % self. totalimages
[ 0.5526111125946045, -0.2594754993915558, 0.22090265154838562, 0.0008311565034091473, 0.7001455426216125, -0.18648754060268402, 0.9126978516578674, 0.5648234486579895, 0.22338686883449554, 0.5664260387420654, 0.1291816234588623, -0.38203659653663635, -0.792422354221344, -0.4443150460720062,...
def parse _ args ( ) : parser = argparse. argumentparser ( ) parser. add _ argument ('- obj ', type = str, default ='pawn ', help = " " " which object you \'re trying to pick up. options : gearbox, nozzle, pawn. default : pawn " " " ) parser. add _ argument ('- n _ vert ', type = int, default = 1000, help ='how many ve...
[ 0.74166339635849, -0.3601682186126709, 0.9780839085578918, 0.18315303325653076, 0.2993409335613251, 0.3838913142681122, 0.8977353572845459, -0.3693990111351013, -0.022360432893037796, -0.18063776195049286, -0.4328286945819855, -0.16162385046482086, -0.2842656373977661, 1.0599924325942993, ...
def test _ write _ incar ( vasp _ calc _ and _ ref ) : vasp _ calc, reference = vasp _ calc _ and _ ref with managed _ temp _ object ( ) as temp _ object : vasp _ calc. write _ incar ( temp _ object ) with open ( temp _ object,'r ', encoding ='utf8') as result _ incar _ fo : assert result _ incar _ fo. readlines ( ) = ...
[ 0.3255026042461395, -1.123422622680664, 0.35841476917266846, -0.07604634761810303, 0.23022370040416718, 0.28416088223457336, 1.1328603029251099, -0.15622898936271667, -0.01629052311182022, -0.025446895509958267, 0.7148025035858154, -0.3043065369129181, -0.23284198343753815, -0.614419817924...
def generate _ path ( self, parent, source _ index ) : for i in range ( len ( parent ) ) : if i! = source _ index : path = [ ] path. append ( self. vertices [ i ] ) self. create _ path ( parent, i, path ) path. reverse ( ) self. path. append ( path ) else : self. path. append ( [ ] )
[ -0.1674448847770691, 0.9150751829147339, 0.581291675567627, 0.32642269134521484, 0.8211173415184021, 0.590233325958252, 0.555873453617096, -0.37433528900146484, 0.5585677623748779, 0.05294007807970047, -0.6340749859809875, -0.6554183959960938, -0.4033600687980652, 0.2688998281955719, -0....
def test _ weekly _ schedule _ conversion ( self ) : report _ saver = reportformsaver ( self. report _ form _ sample _ weekly ) report _ saver. extract _ report _ data _ into _ airflow ( report _ exists = false ) report _ airflow _ variable = variable. get ( " rb _ status _ " + self. report _ form _ sample _ weekly. re...
[ 0.17032742500305176, -0.005234532058238983, 0.502388596534729, -0.6764189004898071, 0.1760430485010147, -0.6111593246459961, -0.18812525272369385, -0.1872110813856125, 0.724564790725708, -0.06730778515338898, -0.18431468307971954, 0.058715879917144775, -0.3747708201408386, -0.5219743251800...
def verify ( self, kid : str, jws : acme. jws. jws, ) - > bool : if not ( pending : = self. _ pending. get ( kid, none ) ) : return false if pending. expired ( ) : return false return pending. verify ( jws )
[ 0.014702104963362217, 0.2967265546321869, 0.5612223744392395, 0.18965665996074677, -0.8902813196182251, 0.5568756461143494, -0.984376847743988, -0.7103451490402222, -0.07064655423164368, 0.05642085522413254, -0.6116835474967957, 0.23029066622257233, -0.21087166666984558, 1.1701632738113403...
def _ _ init _ _ ( self, conn, cursor, proj ) : self. conn = conn self. proj = proj self. cursor = cursor
[ 1.0822052955627441, -0.8722234964370728, 0.39279699325561523, 0.8797405362129211, -0.12042803317308426, 0.11414498835802078, -0.8506362438201904, 1.5005396604537964, -1.003229022026062, 0.03328334912657738, 0.26721495389938354, -0.2884204089641571, -0.426982581615448, 0.14208804070949554, ...
def get _ scarpe ( id, check _ author = true ) : scrape _ data = scrape. query. get _ or _ 404 ( id, f " scrape id { id } doesn't exist. " ) if check _ author and scrape _ data. author! = g. user : abort ( 403 ) return scrape _ data
[ -0.46783119440078735, 0.7632551193237305, 0.49442651867866516, 1.1118253469467163, 0.20116369426250458, 0.3948234021663666, -0.6942527294158936, -0.5050137042999268, 0.1371549665927887, 0.6519049406051636, 0.9615766406059265, 0.6270361542701721, 0.5667931437492371, -0.7492798566818237, 0...
def hung _ ysb _ total _ rate ( cls, sum _ data, * * search _ info ) : product _ list = [ 3 ] ysb _ sum _ measure _ data = dictwrapper ( { } ) ysb _ sum _ measure _ data. volume _ total = 0 ysb _ sum _ measure _ data. open _ number _ total = 0 ysb _ sum _ measure _ data. activation _ number _ total = 0 ysb _ sum _ meas...
[ -0.08744597434997559, -0.23873388767242432, 0.8730747699737549, 0.47040966153144836, 0.45161107182502747, 0.6271269917488098, 0.4261814057826996, -0.3551167845726013, -0.012405266053974628, 0.30907735228538513, -0.44337671995162964, -0.3796674311161041, -0.2537798285484314, 0.1298047006130...
def initialize ( self, * args, * * kwargs ) : post _ control. postpage. initialize ( self, * args, * * kwargs ) if not self. user : uri ='/ blog / login'return self. redirect ( uri )
[ -0.4353042542934418, 0.9414314031600952, 0.6525183916091919, 1.2208744287490845, 0.45217591524124146, 0.6069705486297607, -0.28292369842529297, 0.3459094762802124, -0.11464083194732666, -1.0941729545593262, -0.3577181398868561, -0.5243990421295166, -0.5708383321762085, 0.6769458055496216, ...
def get ( self, author _ name, post _ id ) : # user action self. render _ params ['act'] = self. request. get ('act') # error while comment editing self. render _ params ['error'] = self. request. get ('error') # delete message self. render _ params ['delete _ msg'] = self. request. get ('delete _ msg') # retrieve all ...
[ 0.337968647480011, -0.5897684097290039, 0.6768521070480347, 0.5206484794616699, 0.858574628829956, -0.29686814546585083, -0.43086493015289307, 0.3761701285839081, -0.5019614100456238, -0.07603999972343445, 1.0613199472427368, 0.5571689009666443, -0.16478657722473145, 0.49501532316207886, ...
def _ _ camera _ update _ ui ( self, value ) : # stores ui value for selected outputs if self. _ _ ui _ update : for output in self. selected _ outputs : output. ui. camera = self. _ _ camera _ combo _ box. current _ index ( ) if type ( value ) is not int : self. _ _ camera _ combo _ box. set _ default _ name ( value )
[ -1.2059452533721924, -0.8281391859054565, 0.2741679549217224, 0.7297456860542297, -0.3710627555847168, -0.4696383476257324, 0.844567596912384, -1.0735960006713867, 1.0848132371902466, 0.11085756123065948, -0.5500175356864929, -0.577439546585083, -1.0667738914489746, 0.8036671876907349, 0...
def main ( parser ) : parser. usage ='% ( prog ) s [ opts ]'parser. set _ defaults ( func = run, ) parser. add _ argument ('- - repository ', metavar ='dir ', help ='location of the git repository ', # todo this is meant to be temporary, until we have logic for # / var / tmp / troops required = true, ) parser. add _ ar...
[ 0.23481951653957367, 0.09334444254636765, 0.5987215638160706, -0.35934165120124817, 0.37976324558258057, 0.17637619376182556, 0.06719884276390076, 0.9059472680091858, -0.050196558237075806, 0.23810631036758423, -0.01869899034500122, -0.10655087977647781, 0.6523562073707581, 0.6385799050331...
def test _ key _ generation _ containertask ( self ) : expected ='testcontainertask'key = self. container _ task. get _ key ( ) self. assertequal ( key, expected,'generated key [ % s ] does not match the expected key [ % s ]'% ( key, expected ) )
[ -0.00903745461255312, 0.22145073115825653, 0.3877132833003998, 0.9125699400901794, 0.7406557202339172, 0.5810282826423645, 0.3645811080932617, 0.2700602412223816, -0.5423720479011536, 0.012029369361698627, -0.2789553105831146, -0.3327239751815796, 0.6535868048667908, 0.23786182701587677, ...
def test _ assert ( self ) : b1 = basemodel ( ) self. assertisinstance ( b1. id, str )
[ 0.5331782102584839, -0.7230947017669678, 0.21559011936187744, 0.7767012119293213, 1.085244059562683, 1.1432141065597534, -0.0303826741874218, -0.3302345275878906, 0.5919085741043091, -0.696694016456604, 0.04356861859560013, 0.5266082882881165, -1.4688611030578613, 0.15868660807609558, -1...
async def async _ step _ user ( self, user _ input = none ) - > flowresult : # check if already configured if self. _ async _ current _ entries ( ) : return self. async _ abort ( reason = " single _ instance _ allowed " ) if user _ input is not none : return self. async _ create _ entry ( title = default _ name, data =...
[ -0.11039695888757706, 0.6415001153945923, 0.3881690800189972, 0.8212341666221619, -0.25434818863868713, 0.18163888156414032, 1.0032811164855957, 0.3536019027233124, 0.21932664513587952, -0.17930547893047333, -0.029901890084147453, 0.26357755064964294, 0.2027299851179123, 0.9763072729110718...
def guess _ category ( name ) : if'battery'in name : return'battery'if'radio'in name or'zigbee'in name : return'radio'if'motion'in name : return'motion'if'door'in name : return'door'if'lightswitch'in name : return'lightswitch'if'light'in name : return'light'if'temperature'in name or'thermostat'in name : return'temperat...
[ -0.8704847693443298, -0.5573522448539734, 0.6185391545295715, -0.40894633531570435, -0.7271116375923157, 0.034447528421878815, -0.5033199787139893, -0.5106267333030701, -0.049087297171354294, -0.27825674414634705, 0.05971197783946991, -0.4857012927532196, 0.13609883189201355, 0.93219685554...
def get _ best _ rated ( wikidata _ df, category, rating, min _ num _ of _ movies, num _ of _ influencers ) : data = avg _ by _ category ( wikidata _ df, category, rating ) best _ rated = get _ top ( data, rating, min _ num _ of _ movies, num _ of _ influencers ) return best _ rated [ category ]. tolist ( )
[ -0.5853766202926636, 0.1860702633857727, 0.40102264285087585, 0.12433774769306183, 0.8122385740280151, -0.47316280007362366, -1.2730190753936768, -0.007669592276215553, -0.7524082660675049, 1.1079705953598022, 0.14490433037281036, 1.4184739589691162, 0.266164630651474, -0.2738725244998932,...
def make _ list ( inp, mapper = none ) : if not isinstance ( inp, ( list, tuple ) ) : inp = [ inp ] if hasattr ( mapper,'_ _ call _ _') : return map ( mapper, inp ) return list ( inp )
[ -1.1387815475463867, 0.12850260734558105, 0.5983524918556213, 0.4979460537433624, -1.0082179307937622, 0.5300899744033813, -0.4634508490562439, 0.3945419192314148, 1.551670789718628, -0.7854374647140503, -0.4158117473125458, -0.6983129382133484, 0.019651614129543304, -0.3076017498970032, ...
def sfc _ srremoverestorepoint ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " dwrpnum " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ -1.2419763803482056, 0.5559753775596619, 0.7562355995178223, -0.36191344261169434, -0.44676169753074646, -0.5356992483139038, 1.1527955532073975, 0.05452793091535568, 0.6635714769363403, -0.02448252961039543, -0.5360081791877747, -0.0690341368317604, -0.920596718788147, -0.3369297683238983...
def do _ logout ( ) : if curr _ user _ key in session : del session [ curr _ user _ key ]
[ -0.3467957675457001, -0.9350314140319824, 0.41965413093566895, 0.39777472615242004, -0.8227201700210571, -0.3420740067958832, 0.548376202583313, -0.296802282333374, 0.2031870186328888, 1.126538634300232, 0.6292790174484253, 0.42046716809272766, -0.15019699931144714, -0.3227183222770691, ...
def entry ( self ) : api = api ( ) api. authenticate ( ) return api. fetch _ video ( self. video _ id )
[ 0.21100737154483795, 0.15471693873405457, 0.33738601207733154, 1.1539703607559204, 0.6277772188186646, -0.4423186480998993, -1.1223328113555908, -0.5086031556129456, 1.1142948865890503, -0.34529057145118713, 0.29362016916275024, 1.9871997833251953, -0.41641539335250854, 0.5706713199615479,...
def ingest _ page ( event, context ) : bucket = os. environ. get ('page _ bucket') topic _ arn = os. environ. get ('discover _ add _ topic') for message in event [ " records " ] : url = message [ " body " ] html, links = pages. ingest _ page ( url ) utils. s3 _ save ( bucket,'html ', url, html ) # links for rss feed di...
[ 0.962670624256134, 0.7141217589378357, 0.6699004769325256, -0.24501323699951172, 1.4817465543746948, 0.14326511323451996, -0.648202121257782, -0.15955863893032074, 0.2814144790172577, 0.735314130783081, 0.19333116710186005, -0.10466255247592926, -0.17925141751766205, 0.9699010252952576, ...
def insert _ aligned _ records _ of _ one _ device _ sorted ( self, device _ id, times _ list, measurements _ list, types _ list, values _ list ) : # check parameter size = len ( times _ list ) if ( size! = len ( measurements _ list ) or size! = len ( types _ list ) or size! = len ( values _ list ) ) : raise runtimeerr...
[ -1.0780348777770996, 1.3901153802871704, 0.7576298117637634, 0.09618847072124481, 0.9176036715507507, 0.8191251158714294, 0.7027212977409363, -0.9349585175514221, 0.15112967789173126, 0.16522115468978882, -0.3352729380130768, -0.34622880816459656, -1.4380308389663696, 1.3226304054260254, ...
def _ _ repr _ _ ( self ) - > str : return ( f " < psychrochart [ { self. config. dbt _ min : g } " f " - > { self. config. dbt _ max : g } °c, " f " { self. config. w _ min : g } " f " - > { self. config. w _ max : g } gr / kg _ da ] > " )
[ 0.41206681728363037, -0.21062931418418884, 0.558300256729126, -1.2688319683074951, -0.5839252471923828, 0.6650349497795105, -0.23997542262077332, -1.0398110151290894, -0.9550949335098267, -0.033263690769672394, 0.05549543723464012, 0.8573516011238098, -0.38326022028923035, -0.7060165405273...
def closed ( self ) - > bool : return self. _ closed
[ -0.7966630458831787, -0.33633989095687866, 0.3479863405227661, -0.0618116520345211, -0.42505601048469543, 1.1944921016693115, -0.21922965347766876, -0.10411027073860168, -0.15328893065452576, -1.1186772584915161, -0.08617036044597626, 0.10266458243131638, -0.48870939016342163, -0.020216345...
def get _ instance _ id ( session, host _ id, port ) : instance _ id = db. get _ instance _ id ( session, host _ id, port ) if not instance _ id : raise exception ( " could not find registered instance with host _ id = % s and port = % s " % ( host _ id, port ) ) return instance _ id
[ 0.48599565029144287, -0.03425861895084381, 0.5905694961547852, -0.9647728204727173, 0.4559033513069153, 0.2500189244747162, 0.11321372538805008, 0.2780437767505646, -0.4463237524032593, 0.688507616519928, 0.49018725752830505, 1.3619153499603271, -0.9025989770889282, 0.37523847818374634, ...
def _ _ getattr _ _ ( self, key ) : if key in self. _ _ dict _ _ : return getattr ( self, key ) else : return getattr ( self. _ dataframe, key )
[ -0.7386945486068726, -0.12917327880859375, 0.7130905389785767, -0.10141552984714508, -0.28215378522872925, -0.6954437494277954, -0.07733281701803207, -0.44185230135917664, 0.1942025125026703, -0.6086606383323669, 1.0250728130340576, 0.08556335419416428, 0.33755406737327576, 0.3345448970794...
def next ( self ) - > int : # 里 加 里 面, 合 o ( 1 ) # 分 一 下 , 有 有 子 的 行 , 也 不 一 都 的 # 的 加 上 的 会 有 o ( n ) # 一 next ( ) 的 平 o ( n ) / n = o ( 1 ), 定 方 o ( 1 ) 的 。 # 分 方 分 , 的 学 《 法 》 - 17 章 分 if not self. stack [ - 1 ]. right : tmp = self. stack. pop ( ) else : tmp = self. stack. pop ( ) self. stack. append ( tmp. right ) ...
[ 0.05039207264780998, 1.4096250534057617, 1.0991538763046265, 0.6309856176376343, -0.804472029209137, 0.06649405509233475, 1.3463404178619385, 0.18222467601299286, 0.5096160173416138, 0.1577363759279251, -0.3647913336753845, -0.2557026445865631, -1.4921542406082153, 0.3332480490207672, 0....
def get _ archive _ ext ( fname ) : for ext in archive _ exts : if fname. endswith ( ext ) : return ext return''
[ 0.3793913722038269, -0.38330063223838806, 0.5716698169708252, 0.6279232501983643, -1.067484974861145, -0.07398504763841629, -0.8429288268089294, -0.15834933519363403, 0.21390420198440552, 1.0351265668869019, -0.10574398189783096, 0.3737808167934418, 0.06959225237369537, -0.3785815536975860...
def makeresponselikelihood ( self, * argv, * * kwargs ) : sd = kwargs [ " hyperstates " ] [ - 1 ] * * 2 current = kwargs [ " predict " ] ( true, argv [ 0 ] ) current = tf. transpose ( current ) sigma = tf. ones _ like ( current ) * sd realvals = tf. reshape ( kwargs [ " realvals " ], current. shape ) result = multivari...
[ 0.6458159685134888, -0.7469866275787354, 0.5326648950576782, -0.24505962431430817, -1.0399118661880493, 0.5299646854400635, -0.10174357146024704, 0.13508544862270355, 0.49657687544822693, -0.2439274787902832, -0.6808123588562012, 0.27948346734046936, -0.32457172870635986, -0.95094150304794...
def getweightedldv ( fp ) : # list of lists which contains the result matrix. one element for each slice. # result _ matrix = [ ] # get the weights to apply to the ldv frequency vectors. # weight = getldvweights ( ) fp = util. opencompressfile ( options. ldv _ file ) # for each frequency vector, apply the weight and no...
[ 0.2522332966327667, -0.38627293705940247, 0.9425675868988037, 0.22659438848495483, 0.2916935682296753, 0.039533939212560654, 0.5486308336257935, 0.1910722255706787, 0.07631921768188477, -0.18390128016471863, 0.5043966770172119, -0.16365250945091248, -0.584971010684967, 0.46863433718681335,...
def send _ data ( self, context, payload ) : name = context. type _ info. get _ pretty _ type _ name ( ) output _ file = self. _ make _ file _ path ( context, name, payload ) log. debug ('writing % s to % s ', name, output _ file ) payload = context. type _ info. flatten ( payload, typeinfo. translate _ value ) with op...
[ -0.7717859745025635, -0.24366332590579987, 0.61152184009552, -0.673501193523407, 0.11443226784467697, 0.11848897486925125, -0.5947819948196411, -1.0448622703552246, -0.7306342720985413, 0.4260496497154236, -0.5104666948318481, 0.2651541829109192, 0.43027055263519287, -0.1861640214920044, ...
def is _ in _ ellipse ( x1, y1, x, y, a, b, padeg ) : x1 = float ( x1 ) y1 = float ( y1 ) x = float ( x ) y = float ( y ) a = float ( a ) b = float ( b ) parad = math. radians ( float ( padeg ) ) dx = x - x1 dy = y - y1 intest = ( math. pow ( ( dx * math. cos ( parad ) + dy * math. sin ( parad ) ) / b, 2. 0 ) + math. p...
[ -0.12344978749752045, 0.024605417624115944, 0.7160289883613586, -0.4808020293712616, -0.5616157650947571, 0.7564511895179749, -0.5662734508514404, 0.11092030256986618, 0.25076401233673096, 0.4865126609802246, -0.04999380186200142, -0.1296956092119217, -0.5158950090408325, -0.40068787336349...
def join _ rtespts ( table _ name, buffer ) : # pdb. set _ trace ( ) precmnd = " alter table { } add column route _ name varchar, add column rte _ strt varchar, add column rte _ end varchar, add column service varchar, add column tripid int " commands = ( " update { } as p set route _ name = r. route _ name from avta _...
[ 0.8673241138458252, -0.45196300745010376, 1.0650666952133179, -0.1385946273803711, -0.021707752719521523, 0.6456857919692993, 0.1518641859292984, -0.39860081672668457, -0.3140401542186737, 0.19784918427467346, -0.10351694375276566, -0.08708685636520386, -0.38648271560668945, 0.089086815714...
def _ _ repr _ _ ( self ) : return ('model run < id = { }, application = { }, user = { }, version = { } > '. format ( self. id, self. application, self. user, self. version ) )
[ -0.3197912573814392, -1.7472834587097168, 0.5454615950584412, -0.4211626350879669, -0.5228480100631714, 1.226253867149353, -0.5707727074623108, -0.06814248114824295, -0.7228856086730957, 0.4492524266242981, -0.7093554139137268, 0.6931561231613159, 0.06512116640806198, -0.27205023169517517,...
def get _ file ( self, file _ path ) : try : resp = self. _ conn. get _ object ( bucket = self. _ path. bucket, key = self. get _ path _ to _ file ( file _ path ), ) encoding ='' if'contentencoding'in resp : encoding = resp ['contentencoding'] return resp ['body']. read ( ), encoding except botocore. exceptions. client...
[ -0.3982599377632141, -0.6661050915718079, 0.7783403992652893, -0.2406172752380371, 0.03499878570437431, -0.3974685072898865, -0.6327584981918335, -0.3673074245452881, -1.1789981126785278, 0.3306741416454315, -0.3987882137298584, 0.10065077245235443, -0.030875597149133682, -0.14184290170669...
def note _ list _ whole _ piece ( self ) : pure _ notes = [ ] for score, path in zip ( self. scores, self. paths ) : parts = score. getelementsbyclass ( stream. part ) for part in parts : notelist = part. flat. getelementsbyclass ( ['note ','rest'] ) for note in notelist : if note. tie is not none : if note. tie. type ...
[ -0.523775577545166, -0.7808564305305481, 0.7366213798522949, -0.10233950614929199, 0.2819603979587555, 0.7256231307983398, 0.5787796378135681, -0.35399559140205383, 0.2620126008987427, 0.5459945201873779, -0.5584136843681335, 0.13668814301490784, -0.29468342661857605, 0.23417352139949799, ...
def status ( name, sig = none ) : if sig : return bool ( _ _ salt _ _ [ " status. pid " ] ( sig ) ) contains _ globbing = bool ( re. search ( r " \ * | \? | \ [. + \ ] ", name ) ) if contains _ globbing : services = fnmatch. filter ( get _ all ( ), name ) else : services = [ name ] results = { } for service in services...
[ -0.7166833877563477, -0.10431665927171707, 0.6787605285644531, -0.1261136680841446, -1.350741982460022, -0.5696643590927124, -0.33993613719940186, -0.14192786812782288, 0.1704755276441574, 0.15805786848068237, -0.3578076958656311, -0.35409995913505554, -0.25125810503959656, 0.9273746013641...
def test _ mlb _ signal _ hup ( self ) : d = self. cleanup _ d ( self. client. mlb _ signal _ hup ( ) ) for lb in ['lb1 ','lb2'] : request = yield self. requests. get ( ) self. assertthat ( request, hasrequestproperties ( method ='post ', url ='http : / / % s : 9090 / _ mlb _ signal / hup'% ( lb, ) ) ) request. setresp...
[ -0.7725380659103394, 0.1111336424946785, 0.7983660697937012, 0.3448233902454376, 0.7151743769645691, 0.3971589207649231, -0.33340612053871155, -0.2194729894399643, -0.63164222240448, -0.12409204244613647, -0.66355961561203, -0.5248682498931885, 0.7828510999679565, 0.20645302534103394, -0...
def get _ job _ logs ( self, job : j, tail : int ) - > anystr :...
[ -0.09260351955890656, 0.14285896718502045, 0.4794158935546875, 0.0585598386824131, -1.0688427686691284, -0.1978038102388382, -0.9719117283821106, -1.2337409257888794, -0.622049868106842, 0.39847299456596375, -0.4642716944217682, 1.2413394451141357, -0.3138750493526459, -0.11849863827228546...
async def test _ security _ warnings _ hotspots _ only ( self ) : self. set _ source _ parameter ( " security _ types ", [ " security _ hotspot " ] ) response = await self. collect ( get _ request _ json _ return _ value = self. hotspots _ json ) self. assert _ measurement ( response, value = " 1 ", total = " 100 ", en...
[ 0.5755330324172974, 0.28303802013397217, 0.34462541341781616, 0.9977964758872986, 0.8586080074310303, 1.3245822191238403, -0.054670125246047974, 0.189858540892601, 0.907555341720581, -0.1437651664018631, -0.3724152147769928, -0.3653436601161957, 0.3662254214286804, 0.9232110381126404, 0....
def module _ parser ( self ) : # parse the file and create a syntax tree with open ( self. path ) as fh : mroot = ast. parse ( fh. read ( ), self. path ) if self. exclude is none : # extract both classes and functions from module, excluding # those that begin with ` _ ` self. udefs = [ n. name for n in ast. iter _ chil...
[ -0.17956487834453583, 0.07026340812444687, 0.7677137851715088, -0.6445024013519287, -0.6590973138809204, 0.265987753868103, 0.18292675912380219, 0.3315182626247406, -0.18089933693408966, -0.14951007068157196, -0.33018723130226135, 0.8507123589515686, 0.0757146030664444, 1.093672752380371, ...
def make _ train _ data _ iter ( train _ data, opt ) : return onmt. io. orderediterator ( dataset = train _ data, batch _ size = opt. batch _ size, device = opt. gpuid [ 0 ] if opt. gpuid else - 1, repeat = false, dropout = 0. 1, shufflek = 3 )
[ 0.11613256484270096, 0.5446643829345703, 0.4288266599178314, 0.22594471275806427, -0.9464985728263855, 0.28706857562065125, -0.6005514860153198, -0.19031424820423126, -0.6680758595466614, 0.32025957107543945, 0.6118525266647339, 0.028604578226804733, 0.2087593823671341, -1.1845264434814453...
def getpandasnumeric ( df, box = none ) : if not isinstance ( df, pd. dataframe ) : raise typeerror originalsize = len ( df ) # add deltat df ['start _ time'] = pd. to _ datetime ( df ['start _ time'] ) df ['end _ time'] = pd. to _ datetime ( df ['end _ time'] ) df ['total _ time'] = df [ " end _ time " ] - df ['start ...
[ -0.7094478011131287, 0.2769280970096588, 1.098935842514038, -0.7979433536529541, -0.3473152816295624, 0.026506386697292328, 0.03594948351383209, -0.021737990900874138, -0.32802340388298035, 0.2926875352859497, -0.11251749098300934, 0.11796001344919205, 0.8790827393531799, -0.30394604802131...
def contains ( self, key ) : raise notimplementederror ( )
[ -0.5904564261436462, -0.024296633899211884, 0.3970992863178253, 0.30220556259155273, -0.673263430595398, 0.9925158023834229, -0.5993468761444092, -0.25163137912750244, -0.17774179577827454, 0.12716525793075562, -0.13953639566898346, 0.03812914714217186, -0.08889134973287582, 0.901817977428...
def add _ subtree ( self, subtree ) : self. _ subtrees. append ( subtree )
[ -0.09160608053207397, 0.48223036527633667, 0.43620556592941284, 0.4302617013454437, -0.14477750658988953, 0.9246765375137329, -1.295195460319519, 0.009801335632801056, 0.7580561637878418, -0.350580632686615, -0.8009679317474365, 0.29935941100120544, -0.4984976649284363, 0.7915939092636108,...
def _ get _ flims ( self, flims ) : if flims is not none : if type ( flims ) is str : fmins = self. _ _ getattribute _ _ ( flims ). frequencies - 0. 1 fmaxs = self. _ _ getattribute _ _ ( flims ). frequencies + 0. 1 elif type ( flims ) is int or type ( flims ) is float : fmins = np. array ( [ flims - 0. 1 ] ) fmaxs = n...
[ -0.6746560335159302, -0.2844966650009155, 0.5717042088508606, 0.07365728914737701, -0.6096721887588501, -0.6571797132492065, 0.3040873408317566, -0.763949453830719, 0.9940743446350098, -1.0155445337295532, 0.038156647235155106, 0.6562498807907104, -0.2320166379213333, 0.9514854550361633, ...
def is _ mention ( text ) : return is _ mention _ rp. fullmatch ( text ) is not none
[ 0.5513790249824524, -0.7338491082191467, 0.38982975482940674, 0.780600905418396, 0.3862864673137665, 0.04608292877674103, 0.4245033264160156, 0.4756627380847931, 1.0662360191345215, 1.0378758907318115, -0.02834404446184635, 0.4867918789386749, -1.4214733839035034, 0.6917307376861572, -0....
def google _ search ( search _ term, api _ key, cse _ id, * * kwargs ) : service = build ( " customsearch ", " v1 ", developerkey = api _ key, cache _ discovery = false ) res = service. cse ( ). list ( q = search _ term, cx = cse _ id, * * kwargs ). execute ( ) if int ( res ['searchinformation'] ['totalresults'] ) > 0 ...
[ -0.7089745998382568, 0.43599238991737366, 0.29617810249328613, 0.4177558720111847, 0.6177961230278015, 0.05864326283335686, -1.0504218339920044, 0.5334473848342896, -0.1838987171649933, 0.9598793983459473, -0.9660412073135376, 0.45868828892707825, -0.8844316601753235, 0.5554598569869995, ...
def show ( self ) : raise notimplementederror
[ 0.4779670238494873, -0.16810767352581024, 0.36299392580986023, -0.2641453444957733, -0.3971394896507263, 1.0621856451034546, 0.6340821385383606, 0.5298139452934265, 0.4071650505065918, -0.3013330101966858, 0.5326758623123169, 0.9031181931495667, 0.564397394657135, 0.7093604207038879, -0....
def _ _ init _ _ ( self, bind _ addr, wsgi _ app, numthreads = 10, server _ name = none, max = - 1, request _ queue _ size = 5, timeout = 10, shutdown _ timeout = 5, accepted _ queue _ size = - 1, accepted _ queue _ timeout = 10, peercreds _ enabled = false, peercreds _ resolve _ enabled = false, reuse _ port = false, ...
[ -0.11909724026918411, 0.012240424752235413, 0.8290087580680847, 0.31154686212539673, -0.12245786935091019, 0.47577643394470215, -0.2165786176919937, 0.11887799203395844, 0.5104554891586304, -0.2602155804634094, -0.09889668971300125, 0.48342034220695496, -0.6517547369003296, 0.4185313582420...
def set _ clientsecret ( self, value ) : super ( addrowinputset, self ). _ set _ input ('clientsecret ', value )
[ -0.17600324749946594, 0.9330094456672668, 0.29887086153030396, -0.1676412969827652, -0.07958052307367325, 0.46051305532455444, 0.6305630207061768, -1.600731611251831, -0.23486778140068054, -0.39288070797920227, -0.9169345498085022, -0.37069761753082275, 0.06885038316249847, 0.5667569637298...
def searchsensor ( self, id ) : return self. sdf [ self. sdf ['name']. str. contains ( id ) = = true ]
[ -1.1537806987762451, 0.1388060599565506, 0.243264839053154, 0.0869111493229866, -0.5629712343215942, -0.48840007185935974, -1.2707979679107666, -1.0797065496444702, 0.5814199447631836, -0.1369970291852951, -0.5796579718589783, -0.6578828692436218, -0.7422248125076294, 0.40628939867019653, ...
def install _ ubuntu _ packages ( ) : header ('installing ubuntu packages') s ='apt - get clean'run ( s, verbose = true ) for package in ['apache2 ','openjdk - 6 - jre - lib ','gdal - bin ','curl ','python - pycurl ','python - gdal ','python - setuptools'] : s ='apt - get - y install % s'% package log _ base = workdir ...
[ -0.7802547812461853, -0.24636277556419373, 0.5296081304550171, -0.2816222906112671, 0.21913637220859528, 0.19132459163665771, 0.3975222706794739, -0.7507933378219604, -0.49801668524742126, 0.01476593129336834, 0.10685990750789642, -0.32947400212287903, 0.2034396380186081, 0.382218360900878...
def print _ table ( table, company _ name, message _ start = none ) : if message _ start is not none and message _ start! = " " : print ( " \ n " + message _ start + ( " for " + company _ name ) * ( company _ name! = " " ) + " : \ n " ) print ( table ) print ( " \ n " )
[ 0.9589639902114868, 0.11587145179510117, 0.5254995226860046, 0.9613455533981323, 0.22705106437206268, -0.2749033570289612, -0.2303657978773117, 0.12456744909286499, -0.9690148830413818, 0.5174837708473206, 0.8317629098892212, 1.1248753070831299, -0.688724935054779, 0.5434632897377014, -0...
def generate _ decl _ woe ( src, ri, woe _ info, good _ columns, clust _ info = [ ] ) : decl = pd. merge ( ri, src ) decl ['badmob3'] = decl ['badrand'] decl _ woe = oottransform ( decl, clust _ info, woe _ info, good _ columns ) return decl _ woe
[ 0.03955516591668129, 0.043216265738010406, 0.42329922318458557, -0.6558418869972229, 0.9823032021522522, 0.20163343846797943, -0.24660645425319672, 0.6293860077857971, -0.23194418847560883, -0.38133978843688965, 0.1861937940120697, 0.21823877096176147, 0.0852833166718483, -0.10652875155210...
def create _ auth _ token ( sender, instance = none, created = false, * * kwargs ) : if created : token. objects. create ( user = instance )
[ 0.2625546455383301, 0.02517881989479065, 0.10726682096719742, 0.4691731333732605, 0.5145488977432251, 0.8394981622695923, 0.3098497688770294, 0.3727157711982727, 0.028465289622545242, -0.9566648602485657, -1.5324065685272217, 0.028760937973856926, 1.0139226913452148, 0.04803922772407532, ...
def kahan _ product ( list _ of _ floating _ point _ numbers ) : if 0. 0 in list _ of _ floating _ point _ numbers : return 0. 0 log _ list = [ math. log ( x ) for x in list _ of _ floating _ point _ numbers ] suma = kahan _ sum ( log _ list ) return math. e * * suma
[ 0.3415902554988861, 0.48647576570510864, 0.5510005950927734, 1.3614248037338257, -0.12634223699569702, 0.3516347408294678, 0.3900091350078583, -0.2885977029800415, 0.25266724824905396, 0.489274799823761, -0.4036077857017517, -0.3940001130104065, -0.5941412448883057, 1.0322414636611938, -...
def correct ( self, measurements ) : s = np. matmul ( np. matmul ( self. h, self. p ), np. transpose ( self. h ) ) + self. r k = np. matmul ( np. matmul ( self. p, np. transpose ( self. h ) ), np. linalg. pinv ( s ) ) y = measurements - np. matmul ( self. h, self. x ) self. x + = np. matmul ( k, y ) self. p - = np. mat...
[ 0.07663848996162415, -0.332770437002182, 0.7427695393562317, 0.10612814128398895, 0.31662291288375854, 0.42274343967437744, 0.06531448662281036, 0.7214887738227844, 0.030549215152859688, -0.10437576472759247, 0.7754806280136108, -0.5396164655685425, -0.8784596920013428, 0.36528536677360535...
def on _ bt _ add _ node _ clicked ( self ) : label = self. ui. cb _ nodes. currenttext ( ) if not self. graph. has _ node ( label ) : self. add _ cb _ item ( label ) self. graph. add _ node ( label ) self. redraw ( )
[ -0.1067253053188324, 0.25356894731521606, 0.5767754912376404, -0.3089262545108795, 0.9044197201728821, 0.5108048915863037, -0.30692896246910095, -0.20282268524169922, 0.6196502447128296, 0.4422219395637512, 0.5057975053787231, 0.4173955023288727, -0.6010122299194336, -0.269830584526062, ...
def plain _ copy _ to _ brcddb ( obj, objx ) : global _ r _ key _ table if objx is none : return if isinstance ( obj, dict ) : for k in obj. keys ( ) : v = obj. get ( k ) if k in _ r _ key _ table : _ r _ key _ table [ k ] ( v, objx ) elif isinstance ( v, ( str, int, float, list ) ) or v is none : if hasattr ( objx,'s ...
[ -0.9612000584602356, 0.10085589438676834, 1.0013400316238403, 0.5280358791351318, -0.804533839225769, 0.9011070132255554, -0.12352925539016724, -0.6253061294555664, 0.2868727147579193, 0.6071990132331848, -0.6705107092857361, 0.5298218727111816, -0.6495746970176697, 0.583486795425415, 0....
def celerity ( k, h, g = g ) : c = np. sqrt ( g / k * np. tanh ( k * h ) ) return c
[ 1.7248668670654297, 0.13609357178211212, 0.5387600064277649, 0.578420877456665, -0.15052923560142517, -0.010393968783318996, 0.24996432662010193, 0.7465326189994812, -1.4966371059417725, 0.7166658639907837, -0.42413365840911865, -0.45090654492378235, -0.3099733591079712, 0.4400432705879211...
def save _ supplier ( request ) : if request. method = ='post': if request. post. get ('supplier _ pk') : # if supplier id is provided, load existing supplier message ='updated'supplier = supplier. objects. get ( pk = request. post. get ('supplier _ pk') ) else : # if supplier id is not provided, create a new supplier ...
[ -0.7963895797729492, -0.18825474381446838, 0.8147676587104797, 0.23812615871429443, -0.5689535737037659, -0.8976405262947083, -0.2638906240463257, 0.5285407304763794, 0.12166048586368561, 0.7903165221214294, -0.8539931774139404, -0.5660487413406372, -0.21243511140346527, 0.976690411567688,...
def process _ set _ pitch _ angle _ cmd ( self, t, dt ) : assert ( type ( self. altitude _ cmd ). _ _ name _ _ = ='setpitchanglecmd') theta _ c = self. altitude _ cmd. theta _ c self. platform. pitch _ cmd ( theta _ c )
[ -0.2385101318359375, -0.7112366557121277, 0.458369642496109, -0.5972729325294495, 0.630501925945282, 1.1326130628585815, 0.6913455128669739, -0.11504915356636047, -1.2525290250778198, 1.1668803691864014, 0.5744168162345886, 0.6395705342292786, 0.14204521477222443, 0.6581671833992004, 0.8...
def make _ cfex ( dataloader _ train, summary _ writer, save _ dir : str = " save ", iterations : int = 500, learning _ rate : float = 0. 001, save _ every _ d _ epochs : int = 50, ignore _ first _ epochs : int = 300, ) : # create the whole cae encoder = encoder ( ) decoder = decoder ( ) # get the suitable device to ru...
[ 0.029577555134892464, 0.02436779998242855, 0.761142909526825, 0.6114689707756042, -0.3614659011363983, -0.6524274945259094, 0.33328989148139954, 1.3166091442108154, -0.07357081025838852, -0.3477911353111267, -0.6708222031593323, -0.20809149742126465, 0.6617108583450317, 0.4583986699581146,...
def _ execute ( command ) : return subprocess. run ( command, shell = true, stdout = subprocess. pipe, stderr = subprocess. pipe, universal _ newlines = true, )
[ 0.3701390326023102, -0.2818254828453064, 0.7210872769355774, -1.0570039749145508, -0.147490993142128, 0.2646355628967285, -1.382155418395996, 0.2953740954399109, -0.4330271780490875, 0.11125824600458145, 0.48202934861183167, 0.13029444217681885, 0.4246015250682831, 0.02292446233332157, 0...
def _ _ init _ _ ( self, parent, * * kwargs ) : super ( assignment4widget, self ). _ _ init _ _ ( parent, * * kwargs ) self. materialoptions = [ " green plastic ", " tarnished wood ", " shiny gold ", " scratched metal " ] self. objectoptions = [ " pyramid ", " sphere ", " ring ", " snowman " ] self. executebtn. clicked...
[ -0.1286153942346573, 0.21785536408424377, 0.5699461102485657, -0.002848156029358506, 0.3100007176399231, 0.482909232378006, 0.8097918629646301, -0.3998863101005554, -0.25084832310676575, 0.41673025488853455, -0.266972154378891, -0.9861608147621155, -0.3478994071483612, 0.5633141398429871, ...
def total _ calculate ( cls, * * search _ info ) : sum _ data = dictwrapper ( { } ) measure _ staff _ qs = cls. search _ qs ( * * search _ info ) measure _ staff _ result = measure _ staff _ qs. aggregate ( sum _ new _ number = sum ('new _ number'), sum _ exhale _ number = sum ('exhale _ number'), sum _ call _ number =...
[ -0.4149632751941681, 0.13537214696407318, 1.0721787214279175, -0.7312023043632507, -0.10013874620199203, 0.15944518148899078, 0.11135201901197433, -0.9839277267456055, -0.4400440454483032, 0.18205785751342773, -0.6884311437606812, -0.47065088152885437, -0.040584929287433624, 0.694900095462...
def bare _ variants _ uploader ( conn, dataset, variant _ dict, genome _ reference ) : n _ insert _ attemps = 0 # count how many variants are already present in the beacon : time0 _ vars = get _ variant _ number ( conn ) # loop over each variant tuple for the sample for keys, values in variant _ dict [ 1 ]. items ( ) :...
[ -0.1078629195690155, 0.5304051637649536, 0.6030056476593018, -0.4165905714035034, 0.058241236954927444, -0.3494825065135956, 0.2551931142807007, 0.3875425457954407, -0.47439977526664734, 0.4628889560699463, -0.4917665719985962, -0.8844681978225708, -0.7538273334503174, 0.4630599915981293, ...
def run ( self ) : self. _ _ readconfiginfo ( ) self. _ _ upgradeinstanceconf ( )
[ -0.6314816474914551, -1.0714151859283447, 0.3879871368408203, 0.361920028924942, -0.24414804577827454, 0.5156577229499817, 0.4131368100643158, 0.8307496309280396, -0.9551591873168945, 0.3450893759727478, -0.7242404818534851, 0.06409336626529694, 0.05906257405877113, -0.1432923972606659, ...
async def async _ step _ reauth _ validate ( self, user _ input : dict [ str, any ] | none = none ) - > flowresult : errors = { } reauth _ entry = self. _ reauth _ entry assert reauth _ entry is not none if user _ input is not none : if ( device : = async _ ble _ device _ from _ address ( self. hass, reauth _ entry. da...
[ -0.191075399518013, -0.3269293010234833, 0.5914780497550964, 0.6810508370399475, -0.3106129467487335, -0.4383559226989746, 0.973275899887085, 0.6206759214401245, 0.32435837388038635, 0.3544522821903229, 0.3413275182247162, 0.9192159175872803, 0.14927907288074493, -0.5193274617195129, 0.7...
def open _ end ( self, direction, * args, * * kwargs ) : if direction = = none or direction = = 0 : direction = self. direction else : self. direction = direction base. layername ( self. gndlayer ) rot ( direction ) base. wire ( direction, kwargs. pop ('l _ open ', self. wtotal ), self. wtotal ) rot ( np. conjugate ( d...
[ -0.9881928563117981, 0.0685376301407814, 0.5176008939743042, -0.9513862729072571, -0.18683329224586487, 0.3222458064556122, 1.000144124031067, 0.03197774663567543, 0.35910433530807495, -0.35951316356658936, 0.30725738406181335, 0.34086093306541443, -1.3508830070495605, 0.41442498564720154,...
def test _ addcallbackscallscallback ( self ) : sd = synchronousdeferred ( " foo " ) successes = [ ] failures = [ ] self. assertequals ( sd. addcallbacks ( successes. append, failures. append ), sd ) self. assertequals ( successes, [ " foo " ] ) self. assertequals ( failures, [ ] )
[ 0.9752007722854614, 1.1653330326080322, 0.5868062376976013, 0.2525900900363922, 0.7055364847183228, 0.6047539114952087, -0.9401535391807556, -0.639710545539856, 1.0620671510696411, -1.769423246383667, -0.743762195110321, -0.37260058522224426, 0.12435787916183472, 1.1170527935028076, 0.13...
def create _ lstm _ network ( env, * _, lr, layer _ nodes, time _ steps ) : state _ size = env. observation _ space. shape [ 0 ] na = env. action _ space. n model = sequential ( ) model. add ( lstm ( layer _ nodes [ 0 ], input _ shape = ( time _ steps, state _ size ) ) ) for num _ nodes in layer _ nodes [ 1 : ] : model...
[ -0.0828620120882988, -0.21317726373672485, 0.521587610244751, 0.24128754436969757, 0.6293206810951233, -0.04395555704832077, -0.1617492288351059, -0.34193333983421326, -0.5278626680374146, 0.20831209421157837, -0.14741000533103943, -0.24171146750450134, 0.8879965543746948, 0.67508023977279...
def _ _ iter _ _ ( self ) : self. n = 0 return self # needs to return the iterator object itself
[ -0.5318586230278015, -0.9592506289482117, 0.4890334904193878, -0.32442155480384827, -0.05386168137192726, 0.3517618179321289, 0.4253270626068115, 0.10844625532627106, 0.2566424012184143, -0.7867960929870605, -0.008564965799450874, 0.417503297328949, -0.3709086775779724, 0.4238308072090149,...
def apply ( self, func, * args, * * kwargs ) : if isinstance ( func, ( list, tuple ) ) : return caldict ( * * { f. _ _ name _ _ : self. apply ( f, * args, * * kwargs ) for f in func } ) else : try : return caldict ( * * { k : func ( v, * args, * * kwargs ) for k, v in self. items ( ) } ) except ( valueerror, attributee...
[ -0.051746685057878494, 0.6262871623039246, 0.6309282183647156, 0.48861879110336304, -0.9835679531097412, 0.2793596088886261, -0.6974425315856934, -0.007274352014064789, 0.024642080068588257, -1.0931788682937622, 0.387447714805603, -0.5144712328910828, 0.6369304656982422, 1.017245888710022,...
def read _ neurone _ data ( fpath, session _ phase = 1, protocol = none ) : fname = path. join ( fpath, str ( session _ phase ), str ( session _ phase ) + '. bin') # read the protocol unless provided if protocol is none : protocol = read _ neurone _ protocol ( fpath ) # determine number of samples to read f _ info = pa...
[ -0.10783275961875916, -0.46297845244407654, 0.694512128829956, -0.079886294901371, -0.5164114832878113, 0.2412118762731552, 0.2572411298751831, -0.3438720703125, -0.13494586944580078, 0.4160817265510559, -0.04094240814447403, -0.2722819149494171, -0.84256911277771, -0.0652150809764862, 0...
def empirical _ nngp _ fn ( f : applyfn, trace _ axes : axes = ( - 1, ), diagonal _ axes : axes = ( ) ) - > empiricalkernelfn : def nngp _ fn ( x1 : pytree, x2 : optional [ pytree ], params : pytree, * * apply _ fn _ kwargs ) - > pytree : " " " computes a single sample of the empirical nngp. args : x1 : first batch of ...
[ 0.2453446090221405, 0.09078960120677948, 0.6177788972854614, -0.3522509038448334, -0.780305802822113, -0.7859780788421631, 0.39117124676704407, -0.7436266541481018, -0.34362396597862244, 0.6494634747505188, -0.11252570897340775, 0.16024968028068542, 1.0348352193832397, -0.4249923825263977,...
def masah ( r ) : m = 4 * math. pi * delta _ c * kriticnagustina * ( scale _ length _ halo _ 3 ) * ( math. log ( ( r + scale _ length _ halo ) / scale _ length _ halo ) - ( r / ( r + scale _ length _ halo ) ) ) return m
[ 0.8195136785507202, -0.4373296797275543, 0.2998421788215637, 0.11341379582881927, -0.8042557239532471, 0.5985827445983887, -0.07362513989210129, -0.36169156432151794, -0.06474238634109497, 0.5775091052055359, -0.5269504189491272, -0.6093313694000244, 0.061892181634902954, 0.454480051994323...
def read _ command _ line ( ) : # split key = value into key, value l = [ ] for x in sys. argv [ 1 : ] : l + = x. split ('=') # merge back lists of values between quotations lst = [ ] s ='' open _ q = false for x in l : if open _ q : if x [ - 1 ] = ='"': # finish merging open _ q = false s + = x. split ('"') [ 0 ] lst....
[ -0.628101646900177, -0.6493130326271057, 0.8469579815864563, 0.3428295850753784, 0.3278335630893707, 0.724931538105011, -1.1427505016326904, 0.2663872241973877, -0.2961987257003784, 0.17493011057376862, -0.285997599363327, 0.16233481466770172, -0.15838192403316498, 0.5061573386192322, -0...
def getmean ( self ) : # - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | return binomialdistbase. getmean ( self )
[ -1.2202433347702026, -0.4697296619415283, 0.7512563467025757, -0.04216068238019943, 0.25450456142425537, 0.07392853498458862, -0.2657570540904999, 0.1372654289007187, -0.41350042819976807, -0.46191921830177307, -1.0214133262634277, 0.9234225153923035, -1.0237171649932861, -0.14078769087791...
def get _ data _ element _ search ( self, value ) : data = [ ] for instance in history. objects. filter ( element _ id = value ). order _ by ( " - now " ) : if instance. information : data. append ( { " element _ id " : instance. element _ id, " timestamp " : instance. now. timestamp ( ), " information " : instance. in...
[ -0.8595070838928223, 0.5570774674415588, 0.48784339427948, 0.3279855251312256, -0.06345640122890472, 0.4522506296634674, -0.524395227432251, -0.614895761013031, 0.04512878507375717, -0.36796504259109497, -0.18732331693172455, 0.5508922338485718, 0.4959966540336609, 1.3428454399108887, 0....
def get _ attribute ( self, attribute : attributetype, granularity : attributegranularity = none, code : str = none, write _ key : str = none, name : str = none, delay : int = none, genus : genus = none ) : if granularity is none : granularity = self. attribute _ granularity _ inference ( code = code, write _ key = wri...
[ -0.6854332089424133, 0.05953427404165268, 0.5303999781608582, 0.15030434727668762, 0.8247163891792297, -0.9354910850524902, 0.5566092729568481, 0.8293511271476746, 0.24706944823265076, 0.5470046997070312, 1.4977295398712158, 0.919586181640625, 0.5855193734169006, 0.32802125811576843, 0.2...
def cgap _ core _ structural _ variant _ sample ( cgap _ core _ project, institution, structural _ variant ) : item = { " project " : cgap _ core _ project [ " @ id " ], " institution " : institution [ " @ id " ], " structural _ variant " : structural _ variant [ " @ id " ], " call _ info " : " some _ cgap _ core _ sam...
[ 0.08956553786993027, -0.5703136920928955, 0.22452639043331146, -0.6256894469261169, -0.7210496664047241, 0.4231281876564026, 0.004640098195523024, 0.24983669817447662, 0.34205469489097595, 0.6746633052825928, -0.3871346116065979, 0.04712383821606636, -0.6890324354171753, -0.847837269306182...
def postdeleteobject ( self, callback, * args ) : if self. _ objecttobedeleted : dispatch. objectdeleted. emit ( self. _ objecttobedeleted )
[ 0.47455158829689026, -0.9600614309310913, 0.5885652303695679, 0.4941893517971039, 0.22003300487995148, 0.06515756994485855, 0.4806751310825348, -0.13217060267925262, 1.5497325658798218, -0.3849128186702728, -1.4045436382293701, 0.14561091363430023, -0.11411309242248535, 0.157019704580307, ...
def _ createresource ( layer, resource _ type, name, url, blob ) : if resource _ type not in model. resource. types : raise util. badrequest ('invalid resource type. must be one of : % s.'% model. resource. types ) if url : if not name : raise util. badrequest ('no filename provided for an external resource.') resource...
[ 0.1441047042608261, -0.12385056912899017, 0.5917862057685852, 0.3900640904903412, -0.38836991786956787, 0.30733048915863037, -0.2108556479215622, 0.23027387261390686, -0.22872431576251984, 1.0844342708587646, -0.43622544407844543, -0.6410505175590515, -0.7184971570968628, 0.414870411157608...
def cscs _ numba _ fit ( y, l, maxitr = 100, tol = 1e - 4, warmstart = false, debug = false ) : n, p = y. shape l = np. identity ( p ) s = ( y. t @ y ) / n l [ 0, 0 ] = 1 / np. sqrt ( s [ 0, 0 ] ) for i in range ( 1, p ) : # if ( debug ) : # print ('variable : { } '. format ( i + 1 ) ) l [ i, 0 : ( i + 1 ) ] = _ hk _ n...
[ 0.17638781666755676, 0.11751411110162735, 0.6036885976791382, 0.6231881380081177, -0.050560105592012405, -0.1841675043106079, 0.38085007667541504, -0.07448194921016693, 0.10232887417078018, 0.23867011070251465, -0.6230072975158691, -0.155052050948143, -0.5450374484062195, 0.302068114280700...
def add _ additional _ papers ( ) : with open ('pickles / inarxiv _ papers _ set. pickle ','wb') as picc : pickle. dump ( inarxiv _ papers _ set, picc ) with open ('pickles / allmagpapers _ en _ magcontexts. pickle ','wb') as picc2 : pickle. dump ( allmagpaperids, picc2 ) additional _ mag _ ids = allmagpaperids - inarx...
[ -0.0708031952381134, -1.1318273544311523, 0.7324379682540894, -0.7249532341957092, 0.04734305664896965, 0.15559527277946472, -0.4916948676109314, 0.05850164592266083, 0.7849065661430359, 0.5723241567611694, 0.5925287008285522, 0.5103745460510254, -0.50154048204422, 0.4954688549041748, -0...
def compute _ socialbalance ( self, allcharacters, filename ='social _ balance _ characters. csv') : # co _ occurrences = { } # dict to track whether or not two character in allcharacters share an edge # for character _ id in allcharacters : # loop over each character object in dict, key = character _ id and value = ch...
[ -0.05711672082543373, -0.8718977570533752, 0.7315026521682739, 0.21690644323825836, 0.5194545984268188, -0.039027128368616104, 0.656821072101593, 0.46468493342399597, -0.09933678805828094, 0.7757424712181091, 0.08168844878673553, -0.5728700160980225, -0.5438974499702454, 0.1078217178583145...