Saravanan666/pypi-org huggingface dataset:
Package: pyfping
pyfpingping-like pythonic pinger, works for multiple hostsusage: ping.py [-h] [-f FILENAME] [-c COUNT] [-i INTERVAL] [-s SIZE] [host]

python ping script similar to fping

positional arguments:
  host                  single target host

optional arguments:
  -h, --help            show this help message and exit
  -f FILENAME, --file FILENAME
                        file contains host list
  -c COUNT, --count COUNT
                        icmp packet count to a destination
  -i INTERVAL, --interval INTERVAL
                        icmp packet interval to a destination
  -s SIZE, --size SIZE  icmp packet sizeResult is like below:admin$ pyfping -f some_file_contain_target_hosts
Ping www.baidu.com (110.242.68.3): 98 data bytes
Ping www.taobao.com (121.29.9.227): 98 data bytes
106 bytes from www.baidu.com(110.242.68.3): icmp_seq=0 ttl=44 time=44.3398 ms
106 bytes from www.taobao.com(121.29.9.227): icmp_seq=0 ttl=46 time=38.8643 ms
106 bytes from www.baidu.com(110.242.68.3): icmp_seq=1 ttl=44 time=44.9580 ms
106 bytes from www.taobao.com(121.29.9.227): icmp_seq=1 ttl=46 time=38.3545 ms
106 bytes from www.baidu.com(110.242.68.3): icmp_seq=2 ttl=44 time=44.3999 ms
106 bytes from www.taobao.com(121.29.9.227): icmp_seq=2 ttl=46 time=38.4810 ms
106 bytes from www.baidu.com(110.242.68.3): icmp_seq=3 ttl=44 time=44.8110 ms
106 bytes from www.taobao.com(121.29.9.227): icmp_seq=3 ttl=46 time=39.9470 ms

--- www.baidu.com ping statistics ---
4 packets transmitted, 4 packets received, 0.00% packet loss
round-trip min/avg/max/stddev = 44.34/44.63/44.96/0.26 ms

--- www.taobao.com ping statistics ---
4 packets transmitted, 4 packets received, 0.00% packet loss
round-trip min/avg/max/stddev = 38.35/38.91/39.95/0.63 ms
Package: pyFPLdata
IntroductionThis data contains a large variety of information on players and their
current attributes on Fantasy Premier Leaguehttps://fantasy.premierleague.com/. In particular, it contains anext_gw_points(next gameweek points) value for each player
given their attributes in the current week. Rows represent player-gameweeks,
i.e. for each player there is a row for each gameweek. This
makes the data suitable for modelling a player's next gameweek points, given
attributes such as form, total points, and cost at the current gameweek.This data, therefore, is in theideal formatto create Fantasy Premier League bots (for example that use an ML algorithm and a linear programming solver) to return the best possible team to pick for each gameweek (and therefore the transfers to make), thereby fully automating the decision making process in Fantasy Premier League. This single-function package simply supplies the required data for such a task.Usagefrom pyFPLdata import FPLdata
FPLdata()
Package: pyfqmr
Cython wrapper aroundsp4acerat’s quadrics mesh reduction
algorithm.Requirements:NumpyCython(only for compilation, but not needed if installed from PyPI)Installation :pyfqmr can be installed viapip:pipinstallpyfqmrCompilation :Run:pythonsetup.pyinstallUsage:>>>#We assume you have a numpy based mesh processing software>>>#Where you can get the vertices and faces of the mesh as numpy arrays.>>>#For example Trimesh or meshio>>>importpyfqmr>>>importtrimeshastr>>>bunny=tr.load_mesh('example/Stanford_Bunny_sample.stl')>>>#Simplify object>>>mesh_simplifier=pyfqmr.Simplify()>>>mesh_simplifier.setMesh(bunny.vertices,bunny.faces)>>>mesh_simplifier.simplify_mesh(target_count=1000,aggressiveness=7,preserve_border=True,verbose=10)iteration0-triangles112402threshold2.187e-06iteration5-triangles62674threshold0.00209715iteration10-triangles21518threshold0.0627485iteration15-triangles9086threshold0.61222iteration20-triangles4692threshold3.40483iteration25-triangles2796threshold13.4929iteration30-triangles1812threshold42.6184iteration35-triangles1262threshold114.416simplifiedmeshin0.2518seconds>>>vertices,faces,normals=mesh_simplifier.getMesh()Controlling the reduction algorithmParameters of the ‘’’simplify_mesh’’’ method that can be tuned.target_countTarget number of triangles.update_rateNumber of iterations between each update.max_iterationsMaximal number of iterationsaggressivenessParameter controlling the growth rate of the threshold at each iteration when lossless is False.preserve_borderFlag for preserving the vertices situated on open borders. Applies the method described inthis issue.alphaParameter for controlling the threshold growth. Exact implication described below.KParameter for controlling the threshold growth. Exact implication described below.losslessFlag for using the lossless simplification method. Sets the update rate to 1 .threshold_losslessMaximal error after which a vertex is not deleted, only when the lossless flag is set to True.verboseControls verbosityImplications of the parameters of the threshold growth rate (when not in lossless mode) :$$threshold = alpha * (iteration + K)^{agressiveness}$$More information is to be found on Sp4cerat’s repository :Fast-Quadric-Mesh-SimplificationHuge thanks to Sp4cerat for making his code available!
Package: pyfr
PyFR is an open-source Python based framework for
solving advection-diffusion type problems on streaming architectures
using the Flux Reconstruction approach of Huynh. The framework is
designed to solve a range of governing systems on mixed unstructured
grids containing various element types. It is also designed to target a
range of hardware platforms via use of an in-built domain specific
language derived from the Mako templating engine.
Package: pyfract
PyFractA simple implementation of fraction numbers in Python. In some cases it is better than default Python library for fractions.Instalationpip install pyfractRunning testschmod +x run-tests.sh
./run-tests.shUsageInitializationfrompyfract.fractionimportFractionf=Fraction(1,2)print(f)# [1/2]f=Fraction(numerator=1,denominator=2)print(f)# [1/2]Mathematical operationsYou can use all of the math operations with other fraction, int or float as shown in the example belowfrompyfract.fractionimportFractionf1=Fraction(1,2)f2=Fraction(1,4)print(f1+f2)# [3/4]print(f1-f2)# [1/4]print(f1*f2)# [1/8]print(f1/f2)# [2/1]print(f1+2)# [5/2]print(f1-2)# [-3/2]print(f1*2)# [1/1]print(f1/2)# [1/4]ComparisonsYou can compare fractions using operators like greater than, less than and so on...frompyfract.fractionimportFractionf1=Fraction(1,2)f2=Fraction(1,4)print(f1<f2)# Falseprint(f1<=f2)# Falseprint(f1>f2)# Trueprint(f1>=f2)# Trueprint(f1==f2)# Falseprint(f1!=f2)# Trueprint(f1<0.5)# Falseprint(f1<=0.5)# Trueprint(f1>0.5)# Falseprint(f1>=0.5)# Trueprint(f1==0.5)# Trueprint(f1!=0.5)# FalseConversion from floatfrompyfract.fractionimportFractionprint(Fraction.from_float(0.5))# [1/2]print(Fraction.from_float(0.134))# [67/500]Accurate conversion from floatFast conversion from float doesn't work so well for float like0.333333333333333333. This method is much slower, but allows to convert floats more accuratelyfrompyfract.fractionimportFractionx=1/3print(x)# 0.3333333333333333f=Fraction.from_float_accurately(x)print(f)# [1/3]accuracydefines up to how many decimal places the fraction must be accurate. By default it is8frompyfract.fractionimportFractionf=Fraction.from_float_accurately(0.31987398749812214,accuracy=10)print(f)# [44981/140621]To floatfrompyfract.fractionimportFractionf=Fraction(1,2)print(f.to_float())# 0.5ContributingMake a fork of this repository, clone codebase, create new branch, make your changes, commit it, push to remote, create pull request to this repository. Any contribution highly appreciated
Package: pyFractaler
DescriptionAn example fractal generator in python.Usage:IMPORT:import pyFractalerSTART FRACTAL:angle = 90 # you angle can be 60,130...iterations = 4 # you iterations can be 7,10...fractal =pyFractal.Fractal('youcode generator', angle, iterations)fractal.start()YOU CODE GENERATOR SYNTAX:F- go forward+- rotate to angle-- rotate to -angleEXAMPLE CODE GENERATOR:F+F--F+F--F+F--F+F--F+F--F+F, 60, 7 - Koch snowflakeF-F+F+FFF-F-F+F+F-F+F+FFF-F-F+F+F-F+F+FFF-F-F+F+F-F+F+FFF-F-F+F, 90, 4 - Koha square islandANOTHER:pyFractal.RuledFractal(...)see in github.
Package: pyfractals
PyFractalsVisualising the equation which revolutionized maths!Python Module which creates the fractals design.Mandelbrot equation:ƒ(z) = z² + cwherec is any complex numberis used to make the famous mandel brot fractals.It can show the fractals design by:Plotting the fractals design on graph.Save the fractals design as an image file.InstallationSimply using PyPi:pip install pyfractalsUsageSimply run the following python code:frompyfractalsimportMandelBrotMandelBrot(mode="image/graph",optional_params)Thats it!Parametersmode (Required):Specifies how one wants to visualize the fractals design, "image" for saving the design as a picture file, "graph" for plotting the design on graph.accuracy_factor (Optional):Greater the accuracy_factor, more detailed is the fractals design and more processing power and time is required (Defualt: 1000).save_file_path (Optional):If mode is set to "image", then this specefies the path were the image file has to be saved (Default: Same as your python file).So go ahead and enjoy the beautiful and complex MandelBrot Fractals Design!
Package: py-fractreg
IntroductionThe package py_fractreg is a collection of functions to estimate various regression models for fractional outcomes
in the range of (0, 1). In the context of credit risk, LGD (loss given default) measures the proportion of losses
not recovered from a default borrower. Therefore, the fractional outcome models can be useful to estimate LGD.Fractional Outcome Regressions
  |
  |-- Beta Regression
  |     |
  |     |-- beta0_reg() : Fixed Dispersion
  |     |
  |     `-- beta_reg()  : Varying Dispersion
  |
  `-- Simplex Regression
        |
        |-- simplex0_reg() : Fixed Dispersion
        |
        `-- simplex_reg()  : Varying DispersionReferenceWenSui Liu and Jason Xin (2014), Modeling Fractional Outcomes with SAS, Proceedings SAS Global Forum 2014, paper 1304-2014.
Package: pyfragments
PyFragmentsAdd animated figures to yourQuartopresentations.Installpip install pyfragmentsExampleARevealjspresentation created with Quarto,
which displays ananimatedmatplotlib figure:This is created with the following code,
in a Quarto.qmdfile.---
format: revealjs
---

## Example of an animated figure

Move to the next slide to see the transitions.

```{python}
# | output: asis
import matplotlib.pyplot as plt
from pyfragments import AnimatedFigure

with AnimatedFigure() as ani:
    plt.xlim(0, 10)
    plt.ylim(0, 10)
    for i in range(10):
        with ani.fragment():
            plt.scatter(i, i)

```
Package: pyfrag-plotter
PyFrag PlotterIntroductionThe package contains python scripts that can be used to plot the results of pyfrag calculations (see thePyFrag program). PyFrag is a program written at the Vrije Universieit Amsterdam to analyze reaction coordinates of reactions using quantum mechanical software. The analysis methods consist of the"Activation Strain Model"and"Energy Decomposition Analysis". The package is still in development as of 2023 and will be updated regularly.PurposePyFrag generates a .txt file with the results of the calculations. The format is one (relatively) large table containing energy terms for every point on the intrinsic reaction coordinate (IRC) that has been calculated. The file can be readily exported to software such as Excel or Origin to plot the results. However, this is a tedious process and requires a lot of manual work. This package contains scripts that can be used to plot the results of the calculations. Especially when multiple plots need to be made, and something has to be changed in the end, this package can save a lot of time.InstallationThere are several ways to install the package. The package is still in development and will be available on PyPI in the future. For now, the package can be installed locally or in a jupyter notebook environment.Local: first clone the github page and move to the directory. Then install it locally in your python environment withpip install -e .JupyterNotebook: Run the following command in the jupyter notebook:!pip install -e .PyPI:pip install pyfrag_plotterSimple scriptTutorials covering key functionality can be found in theexample folder. The folder contain a plain python script, and a JupyterNotebook script with more explanations. Thesimple scriptis a good place to start quickyl. The moredetailed scriptis if you want to know more about how the package works. This script covers the basic functionality of the package and shows how to plot the results of a pyfrag calculation.DocsDocumentationis available using ReadtheDocs and GitHub Pages. Still in development.AuthorsSiebe Lekanne Deprez, PhD student at the Vrije Universiteit Amsterdam (VU) working in the theoretical chemistry department.LicenseThis package is licensed under theMIT License.How to citeLekanne Deprez, S.J., PyFragPlotter, 2023,https://github.com/SiebeLeDe/pyfrag_plotHow to contributeEveryone is welcome to contribute to this project. Please do so by making a pull request and/or raising an issue. Preferably, please use the Google Python Style Guide and the Google docstring style when writing code (including docstrings!).DependenciesPlease visit therequirements filefor a list of dependencies. The whole package is written in a python environment and is compatible for python versions 3.6 and higher.Contact MeIf you wish to contact me, please do so by sending an email tomy mail adres, or by raising an issue on GitHub.FAQLet me know if there are questions so that I could include this further!
Package: pyframe2
Bumbo: Python Web Framework built for learning purposesBumbo is a Python web framework built for learning purposes.It's a WSGI framework and can be used with any WSGI application server such as Gunicorn.InstallationpipinstallbumboHow to use itBasic usage:frombumbo.apiimportAPIapp=API()@app.route("/home")defhome(request,response):response.text="Hello from the HOME page"@app.route("/hello/{name}")defgreeting(request,response,name):response.text=f"Hello,{name}"@app.route("/book")classBooksResource:defget(self,req,resp):resp.text="Books Page"defpost(self,req,resp):resp.text="Endpoint to create a book"@app.route("/template")deftemplate_handler(req,resp):resp.body=app.template("index.html",context={"name":"Bumbo","title":"Best Framework"}).encode()Unit TestsThe recommended way of writing unit tests is withpytest. There are two built in fixtures
that you may want to use when writing unit tests with Bumbo. The first one isappwhich is an instance of the mainAPIclass:deftest_route_overlap_throws_exception(app):@app.route("/")defhome(req,resp):resp.text="Welcome Home."withpytest.raises(AssertionError):@app.route("/")defhome2(req,resp):resp.text="Welcome Home2."The other one isclientthat you can use to send HTTP requests to your handlers. It is based on the famousrequestsand it should feel very familiar:deftest_parameterized_route(app,client):@app.route("/{name}")defhello(req,resp,name):resp.text=f"hey{name}"assertclient.get("http://testserver/matthew").text=="hey matthew"TemplatesThe default folder for templates istemplates. You can change it when initializing the mainAPI()class:app=API(templates_dir="templates_dir_name")Then you can use HTML files in that folder like so in a handler:@app.route("/show/template")defhandler_with_template(req,resp):resp.html=app.template("example.html",context={"title":"Awesome Framework","body":"welcome to the future!"})Static FilesJust like templates, the default folder for static files isstaticand you can override it:app=API(static_dir="static_dir_name")Then you can use the files inside this folder in HTML files:<!DOCTYPE html><htmllang="en"><head><metacharset="UTF-8"><title>{{title}}</title><linkhref="/static/main.css"rel="stylesheet"type="text/css"></head><body><h1>{{body}}</h1><p>This is a paragraph</p></body></html>MiddlewareYou can create custom middleware classes by inheriting from thebumbo.middleware.Middlewareclass and overriding its two methods
that are called before and after each request:frombumbo.apiimportAPIfrombumbo.middlewareimportMiddlewareapp=API()classSimpleCustomMiddleware(Middleware):defprocess_request(self,req):print("Before dispatch",req.url)defprocess_response(self,req,res):print("After dispatch",req.url)app.add_middleware(SimpleCustomMiddleware)
Package: py-framels
py_framelssupportDescriptionpy_framels is a python binding to useframelsrust lib in pythonFor documentation about framels:doc guideThe module only support 3 functions at the time.Installpip install py-framelsUsageExempleimportpy_framelsprint(py_framels.py_basic_listing(["toto.0001.tif","toto.0002.tif"]))Should return['toto.****.tif@1-2']Functionspy_basic_listingThe function provide a packing of the frame sequences using framls format.importpy_framelsprint(py_framels.py_basic_listing(["toto.0001.tif","toto.0002.tif"]))Should return['toto.****.tif@1-2']py_parse_dirThe function list all the files and folders in specific directory and pack themimportpy_framelspy_framels.py_parse_dir("./fls/samples/big")Return['RenderPass_Beauty_1_*****.exr@0-96', 'RenderPass_DiffuseKey_1_*****.exr@0-96', 'RenderPass_Diffuse_1_*****.exr@0-96', 'RenderPass_Id_1_*****.exr@0-96', 'RenderPass_IndDiffuse_1_*****.exr@0-96', 'RenderPass_Ncam_1_*****.exr@0-41,43-96', 'RenderPass_Ncam_1_00042.exr.bkp', 'RenderPass_Occlusion_1_*****.exr@0-73,75-96', 'RenderPass_Occlusion_1_***.exr@74', 'RenderPass_Pcam_1_*****.exr@0-96', 'RenderPass_Reflection_1_*****.exr@0-96', 'RenderPass_SpecularRim_1_*****.exr@0-96', 'RenderPass_Specular_1_*****.exr@0-96']py_recursive_dirimportpy_framelspy_framels.py_recursive_dir("./fls/samples")Return['RenderPass_Beauty_1_*****.exr@0-96', 'RenderPass_DiffuseKey_1_*****.exr@0-96', 'RenderPass_Diffuse_1_*****.exr@0-96', 'RenderPass_Id_1_*****.exr@0-96', 'RenderPass_IndDiffuse_1_*****.exr@0-96', 'RenderPass_Ncam_1_*****.exr@0-41,43-96', 'RenderPass_Ncam_1_00042.exr.bkp', 'RenderPass_Occlusion_1_*****.exr@0-73,75-96', 'RenderPass_Occlusion_1_***.exr@74', 'RenderPass_Pcam_1_*****.exr@0-96', 'RenderPass_Reflection_1_*****.exr@0-96', 'RenderPass_SpecularRim_1_*****.exr@0-96', 'RenderPass_Specular_1_*****.exr@0-96', 'aaa.***.tif@1-5', 'big', 'foo_bar.exr', 'mega', 'response_1689510067951.json', 'samples', 'small']BenchmarkThis is benchmarks of the python binding py-framels vs pyseq at diffirent level of inputs.
Time is always in seconds.paths1251050py_framels0.0049660.0002010.0001250.0002030.0009990.001802pyseq4.4e-050.0001720.0002910.0006450.0028170.005725paths10010002000025000py_framels0.0021730.0159750.3592720.420266pyseq0.0055920.0601212.6322833.918997Note: there is an acceleration at the level of 20000 paths, this is due to the fact
framels is multi-threaded at a threshold of 100000 paths and the bench simulate
5 aovs ( 5 x 20 000 = 100 000 paths ).
Package: pyframes
pyframesPython package for interfacing with the frames.ai database.Create an account atspothole.sensorit.ioto get started.Installpip3 install pyframesExamplesSign in to your accounthere.Get your JWThere.import pyframes
fm = pyframes.FramesManager()

# replace with your acquired JWT 
fm.set_jwt("<JWT>")

# find some record ids in Cape Town
ids = fm.search(lat=-33.918861, lon=18.423300, radius=1000)
print(ids)

# print some info about the record
record = fm.get_record(ids[0])
print(record.id, record.uint32_t_created)
Package: pyfrc
pyfrc - RobotPy simulation and testing supportpyfrc provides simulation and testing support for RobotPy projects.This library contains a few primary parts:Integration with the pytest testing tool to allow you to easily write unit
tests for your robot code.Various support for robot simulationDocumentationRobotPy documentation:https://robotpy.readthedocs.ioInstallation:https://robotpy.readthedocs.io/en/stable/install/pyfrc.htmlContributing new changespyfrc is intended to be a project that all members of the FIRST community can
quickly and easily contribute to. If you find a bug, or have an idea that you
think others can use:Fork this git repositoryto your github accountCreate your feature branch (git checkout -b my-new-feature)Commit your changes (git commit -am 'Add some feature')Push to the branch (git push -u origin my-new-feature)Create new Pull Request on githubAuthorsDustin Spicuzza (dustin@virtualroadside.com)Contributors:Sam RosenblumJames WardChristian BalcomOtherspyfrc is originally derived from (and supercedes) fake_wpilib, which was
developed with contributions from Sam Rosenblum and Team 2423.
Package: pyfredapi
pyfredapi - Python library for the Federal Reserve Economic Data (FRED) APICI/CDDocsPackageMetapyfredapiis a full featured Python library that makes it is easy to retrieve data from theFederal Reserve Economic Data(FRED) API web service.pyfredapicovers all the FRED api endpoints, and can retrieve data fromFREDandALFRED. Data can be returned as apandasdataframe or json. Requests to the FRED API can be customized according to the parameters made available by the web service endpoints.DocumentationThedocumentationis made withSphinxand hosted onRead the Docs.Installationpipinstallpyfredapi# install with plotting dependenciespipinstall'pyfredapi[plot]'Quick StartFRED API KeyBefore usingpyfredapiand must have an API key to the FRED API web service. You can apply forone for freeon the FRED website.You can set your API key in two ways:set your API key to the environment variableFRED_API_KEYpass it to theapi_keyparameter of the request functionYou can set the API key as an environment variable by adding the following line to your~/.zshrc,~/.bashrcfile:exportFRED_API_KEY="your_api_key"Using pyfredapiEach of the FRED API endpoint namespaces is covered by a module inpyfredapi. For a deeper dive into each of the modules see the tutorials and API reference in thedocumentation.category- covers the FRED Categories endpointsmaps- covers the FRED Maps endpointsrelease- covers the FRED Releases endpointsseries- covers the FRED Series endpointssources- covers the FRED Sources endpointstags- covers the FRED Tags endpointsseries_collection- makes handling multiple series easierQuick start example:importpyfredapiaspf# api key set as environment variablepf.get_series(series_id="GDP")# api key passed to the functionpf.get_series(series_id="GDP",api_key="my_api_key")ContributingThank you for your interest in contributing topyfredapi. Check out thecontributing guideto get started.