Saravanan666/pypi-org huggingface dataset:
Package: px-services
This library is a service that can create Wallet Master Seed or Keys, create BlockCypher HD wallet and also hold internal wallet reference to it.Get Started# open any command-line terminal# install px-services (from pypi)pip3installpx-services==0.1.23# if you have access to the source code then install px-services by running this commandpython3setup.pyinstall# run python3 interractive shellpython3Python3.9.10(main,Jan152022,11:48:00)[Clang13.0.0(clang-1300.0.29.3)]ondarwin
Type"help","copyright","credits"or"license"formoreinformation# import px_services package classesfrompx_services.walletimportPxWallet
frompx_services.walletimportPxWalletKeyGenerator# This method `PxWalletKeyGenerator.generate_seed_phrase()` return a turple of# `secret_phrase` ( a.k.a `seed phrase` | `recovery phrase` | `backup phrase`)# `seed` dictionary with these keys `hex`, `bytes`secret_phrase,seed=PxWalletKeyGenerator.generate_seed_phrase()# This method `PxWalletKeyGenerator.seedToMasterKey(seed['hex'])` take the seed (in hex format)# as input and returns a turple of `info` dictionary object and `hdKey` Master key object# (same object from which `info` dictionary object was constructed).info,hdKey=PxWalletKeyGenerator.seedToMasterKey(seed['hex'])# get Master Node or Master Key details from `info` dictionary objectinfo.get('master_key_info')# get `account_keys` (account level extended public & private key) from `master_key_info`info.get('master_key_info').get('account_keys')# get `zprv` ( account level extended private key) from `account_keys`. This key can be# used to derive all account level addresses and it corresponding public & private keys.# Please DONOT share this key with any Blockchain Service Provider unless you have too.info.get('master_key_info').get('account_keys').('zprv')# get `zpub` ( account level extended public key) from `account_keys`. This key can be used# to derive all account level addresses and its corresponding `public keys` but cannot derive# its corresponding `private keys`. This key can be shared with any Blockchain Service# Providers since they will only be able to derive addresses and read its balances.info.get('master_key_info').get('account_keys').('zpub')Change Log0.1.24 (21/12/2023)Minor improvement
Package: px-snowball
SnowballLibrary with several utilities for merging "n+1" amount function calls into one.This utilities might be helpful for tasks/functions that should run not very frequently, but there could be a lot of initiating calls to that functions.Installationpipinstallpx-snowballUsageSimple usage:frompx_snowballimportthread_throttle,thread_debounce# Or shortcuts:# from px_snowball import throttle, debouncecontext={}# We're delaying function execution after each call:@thread_debounce(0.2)defdebouncer(values):# `values` will be a list of all arguments and key arguments it was called.forargs,kwargsinvalues:# do some stuffprint(args)debouncer(1)debouncer(2)debouncer(3)time.sleep(0.1)debouncer(4)time.sleep(0.2)# And only now `debouncer` function will be called.# The same is for throttle function.More practical example.Let's assume we need to write messages to file. But system calls for every message - is too expensive:frompx_snowballimportthread_throttle,thread_debounce# At most every 1 second messages will be written to log file:@thread_throttle(1)deflog(values:List[Tuple[Tuple[str],dict]):messages=(messagefor(message,*args),kwargsinvalues)data_to_write='\n'.join(messages)withopen('/tmp/log.log','a+')asf:f.write(data_to_write)log('First')log('Second')# Will be empty:# > cat /tmp/log.logtime.sleep(0.5)log('Third')# Still empty:# > cat /tmp/log.logtime.sleep(0.5)# Now, after 1 second has passed all logs are in file.# Write operation was executed only once, instead of 3 times as would be if func# was executed as usual.# > cat /tmp/log.log# > First# > Second# > ThirdYes, the resulting function is a bit ugly, but the main profit is that we could perform our operations once in "bulk"(with possible optimizations) even if we call functions 10k times.ChangelogAll notable changes to this project will be documented in this file.The format is based onKeep a Changelog,
and this project adheres toSemantic Versioning.[Unreleased][0.1.0]Initial version.
Package: pxtextmining
pxtextmining: Text Classification of Patient Experience feedbackProject descriptionpxtextminingis a Python package for classifying patient feedback comments collected via theNHS England Friends and Family Test(FFT). It is part of thePatient Experience Qualitative Data Categorisation project, funded by NHS England and hosted by Nottinghamshire Healthcare NHS Foundation Trust.We are working openly byopen-sourcingthe analysis code and data where possible to promote replication, reproducibility and further developments. Pull requests are more than welcome.Documentation and installationFull documentation, including installation instructions, is available on ourdocumentation page.
Package: pxutil
pxutilSome handy Python utilitiesA sample to learn Python packagingInstall from sourcepython setup.py install
or 
pip install .Build distributions ( Replaced with Actions / cibuildwheel for multiple python versions and platforms)# build for current python version
rm -rf dist/* && python setup.py sdist bdist_wheelBuild and Test - cibuildwheel locally for current platformpip install cibuildwheel
# build with docker
cibuildwheel --platform linux . 
# cibuildwheel config in pyproject.tomlPublish to pypi ( Replaced with Actions / cibuildwheel for multiple python versions and platforms)twine upload dist/*Github ActionsThe github action workflow has been configured to run build, test and publish to pypi with cibuildwheel which builds cython extension for multiple python versions and platforms.The workflow is configured to run manually, not to waste resources on each commit, or automatically when a release is created.The publish job is executed only when a release is created.Usage - Functionsimport pxutil as px

# run a command and capture stdout, stderr
r = px.bash('ls')
print(r.stdout)

# run a command like bash -x, not capture stdout, stderr
px.bashx('ls')

px.grep('ab','abc\ndef')

# normalize a path, by default no symlink resolution
px.normal_path('~/project/src/../README.rst')

px.trim_docstring('''
    ab
        cd
    ef
    '''
    )

# change work directory
with px.set_work_path("~") as p:
    os.listdir()

# import any module in a path
conf = px.import_any('~/config/config1.py')
print(conf.server_ip)

# exit program if return value is an exception
@px.exit_on_exception
def to_int(any):
    if isinstance(dict):
        return Exception('dict is not supported to convert to int.')
    return int(any)Usage - CLIpx.loop -h  # run a command in loop
px.chat -h  # chat cli based on chatGPT
px.runc -h  # compile and run single c file with gccTestgit clone https://github.com/peterjpxie/pxutil.git
cd pxutil
pip3 install -r tests/requirements.txt

pytest # current python version

or 

tox # multiple python versions

or

cibuildwheel --platform linux . # multiple python versions in dockerPlaces to Update Supported Python Versionssetup.py        # pypi description
tox.ini         # tox test
pyproject.toml  # cibuildwheel
Package: px-utils
Px-utilsCross-platform build utilities for python projects, especially useful for projects usingpyprojectxCurrently limited to file operations.Installationpip install px-utilsOr using Pyprojectx:[tool.pyprojectx]px-utils="px-utils"[tool.pyprojectx.aliases]clean="@px-utils: prm build dist .pytest_cache .coverage"File operationspxmkdirsusage: pxmkdirs [-h] directories [directories ...]Create a directory and any missing parent directories.positional arguments:
directories  The director(y)(ies) to create.options:
-h, --help   show this help message and exitpxcpusage: pxcp [-h] source_files [source_files ...] destinationCopy source files to a destination directory. The source can be multiple files
or globs. Files are copied preserving directory structure.positional arguments:
source_files  The files to copy. Can be multiple files/globs. IMPORTANT:
when using globs, they must be quoted in order to prevent
expansion by *nix shells!
destination   The destination directory.options:
-h, --help    show this help message and exitpxmvusage: pxmv [-h] source_files [source_files ...] destinationMove source files to a destination directory. The source can be multiple files
or globs. Files are moved preserving directory structure.positional arguments:
source_files  The files to move. Can be multiple files/globs. IMPORTANT:
when using globs, they must be quoted in order to prevent
expansion by *nix shells!
destination   The destination directory.options:
-h, --help    show this help message and exitpxrmusage: pxrm [-h] files [files ...]Delete files or globs.positional arguments:
files       The files to delete. Can be multiple files/globs. IMPORTANT:
when using globs, they must be quoted in order to prevent
expansion by *nix shells!options:
-h, --help  show this help message and exit
Package: pxwebpy
pxwebpyEasily get data from the PxWeb API and into either a polars or pandas dataframe.Pxwebpy parses the PxWeb table data as well as metadata using the json-stat2 response format.It has been tested withStatistics Sweden,Statistics Finland,Statistics GreenlandandStatistics Norway.Example usage>>>frompxwebpyimportPxWeb>>>importpandasaspd>>>URL="https://api.scb.se/OV0104/v1/doris/sv/ssd/START/HE/HE0110/HE0110A/SamForvInk1">>>QUERY={"query":[{"code":"Tid","selection":{"filter":"item","values":["2021"]}}],"response":{"format":"json-stat2"}}>>>tbl=PxWeb(URL,QUERY)>>>print(tbl)PxWeb(url='https://api.scb.se/OV0104/v1/doris/sv/ssd/START/HE/HE0110/HE0110A/SamForvInk1',query={'query':[{'code':'Tid','selection':{'filter':'item','values':['2021']}}],'response':{'format':'json-stat2'}},metadata={'label':'Sammanräknad förvärvsinkomst för boende i Sverige hela året efter ålder, tabellinnehåll och år','source':'SCB','updated':'2023-01-10T10:42:00Z'},last_refresh=2023-10-2914:21:57.628639,dataset=[{'ålder':'totalt 16+ år','tabellinnehåll':'Medelinkomst, tkr','år':'2021'...>>>df=pd.DataFrame(tbl.dataset)>>>print(df)åldertabellinnehållårvalue0totalt16+årMedelinkomst,tkr2021331.51totalt16+årMedianinkomst,tkr2021301.52totalt16+årTotalsumma,mnkr20212779588.93totalt16+årAntalpersoner20218383640.0416-19årMedelinkomst,tkr202128.1..............7180-84årAntalpersoner2021290684.07285+årMedelinkomst,tkr2021214.47385+årMedianinkomst,tkr2021200.17485+årTotalsumma,mnkr202157529.37585+årAntalpersoner2021268320.0[76rowsx4columns]Seeexamplesfor more details on how to use pxwebpy.
Package: py
NOTE: this library is inmaintenance modeand should not be used in new code.The py lib is a Python development support library featuring
the following tools and modules:py.path:  uniform local and svn path objects  -> please use pathlib/pathlib2 insteadpy.apipkg:  explicit API control and lazy-importing -> please use the standalone package insteadpy.iniconfig:  easy parsing of .ini files -> please use the standalone package insteadpy.code: dynamic code generation and introspection (deprecated, moved topytestas a implementation detail).NOTE: prior to the 1.4 release this distribution used to
contain py.test which is now its own package, seehttps://docs.pytest.orgFor questions and more information please visithttps://py.readthedocs.ioBugs and issues:https://github.com/pytest-dev/pyAuthors: Holger Krekel and others, 2004-2017
Package: py101
py101A pyschool story for learning Python Basics.Credits“The only way to learn a new programming language is by writing programs in it.”―Dennis RitchieThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.Also we inspired in the following sites, which are great sources for learning Python basics:workshopper/javascriptinglearnpython.orgtutorialspoint.comLicensepy101 is Copyright (c) 2017 sophilabs, inc. It is free software, and may be
redistributed under the terms specified in thelicensefile.Aboutpy101 is maintained and funded by sophilabs, inc. The names and logos for
sophilabs are trademarks of sophilabs, inc.History0.1.0 (2017-04-05)First release on PyPI.
Package: py115
An API client of 115 cloud storage service.Install# Install from PyPIpipinstallpy115# Or install from sourcepipinstallgit+https://github.com/deadblue/py115.gitUsageimportpy115frompy115.typesimportCredentail# Connect to cloudcloud=py115.connect(credential=Credential(uid='',cid='',seid=''))# OR# cloud = py115.connect(credential={#    'UID': '',#    'CID': '',#    'SEID': '',#})# Get storage servicestorage=cloud.storage()# Get file list under root directoryforfileinstorage.list(dir_id='0'):print('File:%r'%file)# Get offline serviceoffline=cloud.offline()# Get task listfortaskinoffline.list():print('Task:%r'%task)# Add task by download URLsoffline.add_url('magnet:?xt=urn:btih:000123456789abcdef1151150123456789abcdef','ed2k://|file|ED2k-file|115115115|1234567890abcdef1234567890abcdef|/','https://dl.some-server.com/some/file.ext')Documenthttps://py115.readthedocs.io/en/stable/LicenseMIT
Package: py12box
AGAGE 12-box modelThis is a Python version of the AGAGE 12-box model described (first as a 9-box model) in Cunnold et al., 1983. Subsequently modified in Cunnold et al., 1994 and Rigby et al., 2013. This version is based on the IDL version from Rigby et al., 2013.This code started as a python 3 port by Eunchong Chung of the IDL code written by Matt Rigby available from:https://bitbucket.org/mrghg/agage-12-box-model/. It was subsequently modified by Matt Rigby.InstallationThis code can be installed using conda or pip:conda install -c mrghg py12boxor:pip install py12boxGetting startedPlease read the documentationhere.Also see examples of usage inthis repositoryunder the "notebooks" folder.ReferencesCunnold, D. M., Prinn, R. G., Rasmussen, R. A., Simmonds, P. G., Alyea, F. N., Cardelino, C. A., Crawford, A. J., Fraser, P. J. and Rosen, R. D.: The Atmospheric Lifetime Experiment 3. Lifetime Methodology and Application to Three Years of CFCl3 Data, Journal of Geophysical Research, 88(C13), 8379–8400, 1983.Cunnold, D. M., Fraser, P. J., Weiss, R. F., Prinn, R. G., Simmonds, P. G., Miller, B. R., Alyea, F. N. and Crawford, A. J.: Global trends and annual releases of CCI3F and CCI2F2 estimated from ALE/GAGE and other measurements from July 1978 to June 1991, Journal of Geophysical Research, 99(D1), 1107–1126,doi:10.1029/93JD02715, 1994.Rigby, M., Prinn, R. G., O’Doherty, S., Montzka, S. a., McCulloch, A., Harth, C. M., Mühle, J., Salameh, P. K., Weiss, R. F., Young, D., Simmonds, P. G., Hall, B. D., Dutton, G. S., Nance, D., Mondeel, D. J., Elkins, J. W., Krummel, P. B., Steele, L. P. and Fraser, P. J.: Re-evaluation of the lifetimes of the major CFCs and CH3CCl3 using atmospheric trends, Atmospheric Chemistry and Physics, 13(5), 2691–2702,doi:10.5194/acp-13-2691-2013, 2013.
Package: py-12f-common
py-12f-commonAboutThis repository holds those infrastructure-level modules,
that every application requires that follows the core 12-factor principles.This version of the library is compatible with Python versions >=3.8.You can use pip to install the library from thePython Package Index:$pipinstallpy-12f-commonFor further information readthe documentation.Health checkHealth check is a web service running on the configured host:port and can be called with HTTP GET request on/healthendpoint. It is responsible for providing information about the application state.It complies with the Kubernetes health check guidelines. The response is compiled according toHealth Check Response Format for HTTP APIs.In the configuration,HEALTH_CHECK(bool) must be included that enables/disables to run health check web service.HEALTH_CHECK_HOST(string) andHEALTH_CHECK_PORT(int) are optional these are the host and port numbers for the web
service (defaults are '127.0.0.1' and 8008).The initial state isNOINFO. Call theset_state_warm_upfunction just before starting the application, it will set
the state toWARMUP. Once the application has started working, call theset_state_workingfunction to set the state
toWORK. Callset_state_shut_downjust before the application shuts down to set the state toSHUTDOWN. Theset_state_no_infofunction can be used to set the state toNOINFOif required.See the examples:minimumis without health check andasyncqis with health check.
Package: py12flogging
Python logging module for developing microservices conforming to 12 Factor App
methodology. Depends only on Python standard lib. However, setuptools may be
installed to provide additional functionality.InstallationPy12fLogging is available to install from PyPI:pip install py12floggingUsagePy12fLogging is a module used for developing microservices. It is not a standalone
application. See module documentation for more information.Example use of log_formatter -module:import logging
from py12flogging import log_formatter
log_formatter.setup_app_logging('my_app')
logging.info('all done')PrettyPrint logging outputDevelopers may wish to restructure log output stream of an application while it’s
under development. This can be achieved by using pprint command line application,
which prettyprints the log output stream coming from stdin and flushes immediately
to stdout. See module documentation for more information.Pipe application’s stdout to pprint-module:./my_app.py | python -m py12flogging.pprint
Package: py17track
📦 py17track: A Simple Python API for 17track.netpy17trackis a simple Python library to track packages in17track.netaccounts.Since this is uses an unofficial API, there's no guarantee that 17track.net
will provide every field for every package, all the time. Additionally, this
API may stop working at any moment.Python Versionspy17trackis currently supported on:Python 3.6Python 3.7Python 3.8Python 3.9Python 3.10Installationpipinstallpy17trackUsageimportasynciofromaiohttpimportClientSessionfrompy17trackimportClientasyncdefmain()->None:"""Run!"""client=Client()# Login to 17track.net:awaitclient.profile.login('<EMAIL>','<PASSWORD>')# Get the account ID:client.profile.account_id# >>> 1234567890987654321# Get a summary of the user's packages:summary=awaitclient.profile.summary()# >>> {'In Transit': 3, 'Expired': 3, ... }# Get all packages associated with a user's account:packages=awaitclient.profile.packages()# >>> [py17track.package.Package(..), ...]# Add new packages by tracking numberawaitclient.profile.add_package('<TRACKING NUMBER>','<FRIENDLY NAME>')asyncio.run(main())By default, the library creates a new connection to 17track with each coroutine. If you
are calling a large number of coroutines (or merely want to squeeze out every second of
runtime savings possible), anaiohttpClientSessioncan be used for connection
pooling:importasynciofromaiohttpimportClientSessionfrompy17trackimportClientasyncdefmain()->None:"""Run!"""asyncwithClientSession()assession:client=Client(session=session)# ...asyncio.run(main())EachPackageobject has the following info:destination_country: the country the package was shipped tofriendly_name: the human-friendly name of the packageinfo: a text description of the latest statuslocation: the current location (if known)timestamp: the timestamp of the latest eventorigin_country: the country the package was shipped frompackage_type: the type of package (if known)status: the overall package status ("In Transit", "Delivered", etc.)tracking_info_language: the language of the tracking infotracking_number: the all-important tracking numberContributingCheck for open features/bugsorinitiate a discussion on one.Fork the repository.(optional, but highly recommended) Create a virtual environment:python3 -m venv .venv(optional, but highly recommended) Enter the virtual environment:source ./.venv/bin/activateInstall the dev environment:script/setupCode your new feature or bug fix.Write tests that cover your new functionality.Run tests and ensure 100% code coverage:script/testUpdateREADME.mdwith any new documentation.Add yourself toAUTHORS.md.Submit a pull request!
Package: py1kgp
py1kgpUtilities for working with 1000 Genomes dataInstallationFirst make sure you have followed the installation procedure forpydbsnp. Then installpy1kgpwithpip3:pip3installpy1kgporpip3install--userpy1kgpFor full functionality, you should appropriately set the environment variablePY1KGP_DIR. For example, you could add this to your.bash_profile:exportPY1KGP_DIR=<pathtodirectoryofyourchoice>Examplesimportpy1kgppy1kgp.Variant('rs10')py1kgp.Variant(id='rs10')py1kgp.Variant(7,92383888)py1kgp.Variant(chrom=7,pos=92383888)py1kgp.fast_genotypes(7,92383888)py1kgp.fast_genotypes(7,92383888,samples='NA21142,NA21143,NA21144')py1kgp.fast_maf(7,92383888)py1kgp.slice_vcf(1,1000000,2000000)py1kgp.slice_vcf(1,1000000,2000000,samples='NA21142,NA21143,NA21144')py1kgp.slice_vcf(1,1000000,2000000,samples='AFR')py1kgp.slice_vcf(1,1000000,2000000,samples='samples.panel')
Package: py2048-game
Play the popular game of 2048A PyGTK implementation ofGabriele Cirulli’s game of
2048which is itself a
clone of1024and based onSaming’s 2048(also a
clone).InstallationOpen a terminal and enter the following command:pip install py2048-gameIn case you don’t have the right things installed and you don’t feel
like installing them, there is still the old way that I created before I
learned setuptools:wget https://raw.githubusercontent.com/ralphembree/py2048/master/install.sh -q -O - | bashThe old way does a little bit more than the new way because I’m still
learning the new way. Either one will create the py2048 executable, so
the game can be started from the command prompt with a simple “py2048”.
The old way, in addition, puts an entry in your Games menu.FeaturesMoves can be undone with the click of a button.Games can be saved in user-specified files to be resumed later.Grid can be resized to preference.In addition to the keyboard, there are two kinds of mouse
interaction:Swipe: click and hold and then move in the direction desiredClick: each section of the grid (top, bottom, left, right) when
clicked will move the tiles in a different direction. The cursor will
be an arrow pointing in the direction the tiles would go if you
clicked.The colors in the grid can be rerandomized at any time (without
messing up your game).ScreenshotHow to playThe arrow keys determine which direction all of the tiles move. Tiles
with the same number that hit each other merge into one tile. Each time
tiles are moved, another tile is added to the board. The game is over
when no more tiles can be merged.Shortcut keysKeyActionAlt-NStart new gameCtrl-NNew grid size (user defined)Alt-U/Ctrl-ZUndoCtrl-CNew color schemeCtrl-MToggle mouse modes (swipe or click)Ctrl-OLoad saved gameCtrl-Shift-SSave game under a different nameCtrl-SSave game to previously-defined fileF11Toggle fullscreenF1HelpCtrl-QQuitLicensepy2048 is a Python implementation of the popular game of 2048. Copyright
© 2014 Ralph EmbreeThis program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.This program is destributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.You should have received a copy of the GNU General Public License along
with this program. If not, seehttp://www.gnu.org/licenses