text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ list _ integer _ length _ 2 _ nistxml _ sv _ iv _ list _ integer _ length _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 3. xsd ", instance = " nistdata / list / integer / schem...
[ -0.13113738596439362, -0.02641463093459606, 0.38920626044273376, 0.2570730447769165, 0.07608725130558014, 0.17692136764526367, -0.685491681098938, 0.28170081973075867, 1.1342309713363647, 1.0121254920959473, -0.8428371548652649, -0.36392638087272644, -0.370624303817749, 0.44625645875930786...
def test _ compute _ subtract ( test _ client ) : data = {'value1': 5,'value2': 3 } url ='/ compute / subtract'response = test _ client. post ( url, json = data ) assert response. status _ code = = 200 assert response. data = = b'2 \ n '
[ -0.38617268204689026, 0.7556224465370178, 0.6181837916374207, 0.46612846851348877, 0.7281067371368408, 0.7093746066093445, -0.18343356251716614, 0.08781187981367111, -0.9559102058410645, -0.7320794463157654, -1.141358733177185, 0.056569598615169525, -0.5544711947441101, -0.1201235577464103...
def itksubtractconstantfromimagefiltericf3cficf3 _ cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefiltericf3cficf3 _ cast ( * args )
[ 1.331702470779419, -0.30958208441734314, 0.163585364818573, -0.4640549123287201, 0.2548433244228363, 0.05782341584563255, 0.8146144151687622, 0.6031640768051147, -0.09073424339294434, 0.28941988945007324, -1.0123521089553833, -0.688322901725769, -0.33892977237701416, -0.7632204294204712, ...
def test _ list _ decimal _ pattern _ 1 _ nistxml _ sv _ iv _ list _ decimal _ pattern _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - pattern - 2. xsd ", instance = " nistdata / list / decimal / sc...
[ -0.4798351228237152, -0.6203412413597107, 0.676849901676178, 0.8227439522743225, 0.018229670822620392, -0.15996412932872772, -0.1638871133327484, 0.48999080061912537, 0.460889995098114, -0.11318389326334, -1.0273261070251465, -0.11029169708490372, 0.32962560653686523, 0.6086781024932861, ...
def forge ( category, post, comment ) : from bluelog. fakes import fake _ admin, fake _ categorites, fake _ posts, fake _ comments db. drop _ all ( ) db. create _ all ( ) click. echo ('generating the administrator...') fake _ admin ( ) click. echo ('generating % d categories...'% category ) fake _ categorites ( categor...
[ -0.3514295816421509, 1.6394214630126953, 0.3944488763809204, 0.20841239392757416, 1.7755370140075684, 0.15988346934318542, -0.09285590797662735, -0.6611900925636292, -1.014482021331787, -0.23085199296474457, -1.4197317361831665, 0.5333918929100037, 0.06530960649251938, 1.0340139865875244, ...
def partition ( number _ to _ partition : int ) - > set [ int ] : if number _ to _ partition < 0 : return set ( ) elif number _ to _ partition = = 0 : return { 1 } ret : set [ int ] = set ( ) prime : int sub : int for prime in primes : if prime > number _ to _ partition : continue for sub in partition ( number _ to _ p...
[ -0.42422258853912354, 1.492693543434143, 0.794488251209259, -0.19168199598789215, -0.8725990056991577, -0.9183439016342163, 0.405785471200943, -0.36102521419525146, 0.6596450209617615, -0.37662801146507263, -0.07833937555551529, -0.5007277727127075, -0.31049463152885437, -0.666733384132385...
def mock _ dataset ( mock _ timedir ) : import xarray as xr yield xr. open _ mfdataset ( str ( path ( mock _ timedir ) /'*. nc'), combine ='by _ coords')
[ -0.5232858657836914, 0.43423905968666077, 0.3254685401916504, -0.6058724522590637, -0.45821142196655273, 0.0733727216720581, 0.34732115268707275, -0.3459875285625458, -0.05025845021009445, -0.6896246075630188, 0.9576206803321838, -0.40252557396888733, 0.04797646030783653, 0.222982451319694...
def test _ atomic _ any _ uri _ min _ length _ 3 _ nistxml _ sv _ iv _ atomic _ any _ uri _ min _ length _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - minlength - 4. xsd ", instance = " nistdata...
[ 0.2548784613609314, -0.6492536664009094, 0.4089159369468689, 0.4406295418739319, -0.5957270860671997, -0.3053402006626129, -0.49895429611206055, -0.32960793375968933, 0.0863080695271492, -0.35232776403427124, -0.15079312026500702, -0.28972864151000977, -0.6370456218719482, -0.0243314895778...
def command _ unowned ( self, brain, args ) : s _ web _ url = " http : / / yoc. yahoo. com / cgi - bin / siebel - api. cgi? b = ops & s = assigned & o = dns - ops - tickets " s _ url = " http : / / tickets - rss. ops. yahoo. com / feeds / opsamericas / dns / allunassigned. rss " rss = xml. etree. elementtree. fromstrin...
[ -0.05114847794175148, -0.5233114957809448, 1.0248826742172241, -0.1338658183813095, -0.021435203030705452, -0.5061662793159485, 0.5161080360412598, -0.2935110032558441, 0.08970027416944504, -0.13585235178470612, -0.3088496923446655, 0.4459535479545593, -0.35107237100601196, 0.2099036276340...
def repeat ( delay ) : def decorator ( fn ) : def inner ( queue, job ) : queue. enqueue ( job. task, job. args, execute _ at = job. execute _ at + delay, priority = job. priority, ) return fn ( queue, job ) return inner return decorator
[ -0.1570369005203247, 0.1077960804104805, 0.7519973516464233, -0.49712681770324707, -0.12199141830205917, -0.2036483883857727, -0.45169657468795776, 0.6985166668891907, -0.4377302825450897, -0.9904390573501587, -0.04677598550915718, 0.02191966027021408, 1.0374754667282104, -0.40593156218528...
def run _ command ( cmd, dry _ run = false, verbose = false ) : if dry _ run or verbose : print _ stderr ( " [ cmd ] " + " ". join ( cmd ) ) if dry _ run : return none, none process = subprocess. popen ( cmd, stdout = subprocess. pipe, stderr = subprocess. pipe ) stdout, stderr = process. communicate ( ) if process. re...
[ -0.17874875664710999, -0.49573686718940735, 0.7804549932479858, -0.327743798494339, -0.4351877272129059, 0.13061487674713135, -0.5241194367408752, 0.30449485778808594, 0.17684973776340485, 0.32928481698036194, 0.55232834815979, 0.5004844069480896, -0.4592777490615845, 0.27962401509284973, ...
def transform ( attrs : dict ) - > dict : pass
[ -1.356945514678955, -0.04838861897587776, 0.06793931126594543, -0.8211689591407776, -0.6471486687660217, -1.2046172618865967, 0.15441888570785522, 1.080489993095398, -0.008408181369304657, -0.09435457736253738, -0.8769518136978149, 0.28080010414123535, 0.6548008918762207, -0.30919969081878...
def spr _ cat ( ) : sql = f " " " select distinct a. id, a. cat as name from ` mybudj _ spr _ cat ` a / * left join ` mybudj _ sub _ cat ` b on a. id = b. id _ cat * / where a. ord! = 0 order by a. ord " " " try : return jsonify ( [ dict ( row ) for row in do _ sql _ sel ( sql ) ] ) except exception as e : # mylog ( f ...
[ -0.14102567732334137, -0.2839650511741638, 0.5113620162010193, -0.3351607620716095, -0.5313562750816345, -0.9208236932754517, -0.7023934721946716, -0.444818377494812, -0.09219201654195786, -0.13923101127147675, -0.7550141215324402, 0.41838961839675903, 0.24660150706768036, 0.51773631572723...
def write _ text ( text = " ", x = 1, y = 1, fore _ colour = 39, back _ colour = 49 ) : # execute function to check for valid colours and force correction fore _ colour, back _ colour = colour _ check ( fore _ colour, back _ colour ) # apply foreground and background colours print ( " { } { } m { } { } m ". format ( cs...
[ 0.6463154554367065, -0.15454326570034027, 0.8490656018257141, -0.37974029779434204, 0.23919937014579773, 0.3547516167163849, 0.312764436006546, 0.7076595425605774, -0.30677464604377747, 0.3138822913169861, -0.03242665156722069, 0.9657221436500549, -0.7833900451660156, -0.24943378567695618,...
def partition ( self, array : arraylist [ tuple ], start : int, end : int ) - > int : mid = ( start + end ) / / 2 # log ( n ) pivot = array [ mid ] [ 1 ] self. swap ( array, start, mid ) boundary = start for k in range ( start + 1, end + 1 ) : # o ( n ) if array [ k ] [ 1 ] > pivot : boundary + = 1 self. swap ( array, ...
[ -0.3892395496368408, 0.20500870048999786, 0.7316874265670776, 0.7156139016151428, -0.6830869317054749, -0.10442709922790527, -0.3868752419948578, 0.24225933849811554, 0.5439541339874268, 0.7615019083023071, 0.05745275318622589, 0.0415940135717392, -1.1714694499969482, -0.2221677452325821, ...
def getphysicalinterface ( self, physicalinterfaceid, draft = false ) : if draft : req = apiclient. onephysicalinterfaceurl % ( self. host, " / draft ", physicalinterfaceid ) else : req = apiclient. onephysicalinterfaceurl % ( self. host, " ", physicalinterfaceid ) resp = requests. get ( req, auth = self. credentials, ...
[ -1.607528567314148, -0.02334996685385704, 0.43310022354125977, -0.15493711829185486, -0.5049995183944702, -0.06506407260894775, -0.5880331993103027, -1.217785120010376, 0.09402188658714294, -0.6642199754714966, 0.22542762756347656, 0.46949413418769836, -2.080165147781372, 0.140661746263504...
def get _ key ( dict _ : dict, value : str ) - > optional [ str ] : for k, v in dict _. items ( ) : if v = = value : return k return none
[ 0.3304365873336792, -0.15402920544147491, 0.3243648111820221, -0.5421513915061951, -0.35677623748779297, -0.24497389793395996, -0.8170838356018066, -0.36548295617103577, -0.25516077876091003, 1.505597710609436, 0.5380072593688965, 0.2091798335313797, 0.953161895275116, -0.7945725321769714,...
def cloc ( ) : local ('cloc. - - exclude - dir =. / client / static / components')
[ 1.2598741054534912, 0.4528352916240692, 0.15533284842967987, -0.281593382358551, 0.22175519168376923, 1.3327176570892334, 2.3492977619171143, 0.0200573168694973, 0.06597153097391129, 0.5214026570320129, 0.565169632434845, 0.10104112327098846, 0.2238328754901886, -0.01129091251641512, 0.4...
def available ( self ) - > bool : return ( self. coordinator. data. status. lamp _ on and self. coordinator. data. settings. lamp _ mode = = lampmode. manual )
[ -0.6315783262252808, 0.3318977653980255, 0.4147453010082245, 0.4757532477378845, -0.8888344168663025, 1.4861242771148682, -0.9413111209869385, 0.2693127393722534, -0.21139034628868103, 0.6850438714027405, -0.18390296399593353, 0.457974910736084, 0.0369107648730278, 0.612980306148529, 0.3...
def _ get _ draw _ source _ sink _ dirs ( parent _ dir : str, aggregation _ type : str, measure _ id : int ) - > tuple [ str, str ] : if measure _ id! = gbd. measures. death and measure _ id! = gbd. measures. yll : raise valueerror ( f'measure _ id must be { gbd. measures. death } or { gbd. measures. yll },'f'got { mea...
[ -0.24045462906360626, -0.09644190222024918, 0.6748639941215515, -0.6847806572914124, 0.3523843586444855, 0.21324338018894196, 0.7309260368347168, -0.7503373026847839, 0.49396130442619324, -0.3313068449497223, 0.6932080388069153, 0.2176501452922821, 0.9220260977745056, 0.6265868544578552, ...
def to _ npint ( stack, dtype = np. uint8, float _ scaling = none ) : # if already correct type, do nothing if stack. dtype = = dtype : return stack if issubclass ( stack. dtype. type, np. floating ) : # if no scaling is precised, use max range of given type if float _ scaling is none : float _ scaling = np. iinfo ( dt...
[ -0.5501558184623718, 0.34808602929115295, 0.8160989284515381, -0.15276330709457397, -0.4269716739654541, -0.5652592778205872, 0.0023549331817775965, -0.8333432674407959, 0.25629696249961853, 1.330370306968689, -0.2318025678396225, 0.49630483984947205, -0.27130138874053955, 0.54773825407028...
def determine _ page _ number ( request, paginator ) : assert isinstance ( request, httprequest ) assert isinstance ( paginator, paginator ) page = request. get. get ( " page ", 1 ) try : page _ number = int ( page ) except valueerror : if page = = " last " : page _ number = paginator. num _ pages else : raise http404 ...
[ -1.3134478330612183, -0.007843736559152603, 0.7527315616607666, 0.638380229473114, 0.6170356869697571, -0.9943353533744812, 0.3902207911014557, 0.326371967792511, 0.3616853356361389, -0.4063126742839813, 0.7568953037261963, -0.6809908151626587, -0.0547310933470726, 1.0292468070983887, 0....
def cn _ createlensed ( self, g1, g2, mu ) : depr ('createlensed ', 1. 1,'obj. lens ( g1, g2, mu )') return self. lens ( g1, g2, mu )
[ 0.41602930426597595, -0.861379086971283, 0.33589616417884827, -0.20800542831420898, 0.19855423271656036, 0.8204679489135742, -0.635782778263092, -1.4970431327819824, 0.08302203565835953, -0.21006105840206146, 0.2540169656276703, 0.8024280667304993, -0.5625292658805847, -0.13896410167217255...
def scattering _ rates ( data _ loc, el _ df, ph _ df, n _ th ) : print ('calculating the scattering rates for each kpoint using { : d } threads '. format ( n _ th ) ) nkpts = len ( np. unique ( el _ df ['k _ inds'] ) ) npts = pp. kgrid * * 3 kinds = np. arange ( 1, nkpts + 1 ) pool = mp. pool ( n _ th ) start = time. ...
[ 0.6392680406570435, 0.8541929721832275, 0.5209670066833496, -0.2044181227684021, 1.0529685020446777, -0.2506862282752991, -0.2386690229177475, 0.36980777978897095, 0.2920359671115875, 0.6014578938484192, -0.12789711356163025, 0.35740476846694946, -0.7413806915283203, 0.2622293531894684, ...
def set _ backlight _ red ( self ) : self. set _ backlight _ rgb ( 0xff, 0, 0 )
[ 0.4095165729522705, 1.149200201034546, 0.45533785223960876, 0.2939322292804718, 0.7050659656524658, 0.1392383873462677, -0.28296345472335815, -0.39911532402038574, 0.3728504180908203, 0.36969926953315735, -0.49696099758148193, 1.4963265657424927, -0.9853513836860657, 1.2762653827667236, ...
def get _ file ( self, repository, path, revision, base _ commit _ id, * args, * * kwargs ) : url = self. _ get _ file _ url ( repository, revision, base _ commit _ id, path ) try : data, is _ new = self. _ api _ get ( url ) return data except ( httperror, urlerror ) as e : if e. code = = 404 : raise filenotfounderror ...
[ 0.15983547270298004, -0.33451616764068604, 0.6594021916389465, 0.2516925036907196, 0.48703575134277344, -0.40225276350975037, -1.402441143989563, -0.44818153977394104, -1.1832103729248047, -0.01621566340327263, 0.7091692686080933, 0.8225935101509094, -0.2189941108226776, -0.576204180717468...
async def start _ bert ( self ) - > startbertresponse : request = startbertrequest ( ) return await self. _ unary _ unary ( " / gnoi. diag. diag / startbert ", request, startbertresponse )
[ -0.8186661005020142, 0.3652611970901489, 0.401883065700531, 0.27249202132225037, 1.2598116397857666, -0.6460192203521729, 0.030280470848083496, -0.6492340564727783, 0.20606237649917603, -0.7503254413604736, 0.0020698171574622393, 1.4214997291564941, -0.1080593392252922, -0.0702682659029960...
def simple _ mock _ auth _ fixture ( ) - > asyncauth : return mock ( spec = asyncauth, pin = happin, create = true )
[ -0.340994268655777, -0.06473620980978012, 0.41154199838638306, 0.4601982533931732, -0.08301082998514175, 0.1624918282032013, 0.7229827046394348, 0.6202024221420288, 0.9909701943397522, 0.15106269717216492, -0.09120127558708191, -0.23815786838531494, 0.20775465667247772, -1.1747304201126099...
def postprocess ( text ) : text = first _ letter _ uppercase ( text ) text = reformat _ punctuation ( text ) text = reformat _ hyphens ( text ) text = fix _ i _ contractions ( text ) text = capitalize _ i ( text ) return text
[ -0.35786303877830505, -0.6148765683174133, 0.5683782696723938, -0.34420788288116455, -0.8140910267829895, -0.14870314300060272, -0.14831680059432983, 0.402721107006073, 0.48683151602745056, -0.09696279466152191, -0.6053296327590942, -0.8936033844947815, -1.0208778381347656, 0.3248890042304...
def fibonacci _ recursive ( n ) : # base case if n < 2 : return n return fibonacci _ recursive ( n - 1 ) + fibonacci _ recursive ( n - 2 )
[ 0.5453893542289734, 1.299875020980835, 0.17103591561317444, 1.17319655418396, 0.030117060989141464, -0.47931453585624695, 0.4472888112068176, -0.5582926273345947, 0.10020029544830322, -0.6383652091026306, -0.199833944439888, -0.07212285697460175, -0.07912547886371613, 1.056451678276062, ...
def test _ region _ show _ missing _ required _ args ( self ) : expected _ responses = [ '. *? ^ usage : craton region - show ', '. *? ^ craton region - show : error :. * $ ', ] stdout, stderr = self. shell ('region - show') actual _ output = stdout + stderr for r in expected _ responses : self. assertthat ( actual _ o...
[ 0.3114374577999115, -0.48234400153160095, 0.40257716178894043, -0.652185320854187, 0.5998388528823853, 0.368224561214447, 0.16659291088581085, -0.322925865650177, -0.27061372995376587, 0.01885598711669445, 0.12458427995443344, 0.29292190074920654, 0.2790725827217102, 0.5987392067909241, ...
def test _ atomic _ qname _ length _ nistxml _ sv _ iv _ atomic _ qname _ length _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - length - 1. xsd ", instance = " nistdata / atomic / qname / schema + ...
[ 0.18679797649383545, 0.0022986866533756256, 0.36413487792015076, -0.20703071355819702, -0.29134929180145264, 0.5305481553077698, -0.3827815353870392, -0.2756109833717346, 0.7404833436012268, 0.6265292763710022, -0.5218114852905273, -0.5351747274398804, -0.13768036663532257, -0.240277603268...
def test _ single _ type ( self ) : st. file _ uploader ( " the label ", type = " png " ) c = self. get _ delta _ from _ queue ( ). new _ element. file _ uploader self. assertequal ( c. type, [ " png " ] )
[ -0.41396641731262207, 0.3790125250816345, 0.4368123710155487, 0.21079912781715393, 1.4330683946609497, 1.1399695873260498, 0.1397222876548767, -0.4521445035934448, 0.039407797157764435, -0.5758739113807678, -0.48265713453292847, -0.1946403980255127, -0.23539090156555176, 1.5013397932052612...
def _ create _ instance _ with _ port ( self, port ) : servers, fips = ( [ ], [ ] ) server _ args = {'flavor _ ref': conf. compute. flavor _ ref,'image _ ref': conf. compute. image _ ref,'key _ name': self. keypair ['name'],'networks': [ {'port': port ['id'] } ] } servers. append ( self. create _ server ( * * server _ ...
[ -0.702276349067688, -0.39185652136802673, 0.5033801198005676, -0.7867861390113831, -0.006487199105322361, 0.32531824707984924, -0.11817466467618942, -0.325467973947525, -0.03918430209159851, 0.29432183504104614, -0.5402988195419312, -0.5109850168228149, -0.27966657280921936, 1.075484156608...
def market _ index ( cls, date, benchmarks = [ " hs300 ", " csi500 ", " sse50 ", " cbi ", " nfi ", " y1 _ treasury _ rate " ], whole = false ) : if whole is false : _ _ sql = " select { 0 }, ` statistic _ date ` from market _ index where statistic _ date < ='{ 1 }'and statistic _ date > ='{ 2 }'\ order by statistic _ d...
[ 0.21418240666389465, 0.4806313216686249, 0.6534380316734314, 0.394620805978775, -0.47514569759368896, 0.11671142280101776, 0.13627326488494873, -1.5609405040740967, -0.31703880429267883, 0.3394995331764221, 0.6171129941940308, 0.7125875949859619, -0.021850991994142532, 0.17718900740146637,...
def get _ topk _ accuracy ( y _ true : np. ndarray, y _ pred : np. ndarray, k : int = 3, include _ details = false ) : # only keep k first columns inscope _ ypred = y _ pred [ :, 0 : k ] # check for any match along each row out = ( ( inscope _ ypred = = y _ true [ :, none ] ). any ( 1 ) ). astype ( int ) # compute fina...
[ 0.3449258506298065, -0.40542975068092346, 0.6604169011116028, 0.20150026679039001, -0.6080275177955627, -0.6890968680381775, 0.9630705118179321, 0.9417051672935486, -0.29393860697746277, 0.9004151821136475, 0.5279721021652222, 0.37144696712493896, 0.6559810638427734, 0.44881007075309753, ...
def add _ file ( self, filename, content ) : self. _ n _ objects + = 1 with open ( os. path. join ( self. _ local, filename ),'wb') as f : f. write ( content )
[ -0.17290595173835754, -0.821544885635376, 0.5915500521659851, -0.03867040574550629, 0.7914385795593262, 1.094251036643982, 0.15478412806987762, 0.47667384147644043, -1.3530559539794922, -0.3793516457080841, -0.3319944441318512, -0.36950352787971497, -0.06786169111728668, -0.075419001281261...
def check _ unique ( self, cr, uid, ids, context = none ) : for rec in self. browse ( cr, uid, ids, context = context ) : idss = self. search ( cr, uid, [ ('fuel _ dis _ conf ','= ', rec. fuel _ dis _ conf. id ), ('model _ id ','= ', rec. model _ id. id ), ('fuel _ type ','= ', rec. fuel _ type ), ('id ', '! = ', rec. ...
[ -1.2249544858932495, -0.497911661863327, 0.6353161931037903, 0.1442120373249054, 0.6518357992172241, -0.374850332736969, -0.07153008878231049, 0.40881073474884033, -0.6347218155860901, -0.3185504078865051, -0.06839130073785782, -0.07783739268779755, -0.5014075636863708, 0.8217001557350159,...
def test _ atomic _ hex _ binary _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ pattern _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - pattern - 2. xsd ", instance = " nistdata...
[ -0.14438460767269135, -0.55693119764328, 0.5529332756996155, 0.9708976745605469, 0.012936456128954887, 0.15370617806911469, -0.16461727023124695, -0.04706508293747902, -0.6834953427314758, -0.012480087578296661, -0.5866003632545471, -0.2821284830570221, -0.0005610024672932923, 0.7026764154...
def mgrs2utm ( mgrs ) : # # todo # # write code to check if the zone number is less than ten and adjust the slices to extract the other parts mgrs =''. join ( e for e in mgrs if e. isalnum ( ) ) # removes spaces in the input grid izonenum = int ( mgrs [ : 2 ] ) strzonelet1 = mgrs [ 2 ]. lower ( ) strzonelet2 = mgrs [ 3...
[ -0.12377962470054626, -0.3785022795200348, 0.5872700214385986, -0.9590020179748535, 0.05714491009712219, -0.521043598651886, 0.08535431325435638, -0.005017796065658331, 0.536628007888794, 0.58832848072052, -0.09114473313093185, 0.03435058519244194, -0.5618042349815369, -0.1297660917043686,...
def add _ bunny ( self, bunny ) : if bunny. team not in self. bunnies : self. bunnies [ bunny. team ] = dict ( ) self. bunnies [ bunny. team ] [ bunny. name ] = bunny self. bunny _ count + = 1 return bunny
[ -0.6407324075698853, -0.14337876439094543, 0.5845422148704529, -0.4604821503162384, -0.05485585331916809, 0.23512282967567444, -0.6022505164146423, -0.49508020281791687, 0.3392631709575653, -0.47000348567962646, -1.5167193412780762, 0.33988991379737854, -0.9161365628242493, 0.3379184007644...
def test _ example _ input _ two _ edit _ close _ entity ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ two ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. table. edit _ row ( " dummy _ input _ two " ) self. assert _ ut...
[ -0.48160526156425476, -0.013418219983577728, 0.6904498338699341, 0.38761892914772034, 0.2564305067062378, 0.6962192058563232, 0.17389552295207977, -0.43681228160858154, 0.12382155656814575, 0.06610531359910965, 0.25158876180648804, -0.019515585154294968, 0.3968348503112793, 0.4745804369449...
def process _ response ( self, text ) : return self. chatbot. talk ( text )
[ 0.2566750645637512, -1.123889446258545, 0.3268985152244568, -0.1705666482448578, -0.48972636461257935, 0.491549015045166, -0.447305291891098, -0.5657926797866821, 0.28086602687835693, -0.46829095482826233, -0.35574451088905334, -0.5991002321243286, -1.335822343826294, -0.6650063395500183, ...
def transform ( zip _ file, save _ dir = none ) : train _ test _ split _ file = osp. join ( save _ dir,'train _ test _ split. pkl') train _ test _ split = save _ images ( zip _ file, save _ dir, train _ test _ split _ file ) # train _ test _ split = load _ pickle ( train _ test _ split _ file ) # partition train / val ...
[ -0.9907686114311218, 0.37144380807876587, 0.5636396408081055, -0.11241499334573746, 0.1415078490972519, -0.30220821499824524, 1.3332301378250122, 0.5743303298950195, 0.0599840022623539, 0.16181153059005737, -0.36298367381095886, -0.36117109656333923, 0.7979270219802856, 0.02356729283928871...
def upgrade _ server ( ) : # update apt index update _ index ( quiet = false ) cmd ='apt - get install - - only - upgrade openssh - server'sudo ( cmd ) print ( green ('ssh server successfully upgraded.') )
[ -0.8195942640304565, -0.8442191481590271, 0.5045379996299744, 0.03541182726621628, 0.36099177598953247, 1.084367275238037, -0.7031112313270569, 0.3431900441646576, 0.4121761620044708, 0.032911062240600586, -0.9507369995117188, 1.1104930639266968, 0.5356074571609497, -0.266040176153183, 0...
def test _ atomic _ hex _ binary _ pattern _ nistxml _ sv _ iv _ atomic _ hex _ binary _ pattern _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - pattern - 1. xsd ", instance = " nistdata / a...
[ -0.03340837359428406, -0.326445996761322, 0.5191226601600647, 0.8223318457603455, 0.24378371238708496, 0.32861706614494324, 0.06406324356794357, 0.12038657069206238, -0.010880577377974987, 0.273368239402771, -0.35995522141456604, -0.6691237092018127, -0.34743255376815796, 0.454030990600585...
def open ( self, * * kwargs ) : self. _ nuki _ device. unlatch ( )
[ 0.11574090272188187, 0.4259193539619446, 0.24163700640201569, -0.3344908058643341, -0.26040297746658325, -0.07803025096654892, 1.4608383178710938, 0.42351043224334717, 0.004929144401103258, -1.2545892000198364, 0.3404127359390259, 0.06219350919127464, -0.8453335762023926, -0.38822737336158...
def thetatobot _ locuc ( self, theta ) : return float ( theta )
[ 0.472495973110199, -1.0382578372955322, 0.18066629767417908, -1.0900957584381104, 0.31358957290649414, 0.5833222270011902, 0.5518976449966431, -0.2696782052516937, -1.1749520301818848, 0.3559635281562805, -0.0035706490743905306, 0.29539361596107483, 0.3221319913864136, -0.9142855405807495,...
def _ getting _ links ( self, limit ) : # using beautiful soup to parse the html source soup = beautifulsoup ( self. driver. page _ source, " html. parser " ) # shutting down the driver after use self. driver. quit ( ) # getting a tags to get image links a _ tags = soup. findall ( " a ", class _ = " wxewr islib nfeiy "...
[ -0.782551109790802, 0.7293787002563477, 0.5182860493659973, 0.05002738535404205, 1.1120911836624146, -1.1218713521957397, -0.40913620591163635, 0.547398030757904, -0.016336793079972267, -0.37072867155075073, 0.36776062846183777, 0.42411255836486816, -0.30441921949386597, 0.7150856256484985...
def test _ atomic _ base64 _ binary _ min _ length _ 2 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ min _ length _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - minlength - 3. xsd ...
[ 0.5339562296867371, -0.21925628185272217, 0.42720234394073486, 0.8187084794044495, -0.1515987664461136, 0.3378012180328369, -0.21680748462677002, -0.35528963804244995, 0.095888152718544, 0.6085396409034729, -0.8002638816833496, 0.32113194465637207, -0.7446630001068115, -0.09603121876716614...
def _ remove _ item ( self, key ) : with self. _ cache _ lock : if key in self. _ cache : del self. _ cache [ key ]
[ -0.5682193040847778, 0.5800201296806335, 0.2797881066799164, -0.09140429645776749, -1.318655014038086, -0.013333811424672604, -0.9005300402641296, 0.12466100603342056, -0.17312437295913696, 1.3013761043548584, -0.4104626774787903, -0.7573442459106445, -0.8558592796325684, -0.13876464962959...
def print _ dict ( d ) : for k, v in d. items ( ) : print ( k + " = > " + v )
[ -0.78679358959198, 0.12214728444814682, 0.3287695646286011, -0.9228327870368958, -0.44715216755867004, 0.6842977404594421, -0.8364978432655334, 0.2136862725019455, -0.6275981664657593, -0.20644089579582214, 0.189004585146904, 0.4461457133293152, 0.9367482662200928, 0.8058107495307922, -0...
def mccopy ( world, source, dest, size, world _ source ) : worldpath = tools. get _ world _ path ( world ) # use a different world as the source if world _ source : world _ source = path ( world _ source ) / " region " else : world _ source = worldpath # create the editor instance and copy the blocks editor = pyblock. ...
[ 0.5617081522941589, -0.46331870555877686, 0.4847315549850464, 0.11930231004953384, -1.3885103464126587, 0.31811273097991943, 0.36073407530784607, -0.31870099902153015, 0.11140812188386917, 1.032374620437622, -0.016691403463482857, 0.5914857387542725, -0.010068420320749283, 0.11723373830318...
def is _ string ( data ) : return isinstance ( data, str )
[ -0.8233717679977417, -0.025896277278661728, -0.04590042307972908, 0.2429591864347458, -0.0530560202896595, 0.5085972547531128, -0.4321349859237671, -1.041083574295044, 1.1123387813568115, -0.23153339326381683, -0.003175550140440464, 0.6782755255699158, -1.0351390838623047, -0.5192981958389...
def test _ create ( self ) : pass
[ 0.34754735231399536, 0.40166881680488586, 0.10710901767015457, 0.9421682357788086, 1.7290863990783691, 1.535284161567688, 1.1925292015075684, -0.08231440931558609, -0.6069542765617371, -1.0128611326217651, -0.47187817096710205, -0.6876288056373596, -0.6315841674804688, 0.1819281131029129, ...
def parse _ datetime ( dt _ str ) : if not dt _ str : return none try : return datetime. strptime ( dt _ str, _ bulk _ datetime _ format ) except exception : return datetime. strptime ( dt _ str, _ bulk _ datetime _ format _ 2 )
[ 0.7248823046684265, -0.020989736542105675, 0.4138769209384918, 0.04183293133974075, -0.6748104095458984, -0.34049493074417114, -0.7090356945991516, -0.5011731386184692, 0.3503389358520508, -0.1222887709736824, 0.3678928017616272, -0.06635362654924393, 0.01701364852488041, -0.50170814990997...
def getmetadata ( self, block, metadatakey ) : if block. getworld ( ) = = self. owningworld : return super ( blockmetadatastore, self ). getmetadata ( block, metadatakey ) else : raise illegalargumentexception ( " block does not belong to world " + self. owningworld. _ _ name _ _ )
[ 0.2972162365913391, 0.18069562315940857, 0.4630621075630188, 0.7806026339530945, -0.40652456879615784, 0.8786432147026062, -0.2800999581813812, -1.0651190280914307, -0.20461301505565643, 0.7559568285942078, 0.5070341229438782, 0.9407774209976196, -0.44905218482017517, 1.029417634010315, ...
def add _ row ( self, choice : purchasepickerrow, * _, * * _ _ ) : super ( ). add _ row ( choice, * _, * * _ _ )
[ -1.3121387958526611, 0.2107587605714798, 0.8200680017471313, 1.2889858484268188, 0.8914955854415894, -0.20945444703102112, 0.43888425827026367, -0.05198431760072708, 0.8831647634506226, 0.07130168378353119, -0.048268284648656845, -0.31023016571998596, 0.9273574352264404, 0.8267747163772583...
def can _ manage _ moderator ( self, forum, user ) : return self. _ perform _ basic _ permission _ check ( forum, user, " can _ manage _ moderator " )
[ -1.2415454387664795, 0.1362714022397995, 0.297783225774765, 1.3145661354064941, -0.6688520312309265, -0.26368391513824463, -0.08655908703804016, -0.08326414972543716, 0.013179013505578041, -0.5938109159469604, -0.4537379741668701, 0.9730689525604248, -1.0605552196502686, 1.2471323013305664...
def test _ list _ integer _ length _ nistxml _ sv _ iv _ list _ integer _ length _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 1. xsd ", instance = " nistdata / list / integer / schema + ...
[ -0.3829408884048462, -0.1106787845492363, 0.30283576250076294, 0.5023323893547058, -0.07216085493564606, -0.07059981673955917, -0.05938628315925598, 0.35966962575912476, 1.2070529460906982, 0.8268778324127197, -0.9116010069847107, -0.6441583633422852, -0.744511067867279, 0.9790149331092834...
def printprogressbar ( iteration, total, prefix ='', suffix ='', decimals = 1, length = 100, fill ='= ', printend = " \ r " ) : percent = ( " { 0 :. " + str ( decimals ) + " f } " ). format ( 100 * ( iteration / float ( total ) ) ) filledlength = int ( length * iteration / / total ) bar = fill * filledlength +'-'* ( le...
[ 0.20491349697113037, 0.3419303596019745, 0.6479011178016663, -0.40789496898651123, -0.4671988785266876, 0.8254179358482361, 0.10536491125822067, -0.7844221591949463, -0.8889512419700623, 0.14657974243164062, 0.03519105538725853, -0.14841467142105103, -0.5852512121200562, 0.2393792569637298...
def what _ is _ my _ ip ( ) - > none : import requests from pjson import core # type : ignore from pygments. lexers import jsonlexer # type : ignore res = requests. get ( " https : / / ifconfig. co / json " ) code = core. format _ code ( res. content ) text = core. color _ yo _ shit ( code, jsonlexer ( ) ) click. echo ...
[ -0.9403245449066162, 0.42229747772216797, 0.6077187657356262, 0.2193729281425476, -0.5094532370567322, -1.0967726707458496, -0.5223985314369202, 0.051574476063251495, -0.050681691616773605, 0.3908882439136505, -0.29774683713912964, 0.8247570395469666, -0.13468670845031738, -0.4363835453987...
def getqvalue ( self, state, action ) : weightsum = 0 temp = 0 for feature in state : temp + = state [ feature ] * self. weights [ feature, action ] weightsum + = abs ( self. weights [ feature, action ] ) return temp
[ -0.06979731470346451, -0.4024336636066437, 0.7563307285308838, 0.6161069273948669, -0.2530742883682251, -0.10930494219064713, -0.15410229563713074, -0.014240005984902382, 0.10258684307336807, 0.12120231240987778, -0.22570233047008514, 0.4596688449382782, 0.36303624510765076, 0.028260309249...
def write _ csv ( filename, data, header = none ) : with open ( filename,'w') as csvfile : writer = csv. dictwriter ( csvfile, fieldnames = header ) writer. writeheader ( ) writer. writerows ( data )
[ -0.3721090853214264, -0.06004159525036812, 0.10933110117912292, 0.3566145896911621, 0.48002907633781433, -0.19577041268348694, -0.7256165146827698, 1.313840389251709, -0.560665488243103, -1.018878698348999, -0.40581750869750977, -0.17562256753444672, 0.3922925889492035, -0.0387852825224399...
def test _ atomic _ base64 _ binary _ enumeration _ 1 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ enumeration _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - enumeration - 2. xsd ...
[ -0.49782776832580566, -1.0822410583496094, 0.5811303853988647, 1.2285547256469727, 0.09016501903533936, -0.20026396214962006, 0.4151879549026489, -0.49934935569763184, -0.5601156949996948, 0.18436667323112488, -0.48080974817276, 0.2615172863006592, -0.25553005933761597, 0.4434233605861664,...
def setupdics ( mass, selection ) : # number of observations obs _ full _ r = 371729 obs _ sub _ r1 = 259399 # 358932 # obs _ sub _ r2 = 105053 # 147630 # obs _ sub _ r3 = 26760 # 38906 # # add _ path signal _ path = cmsswbase +'/ src / analysis / mssmhbb / output /'# specify ditionaries with tag vs value dictionary = ...
[ 0.16021353006362915, 0.11321225017309189, 0.7355798482894897, -0.6352149844169617, 0.07902571558952332, 0.08485367894172668, 0.7067757248878479, -0.2631761133670807, -0.3233485817909241, 0.10552176833152771, -0.3909327983856201, 0.22499176859855652, 0.7575424909591675, 0.3449322283267975, ...
def findbalanced ( text, opendelim, closedelim, openpatterns = none, startdelim = none ) : if openpatterns : openpat ='| '. join ( openpatterns ) else : openpat ='| '. join ( [ re. escape ( x ) for x in opendelim ] ) # patter for delimiters expected after each opening delimiter afterpat = { o : re. compile ( openpat +'...
[ 0.043982308357954025, -0.5008196234703064, 1.0734189748764038, -0.1276341825723648, -0.943572998046875, 0.007968058809638023, 0.511002242565155, 0.42371395230293274, 0.3851054608821869, 0.11638426780700684, -0.31986257433891296, 0.10418877005577087, -0.8404920697212219, -0.0067788930609822...
def test _ classmethod _ set _ parameters ( self ) : assert savannah. f _ max = = 300. 0 assert savannah. alpha = = 0. 3
[ -0.9847763180732727, 0.14766433835029602, 0.40031275153160095, 0.06516207754611969, 1.0427651405334473, 0.4927389919757843, 0.5150809288024902, 0.06728919595479965, 0.14575068652629852, 0.6551161408424377, -0.3798089027404785, 0.18855760991573334, 0.8100234866142273, 1.6868458986282349, ...
def test _ example _ input _ two _ edit _ frontend _ validation ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ two ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. table. edit _ row ( " dummy _ input _ two " ) input _ pa...
[ -0.08376795053482056, 0.37520474195480347, 0.7615222930908203, 0.35626286268234253, 0.5548983216285706, 0.5146086812019348, 0.23239639401435852, -0.47884562611579895, -0.10814005136489868, 0.14889436960220337, -0.7041627764701843, 0.3841439187526703, 0.8387292623519897, 0.2361353635787964,...
def check _ attachment _ permission ( self, action, username, resource, perm ) : if resource. parent. realm = ='blog': if action = ='attachment _ view': return'blog _ view'in perm ( resource. parent ) if action in ['attachment _ create ','attachment _ delete'] : if'blog _ modify _ all'in perm ( resource. parent ) : ret...
[ 0.3880600929260254, -0.22169896960258484, 0.7213283181190491, 1.0425020456314087, -0.9912211894989014, 0.4434298574924469, 0.8468179702758789, -0.3721083402633667, 0.2447616308927536, -0.03938328102231026, 0.5954568982124329, 0.9523447155952454, -0.7820029854774475, 0.20947660505771637, ...
def test _ sum _ with _ invalid _ input _ should _ return _ bad _ request ( test _ client ) : url ='/ sum? value = { 0 } & value2 = { 1 } '. format ( 1, 2 ) response = test _ client. get ( url ) assert response. status _ code = = 400
[ -0.813068151473999, -0.4931066930294037, 0.7491686940193176, 0.8292253613471985, -0.26807570457458496, 1.0325229167938232, -0.5342312455177307, -0.9082408547401428, 0.29893818497657776, -0.8007164597511292, -0.14754097163677216, 0.22226394712924957, 0.0003901501768268645, 0.245234936475753...
def available ( self ) - > bool : return self. _ state _ dict [ state _ key _ state ] is not none
[ -0.7072709202766418, -0.05832328274846077, 0.25538042187690735, -0.30659744143486023, -0.32160404324531555, 0.19148686528205872, -0.3791749179363251, 0.6789265275001526, 0.1139092966914177, 0.6672156453132629, -0.12541905045509338, -0.09016067534685135, 0.15398170053958893, 0.4138702750205...
def test _ can _ enter ( self ) : lvl = level ( 1, 20, 20, none ) lvl. add _ room ( 0, room ( pos ( 0, 0 ), pos ( 7, 7 ) ) ) assert lvl. can _ enter ( pos ( 3, 3 ) ) # inside assert lvl. can _ enter ( pos ( 0, 0 ) ) assert lvl. can _ enter ( pos ( 6, 6 ) ) assert not lvl. can _ enter ( pos ( 7, 7 ) ) # just outside ass...
[ -0.18064942955970764, -0.19899725914001465, 0.5474666357040405, 0.2711905241012573, -0.3169727921485901, 1.1213302612304688, 0.3996923565864563, 0.4353947043418884, -0.7229121327400208, -0.17299619317054749, -0.4297112226486206, 0.00041176073136739433, -0.7103826403617859, 0.86956542730331...
def save _ data ( afile, data, file _ type = none, * * keywords ) : if isstream ( afile ) and file _ type is none : file _ type = _ _ file _ type _ _ write _ data ( afile, data, file _ type = file _ type, * * keywords )
[ -0.010733714327216148, -0.006499954033643007, 0.3901897370815277, 0.6177383661270142, 0.6389263868331909, 0.19149962067604065, -0.6753838658332825, -0.13733407855033875, -0.37798720598220825, -0.33609962463378906, -0.13187825679779053, 0.21617035567760468, -0.6085270047187805, 1.6877208948...
def serialize ( self ) : if self. _ data is none and self. object is not none : return self. output _ many ( self. object ) elif self. object is none and self. _ data is not none : return self. input _ many ( self. _ data ) else : raise serializererror ('if no positional argument are passed, you must use data = kwarg')
[ -0.7414724826812744, -0.404928982257843, 0.5639014840126038, 0.07108636200428009, -0.24266888201236725, -0.41682252287864685, 0.3465330898761749, -0.13478226959705353, 0.20088888704776764, -0.9684009552001953, -0.09301760047674179, -0.2039397656917572, -0.8393270373344421, 0.85105967521667...
def test _ list _ decimal _ enumeration _ 3 _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 4. xsd ", instance = " nistdata / list / ...
[ -0.8708003163337708, -0.8989591002464294, 0.6158580183982849, 0.5089964270591736, -0.2073564976453781, -0.3397063910961151, -0.3504720628261566, 0.1401718109846115, 0.5125818252563477, 0.035805363208055496, -1.153544306755066, -0.6955589652061462, 0.11600413918495178, 0.3577878475189209, ...
def model _ training _ with _ loocv _ testing ( ) : print'traing model and test it with leave - one - out cross - validation...'# - - directory config db _ dir = r'/ nfs / t2 / baa / ssr'base _ dir = r'/ nfs / h1 / workingshop / huanglijie / autoroi'doc _ dir = os. path. join ( base _ dir,'doc') data _ dir = os. path. ...
[ -0.24117276072502136, -0.3083747625350952, 0.774601936340332, -0.011796041391789913, 0.19862258434295654, 0.26430049538612366, 0.7816739678382874, 0.4708675742149353, 0.5440630316734314, 0.5398496389389038, -0.23467302322387695, -0.19738321006298065, 0.20497919619083405, 0.7765992283821106...
def get _ bing _ image _ meta _ data ( image _ info, bing _ key ) : # example : # https : / / dev. virtualearth. net / rest / v1 / imagery / map / aerial / 59. 3256954, 18. 071867 / 13? mapmetadata = 1 & o = xml & key = bing _ key # http : / / dev. virtualearth. net / rest / v1 / imagery / map / aerial? maparea = 59. 1...
[ -0.5679656267166138, -0.9071398377418518, 1.2315645217895508, -0.1681428700685501, 0.20306387543678284, -0.5260774493217468, -1.3451253175735474, -0.044529978185892105, -0.3501967787742615, 0.03408253192901611, 0.3175577223300934, 0.8496721982955933, 0.1914738267660141, 0.5052598714828491,...
def get _ game ( func ) : @ wraps ( func ) def decorated _ function ( * args, * * kwargs ) : game = models. game. get ( db _ session, pk = kwargs ['game _ pk'] ) if game is none : return jsonify ( {'error':'unknown game'}, 404 ) flask. g. current _ game = game return func ( * args, * * kwargs ) return decorated _ funct...
[ -0.6626442074775696, -0.3537254333496094, 0.803737461566925, 0.012863019481301308, 0.8021580576896667, -0.0519191138446331, -0.8073351383209229, -0.6475278735160828, -0.02441295050084591, 1.278108835220337, 1.1219178438186646, 0.9481865167617798, 0.6273905634880066, -0.23097321391105652, ...
def is _ label _ isomorphic ( graph : nx. graph, other : nx. graph, graph _ query _ paramses : sequence [ " graphqueryparams " ] ) - > bool : res = [ ] res. append ( iso. is _ isomorphic ( graph, other ) ) for query _ params in graph _ query _ paramses : res. append ( _ is _ single _ label _ isomorphic ( graph, other, ...
[ -1.167466402053833, 0.33905404806137085, 0.5830800533294678, 1.3370779752731323, 0.5332717895507812, 1.303145408630371, -0.7433785200119019, -0.760018527507782, -0.15853753685951233, 0.9272616505622864, 0.07165267318487167, 0.04528255760669708, -0.2720670700073242, -0.008464239537715912, ...
def scale _ default ( self ) : self. _ _ scale = 1
[ 0.0837213322520256, 0.15548111498355865, 0.5805479884147644, 0.32202255725860596, 1.3528355360031128, 0.43484190106391907, -0.16895882785320282, 0.14193248748779297, -0.8318257927894592, 0.2850669324398041, -0.2026963084936142, -0.43367987871170044, -1.4838082790374756, 1.2507425546646118,...
def trace ( self ) : print ( f " trace : % 02x | % 02x % 02x % 02x | " % ( self. pc, # self. fl, # self. ie, self. ram _ read ( self. pc ), self. ram _ read ( self. pc + 1 ), self. ram _ read ( self. pc + 2 ) ), end ='' ) for i in range ( 8 ) : print ( " % 02x " % self. reg [ i ], end ='' ) print ( )
[ 0.5932055711746216, 0.30467697978019714, 0.8803533315658569, -0.13040609657764435, 1.3886457681655884, 0.4934501349925995, 0.9649288058280945, -0.566260039806366, -0.07100526243448257, 0.13356909155845642, 0.13081949949264526, 0.9526429772377014, -1.2698429822921753, 0.03582054004073143, ...
def left ( self ) : self. direction. rotate _ left ( )
[ 0.9764083623886108, 0.5213202238082886, 0.20671746134757996, -0.3625562787055969, 1.650776743888855, 0.42568424344062805, 0.7786267399787903, -0.1601124107837677, 0.8386971354484558, -0.06672146916389465, -0.54457026720047, 0.15926994383335114, -0.4578491151332855, 0.47303307056427, -0.2...
def get _ start _ message ( bot, message, quest ) : pass
[ -0.36355826258659363, -0.09000151604413986, 0.2426884025335312, 0.4760628342628479, 0.3829122483730316, 0.045763708651065826, -0.3988516628742218, -0.595015823841095, -0.16056282818317413, -0.47596243023872375, -0.026502957567572594, 1.2619303464889526, -0.587264358997345, 0.13977752625942...
def _ _ init _ _ ( self, title = " ", nclasses = 0, cnames = [ ], nfeatures = 0, fnames = [ ], nsamples = 0, sampledata = [ ] ) : self. title = title self. nclasses = nclasses self. cnames = cnames self. nfeatures = nfeatures self. fnames = fnames self. nsamples = nsamples self. sampledata = normalize ( sampledata ) fo...
[ 0.13368724286556244, -0.17712253332138062, 0.5120416283607483, 0.8153691291809082, -0.5188570618629456, 0.5082711577415466, 0.004540566820651293, 0.10141566395759583, 0.16129028797149658, -0.21212613582611084, 0.17082150280475616, -0.060974907130002975, -0.07849220186471939, 0.781730711460...
def header _ odict ( nside, nest = false, coord = none, partial = true ) : hdr = odict ( [ ] ) hdr ['pixtype'] = odict ( [ ('name ','pixtype'), ('value ','healpix'), ('comment ','healpix pixelisation') ] ) ordering ='nest'if nest else'ring'hdr ['ordering'] = odict ( [ ('name ','ordering'), ('value ', ordering ), ('comm...
[ -0.20311225950717926, -0.30872294306755066, 1.1049329042434692, -1.2738299369812012, -0.890497088432312, 0.19776421785354614, -0.4213058650493622, -1.00184166431427, -0.46790406107902527, 0.05485986918210983, 0.007862182334065437, -0.6751921772956848, 0.09114011377096176, -0.12407822161912...
def display ( self ) : # check if barcode has the saved frames if self. barcode. saved _ frames is none : # if barcode does not have the saved frames # show the warning showerror ( " no saved frames ", " this barcode does not have \ nthe saved frames to display. " ) else : displaysavedframeswindow ( barcode = self. bar...
[ 1.0182499885559082, -0.2984735071659088, 0.6570766568183899, 0.12188830226659775, 0.6323710680007935, -0.14132951200008392, 0.8027071952819824, 0.10301481187343597, 0.1360800713300705, 0.08843588083982468, 0.41676437854766846, 0.9544336795806885, -0.20291654765605927, 0.7724403738975525, ...
def format _ tile ( x, width = - 1, padding = 0 ) : if width < 0 : width = int ( np. round ( np. sqrt ( len ( x ) ) ) ) height = len ( x ) / / width tile = np. ones ( ( height + padding * 2, width + padding * 2 ) ) for i in range ( padding, height + padding ) : tile [ i, padding : ( padding + width ) ] = x [ ( ( i - pa...
[ 0.12456272542476654, 0.6452568769454956, 0.664965033531189, -0.6278207898139954, -0.7499450445175171, -0.18623733520507812, -0.512321412563324, -0.555567741394043, 1.3280737400054932, 0.1839691698551178, 0.0996319130063057, 0.3647494614124298, 0.0024058271665126085, 0.3384108245372772, -...
def compute _ intersection ( bbox1, bbox2 ) : g _ xmin, g _ ymin, g _ xmax, g _ ymax = tuple ( bbox1 ) d _ xmin, d _ ymin, d _ xmax, d _ ymax = tuple ( bbox2 ) xa = max ( g _ xmin, d _ xmin ) ya = max ( g _ ymin, d _ ymin ) xb = min ( g _ xmax, d _ xmax ) yb = min ( g _ ymax, d _ ymax ) intersection = max ( 0, xb - xa ...
[ 0.3479352593421936, 0.1715162694454193, 1.0975933074951172, -0.04484324902296066, 0.06570277363061905, -0.061599139124155045, -0.25920212268829346, -0.284939169883728, -0.5089791417121887, 0.0939275249838829, 0.33852747082710266, 0.7539398074150085, -0.478707879781723, -0.00052172143477946...
def _ check _ lines ( self, cr, uid, ids, context = none ) : for rec in self. browse ( cr, uid, ids, context = context ) : if rec. employee _ type = ='worker': continue line _ obj = self. pool. get ('fuel. delegate. lines') fuel _ type = [ ] no _ dupes = [ ] lines = line _ obj. search ( cr, uid, [ ('delegate _ id ','= ...
[ -0.12945379316806793, -0.04110601171851158, 0.71295166015625, 0.013334768824279308, 1.28533935546875, -0.2710607945919037, -0.4248952567577362, -0.06243176385760307, -0.45012030005455017, -0.3333764672279358, 0.39862093329429626, -0.19691452383995056, 0.016474328935146332, 1.04778063297271...
def extractpiscessnvfeatures ( vcfname, tag, avg _ depth = none ) : features = [ " chrom ", " pos ", " ref ", " alt ", " filter ", " i. dp ", " i. evs ", " s. 1. gt ", " s. 1. gq ", " s. 1. ad ", " s. 1. dp ", " s. 1. vf ", " s. 1. nl ", " s. 1. sb ", " s. 1. nc ", " s. 1. aq ", " s. 1. gqx " ] cols = [ " chrom ", " po...
[ -0.22169910371303558, -0.12959851324558258, 0.7888980507850647, -0.25179019570350647, -0.3117934763431549, -0.6022161245346069, -0.05099530518054962, 0.3157958686351776, -0.8937298655509949, 1.1837409734725952, -0.9492781162261963, -0.46501436829566956, -0.3212961256504059, -0.198542743921...
def getschema ( self, schemaid, draft = false ) : if draft : req = apiclient. oneschemaurl % ( self. host, " / draft ", schemaid ) else : req = apiclient. oneschemaurl % ( self. host, " ", schemaid ) resp = requests. get ( req, auth = self. credentials, verify = self. verify ) if resp. status _ code = = 200 : self. log...
[ -1.3546260595321655, 0.20942415297031403, 0.5883920192718506, -0.02923409640789032, 0.017606044188141823, -0.8334790468215942, -0.6560716032981873, -0.18636104464530945, 1.14723539352417, -0.04637390747666359, -0.29735705256462097, 0.9133174419403076, -1.6294065713882446, 0.465085715055465...
def listen ( addr, family = socket. af _ inet, backlog = 50, reuse _ addr = true, reuse _ port = none ) : sock = socket. socket ( family, socket. sock _ stream ) if reuse _ addr and sys. platform [ : 3 ]! ='win': sock. setsockopt ( socket. sol _ socket, socket. so _ reuseaddr, 1 ) if family in ( socket. af _ inet, sock...
[ 1.0561299324035645, -0.3722626268863678, 0.9379736185073853, -0.20827949047088623, -0.6949480175971985, -0.39725375175476074, 0.7636469006538391, 0.137995183467865, 0.3544023931026459, 0.26585879921913147, 0.3913741409778595, 0.8396372199058533, -0.19864054024219513, -0.3988259732723236, ...
def parse ( filename, verbose = true, zero _ based _ index = false ) : with open ( filename, " rb " ) as f : # validate file header ( identification, version, type ) = _ read _ file _ header ( f ) # is this a btsnoop file? identification = identification. decode ('utf - 8') if ( identification = = " btsnoop \ 0 " ) : _...
[ -0.650488555431366, -0.48694461584091187, 0.8170416951179504, 0.27735674381256104, -0.5464118719100952, -0.21973222494125366, -0.6238260269165039, -0.024579185992479324, 0.12355007976293564, 0.2260804921388626, -0.453950434923172, -0.34753695130348206, 0.11757124960422516, 0.50226920843124...
def load _ data2dict ( self ) : # load files into dictionary self. data = { } self. n = range ( len ( self. filelist ) ) # loop to store filenames in elements in dictionary for i in self. n : with open ( self. filelist [ i ],'rb') as f : self. data [ i ] = pkl. load ( f ) return self. data
[ -1.0124515295028687, -0.26857516169548035, 0.30328094959259033, -0.8750981688499451, -0.8184092044830322, 0.4980420768260956, -0.2536933422088623, 0.37492844462394714, -0.9248567223548889, -0.37766799330711365, -1.226959466934204, -0.7409067749977112, -0.2949894368648529, 1.051483511924743...
def _ _ makerequest ( self, path, method, data = none ) : headers = {'authorization':'token'+ self. _ _ token,'user - agent':'fomo / python /'+ self. _ _ version _ _ } if data is not none : headers ['content - type'] ='application / json'response = requests. request ( method, self. _ _ endpoint + path, data = data. to ...
[ -1.1131370067596436, -0.22738026082515717, 0.6905813217163086, -0.3987250328063965, -0.429078608751297, -1.387561559677124, -0.8701335191726685, -0.9122957587242126, -0.05225691199302673, -0.02697468176484108, 0.23027023673057556, 0.4292517304420471, -0.5117459297180176, -1.221413612365722...
def display _ report ( title = " title ", description = ( " stuff ", " more stuff " ) ) : x = 20 y = 6 width = 40 height = len ( description ) + 4 # draw menu rectangle draw _ box ( x, y, width, height, report _ fore, report _ back ) # draw horizontal line top draw _ box _ horizontal ( x, y + 2, width, 1, report _ fore...
[ 0.16707709431648254, 0.29684850573539734, 0.8765453696250916, -0.8776065707206726, 0.4663963317871094, 0.30022093653678894, 0.2535437047481537, 0.23348915576934814, -0.7840243577957153, -0.1912582665681839, -0.019495010375976562, -0.08593656122684479, -0.7553236484527588, -0.12525768578052...
def bulk _ update ( self, data ) : # todo testing return self. client. put ( " / tickets / bulk ", data )
[ -0.8297593593597412, -0.34822508692741394, 0.35422787070274353, -0.15436919033527374, 0.4529605209827423, -0.03378415107727051, -0.701842725276947, 0.16476541757583618, 0.19265489280223846, -0.1694582849740982, -1.238700032234192, 0.42693111300468445, -1.6586054563522339, -0.26023828983306...
def difference _ table ( self, calc, groupby, tax _ to _ diff ) : assert isinstance ( calc, calculator ) assert calc. current _ year = = self. current _ year assert calc. array _ len = = self. array _ len self _ var _ dataframe = self. dataframe ( diff _ variables ) calc _ var _ dataframe = calc. dataframe ( diff _ var...
[ 0.16065430641174316, -0.12609612941741943, 0.6685027480125427, 0.37893202900886536, -0.4314715564250946, 0.2636994421482086, 1.0787787437438965, -0.6684653162956238, -0.6069167256355286, -0.3053048253059387, 0.3068319261074066, 0.07724663615226746, 0.008498325012624264, 0.15324541926383972...
def grad _ check _ sparse ( f, x, analytic _ grad, num _ checks ) : h = 1e - 5 if ( _ _ debug _ _ ) : print'inside grad _ check _ sparse ( f, 2nd arg = x,... )... :'print'analytic _ grad : shape : ', analytic _ grad. shape # print'analytic _ grad [ 9 ] : ', analytic _ grad [ 9 ] # endif debugging x. shape if ( _ _ debu...
[ 0.8053886890411377, 0.325490266084671, 0.8134581446647644, 0.28527072072029114, 0.041336845606565475, 0.39803585410118103, 0.2227640450000763, -0.1113918200135231, -0.4956504702568054, 0.47593414783477783, 0.3649260401725769, 0.12511257827281952, 0.33722326159477234, -0.17719966173171997, ...