Saravanan666/pypi-org huggingface dataset:
Package: xvfbman
A python module focusing on managing Xvfb sessions / ensuring DISPLAY through a simple interface.Why?Xvfb is the X11 Virtual Frame Buffer, and basically implements a display without a monitor, just in memory.This is useful for testing ( such as in conjunction with selenium ), profiling, or other automation task.HowThe xvfbman module provides an interface to start and manage Xvfb sessions, as well as providing a common interface your application can use to ensure a DISPLAY is set (either a real display or start a managed Xvfb which will be closed on exit).Ensuring DISPLAYA common usage would be for your application to use DISPLAY if already set or to start an Xvfb session otherwise.This can be accomplished via theensureDisplayPresentandregisterAtExitCleanup.ensureDisplayPresentwill check if DISPLAY environment variable is set, and if not it will start an Xvfb session and set DISPLAY environment variable to match.registerAtExitCleanupWill register an “atexit” handler which will ensure that all Xvfb sessions we opened (if any) will be closed.# Returns True if we setup an Xvfb, False if DISPLAY already setif ensureDisplayPresent():# If we setup an Xvfb, register the cleanup functionregisterAtExitCleanup()Starting Xvfb SessionsYou can start Xvfb instances on-demand viastartXvfborstartXvfbRangestartXvfbtakes an argument, serverNum, which specifies the server ( e.x. serverNum=50 would be DISPLAY :50.0 ). You can also override the default value for “screenStr” ( 1280x720x24 ) to specify a different resolution and depth.startXvfbRangetakes two arguments, startServerNum and lastServerNum, as well as optional screenStr, and tries to start a server on every server number / display number in that inclusive range. If the display number is already in use, it moves onto the next one.This will return the server num that ended up being used.Use this function if your app can have multiple instances running, or for any condition where there would be contention over server numbers.try:# Start an Xvfb anywhere from :50 to :99 and return the one usedserverNum = startXvfbRange(50, 99)except KeyError:# All servers 50-99 were in useraiseexcept OSError:# Other error occured preventing Xvfb from working properly#  (Exception message will contain the output)Stopping Xvfb SessionYou can stop Xvfb instances viastopXvfborstopAllManagedXvfbsstopXvfbTakes a server number (integer) as an argument, and will stop the managed Xvfb running on that display.stopAllManagedXvfbsWill stop ALL the Xvfb sessions being managed by the processUtility FunctionsisUsingXvfb- Tests if we are managing Xvfb sessions. Default / None for an argument will test if we haveanysessions managed, or passing an integer will check on a specific server num.getDisplayStrForServerNum- Will convert a server number into a DISPLAY string (for use in DISPLAY env var, for example)Full PyDocCan be found athttp://htmlpreview.github.io/?https://github.com/kata198/xvfbman/blob/master/doc/xvfbman.html?vers=1.0.0 .
Package: xvfbwrapper
Manage headless displays with Xvfb (X virtual framebuffer)Info:Dev:https://github.com/cgoldberg/xvfbwrapperReleases:https://pypi.python.org/pypi/xvfbwrapperAuthor:Corey Goldberg- 2012-2016License: MITAbout xvfbwrapper:xvfbwrapper is a python wrapper for controlling Xvfb.About Xvfb:Xvfb (X virtual framebuffer) is a display server implementing the X11 display server protocol. It runs in memory and does not require a physical display.  Only a network layer is necessary.Xvfb is especially useful for running acceptance tests on headless servers.Install xvfbwrapper from PyPI:pip install xvfbwrapperSystem Requirements:Xvfb (sudoapt-getinstall xvfb, or similar)Python 2.7 or 3.3+ExamplesBasic Usage:from xvfbwrapper import Xvfb

vdisplay = Xvfb()
vdisplay.start()

# launch stuff inside
# virtual display here.

vdisplay.stop()Basic Usage, specifying display geometry:from xvfbwrapper import Xvfb

vdisplay = Xvfb(width=1280, height=740, colordepth=16)
vdisplay.start()

# launch stuff inside
# virtual display here.

vdisplay.stop()Usage as a Context Manager:from xvfbwrapper import Xvfb

with Xvfb() as xvfb:
    # launch stuff inside virtual display here.
    # It starts/stops around this code block.Testing Example: Headless Selenium WebDriver Tests:import unittest

from selenium import webdriver
from xvfbwrapper import Xvfb


class TestPages(unittest.TestCase):

    def setUp(self):
        self.xvfb = Xvfb(width=1280, height=720)
        self.addCleanup(self.xvfb.stop)
        self.xvfb.start()
        self.browser = webdriver.Firefox()
        self.addCleanup(self.browser.quit)

    def testUbuntuHomepage(self):
        self.browser.get('http://www.ubuntu.com')
        self.assertIn('Ubuntu', self.browser.title)

    def testGoogleHomepage(self):
        self.browser.get('http://www.google.com')
        self.assertIn('Google', self.browser.title)


if __name__ == '__main__':
    unittest.main()The test class above usesseleniumandxvfbwrapperto run each test case with Firefox inside a headless display.virtual display is launchedFirefox launches inside virtual display (headless)browser is not shown while tests are runconditions are asserted in each test casebrowser quits during cleanupvirtual display stops during cleanupLook Ma’, no browser!(You can also take screenshots inside the virtual display for diagnosing test failures)
Package: xvg
xvgpyA scriptable vector graphics library for PythonInstallpython3 -m pip install xvg(See:PyPI package)Examplefromxvg.applicationimportEnginefromxvg.renderersimportSVGRendererEngine(SVGRenderer()).processFile('image.xvg')(See:XVGPY Index)(See:XVGPY Tests)
Package: xvideos
Xvideos - lightweight video stream readingXvideos is a lightweight single class library for background video reading. TheVideoReaderclass works in 2 threads,
which allows you to efficiently read the video with its parallel processing.InstallYou can use the Pip package manager to install the package:pip install xvideosOr you can install manually:git clone https://github.com/tam2511/xvideos.git
cd xvideos
python setup.py installDocumentationThis library consists of a single VideoReader class and several helper functions.
Their signature and description can be found in thedocumentationExamplesTheVideoReaderclass is very easy to use, just pass the source of the video stream to the class constructor
and then use theget()method to get frames until the video stream endsfromxvideosimportVideoReaderreader=VideoReader(source='./test.mp4')whileTrue:flag,batch=reader.get()ifnotflag:break...# do something
Package: xvideos-api
XVIDEOS APIDescriptionxvideos API is an API for xvideos.com. It allows you to fetch information from videos using regexes and requests.Disclaimer[!IMPORTANT] The xvideos API is in violation to xvideos's ToS!Copyright Information: I have no intention of stealing copyright protected content or slowing down
a website. Contact me at my E-Mail, and I'll take this Repository immediately offline.EchterAlsFake@proton.meQuickstartHave a look at theDocumentationfor more detailsInstall the library withpip install xvideos_apifromxvideos_api.xvideos_apiimportClient,Quality,threaded# Initialize a Client objectclient=Client()# Fetch a videovideo_object=client.get_video("<insert_url_here>")# Information from Video objectsprint(video_object.title)print(video_object.likes)# Download the videovideo_object.download(downloader=threaded,quality=Quality.BEST,output_path="your_output_path + filename")# SEE DOCUMENTATION FOR MOREChangelogSeeChangelogfor more details.ContributionDo you see any issues or having some feature requests? Simply open an Issue or talk
in the discussions.Pull requests are also welcome.LicenseLicensed under the LGPLv3 LicenseCopyright (C) 2023–2024 Johannes HabelSupportLeave a star on the repository. That's enough :)
Package: xviewer
XViewerpipinstall-e.[test]jupyterlabextensiondevelop.--overwrite
jupyterlabextensionlist
jupyterserverextensionlist# open http://localhost:8686/api/jupyter/lab?token=60c1661cc408f978c309d04157af55c9588ff9557c9380e4fb50785750703da6yarnjupyterlab
Package: xviz-avs
xviz_avsPython implementation of XVIZ protocol libraries.RequirementsPython3,websockets,protobuf,numpyGet startedYou can try running the scenario server bypython examples/serve_scenarios.py. Then you can runcd examples/get-started && yarn start-liveunder yourstreetscape.glrepository to see the example scenarios.AcknowledgementsYuanxin Zhongcreatedxviz.pyand allowed us to use it as the base for the official python XVIZ library.
Package: xwacommap
xwacommap - Interactively map Wacom table to screen areaSynopsisxwacommapis a small utility that helps configuring a Wacom
tablet to map to a selected area of the screen. It allows to
draw a rectangular region on the screen, then passes the
geometry to thexsetwacomtool. If the selected area is higher
than wide, the tablet is also rotated.RequirementsThis tool requires thexsetwacomtool from thexserver-xorg-input-wacompackage (on Debian systems).LicenceThis tool is licenced under the Apache 2.0 licence.
Package: xweb
High performance web framework built with uvloop and httptoolsIn Xweb, everything is asynchronous.FeaturesHigh performance.Asynchronous.Small.RequirementsPython3.6+Installationpip install xwebGet StartedHello WorldfromxwebimportAppapp=App()@app.useasyncdefresponse(ctx):ctx.res.body="Hello World"if__name__=='__main__':app.listen(8000)Example with middleware.A middleware is an async function or an async callable object which looks like:async def logger(ctx, fn)# app.pyimporttimefromxwebimportAppapp=App()@app.useasyncdeflogger(ctx,fn):awaitfn()rt=ctx['X-Response-Time']print(rt)@app.useasyncdefresponse_time(ctx,fn):start=time.time()awaitfn()usage=(time.time()-start)*1000_000ctx['X-Response-Time']=f'{usage:.0f}µs'@app.useasyncdefresponse(ctx):ctx.res.body="Hello World"if__name__=='__main__':app.listen(8000)Middlewarexweb-routerAppapp.use(fn)app.listen(host='127.0.0.1', port=8000, debug=True)Contextctx.reqctx.resctx.sendctx.abort(self, status, msg="", properties="")ctx.check(self, value, status=400, msg='', properties="")Requestctx.reqis a Request object.ctx.req.headers dictctx.req.method strctx.req.url strctx.req.raw bytesctx.req.ip strResponsectx.resis a Request object.ctx.res.body strctx.res.status intctx.res.msg strctx.res.headers dictBenchmarkBenchmark code in benchmarks/.environment:iMac (Retina 4K, 21.5-inch, 2017),3 GHz Intel Core i5,8 GB 2400 MHz DDR4test command:wrk http://127.0.0.1:8000/ -c 100 -t 10 -d 10 -T 10FrameworksRequests/SecVersionxweb1000000.1.1vibora900000.0.6meinheld + wsgi770000.6.1sanic500000.7.0Deploy and Runpython app.py.Testpip install -r requirement.txtpytest --cov xweb.pyContributingBuild Middleware.XWeb is inspired bykoajs. I need some help for writing middleware as in koa. For example:Body parser. Convert the raw bytes body into dict or file.Data validator. Async data validator with high performance.Router. High performance router like koa-router.etc..Open issue.Suggestion.Bug.
Package: xweb-router
xweb-routerRouter middleware forxwebUsagefromxwebimportAppfromxweb_routerimportRouterapp=App()router=Router()nested=Router()app.use(router)@router.use('/')asyncdefmiddleware(ctx,fn):"""Router Middleware"""print('middleware')awaitfn()@router.post('/')asyncdefhome(ctx):ctx.body="Home"@router.get('/{name}')asyncdefhello(ctx):"""URL parameters"""ctx.body=f"Hello{ctx.params.name}"router.use('/post')(nested)@nested.get('/index')asyncdefindex(ctx):ctx.body="Nested Index"if__name__=='__main__':app.listen(8000)Nested Router
Package: xweights
xweightsPython “xweights” contains functions to calculate grid weighted area means from predefined regions or from an user-given shapefile. This tool is a wrapper around the python packagexESMF.Free software: MIT licenseDocumentation:https://xweights.readthedocs.ioFeaturesCalculate grid-weighted-means and save the output as CSV fileAs input you need a dataset dictionary. Values are xarray.Datasets and keys correspondin strings.InstallationNote:Before buildingxweightsfrom source, you neddfirstinstallcartopyby using conda:conda install -c conda-forge cartopyYou can install the package directly with pip:pip install xweightsIf you want to contribute, I recommend cloning the repository and installing the package in development mode, e.g.git clone https://github.com/ludwiglierhammer/xweights.git
cd xweights
pip install -e .In additon you have to install xESMF using _Conda:conda install -c conda-forge xesmfThis will install the package but you can still edit it and you don’t need the package in yourPYTHONPATHRequirementspython3.6 or highernumpypandasgeopandasxarraypy-cordexxesmfContactIn cases of any problems, needs or wishes do not hesitate to contact:ludwig.lierhammer@hereon.deCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2022-03-04)First release on PyPI.0.1.1 (2022-07-01)adjusted to pre-commituse functions from pyhomogenize0.1.2 (2022-07-08)change pyhomogenize version requirements0.2.0 (2022-07-11)rename spatial_averagerkeep geometry attributes0.2.1 (2022-07-11)read and write column name to attributes0.2.2 (2022-07-12)add data and tables via pip install0.2.3 (2023-01-26)remove cartopy from requirements.txt0.2.4 (2023-03-13)using pycordex >= 0.5.10.2.5 (2023-08-23)adding new region: counties_merged (merge counties less than 400m2)0.2.6 (2023-08-30)optionally: wite variable attributes to dataframe0.3.0 (2023-09-15)added new regions: IPCC WG1 Reference Regions v4 from Atlasxweights/_io.py is no longer availablexweights/_domains.py is no longer availablefunctionspatial_averager->spatial_averagingfunctioncompute_weighted_means:optionally: setaverager_dsto calculate a general xesmf.SpatialAveragerparametershp->gdfparameterinput->dataset_dictparameterdataset_dicthas to be a dictionaryparameteroutdir->outputfunctioncompute_weighted_means_ds: parameters are now similar tocompute_weighted_meanscommand-line interface is no longer available
Package: xworkflows
XWorkflows is a library to add workflows, or state machines, to Python objects.It has been fully tested with Python 2.7 and all versions from 3.4 to 3.9LinksPackage on PyPI:http://pypi.python.org/pypi/xworkflowsRepository and issues on GitHub:http://github.com/rbarrois/xworkflowsDoc onhttp://readthedocs.org/docs/xworkflows/ExampleIt allows to easilly define a workflow, attach it to a class, and use its transitions:importxworkflowsclassMyWorkflow(xworkflows.Workflow):# A list of state namesstates=(('foo',"Foo"),('bar',"Bar"),('baz',"Baz"),)# A list of transition definitions; items are (name, source states, target).transitions=(('foobar','foo','bar'),('gobaz',('foo','bar'),'baz'),('bazbar','baz','bar'),)initial_state='foo'classMyObject(xworkflows.WorkflowEnabled):state=MyWorkflow()@xworkflows.transition()deffoobar(self):return42# It is possible to use another method for a given transition.@xworkflows.transition('gobaz')defblah(self):return13>>>o=MyObject()>>>o.state<StateWrapper:<State:'foo'>>>>>o.state.is_fooTrue>>>o.state.name'foo'>>>o.state.title'Foo'>>>o.foobar()42>>>o.state<StateWrapper:<State:'bar'>>>>>o.state.name'bar'>>>o.state.title'Bar'>>>o.blah()13>>>o.state<StateWrapper:<State:'baz'>>>>>o.state.name'baz'>>>o.state.title'Baz'HooksCustom functions can be hooked to transactions, in order to run before/after a transition,
when entering a state, when leaving a state, …:classMyObject(xworkflows.WorkflowEnabled):state=MyWorkflow()@xworkflows.before_transition('foobar')defmy_hook(self,*args,**kwargs):# *args and **kwargs are those passed to MyObject.foobar(...)pass@xworkflows.on_enter_state('bar')defmy_other_hook(self,result,*args,**kwargs):# Will be called just after any transition entering 'bar'# result is the value returned by that transition# *args, **kwargs are the arguments/keyword arguments passed to the# transition.pass
Package: xWoTModelTranslator
# Model2Code converterConvert an xWoT meta-model to executable python code.# Installation## End Userspip install xWoTModelTranslator## Developers### Final installationfrom a terminal launchsudo python setup.py install --record files.txtthis will compile and install the project to the pyhton libraries (eg. /usr/local/lib/python2.7/dist-packages/XWoT_Model_Translator-1.1-py2.7.egg). Furthermore it will install three scripts in /usr/local/bin/:* physical2virtualEntities* model2Python* model2WADLThe configuration and logging.conf are copied into /etc/Model2WADL/ but it is possible to overwrite them either by placing a file with the same name (but prefixed with a dot eg. .logging.conf) in the user home directory or a file with the same name in the current working directory.### Development installationfrom a terminal launchsudo python setup.py develop --record files.txtdoes the same as before but, uses links instead of copying files.### Clean Working directoryTo clean the working directorysudo python setup.py clean --allsudo rm -rf build/ dist/ xWoTModelTranslator.egg.egg-info/ files.txt# Uninstall## Method 1cat files.txt |sudo xargs rm -rf## Method 2First find the installed package with pip and the uninstall it~/Documents/Programming/Python/Model2WADL [master|✚ 1…1]12:13 $ pip freeze |grep xWot*3:xWoTModelTranslator==1.1~/Documents/Programming/Python/Model2WADL [master|✚ 1…1]12:13 $ sudo pip uninstall xWoTModelTranslatorUninstalling xWoTModelTranslator:/Library/Python/2.7/site-packages/xWoTModelTranslator-1.1-py2.7.egg/usr/local/bin/model2Python/usr/local/bin/model2WADL/usr/local/bin/physical2virtualEntitiesProceed (y/n)? ySuccessfully uninstalled xWoTModelTranslator~/Documents/Programming/Python/Model2WADL [master|✚ 1…1]12:13 $# UtilisationThe package provide two scripts: _physical2virtualEntities_ and _model2Python_. The first one is used to enhance an xWoT model (created with the according Eclipse plugin see https://github.com/aruppen/architecture4xwot for how to get this eclipse plug-in) containing only the virtual side of a Device with the corresponding virtual side. The second script takes a final xWoT model and translates it into code skeletons. The code sekeltons reflects the chosen hierarchy as a RESTful webservice based on python and autobahn.
Package: xwpandas
xwpandasxwpandas is high performance Excel IO tools for pandas DataFrame. xp.save function in xwpandas saves large(100k~ rows) DataFrame to xlsx format 2x~3x faster than xlsxwriter engine in pandas.Installationxwpandas can be installed usingpippackage manager.$pipinstallxwpandasUsageRead data from Excel fileimportxwpandasasxpdf=xp.read('path/to/file.xlsx')dfView data in Excel windowxp.view(df)Save DataFrame to Excel filexp.save(df,'path/to/file.xlsx')
Package: xwrf
xWRFCIDocsPackageLicenseA lightweight interface for working with theWeather Research and Forecasting (WRF)model output in Xarray. The primary objective ofxWRFis to replicate crucial functionality from thewrf-pythonpackage in a way that ismore convenientfor users and providesseamless integrationwith the rest of the Pangeo software stack.Seedocumentationfor more information.
Package: xwtgzs-lz
此库中有两个模块：text_and_number（文字与数字处理库，后文简称为TAN）1.speak（text）text是文本或数字类型，此方法将生成一个.vbs文件在pip安装位置，默认自动读出文件。
2.remove_quotation_marks（a）a是任意字符串，它将字符串去掉两个“”””(此方法对于文字也有用)，返回值为非字符串的文字或数字。
3.dictionary_value_separation(a, number)a是字典，number是0或者1，它用于将字典的键和值分离，并且返回一个列表，其中有所有的值或者键，number是0是取键，1取值。
4.power_calculation（a,number）此方法中，a和number均为数字，计算number的a次方，返回计算结果的数值。
5.Solve_the_greatest_common_factor(x, y)求解x,y的最大因数6.Solve_the_least_common_multiple（x，y）求解x,y的最小公倍数;common_methods_in_daily_life(日常生活中的常用方法,后文简称为CMIDL)1.weather(a, b, c),a是字符串格式的省份拼音，b是字符串格式的城市拼音，c是数值；当c = 0为今天，c = 1为明天，c=3为后天（其中含有天气、气温、穿衣提醒等）
2.be_qr(a,b)，生成二维码，a是格式随便的内容，b是数值1或者0，如果b= 1 则展示生成的图片，b = 0则返回图片名，可全盘查找。
Package: x_x
x_x is a command line reader that displays either Excel files or CSVs in your terminal. The purpose of this is to not break the workflow of people who live on the command line and need to access a spreadsheet generated using Microsoft Excel.InstallThe easy way:$ pip install x_xOr the hard way:$ git clone https://github.com/krockode/x_x.git && cd x_x && python setup.py installUsageInstalling this package gives you anx_xCLI executable.$ x_x --help
Usage: x_x [OPTIONS] FILENAME

  Display Excel or CSV files directly on your terminal. The file type is
  guessed from file extensions, but can be overridden with the --file-type
  option.

Options:
  -h, --heading INTEGER        Row number containing the headings.
  -f, --file-type [csv|excel]  Force parsing of the file to the chosen format.
  -d, --delimiter TEXT         Delimiter (only applicable to CSV files)
                               [default: ',']
  -q, --quotechar TEXT         Quote character (only applicable to CSV files)
                               [default: '"']
  -e, --encoding TEXT          Encoding [default: UTF-8]
  --version                    Show the version and exit.
  --help                       Show this message and exit.So, for example:$ x_x dead_guys.xlsx
+---------------+--------------+
| A             | B            |
+---------------+--------------+
| Person        | Age at Death |
| Harrold Holt  | 59.0         |
| Harry Houdini | 52.0         |
| Howard Hughes | 70.0         |Or to specify a specific row as the header which will be visible on each page:$ x_x -h 0 dead_guys.xlsx
+---------------+--------------+
| Person        | Age at Death |
+---------------+--------------+
| Harrold Holt  | 59.0         |
| Harry Houdini | 52.0         |
| Howard Hughes | 70.0         |Weird CSVs? No problem!$ cat dead_guys.csv
person;age_at_death
Harrold Holt;59
Harry Houdini;52
Howard Hughes;70
|Not some guy, but just a string with ; in it|;0$ x_x -h 0 --delimiter=';' --quotechar='|' dead_guys.csv
+----------------------------------------------+--------------+
| person                                       | age_at_death |
+----------------------------------------------+--------------+
| Harrold Holt                                 | 59           |
| Harry Houdini                                | 52           |
| Howard Hughes                                | 70           |
| Not some guy, but just a string with ; in it | 0            |Does your CSV file not end in “csv”? Again, no problem:$ mv dead_guys.csv dead_guys.some_other_extension
$ x_x -h 0 --file-type=csv --delimiter=';' --quotechar='|' dead_guys.some_other_extension
+----------------------------------------------+--------------+
| person                                       | age_at_death |
+----------------------------------------------+--------------+
| Harrold Holt                                 | 59           |
| Harry Houdini                                | 52           |
| Howard Hughes                                | 70           |
| Not some guy, but just a string with ; in it | 0            |
Package: xx-apollo
apollo-client-python入门使用:见demo目录功能点：apollo配置中心拉取配置支持回调接口secret认证支持灰度发布支持本地文件缓存默认开启热更新，参数配置可以不开启热更新同时支持python2.x和python3.x，详情见./apollo/下的python_2x.py和python_3x.py文件注意点:【已经废弃,换为不带缓存接口,原因见代码更新】本项目获取配置使用的是缓存接口，而非实时拉取数据库接口，详情见：https://github.com/ctripcorp/apollo/wiki/%E5%85%B6%E5%AE%83%E8%AF%AD%E8%A8%80%E5%AE%A2%E6%88%B7%E7%AB%AF%E6%8E%A5%E5%85%A5%E6%8C%87%E5%8D%97代码更新修改实例化方法ApolloClient，在内部默认启动异步热更新线程，可以通过参数配置不开启热更新。(2020.09.15)修复停机阻塞问题。增加回调接口，增加secret认证，增加demo修改获取配置的接口改为不带缓存的接口。如果使用缓存接口，config有多个节点的时候，可能A通知更新，但是B的缓存没有更新到。增加心跳机制。增加心跳机制，如果不增加心跳机制，apollo的ui界面可能看不到实例。2021-03-23 修复创建文件夹异常，1.py2并发创建文件夹会抛出异常