Saravanan666/pypi-org huggingface dataset:
Package: pystata
PystataSave python data to csvUse python to write stata do file following regression specificationsReport regression results and re-read it into pythonStata required library (Install if you haven't done so)ssc install reghdfe, ftools, esoutExample (See example.ipynb for more details)fromsrc.pystataimportsummary_col# some random combinations of fixed effectsfx_1={'Stock fixed effects':'fx1','Year fixed effects':'fx2'}fx_2={'Stock fixed effects':'fx1','Industry Fixed effects':'fx3'}fx_3={'Stock fixed effects':'fx1','Year fixed effects':'fx2','Industry Fixed effects':'fx3'}# Syntax: [data, regression specification, covariance type (enter cluster list),fixed effects]reg_inputs=[[data,'Y  ~ 1  + x1+ x2','covariance type',{FixedEffects}],# This is an example (column 1)[data1,'y  ~ 1  + x1+ x2 ','robust',fx_1],# (column 2)[data2,'y  ~ 1  + x1+ x2 + x3 + x4','robust',fx_2],# (column 3)[data2,'y  ~ 1  + x1+ x2 + x3 ','robust',fx_2],# (column 4)[data1,'y  ~ 1  + x1+ x2 + x4',['fx1','fx2'],fx_2],# (column 5)[data2,'y  ~ 1  + x1+ x2 + x3 + x4',['fx1','fx2'],fx_3]# (column 6)]outputDir='/home/user/pystata'# set the directory to save Stata output (log and results)table=summary_col(reg_inputs)# read regression specificationtable.set_dir(outputDir)# set the directory to save Stata output (log and results)table.name='table_pystata'# set the name of the tabletable.modelname=["Y1","Y1","Var","Variable","Model name","Y",]# set the name for columnstable.order=['x1','x2','x3','x4']# Determine independent variables ordertable._main_()# transit data from python to Stata and write Stata do file accordinglytable.run_do()# run Stata do file
Package: pystata-kernel
A simple Jupyter kernel for Stata based onpystata(https://www.stata.com/python/pystata/). Requires Stata 17 or above.
Considerstata_kernel(https://github.com/kylebarron/stata_kernel) instead if you have an older version of Stata.InstallationSeehttps://github.com/ticoneva/pystata-kernelfor instructions.
Package: pystatemachine
pystatemachinepystatemachineis a versatile, yet easy-to-use finite-state machine
library written in python. It provides functions to turn any python
object into a finite-state automaton which changes from oneStateto
another when initiated by a triggeringevent.UsageA finite-state machine is defined by a list of its states, and the
triggering condition for each transition.pystatemachineoffers aneventdecorator for a classes’ bound methods, aStateclass to
define the finite-state machine’s states, and aacts_as_state_machinedecorator for turning any python (new- or
old-style) class into a finite-state machine. By default, anyevent-decorated method may raise errors. Optionally, atransition_failure_handlerdecorator turns any class method into a
failure handler which gets invoked when anevent-decorated method
raises an error.ExampleFollowing, a turnstile is modeled.An example of a very simple mechanism that can be modeled by a state
machine is a turnstile. A turnstile is a gate with three rotating
arms at waist height, one across the entryway. Initially the arms
are locked, barring the entry, preventing customers from passing
through. Depositing a coin or token in a slot on the turnstile
unlocks the arms, allowing a single customer to push through. After
the customer passes through, the arms are locked again until another
coin is inserted. - from [Wikipedia]
(http://en.wikipedia.org/wiki/Finite-state_machine#Example:_a_turnstile)@acts_as_state_machineclassTurnstile(object):locked=State('locked',initial=True)unlocked=State('unlocked')@event(from_states=(locked,unlocked),to_state=unlocked)defcoin(self):assertrandom.random()>.5,'failing for demonstration purposes, only ..'print('*blingbling* .. unlocked!')@event(from_states=(locked,unlocked),to_state=locked)defpush(self):print('*push* .. locked!')@transition_failure_handler(calling_sequence=2)defturnstile_malfunction(self,method,from_state,to_state,error):print('state transition from{0.name}to{1.name}failed. Reason:{2}'.format(from_state,to_state,error))@transition_failure_handler(calling_sequence=1)defbefore_turnstile_malfunction(self,method,from_state,to_state,error):print('before state transition failure handler ..')importrandomturnstile=Turnstile()for_inrange(10):handler=random.choice([turnstile.coin,turnstile.push])handler()Changelog1.2exceptions in an event-decorated function are now reraised when no
transition failure handler was registered1.1added a decorator for registering a class’ method as exception
handler when an ‘event’-decorated method fails. multiple methods may
be registered as transition failure handler: they are invoked in the
order given by the optional ‘calling_sequence’ keyword1.0first public releaseLicensepystatemachineis available underMIT
License.DownloadYou can downloadpystatemachine.py.Alternatively:git clone git@github.com:cmaugg/pystatemachine
Package: pystatic
Generates static websites using Django’s Templating Engine
You can make use of variables, template inheritance and filters
which greatly speed up development and facilitate maintenance.
Has a simple server for local development.To installpip install pystaticHow to useStart a project with the default project structure. This structure is not to be changed.pystatic initStart a server to preview your project. The server will auto-reload changes and run athttp://localhost:12321by default.pystatic serverBuild your project from the templates variables and data, once.pystatic buildThe directory structure is not to be changed. All variables present in conf/vars.yaml will be available for templating.
There’s currently no other data store.
Package: py_static_check
py_static_checkpy_static_check can statically check your Python code for a lot of common errors.
It uses a modified pyflakes code and extends with following things:Ability to specify what star imports resolve to (-s argument)Ability to ignore unused import warnings (-i argument)Better sorting of warnings/errorsFor more information check out:http://amix.dk/blog/post/19665#py-static-check-Statically-check-your-Python-codehttp://amix.dk/blog/post/19361#Static-checking-Python-codeTo install it do following:sudo easy_install py_static_checkHere are some of the things py_static_check can do.Catch undefined names, even for star importsExample code:from os import *

def function_with_error():
    print path
    print pathsstar_imports.py:import os
STAR_IMPORTS = {
    'os': os.__all__,
}When ran with py_static_check:$ py_static_check -s tests/star_import.py tests/undefined_name_star.py
tests/undefined_name.py:5: undefined name 'pathsIgnore not used warningsExampel code:from os import pathWhen ran with py_static_check -i option:$ py_static_check -i tests/ignore_not_used.py

$ py_static_check tests/ignore_not_used.py
tests/ignore_not_used.py:10: 'path' imported but unusedAssigned but never usedLike pyflakes it can catch a lot of errors, such as defining a variable without using it.Exampel code:def some_function():
    def inner_fn():
        local_var = ""When ran with py_static_check:$ py_static_check tests/assigned_but_never_used.py

tests/assigned_but_never_used.py:8: local variable 'local_var' is assigned to but never usedCopyright: 2011 by amix
License: MIT.
Package: pystatic-language
pystaticThis package is a collection of methods and classes for making python more secure, robust, and reliable.
This could be achieved through the simple usage of decorators, function calls and inheritance of base classes.
Generally, this package can make python a programming language, closer to other static-typed languages,
without losing python's dynamic powerful features and.first of allspecifics:writen and owned by: Shahaf Frank-Shapirall the rights are saved for: Shahaf Frank-Shapirprogramming languages: python 3.9.12 (100%)before we startdescription:This package contains the following systems to be embedded in any python codebase:overloading: Functions and methods (static, class and instance)
can have the same name yet different arguments' signature
(different arguments - different names or same names and difference
in type hints.) through the usage of the overload decorator on top
of the base function\method and inherit from the overloading
protocol class, when the usage is made in a class.privacy: Attributes of classes and instances can now be private
in a way that prevents getting access to them in the traditional
ways, as well as the more shady ones This can be used whn a class
inherits from the private property protocol, or the private attributes
being defined as private using the private descriptor.cleaning: Cleaning of unnecessary objects, values, imported namespaces
from your modules, so an object imported into a module cannot be
imported with anything else that is written inside the module.
Essentially, enforcing what can and cannot be imported from you modules.scope protection: The protection of attributes that are being accessed
from outside their class scope, so they couldn't be modified there.automatic dynamic type checking and enforcement: decorators
and functions to check at run-time is the type, and structure of
types of the object equals to any type hint This can be done for
functions at every call for all the parameters, sing a decorator,
or manually, calling a function on a variable.dependencies:opening:
As for this is a really complex program, which uses a lot of modules, there are required dependencies needed
in order to run the program. keep in mined the program was writen in python 3.9, so any python version lower
than 3.8 might not work properly. Moreover, built-in python modules are being used, so keep that in mind.install app dependencies by writing the "-r" option to install the requirements
writen in a file, and write the following line in the project directory:pip install -r requirements.txtrun a testrun from windows command line (inside the project directory)run with python by writing to the command line in the project directory:python test.py
Package: pystatsbomb
pyStatsBombPython port of theStatsBombRlibrary.Free software: Mozilla Public License 2.0Documentation:https://pystatsbomb.readthedocs.ioFeaturesFree data accessAPI data access (TODO)Data cleaning helpers (TODO)CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-09-30)Initial release (free data only)
Package: pyStatsCan
pyStatsCanCeci est un wrapper python pour le service de données web (SDW) de Statistique CanadaThis is a python wrapper for Statistics Canada Web Data Services (WDS)Documentation SDW / WDS documentationPour plus d'information sur le SDW de Statistique Canada, visiter leGuide de l'utilisateur.For more information on Statistics Canada WDS, visit theUser GuideÉtat de développement / Development statusCe projet est à l'étape deplanificationThis project in theplanningstage
Package: pystatsd
Introduction------------**pystatsd** is a client and server implementation of Etsy's brilliant statsdserver, a front end/proxy for the Graphite stats collection and graphing server.* Graphite- http://graphite.wikidot.com* Statsd- code: https://github.com/etsy/statsd- blog post: http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/**pystatsd** has [been tested on](http://travis-ci.org/sivy/py-statsd) python 2.5, 2.6, and 2.7.Status-------------Reviewing and merging pull requests, bringing stuff up to date, now with tests![![Build Status](https://secure.travis-ci.org/sivy/py-statsd.png?branch=master)](http://travis-ci.org/sivy/py-statsd)Usage-------------See statsd_test for sample usage:from pystatsd import Client, Serversrvr = Server(debug=True)srvr.serve()sc = Client('example.org',8125)sc.timing('python_test.time',500)sc.increment('python_test.inc_int')sc.decrement('python_test.decr_int')sc.gauge('python_test.gauge', 42)Building a Debian Package-------------To build a debian package, run `dpkg-buildpackage -rfakeroot`Upstart init Script-------------Upstart is the daemon management system for Ubuntu.A basic upstart script has been included for the pystatd server. It's locatedunder init/, and will be installed to /usr/share/doc if you build/install a.deb file. The upstart script should be copied to /etc/init/pystatd.conf andwill read configuration variables from /etc/default/pystatd. By default thepystatd daemon runs as user 'nobody' which is a good thing from a securityperspective.Troubleshooting-------------You can see the raw values received by pystatsd by packet sniffing:$ sudo ngrep -qd any . udp dst port 8125You can see the raw values dispatched to carbon by packet sniffing:$ sudo ngrep -qd any stats tcp dst port 2003
Package: pystatsd-hit9
Introduction------------**pystatsd** is a client and server implementation of Etsy's brilliant statsdserver, a front end/proxy for the Graphite stats collection and graphing server.* Graphite- http://graphite.wikidot.com* Statsd- code: https://github.com/etsy/statsd- blog post: http://codeascraft.etsy.com/2011/02/15/measure-anything-measure-everything/**pystatsd** has [been tested on](http://travis-ci.org/sivy/py-statsd) python 2.5, 2.6, and 2.7.Status-------------Reviewing and merging pull requests, bringing stuff up to date, now with tests![![Build Status](https://secure.travis-ci.org/sivy/py-statsd.png?branch=master)](http://travis-ci.org/sivy/py-statsd)Usage-------------See statsd_test for sample usage:from pystatsd import Client, Serversrvr = Server(debug=True)srvr.serve()sc = Client('example.org',8125)sc.timing('python_test.time',500)sc.increment('python_test.inc_int')sc.decrement('python_test.decr_int')sc.gauge('python_test.gauge', 42)Building a Debian Package-------------To build a debian package, run `dpkg-buildpackage -rfakeroot`Upstart init Script-------------Upstart is the daemon management system for Ubuntu.A basic upstart script has been included for the pystatsd server. It's locatedunder init/, and will be installed to /usr/share/doc if you build/install a.deb file. The upstart script should be copied to /etc/init/pystatsd.conf andwill read configuration variables from /etc/default/pystatsd. By default thepystatsd daemon runs as user 'nobody' which is a good thing from a securityperspective.Troubleshooting-------------You can see the raw values received by pystatsd by packet sniffing:$ sudo ngrep -qd any . udp dst port 8125You can see the raw values dispatched to carbon by packet sniffing:$ sudo ngrep -qd any stats tcp dst port 2003
Package: pystatslib
PyStatslibAuthors: Michael Dobo, Michael Gannon, Maia Bolko, Nicole MessinaThis python library is made up of 4 distinct classes: integration methods,
continuous probability density functions, discrete probability density functions,
and linear regression models. The library is designed to help students determine
the probability of any type of event using probability density functions.Installation Instructions:In order to use the PyStatsLib, simply just type this command in your command prompt:pip install pystatslibMake sure that you have updated python, pip, and all necessary libraries to have the library download.
Package: pystatusb
pystatusbControl a fit-statUSB from pythonThe statUSB is a tiny, USB LED that can be set display various colors and sequences. This library allows easy control of it from python.Use one of the simple helpers to set a color or sequence. After sending the configuration, the device will keep it without the python program running, and persist until a different color command is sent or the device is unplugged.frompystatusbimportStatUSB,Colorsled=StatUSB()# Auto-detect the deviceled.set_transition_time(200)# Set the fade time to 200ms between each colorled.set_color_rgb(0xff0000)# 100% bright redled.set_color(Colors.VIOLET,20)# 20% bright violetled.set_sequence("#0000FF-0500#00FFFF-0250#000000-0250")# Blue for 0.5 sec, cyan for 0.25 sec, off for 0.25 sec
Package: pystatuschecker
A very simple package for checking the status of a service and its componentsFree software: MIT licenseDocumentation:https://pystatuschecker.readthedocs.io.Examplesfromstatus_checkerimportStatusCheckerdefcheck_database(config):# ... check if it's up and either return a dictionary like# {'available': <bool>} or throw an exceptiondefcheck_other_service(config):# ... same as abovestatus_checker=StatusChecker(database=check_database,other_service=check_other_service)status_dict=status_checker.status(config)The status_dict include the state of the components
in the ‘components’ key, thefailure_count, and thestatusof the service as a wholeCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: py-status-checker
A very simple package for checking the status of a service and its componentsFree software: MIT licenseDocumentation:https://pystatuschecker.readthedocs.io.Examplesfromstatus_checkerimportStatusCheckerdefcheck_database(config):# ... check if it's up and either return a dictionary like# {'available': <bool>} or throw an exceptiondefcheck_other_service(config):# ... same as abovestatus_checker=StatusChecker(database=check_database,other_service=check_other_service)status_dict=status_checker.status(config)The status_dict include the state of the components
in the ‘components’ key, thefailure_count, and thestatusof the service as a wholeCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: pystb
Compute generalised second order Stirling numbers vialibstb.libstb“contains library routines that
provide alternative ways of computing generalised second order Stirling numbers
used in working with Pitman-Yor and Dirichlet processes (PYP and DP).”libstbis written by Wray Buntine.UsageAn instance of the classSTableprovides access to (pre-calculated)
generalized Stirling numbers of the second kind,\(S^n_{m,a}\). Initialize
the table with the maximumnand maximummwhich will be needed.>>> import pystb
>>> stable = pystb.STable(10000, 10000, 0.5)
>>> stable.S(5, 3)  # S^5_{3, 0.5}
>>> stable[5, 3]  # alias for stable.S(5, 3)
Package: pystdatm
pystdatmPython Package for Standard AtmosphereThe set of functions follow International Standard Atmosphere model.Note: Currently only Troposphere supported and SI units.Sample Code:frompystdatmimportdensity,pressurealt=1000.0# metres above sea levelrho=density(alt)print(f'rho ={rho:.3f}kg/m**3')p=pressure(alt)print(f'p ={p:.0f}Pa')Sample Output:rho = 1.112 kg/m**3
p = 89936 Pa
Package: pystdf
PySTDF is a Python module that makes it easy to work with STDF (Teradyne"s Standard Test Data Format). STDF is a commonly used file format in semiconductor test -- automated test equipment (ATE) from such vendors as Teradyne, Verigy, LTX, Credence, and others support this format.PySTDF provides event-based stream parsing of STDF version 4, along with indexers that can help you rearrange the data into a more useful tabular form, as well as generate missing summary records or new types of derivative records.The parser architecture is very flexible and can easily be extended to support STDF version 3 as well as custom record types.Potential applications of PySTDF include:* Debugging a vendor"s STDF implementation* Straight conversion to ASCII-readable form* Repairing STDF files* Developing an application that leverages STDF- Conversion to tabular form for statistical analysis tools- Loading data into a relational databasePySTDF is released under a GPL license. Applications developed with PySTDF can only be released with a GPL-compatible license. Commercial applications can purchase an alternate license agreement for closed-source distribution.
Package: pysteamauth
Asynchronous python library for Steam authorization using protobufInstallpipinstallpysteamauthUsagefrompysteamauth.authimportSteamasyncdefmain():steam=Steam(login='login',password='password',)awaitsteam.login_to_steam()awaitsteam.request('https://steamcommunity.com')awaitsteam.request('https://store.steampowered.com')awaitsteam.request('https://help.steampowered.com')If account have Steam Guardfrompysteamauth.authimportSteamsteam=Steam(login='login',password='password',shared_secret='shared_secret',)Cookie storageLibrary uses default cookie storageBaseCookieStorage, which stores Steam cookies in application memory.
But you can write own cookie storage. For example, redis storage:importjsonfromtypingimportDictfromaioredisimportRedisfrompysteamauth.abstractimportCookieStorageAbstractfrompysteamauth.authimportSteamclassRedisStorage(CookieStorageAbstract):redis=Redis()asyncdefset(self,login:str,cookies:Dict)->None:awaitself.redis.set(login,json.dumps(cookies))asyncdefget(self,login:str,domain:str)->Dict:cookies=awaitself.redis.get(login)ifnotcookies:return{}returnjson.loads(cookies).get(domain,{})asyncdefmain():steam=Steam(login='login',password='password',cookie_storage=RedisStorage(),)awaitsteam.login_to_steam()Error processingfrompysteamauth.authimportSteamfrompysteamauth.errorsimportSteamErrorasyncdefmain():try:awaitSteam('login','password').login_to_steam()exceptSteamErroraserror:print(error)Orfrompysteamauth.authimportSteamfrompysteamauth.errorsimportSteamError,custom_error_exceptionclassLoginError(SteamError):...classRateLimitExceeded(SteamError):...custom_error_exception({5:LoginError,84:RateLimitExceeded,})asyncdefmain():try:awaitSteam('login','password').login_to_steam()exceptLoginErroraserror:print(error)Output{'error': 'InvalidPassword', 'code': 5}Proto fileshttps://github.com/SteamDatabase/Protobufs/blob/master/steam/enums.protohttps://github.com/SteamDatabase/Protobufs/blob/master/steam/steammessages_base.protohttps://github.com/SteamDatabase/Protobufs/blob/master/steam/steammessages_auth.steamclient.protohttps://github.com/SteamDatabase/Protobufs/blob/master/steam/steammessages_unified_base.steamclient.protoLicenseMIT
Package: py-steamcmd-installer
py_steamcmd_installerSimple tool to install steam apps via python using the steamcmdPrerequisitesMake sure steamcmd and python is installedInstallingpipinstallpy_steamcmd_installerHow to use:# import the packagefrompy_steamcmd_installerimportpy_steamcmd_installer# create a steamcmd object and give the steamcmd path as an argumentsteamcmd=py_steamcmd_installer.Steamcmd("/usr/bin/steamcmd")# create a function that handels the process outputdefoutput_parser(output):print("output: "+output)# set the output parsersteamcmd.handleOutput=output_parser# install a serversteamcmd.installServer(4020,"../server_path")
Package: pysteamlib
Asynchronous python library for work with SteamInstallpipinstallpysteamlibUsageAccount APIfromsteamlib.apiimportSteamAPIfromsteamlib.api.accountimportPrivacyInfofromsteamlib.api.account.schemasimportProfileInfoasyncdefusage(api:SteamAPI):current_tradelink:str=awaitapi.account.get_tradelink()new_tradelink:str=awaitapi.account.register_tradelink()privacy_settings:PrivacyInfo=awaitapi.account.get_current_privacy()profile_info:ProfileInfo=awaitapi.account.get_current_profile_info()api_key:str=awaitapi.account.register_api_key('example.com')Trade APIfromsteamlib.apiimportSteamAPIfromsteamlib.api.tradeimportAsset,JsonTradeoffer,Me,SendOfferRequest,SendOfferResponse,Them,TradeOfferParamsasyncdefusage(api:SteamAPI):response:SendOfferResponse=awaitapi.trade.send_offer(request=SendOfferRequest(partner=steamid64,json_tradeoffer=JsonTradeoffer(me=Me(assets=[Asset(appid='730',contextid='2',assetid='123456789')]),them=Them(assets=[Asset(appid='730',contextid='2',assetid='987654321')],),),sessionid=sessionid,trade_offer_create_params=TradeOfferParams(trade_offer_access_token='token',),),)ifresponse.needs_mobile_confirmation:confirmation_result:bool=awaitapi.trade.mobile_confirm_by_tradeofferid(tradeofferid=response.tradeofferid,)LicenseMIT
Package: pysteamupload
PySteamUploadA convenient tool to upload easily your binaries to Steam.How does it work ?PySteamUploadrequires two environment variables:STEAM_USERNAMESTEAM_PASSWORDInitialize SteamCMDExecute then initialize SteamCMD with provided command:python -m pysteamupload initialize_onlyUploadpython -m pysteamupload upload --app_id="123456" --depot_id="1234567" --build_description="My first upload" --content_path="C:\Temp\MyBinariesAreLocatedHere"Packagingpython -m pip install twine setuptools wheelpython setup.py sdist bdist_wheelpython -m twine upload dist/*