text
stringlengths
25
2.19k
embedding
listlengths
768
768
def create _ momentum _ op ( loss, alpha, beta1 ) : optimize = tf. train. momentumoptimizer ( alpha, beta1 ) return optimize. minimize ( loss )
[ 0.5871577858924866, -1.0661762952804565, 0.5096432566642761, 0.38493719696998596, 0.013782333582639694, 0.08238280564546585, 0.1476382613182068, 0.24439387023448944, -0.8118255734443665, 0.2009519636631012, 0.26804935932159424, -0.6125106811523438, -0.037184037268161774, -0.308664977550506...
def tile _ image _ from _ file ( path, bands = none ) : try : if path [ - 3 : ] = = " png " : return np. array ( image. open ( os. path. expanduser ( path ) ). convert ( " rgb " ) ) raster = rasterio _ open ( os. path. expanduser ( path ) ) except : return none image = none for i in raster. indexes if bands is none els...
[ 0.2611609697341919, -0.13361598551273346, 0.6158857345581055, 0.08313983678817749, -0.08835111558437347, 0.9233829975128174, 0.5238827466964722, -0.9224894642829895, -0.7157983183860779, -0.07162211835384369, 0.5712450742721558, 0.06054266542196274, 0.27421969175338745, 0.13987188041210175...
def delete ( self, path ) : return self. request ('delete ', path )
[ -0.2990075647830963, 0.046546176075935364, 0.25279441475868225, 0.9328767657279968, 0.5318643450737, -0.009022140875458717, -0.191360741853714, -0.447848379611969, 0.5480368733406067, -0.32865938544273376, 0.10681186616420746, 0.368208646774292, -1.371448278427124, -0.6403437852859497, -...
def deleteperson ( ) : try : delete _ window = tk ( ) delete _ window. title ( " delete " ) delete _ window. geometry ( " 300x400 " ) combo = combobox ( delete _ window ) combo. grid ( column = 0, row = 0 ) combovalues = tuple ( known _ face _ names ) combo ['values'] = combovalues combo. current ( 0 ) def delete _ pe ...
[ -0.1093849390745163, -0.12924832105636597, 0.9041523337364197, 0.16234081983566284, -0.21992963552474976, 0.23129089176654816, 1.1863009929656982, 0.792664110660553, -0.09858749061822891, -0.27383947372436523, -0.15115465223789215, -0.11853934824466705, -0.0014767787652090192, 1.2526228427...
def assert _ account _ exists ( self, account _ number : str ) : if account _ number not in self. accounts : raise exception ( f " account { account _ number } does not exist " ) else : return true
[ 0.05994490906596184, 0.34449440240859985, 0.4176822304725647, 0.03229023143649101, 1.131976842880249, 0.8656257390975952, 0.6041547656059265, 0.6446560621261597, 1.0159475803375244, -0.49085429310798645, 0.4585626423358917, 0.2906681299209595, -0.11891502887010574, 0.5617826581001282, -0...
def user _ load ( user _ id ) : try : user = usermodel. query. get ( user _ id ) return user except exception as err : print ( err ) return none
[ 0.14471662044525146, 0.12636396288871765, 0.4368169903755188, 0.25612884759902954, -0.03884567692875862, 0.0867445096373558, -0.2137308418750763, -0.9214310050010681, 0.1472354233264923, -0.1749577820301056, 0.08614297956228256, 0.04056622460484505, -0.3131001591682434, -0.4530837833881378...
def testgettaginstancewithboolvalue ( self ) : result = tagapi ( self. user ). create ( [ ( u'username / tag ', u'description') ] ) [ ( objectid, path ) ] = result tagvalueapi ( self. user ). set ( { objectid : { u'username / tag': false } } ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact...
[ -0.400867223739624, 0.45155370235443115, 0.35309019684791565, 0.13264219462871552, 0.37866416573524475, 1.1525975465774536, 0.019680200144648552, -0.38987624645233154, -1.0000008344650269, -0.3818056583404541, -0.630834698677063, -0.3419283330440521, -0.274983674287796, 0.38208529353141785...
def process _ arg ( self, arg, parent = none ) : if not arg : return none ( ) if py3 : arg. name = arg. arg elif isinstance ( arg, str ) : old, arg = arg, ast _ copy ( ast. name ( arg, l ( ) ), parent ) arg. name = old else : arg. name = pyposast. extract _ code ( self. lcode, arg ). strip ('( )') id _ = self. create _...
[ -0.770440399646759, -0.6547290682792664, 0.6800509095191956, -0.9508142471313477, -0.6324309706687927, -0.1806291788816452, 0.20786194503307343, 0.5283935070037842, 1.1032389402389526, 0.32619065046310425, -0.26745709776878357, -0.22877080738544464, 0.3985404074192047, 0.2813987731933594, ...
def _ load _ py _ tests ( self ) : self. _ compiled _ py = dict ( ) test _ files = os. path. join ( self. project. tests _ dir, " test _ *. py " ) for pyfile in glob. glob ( test _ files ) : tf _ name = os. path. basename ( pyfile ) with open ( pyfile ) as codestr : try : compiled _ code = compile ( codestr. read ( ),'...
[ -0.23226216435432434, -0.4641522765159607, 0.6767744421958923, -0.045886214822530746, 0.7107625007629395, 0.026207106187939644, 1.0180633068084717, -0.16663551330566406, -1.0755910873413086, -0.36174577474594116, -1.0235655307769775, -0.32712244987487793, 0.06842094659805298, 0.52212369441...
def get _ logger ( ) : configure _ logger ( false, none ) return logging. getlogger ( " aliplotlogger " )
[ 0.5383557081222534, 0.4956517815589905, 0.08080678433179855, -0.03828055039048195, -0.13813260197639465, -0.6104637384414673, -0.10529597103595734, 0.4921548068523407, 0.13611359894275665, -0.7995709776878357, 0.49353882670402527, 0.26523351669311523, -0.20078550279140472, 0.49951666593551...
def clear _ list _ value ( self, value ) : # don't go any further : this value is empty. if not value : return self. empty _ value # clean empty items if wanted if self. clean _ empty : value = [ v for v in value if v ] return value or self. empty _ value
[ -0.6071354746818542, 0.23670580983161926, 0.6663503050804138, 0.3149729371070862, -0.30037978291511536, 0.14713503420352936, -0.7815361618995667, -0.21434254944324493, 0.5991349220275879, 0.17457830905914307, -0.635523796081543, 0.3609304428100586, 0.1635027378797531, 0.9207042455673218, ...
def rvar ( self, shape = ( 1, ), name = none ) : new _ var = self. sup _ model. dvar ( shape,'c ', name ) return new _ var
[ -0.3670278787612915, 0.4688933193683624, 0.4475362002849579, -0.4870259463787079, -1.13315749168396, 0.3128863573074341, -0.11490290611982346, -0.20026063919067383, -0.9373523592948914, 0.01858953945338726, -1.3803828954696655, 1.2734302282333374, -0.14116473495960236, -0.36000654101371765...
def issilent ( self ) : return mxs. getquietmode ( )
[ -0.03890259563922882, 0.06126292049884796, 0.4709511399269104, 0.26797357201576233, 0.4979189932346344, -0.009036185219883919, 0.0423409678041935, -1.0250616073608398, 0.44340112805366516, -0.5627965331077576, -1.6668270826339722, 0.40395793318748474, -0.8862156271934509, -0.44262123107910...
async def _ load _ ra3 _ station _ device ( self, control _ station _ area _ name, control _ station _ name, device _ json ) : device _ id = id _ from _ href ( device _ json [ " device " ] [ " href " ] ) device _ type = device _ json [ " device " ] [ " devicetype " ] # ignore non - button devices if device _ type not i...
[ -0.7847489714622498, -0.08761560171842575, 0.7053463459014893, -0.15745003521442413, 0.161736398935318, 0.3013722598552704, 0.09968222677707672, -0.20658865571022034, 0.6712133288383484, 0.07414363324642181, -0.535628616809845, -0.25574031472206116, -0.07693545520305634, -0.012611059471964...
def is _ prime ( number ) : if number > 1 : for element in range ( 2, int ( math. sqrt ( number ) ) ) : if number % element = = 0 : return false return true
[ -1.2205510139465332, 0.8361168503761292, 0.3546257019042969, 0.8782948851585388, 0.06696002930402756, 0.08404707908630371, -0.8786522150039673, 0.11394964903593063, 1.6260199546813965, -0.2594201862812042, 0.13030634820461273, -0.8299470543861389, -1.150959849357605, 0.6360907554626465, ...
def parseformula ( self, formula ) : regex = f " ( {'| '. join ( self. naturalabundancedistributions. keys ( ) ) } ) ( [ 0 - 9 ] { { 0, } } ) " elementdict = dict ( ( element, 0 ) for element in self. naturalabundancedistributions. keys ( ) ) for element, n in re. findall ( regex, formula ) : if n : elementdict [ eleme...
[ -0.34139636158943176, 0.31138288974761963, 0.5530716776847839, -0.6567724943161011, 0.008429947309195995, -0.6157354712486267, 0.9773046374320984, 0.44921445846557617, -0.26853057742118835, -0.6746411323547363, -0.20605164766311646, -0.3691021502017975, 0.7616672515869141, 1.06507015228271...
def nested _ cv ( x, y, inner _ cv, outer _ cv, dnn, param _ grid, tr _ batch _ size = 1, tr _ epochs = 10 ) : train _ history = [ ] all _ best _ params = [ ] all _ test _ loss = [ ] all _ test _ metric = [ ] # for each split of the data in the outer cross - validation # ( split method returns indices of training and t...
[ -0.34149178862571716, 0.30285021662712097, 1.0270330905914307, 0.5554108023643494, 0.5577179193496704, -0.5444211959838867, 0.019334927201271057, 0.4297075569629669, -0.9291936159133911, -0.1841447651386261, -0.28995561599731445, 0.5974792242050171, 0.5390504598617554, 0.01595875434577465,...
def findmethodbyname ( self, * args, * * kwargs ) : # real signature unknown pass
[ -0.22845473885536194, -0.38210412859916687, 0.5022697448730469, 0.6558594107627869, -0.10729384422302246, -0.7799938917160034, 0.4536427855491638, -1.5514003038406372, -0.7925996780395508, 0.11748971045017242, -0.3907928466796875, -0.33726245164871216, -0.8104007244110107, 1.16422855854034...
def user _ data ( self, access _ token, * args, * * kwargs ) : url = f " https : / / { self. slug }. nationbuilder. com / api / v1 / people / me " return self. get _ json ( url, params = { " access _ token " : access _ token } ) [ " person " ]
[ -0.5981821417808533, -0.2854439616203308, 0.5083410143852234, -0.19204814732074738, -0.4173835515975952, 0.35926395654678345, -1.6133183240890503, -0.3196937143802643, -0.2620655596256256, -0.9203689098358154, -0.11125446856021881, 0.37318798899650574, -0.19244053959846497, -0.278495252132...
def test _ split _ horizontal _ vertical ( self ) : geod = self. srv _ metric _ r3. geodesic ( initial _ curve = self. curve _ a, end _ curve = self. curve _ b ) geod = geod ( self. times ) tangent _ vec = self. n _ discretized _ curves * ( geod [ 1, :, : ] - geod [ 0, :, : ] ) ( tangent _ vec _ hor, tangent _ vec _ ve...
[ 0.2640148997306824, 0.3536547124385834, 0.7482081651687622, 0.046010300517082214, 0.7261632680892944, 0.49842390418052673, 0.5412949323654175, -1.0304557085037231, -0.576880693435669, 0.050316497683525085, -0.2631162106990814, -0.12868481874465942, -0.3805311322212219, -0.4322238564491272,...
def allowed _ file ( filename : str, file _ extensions = allowed _ excel _ file _ extensions ) - > bool : return '.'in filename and filename. rsplit ( '. ', 1 ) [ 1 ]. lower ( ) in file _ extensions
[ 0.9554013609886169, 0.0554531030356884, 0.5099420547485352, 0.6534193754196167, -1.1261200904846191, 0.9191738963127136, -0.4894033968448639, 0.7746960520744324, -0.7939125895500183, 0.07089892029762268, 0.900118887424469, 0.7143380045890808, -0.4770715832710266, -0.6429399847984314, -0....
def tel _ dome _ sync ( self, side _ port _ group _ 1, side _ port _ group _ 2, side _ port _ group _ 3, side _ port _ group _ 4, telescope _ state, slit _ state, flap _ state, mirror _ cover _ state, who _ did _ it _ tel, who _ did _ it _ sp ) : self. side _ port _ group _ 1 = side _ port _ group _ 1 self. side _ port...
[ -0.3742680847644806, -0.23545202612876892, 0.8052516579627991, -0.32864701747894287, -0.525196373462677, 0.35942497849464417, 0.42496463656425476, -0.7341414093971252, -0.30938833951950073, 0.9994990229606628, 0.11336468160152435, 0.3997875154018402, -0.2740832269191742, 0.2300770431756973...
def global _ accelerator _ shodan _ check ( cache : dict, session, awsaccountid : str, awsregion : str, awspartition : str ) - > dict : shodanapikey = get _ shodan _ api _ key ( cache ) # iso time iso8601time = datetime. datetime. now ( datetime. timezone. utc ). isoformat ( ) for accel in list _ gax _ accelerators ( c...
[ 0.09234056621789932, -0.4662684202194214, 0.6212152242660522, -0.026528039947152138, 0.11412966996431351, -0.02678067795932293, 0.4128572642803192, -0.17573809623718262, 0.5883135795593262, 0.45288515090942383, -0.18715126812458038, 0.8767555356025696, 0.04289320483803749, 0.28863662481307...
def is _ cutter _ in _ field ( self, cutter ) : # calculate the intersection of the cutter and field shapes intersection = self. field _ shape. intersection ( cutter ) # calculate the ratio of the intersection's area to the cutter's area area _ ratio = intersection. area / cutter. area # if the ratio is not 1. 0 then p...
[ -0.3780781924724579, 0.23333853483200073, 0.574684739112854, -0.5059149861335754, -0.8606438636779785, 0.5172226428985596, 0.03488850221037865, -0.046614132821559906, -0.12049773335456848, 0.18186049163341522, -0.03655007481575012, -0.45043933391571045, -0.46161067485809326, 0.198293745517...
def tuple _ two _ positive _ integers ( string ) : list _ strings = string. split ( ',') if len ( list _ strings )! = 2 : raise argparse. argumenttypeerror ('" { } " does not contain two parts separated by a comma. '. format ( string ) ) if not list _ strings [ 0 ] and not list _ strings [ 1 ] : return ( ) try : tuple ...
[ -0.8655445575714111, -0.8196568489074707, 0.6845039129257202, 0.1693165898323059, 0.20846767723560333, 0.5480234026908875, -0.6889726519584656, 0.18744394183158875, -1.0136104822158813, 0.4585619866847992, 0.33277925848960876, -0.5267429947853088, -0.7357797026634216, 0.052927855402231216,...
def start _ blockchains ( prefab, node _ name ) : # a bit unrelated but make sure that curl is installed prefab. core. run ('apt - get update ; apt - get install - y curl ', die = false, showout = false ) print ( " starting tfchaind daemon on { } ". format ( node _ name ) ) tfchaind _ cmd ='tfchaind - - network testnet...
[ 0.6761727333068848, -0.03905847668647766, 0.4745274782180786, -0.12162741273641586, 1.3499270677566528, -0.21353015303611755, 0.5062716007232666, -0.34737762808799744, -0.197044238448143, 0.18849562108516693, -0.4329144060611725, 0.5481544137001038, 0.0925409346818924, 0.7890028357505798, ...
def testsettaginstancewithnonevalue ( self ) : tagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) tag = gettags ( paths = [ u'username / bar'] ). one ( ) objectid = uuid4 ( ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : thriftvalue = createthriftva...
[ -0.38614195585250854, 0.4251925051212311, 0.3693605363368988, -0.5435352325439453, 0.3294934630393982, 0.5558451414108276, 0.033699989318847656, -0.4945421814918518, -0.4181406795978546, -0.5073165893554688, -0.6591928005218506, -0.14328955113887787, -0.1460212916135788, 0.8277426362037659...
def lr _ schedule ( epoch ) : learning _ rate = 0. 001 if epoch > 20 : learning _ rate = 0. 0001 if epoch > 70 : learning _ rate = 0. 00001 tf. summary. scalar ('learning rate ', data = learning _ rate, step = epoch ) return learning _ rate
[ 0.16637800633907318, -0.029903298243880272, 0.39848843216896057, -1.4621623754501343, -0.41069692373275757, -0.39078637957572937, -0.8320595622062683, 0.21289411187171936, -0.5891714692115784, 0.42486920952796936, 0.22855675220489502, 0.12482646107673645, 0.7906091213226318, 0.126525133848...
async def test _ form _ other _ error ( hass ) : result = await hass. config _ entries. flow. async _ init ( domain, context = { " source " : config _ entries. source _ user } ) mocked _ ayla = _ create _ mocked _ ayla ( connect = typeerror ) with patch ( " homeassistant. components. sharkiq. config _ flow. get _ ayla ...
[ -0.4729098379611969, -0.06708011776208878, 0.4175257980823517, 0.0614105761051178, 1.16680109500885, -0.05721808597445488, -0.11247839033603668, -0.3561669588088989, 0.5112743973731995, -0.49608364701271057, -0.6676087379455566, 0.1820351928472519, 0.3345455527305603, 0.7368006706237793, ...
def bounding _ box ( data ) : left, right, top, bot = data [ 0 ] [ 0 ], data [ 0 ] [ 0 ], data [ 0 ] [ 1 ], data [ 0 ] [ 1 ] for point in data : if left > point [ 0 ] : left = point [ 0 ] if right < point [ 0 ] : right = point [ 0 ] if top > point [ 1 ] : top = point [ 1 ] if bot < point [ 1 ] : bot = point [ 1 ] retur...
[ -0.614158570766449, -0.040051691234111786, 0.9573467969894409, 0.028278177604079247, 0.5180745720863342, 0.42253774404525757, -0.205779567360878, -0.6893681883811951, -0.029175879433751106, 0.01877344213426113, -0.9550399780273438, -0.3415747582912445, -0.2408963292837143, 0.46106317639350...
def unwrapped ( self ) : return self
[ 0.14334064722061157, -1.209318995475769, 0.47976234555244446, -0.635691225528717, -0.5363264679908752, 0.8067695498466492, 0.8107956051826477, -0.43391475081443787, 0.8116865754127502, -1.2783253192901611, 0.018068641424179077, 1.0360560417175293, 0.01965949684381485, -0.507277250289917, ...
def get ( resource _ name : str, id : pulumi. input [ str ], opts : optional [ pulumi. resourceoptions ] = none, filters : optional [ pulumi. input [ sequence [ pulumi. input [ pulumi. inputtype ['networkpacketcapturefilterargs'] ] ] ] ] = none, maximum _ bytes _ per _ packet : optional [ pulumi. input [ int ] ] = none...
[ -0.3676244914531708, 0.06466057896614075, 0.40311190485954285, -0.19084259867668152, -0.9738727807998657, -0.21396829187870026, -1.147144079208374, -0.942145586013794, 1.1059271097183228, 0.026265697553753853, -1.0529199838638306, -0.108522929251194, 0.18668635189533234, 0.2688887715339660...
def _ _ source _ cleanup ( self ) : output _ file _ full _ path = " % s / % s. % s " % ( self. archivation _ path, self. file _ to _ archive. split ( " / " ) [ - 1 ], self. archiving _ methods _ dictionary [ self. archiving _ method ] ) filename _ to _ move = " % s. % s " % ( self. file _ to _ archive, self. archiving ...
[ -0.4558870494365692, 0.1253582090139389, 0.8670177459716797, -0.27724435925483704, -0.10229162126779556, -0.06636890769004822, 0.8981212377548218, 0.2902021110057831, -0.6343089938163757, 0.36566805839538574, 0.044305600225925446, -0.037539251148700714, 0.19609132409095764, -0.214594766497...
async def voices ( self ) - > voicesiterable : available _ voices : typing. set [ str ] = set ( ) try : proc = await asyncio. create _ subprocess _ exec ( " festival ", stdin = asyncio. subprocess. pipe, stdout = asyncio. subprocess. pipe, ) list _ command = " ( print ( voice. list ) ) " proc _ stdout, _ = await proc. ...
[ -0.36258208751678467, -0.556675136089325, 0.49178436398506165, 0.4768269956111908, 0.362678200006485, -0.2744835615158081, -1.29010808467865, -0.5946531295776367, -0.743866503238678, 0.4152991771697998, 0.8560783267021179, 0.18764960765838623, 0.29578202962875366, 1.036420226097107, -0.2...
def export _ rectified _ boxes ( image _ path, rectified _ quads, output _ dir : str = " output / " ) : # get file name file _ name, file _ ext = os. path. splitext ( os. path. basename ( image _ path ) ) # create crops dir crops _ dir = os. path. join ( output _ dir, file _ name + " _ crops " ) create _ dir ( crops _ ...
[ -0.4382261633872986, -0.47333061695098877, 0.7175175547599792, 0.95616215467453, -0.2438475340604782, -0.3765871226787567, 0.3481391370296478, -1.3270622491836548, 0.5164942145347595, 1.1159460544586182, -1.01193368434906, -0.05754908174276352, 0.4746342897415161, -0.25435930490493774, -...
def electrons _ plus _ power _ law ( energy, power _ law _ alpha = 2, power _ law _ normalisation = 1e - 10, power _ law _ decorrelation _ energy = 10., * * kwargs ) : # add a power - law component to the hess function, its index and flux at 10 tev return hess _ electron _ spectrum ( energy, * * kwargs ) + \ power _ la...
[ 0.4206474721431732, -0.4416324496269226, 0.7632313370704651, -0.6327857375144958, 0.4528094530105591, 0.5255836248397827, -1.432909607887268, 1.0312503576278687, -0.10378342121839523, 0.5350736379623413, 1.0700106620788574, 0.28158947825431824, 0.4256284534931183, 0.7081542611122131, 0.9...
async def execute _ device _ command ( self, request : smart _ device _ management _ service. executedevicecommandrequest = none, *, retry : retries. retry = gapic _ v1. method. default, timeout : float = none, metadata : sequence [ tuple [ str, str ] ] = ( ), ) - > smart _ device _ management _ service. executedevicec...
[ -1.8784633874893188, 0.3003256022930145, 0.7180472612380981, 0.6217318773269653, 0.9971038699150085, 0.18348444998264313, -0.0008370975265279412, -0.9105972647666931, 0.4358600378036499, -0.23164984583854675, 0.2605409324169159, 0.9803717136383057, -0.2927117347717285, -0.48035091161727905...
def _ _ init _ _ ( self, v1, v2 ) : iter _ 1 = iterator ( v1 ) iter _ 2 = iterator ( v2 ) self. queue = collections. deque ( [ ] ) if iter _ 1. has _ next ( ) : self. queue. append ( iter _ 1 ) if iter _ 2. has _ next ( ) : self. queue. append ( iter _ 2 )
[ -0.04118914529681206, -0.9056668281555176, 0.7238931655883789, -0.13865995407104492, -0.12795978784561157, -0.7188488245010376, -0.9623133540153503, -0.3654050827026367, -0.5936694145202637, 1.0740176439285278, -0.11804710328578949, 1.0362827777862549, -0.3581632971763611, 0.56861627101898...
def get _ entity _ type _ by _ id ( self, id _ : entitytypeid ) : return self. _ db _ inst. get _ entity _ type _ by _ id ( id _ )
[ -0.509615421295166, -0.28240853548049927, 0.07579751312732697, -0.4149898290634155, 0.740125834941864, -0.4892284572124481, 0.15893292427062988, -1.0143905878067017, -0.04852231219410896, 0.37315797805786133, -0.30133265256881714, -0.09481829404830933, -0.13875243067741394, 0.9007115960121...
def test _ logon _ robot _ controller _ default _ correct ( self ) : is _ logged _ in, _ = user _ auth. logon _ robot _ controller _ default ( self. controller ) self. asserttrue ( is _ logged _ in )
[ 0.13281582295894623, -0.42974963784217834, 0.22582131624221802, 1.0460584163665771, 1.4298205375671387, 0.31654754281044006, 0.012734456919133663, -0.012100717052817345, 0.24680113792419434, -0.6627875566482544, -1.1468138694763184, 0.2483411729335785, 0.09051600098609924, -0.5701075196266...
def load _ tests ( loader, tests, ignore ) : tests. addtests ( doctest. doctestsuite ( sdsupply, optionflags = doctest. ellipsis ) ) tests. addtests ( doctest. doctestsuite ( smartsmolfilter, optionflags = doctest. ellipsis ) ) tests. addtests ( doctest. doctestsuite ( smartsremover, optionflags = doctest. ellipsis ) )...
[ 0.17288769781589508, 0.6620265245437622, 0.8992330431938171, -0.02168048731982708, -0.0855664387345314, 0.6567394137382507, -0.46590062975883484, -0.8836849927902222, 1.4801915884017944, -0.35234108567237854, -0.08075272291898727, -0.6052395701408386, -0.33604365587234497, 0.40454268455505...
def _ convert _ to _ list ( self, data ) : if isinstance ( data, np. ndarray ) : return data. tolist ( ) elif isinstance ( data, pd. dataframe ) : return data. values. tolist ( ) else : # doesn't handle sparse or string right now return data
[ -0.56732577085495, -0.25745445489883423, 0.5925998687744141, -0.1849098652601242, 0.5325055122375488, -0.06457618623971939, -1.0126460790634155, -0.003635843051597476, 1.2002649307250977, 0.251312255859375, 0.13285678625106812, 0.5838918089866638, -0.1712140142917633, 0.3182194232940674, ...
def filter _ lines ( in _ filename, out _ filename ) : eliteflag = " elite " noteliteflag = " notelite " with open ( in _ filename,'ru') as in _ f, open ( out _ filename,'wb') as out _ f : datareader = csv. reader ( in _ f ) datawriter = csv. writer ( out _ f ) prev _ line = [ ] # initiate as empty string count = 0 for...
[ 0.18913757801055908, -0.7117980718612671, 0.6521215438842773, 0.26676592230796814, 0.31569036841392517, 0.32418984174728394, 0.12056219577789307, 0.5155229568481445, -0.651088297367096, 0.1565868854522705, 0.5367881059646606, 0.9862326383590698, -0.45754900574684143, -0.43920662999153137, ...
def testluminositydistance ( self ) : h0 = 73. 0 for om0 in numpy. arange ( start = 0. 15, stop = 0. 56, step = 0. 2 ) : for ok0 in numpy. arange ( start = - 0. 1, stop = 0. 11, step = 0. 2 ) : for w0 in numpy. arange ( start = - 1. 1, stop = - 0. 85, step = 0. 2 ) : for wa in numpy. arange ( start = - 0. 1, stop = 0. ...
[ 0.6086426973342896, -0.5130482316017151, 0.7032274603843689, 0.16589824855327606, -0.032997094094753265, 0.5463800430297852, 0.30892446637153625, 0.0633334293961525, 0.5308524370193481, -0.7671405076980591, -0.5168412923812866, -0.32948073744773865, -0.9554643034934998, 0.8306379318237305,...
def readfile ( filename ) : infile = open ( filename, " r " ) # open file for reading # use python's file read function to read the file contents filetext = infile. read ( ). splitlines ( ) # print ('number of lines in file : ', len ( filetext ) ) infile. close ( ) # close the file return filetext # the text of the fil...
[ -0.21955370903015137, -0.7038919925689697, 0.6938522458076477, -0.4477566182613373, -0.4688737094402313, 0.44712698459625244, 0.2088940292596817, 0.9461464881896973, -0.10389257967472076, 0.18297244608402252, 0.33386483788490295, -0.6887332201004028, -0.3861522972583771, -0.361400842666626...
def suite ( ) : utilstests. init ( ) suites = [ ] suites + = unittest. makesuite ( negativemeasurementtestcase ) return unittest. testsuite ( suites )
[ 0.36090901494026184, 0.12549486756324768, 0.4110223054885864, 0.3385802209377289, 1.0130504369735718, 0.8581979274749756, -0.17154280841350555, -0.2612869143486023, 0.868319571018219, -0.2639010548591614, 0.019071612507104874, -0.26332300901412964, -0.2629745900630951, 0.7160733938217163, ...
def get _ tag _ at _ line ( self, model, doc, linenumber ) : pass
[ -0.17235223948955536, -0.273384153842926, 0.2984304130077362, 0.29299038648605347, 1.0712125301361084, -0.06017622351646423, -0.22553524374961853, -0.8810849189758301, -1.4110090732574463, -0.5723519325256348, -0.8615406155586243, -0.3034360408782959, 0.3733247220516205, 0.3279045224189758...
def ask ( self, queries ) : self. query _ result = [ ] for query in queries : self. newclauses = [ ] query _ obj = sentence ( query ) self. queries. append ( query _ obj ) global start _ time start _ time = time. time ( ) idx = 1 path = [ ] ~ query _ obj. predicates [ 0 ] self. newclauses. append ( query _ obj ) indi _...
[ -0.514982283115387, 0.010950781404972076, 0.5678442716598511, 0.7306689620018005, 0.08907684683799744, -0.4688369631767273, -0.027596786618232727, -0.0773962065577507, -0.14340347051620483, 0.028550053015351295, 0.21159133315086365, -0.9350133538246155, -1.1642078161239624, 0.4359000027179...
def from _ fits ( cls, file _ path, quadrant _ letter ) : hdu = fits _ hdu _ from _ quadrant _ letter ( quadrant _ letter = quadrant _ letter ) array = array _ 2d _ util. numpy _ array _ 2d _ from _ fits ( file _ path = file _ path, hdu = hdu ) return cls. from _ ccd ( array _ electrons = array, quadrant _ letter = qua...
[ 0.6123618483543396, -1.2413711547851562, 0.4098223149776459, -0.7006580829620361, -0.31043320894241333, -0.12766513228416443, -1.0105860233306885, -0.15798884630203247, 0.2684043049812317, -0.9437476992607117, 0.40010079741477966, 1.6628644466400146, 0.5668966770172119, -0.1965558230876922...
def popen ( commands ) : if _ not _ unix : # inefficient, use shell to pipe everything return os _ popen ( build _ command ( commands ) ) else : # efficient, but works only on linux / macos, unix derivatives r _ out, w _ out = pipe ( ) status = spawn ( commands, w _ out ) close ( w _ out ) return fdopen ( r _ out,'r')
[ -0.2566717863082886, -0.15477949380874634, 0.674272358417511, 1.3218741416931152, -0.05949567258358002, -0.36489397287368774, -0.21161504089832306, 0.3411750793457031, -0.2798759639263153, -1.2549432516098022, 0.2585875988006592, -0.6020602583885193, 0.8528539538383484, -0.1779757589101791...
def _ _ str _ _ ( self ) : return f'{ self. nameandmodel } '
[ -0.5293624997138977, -2.070558786392212, 0.4283963143825531, -1.1971211433410645, -0.8090510964393616, 1.2398892641067505, -0.3675902783870697, -0.40769511461257935, 0.08303503692150116, -0.0821959376335144, 0.07900359481573105, 0.44002407789230347, 0.48260781168937683, 0.3573467433452606,...
def rundays ( self, total = 0 ) : if total < 1 : while true : self. beginday ( ) else : for x in range ( 0, total ) : self. beginday ( )
[ -0.9562435150146484, 0.501807451248169, 0.6186648607254028, 0.14119353890419006, 0.20739221572875977, 0.4546773135662079, 0.6659861207008362, -0.6922522187232971, 0.24341854453086853, -0.5823838710784912, 0.46388617157936096, 0.2165476679801941, -0.6665065288543701, 0.3485952615737915, -...
def dequeue ( self ) - > bool : if self. isempty ( ) : return false else : self. head = ( self. head + 1 ) % self. capacity return true
[ -0.5690279006958008, 0.5271541476249695, 0.9668349623680115, -0.08839219063520432, 0.16792511940002441, -0.14743632078170776, 0.22604669630527496, 0.05237869173288345, -0.18389850854873657, -0.3123721480369568, -0.5561937093734741, -0.2492808848619461, -1.245306134223938, 0.319488644599914...
def iter _ basetf ( self, base _ file ) : yield self. log [ base _ file ] # first element is always the top level log for args in self. _ child _ tests [ base _ file ] : yield self. _ task _ execs [ args ] ( * args )
[ 0.1592661589384079, -0.8959903120994568, 0.5656505823135376, 0.26143136620521545, 0.6219620108604431, 0.13701926171779633, 0.5314821004867554, -0.4940178096294403, -1.5259373188018799, -0.39694860577583313, -0.032590512186288834, 0.08912934362888336, -0.26795443892478943, 1.083862423896789...
def _ monitor _ processor ( self, cycle = 3 ) : while true : for host _ id in self. _ cur _ topo. hosts ( ) : self. push _ processor ( host _ id ) time. sleep ( 3 )
[ -0.5271515846252441, 0.29134654998779297, 0.4461607336997986, -0.3281853199005127, 0.2110125720500946, 0.391012579202652, 0.5198378562927246, -0.43901193141937256, -0.6084507703781128, 0.3377704322338104, -0.023145264014601707, 0.8074852228164673, -0.40620139241218567, 0.3459145426750183, ...
def build _ training _ set ( self, start _ date = " 20170215 ", end _ date = " 20170401 ", tempo = 30, * * kwargs ) : # args parsing assert isinstance ( tempo, int ) datetime. strptime ( start _ date, " % y % m % d " ) self. start _ date = start _ date datetime. strptime ( end _ date, " % y % m % d " ) self. end _ date...
[ -1.038088083267212, 0.21890142560005188, 0.6679126024246216, -0.3963586688041687, -0.2898425757884979, -0.09894771128892899, 0.7665623426437378, -0.03834475949406624, -0.631700336933136, -0.898758590221405, 0.052520740777254105, 0.14356908202171326, 0.6471918225288391, -0.9577326774597168,...
def move ( self, move : " list [ card ] " ) - > bool : playerid = self. order [ self. currplayerindex ] if len ( move ) = = 0 : self. skip _ list. append ( playerid ) self. _ _ iterateplayer _ _ ( ) return true if not gameutil. isvalidmove ( self. playershands [ playerid ], move, self. lastmove ) : return false # remov...
[ -1.362406849861145, -0.4142061173915863, 1.0524201393127441, 0.3481977880001068, -0.3198055028915405, 0.01592705026268959, -0.47627317905426025, 0.4640967547893524, 0.2828883230686188, 0.7383857369422913, -0.6465364694595337, -0.7115859985351562, -1.111390233039856, 0.08708839118480682, ...
def np _ integerizer _ cvx ( incidence, resid _ weights, log _ resid _ weights, control _ importance _ weights, total _ hh _ control _ index, lp _ right _ hand _ side, relax _ ge _ upper _ bound, hh _ constraint _ ge _ bound ) : import cvxpy as cvx status _ text = { cvx. optimal : status _ optimal, cvx. infeasible :'in...
[ 0.6786587834358215, 0.06454764306545258, 0.9179180264472961, 0.5212031602859497, -0.11418699473142624, 0.08404497802257538, -0.24214652180671692, 0.14133845269680023, 0.2977832853794098, 0.40972861647605896, -0.1291370987892151, -0.6167849898338318, 0.14267905056476593, -0.4291408658027649...
def store _ preprocessed _ data ( lists, filename ) : df = create _ df _ from _ two _ lists ( lists ) df. to _ csv ('data /'+ filename, index = false )
[ -0.34513550996780396, 0.28609606623649597, 0.37986916303634644, 0.2589963376522064, 0.7645005583763123, 0.6315587162971497, 0.2933427095413208, 0.6275570392608643, -0.20800159871578217, -1.1595730781555176, -0.7612162232398987, 1.031615972518921, 0.37911584973335266, 0.4097304344177246, ...
def add _ callbacks ( self ) : if self. _ _ rop is not none : self. _ _ rop. addeventcallback ( ( hou. nodeeventtype. namechanged, ), self. _ _ name _ changed ) self. _ _ rop. addeventcallback ( ( hou. nodeeventtype. beingdeleted, ), self. _ _ being _ deleted ) self. _ _ rop. addeventcallback ( ( hou. nodeeventtype. pa...
[ 0.18855524063110352, -0.19389982521533966, 0.8203403353691101, -0.11163844913244247, 1.3506118059158325, -0.11612453311681747, 0.16588300466537476, -0.1742597222328186, 0.7339265942573547, -0.648524284362793, -0.5161202549934387, 0.33420896530151367, 0.17162944376468658, 0.8443206548690796...
def test _ stat _ missing _ data ( self ) : self. assertequal ( jc. parsers. stat. parse ( self. ubuntu _ 20 _ 4 _ stat _ missing _ data, quiet = true ), self. ubuntu _ 20 _ 4 _ stat _ missing _ data _ json )
[ 1.1223243474960327, -0.6470644474029541, 0.32709968090057373, -0.769196093082428, 0.39515426754951477, 0.6399745941162109, 0.10804924368858337, -1.0571355819702148, 0.1059705838561058, -1.1367616653442383, -0.8031547665596008, -0.0868675485253334, 0.090701624751091, 0.3379189372062683, 0...
def get _ driver _ version ( self, target ) : return query _ string _ attribute ( self, target, 0, nv _ ctrl _ string _ nvidia _ driver _ version )
[ -1.358009934425354, -0.6635786890983582, 0.2672489285469055, 0.9894697666168213, 0.6305689215660095, -0.6205458045005798, 0.1761140078306198, -1.1990731954574585, 0.9307227730751038, 0.8974918127059937, 0.06195499375462532, 0.04351237788796425, -0.17495861649513245, -0.4080294072628021, ...
def list _ secties _ by _ afdeling ( self, afdeling ) : try : aid = afdeling. id gid = afdeling. gemeente. id except attributeerror : aid = afdeling afdeling = self. get _ kadastrale _ afdeling _ by _ id ( aid ) gid = afdeling. gemeente. id afdeling. clear _ gateway ( ) def creator ( ) : url = self. base _ url + f " / ...
[ -0.4074477553367615, -0.20420271158218384, 0.5585522055625916, -0.12114499509334564, -0.7469107508659363, -0.5637694597244263, -0.44928058981895447, -1.0750092267990112, 0.927186131477356, 0.5931700468063354, 0.8626192808151245, 0.02845132164657116, 0.4554710388183594, 1.5673623085021973, ...
def do _ preprocess ( self ) : err = self. globals. _ error if isinstance ( err, exception ) : # self. send _ error ( 200, str ( err ), traceback. print _ tb ( err. _ _ traceback _ _ ) ) self. send _ exception ( 500, str ( err ), err ) return false self. _ session _ cookie ( ) if not ( self. sessionidmorsel is none ) :...
[ -0.2831243872642517, -0.6463813185691833, 1.2711153030395508, 0.2338624745607376, -0.19172464311122894, -0.6019313931465149, 0.4420609772205353, -0.6487712264060974, 0.03827255219221115, -0.3129749298095703, -0.12838269770145416, 0.21618658304214478, -0.4624846279621124, 0.0986412912607193...
def parse _ literal ( self, literal ) : if negation in literal : self. is _ negation = true literal = literal. lstrip ( negation ) self. name, args = literal. rstrip ( " ) " ). split ( " ( " ) self. args = args. strip ( ). split ( ", " ) self. name = self. name. strip ( ) for idx in range ( len ( self. args ) ) : self....
[ -0.08271748572587967, -0.22712256014347076, 0.5204564929008484, -1.197859287261963, -0.29047369956970215, -0.051447246223688126, -1.4634631872177124, 0.956249475479126, -0.20620007812976837, 0.29996421933174133, -0.6972459554672241, -0.30686381459236145, -0.4949639141559601, 0.117192059755...
def _ _ setitem _ _ ( self, key, value ) : if key in self. _ items : option = cataloguegroup. modified else : option = cataloguegroup. added # set the current item ( added or modified ) self. _ items [ key ] = value # finally callback to the function self. _ notify ( key, option )
[ -0.7180942893028259, 0.15985903143882751, 0.3396342992782593, -0.5406563878059387, -0.09668770432472229, -0.36438891291618347, -0.2179909199476242, -0.4053300619125366, -0.3089657425880432, 0.3908073604106903, -0.18254294991493225, 0.20803603529930115, -0.19135929644107819, 0.5493503808975...
def open _ wallet ( self ) : cmd = { " method " : " open _ wallet ", " params " : { " filename " : self. wallet _ name, " password " : self. passwd } } utils. curl ( cmd )
[ -0.8971905708312988, -0.7570324540138245, 0.31230872869491577, -0.25213125348091125, 0.28297698497772217, 0.2844502031803131, -0.39773404598236084, 0.6710383296012878, 0.032478511333465576, -0.22306349873542786, -0.06327731907367706, 1.052718162536621, -0.3418451249599457, 0.42759975790977...
def get _ all _ places ( city _ id ) : if storage. get ( city, city _ id ) is none : abort ( 404 ) place _ dict = storage. all ( place ) place _ list = [ ] for place in place _ dict. values ( ) : if place. city _ id = = city _ id : place = place. to _ dict ( ) place _ list. append ( place ) return jsonify ( place _ lis...
[ 0.172206312417984, -0.831871509552002, 0.5441388487815857, -0.03209548816084862, 0.018300950527191162, -0.34778469800949097, -1.0047048330307007, 0.6973733305931091, 0.784892201423645, 0.6011484265327454, -0.6034923791885376, -0.11863052099943161, 0.15523040294647217, 1.48525071144104, -...
def forward _ prop ( self, a ) : for w, b in zip ( self. weights, self. biases ) : a = self. sigmoid ( np. dot ( w, a ) + b ) return a
[ 0.39581498503685, -0.09340008348226547, 0.3482389450073242, -0.5924755930900574, -0.035726338624954224, 0.08162694424390793, 1.2157799005508423, 0.6859381794929504, 0.8461468815803528, 0.3173249065876007, 0.869962751865387, 0.5344725251197815, -0.20739732682704926, -0.17272193729877472, ...
def _ pubdate _ string ( timestamp ) : return formatdate ( timegm ( timestamp. utctimetuple ( ) ) )
[ 0.6820275187492371, -0.41775569319725037, 0.18762172758579254, -0.39927804470062256, -0.5748197436332703, -0.047740910202264786, -1.304787278175354, 0.032024726271629333, 0.8543233275413513, 0.10620002448558807, 1.3040350675582886, -0.0011536767706274986, -0.16044452786445618, -0.829117655...
def test _ succesful _ import _ of _ multiprocessing _ connection ( self ) : self. assertisnotnone ( m _ conn )
[ 0.6384920477867126, -0.10516612976789474, 0.5376965403556824, 0.4534052014350891, 0.2836252450942993, 0.652182936668396, -0.31186217069625854, 1.2173503637313843, 0.2459201216697693, 0.3354247510433197, -1.1535371541976929, -0.5582637190818787, -0.30857303738594055, -0.057301316410303116, ...
def set _ colour _ coded _ levels ( ) : logging. addlevelname ( logging. debug, " \ 033 [ 0 ; 24m % s \ 033 [ 1 ; 0m " % logging. getlevelname ( logging. debug ) ) logging. addlevelname ( logging. info, " \ 033 [ 1 ; 34m % s \ 033 [ 1 ; 0m " % logging. getlevelname ( logging. info ) ) logging. addlevelname ( logging. w...
[ 0.4636932611465454, -0.4710930585861206, 1.1925734281539917, -0.6724392771720886, 0.00978801678866148, 0.4467289447784424, -1.001401662826538, -0.632462203502655, -0.14217780530452728, -0.13536621630191803, -0.6039792895317078, 0.35891193151474, -0.042709074914455414, 1.1162571907043457, ...
def lorentzian ( x, hwhm _ l ) : return hwhm _ l / np. pi / ( x * * 2 + hwhm _ l * * 2 )
[ 0.8038781881332397, -0.7082639932632446, 0.24211180210113525, -0.4064706265926361, -0.6878695487976074, 0.9268327951431274, -1.0484178066253662, 0.10076974332332611, -0.17849233746528625, -0.6034077405929565, -0.89924556016922, 0.3667999804019928, -0.2858060896396637, 0.5750607252120972, ...
def get _ ranked _ global _ values ( self, top _ k = none ) : if self. _ ranked _ global _ values is none : self. _ ranked _ global _ values = _ sort _ feature _ list _ single ( self. _ global _ importance _ values, self. _ global _ importance _ rank ) ranked _ global _ values = self. _ ranked _ global _ values if hasa...
[ 0.02500879392027855, 0.6299917697906494, 0.7034671306610107, 0.8986354470252991, 0.7046028971672058, 0.7377593517303467, 0.021080372855067253, 0.38952556252479553, -0.6954209208488464, 0.18749791383743286, -0.6247799396514893, 1.413209080696106, -0.35234394669532776, 0.9355632066726685, ...
def sync _ local _ from _ remote ( origin, branch ) : # update the local git database run ( " git fetch " ) # switch to the right branch run ( " git checkout % s " % branch ) # obliterate any local changes run ( " git checkout. " ) # merge the latest code on this branch run ('git pull % s % s'% ( origin, branch ) )
[ 0.8351434469223022, -0.5671781897544861, 0.6223558783531189, 0.2864232361316681, -0.09302638471126556, 0.5381039977073669, -1.9839015007019043, 0.29057762026786804, -0.1785982996225357, 0.620538592338562, -1.0180397033691406, 0.5207158327102661, 0.2388857901096344, 0.0009607692481949925, ...
def set _ default _ name ( self, text ) : self. _ widget. setitemtext ( 0, self. _ items [ 0 ] + " ( % s ) " % text )
[ -0.3369554877281189, 0.08873860538005829, 0.3167901337146759, -0.4652620255947113, 0.22756288945674896, 0.2251843810081482, -0.7718385457992554, 0.3537609279155731, -0.03163310885429382, 0.7057937979698181, -1.2786121368408203, -0.13524295389652252, -0.5124382972717285, 0.6441878080368042,...
def translate _ country _ name ( current _ language, country _ code, country _ name, country _ name _ l10n ) : # fixme : this is a lousy way to alleviate the problem where we # have a " locale " and we really need a " language ". language _ fix = {'es':'es - es ', } current _ language = language _ fix. get ( current _ ...
[ 0.4162021577358246, -0.9155054688453674, 0.423540860414505, -0.48276007175445557, 0.1727694869041443, -0.6663289666175842, -0.34246179461479187, 0.2628561556339264, -0.3231845498085022, 0.40986165404319763, 0.5401389002799988, 0.14010412991046906, -0.24739351868629456, -0.5881116390228271,...
def createusercsv ( userid, reviewslist, filepath ) : if len ( reviewslist ) > 0 : keys = reviewslist [ 0 ]. keys ( ) with open ( filepath + str ( userid ) + '. csv ','wb') as output _ file : dict _ writer = csv. dictwriter ( output _ file, keys ) dict _ writer. writeheader ( ) dict _ writer. writerows ( reviewslist )
[ -0.574283242225647, -0.3566535711288452, 0.12265834957361221, 0.6990562081336975, 0.051946330815553665, 0.7067812085151672, -0.6453781723976135, 0.298748642206192, -0.2985416650772095, -0.17664262652397156, -0.2622460722923279, 0.408166766166687, 0.022101981565356255, 0.5857438445091248, ...
def test _ console _ complete _ flight ( c, users : list [ user ], flights : list [ flight ] ) : # this mock _ data should not be returned mock _ data = [ " line1 ", " line2 ", "... ", " line1000 " ] httpretty. register _ uri ( httpretty. get, f " http : / / container - nodeodm : 3000 / task / { flights [ 0 ]. uuid } /...
[ -0.23831400275230408, 0.35241615772247314, 0.6623658537864685, -0.492331862449646, 0.7835227251052856, -0.37004193663597107, -0.0848771408200264, -0.24763542413711548, -0.6675461530685425, -0.20067331194877625, -0.39551693201065063, -0.37267184257507324, 0.1220746710896492, -0.144059568643...
def test _ cancelling _ sends _ email _ to _ user _ and _ studio _ if _ applicable ( self ) : event _ with _ cost = baker. make _ recipe ('booking. future _ ev ', cost = 10 ) booking = baker. make _ recipe ('booking. booking ', user = self. user, event = event _ with _ cost, paid = true ) url = reverse ('booking : dele...
[ 0.3019798696041107, 0.38858380913734436, 0.6235639452934265, 1.3948230743408203, -0.8952258825302124, 0.81598961353302, 0.5972851514816284, 0.368057519197464, -0.47308778762817383, -0.1646547168493271, -0.4863329827785492, 0.2839159369468689, 0.630908727645874, 0.28829920291900635, 0.559...
def is _ sequence ( self ) - > bool : return isinstance ( self. yaml _ node, yaml. sequencenode )
[ -0.8012527227401733, 0.24577011168003082, 0.39163243770599365, 0.8534770011901855, 0.6134417057037354, -1.0534669160842896, -0.11317036300897598, 0.43406352400779724, 0.6977596879005432, 0.15752369165420532, -0.19597795605659485, 1.1982171535491943, -0.6654820442199707, 0.5143709778785706,...
def download _ course ( driver, course _ code, base _ dir, verbose = false ) : try : driver. get ( f " { materials _ url } resources / { year } / { course _ code } " ) course _ name = driver. find _ element _ by _ xpath ('/ / * [ @ id = " main " ] / div [ 2 ] / div / span [ 2 ]'). text try : authenticate ( driver ) exc...
[ 0.2045600563287735, -0.9962257742881775, 0.9021948575973511, 0.2749091684818268, 1.0942456722259521, -0.5427294373512268, 0.08557115495204926, 0.36201581358909607, 0.5209899544715881, 0.2512890100479126, 0.5107546448707581, 0.47100913524627686, -0.13890495896339417, 0.5174292325973511, 0...
def viscosity _ linear ( fluid, t, rho, e _ k, sigma ) : n _ a = 6. 02214129e23 molemass = props ( fluid,'molemass') tstar = t / e _ k b = [ - 19. 572881, 219. 73999, - 1015. 3226, 2471. 01251, - 3375. 1717, 2491. 6597, - 787. 26086, 14. 085455, - 0. 34664158 ] s = sum ( [ b [ i ] * pow ( tstar, - 0. 25 * i ) for i in ...
[ 0.7043766379356384, -0.6246510744094849, 0.9593886137008667, -0.7241978049278259, -0.16400744020938873, 0.22024674713611603, 0.03760417923331261, 0.4290027320384979, 0.1685793101787567, 0.8029122948646545, -0.1396908313035965, -0.006331102456897497, 0.25314968824386597, -0.2033122181892395...
def _ uninstallvboxonlinux ( self ) : # is virtualbox installed? if not, don't try uninstall it. svbox = self. _ getvboxinstallpath ( ffailifnotfound = false ) ; if svbox is none : return true ; # find the. run file and use it. srun = self. _ findfile ('^ virtualbox -. * \ \. run $ ', fmandatory = false ) ; if srun is ...
[ 0.0844399705529213, 0.20197203755378723, 0.5444059371948242, 0.4673941731452942, 0.034429557621479034, -0.48052430152893066, 0.03831547871232033, 0.47976577281951904, -0.4491088092327118, 0.14432145655155182, -0.0640975758433342, -0.3499875068664551, -0.8424641489982605, 0.389106422662735,...
def installed ( name ) : result = local ( " which { 0 } | wc - l ". format ( name ), capture = true ) return result > 0
[ -0.3451855182647705, -0.3121894299983978, 0.7300570011138916, 0.025053104385733604, -0.7266755104064941, -0.3200279772281647, -0.030253270640969276, 0.2467053383588791, -0.09237483143806458, 1.0122514963150024, -0.5076122879981995, -0.2622327208518982, -0.06364306807518005, 1.1365445852279...
def yield _ from ( iterable : _ typing. iterable [ _ typing. iterable ] ) - > _ typing. iterator : for item in iterable : yield from item
[ -0.5141016840934753, -0.09560325741767883, 0.23966765403747559, -0.22291456162929535, 0.23633834719657898, 0.5350347757339478, -0.24054110050201416, -0.37457165122032166, -0.4612744450569153, -0.8102735280990601, 0.45922309160232544, -0.13373512029647827, -0.07818473875522614, -0.193533390...
def encrypt _ sha256 ( uinput = " ", encoding _ algorithm = " utf - 8 " ) : if uinput! = " " : return hashlib. sha256 ( uinput. encode ( encoding _ algorithm ) ). hexdigest ( )
[ 0.43120747804641724, 0.6471207141876221, 0.06491019576787949, 0.6815511584281921, -0.4445326328277588, 0.22915731370449066, 0.22553202509880066, 0.26503390073776245, 0.5849409699440002, 0.5145796537399292, -0.43976202607154846, -0.02848787233233452, -0.48107481002807617, 0.2737997174263000...
def add _ nets ( self, dom, design ) :
[ -0.3243960440158844, 0.8546879887580872, 0.24721919000148773, 0.4848696291446686, 0.42177262902259827, 0.8049361705780029, 0.052335213869810104, -0.8746954798698425, 1.2817078828811646, -1.4640854597091675, 0.09741101413965225, -0.1885819435119629, 1.1956125497817993, 0.47621724009513855, ...
def decrypt ( self, data : bytearray ) - > bytearray : if not isinstance ( data, ( bytes, bytearray ) ) : self. clear ( ) raise gostciphererror ('invalid ciphertext data') result = bytearray ( ) for i in range ( get _ num _ block ( data, self. block _ size ) ) : cipher _ blk = ( add _ xor ( self. _ init _ vect [ 0 : se...
[ -0.11815345287322998, 0.6438277959823608, 0.8865398168563843, 0.06716690212488174, -0.38878312706947327, -0.6462101340293884, 1.0772056579589844, -0.5164288282394409, 0.5347635746002197, 0.17444069683551788, -1.0887049436569214, 0.1621488779783249, -1.472172498703003, 0.030110832303762436,...
def loadintervalsummary ( infile, outfile ) : p. load ( infile, outfile, options ='- - allow - empty - file')
[ 0.1990850269794464, 0.22206918895244598, 0.6706200242042542, -0.11565176397562027, -1.1488784551620483, 1.652390480041504, 0.06064874678850174, 0.22163060307502747, -0.6309465765953064, 0.8352988362312317, 0.2994511127471924, 0.28754785656929016, -0.6847397089004517, -1.3959866762161255, ...
def _ _ init _ _ ( self ) : redis _ instance = redis. strictredis ( host ='localhost ', port = 6379, db = 0 ) self. add _ set = zset ( redis _ instance ) self. remove _ set = zset ( redis _ instance )
[ 0.48503467440605164, 0.628961980342865, 0.4682101905345917, -0.7741760015487671, -0.23574286699295044, -0.4625140428543091, -0.06420858949422836, 0.47449836134910583, 0.5914777517318726, -0.04950471594929695, -0.006542596034705639, 0.3961851894855499, -0.24952426552772522, -0.3441258966922...
def _ cache _ context ( self ) : # create context and integrator. initial _ time = time. time ( ) logger. debug ( " creating and caching context and integrator. " ) state = self. states [ 0 ] self. _ integrator = openmm. langevinintegrator ( state. temperature, self. collision _ rate, self. timestep ) self. _ integrato...
[ -0.23627682030200958, 0.4117516875267029, 0.5724416971206665, -0.3908143937587738, -0.4384123682975769, -0.14816038310527802, 0.818701446056366, -0.6387017965316772, 0.6543627977371216, -0.2520449161529541, 0.05740702152252197, -0.9116905927658081, -0.4354970157146454, 0.248962864279747, ...
def write ( self, s ) : return 0
[ -1.1232764720916748, -0.30175673961639404, 0.2715819478034973, 0.22300834953784943, 0.8325578570365906, -0.09462742507457733, 0.991063117980957, 0.3201647996902466, -0.07115922123193741, -0.6611061692237854, -0.3939262926578522, -0.23495180904865265, -0.859338104724884, 0.0477762334048748,...
def testupdatevaluesforquerieswithimplicittagswithmalformedpaths ( self ) : tagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) # fixme replace this with securetagvalueapi once the index is # integrated objectid = uuid4 ( ) values = { objectid : { u'username / bar': 42 } } tagvalues = securetagv...
[ -0.30418869853019714, 0.1376044899225235, 0.44509780406951904, 0.31305012106895447, -0.014339154586195946, 0.8618729114532471, -0.1242348775267601, -0.06022348254919052, 0.1589340716600418, -0.623618483543396, -0.7454790472984314, -0.6595481038093567, -0.05154964700341225, 0.56538224220275...
def plot _ imu _ z _ accel ( hostname : str, lidar _ port : int = 7502, imu _ port : int = 7503, n _ seconds : int = 5 ) - > none : import matplotlib. pyplot as plt # type : ignore # [ doc - stag - imu - z - accel ] # connect to sensor and get imu packets within n _ seconds source = client. sensor ( hostname, lidar _ p...
[ 0.25786107778549194, 0.33564430475234985, 0.6663596034049988, -0.26619839668273926, -1.2418688535690308, -0.46094849705696106, 0.6576993465423584, -0.8017544746398926, 0.3737739026546478, 0.20988202095031738, 0.07833653688430786, 1.7017273902893066, 0.18277694284915924, 0.05625375732779503...
def num _ features ( self ) : if self. _ features is not none and self. _ num _ features is not none : if len ( self. _ features )! = self. _ num _ features : raise exception ('the number of feature names passed in must be the same as the number of'' columns in the data. number of features : { } feature names : { } '. ...
[ -0.11254727840423584, 0.5933955311775208, 0.4142773151397705, -0.00550962146371603, 0.628500759601593, -0.41462522745132446, 0.41954541206359863, -0.07684241235256195, 0.014878205955028534, -0.8654881715774536, -0.9923914074897766, -0.09790412336587906, -0.18106770515441895, 0.043886609375...
def reset _ db ( ) : print ( " wiping information in database. " ) database = firebase. firebaseapplication ( firebase _ db ) database. delete ('/ quarter ', none )
[ 0.3497138023376465, 0.39479875564575195, 0.15221871435642242, 0.3107524514198303, 0.4490210711956024, 0.2632552981376648, 0.14493511617183685, 0.10270488262176514, 0.29853156208992004, -0.14698795974254608, -0.3178253471851349, 0.06734798848628998, -0.542158842086792, 0.21273721754550934, ...
def partial _ dec ( self, x ) : hm = self. b - x * self. a return hm
[ 0.7031834721565247, -0.1845467984676361, 0.30458754301071167, -0.35610875487327576, -0.5019692778587341, 0.6575466394424438, 0.26979097723960876, -0.5485307574272156, 0.6285172700881958, -0.5520877242088318, -0.25803548097610474, -0.1631019562482834, -1.2355273962020874, -0.556528270244598...
def on _ train _ end ( self, net, x = none, y = none, * * kwargs ) :
[ -0.4266776442527771, -0.08187982439994812, 0.548835277557373, 0.025964252650737762, 0.7292342782020569, -0.10801228135824203, -0.5733119249343872, -0.0196665208786726, -0.29395949840545654, 0.017788490280508995, -1.1052067279815674, -0.11351379007101059, 0.08063086867332458, 0.378424793481...
def test _ get _ step _ setting ( self ) : pass
[ 0.14127138257026672, 1.1796801090240479, 0.2094375491142273, 1.7236627340316772, 0.4213792383670807, -0.6059703230857849, 1.0872142314910889, -0.5172786712646484, -0.6558817625045776, -1.218341588973999, -0.8921253681182861, -0.6085893511772156, -1.199837327003479, 0.8513673543930054, -0...