text
stringlengths
25
2.19k
embedding
listlengths
768
768
def modulereserved _ 0 ( self, i ) : return self. modulereserved [ i ] & 255
[ -0.9798992872238159, 0.15450534224510193, 0.5262649059295654, -0.5655936598777771, 0.42251986265182495, 0.9510850310325623, 0.4028072655200958, -0.6003385782241821, 1.0136456489562988, 0.3517921268939972, -0.39078840613365173, 0.16943292319774628, -0.40396827459335327, -0.13494782149791718...
def parse _ states _ file ( path ) : states = dict ( ) states _ by _ name = dict ( ) states _ from _ file = [ ] with open ( path,'r') as fs : lines = fs. readlines ( ) for line in lines : states _ from _ file. append ( json. loads ( line ) ) # counter = 1 # curr _ id ='' for i in range ( 0, len ( states _ from _ file )...
[ -0.19091631472110748, -1.7307484149932861, 0.8246557712554932, -0.9217650294303894, -0.9121578931808472, -0.41678303480148315, 0.16066226363182068, -0.2184552550315857, -0.525377631187439, 0.7556857466697693, -0.44645607471466064, -0.9165916442871094, 0.5913785696029663, 0.2126464396715164...
def update _ cached _ tag _ clouds _ by _ contacts ( contacts, verbose = false ) : at _ least _ one _ team _ updated = false for contact in contacts : if contact. id in teams. teams _ by _ contact _ id : if verbose : print " updating tag cloud cache for team " + teams. teams _ by _ contact _ id [ contact. id ]. name up...
[ 0.07864974439144135, 0.05077565088868141, 0.54679936170578, 1.2620375156402588, 0.6612886190414429, -0.07266301661729813, 0.46373045444488525, -0.9091739058494568, -0.37015268206596375, 0.24224001169204712, -0.008695018477737904, -0.6402045488357544, 0.05460798367857933, 1.1286513805389404...
def snapshot ( self ) : snap = super ( multilinefield, self ). snapshot ( ) snap ['text'] = self. text snap ['read _ only'] = self. read _ only snap ['auto _ sync _ text'] = self. auto _ sync _ text return snap
[ -0.6087319254875183, 0.1362585723400116, 0.37570738792419434, -0.3952459692955017, -1.1958726644515991, -0.646704912185669, -1.0207507610321045, 1.000074863433838, 0.4407135546207428, -0.10541874170303345, -1.1385446786880493, -0.31672951579093933, 0.5989805459976196, -0.3597867786884308, ...
def log _ to _ today ( info, filename ='users. log') : with open ('data / traffic. log ','a') as logger _ file : logger _ file. write ( info +'\ n')
[ -0.6992316246032715, -0.9507361650466919, 0.4115440845489502, -0.19559945166110992, 0.3980570137500763, 1.3262436389923096, 0.29259422421455383, 0.6414328813552856, -1.1447961330413818, -0.16895437240600586, -0.5976718664169312, -0.5469469428062439, 0.6524057984352112, 0.1107710525393486, ...
def _ parse _ result _ page ( self, url, payload, only _ region = false, region = none ) : data = [ ] if only _ region : html = self. scraper. _ get _ html ( url ) else : try : html = self. scraper. _ post _ html ( url, payload = payload ) except httperror as e : if e. response. status _ code = = 500 : self. scraper. l...
[ -0.7747789621353149, -0.007137118373066187, 0.5692232847213745, -0.29038891196250916, 0.23456642031669617, 0.03188306465744972, -0.34723758697509766, -0.5972014665603638, -0.2058880776166916, 0.3498455286026001, 0.18524564802646637, -0.40576210618019104, 0.5127019882202148, 0.4017232954502...
def main ( ) : # put your tests in the m2 _ test _ circle module, not here. pass
[ 0.19552360475063324, -0.08211454749107361, 0.35446345806121826, 1.1371146440505981, 0.5496626496315002, 0.4730810821056366, 1.4290457963943481, 0.11824538558721542, -0.06422477215528488, -0.25575464963912964, -0.2646535634994507, 0.650715708732605, -0.5921733975410461, -0.6817830801010132,...
def update ( self, runtime ) : lower _ index = self. _ get _ index ( runtime, self. time _ arr ) # indices for the position data array upper _ index = self. _ find _ upper _ index ( lower _ index ) fraction = self. _ get _ fraction ( upper _ index, lower _ index, runtime ) # fraction between one point and the next if (...
[ -0.6125417947769165, -0.3397114872932434, 0.6125578880310059, -0.9101853966712952, -0.1399560421705246, 0.3843650817871094, 0.20412243902683258, -0.241777241230011, -0.2482295036315918, -0.41217565536499023, 0.06849119812250137, 0.1382523626089096, -0.15004153549671173, 0.3224310576915741,...
def calculate _ distance ( xlat, xlon, ylat, ylon ) : r = 6373. 0 xlat = radians ( xlat ) xlon = radians ( xlon ) ylat = radians ( ylat ) ylon = radians ( ylon ) dlon = ylon - xlon dlat = ylat - xlat a = sin ( dlat / 2 ) * * 2 + cos ( xlat ) * cos ( ylat ) * sin ( dlon / 2 ) * * 2 c = 2 * atan2 ( sqrt ( a ), sqrt ( 1 -...
[ 0.4593944847583771, -0.2701069712638855, 0.6448118090629578, -0.994741678237915, -0.5226600766181946, 0.36064183712005615, -0.7465521097183228, -0.45486927032470703, 0.3251027464866638, 0.02703474648296833, -1.2383464574813843, -0.34615689516067505, 0.3193089962005615, -0.4642440378665924,...
async def async _ setup _ platform ( hass, config, async _ add _ entities, discovery _ info = none ) : mysensors. setup _ mysensors _ platform ( hass, domain, discovery _ info, mysensorscover, async _ add _ entities = async _ add _ entities, )
[ -0.13632802665233612, 0.2802692651748657, 0.4668155610561371, 0.3420897126197815, 1.0726559162139893, -0.10543422400951385, 0.22524476051330566, -0.05263092368841171, 0.8225920796394348, -0.21082167327404022, -0.40702906250953674, -0.5356668829917908, 0.10572049766778946, 1.303099632263183...
def wait _ for _ element _ found ( self, element _ name, element _ type, method ) : for attempt in range ( 10 ) : try : page _ source _ code = self. get _ source ( ) selector = self. get _ web _ element _ selector ( element _ name, page _ source _ code, element _ type, method ) except : pass if selector : break sleep (...
[ -0.5001736879348755, 0.394571989774704, 0.427796870470047, 0.11496027559041977, 0.7077353000640869, -0.023417050018906593, 0.16682954132556915, -0.8110880851745605, 0.6798272728919983, -0.31238362193107605, 0.21516229212284088, 0.041624102741479874, -0.12499845772981644, 0.692355751991272,...
def startelement ( self, name, attrs ) : if name in self. interest _ tags : self. _ collect _ characters = 1
[ 0.09594498574733734, 0.2036229372024536, 0.3182504177093506, -0.30601656436920166, -0.1775418221950531, 0.2530239522457123, -0.021250352263450623, -0.3498753011226654, -0.06735247373580933, 0.2639465928077698, -0.3454381227493286, 1.1844115257263184, -0.23120981454849243, -0.42811566591262...
def verify ( self, address ) : self. putcmd ( " vrfy ", _ addr _ only ( address ) ) return self. getreply ( )
[ 0.04434044659137726, 0.9203056693077087, 0.44299569725990295, 0.1925792694091797, 0.2201128602027893, -0.4573257267475128, -0.2566988170146942, -0.5566813945770264, 1.134702205657959, 0.029114000499248505, -1.1389756202697754, 1.23068106174469, -1.5946496725082397, -0.08748304098844528, ...
def get _ dir ( root, project, kind, source ) : return path ( root ). joinpath ( project ). joinpath ( kind ). joinpath ( source )
[ -0.19704803824424744, -0.3126800060272217, 0.3237537741661072, 0.21870112419128418, -0.4012720286846161, 0.15861603617668152, 0.14039629697799683, -0.2119070142507553, -0.7211763262748718, -0.8733817338943481, 1.229508876800537, 1.1062437295913696, -0.00582002941519022, -0.1385227739810943...
def replace _ marbles ( marbles : list, old _ positions : list, new _ positions : list ) : final _ marbles = copy. deepcopy ( marbles ) for x in range ( len ( old _ positions ) ) : index = final _ marbles. index ( old _ positions [ x ] ) final _ marbles. remove ( old _ positions [ x ] ) final _ marbles. insert ( index,...
[ -0.5257850885391235, -0.2583690285682678, 0.5733239650726318, -0.6404535174369812, -0.153140589594841, 0.07104580104351044, -0.4787035286426544, 1.284853219985962, -0.22543178498744965, 1.609842300415039, -1.1329338550567627, 0.6927775740623474, -0.687588095664978, -0.23784781992435455, ...
def debits ( self ) : return self. sheet. transactions. filter ( debit = self. account )
[ 0.7504727840423584, 0.7614381313323975, 0.48031559586524963, 0.24365997314453125, 0.04658785089850426, 0.2236599177122116, -0.27308782935142517, -0.9703561663627625, 0.5592798590660095, -0.3623012602329254, -0.04754197224974632, 0.655494213104248, -0.1725481152534485, 0.37875306606292725, ...
def generate _ sent2 ( description _ id, label ) : # getting the description inputs title, cat, features = format _ inputs ( create. query. get ( description _ id ) ) # inputs to lm if'shoes'in cat. lower ( ) : model ='perciapp / models / unisex _ shoes _ description _ middle'args ['model _ name _ or _ path'] = model #...
[ -0.306602418422699, -0.3547776937484741, 0.7656295299530029, 0.1187061071395874, -0.037208978086709976, 0.5303217172622681, -0.10241174697875977, -0.041582901030778885, -0.5398768782615662, 0.3971266746520996, -0.5283064246177673, -0.24119126796722412, -0.47178298234939575, 0.6059027314186...
def _ weight _ with _ fixed _ dimension _ order ( arr, weight = none ) : if weight is none : return arr return ( weight. fillna ( 0 ) * arr ). transpose ( * arr. dims )
[ 0.9019556045532227, 0.21254196763038635, 0.5910674333572388, 1.2169822454452515, -0.7790932059288025, -0.8917608857154846, 0.36199453473091125, -0.5575401782989502, 0.2860781252384186, 0.7410071492195129, 0.45120710134506226, -0.5114531517028809, 0.7040884494781494, 1.4872572422027588, -...
def fetch ( ) : write _ movie _ data. s ( not app. config ['rely _ on _ last _ modified'] ). apply _ async ( queue ='fetch _ pk _ data ', routing _ key ='fetch _ pk _ data')
[ -0.5984827876091003, -0.370680034160614, 0.31014886498451233, 0.5331646203994751, 0.5316838026046753, 0.17358960211277008, -0.8188205361366272, 0.4961858093738556, -0.24797768890857697, 0.46347692608833313, 0.13895989954471588, 1.1568995714187622, 0.4932975172996521, 0.7684521675109863, ...
def test _ ensure _ device _ platform _ missing ( self ) : platform _ name = " cisco _ ios " onboarding _ kwargs = { " netdev _ hostname " : " device1 ", " netdev _ nb _ role _ slug " : plugin _ settings [ " default _ device _ role " ], " netdev _ vendor " : " cisco ", " netdev _ model " : " csr1000v ", " netdev _ nb _...
[ 0.2322540581226349, 0.8897051811218262, 0.46567556262016296, 0.7350643873214722, 0.6301467418670654, 0.4809945225715637, 0.6791146993637085, -0.735593855381012, -0.15958234667778015, -0.3677903115749359, -1.0847524404525757, -1.0063245296478271, -0.24350577592849731, 1.28029465675354, 0....
def create _ server ( ip, portnum ) : " " " create socket with sock stream - - > tcp " " " sock = socket. socket ( socket. af _ inet, socket. sock _ stream ) " " " bind socket to args from user as ip, portnum tuple " " " server _ address = ( ip, int ( portnum ) ) print " starting socket on " sock. bind ( server _ addre...
[ 0.1517520546913147, -0.4337789714336395, 0.9687165021896362, -0.1320551186800003, 0.16370858252048492, 0.004236385691910982, 0.5177565813064575, -0.5962624549865723, -1.0034221410751343, -0.11008234322071075, 0.33465540409088135, -0.1971752941608429, -0.16324076056480408, -0.04450793191790...
def _ findmenustack ( self, menu ) : labels = [ ] while menu : new _ menu = none parent _ menu = menu. getparent ( ) if parent _ menu : for i in range ( parent _ menu. getmenuitemcount ( ) ) : item = parent _ menu. finditembyposition ( i ) if item. getsubmenu ( ) = = menu : labels. append ( item. getitemlabeltext ( ) )...
[ -0.5991116166114807, -0.18335694074630737, 1.3571048974990845, 0.15144160389900208, -0.48296213150024414, -0.0059883170761168, 0.5569790005683899, -0.6356832385063171, -0.49760982394218445, 0.6243733763694763, 0.23734650015830994, -0.44882503151893616, -1.540583848953247, 0.638172864913940...
def evaluate ( self ) : return rolleddice ( self. sides ). roll ( self. n )
[ -0.5133102536201477, 0.22071664035320282, 0.3020983338356018, -1.6340301036834717, -0.1517990380525589, -0.2630026638507843, -0.9174274206161499, -0.2560204267501831, -0.3790285885334015, -0.6385443806648254, 0.3214310109615326, 0.7314532399177551, 0.12694044411182404, 0.06346222758293152,...
def comp _ cum _ distribution ( xs, norm = true ) : cdf = cum _ density _ func ( xs, norm ) return dict ( zip ( cdf. keys ( ), [ max ( cdf. values ( ) ) - x for x in cdf. values ( ) ] ) )
[ 0.30545780062675476, -0.6592263579368591, 0.35616594552993774, 0.22885140776634216, -0.8667287230491638, -0.8744952082633972, 0.7225012183189392, 0.9329813718795776, 0.4120645225048065, 0.15690724551677704, -0.14005224406719208, -0.7059241533279419, 0.9637534022331238, 0.3295522630214691, ...
def _ _ get _ revisions ( self, start ) : revisions = [ ] def f ( x ) : return x. endswith ( '. sql') listing = filter ( f, os. listdir ( self. _ _ get _ revisions _ dir ( ) ) ) listing. sort ( key = lambda number : int ( number. rstrip ( '. sql') ) ) for file in listing : if file. endswith ( '. sql') : f = open ( os. ...
[ -0.4538187086582184, -0.17703403532505035, 0.8101955056190491, -0.08343110978603363, -0.7520949244499207, -1.0972144603729248, -0.22990119457244873, -0.04771400988101959, -0.9080827832221985, 0.50058913230896, -0.6989272236824036, 0.6817296147346497, 0.21948157250881195, 0.6175780296325684...
def dockerspawner _ configured _ app ( app, named _ servers ) : # app. config. dockerspawner. remove = true with mock. patch. dict ( app. tornado _ settings, { " spawner _ class " : dockerspawner } ) : yield app
[ -0.27572643756866455, -0.43669819831848145, 0.4222063422203064, 0.8423721194267273, -0.5660002827644348, 0.3870449662208557, 0.3664737939834595, -0.3928782045841217, 1.375062108039856, 0.9603314399719238, -0.8056474924087524, -0.43831801414489746, 0.6515950560569763, 0.6546728610992432, ...
def loadusers ( self ) : self. _ _ api = userapi self. _ _ apiexc = apiexception self. _ _ userlist. clear ( ) try : api _ instance = self. _ _ api ( self. _ _ engine. api _ client ) userlist = paginator ( api _ instance, " get _ all _ users ", _ request _ timeout = self. _ _ engine. get _ timeout ( ) ) if userlist. re...
[ -1.6764857769012451, 0.6798579692840576, 0.8779633045196533, 0.1627785861492157, -0.010179907083511353, -0.11619248986244202, -0.1761065125465393, 0.24803513288497925, -0.18470843136310577, 0.09105530381202698, -0.604096531867981, -0.028855206444859505, -1.010254144668579, 0.16621090471744...
def _ _ init _ _ ( self, urdf _ filename : union [ none, str ] = none, urdf _ string : union [ none, str ] = none, xacro _ filename : union [ none, str ] = none, name : union [ none, str ] = none, time _ derivs : list [ int ] = [ 0 ], qddlim : union [ none, arraytype ] = none, t : union [ none, int ] = none, param _ jo...
[ 0.7691617608070374, -0.001738577731885016, 0.7022920250892639, 0.09054985642433167, -0.03822874277830124, -0.22936169803142548, 0.10092899203300476, 0.5810209512710571, -0.7813881039619446, -0.17709319293498993, 0.33355632424354553, 0.32954612374305725, 0.129176065325737, -0.44321197271347...
def cancel _ transfers ( self, transfer _ ids ) : url = lendingclub _ url ('accounts ', self. investor _ id,'funds ','cancel') request _ data = { " transferid " : transfer _ ids } response = self. session. post ( url = url, data = json. dumps ( request _ data ) ) response. raise _ for _ status ( ) return [ namedtuple _...
[ -0.09219702333211899, -0.09419115632772446, 0.20799730718135834, 0.08551913499832153, -0.010186925530433655, -0.22738106548786163, -0.7195466756820679, -0.8388738036155701, -0.30207616090774536, 0.3402472734451294, -0.5584464073181152, -0.32653552293777466, -0.9349361062049866, 0.265180170...
def test _ scriptsinrelease ( self ) : basedir = self. mktemp ( ) os. mkdir ( basedir ) os. mkdir ( os. path. join ( basedir,'bin') ) f = open ( os. path. join ( basedir,'bin ','exy'),'w') f. write ('yay') f. close ( ) scripts = dist. getscripts ('proj ', basedir = basedir ) self. assertequal ( len ( scripts ), 1 ) sel...
[ -0.06783964484930038, -0.5276722311973572, 0.7315800786018372, 0.2920708656311035, 0.6472974419593811, -0.04295692592859268, 0.2180340439081192, 0.05966106802225113, -0.14751659333705902, -0.23943960666656494, -0.042234957218170166, 0.09520170837640762, -0.3935893774032593, 0.6054084300994...
def makedir ( path ) : if os. path. exists ( path ) : shutil. rmtree ( path ) # create new one os. makedirs ( path ) # return the path return path
[ 0.044603683054447174, 0.16251994669437408, 0.5367650985717773, 0.03669564425945282, -0.5567529201507568, 0.9421937465667725, 0.9841976761817932, -0.5359511375427246, 0.7307087182998657, -1.084602952003479, 0.2141338288784027, -0.8348751068115234, -0.22173276543617249, -0.24022507667541504,...
def _ _ eq _ _ ( self, * args ) : return _ snap. tcha _ _ _ eq _ _ ( self, * args )
[ -0.9686852693557739, 0.2835121154785156, 0.12602218985557556, -0.9180448055267334, 0.6820533871650696, 0.49583926796913147, 0.7147852182388306, 0.018199212849140167, -0.7711114287376404, 0.9419243931770325, -1.0325818061828613, -1.5792425870895386, 0.3106366693973541, 0.649321973323822, ...
def is _ vaild ( self ) : return self. seconds > 0 and self. seconds < 24 * 60 * 60
[ -0.3013388216495514, -0.05092187970876694, 0.5094201564788818, 0.21495938301086426, -0.5621260404586792, 0.7389259934425354, -1.4616267681121826, -1.1565769910812378, -0.8033727407455444, -0.2129681259393692, 0.09308487921953201, 0.7421135306358337, -0.4258299171924591, 1.5147488117218018,...
def _ filter _ new _ rows _ only ( self, items, old _ items ) : empty _ df = pd. dataframe ( columns = ['ref ','user ','price ','url ','size ','condition ','date ','time ','description ','image _ url'] ) if items. equals ( empty _ df ) : return ( items ) if items. equals ( old _ items ) : return ( empty _ df ) if old _...
[ -0.6226670145988464, 0.4184100925922394, 0.6678850650787354, 0.5552458763122559, 0.4802238941192627, -0.24883043766021729, -0.7894282937049866, 0.5460250973701477, 0.26545220613479614, 0.38567715883255005, 0.4633214771747589, 0.23813015222549438, -0.12924650311470032, 1.351576805114746, ...
def getminkey ( self ) - > str : if not self. map : return " " else : return min ( self. map, key = self. map. get )
[ -0.6519430875778198, -1.413354754447937, 0.5118545293807983, -0.08898601680994034, -0.9115191102027893, 0.5384202003479004, -1.438317894935608, -0.9683887958526611, 0.07855483144521713, -0.37626031041145325, 0.9146650433540344, 0.49919942021369934, -0.760564386844635, 0.129350483417511, ...
def building _ number ( self, building _ number ) : if building _ number is not none and len ( building _ number ) > 16 : raise valueerror ( " invalid value for ` building _ number `, length must be less than or equal to ` 16 ` " ) # noqa : e501 if building _ number is not none and len ( building _ number ) < 1 : raise...
[ -0.5730127096176147, 0.8527609705924988, 0.12087280303239822, 1.0546008348464966, 0.23031629621982574, 0.7182010412216187, 0.8511795997619629, 1.1236835718154907, -0.16670896112918854, -0.7905314564704895, -1.1254171133041382, -0.4249096214771271, -0.07781156897544861, 0.2960342466831207, ...
def getstrongs ( word, strongs _ index ) : if word in strongs _ index : return strongs _ index [ word ] else : return [ ]
[ 0.36521121859550476, -0.6550186276435852, 0.30836066603660583, 1.0462768077850342, 0.6125327944755554, 0.06478401273488998, -1.6604893207550049, -0.4049685001373291, 0.3958510756492615, -0.06773748248815536, -0.382228285074234, 0.9835142493247986, -0.35406455397605896, -0.6812332272529602,...
def eval _ by _ ttype ( net, ctxt _ fn, stim _ fn, sample _ fn, taskintl, ssizel, n _ ctxt _ steps, neps ) : taskl _ ev = [ ] # generate a list of tasks which are trials all of one kind so we can see accuracy by trial type for task _ int in taskintl : taskl _ ev. append ( [ task _ int, sample _ fn ( 1, 0, 0 ), ssizel [...
[ 0.01581001468002796, 0.714665412902832, 0.8531720042228699, -0.21075844764709473, 0.20663043856620789, -0.3185063600540161, 0.9065530300140381, 0.002333051059395075, -0.280270516872406, 1.1052970886230469, -0.46746495366096497, -0.08493534475564957, 0.4396783709526062, 0.7912667989730835, ...
def test _ atomic _ any _ uri _ min _ length _ nistxml _ sv _ iv _ atomic _ any _ uri _ min _ length _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - minlength - 1. xsd ", instance = " nistdata / a...
[ 0.007954636588692665, -0.49998873472213745, 0.5099136233329773, 0.9172043204307556, -0.3261078894138336, -0.07445493340492249, -0.13757364451885223, -0.13597899675369263, 0.66764897108078, -0.1365458071231842, 0.4068160951137543, -0.0802776888012886, -0.6280271410942078, 0.2796730101108551...
def is _ redirection ( status ) : return 300 < = status and status < = 399
[ -0.27629706263542175, 0.02941865101456642, 0.504745602607727, 0.7662233710289001, -0.5827542543411255, 0.20444758236408234, 0.19773782789707184, -0.2922959625720978, 1.981281042098999, -0.32015180587768555, -0.36987268924713135, 0.4772302508354187, 0.4348629117012024, -0.6865125298500061, ...
def cali _ left ( self ) : self. cali _ forward _ a = not self. cali _ forward _ a self. left _ wheel. offset = self. cali _ forward _ a self. go _ forward ( 50 )
[ 0.7677988409996033, 0.17972704768180847, 0.4227696657180786, -0.1421896517276764, -0.16099892556667328, 1.120110273361206, 0.23234856128692627, 0.3129851520061493, 0.5131909251213074, -0.0017870618030428886, -0.16541750729084015, -0.35407328605651855, 0.28682857751846313, 1.355777859687805...
def print _ quine ( ) : def quine ( s ) : return'% s ( % r ) )'% ( s, s ) print ( quine ( " def quine ( s ) : return'% s ( % r ) )'% ( s, s ) \ nprint ( quine " ) )
[ -0.07880948483943939, 0.05539972335100174, 0.6141960024833679, -0.8956729769706726, -0.28366100788116455, -0.880419135093689, -0.38549113273620605, -0.3932499587535858, -0.18668876588344574, -0.3919481635093689, -0.4866591691970825, 0.49590399861335754, -0.7479079961776733, -0.249628841876...
def buildattriblabel ( a, showclass = true ) : assert type ( a ) is hou. attrib csh = { " global " : " detail ", " point " : " pt ", " vertex " : " vtx " } had = hou. attribdata td = { had. string :'s ', had. int :'i ', had. float :'f'} t = a. datatype ( ) ts = a. size ( ) ty = '?'if t in td : ty = td [ t ] if ts = = 3...
[ 0.5815597772598267, -0.7257938385009766, 0.6809539198875427, -0.5501874685287476, -0.8792315125465393, 0.49436554312705994, 0.5206871628761292, 0.3774389326572418, 0.6640360355377197, 0.6940253376960754, 0.47047528624534607, 0.9064163565635681, 0.6876303553581238, -0.20350931584835052, 0...
def get _ instruments ( instrument : str ) : client = publicbitwyrewsclient ( ) client. instruments ( instrument ) while true : print ( " " ) print ( " receiving message " ) success, response, error _ code, error _ msg = client. receive _ conn ( ) if not success : exit _ message ( response, error _ code, error _ msg ) ...
[ -0.5533568263053894, -0.06131447106599808, 0.8228335976600647, -0.5498719811439514, -0.025853507220745087, 0.010622259229421616, 0.52716463804245, -1.6711368560791016, -0.6135088801383972, -0.1279572695493698, -0.2259073704481125, 1.255993366241455, -1.373720645904541, 0.22083178162574768,...
def distance ( self, target ) : return ( self. pos [ 0 ] - target. pos [ 0 ] ) * * 2 + ( self. pos [ 1 ] - target. pos [ 1 ] ) * * 2
[ -0.6854875087738037, -1.1838569641113281, 0.627586305141449, -0.23029331862926483, 0.02381192147731781, 0.4184498190879822, -0.5434412360191345, -0.047198858112096786, 0.03999830037355423, 0.5089031457901001, -0.3656681180000305, 0.1445956975221634, -0.27446845173835754, -0.639846384525299...
def comment ( self, ticket _ id, comment, attachments = none ) : if attachments : content = { " id " : ticket _ id, " action " : " comment ", " text " : comment } files = [ ( " json ", ( none, json. dumps ( content ), " application / json " ) ) ] files + = self. _ prep _ attachments ( attachments ) return self. client....
[ -0.4072454869747162, -0.6867930889129639, 0.629262387752533, 0.19994446635246277, -0.0415579155087471, -0.14089493453502655, 0.1660810261964798, -0.45357969403266907, 0.07059275358915329, -0.04034126177430153, -0.6288223266601562, -0.5435255169868469, -0.9692081212997437, -0.15583467483520...
def get ( dictionary, key ) : if key in dictionary : return dictionary [ key ] else : return''
[ 0.05717657878994942, 0.5182099342346191, 0.2593815326690674, -0.5785988569259644, -0.5413486361503601, -0.05056493356823921, -1.8579931259155273, 0.1359863430261612, -0.44835662841796875, 1.07211172580719, 0.9050597548484802, -0.062404315918684006, 0.14283700287342072, -0.2604871988296509,...
def get _ clonal _ freq _ spectrum ( self, define ='v _ j _ cdr3 ', use _ counts _ or _ freqs ='counts ', freq _ bin _ width = 0. 00001 ) : # make sure'use _ counts _ or _ freqs'variable is defined correctly if use _ counts _ or _ freqs! ='counts'and use _ counts _ or _ freqs! ='freqs': print'use _ counts _ or _ freqs ...
[ 0.7501888275146484, 0.3460705280303955, 0.734781801700592, 0.35680556297302246, 0.10803232342004776, -0.3510379493236542, -0.04111306741833687, 0.5058420300483704, 0.5097171664237976, 0.02798081748187542, 0.7436217665672302, 0.4511544704437256, -0.004007687792181969, 0.5984452962875366, ...
def capture _ data ( pose _ name, src = 0 ) : cap = cv2. videocapture ( src ) _, frame = cap. read ( ) control _ result = construct _ control ( pose _ name ) out = cv2. videowriter ( " output. avi ", cv2. videowriter _ fourcc ( " m ", " j ", " p ", " g " ), 30, ( frame. shape [ 1 ], frame. shape [ 0 ] ), ) mp _ pose = ...
[ 0.06588766723871231, 0.20399533212184906, 0.9055628180503845, 1.1826465129852295, -0.7328268885612488, -0.3564783036708832, 0.21693065762519836, -0.5153408050537109, 0.6265009641647339, 0.12527239322662354, -0.153702974319458, 0.25632962584495544, 0.3460952341556549, 1.0443965196609497, ...
def _ _ eq _ _ ( self, * args ) : return _ snap. groupstmt _ _ _ eq _ _ ( self, * args )
[ -1.1678777933120728, -0.8237681984901428, 0.14363178610801697, 0.23543453216552734, 0.17633982002735138, 0.434900164604187, 1.6473935842514038, -0.5015527606010437, -0.8378431797027588, 0.6995614171028137, -0.9459875822067261, -1.2184336185455322, -0.0019227680750191212, -0.183556854724884...
def getkeyi ( self, * args ) : return _ snap. tunionfind _ getkeyi ( self, * args )
[ -0.5825676918029785, -0.18284137547016144, 0.3233199715614319, 1.4374287128448486, 0.2563071548938751, 0.2778819501399994, 0.6163567304611206, -1.1202796697616577, -1.4748380184173584, -0.024562358856201172, -0.4213413894176483, -1.2043348550796509, -0.905604898929596, -0.19863176345825195...
def getnextdate ( self ) : return self. days [ - 1 ]. date + datetime. timedelta ( days = 1 )
[ -0.434471070766449, 0.9185855388641357, 0.6295315027236938, 0.5274187922477722, -0.6693083047866821, 0.5285756587982178, -1.0671958923339844, -0.585671067237854, 0.7087992429733276, -1.3974038362503052, 0.9492401480674744, 0.33722010254859924, -0.3215600252151489, 0.24216316640377045, 0....
def _ is _ buffer ( value ) : if isinstance ( value, tensordescriptionwrapper ) and value. has _ tensor : return true return false
[ 0.033090174198150635, 0.6360871195793152, 0.3962053656578064, 0.5546709299087524, -0.39598196744918823, 0.821968674659729, 0.8258149027824402, -0.7721809148788452, 0.8211288452148438, -0.6459269523620605, -0.3322319984436035, 0.7835802435874939, -0.5405412912368774, 0.964751124382019, -0...
def is _ saturated ( self, items : bundle ) - > bool : return self. num _ items _ in _ bundle ( items ) > = self. capacity
[ -0.6860278248786926, 0.03018772602081299, 0.41443556547164917, 0.4600062668323517, 0.2800878882408142, 0.0888386070728302, -0.2725803554058075, -0.2665565013885498, -0.8354177474975586, 0.8010450601577759, -1.211997389793396, -0.6516434550285339, 0.1311390995979309, -0.0201769657433033, ...
def tbool _ isvalstr ( * args ) : return _ snap. tbool _ isvalstr ( * args )
[ -0.22790424525737762, 0.463018000125885, -0.0167414378374815, 1.6856136322021484, -0.024836337193846703, 1.0755994319915771, -0.29141438007354736, -0.7216261625289917, -0.9525825381278992, 0.5159206986427307, 0.4315952956676483, 0.03404916822910309, -0.5069444179534912, 0.14825646579265594...
def test _ parse _ recursive ( self ) : data = parse _ manifest ( get _ test _ file ('manifest _ recursive. ini') ) self. assertequal ( data, ( { '. /': ['setup. py'] }, {'src /': ['*. txt ','*. ini'], '. /': ['*. py'] } ) )
[ 0.37308263778686523, -0.03621168062090874, 0.4955962002277374, 0.3628074824810028, -0.48904097080230713, -0.22215484082698822, -0.2275574654340744, 0.4000817537307739, -0.31738221645355225, -0.9242918491363525, -0.39800816774368286, -0.30789458751678467, -0.27149584889411926, 0.00689710816...
def _ exc _ info _ to _ string ( self, err, test ) : return err
[ 0.1747644543647766, -1.8078391551971436, 0.26364943385124207, -0.4703015387058258, -0.5843486785888672, 0.27204468846321106, -0.549281656742096, -0.27389171719551086, 0.5628302097320557, 0.1639488935470581, 1.155801773071289, -0.6269607543945312, 0.058670975267887115, -0.5729190707206726, ...
def install _ type ( self ) : return self. _ install _ type
[ 0.019297456368803978, -0.22441603243350983, 0.1686709076166153, 0.9234527349472046, 1.111626148223877, 1.0186504125595093, 1.1847251653671265, 0.22918230295181274, 0.5394834876060486, 0.8875957727432251, 0.15991967916488647, 0.18694928288459778, -0.9465516805648804, 0.5997530817985535, 0...
def validate _ authorization _ request ( self, uri, http _ method ='get ', body = none, headers = none ) : request = request ( uri, http _ method = http _ method, body = body, headers = headers ) request. scopes = none response _ type _ handler = self. response _ types. get ( request. response _ type, self. default _ r...
[ -1.223454475402832, -0.017955357208848, 0.837405264377594, 0.8511057496070862, -0.03732782229781151, -0.4296419024467468, 0.5930531620979309, -1.0818541049957275, 0.765150785446167, 0.011676887981593609, 1.113247036933899, 0.7437321543693542, -0.42304039001464844, 0.09871319681406021, 0....
def read _ traj _ xyz ( filename, unit _ conversion = units. angstrom _ to _ au, spaced = false ) : x = [ ] currx = [ ] symbols = [ ] natom = 0 frame = - 1 space = int ( spaced ) # extract data about all frames with open ( filename,'r') as fin : natom = int ( fin. readline ( ) ) fin. readline ( ) # skip second line for...
[ -0.575584888458252, -0.5390903949737549, 0.6435372829437256, -0.4698975384235382, -0.4020538628101349, -0.2576117515563965, 0.6738300323486328, 0.809849739074707, 0.040537673979997635, 0.30952367186546326, -0.08926491439342499, 0.36110565066337585, 0.01959684118628502, 0.5632296204566956, ...
def message _ cputype ( self, contenttype ) : cpuname ='not found'try : sysinfo = open ('/ proc / cpuinfo') except ( fileexistserror, filenotfounderror ) : raise sysinfostr = sysinfo. readlines ( ) for line in sysinfostr : if'model name'in line : cpuname = line. split ('', 2 ) [ 2 ] sysinfo. close ( ) if contenttype = ...
[ 0.13622154295444489, -0.26920926570892334, 0.534450352191925, -0.500519335269928, -0.2197200059890747, -0.3052354156970978, 0.4478682577610016, -1.0967862606048584, -1.0772396326065063, 0.4559786021709442, 0.34222692251205444, 0.4414857029914856, -0.5418652296066284, 1.0146185159683228, ...
def scan _ parquet ( file : union [ str, path ], stop _ after _ n _ rows : " optional [ int ] " = none, cache : bool = true, ) - > " lazyframe " : if isinstance ( file, path ) : file = str ( file ) return lazyframe. scan _ parquet ( file = file, stop _ after _ n _ rows = stop _ after _ n _ rows, cache = cache )
[ 0.05445060133934021, 0.9271923899650574, 0.4595431089401245, 0.5761411786079407, -1.4312622547149658, -0.4753706455230713, 0.21808955073356628, -0.4155040979385376, -0.004515945911407471, -0.7567077875137329, -0.03895992040634155, 0.19768261909484863, 0.008997591212391853, -0.1879034638404...
def _ createtwistjoints ( self ) : joints _ num = 7 uv _ split = 1. 0 / ( joints _ num - 1 ) prev _ coord = 0 twist _ grp = mc. group ( n = " { } _ { } _ twistjoints _ { } _ { } ". format ( self. side, self. name, self. suffix, self. instance _ num ), em = 1, p = self. mod _ dict [ " jnts " ] ) for limb in [ [ " upper ...
[ -0.41186702251434326, -0.24665236473083496, 0.6020525693893433, -0.6792277693748474, 0.07077152281999588, 0.12092604488134384, 1.1810669898986816, -0.15755927562713623, -0.496903657913208, -0.3462960124015808, 0.2370128035545349, -0.28408634662628174, -0.724659264087677, 0.3261279761791229...
def well _ formed _ problem ( prefs ) : n2 = len ( prefs ) a, b = prefs [ : int ( n2 / 2 ) ], prefs [ int ( n2 / 2 ) : ] n = len ( a ) assert len ( b ) = = n for pref in a : assert well _ ranked ( pref, n, 2 * n ) for pref in b : assert well _ ranked ( pref, 1, n ) return true
[ -0.7497371435165405, 0.3645116686820984, 0.5931347608566284, -0.3566516935825348, 0.35914215445518494, 0.3919890224933624, -0.042481690645217896, -0.6873130798339844, 0.18637841939926147, -0.21005879342556, 0.06521503627300262, 0.6224452257156372, -0.5932693481445312, 0.049983080476522446,...
def submit _ comp _ job ( self, path, callback, method, * args, * * kwargs ) : if self. executor is none : with self. handling _ exceptions ( ) : callback ( getattr ( self. comp, method ) ( * args, * * kwargs ) ) else : path = showpath ( path ) with logger. in _ path ( path ) : # pickle the compiler in the path context...
[ 0.08457669615745544, -0.1406567394733429, 0.8006187081336975, 0.11641992628574371, -0.3505604565143585, -0.5706232190132141, 0.20074217021465302, 0.06562113016843796, 0.14636103808879852, -0.5370240807533264, 0.11552820354700089, 0.19625312089920044, -0.6330891847610474, 0.6435661911964417...
def load ( self, cfg ) : self. close ( ) try : if cfg [ " cfgfile " ] is not none : # might happen during reload self. _ propertycollection. defineproperty ( " cfgfile ", cfg [ " cfgfile " ], " the absolute path to the configuration file. ", options = dict ( enum = [ cfg [ " cfgfile " ] ] ) ) try : self. _ propertycoll...
[ -0.7466992735862732, 0.13092392683029175, 0.5863193273544312, -0.03983348235487938, -0.7544801235198975, -0.41336899995803833, 1.1252686977386475, -0.19243356585502625, -0.43152177333831787, 0.2552134096622467, -0.5182942748069763, -0.5771022439002991, -0.6171916127204895, 0.75648081302642...
def cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilterif3dif3 _ cast ( * args )
[ 0.9311379790306091, 0.31432411074638367, 0.4103001654148102, -0.4486142694950104, -0.01006371807307005, 0.9187309145927429, 0.41546645760536194, 0.0055589210242033005, 0.4912618398666382, 0.8200172185897827, -0.09204845130443573, -0.30795079469680786, -0.19726787507534027, -0.4741415977478...
def export ( exportlist = none, filename ='', path ='', prefix ='', suffix ='', format ='' ) : if not filename : filename = os. path. basename ( cmds. file ( query = true, scenename = true ) ) or'nosave'filepath = libpython. formatpath ( filename, path, prefix, suffix ) if exportlist : cmds. select ( exportlist, noexpa...
[ 0.2636301517486572, -0.4825883209705353, 0.8058015704154968, 0.7740569114685059, -0.5814739465713501, -0.15861737728118896, 0.40692126750946045, 0.09883575886487961, 0.8515641093254089, 0.37245839834213257, 0.15124839544296265, -0.019920004531741142, -0.7637267708778381, 0.8666473627090454...
def test _ ambig ( ) : pytest. debug _ func ( ) inp ='01 - 02 - 03'# payload iso = nldt. moment ( inp, itz ='local') assert iso ( ) = ='2001 - 02 - 03'# payload uso = nldt. moment ( inp,'% m - % d - % y ', itz ='local') assert uso ( ) = ='2003 - 01 - 02'# payload euro = nldt. moment ( inp,'% d - % m - % y ', itz ='loca...
[ -0.15334509313106537, -0.19528259336948395, 0.6900140047073364, -0.06738169491291046, -0.0009822876891121268, 1.1357686519622803, -0.826668918132782, -0.5536760687828064, 0.27326700091362, -0.13870757818222046, -0.5886246562004089, -0.44890570640563965, 0.041494760662317276, 0.520038902759...
def geteid ( self, * args ) : return _ snap. tneanetmp _ geteid ( self, * args )
[ 0.5573419332504272, -0.4723781645298004, 0.33025088906288147, -0.15632207691669464, 2.1292595863342285, 0.9056937098503113, 0.3875778317451477, 0.12606003880500793, -0.3548014461994171, 0.20613248646259308, 0.1789519339799881, -1.774871587753296, -0.7845796346664429, 1.3728173971176147, ...
def stw _ plansze _ poczatkowa ( ) : szerokosc = 100 wysokosc = 100 step = konfiguracja [ " szer _ kom " ] height = wysokosc * step # prosta matematyka width = szerokosc * step obraz = image. new ( mode = " rgb ", size = ( width, height ), color = ( 255, 255, 255 ) ) # mode = f bo dziele nizej draw = imagedraw. draw ( ...
[ -0.32880261540412903, 0.1375395953655243, 0.6607980132102966, -0.16257333755493164, -0.5873556137084961, 0.051389601081609726, 0.7590030431747437, -0.1156967356801033, -0.8933591842651367, -0.23148927092552185, -1.0721540451049805, -0.4769437611103058, 0.867356538772583, 0.7473283410072327...
def sample _ from _ w ( self, mean _ w, log _ var _ w ) : mc _ samples = self. l d _ in, d _ out = mean _ w. shape z = self. get _ std _ norm _ samples ( [ mc _ samples, d _ in, d _ out ] ) # # division by 2 to obtain pure standard deviation w _ from _ q = tf. add ( tf. multiply ( z, tf. exp ( log _ var _ w / 2 ) ), me...
[ 0.4742010235786438, -0.5038330554962158, 0.4105689227581024, -0.5737244486808777, -1.6098108291625977, 0.22359415888786316, 0.4313584566116333, -0.4452225863933563, 0.4715905785560608, 0.2621537148952484, 0.40001633763313293, 1.098059058189392, 0.1759447455406189, -0.06333304941654205, -...
def test _ invalid _ user _ login _ with _ wrong _ password ( self, client, proto _ user ) : response = client. post ( reverse ( " login " ), { " username " : proto _ user. username, " password " : " anonymous ", " robot " : true, }, follow = true, ) assert not response. context [ " user " ]. is _ authenticated
[ -0.13835154473781586, 0.24965433776378632, 0.3811311721801758, 1.4823157787322998, -0.2506501078605652, 1.5198115110397339, -0.2617090046405792, -0.16729331016540527, 0.31464383006095886, -0.44574034214019775, -0.566233217716217, 0.39043644070625305, -0.572506844997406, 0.08555543422698975...
def add _ sentence _ to _ meta ( table1, protocol, msg _ type, field _ name, bit _ cnt, sentence, sentence _ id ) : get _ sent _ id = - 2 meta _ db = metadb ( table1 ) msg _ meta = meta _ db. get _ meta _ by _ proto _ msgtype _ field ( protocol, msg _ type, field _ name ) try : bit _ cnt = msg _ meta [ 0 ] [ 4 ] desc =...
[ 0.2924266755580902, -0.01667439192533493, 1.0104254484176636, -0.11037924140691757, 0.18416577577590942, 0.28608378767967224, -0.08460886776447296, 0.2962956726551056, -0.8564745783805847, 1.290937900543213, 0.09614919871091843, 0.62775057554245, -0.9117157459259033, 0.9632561802864075, ...
def test _ invalid _ subgraph ( self, graph, monkeypatch ) : with monkeypatch. context ( ) as m : m. setattr ( utils, " is _ subgraph ", lambda v1, v2 : false ) with pytest. raises ( exception, match = " input is not a valid subgraph " ) : strawberryfields. gbs. dense. greedy _ degree ( subgraphs = [ [ 0, 9 ] ], graph ...
[ 0.4465543031692505, 1.176135540008545, 0.3582230806350708, 1.0920331478118896, 0.07100573927164078, 1.017028570175171, -0.020319534465670586, 0.2375023365020752, 0.5974772572517395, -0.24442866444587708, -0.7529271245002747, 0.5813032388687134, -0.36730507016181946, -0.641493022441864, -...
def putch ( self, * args ) : return _ snap. tsout _ putch ( self, * args )
[ 0.2755179703235626, 1.1731523275375366, 0.591078519821167, 0.15743885934352875, -0.20137284696102142, 0.5088690519332886, 1.6000083684921265, 0.8974788188934326, -0.9073466658592224, -0.01763053424656391, -0.4175138771533966, -0.6266623139381409, -0.27232709527015686, 0.345633864402771, ...
def validate _ client _ id ( self, client _ id, request, * args, * * kwargs ) : raise notimplementederror ('subclasses must implement this method.')
[ -0.30425775051116943, -0.8757997751235962, 0.42777585983276367, 0.13851764798164368, -0.19040045142173767, 1.2391170263290405, 0.3100395202636719, -0.7331410050392151, -0.11807446926832199, -0.2522238790988922, 0.3444880247116089, 0.7426342368125916, -0.2811797857284546, 0.7257852554321289...
def top ( self, mail _ num, lines _ shown = 0 ) : mes = f " top { mail _ num } { lines _ shown } " + crlf rep = self. send ( mes ) return rep
[ -0.6148842573165894, 0.27344611287117004, 0.5470654368400574, -0.786170482635498, -0.7043159008026123, -0.6559086441993713, -0.11102285236120224, -0.2114759385585785, 0.3839077949523926, -0.02447613887488842, 0.40688633918762207, 1.0781570672988892, -0.5164413452148438, -0.3698509335517883...
def addedge ( self, * args ) : return _ snap. tdirnet _ addedge ( self, * args )
[ -1.3396350145339966, 1.6532715559005737, 0.28452160954475403, 0.2750511169433594, 0.7401752471923828, 0.2994377613067627, 0.5816695094108582, -0.1562926024198532, -0.35343217849731445, -1.2266987562179565, 0.3230849802494049, -1.6616742610931396, -0.7954756617546082, 0.6580411195755005, ...
def api _ overview ( request ) : return response ( settings. api _ urls )
[ -1.1892447471618652, 0.2424350380897522, 0.285178542137146, -0.5772180557250977, -0.5065491199493408, -0.22591254115104675, -0.10309207439422607, 0.5174748301506042, -0.1250944882631302, 0.33785203099250793, -0.14084872603416443, -0.517398476600647, 0.33912670612335205, -0.6682541966438293...
def _ resolve _ job _ inputs ( self, entries : iterable [ union [ input, str, bool, int, float ] ], base _ path : str ) : for entry in entries : self. _ resolve _ job _ input ( entry, base _ path )
[ -0.7911392450332642, -0.21767021715641022, 0.27058783173561096, 0.8073779940605164, 0.8828312158584595, 0.07912267744541168, -0.45052433013916016, 0.1744060516357422, -1.442350149154663, -0.41270801424980164, 0.2134772688150406, -0.6125009059906006, -0.4776526093482971, 0.9677836298942566,...
def vgg13 _ bn _ imagenet ( pretrained = false, * * kwargs ) : model = vgg _ imagenet ( make _ layers ( cfg _ imagenet ['b'], batch _ norm = true ), * * kwargs ) if pretrained : model. load _ state _ dict ( model _ zoo. load _ url ( model _ urls ['vgg13 _ bn'] ) ) return model
[ -0.48156291246414185, 0.6697050333023071, 0.1827722042798996, 1.2302966117858887, 0.03407568112015724, -0.0012933955295011401, -0.11838369816541672, 0.09847810864448547, -0.004449943080544472, 0.49064165353775024, -0.08764474838972092, 0.2896413803100586, -0.7949129343032837, 0.13815443217...
def filterbylampelements ( self, lines, lampelements ) : if lampelements is none or len ( lampelements ) = = 0 : return lines keep = [ ] for component in sorted ( lampelements ) : if self. _ isspeciespattern. match ( component ) : # component is a species. perform a search for lines matching only this keep + = [ ll for...
[ 0.5052432417869568, -0.01397902425378561, 0.3487972915172577, 0.42485785484313965, -0.13101860880851746, 0.5251756906509399, -0.5419912338256836, 0.11779755353927612, 0.3529199957847595, -0.40578144788742065, 1.0842033624649048, 0.6793208122253418, -0.5953856110572815, 0.8507667183876038, ...
def getmodenetbyid ( self, * args ) : return _ snap. tmmnet _ getmodenetbyid ( self, * args )
[ 0.17182478308677673, 0.0701279565691948, 0.4708561897277832, 0.1461874395608902, 0.7910159230232239, -0.06518461555242538, 0.28473296761512756, -0.9193799495697021, 0.02276916615664959, 0.05794727802276611, -0.04525544121861458, -0.5426079630851746, -0.9144368767738342, 0.7977569699287415,...
def get _ auto _ state ( * args ) : return _ ida _ auto. get _ auto _ state ( * args )
[ -0.32744187116622925, 0.36114388704299927, 0.1854037493467331, 1.0726972818374634, -0.0600404217839241, -1.2077149152755737, 1.1186655759811401, -0.2890564501285553, -0.8541048765182495, -0.9025692939758301, -0.9302250742912292, 0.527658224105835, -0.43473726511001587, -0.5733758807182312,...
def fitness _ from _ genes ( full _ gene _ list, patient _ matrix, fitness _ function, test _ genes ) : individual = [ ] # fitness evaluation is done by index for speed, so first get each index for gene in test _ genes : try : idx = full _ gene _ list. index ( gene ) individual. append ( idx ) except valueerror : print...
[ 1.0536696910858154, -0.5675446391105652, 0.406103253364563, 0.6685516834259033, -0.1892891824245453, -0.3732673227787018, 0.6321133971214294, 1.2028496265411377, -0.3634093999862671, -0.03506516292691231, 0.11944105476140976, 0.9568297266960144, 0.13277116417884827, 0.1908314824104309, 0...
def append _ gate ( self, kind = none, qid = none, para = none, c = none, ctrl = none, tag = none ) : # kind must be int if isinstance ( kind, int ) is not true : raise typeerror ( " kind must be int. " ) # qid must be list of int if isinstance ( qid, list ) is not true : raise typeerror ( " qid must be list. " ) for q...
[ 0.3597975969314575, -0.10049296170473099, 0.8552811145782471, 0.09805618971586227, 0.09815562516450882, 0.46892526745796204, -0.037332355976104736, -0.6597622036933899, -0.1767847090959549, 0.5258691906929016, -0.21879491209983826, 0.24398571252822876, -1.2137690782546997, 1.20208287239074...
def test _ removing _ event _ that _ doest _ exist ( ) : before _ count = bus. event _ count try : bus. remove _ event ( event = event _ name, func _ name ='hello') except eventdoesntexist : assert before _ count = = bus. event _ count
[ 0.26389509439468384, 0.10586122423410416, 0.5133834481239319, 0.884282112121582, 1.0076426267623901, 0.37884941697120667, 0.49345478415489197, 1.2114453315734863, -0.006865846458822489, -0.18178562819957733, -0.924479067325592, -0.42271772027015686, -0.7798286080360413, 0.32725682854652405...
def _ updatepath ( self, link, path ) : raise notimplementederror
[ -1.125755786895752, -1.3583786487579346, 0.3149363100528717, 0.10573248565196991, -0.302206814289093, 0.3819102346897125, 0.3946104645729065, 0.24886584281921387, 0.018481623381376266, -0.03177822753787041, 0.38309866189956665, 0.14009271562099457, -0.23343510925769806, -0.3604013323783874...
def _ filter _ fn ( item ) : message _ text = item [ 0 ] # message _ categories = item [ 1 ] min _ length = 3 if len ( message _ text ) < min _ length : # remove these return false else : return true
[ 0.08698063343763351, 0.28903254866600037, 0.4990538954734802, -0.0570358969271183, -0.5121382474899292, 0.3405969738960266, -0.2782219350337982, -0.20277465879917145, -0.2558072507381439, 0.31825119256973267, -0.659079909324646, -0.4055463671684265, -0.8573504686355591, -0.6440436244010925...
def getbf ( self, * args ) : return _ snap. tstrin _ getbf ( self, * args )
[ -0.02037729136645794, 0.645698070526123, 0.5782095789909363, 0.8192759156227112, 2.247943639755249, -0.41400983929634094, 0.4930647313594818, -0.045718539506196976, -0.878747284412384, -1.1469323635101318, -0.5924032926559448, 0.4679414927959442, -0.9813194274902344, 0.26224711537361145, ...
def fastprint ( text, show _ prefix = false, end = " ", flush = true ) : return puts ( text = text, show _ prefix = show _ prefix, end = end, flush = flush )
[ 1.0393953323364258, 0.2962520718574524, 0.505702555179596, -0.5345545411109924, -1.2892723083496094, -0.6100755333900452, -0.08633245527744293, 0.14211054146289825, 0.2037617564201355, -0.26814112067222595, 0.6975737810134888, 1.0283043384552002, 0.18098734319210052, 0.24113605916500092, ...
def information _ gain ( self, parent _ node, children _ tuples ) : parent _ indexes = parent _ node. get _ indexes ( ) total _ entropy = parent _ node. get _ entropy ( self. labels [ parent _ indexes ] ) children _ entropy = 0 for t in children _ tuples : child = t [ 0 ] indexes = child. get _ indexes ( ) entropy = ch...
[ -0.888775646686554, 0.38069188594818115, 0.5610729455947876, -1.456403136253357, 0.8662445545196533, 0.272490531206131, 0.5177629590034485, 0.36617419123649597, -1.3768043518066406, 0.36231279373168945, -0.017773063853383064, -0.19605188071727753, -0.2055983543395996, -0.8662788271903992, ...
def test _ atomic _ any _ uri _ max _ length _ 2 _ nistxml _ sv _ iv _ atomic _ any _ uri _ max _ length _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - maxlength - 3. xsd ", instance = " nistdata...
[ 0.22536933422088623, -0.12861208617687225, 0.43843117356300354, 0.9266588687896729, -0.458085298538208, 0.27680087089538574, -0.503425657749176, 0.10582418739795685, 0.04528895393013954, 0.2138834148645401, -0.1859811544418335, -0.12542228400707245, -0.15481887757778168, 0.0074967099353671...
def getuint64 ( self, * args ) : return _ snap. tstr _ getuint64 ( self, * args )
[ -0.8478408455848694, 0.8789776563644409, 0.3124072253704071, 0.5517847537994385, 1.9002183675765991, -0.6078055500984192, 0.18782468140125275, -0.13391953706741333, -0.8283756375312805, -0.736966073513031, 0.017617706209421158, -1.2638987302780151, 0.04902809113264084, 0.1946239471435547, ...
def test _ processs _ id _ put ( self ) : pass
[ -0.29564645886421204, -0.8336820602416992, 0.24208566546440125, -0.6519765257835388, 0.1833735853433609, 0.4705636203289032, 0.5391054749488831, -0.21670746803283691, 0.7297704815864563, -0.5721836090087891, -1.0395722389221191, 0.32264190912246704, -1.0718563795089722, -1.1083159446716309...
def _ filter _ events _ to _ update ( self ) : def filter _ updated ( event _ tuple ) : new, old = event _ tuple return dateutil. parser. parse ( new ['updated'] ) > dateutil. parser. parse ( old ['updated'] ) self. to _ update = list ( filter ( filter _ updated, self. to _ update ) )
[ -1.4511734247207642, -0.7090886235237122, 0.5962426662445068, 0.11939065158367157, -0.243305504322052, 0.039993032813072205, -0.6198002099990845, 0.3670494854450226, -0.2023579180240631, 0.7261404991149902, -0.19216175377368927, 0.4805225133895874, 0.6681722402572632, -0.5602222681045532, ...
def delete _ all _ excluding ( notebook : wx. notebook, exclusion _ list : list ) : if exclusion _ list : l _ index = [ ] n _ pages = notebook. getpagecount ( ) for i in range ( n _ pages ) : if notebook. getpagetext ( i ) not in exclusion _ list : l _ index. append ( i ) # gather index of pages to delete l _ index. so...
[ 0.7214589715003967, 0.20118817687034607, 0.6149028539657593, 1.2087196111679077, -0.692306399345398, 1.0130820274353027, -0.7093036770820618, 1.073570728302002, 1.3518116474151611, 0.47241806983947754, -0.2907203733921051, 0.011462220922112465, -0.7718366980552673, 0.6342516541481018, 0....
def test _ archive _ module _ source ( self ) : # it first needs to be able to create the class otherwise will not be # able to do anything else archive = modulesource. create ( " archive " ) self. assertnotequal ( archive, none ) self. assertequal ( archive. name ( ), " archive " ) # verifies if the system has the rig...
[ 0.06424355506896973, -0.6227478384971619, 0.5300111770629883, -0.17840342223644257, 0.7417386770248413, 0.6274306178092957, 0.23358780145645142, 0.4998738467693329, 0.246743842959404, -0.18371666967868805, -0.5274840593338013, 0.18791267275810242, 0.2950560450553894, 0.9753396511077881, ...
def purecloud _ voice ( self, purecloud _ voice ) : self. _ purecloud _ voice = purecloud _ voice
[ -0.7534735798835754, -0.4597158432006836, 0.29675376415252686, 0.8100757598876953, 0.05885045602917671, 1.3447823524475098, -0.5391477346420288, 0.4374241530895233, -0.718200147151947, -0.21015027165412903, -0.6436842679977417, -0.8157874941825867, 0.37086695432662964, 0.41788536310195923,...