Saravanan666/pypi-org huggingface dataset:
Package: pyassetpricing
PyAnomaly is a comprehensive python library for asset pricing research with a focus on firm characteristic and factor generation.
It covers the majority of the firm characteristics published in the literature and contains various analytic tools that are
commonly used in asset pricing research, such as quantile portfolio construction, factor regression, and cross-sectional regression.
The purpose of PyAnomaly isNOTto generate firm characteristics in a fixed manner. Rather, we aim to build
a package that can serve as a standard library for asset pricing research and help reducenon-standard errors.PyAnomaly is a live project and we plan to add more firm characteristics and functionalities going forward. We also welcome contributions
from other scholars.PyAnomaly is very efficient, comprehensive, and flexible.EfficiencyPyAnomaly can generate over 200 characteristics from 1950 in around one hour including the time to download data from WRDS.
To achieve this, PyAnomaly utilizes numba, multiprocessing, and asyncio packages when possible, but not too heavily to maximize readability of the code.ComprehensivenessPyAnomaly supports over 200 firm characteristics published in the literature. It covers most characteristics in
Green et al. (2017) and Jensen et al. (2021), except those that use IBES data. It also provides
various tools for asset pricing research.FlexibilityPyAnomaly adopts the object-oriented programming design philosophy and is easy to customize or add functionalities.
This means users can easily change the definition of an existing characteristic, add a new characteristic, or
change configurations to run the program. For instance, a user can choose whether to update annual accounting
variables quarterly (using Compustat.fundq) or annually (using Compustat.funda), or whether
to use the latest market equity or the year-end market equity, when generating firm characteristics.Main FeaturesEfficient data download from WRDS using asynco.Over 200 firm characteristics generation. You can choose which firm characteristics to generate.Fama-French 3-factor and Hou-Xue-Zhang 4-factor portfolios.AnalyticsCross-section regression1-D sort2-D sortRolling regressionQuantile portfolioLong-short portfolioPortfolio performance analysisData toolsData filteringWinsorizingTrimmingData populationChangelogv0.9 - 2022.01.15Initial version.v0.923 - 2022.01.16Multiprocessing indatatools.populate()has been updated to increase the speed.v0.930 - 2022.01.17The trend factor of Han, Zhou, and Zhu (2016) has been added. We thank Guofu Zhou for this suggestion.v0.931 - 2022.01.23A bug of not returning the result in FUNDA.c_ebitda_mev has been fixed.A new characteristic method for Enterprise multiple (Loughran and Wellman, 2011), c_enterprise_multiple,
has been added to FUNDA, as the previous one (c_ebitda_mev) that implements JKP’s SAS code uses a different definition
from the original definition. This new method uses the original definition.
Package: pyassim
# Data Assimilation repository- this repository is under development## How to Import- `python setup.py install`- this package requires `numpy`## How to Test- `python setup.py test`## How to Use- please see the codes under `samples/`- `sample_dom.py` is an example w.r.t. KF and LOCK through a twin experiment of dample oscillation model.- `sample_advection.py` is an example w.r.t. LLOCK, SLOCK, and LSLOCK through a twin experiment of advection equation.- `sample_Lorenz.py` is an example w.r.t. EnKF, NEnKF, PF, and GPF through a twin experiment of Lorenz 63 model.- this repository includes following methods- [x] Kalman Filter (KF)- [x] Ensemble KF (EnKF)- [x] Nonlinear Ensemble KF (NEnKF)- [x] Local Ensemble Transform KF (LETKF)- [x] Linear Opeartor Construction with the Kalman Filter (LOCK)- [x] Local LOCK (LLOCK)- [x] Spatially Uniform LOCK (SLOCK)- [x] Locally and Spatially Uniform LOCK (LSLOCK)- [x] Bayesian LOCK (BLOCK)- [x] Local BLOCK (LBLOCK)- [x] Locally and Spatially Uniform BLOCK (LSBLOCK)- [x] Particle Filter (PF)- [x] Gaussian PF (GPF)- [x] Variational Mapping PF (VMPF)- [x] Hidden Markov Model (HMM)- if you tackle high-dimensional problems, this repository provides following methods for memory efficiency- [x] Kalman Filter (KF)- [x] Local LOCK (LLOCK)- [x] Spatially Uniform LOCK (SLOCK)- [x] Locally and Spatially Uniform LOCK (LSLOCK)- [ ] Local BLOCK (LBLOCK)- [ ] Locally and Spatially Uniform BLOCK (LSBLOCK)- checked items are already developed, the others are under development
Package: pyassimp
A simple Python wrapper for Assimp usingctypesto access the
library. Requires Python >= 2.6.Python 3 support is mostly here, but not well tested.Note that pyassimp is not complete. Many ASSIMP features are missing.USAGEComplete example: 3D viewerpyassimpcomes with a simple 3D viewer that shows how to load and
display a 3D model using a shader-based OpenGL pipeline.ScreenshotTo use it, from within/port/PyAssimp:$ cd scripts
$ python ./3D-viewer <path to your model>You can use this code as starting point in your applications.Writing your own codeTo get started withpyassimp, examine the simplersample.pyscript inscripts/, which illustrates the basic usage. All Assimp
data structures are wrapped usingctypes. All the data+length fields
in Assimp’s data structures (such asaiMesh::mNumVertices,aiMesh::mVertices) are replaced by simple python lists, so you can
calllen()on them to get their respective size and access members
using[].For example, to load a file namedhello.3dsand print the first
vertex of the first mesh, you would do (proper error handling
substituted by assertions …):frompyassimpimportloadwithload('hello.3ds')asscene:assertlen(scene.meshes)mesh=scene.meshes[0]assertlen(mesh.vertices)print(mesh.vertices[0])Another example to list the ‘top nodes’ in a scene:frompyassimpimportloadwithload('hello.3ds')asscene:forcinscene.rootnode.children:print(str(c))INSTALLInstallpyassimpby running:$ python setup.py installPyAssimp requires a assimp dynamic library (DLLon windows,.soon linux,.dylibon macOS) in order to work. The default search
directories are:the current directoryon linux additionally:/usr/lib,/usr/local/lib,/usr/lib/x86_64-linux-gnuTo build that library, refer to the Assimp masterINSTALLinstructions. To look in more places, edit./pyassimp/helper.py.
There’s anadditional_dirslist waiting for your entries.
Package: pyasstosrt
pyasstosrtpyasstosrt– this tool will help you convert Advanced SubStation Alpha (ASS/SSA) subtitle files to SubRip (SRT) files.Support for str path:frompyasstosrtimportSubtitlesub=Subtitle('sub.ass')sub.export()Support for all Path-like objects, instead of only pathlib's Path:frompathlibimportPathfrompyasstosrtimportSubtitlepath=Path('sub.ass')sub=Subtitle(path)sub.export()You can get a sheet with dialogue by specifying output_dialogues.frompathlibimportPathfrompyasstosrtimportSubtitlepath=Path('sub.ass')sub=Subtitle(path)sub.export(output_dialogues=True)If you want to remove effects from text, you can use the removing_effects.frompyasstosrtimportSubtitlesub=Subtitle('sub.ass',removing_effects=True)sub.export()You can enable the deletion of duplicate lines with the rearrangement of start and end times.frompyasstosrtimportSubtitlesub=Subtitle('sub.ass',remove_duplicates=True)sub.export()CLIpyasstosrt--filepath=/Users/user/sub/sub.assexportOptionalYou can specify an export folder.pyasstosrt--filepath=/Users/user/sub/sub.assexport/Users/user/sub/srtOptionalIf you want to remove effects from text, you can use the --removing_effects flag.pyasstosrt--filepath=/Users/user/sub/sub.ass--removing_effects=Trueexport/Users/user/sub/srtInstallationMost users will want to simply install the latest version, hosted on PyPI:$ pip install 'pyasstosrt[cli]'If you just want to use it as a library and don't need the CLI, you can omit the[cli]extra.
Package: pyassuan
Python module and tools for communicating in theAssuanprotocol.There are a number ofGnuPGwrappers for pythonout there, but
they mostly work via thegpgexecutable.  This is an attempt to
cut to the chase and speak directly togpgme-tool(source) over
a well-defined socket protocol.InstallationPackagesGentooI’ve packagedpyassuanforGentoo.  You needlaymanand
mywtk overlay.  Install with:# emerge -av app-portage/layman
# layman --add wtk
# emerge -av dev-python/pyassuanDependenciespyassuanis a simple package with no external dependencies outside
the Python 3 standard library.Installing by handpyassuanis available as aGitrepository:$ git clone git://tremily.us/pyassuan.gitSee thehomepagefor details.  To install the checkout, run the
standard:$ python setup.py installUsageCheckout the docstrings and the examples inbin.TestingRun the internal unit tests usingnose:$ nosetests --with-doctest --doctest-tests pyassuanIf a Python-3-version ofnosetestsis not the default on your
system, you may need to try something like:$ nosetests-3.2 --with-doctest --doctest-tests pyassuanTo test running servers by hand, you can usegpg-connect-agent.
Despite the name, this program can connect to any Assuan server:$ gpg-connect-agent --raw-socket nameLicenceThis project is distributed under theGNU General Public License
Version 3or greater.AuthorW. Trevor Kingwking@tremily.us
Package: pyastar
pyastar - A* Algorithm in PythonYou can find a documentation ofpyastarat:https://www.egr.msu.edu/coinlab/pyastar/InstallationThe official release is always available at PyPi:pipinstall-UpyastarUsageGraphfrompyastar.interfaceimportastar_graphfrompyastar.util.graphimportWeightedGraphdefcreate_sample_graph():G=WeightedGraph()G.add_node("s","a","b","c","d","e","g")G.add_edge("s","a",1.5)G.add_edge("a","b",2.0)G.add_edge("b","c",3.0)G.add_edge("c","g",4.0)G.add_edge("s","d",2.0)G.add_edge("d","e",3.0)G.add_edge("e","g",2.0)G.preprocess()returnGdefheuristic_sample_graph(node):D={"s":None,"a":4.0,"b":4.0,"c":4.0,"d":4.0,"e":4.0,"g":0.0}returnD[node]if__name__=='__main__':G=create_sample_graph()ret=astar_graph(G,"s","g",heuristic_sample_graph)print("Shortest Path:",ret)Gridfrompyastar.interfaceimportastar_graphfrompyastar.util.gridimportGridfrompyastar.util.heuristicsimportmanhatten_dist_2dgrid=Grid(5,5)grid.add_obstacle((3,0),(3,1))G=grid.to_graph()start=(4,0)goal=(0,4)ret=astar_graph(G,start,goal,lambdax:manhatten_dist_2d(x,goal))print("Shortest Path:",ret)ContactFeel free to contact me if you have any question:Julian Blank (blankjul [at] egr.msu.edu)Michigan State UniversityComputational Optimization and Innovation Laboratory (COIN)East Lansing, MI 48824, USA
Package: py-asterisk-banner
# IMPORTANT (DEPRECATED)This software has been rewritten in Go, so it is recommended to use[go-asterisk-banner](https://github.com/savsgio/go-asterisk-banner),
because it’s maintained and has more performanceThanks :wink:Baneador de IPs en Asterisk con soporte para SIP y PJSIPInstalacion:Ejecutar el comando (en la raiz del proyecto)pip3 install py-asterisk-bannerDesinstalacion:Ejecutar el comandopip3 uninstall py-asterisk-banner
Package: pyastgrep
A command-line utility for grepping Python files using XPath syntax (or CSS
selectors) against the Python AST (Abstract Syntax Tree).In other words, this allows you to search Python code against specific syntax
elements (function definitions, arguments, assignments, variables etc), instead
of grepping for string matches.The interface and behaviour is designed to match grep and ripgrep as far as it
makes sense to do so.Seethe documentationfor more
information, or thedocsfolder.HistoryThis project was forked fromhttps://github.com/hchasestevens/astpathbyH.
Chase Stevens. Main changes:Added a test suiteMany bugs fixedSignificant rewrite of parts of codeChanges to match grep/ripgrep, including formatting and automatic filtering.
Package: pyastsim
pyastsimCalculates the similarity between a batch of source files.InstallationThe program can be installed using pip:pip3 install pyastsimUsageusage: pyastsim [-h] [--threshold THRESHOLD] [--show-diff]
                [--function FUNCTION]
                files [files ...]

Check source files for similarity

positional arguments:
  files                 List of files to compare

optional arguments:
  -h, --help            show this help message and exit
  --threshold THRESHOLD
                        Similarity threshold. Values below this are not
                        reported.
  --show-diff           Show entire diff when reporting results.
  --function FUNCTION   Specific function to compare (Python source only)ExamplesShow check for similarity of a group of files using default settings:pyastsim *.pySet a custom threshold to be more or less sensative (default threshold is 80% similarity):pyastsim --threshold 90 *.pyShow full diffs when reporting similar files:pyastsim --show-diff *.pyRemove all but one function from the AST before performing comparison:pyastsim --function my_func *.pyLanguage SupportPython (using internal AST for comparison)C/C++ (using GCC assembly output for comparison)Difference CalculationThe difference is calculated by first converting each supplied file to an abstract syntax tree (AST). The AST is then normalized to remove comments, docstrings, and standardize identifier names. We then convert the AST back to Python source code and calculate the Damerau–Levenshtein distance between each pair of source files. We further normalize this number by dividing it by the mean of the number of unicode code points in the files being compared. This gives us a rough percentage similarity between our files. To summarize:Convert to ASTRemove comments and docstringsNormalize identifiersConvert back to sourceCalculate Damerau–Levenshtein distanceCovert the edit distance to a percentage
Package: pyastyle
This is a python wrapper extension forArtistic Style, a wonderful code formatter & beautifier.InstallInstall withpipusing the command:$pipinstallpyastyleOr by cloning the repo fromGitHub:$gitclonegit://github.com/timonwong/pyastyle.gitThen install it by running:$pythonsetup.pyinstallUpgradeYou can upgrade your pyastyle version with the command:$pipinstall--upgradepyastyleAPIpyastyle.version()pyastyle.format(code, options)CreditsArtistic Style- A Free, Fast and Small Automatic Formatter for C, C++, C#, and Java Source CodeLicensed underGNU Lesser General Public License version 3.0
Package: pyasuswrt
PyAsusWrtPyAsusWrtis a small API wrapper written in python for communication with ASUSWRT-powered routers using the
HTTP or HTTPS protocols.It is based on Asynchronous HTTP ClientAioHTTP.It was mainly developed to be used with HomeAssistant AsusWRT integration as an alternative to the excellent library
currently in useAIOAsusWrt. The purpose of this library is not to replace
AIOAsusWrt (which uses theSSHandTelnetprotocols) but to work alongside it to allow also the use the HTTP(s) protocols,
so you can choose the best solution according to your model of router.Of course, you can use this library for any other purpose, respecting the open source license to which this library is licensed.NotePull Request to HA integration is under development and will be availablewhen and ifit will be approved by HA teams.If you cannot wait for the completion of the PR, it is possible to replace the native HA integration withthis custom integrationthat already contains support for this new library.
This custom integration is based on the native one and is to be considered for test purpose only.InstallationInstallation of the latest release is available from PyPI:pip install pyasuswrtHow open issue and run testsThere are many versions ofasuswrtfirmware, sometimes they just don't work in current implementation.
If you have a problem with your specific router open an issue on this repository, but please add as much info as you can and
at least:Model and version of routerVersion of AsuswrtIf possible before open issue run a test on your environment, using the code inside the moduletest.py(you must set
right login credential inside the module before running it) and then provide the error log printed by the test.To run the test:python test.pyBe nice!If you like the library, why don't you support me by buying me a coffee?
It would certainly motivate me to further improve this work.
Package: pyAsyncBot
pyAsyncBotYet another async chat bot framework running on python3.8.The framework is designed to be OOP friendly with minimum python syntactic sugar. Implementation has proper startup and graceful shutdown procedure to make it suitable to be integerated into other existing async projects and safely sharing the same event loop in the same thread.The framework also shipping a simple daemon implementation which can serve multiple simple plugins.This framework is highly inspired byOICQ2API BACKENDSurrently only the one defined by me is supported:https://github.com/SalimTerryLi/oicq_webdINSTALLPython 3.8+ is required. I strongly recommend to install the package into virtualenv.pipinstallpyasyncbotEXAMPLEUnderexamplesfolder of this repoDAEMONpyasyncbotd-h
Package: py-async-bus
Py Async BusA simple async event bus in PythonInstallingInstall withpip:$pipinstallpy-async-busUsagefromasync_busimportEventBusbus=EventBus()@bus.subscribe('event_name')asyncdefsubscriber(param):print(param)bus.emit('event_name',param='test_param')Disable subscriberIf you want to disable subscribers while testing for example, you can set the envASYNC_BUS_ENABLE_SUBSCRIBERSto false.$ASYNC_BUS_ENABLE_SUBSCRIBERS=falsepython-munittestTests$python-munittest
Package: pyasynchat
PurposeThis package contains theasynchatmodule as found in Python versions prior to 3.12.
It is provided so that existing code relying onimport asynchatis able to continue being used without significant refactoring.The module's source code is taken directly from thePython standard library[1].
Thespecific version of asynchat that is providedis the last update before the addition of deprecation/removal warnings at import time, and is identical tothe version bundled with Python 3.9(which was the last time the module was meaningfully updated).Please note that new projects should preferasyncio.InstallationThis version ofasynchatis intended for Python 3.12 or later. Install the module usingpip:python-mpipinstallpyasynchatThe module can be installed for earlier Python versions, but it will have no effect, and the standard library version ofasynchatwill be used in its place.Note that installingpyasynchatwill not remove deprecation warnings in Python versions 3.10 and 3.11.
Instead, use thewarningspackage:importwarningswithwarnings.catch_warnings():warnings.simplefilter('ignore',DeprecationWarning)importasynchatUsageThe module is imported in exactly the same way as the standard library component it replaces:importasynchatNote that thePyPI moduleis namedpyasynchatbecause creating modules with the same name as those provided by the standard library is not permitted.For guidance about using theasynchatmodule, see theofficial documentation.TestingTheprevious standard library testshave also been replicated into this module.
Run them using:python-munittestMaintenanceDue to the fact that this previously built-in module isno-longer supportedby the Python core development team, no further maintenance of theasynchat codeis intended.
This project is only intended to be updated to make changes or improvements to the module packaging.LicensePython Software Foundation License Version 2Footnotes1. Verify this if needed via:diff <(curl --location https://github.com/python/cpython/raw/3.9/Lib/asynchat.py) <(curl --location https://github.com/simonrob/pyasynchat/raw/master/asynchat/__init__.py)⏎
Package: pyasyncore
PurposeThis package contains theasyncoremodule as found in Python versions prior to 3.12.
It is provided so that existing code relying onimport asyncoreis able to continue being used without significant refactoring.The module's source code is taken directly from thePython standard library[1].
Thespecific version of asyncore that is providedis the last update before the addition of deprecation/removal warnings at import time, and is essentially equivalent tothe version bundled with Python 3.9(which was the last time the module was meaningfully updated).Please note that new projects should preferasyncio.InstallationThis version ofasyncoreis intended for Python 3.12 or later. Install the module usingpip:python-mpipinstallpyasyncoreThe module can be installed for earlier Python versions, but it will have no effect, and the standard library version ofasyncorewill be used in its place.Note that installingpyasyncorewill not remove deprecation warnings in Python versions 3.10 and 3.11.
Instead, use thewarningspackage:importwarningswithwarnings.catch_warnings():warnings.simplefilter('ignore',DeprecationWarning)importasyncoreUsageThe module is imported in exactly the same way as the standard library component it replaces:importasyncoreNote that thePyPI moduleis namedpyasyncorebecause creating modules with the same name as those provided by the standard library is not permitted.For guidance about using theasyncoremodule, see theofficial documentation.TestingTheprevious standard library testshave also been replicated into this module.
Run them using:python-munittestMaintenanceDue to the fact that this previously built-in module isno-longer supportedby the Python core development team, no further maintenance of theasyncore codeis intended.
This project is only intended to be updated to make changes or improvements to the module packaging.LicensePython Software Foundation License Version 2Footnotes1. Verify this if needed via:diff <(curl --location https://github.com/python/cpython/raw/c4d45ee670c09d4f6da709df072ec80cb7dfad22/Lib/asyncore.py) <(curl --location https://github.com/simonrob/pyasyncore/raw/master/asyncore/__init__.py)⏎
Package: pyat
pyatpyatis the Python analogue of the Unixatdaemon, it runs tasks at
specified times, optionally providing a means to pass around results and
exceptions.The interface is intended to be able to support a variety of usage scenarios
including synchronous applications with a main loop, sporadically called
functions, multithreadded/multiprocessing based code and asynchronous frameworks
like Twisted or Tornado.REQUIREMENTSsixTYPICAL USAGEimport pyat.sync
import time

scheduler = pyat.sync.SynchronousScheduler()

# ... etc ...

background_task = None

while True:
    # ... etc ...

    scheduler.poll()

    if foo == bar:
        # Do something in 10 seconds.
        background_task = scheduler.schedule(
            time.time() + 10, my_task, arg1, arg2, kwarg1=arg3)

    elif foo == baz:
        # Cancel task
        background_task.cancel()
        background_task = None

    elif (foo == quux) and (background_task is not None):
        # Check back on background task
        try:
            result = background_task.result
            # do something with result
            background_task = None
        except pyat.sync.NotExecutedYet:
            # A bit too early
            passSTATUSSynchronous implementationpyat.syncworks.