Saravanan666/pypi-org huggingface dataset:
Package: py-entitymatching
py_entitymatchingThis project seeks to build a Python software package to match entities
between two tables using supervised learning. This problem is often
referred as entity matching (EM). Given two tables A and B, the goal of
EM is to discover the tuple pairs between two tables that refer to the
same real-world entities. There are two main steps involved in entity matching:
blocking and matching. The blocking step aims to remove obvious non-matching
tuple pairs and reduce the set considered for matching. Entity matching in
practice involves many steps than just blocking and matching. While performing EM
users often execute many steps, e.g. exploring, cleaning, debugging, sampling,
estimating accuracy, etc. Current EM systems however do not cover the entire
EM pipeline, providing support only for a few steps (e.g., blocking, matching), while
ignoring less well-known yet equally critical steps (e.g., debgging, sampling).
This package seeks to support all the steps involved in EM pipeline.The package is free, open-source, and BSD-licensed.Important linksProject Homepage:https://sites.google.com/site/anhaidgroup/projects/magellan/py_entitymatchingCode repository:https://github.com/anhaidgroup/py_entitymatchingUser Manual:http://anhaidgroup.github.io/py_entitymatching/v0.4.0/index.htmlGuides:http://anhaidgroup.github.io/py_entitymatching/v0.4.0/user_manual/guides.htmlHow to Contribute:http://anhaidgroup.github.io/py_entitymatching/v0.4.0/contributing.htmlIssue Tracker:https://github.com/anhaidgroup/py_entitymatching/issuesDependenciesThe required dependencies to build the packages are:numpy 1.7.0 or higher. Tested on version 1.19.4.pandas (provides data structures to store and manage tables). Tested on version 1.1.4.scikit-learn 0.22 or higher (provides implementations for common machine learning algorithms). Tested on version 0.23.2.joblib (provides multiprocessing capabilities). Tested on version 0.17.0.py_stringsimjoin (provides implementations for string similarity joins). Tested on version 0.3.2.py_stringmatching (provides a set of string tokenizers and string similarity functions). Tested on version 0.4.2.cloudpickle (provides functions to serialize Python constructs). Tested on version 1.6.0.pyprind (library to display progress indicators). Tested on version 2.9.8.pyparsing (library to parse strings). Tested on version 2.4.7.six (provides functions to write compatible code across Python 2 and 3). Tested on version 1.15.0.Platformspy_entitymatching has been tested on Linux, OS X and Windows.
Package: pyentityshape
PyEntityshapePython library to lookup Wikidata items in the entityshape API.This is the alpha software. Please open an issue if you have any ideas or suggestions or bugs to report.FeaturesIt can be used programmatically to get the results of one validation at a time.InstallationGet it from pypi$ pip install pyentityshapeUsagee = EntityShape(eid="E1", lang="en", qid="Q1")
result = e.get_result()
print(result)
result.is_valid
False|True
result.required_properties_that_are_missing
["P1", "P2"]The result is a Result object with the following properties:some_required_properties_are_missingproperties_with_too_many_statements_foundincorrect_statements_foundis_validis_emptyanalyzederrorgeneralincorrect_statementsmissing_propertiesnameoptional_properties_that_are_missingpropertiesproperties_with_too_many_statementsrequired_propertiesrequired_properties_that_are_missingschema_statementsvalidityLicenseGPLv3+
Package: pyentrez
pyEntrezpyEntrezaims to be a user-friendly suite of Biopython’s Entrez
tools that may be accessed from either the commandline in a script/arg
function, or from a persistent Text User Interface (TUI). The current
implementation will extend to the full use of Entrez for publication
browsing, and will offer features to automatically send query results to
a database of the user’s choice as well as facilitate database
manipulation.Planned features include data interpretation with toolsets such as
Pandas. As well as incorporating text analysis and machine learning to
flag abstracts that are pertinent to the research conducted by the user.Unplanned, but interesting, features would be to incorporate the rest of
the tools offered by Biopython in a one-stop shop.The current implementation has been developed in Python 3 Win10 but
should work with Linux based OS (maybe with minor modifications in terms
of printing and error handling.)MotivationAs a novice programmer in the medical science realm, I wanted to see if I could implement a suite of tools that could pull all of the Entrez functionality together under one  script, as well as manipulate the data pulled. I envision this script allowing for a much more rapid acquisition of relevant data for systemic reviews and meta-analysis, which is a process limited by the amount of research assistants and hours available to scrape and read abstracts.Code styleInstallationAPI ReferenceHow to use?CreditsPowered by: py_CUI Python Command Line UI library:https://github.com/jwlodek/py_cuiDocs:https://jwlodek.github.io/py_cui-docsBiopython library:https://github.com/biopython/biopythonDocs:https://biopython.orgLicenseMIT © William Slattery 2020
Package: pyentrp
pyEntropy (pyEntrp)Quick startUsageContributors and participationpyEntropy is a lightweight library built on top of NumPy
that provides functions for computing various types of entropy for time series analysis.The library currently supports the following types of entropy computation:Shannon Entropyshannon_entropySample Entropysample_entropyMultiscale Entropymultiscale_entropyComposite Multiscale Entropycomposite_multiscale_entropyPermutation Entropypermutation_entropyMultiscale Permutation Entropymultiscale_permutation_entropyWeighted Permutation Entropyweighted_permutation_entropyQuick startInstallpyEntropyusing pip:pip install pyentrpInstallpyEntropyusing poetry:poetry add pyentrpUsagefrompyentrpimportentropyasentimportnumpyasnpts=[1,4,5,1,7,3,1,2,5,8,9,7,3,7,9,5,4,3]std_ts=np.std(ts)sample_entropy=ent.sample_entropy(ts,4,0.2*std_ts)Contributors and participationpyEntropyis an open-source project, and contributions are highly encouraged.
If you would like to contribute, you can:Fork the repositoryand submit pull requests with your improvements, bug
fixes, or new features.Report any issues or bugs you encounter on theissue tracker.Help improve the documentation by
submittingdocumentation improvements or corrections.Participate in discussions and share your ideas.The following contributors have made significant contributions to pyEntropy:Nikolay DonetsJakob DreyerRaphael VallatChristopher SchölzelSam DotsonContributions are very welcome, documentation improvements/corrections, bug reports, even feature requests :)If you findpyEntropyuseful, please consider giving it a star.Your support is greatly appreciated!
Package: pyenttec
pyenttecPython module for sending DMX using the Enttec Pro (or compatible) DMX port.  Supports Python 3 only.Available on PyPI:https://pypi.org/project/pyenttec/On OS X, use is very simple using the select_port function:import pyenttec as dmx
port = dmx.select_port()
port.dmx_frame[0] = 123
port.render()On windows or linux, the select_port function must be modified before use.  Windows uses
numbered com ports, and on linux your serial port directory and port name will
probably be different.  You can also just call the DMXConnection constructor
directly with the right argument.Support is included for setting various port parameters such as refresh rate
and universe length.  For certain applications (very fast strobe control,
for example) using a truncated universe with refresh_rate = 0 permits faster
control.This module started as bug fixes to the pySimpleDMX package.https://github.com/c0z3n/pySimpleDMXIt then mutated into a complete rewrite based on the Objective-C enttec implemention by Coilhttps://github.com/coil-lighting
Package: pyentz
Custom data wrangling functions.This package is built for data scientists/analysts who needs to clean data, and train machine learning / AI models alot. The features in it are critical for Xgboost and Lightgbm models.Example usage:As a function:frompyentzimportcheck_high_corrlist=check_high_corr(df,0.7)Return:["price","items_sold"]Other functions:inspect_datainspect_data2get_cat_colplot_distributioncheck_skewup_samplecheck_high_corr
Package: py-enum
py-enumA python enum module for django choices fields.前言通过改造python3中的enum.py而来，主要变更有：在支持python3的同时，增加了对python2的支持Django中choices选项直接使用枚举对象安装pip install py-enum可查看版本变更记录ChangeLog类ChoiceEnum集成自改造后的Enum对象，用于创建枚举型的基类。使用# 导入
from py_enum import ChoiceEnum, unique

# 定义
class Color(ChoiceEnum):
    RED = (1, '红色')
    GREEN = (2, '绿色')
    BLUE = (3, '蓝色', {'value': 'blue'})

@unique
class Status(ChoiceEnum):
    PROCESSING = ('processing', '处理中')
    APPROVED = ('approved', '已审批')
    CANCELED = ('canceled', '已取消')
    CLOSED = ('closed', '已关闭')定义如上，按照Key = (value, label, extra)的形式进行定义，value定义的值；label是对值的描述；第三个参数是extra，额外信息，可以任意类型。基础用法直接根据Key访问value值，而并不是一个tuple，正是和原生Enum的区别get_label方法get_extra方法直接遍历枚举类，这是能够作为Choices Enum的关键print(Color.RED)  # 1
type(Color.RED)  # <enum 'Color'>
len(colors) == 3  # true
Color.RED in Color  # true
1 in Color  # true
0 not in Color  # true

Color.get_label(Color.RED)  # '红色'
Color.get_extra(Color.BLUE)  # {'value': 'blue'}

for value, label in Color:
    print(value, label)  # 直接遍历value和label
# 1, '红色'
# 2, '绿色'
# 3, '蓝色'枚举对象实例化member = Color(Color.RED)  # 或者 Color(1)
member.value == 1  # true
member.name == 'RED'  # true
member.label == '红色'  # true
member.option == (1, '红色')  # true
member.extra == None  # true，因为没有定义
# 以上几个属性无法修改，直接赋值会抛出AttributeError异常
member.value in Color  # true在Django中使用from django.db import models

class ColorModel(models.Model):
    color = models.IntegerField(verbose_name='颜色', choices=Color, default=Color.RED)

instance = ColorModel.objects.create()
assert instance.color == colors.RED
instance.color = colors.BLUE
instance.save()在DRF中使用from rest_framework import serializers

class ColorSerializer(serializers.Serializer):
    color = serializers.ChoiceField(help_text='选择颜色', choices=Color, default=Color.RED)

s = ColorSerializer()
s = ColorSerializer(data={'status': status.CLOSED})
assert s.is_valid() is True
s = ColorSerializer(data={'status': 1})
assert s.is_valid() is True
s = ColorSerializer(data={'status': 0})
assert s.is_valid() is False  # 值不在枚举定义范围内，校验不通过类Enum和unique和python3中原生的Enum并无太大区别，具体可以参考官方原生开发文档导入from py_enum import Enum unique

@unique
class Season(Enum):
    SPRING = 1
    SUMMER = 2
    AUTUMN = 3
    WINTER = 4对比和Python3原生enum.py对比仅保留了Enum类和unique方法在Python2中使用的区别有members无序，属性定义时申明的顺序和直接遍历枚举对象时并不一定一致；需通过_order_来定义member的顺序python2没有定义__bool__，所以不能直接用class类或者member来做逻辑判断执行 Season.SPRING > Season.SUMMER 不会报错，但结果也不符合预期py3执行会raise TypeError, 不允许比较但是ChoiceEnum是直接取值，可以用来做比较运算枚举类定义时，无法识别多个相同的Key在多继承方面会受限
Package: py-env
pyenvProvides persistent environment for Python 3 scriptsIntroductionYou have a host python environmentpy_env.hostfor your code.
You execute in it and the side-effects of your code will persist on that environtment.This is helpful when you are loading big files, which you definitely would not like to wait for it each time you start your script.How to start the host environmentpython3.6 -m py_env.hostHow to send your code to the host environmentpython3.6 -m py_env.client -c "py_env.set('shit', 'happens')"

python3.6 -m py_env.client -c "print(py_env.keys())"
dict_keys(['shit'])

python3.6 -m py_env.client -c "py_env.get('shit')"
happens
Package: pyenv-api
This package provides an API in the form of a wrapper aroundpyenv. It can be used to install, uninstall and switch Python versions.Note: This document is based onvirtualenv-api README.InstallationThe latest stable release is available onPyPi:$ pip install pyenv-apiPlease note that the distribution is namedpyenv-api, yet the Python
package is namedpyenvapi.Alternatively, you may fetch the latest version from git:$ pip install git+https://github.com/ulacioh/pyenv-api.gitUsagepyenvapi package provides a class namedPyenvAPIthat lets to interact, through his methods, with pyenv subcommands and options:frompyenvapiimportPyenvAPIpyenv=PyenvAPI()Note: ifpyenvutility is not installed on your system when you will try to get aPyenvAPIinstance, aNotInstalledErrorwould be raised.OperationsOnce you have aPyenvAPIobject, you can perform operations on it.Get a tuple of versions installed via pyenv itself:>>>pyenv.installed('2.7.2','3.7.0','3.8.0')Get, set and unset the global Python version:>>>pyenv.global_version# Get('system',)>>>pyenv.global_version=('3.8.0',)# Set# You can also set more than one version as global# or use a list:>>>pyenv.global_version=['2.7.2','3.8.0']>>>delpyenv.global_version# Unset# This last example set the 'system' version as global.Get a tuple of available Python versions to install:>>>pyenv.available('Python versions tuple, too many versions...',)Install a Python version:Read about subprocess.Popen objects>>>ps=pyenv.install('3.6.0')# `install` method returns a `subprocess.Popen` object>>>type(ps)<class'subprocess.Popen'>Uninstall a Python version:>>>ps=pyenv.uninstall('3.6.0')# `uninstall` method returns a tuple with# information of the terminated child process.>>>returncode,stdout,stderr=ps# `returncode` - Exit status of the child process# `stdout` - A bytes sequence of the captured stdout# `stderr` - A bytes sequence of the captured stderr
Package: pyenvar
pyenvarPython's.envis a loader based onhttps://github.com/motdotla/dotenv(dotenvmodule fornodejs) with zero dependencyInstall$pipinstallpyenvarUnit testMake sure to runningunit testsbefore pushing$maketestUsageMake sure the.envfile is in your project'srootfoldermyproject
   - src/
     - __init__.py
   - main.py
   - .envAssumed the.envfile looks like thisUSERNAME=admin
PASSWORD='12345'Basic usageimportosimportpyenvarpyenvar.load()print(os.environ.keys())username=os.environ.get('USERNAME')print(username)Custom .env pathimportosimportpyenvarpyenvar.load(path='./config/.env',encoding='utf-8')print(os.environ.keys())username=os.environ.get('USERNAME')print(username)Pyenvar CLI$pyenvar-cli/path/to/.env
Package: pyenvconfig
envconfigenvconfigis a simple but effective way to configure your Python application through environment variables.Inspired bykelseyhightower/envconfig.Features:Extremely simple setup,Zero third-party dependencies,Well tested,Well documented,Fun to use ;)QuickstartimportenvconfigclassConfig:# Declare two config variables with type string.aws_access_key_id:straws_secret_access_key:str# Provide a default - envconfig uses the type that the attribute is initialized with# so you don't need to repeat yourself.aws_region='us-east-1'# HTTP confignum_retries=15retry_strategy:strtimeout:int=15# seconds# Create an instance of your config object and let envconfig process it!config=Config()envconfig.process(config)# Access class attributesaws_client=Client(access_key_id=config.aws_access_key_id,secret_access_key=config.aws_secret_access_key,region=config.aws_region,)DevelopmentCloning and Buildingenvconfigis written in Python 3.6 and is tested on Python 3.6 and above.Simply check out the repository, create avirtualenv, and go to town!gitclonehttps://github.com/makramkd/envconfig# or git@github.com:makramkd/envconfig.git if you prefercdenvconfig
pyenvlocal3.6.3# ensure python 3.6python-mvenv.venv# create venvsource.venv/bin/activate
pipinstall-rtest_requirements.txt# for coverage, flake8You can installenvconfigin your virtual environment by running:pythonsetup.pyinstallRunning unit tests and linterAll unit tests are built using theunittestmodule from the standard library.python-munittestdiscovertests/Or, if you want a coverage report:coveragerun-munittestdiscovertests
coveragereport# show coverage report on stdoutcoveragehtml&&openhtmlcov/index.html# show interactive coverage report in the browserTo run the linter:./run_linter.shContributionsContributing is easy. Create a pull request, add tests, and get it approved!
Package: py-envconfig
py-envconfig ⚙️Managing config data from the environment, inspired by envconfigenvconfigInstallpip install py-envconfigUsageSet some environment variable, or write a.envfile.HOST=localhostPORT=6000MY_APP_SERVICE=bookingsRELEASE_NUMBER=12ENV=devThen specify your config:fromenvconfigimportparamfromenvconfigimportEnvConfigclassAppConfig(EnvConfig):"""App env config."""HOST=param.Str(required=True)PORT=param.Int(required=True)PASSWORD=param.Str(override="SECRET_REDIS_PW",required=True)SERVICE=param.Str(prefix="MY_APP_")VERSION=param.Int(override="RELEASE_NUMBER")ENV=param.Str(default="prod")config=AppConfig()# Access by class attribute or subscriptconfig.USERconfig["USER"]Setup flask config:config=AppConfig()app.config.from_object(config)Point to a.envfileconfig=AppConfig("./.env")Load DotenvSome functionality provided bydotenvIncrease verbosityAppConfig(verbose=True)Override existing env vars with the env vars defined in.env.AppConfig(override=True)DevelopmentTo publish package and tag git:maketag
Package: py-env-config
env-configA tool for configuring your application via environment variablesFree software: MIT licenseDocumentation:https://env-config.readthedocs.io.FeaturesGets configuration from environment variables that start with
app_name optionally allowing you to load the environment variables
as jsonExample with load_as_json=Truefromenv_configimportget_envvar_configuration# Assuming that there are the following environment variables# MYAPP_BOOL=false# MYAPP_DICT={"some_key": "some_value"}# MYAPP_STRING=blahblahblah# NOTMYAPP_VARIABLE=this wont be recognizedconfig=get_envvar_configuration('myapp')print(config)# prints out {'BOOL': False, 'DICT': {'some_key': 'some_value'}, 'STRING': 'blahblahblah'}Example with load_as_json=Falseconfig=get_envvar_configuration('myapp',load_as_json=False)print(config)# prints out {'BOOL': 'false', 'DICT': '{"some_key": "some_value"}', 'STRING': 'blahblahblah'}CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2016-07-11)First release on PyPI.
Package: pyenv-encrypt
PyEnv-EncryptGPG based env file encryptor utility.PyEnv-Encrypt selectively encrypts and decrypts the fields of config files keeping the keys readable. For example, consider an environment variable file.envwith the following values.SOMEVAR="hello world"ANOTHERVAR="test"Runningpyenc .envwill encrypt the text fields into:SOMEVAR="!ENC#~ hQGMA8pKDfwTzwbdAQv/c0/3Had47hxV6zuNmkBuOjv3bSGGGWzLGHVAN7ryL3tx =Y8Nr"ANOTHERVAR="!ENC#~ hQGMA8pKDfwTzwbdAQv+JRBiVJB3rFqjONyXbBuN6pwzfHkHR43rbSIGX0o/B0zU =ljcz"FeaturesEncryption support for the following file types..envyamljsonRecursive update of all text fields.Automatic decision of encryption or decryption based on file contents.InstallationYou can installpyenv-encryptdirectly fromPyPIusingpip.pipinstallpyenv-encryptAlternatively, clone this repo and install withpip.gitclonehttps://github.com/akhlakm/pyenv-encrypt.gitcdpyenv-encrypt
pipinstall-e.DependenciesThegpgutility must be installed in your system. GPG comes built-in with most versions of Linux OS. For Mac, use homebrew:brew install gpg.See the officialinstallation instructionsfor more info. Run the following command to check if GPG is installed.gpg--versionPython dependencies:python-dotenvpyyamlCommandline UsageAfter installation, use thepyenccommand to encrypt or decrypt your config/env files directly from terminal.pyenc.envMultiple files can also be processed.pyenc.envvault.yamldata.jsonpyencwill toggle between encryption and decryption. To force encryption or decryption specify-eor-drespectively.pyenc-e.envvault.yamldata.jsonTo make sure you do not commit unencrypted files, you can setup a githook for your repository.
See anexample pre-commitfile here.Use As A Python Moduleimportosfrompyenv_encimportenc# User ID for GPGUSERID=os.environ.get("USER")# Check if a encryption key-pair exists for the userid,# or, create a new one.enc.check_gpg_pubkey(USERID)# Encrypt a valuetext="hello world"encrypted=enc.gpg_encrypt(USERID,text)print(encrypted)# Decrypt a valuedecrypted=enc.gpg_decrypt(encrypted)print(decrypted)# Recursively encrypt the string fields of a dictionary.# This is useful to encrypt JSON, YAML, TOML files.mydict={"key1":1234,"key2":"hello world","key3":["hello","world"],"key4":{"foo":"bar"}}encrypted_dict=enc.encrypt_data(USERID,mydict)print(encrypted_dict)# Decrypt the dictionary.print(enc.decrypt_data(encrypted_dict))AboutLICENSE MIT Copyright 2023 Akhlak Mahmood
Package: py-envfile
Help on package py_envfile:NAMEpy_envfilePACKAGE CONTENTSFUNCTIONSdict2envs(objectr)envs2dict(envs)envs2file(envname, envs)getenv(key)getenvfile(envfile, key)setenv(key, value)setenvfile(envname, key, value)FILEVARIES
Package: pyenvinfo
pyenvinfoSummaryInstallationUsageLibrary usageCLI usageDependenciesSummarypyenvinfo is a Python Library to get execution environment information.Installationpip install pyenvinfoUsageLibrary usage>>>importpyenvinfo>>>pyenvinfo.get_envinfo(["pyenvinfo"]){'uname':'Linux ubuntu1804 4.15.0-112-generic x86_64','implementation':'CPython','version':'3.8.5','pyenvinfo version':'0.0.1'}Get environment info as Markdown:>>>importpyenvinfo>>>print(pyenvinfo.dumps(["pyenvinfo"],"markdown"))-uname:Linuxubuntu18044.15.0-112-genericx86_64-CPythonversion:3.8.5-pyenvinfoversion:0.0.1CLI usage$ python -m pyenvinfo --packages pyenvinfo
uname: Linux ubuntu1804 4.15.0-112-generic x86_64
CPython version: 3.8.5
pyenvinfo version: 0.0.1DependenciesPython 3.5+
no external dependencies.
Package: pyenvjasmine
This is a thin python wrapper around theenvjasmineJavaScript
testing framework.ContentsInstallationRunning pyenvjasmine testsRun your own testsInstallationYou can install pyenvjasmine usingpip:pip install pyenvjasmineOr you can grab the latest sources usingMercurialfromhttps://code.codigo23.net/hg/pyenvjasmine:hg clone https://code.codigo23.net/hg/pyenvjasmineand install it from there:python setup.py installAlso, you can use it directly from the sources directory, indevelopment mode(useful if you want to contribute to the project):pip install -e .NoteMore about thedevelopment modehere:https://packaging.python.org/en/latest/distributing.html#working-in-development-modeWarningStarting with version0.3.0, pyenvjasmine has support to run tests with
different browsers/engines. The headless browser rhino is included with
pyenvjasmine, but in order to use the other engines, you have to install the
needed browser(s).Right now, onlyphantomjsis supported, so ensure you have it installed if
you want to use that browser/engine to run tests on.Required if you want
to run tests on jasmine 3.x(also required to run pyenvjasmine’s own
tests).Running pyenvjasmine testsTo run the tests on this code here (as opposed toyourJavaScript code you
want to test), install pyenvjasmine (and phantomjs) and then run:py.testRun your own testsThe easiest way is to put your “specs” (JavaScript tests) into some directory
in your code, then in your python tests, add a new TestCase with just one test
that runs all your JavaScript tests.The simplest solution is to set capture_output to False, so you see the output
from the js tests on the console. Something like this:import pytest
from pyenvjasmine.runner import Runner

class TestJavaScript(object):
    def test_my_javascript(self):
        runner = Runner(
            testdir='/path/to/my/testdir',
            configfile='relative/path/to/configfile',
            testing_environment='phantomjs')
        success, stdout = runner.run()
        # assert on success, will be true if tests passed, False if any
        # test failed
        assert success, "One or more javascript tests have failed"
        # you can inspect stdout if you want to get more info, but it
        # will be printed to the console stdout anyway
        assert b'Total: 120' in stdoutIn this example, thephantomjsbrowse/engine is used, replace that withrhinoto run tests on rhino + jasmine 1.x.Notephantomjsis the preferred browser/engine, so it is what pyenvjasmine
will use as a default if you don’t settesting_environmentwhen creating
a newRunnerinstance.