Saravanan666/pypi-org huggingface dataset:
Package: xbutil-gui
xbutil-guiA Python Tkinter GUI for Xilinx Vitis xbutil programInstallationOSxbutil-gui has been tested on CentOS 7.8 and Ubuntu 16.04.Xilinx XRTXilinx XRTversion 2.8.0 or newer is required
on every host with Xilinx Alveo Accelerator Cards.SSH authentication keyxubtil-gui supports scaning hosts within a cluster. All hosts in the cluster
need to have SSH authentication key set up so you can run commands on remote
hosts with your username and without password. Follow instructions
on theSSH Login without passwordpage to set up SSH authentication key.PythonThis program requires Python 3.6 or newer to run.Ubuntu 16.04The default Python on Ubuntu 16.04 is version 3.5. Run the commands below to
install Python 3.6sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6 python3.6-venv python3.6-tkRedhat/CentOS 7.8The default Python on CentOS 7.8 is already version 3.6. You only need to
install Python Tkinter.sudo yum install python36-tkinterCreate and activate a Python3 virtual environmentpython3.6 -m venv venv
. venv/bin/activateInstall xbutil GUI as a regular userpip install xbutil_guiInstall xbutil GUI as a contributorgit clone https://github.com/jimw567/xbutil-gui.git
cd xbutil-gui
pip install -r requirements.txt`
python setup.py developRun xbutil-guixbutil_guiSnapshotsMain window showing all hosts/devices/compute units in a clustertop windowPower/temperature plotVccint/Iccint plotPublish xbutil_gui to PyPI./scripts/publish-pypi.shThe following modules may need to be upgraded or installed:pip install --upgrade pip
pip install twine
Package: xbwt
XBWTThis library allows to compute the xbwt transform. The following link refers to the article in which it was defined:https://www.semanticscholar.org/paper/Compressing-and-indexing-labeled-trees%2C-with-Ferragina-Luccio/8c4f49913e8db00dc09c31af480bf4dc37a853d9.Documentationhttps://htmlpreview.github.io/?https://github.com/dolce95/xbw-transform/blob/main/doc/xbwt.htmlInstallationpipinstallxbwtUsage from Python as a moduleIt is possible to usexbwtdirectly in a python script by import it.importxbwtxbwt_obj=xbwt.readAndImportTree(r'C:\Users\dolce\OneDrive\Desktop\tree.txt')xbwt=xbwt_obj.computeXBWT()xbwt_obj.printXBWT(xbwt)"""*** XBW TRANSFORM OF THE TREE T ***[S_LAST, S_ALPHA][0, ['A', 0]][0, ['C', 0]][0, ['D', 0]][1, ['D', 0]][1, ['a', 1]][1, ['a', 1]][1, ['c', 1]][0, ['C', 0]][0, ['a', 1]][1, ['B', 0]][1, ['b', 1]][1, ['E', 0]][0, ['B', 0]][0, ['a', 1]][1, ['B', 0]][1, ['c', 1]]"""Input formatThe trees to be imported to build the xbw transform must comply with the format below. In particular, nodes must be specified through the [NODE] ... [\NODE] tag. It is important that the root node has the identifier "root" in its definition. Instead, the edges are specified via the [EDGE] ... [\EDGES] tag. In the latter case, for each node it is necessary to insert the respective nodes with which the edge is formed in the respective order.[NODES]
root = 'label1'
n1 = 'label2'
n2 = 'label3'
n3 = 'label4'
n4 = 'label5'
[\NODES]

[EDGES]
root = [n1, n2]
n1 = [n3, n5]
[\EDGES]
Package: xcache
It’s likelru_cachesbut can be cleared automatically or via context managers.Why?There are only two hard things in Computer Science: cache invalidation and naming things.– Phil KarltonSo, caches are fairly easy, but their invalidation is kind of hard to get right.What type of cache is used?The default implementation is the lru_cache of the stdlib but you can drop in your own.How?Python features garbage collection aka. automatic memory management. Let’s make use of it:fromxcacheimportcache_genrequest_cache=cache_gen(lambda:request)# default cache_impl=lru_cacheHere, we defined our own cache that needs the global request for invalidating the cache.
As soon asrequestis garbage-collected, the cached data is freed.@request_cache()deffib(n):returnfib(n-1)+fib(n-2)ifn>1else1Here, we see how to decorate a function to work like a lru_cache.Now, let’s see how this works:classRequest():passrequest=Request()print(fib(10))print(fib(20))print(fib.cache_info())# fib cache contains 2 itemsrequest=Request()# invalidates all cachesprint(fib.cache_info())# fib cache contains 0 itemsprint(fib(10))print(fib(20))Context Manager for more more control over cache invalidationIf you need more control, the context managerclean_cachesis what you need:fromxcacheimportcached,clean_caches@cached()deffib(n):returnfib(n-1)+fib(n-2)ifn>1else1withclean_caches():print(fib(10))print(fib(20))print(fib.cache_info())# fib cache contains 2 itemsprint(fib.cache_info())# fib cache contains 0 itemsYou can even specify what object the caches should be attached to:@cached()deffib(n):returnfib(n-1)+fib(n-2)ifn>1else1withclean_caches(Request())asrequest:print(fib(10))print(fib(20))print(fib.cache_info())# fib cache contains 2 itemsprint(fib.cache_info())# fib cache contains 0 itemsCan these context managers be nested?Sure. At each entrance and and exit of each context, all associated caches are emptied.ConclusionGoodcache invalidation done easyworks via garbage collectionworks via context managersworks with Python2 and Python3Badunkown ;-)Ideas are always welcome. :-)
Package: xcache-lib
XCache: A simplest and thread-safe LRU cache, which support key-func, release-func and hit-stat.Setuppipinstallxcache-libKey FeaturesLRU cacheThread safeSupport special key functionSupport special release functionHas detail hit statCore Function Descriptor: xcache@xcache(cache_size,key_func=None,release_func=None,log_keys=False)Param ValueDescriptioncache_sizesize of cache storagekey_funspecial key functionrelease_funcspecial release functionlog_keyslog keys, forDEBUGQuick Startfromxcacheimportxcache,show_xcache_hit_stat@xcache(3,key_func=lambdax,y:x,log_keys=True)defcalc(x,y):print("calc{},{}".format(x,y))returnx+yif__name__=="__main__":print(calc(5,6))print(calc(5,6))print(calc(5,6))print(calc(5,5))print(calc(4,6))print(calc(3,6))print(calc(2,6))print(calc(1,6))print(calc(9,6))print(json.dumps(show_xcache_hit_stat(x),indent=4))# show detail hit statoutputs:calc5,6111111calc5,510calc4,610calc3,69calc2,68calc1,67calc9,615{"hit_rate":22.22222222222222,"dup_calc_rate":0.6666666666666666,"hit":[2,7],"keys_num":1,"detail":{"key_detail":{"1":6,"3":1},"hit_detail":{"2":1}}}
Package: xcaliber-webhooks
IntroductionVerify webhook events from xcaliberUsage:Install package using following command - pip install xcaliber_webhooksUse the below example to verify webhook -from xcaliber_webhooks import Webhooksecret="" //secret key for webhookwebhook = Webhook(secret)headers = {"svix-id": "","svix-timestamp": "","svix-signature": "",}payload = '{}' //sample payloadwebhook.verify(payload, headers)
Package: xcalibrate
Placeholder Text November 2022xcalibrate v. 0.0.1A Bayesian algorithm for calibration of radiometer devices used in 21-cm astrophysics experiments.Ian Roque, Will Handley & Nima Razavi-GhodsContact:ilvr2@cam.ac.ukBase methodology:arxiv:2011.14052Please cite the xcalibrate papers:I. L. V. Roque, W. J. Handley, N. Razavi-Ghods, Bayesian noise wave calibration for 21-cm global experiments,Monthly Notices of the Royal Astronomical Society, Volume 505, Issue 2, August 2021, Pages 2638–2646.https://academic.oup.com/mnras/article/505/2/2638/6279678
Package: xcalibu
Xcalibuauthor: Cyril Guilloud ESRF BCU 2013-2023Xcalibu is a python library to manage calibrations tables or polynomia.
It includes a PyTango device server in order to optionaly run it as a server.xcalibu.py : python library
Xcalibuds.py : PyTango device serverXcalibu name comes from the first use of this library to deal with undulators calibrations at ESRF.https://en.wikipedia.org/wiki/Undulatorhttps://en.wikipedia.org/wiki/European_Synchrotron_Radiation_FacilityinstallationAvailable on PyPi or anaconda.orgusageto plot:./xcalibu.py -pto debug:./xcalibu.py -d10plot a file:./xcalibu.py -p examples/xcalibu_calib_poly.calibExamplesTABLE + INTERPOLimportnumpyimportxcalibucalib=xcalibu.Xcalibu()calib.set_calib_file_name("mycalib.calib")calib.set_calib_type("TABLE")calib.set_reconstruction_method("INTERPOLATION")calib.set_calib_time("1234.5678")calib.set_calib_name("CAL")calib.set_calib_description("dynamic calibration created for demo")calib.set_raw_x(numpy.linspace(1,10,10))calib.set_raw_y(numpy.array([3,6,5,4,2,5,7,3,7,4]))calib.plot()calib.save()# create a file named `mycalib.calib` in your current directory.TABLE + POLYFITimportnumpyimportxcalibucalib=xcalibu.Xcalibu()calib.set_calib_file_name("mycalib.calib")calib.set_calib_type("TABLE")calib.set_reconstruction_method("POLYFIT")calib.set_calib_time("1234.5678")calib.set_calib_name("CAL")calib.set_calib_description("dynamic calibration created for demo")calib.set_raw_x(numpy.linspace(1,10,15))calib.set_raw_y(numpy.array([4.1,3.5,3.6,4.2,4.5,4,3.9,3.8,4.5,4.6,6,6.2,4.7,5,4]))calib.set_fit_order(6)calib.fit()calib.plot()POLY% cat mycalib.calib
# XCALIBU CALIBRATION

CALIB_NAME=CAL
CALIB_TYPE=TABLE
CALIB_TIME=1234.5678
CALIB_DESC=dynamic calibration created for demo

CAL[1.000000] = 3.000000
CAL[2.000000] = 6.000000
CAL[3.000000] = 5.000000
CAL[4.000000] = 4.000000
CAL[5.000000] = 2.000000
CAL[6.000000] = 5.000000
CAL[7.000000] = 7.000000
CAL[8.000000] = 3.000000
CAL[9.000000] = 7.000000
CAL[10.000000] = 4.000000command line usageOptions:
-h: help
-p: plot
-d: debug-t type
-r reconstruction_method
-k kind of interpolation
-n nameexample:
./xcalibu.py -n calinou -t TABLE -r INTERPOLATION -k cubic examples/U32a_1_table.dat -p
Package: xcal_raman
This module provides functions for wavenumber calibration of Raman
spectrometers. Currently it works only with binary SPE files, produced,
for example, by winspec (Princeton Instruments software). Supported
substances so far are polystyrene and cyclohexan (or any other, if you
have a table with Raman shifts and 15 minutes of time).One of the key features is that the script provides a detailed report of
calibration in PDF format with a lot of plots.Typical usage looks like this:#!/usr/bin/env python

import xcal_raman as xcal
import winspec
cal_f, p = xcal.calibrate_spe("polystyrene.SPE", "dark.SPE",
                              material="polystyrene", figure=figure())
savefig("xcal-report-polystyrene.pdf")
# We have calibration function, lets plot spectrum of some substance
s = winspec.Spectrum("substance.SPE")
s.background_correct("dark.SPE")
plot(cal_f(s.wavelen), s.lum)
xlabel("Wavenumber, cm$^{-1}$")
ylabel("Counts")Thanks toThe SPE files are read by script winspec.py, which was written by James Battat
and Kasey Russell. I modified it and commented out the calibration.
Package: xcam
Driver to control the XCAM rack.Build and Test CommandsInstall this package:pip install xcam --extra-index-url http://lab-linux-server.estec.esa.int/pypiserver --trusted-host lab-linux-server.estec.esa.intInstall build and test tools:pip install docutils
pip install coverage
pip install pylint
pip install nose
pip install tox
pip install plantumlFrom the root directory (rpc) run the following commands:pylint --rcfile=pylint.cfg xcam
nosetests --with-coverage --cover-erase --cover-html
coverage run -m unittest discover -b -v -s .
coverage report
python -m unittest discover
python setup.py bdist_wheelTo build the README.rst documentation:pygmentize -S default -f html -a .python > style.css
python %VIRTUAL_ENV%/Scripts/rst2html.py --link-stylesheet --cloak-email-addresses --toc-top-backlinks --syntax-highlight=short --stylesheet-dirs=. --stylesheet README.css README.rst esapy_rpc.htmlSyntax highlighting using pygments:http://pygments.org/docs/cmdline/PyPI Register / Upload commands:python setup.py bdist_wheel
# For PyPI LIVE use: https://pypi.python.org/pypi
python setup.py register -r https://testpypi.python.org/pypi
# For PyPI LIVE use: pypi
python setup.py bdist_wheel upload -r pypitest
# or,
python setup.py bdist_wheel upload -r http://lab-linux-server.estec.esa.int:9999To authenticate automatically create a file named.pypircin your $HOME directory,:[distutils]
index-servers =
    sci-fv

[sci-fv]
repository: http://lab-linux-server.estec.esa.int/packages
username: lab
password: <password>Now the upload command can be executed without an authentication prompt using,:python setup.py bdist_wheel upload -r sci-fvIf the above hasMake sure the.pypircfile is defined in your home folder before running
the above commands.
Package: xcamera
XCamera: Android-optimized camera widgetXCamera is a widget which extends the standard Kivy Camera widget with more
functionality. In particular:it displays a "shoot button", which the user can press to take pictureson Android, it uses the native APIs to take high-quality pictures,
including features such as auto-focus, high resolution, etc.it includes a method to force landscape mode. On Android, it is often
desirable to switch to landscape mode when taking pictures: you can
easily do it by callingcamera.force_landscape(), and latercamera.resource_orientation()to restore the orientation to whatever it
was before.Screenshot:Notes:On Android, theresolutionproperty of theXCamera(and also of the
plainCamera) widget controls thepreview size: in other words, it
only affects the quality of the preview, not the size of the pictures
taken.As it is now, the camera will shoot using the default setting for the
picture size, which seems to be what the camera think it is "the best". In
theory, we could add a method to retrieve the list of all possible picture
sizes, and add a property to control it.  It would also be nice to add a
new button to allow the user to manually select the preferred size.  Pull
requests are welcome :)Install & Usagexcamera is available on PyPI.
Therefore it can be installed viapip.pip3installxcameraOnce installed, the demo should be available in yourPATHand can be ran from the command line.xcameraAnd the widget can be imported via:fromkivy_garden.xcameraimportXCameraDemoA full working demo is available insrc/kivy_garden/xcamera/main.py.
You can run it via:makerunDevelop & ContributeTo play with the project, install system dependencies and Python requirements using theMakefile.makeThen verify everything is OK by running tests.maketestIf you're familiar withDocker, the project can also run in a fully isolated container.
First build the image.makedocker/buildThen you can run tests within the container.makedocker/run/testOr the application itself.makedocker/run/app
Package: x-captcha
A simple and powerful captcha generation library.FeaturesEasy to use.Parameterization.Powerful.Continuous updating.InstallationInstall x-captcha with pip:$ pip install x-captchaUsageImage captcha:fromxcaptcha.imageimportCaptcha# defaultgenerator=Captcha()captcha,image=generator.generate()# parametersize=(200,100)characters='1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'number=6font='data/msyhbd.ttf'generator=Captcha(size,characters,number,font)captcha,image=generator.generate()# configgenerator=Captcha()size=(200,100)characters='1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'number=6font='data/msyhbd.ttf'generator.config(size,characters,number,font)captcha,image=generator.generate()# savegenerator=Captcha()generator.save()generator.save('captcha/captcha.png')This is the APIs for your daily works.Contribution
Package: xcat
XCatXCat is a command line tool to exploit and investigate blind XPath injection vulnerabilities.For a complete reference read the documentation here:https://xcat.readthedocs.io/en/latest/It supports an large number of features:Auto-selects injections (runxcat injectionsfor a list)Detects the version and capabilities of the xpath parser and
selects the fastest method of retrievalBuilt in out-of-bound HTTP serverAutomates XXE attacksCan use OOB HTTP requests to drastically speed up retrievalCustom request headers and bodyBuilt in REPL shell, supporting:Reading arbitrary filesReading environment variablesListing directoriesUploading/downloading files (soon TM)Optimized retrievalUses binary search over unicode codepoints if availableFallbacks include searching for common characters previously retrieved firstNormalizes unicode to reduce the search spaceInstallRunpip install xcatRequires Python 3.7. You can easily install this withpyenv:pyenv install 3.7.1Example applicationThere is a complete demo application you can use to explore the features of XCat.
See the README here:https://github.com/orf/xcat_app
Package: xccdfparser
xccdfparserExtensible parser forXCCDFBenchmark/Result XML files.pip install xccdfparserProduces a human-readable JSON from an incomprehensible XCCDF schema/result file:For every TestResult tag in the input file,Benchmark DetailsBenchmark IDRule IDTitle/DescriptionFixtextDictionaryMetadataTimestampTarget MachineIP address(es)XCCDF DomainResultsRule IDValueTo run the parser on a file input.xml, just use:xccdfparser -o output.json input.xmlORxccdfparser input.xmlTesting xccdfparserTo test the pre-built tox environments:First, install tox if you don't have it:pip install toxThen in the package directory:toxOr for a specific environment:tox -e py36
Package: xcert
##Getting startedThis script communicates with the Xolphin API to manage certificates.The script is pretty basic and doesnt contain much error handling.
also the output is plain json sometimes. But it gets the job done.InstallationRun (preferably in a venv environment):python3 -m pip install xcertUsageusage: xcert [-h] [--create-pem filename] [--kube-secret filename] [--list-requests]
             [--retry-validation domain_name] [--download-certificate domain_name]
             [--list-certificates] [--request-status domain_name]
             [--request-certificate domain_name] [--renew-certificate domain_name]

optional arguments:
  -h, --help            show this help message and exit
  --create-pem filename
                        Creates a .pem file with the certificate(.crt), the intermediates(.ca) and the key(.key). And a .cer file with the Certificate and the intermediates. Requires the following files: FILENAME.crt ,FILENAME.ca and FILENAME.key
  --kube-secret filename
                        Prints a kubernetes secret in yaml format generated from a cert/key. Requires a FILENAME.cer and a FILENAME.key
  --list-requests       Lists all pending requests at Xolphin
  --retry-validation domain_name
                        Triggers a validation of the certificate request with DOMAIN_NAME
  --download-certificate domain_name
                        Downloads the certificate for DOMAIN_NAME and saves it as DOMAIN_NAME.cer. Also downloads the corresponding intermediate certificates as DOMAIN_NAME.ca
  --list-certificates   Lists all current certificates at Xolphin
  --request-status domain_name
                        Gets the status of the request with the DOMAIN_NAME. If DOMAIN_NAME is "all" then list the status of all requests
  --request-certificate domain_name
                        Request a new certificate from Xolphin, and saves the generated DOMAIN_NAME.csr and DOMAIN_NAME.key
  --renew-certificate domain_name
                        Renews an existing certificate from Xolphin, and saves the generated DOMAIN_NAME.csr and DOMAIN_NAME.key

additional information:
    This program needs 2 environment variables to be set with your Xolphin credentials:
        XOLPHIN_USER='foo@bar.nl'
        XOLPHIN_PASSWORD='secret_password'
    It will use these credentials to authenticate to the Xolphin API.##TODO
Add build and publish instructions
Package: xchainpy2-client
XChainPy2 Wallet Client InterfaceA specification for a generalised interface for crypto wallets clients, to be used by XChainPy2 implementations.
The client should not have any functionality to generate a key, instead,
theasgardex-crypto(todo: is there such lib for Py?) library should be used to ensure cross-chain compatible keystores are handled.
The client is only ever passed a master BIP39 phrase, from which a temporary key and address is decoded.
Package: xchainpy2-crypto
How it worksTypically keystore files encrypt a seed to a file, however this is not appropriate or UX friendly, since the phrase
cannot be recovered after the fact.Crypto design:[entropy] -> [phrase] -> [seed] -> [privateKey] -> [publicKey] -> [address]Instead, XCHAIN-CRYPTO stores the phrase in a keystore file, then decrypts and passes this phrase to other clients:[keystore] -> XCHAIN-CRYPTO -> [phrase] -> ChainClientThe ChainClients can then convert this into their respective key-pairs and addresses. Users can also export their
phrases after the fact, ensuring they have saved it securely. This could enhance UX onboarding since users aren't forced
to write their phrases down immediately for empty or test wallets.
Package: xchainpy-ethereum
xchainpy/xchainpy_ethereumEthereum Module for XChainPy ClientsEnvironmenttested with Python Virtual Environment 3.8 3.9Installationpython3 setup.py installService ProvidersInfura WSS APIwas used to interact with ethereum blockchain, head tohttps://infura.io/to get your own websocket token.If interaction withnon-ERC20 tokenis needed, head tohttps://etherscan.io/to get your etherscan token.Initialization of ClientPass in your infura WSS api token as network, and pass your ether token as ether_api (not enforced).Initialize mainnet client:client = Client(phrase="mnemonimic", network="wss://mainnet.infura.io/ws/v3/...", network_type="mainnet", ether_api="...")Initialize ropsten(testnet) client:client = Client(phrase="mnemonimic", network="wss://ropsten.infura.io/ws/v3/...", network_type="ropsten", ether_api="...")Head totest/test_ropsten_client.pyto see a
more comprehensive way to using this client.TestsThese packages needed to run tests:pytestpip install pytestpytest-asynciopip install pytest-asyncioHow to run test ?cd test/Ropsten$pytesttest_ropsten_client.pyMainnet$pytesttest_mainnet_client.py
Package: xchainpy-thorchain
xchainpy-thorchainThorchain wrapperTestingNeed this packages before using unit testing:pytestpytest-asyncioInstallation with pip :$pipinstallpytest
$pipinstallpytest-asyncioTesting :$python-mpytestxchainpy/xchainpy_thorchain/test/test_clients.pycan use other parameter like-rPor-rxfor sysout
Package: xchainpy-util
xchainpy/xchainpy-utilUtitity helpers for XChain clientsModules (in alphabetical order)asset- Utilities for handling assetschain- Utilities for multi-chainUsagepipinstallxchainpy_utilAssetfromxchainpy_util.assetimportAssetasset=Asset(chain='BNB',symbol='RUNE-67C')print(asset.chain)print(asset.symbol)print(asset.ticker)asset=Asset(chain='BNB',symbol='RUNE-67C',ticker='RUNE')print(asset)Chainfromxchainpy_utilimportchainfromxchainpy_util.chainimportChainis_chain=chain.is_chain(Chain.Binance)print(is_chain)is_chain=chain.is_chain('BNB')print(is_chain)TestsThese packages needed to run tests:pytestpip install pytestHow to run tests?$python-mpytestxchainpy/xchainpy_util/tests
Package: xchange
xchangeMany cryptocurrency exchange APIs, a single and unified API client 🙌InstallationThe project is hosted in PyPi, and you can install it usingpiporpip3:pip3 install xchangeExample of usage>>>importos>>>fromxchange.factoriesimportExchangeClientFactory>>>fromxchange.constantsimportexchanges,currencies# construct your API client>>>ClientClass=ExchangeClientFactory.get_client(exchanges.KRAKEN)>>>client=ClientClass(**{..."api_key":os.environ.get('KRAKEN_KEY'),..."api_secret":os.environ.get('KRAKEN_SECRET')...})# request API resources in an unified way>>>ticker=client.get_ticker(currencies.BTC_USD)>>>ticker{'ask':Decimal('8590.00000'),'bid':Decimal('8589.90000'),'low':Decimal('8317.90000'),'high':Decimal('8610.00000'),'last':Decimal('8590.00000'),'volume':Decimal('1856.51064490')}# API responses are wrapped into normalized models>>>type(ticker)<class'xchange.models.kraken.KrakenTicker'># dynamic attribute assignation of response fields>>>ticker.lastDecimal('8638.10000')Polymorphic requests>>>forexchangeinexchanges.EXCHANGES:...client=ExchangeClientFactory.get_client(exchange)(**{..."api_key":"YOUR_KEY",..."api_secret":"YOUR_SECRET"...})...ticker=client.get_ticker(currencies.BTC_USD)...print("%s: $%d"%(exchange,ticker.last))...bitfinex:$8633okex:$8749kraken:$8633