Saravanan666/pypi-org huggingface dataset:
Package: pygraphv
PygraphvPygraphv- python library for generating dot programming language for creating graphviz graphs from python OO style code.ExamplesBasic graph:frompygraphv.graphimportGraphfrompygraphv.nodeimportNodefrompygraphv.styleimportGraphStyle# Chose one of this# You can look at difference in Graphviz docs# digraph = Digraph("Digraph")graph=Graph("Graph")# Adds node with name A, that has child node Ba=Node("A")graph.add_node(a)graph.add_node(Node("B"),parent=a)# Generates .dot file for your graph and saves it in "Your first graph.dot"# And renders it to svg file, needs dot compiler installed and added to pathgraph.render("Your first graph")Styles:frompygraphv.graphimportDigraphfrompygraphv.styleimport*frompygraphv.nodeimportNode# Now digraph example# Only difference to regular graph is arrows at ends of connectionsgraph=Digraph("Graph",styles=[GraphStyle(bgcolor="lightblue"),GraphStyle(href="github.com/farkon00")])# Adds node with name A, that has child node Ba=Node("A",styles=NodeStyle(color="red",shape="box"))graph.add_node(a)graph.add_node(Node("B"),label="Styled edge",parent=a,styles=EdgeStyle(arrowhead="box"))# Generates .dot file for your graph and saves it in "Styles.dot"# And renders it to svg file, needs dot compiler installed and added to pathgraph.render("Styles")Clusters:frompygraphv.graphimportGraph,Clusterfrompygraphv.styleimport*frompygraphv.nodeimportNodegraph=Graph("Graph")# Adds node with name A, that has child node Ba=Node("A")graph.add_node(a)graph.add_node(Node("B"),parent=a)# Creates cluster and adds cycle of 3 nodes, connected to node A# Can be compressed to one style object# But you can use GraphStyle on clusterscluster=Cluster("Cluster",styles=(GraphStyle(bgcolor="lightgreen"),ClusterStyle(style="dotted")))node1=Node("1")cluster.add_node(node1)a.children.append(node1)cluster.add_node(Node("2"),parent=node1)cluster.add_node(Node("3"),parent=node1)graph.add_node(node1.children[-1].node,parent=node1.children[-2].node)graph.add_subgraph(cluster)# Generates .dot file for your graph and saves it in "Clusters.dot"# And renders it to svg file, needs dot compiler installed and added to pathgraph.render("Clusters")
Package: pygraphviz
PyGraphviz is a Python interface to the Graphviz graph layout and
visualization package.
With PyGraphviz you can create, edit, read, write, and draw graphs using
Python to access the Graphviz graph data structure and layout algorithms.
PyGraphviz provides a similar programming interface to NetworkX
(https://networkx.org).Website (including documentation):https://pygraphviz.github.ioMailing list:https://groups.google.com/forum/#!forum/pygraphviz-discussSource:https://github.com/pygraphviz/pygraphvizBug reports:https://github.com/pygraphviz/pygraphviz/issuesSimple example>>>importpygraphvizaspgv>>>G=pgv.AGraph()>>>G.add_node("a")>>>G.add_edge("b","c")>>>print(G)strict graph "" {
        a;
        b -- c;
}InstallPyGraphviz requires Graphviz.
Please seeINSTALL.txtfor details.LicenseReleased under the 3-Clause BSD license (seeLICENSE):Copyright (C) 2006-2024 PyGraphviz Developers
Aric Hagberg <aric.hagberg@gmail.gov>
Dan Schult <dschult@colgate.edu>
Manos Renieris
Package: pygrappa
Online documentationhereGRAPPA is a popular parallel imaging reconstruction algorithm.
Unfortunately there aren’t a lot of easy to use Python
implementations of it or its many variants available, so I decided to
release this simple package.There are also a couple reference SENSE-like implementations that
have made their way into the package.  This is to be expected – a
lot of later parallel imaging algorithms have hints of both GRAPPA-
and SENSE-like inspirations.Installation should be quick:pip install pygrappa
Package: py-gravatar
PyGravatar is a set of Python bindings for the Gravatar API.Getting StartedTo install, runpip installpy-gravatar. To verify that the
library is working and can connect to the server, run:>>> import gravatar
>>> user = gravatar.User(<email>, password=<password>) # substitute the email address and password of a Gravatar account
>>> user.test()
1315290974 # however many seconds have passed since 1970DocumentationFull API documentation is availablehere. For more
information, see thehome page.
Package: pyGRBaglow
pyGRBaglow: GRB afterglow modelling with standard synchrotron modelFree software: MIT licenseDocumentation:https://pyGRBaglow.readthedocs.io.Development statusFeaturesCompute Gamma-Ray Burst light curves using:standard synchrotron model ofGranot&Sari+02.empirical templates (Single power-law, Broken power-law)These simulated light curves are extinguished along the line of sight due to the type and amount of dust in the host galaxy, and due to photons absorbed in the Intergalactic medium.Different extinction laws fromPei+92to compute amount of extinction along one line of sight occuring for a given wavelength at a given redshift.Intergalactic medium (IGM) mean transmission along one line of sight for a given redshift for a given redshift. 2 models available:Madau+95andMeiksin+06.Photoelectric absorption model based on cross sections ofMcCammon+93.Use of cython to speed up the execution time, as well as parallelisation using openmp.Build successfully on Linux, macOS and Windows.Installationpip install pyGRBaglowCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: pygrb-lc
pygrb_lcPackage to load and handle GRB (Gamma-ray bursts) light curves, their furie transformations and various other functions.To install run the following commandpipinstall--upgradepygrb_lcorpip3install--upgradepygrb_lcLight curvesMain object in this package is LightCurve object and its children. Start by creating onefrompygrb_lc.light_curvesimportLightCurve# base class for ligth curvelc=LightCurve()print(lc)It is created but empty, semplest way to provide data is bydataargument, that requiresnumpy.ndarraywith 2 (time, signal) or 4 (time, time_err, signal, signal_err) columnsimportnumpyasnpdata=np.loadtxt('test.txt')lc=LightCurve(data=data)print(lc)Base class can rebin data, subtract polynomial function, filter peaks, set intervals and load and save data toLIGHT_CURVE_SAVEfolder in pickle format.There are specific classes for INTERAL/SPI-ACS and Fermi/GBM instruments. They are able to load actual data from web, you need to specify it in loading_method parameterfrompygrb_lc.light_curvesimportSPI_ACS_LightCurve,GBM_LightCurvelc1=SPI_ACS_LightCurve('2020-01-01 00:00:00',500,loading_method='web')lc2=GBM_LightCurve('2020-01-01 00:00:00',['na'],duration=500,loading_method='web')Furie transformationsFurie transformation is performed by FurieLightCurve class. It requires LightCurve object as an argumentfrompygrb_lc.furieimportFurieLightCurvelc=LightCurve(data=np.loadtxt('test.txt'))flc=FurieLightCurve(lc,interval_t90=(0,10))flc.plot()All classes have plot method, you can provide matplotlib.pyplot.Axes object as an argument to plot on existing plotfig,(ax1,ax2)=plt.subplots(2,1)lc.plot(ax=ax1)flc.plot(ax=ax2)CatalogCatalogclass is an extension of pandas.DataFrame. It provides simplicity of manipulations and visualization and extend it with crossmatching functionality. Easiest way to start using it is to create it from existing tabular data. It is important to provideevent_columnargument, it is the name of column that will be used for crossmatching and comparisonfrompygrb_lc.catalogsimportCatalogimportpandasaspdimportnumpyasnpdata=np.loadtxt('test.txt')cat=Catalog(data,columns=['datetime','duration'],event_column='datetime')cat.find_event(pd.Timestamp('2023-01-01 00:00:00'),precision=10)precision(in seconds) controls uncertainity that is allowed for the event. If there is no such event method will returnNone.
There is a method of crossmatching two catalogscrossmatch, it works like inner join for SQL tables, but compares only correspondingevent_columncolumns and allows uncertainity viaprecision.precision = 0equals to exact match.RoadmapAdd support ofLightCurveclass inCatalogAdd support of spectra (based on currentphoton_datainGBM_LightCurveclass)
Add typical functions for approximation: Band function, power law, etc. and their interaction withLightCurveandFurieLightCurveclasses.
Package: pygreatcircledistance
pyGreatCircleDistanceCalculate the distance between two GPS coordinates in metersInstallationpip install pyGreatCircleDistance -UExamplefrompygreatcircledistanceimportvincenty_formuladist=vincenty_formula((77.1539,-120.398),(77.1804,129.55))print(dist)# 2332668.5392066096 meters
Package: pygredients
PygredientsVersion 0.1.3Pygredients is an open-source Python library for data structures, algorithms and design patterns available on PyPi. 🍎🍊🍋🫐InstallationYou can install Pygredients using pip:pip install pygredientsFor macOS users, please use the following command:pip3 install pygredientsUsageTo use Pygredients in your Python code, import it as follows:importpygredientsData StructuresLinked ListYou can create a linked list, add nodes to it, remove nodes from it, and perform other operations using theLinkedListclass.# Create a linked listll=LinkedList()# Add a node to the linked listll.append(1)ll.append(2)ll.append(3)# Remove a node from the linked listll.remove(2)# 2# Check if a value is in the linked listll.contains(1)# True# Get the head of the linked listll.peek()# 3# Get the length of the linked listll.size()# 2# Check if the linked list is emptyll.is_empty()# False# Print the linked listprint(ll)# [1, 3]# Limit the length of the linked listll.limit=2ll.append(4)# ValueError: Cannot append 4 to Linked List as it is full.StackYou can create a stack, push values onto it, pop values from it, and perform other operations using theStackclass.# Create a stackstack=Stack()# Push a value to the stackstack.push(1)stack.push(2)stack.push(3)# Pop a value from the stackstack.pop()# 3# Peek the top of the stackstack.peek()# 2# Check if a value is in the stackstack.contains(1)# True# Get the length of the stackstack.size()# 2# Check if the stack is emptystack.is_empty()# False# Print the stackprint(stack)# [1, 2]# Limit the length of the stackstack.limit=2stack.push(4)# ValueError: Cannot push 4 to Stack as it is full.QueueYou can create a queue, enqueue values into it, dequeue values from it, and perform other operations using theQueueclass.# Create a queuequeue=Queue()# Enqueue a value to the queuequeue.enqueue(1)queue.enqueue(2)queue.enqueue(3)# Dequeue a value from the queuequeue.dequeue()# 1# Peek the front of the queuequeue.peek()# 2# Check if a value is in the queuequeue.contains(1)# True# Get the length of the queuequeue.size()# 2# Check if the queue is emptyqueue.is_empty()# False# Print the queueprint(queue)# [2, 3]# Limit the length of the queuequeue.limit=2queue.enqueue(4)# ValueError: Cannot enqueue 4 to Queue as it is full.Design PatternsObserverThe Observer pattern is implemented in Pygredients using theObserverandObservableclasses. Here's an example usage:frompygredients.observer.observerimportObserver,ObservableclassWeatherStation(Observable):passclassDisplayDevice(Observer):def__init__(self,name):super().__init__(name)self.temperature=Nonedefnotify(self,*args,**kwargs):self.temperature=kwargs.get('temperature')print(f'{self.name}now displays the temperature:{self.temperature}°C')# Initialize a WeatherStation and two DisplayDevicesstation=WeatherStation()device1=DisplayDevice("Device1")device2=DisplayDevice("Device2")# Register the DisplayDevices with the WeatherStationstation.register_observers(device1)station.register_observers(device2)# Update the state of the WeatherStationstation.state={'temperature':20}# Unsubscribe device1 and update the state againdevice1.unsubscribe()station.state={'temperature':22}
Package: pygreen
PyGreenA micro web framework/static web site generator.PyGreen is a simple tool to generate small web sites. The concept is to put all files to serve in a folder and invoke
theMakotemplate engine on all .html files. The result is quite similar to a classic
PHP application, but with the good features of the Mako templates (like inheritance) and the cool syntax of Python.See the documentation here.LicenseSee the license file.ContributionSee the contribution guide.
Package: pygreensens
pygreensenspython package for the GreenSens Plant Sensor APIUsage:from pygreensens import GreenSens
gs = GreenSens("username", "password", ["monitored", "conditions"])gs.fetch_single_plant(sensor_id) -> returns the information for a specific sensor
gs.update() -> checks validity of Bearer token (renews if necessary) and updates the sensor data
gs.hubs -> list of all hubs connected to account
gs.sensors -> list of all sensors connected to account
gs.plants -> dictionary of all plants and the monitored conditions
Package: pygreet
PyGreetA simple greeting python package.InstallTo install the package, use the command below:pip install pygreetUsagefromhelloworldimportsay_hello# Generate "Hello, World!"say_hello()# Generate "Hello, Everybody!"say_hello('Everybody!')DevelopmentTo prepare the dev environment, you need to run the command below in your virtualenv:$pipinstall-e.[dev]To build the source code using, use the command below:$pythonsetup.pybdist_wheelsdistTo publish the source distribution run the command below:$pipinstalltwine

$twineuploaddist/*Using DockerWhen using the docker compose setup, make sure to execute the commands below:$apkadd--update--no-cache--virtual.tmp-build-depsgcclibc-devlinux-headerspostgresql-dev&&apkaddlibffi-devLicenseThis package is open-sourced software licensed under theMIT license.
Package: pygrep
Ever tried to refactor some python code and trying to find out where you're
code is used?find . -name \*.py | xargs grep foo.baris kinda nice, but it'll find imports, comments, and whatnot.Meet pygrep, it allows you to find all references to your code,pygrep foo.bar some/dir other/stuff.pyThat will show you some output likefile.py(Class.function):lineno foo.bar.full.identifierInfile.py, there's a reference tofoo.bar.full.identifierin the methodfunctionin classClass.SupportedAt this point, pygrep resolvesfrom foo import barandfrom foo import bar as bazExampleGiven this python filefoo.pyfrom mymod.bar import stuff as a
class A:
    def m(self):
        b = a.mod.method()all the following commandspygrep mymod foo.py
pygrep mymod.bar foo.py
pygrep mymod.bar.mod foo.py
pygrep mymod.bar.mod.method foo.pywill returnfoo.py(A.m):4 mymod.bar.mod.method
Package: pygreppy
Tool for searching in python source code files that supports context
output.Context searching is available withastmoldule andCensoredUsername’sforkofcodegenby
Armin Ronacher.Requirements:Python 3.xInstallation:pip install pygreppyUsage:pygreppy [-c <depth> | -cl | -f] (optional) pattern file

file should be python script (better if formatted with pep8 guidelines)

optional arguments:
-h          show this page
-c [depth]  show context of the string.
-cl         show class containing string (ignored if no class)
-f          show function containing string (ignored if no function)

-re         pattern is a regular expression

Note: only one option can be specified at a time.
Package: pygrey
PyGreyThis toolkit provides implementation of Grey Relation Analysis and Grey Model Prediction.ExampleGrey Relation Analysis (GRA)frompygrey.graimport*# Grey Relation Analysis (GRA)# load data from an Excel filegra=GRA(data_path='data/data.xlsx',use_cols=[0,1,2,3])# run the modelgra.run(show_fig=True)Grey Model Prediction (GM(1,1))frompygrey.gmimport*# SequenceX0=[7413.7,7579,7739.2,7696,7787.7,7584.1,7489,7355,7138]# X axist=1996dt=1# Number of predictionnum_prediction=2# Grey modelgm=GM(x=X0,t=t,dt=dt,num_prediction=num_prediction)# run the modelgm.run(show_figure=True)Other GM implementation:frompygrey.gm_v2import*ls=[7413.7,7579,7739.2,7696,7787.7,7584.1,7489,7355,7138]gm=GM()gm.fit(ls)print("Confidennce = ",gm.confidence())print("X0 = ",ls)print("Prediction = ",gm.predict(m=4))LicenseThepygreyproject is provided byDonghua Chen.
Package: pygreynoisev1
pygreynoisePython 3 wrapper for the greynoise API v1, seehttps://github.com/Grey-Noise-Intelligence/api.greynoise.ioand greynoise.io. API V1 is nor deprecated but still working, seethis projectfor the API V2To install, either use pypi withpip install pygreynoisev1or install from sources:git clone https://github.com/Te-k/pygreynoisev1.git
cd pygreynoisev1
pip install -r requirements.txt
pip install .CLI$ greynoisev1 -h
usage: greynoise [-h] {ip,list,tag,config} ...

Request GreyNoise

positional arguments:
  {ip,list,tag,config}  Subcommand
    ip                  Request info on an IP
    list                List GreyNoise Tags
    tag                 Query data for a tag
    config              Configure key file

optional arguments:
  -h, --help            show this help message and exitLibraryfrompygreynoisev1importGreyNoisegn=GreyNoise()tags=gn.tags()try:gn.query_ip('198.20.69.74')exceptGreyNoiseError:print('IP not found')try:gn.query_tag('YANDEX_SEARCH_ENGINE')exceptGreyNoiseError:print('This tag does not exist')Author and licensePygreynoisev1 was started byTekand is published under MIT license. Feel free to open issues and pull requests.
Package: pygrib
Provides a high-level interface to the ECWMFECCODESC library for reading GRIB files.
There are limited capabilities for writing GRIB files (you can modify the contents of an existing file, but you can't create one from scratch).  See the online docs forexample usage.QuickstartThe easiest way to get everything installed is to usepip:pip install pygribYou can also useconda:conda install -c conda-forge pygribAlternately, clone the github repo and runpip install -e .(after setting$ECCCODES_DIR)
where$ECCODES_DIRis the path to the directory containinginclude/grib_api.handlib/libeccodes.so. IfECCODES_DIRis not specified, a few common locations
such as$CONDA_PREFIX,/usr,/usr/local,/opt/localwill be searched.For full installation instructions and API documentation, seehttps://jswhit.github.io/pygrib.SampleIPythonnotebooks illustrating pygrib usage:http://nbviewer.jupyter.org/gist/jswhit/8635665https://github.com/scollis/HRRR/blob/master/notebooks/HRRR%20Grib.ipynbQuestions or comments - contact Jeff Whitakerjeffrey.s.whitaker@noaa.govor usehttps://github.com/jswhit/pygrib/issues.
Package: pygrille
PygrillePygrille is a Python library that uses Pygame to make it easier to do many things involving a square grid.InstallationUse the package managerpipto install Pygrille.pipinstallpygrilleUsageimportpygrillePIXEL_SIZE=40# The size of each square in the grid.GRID_DIMENSIONS=(6,5)# The number of squares in the x and y directions in the grid.# Initiate the grid. PIXEL_SIZE and GRID_DIMENSIONS are required and everything else is optional.# The extras variable is a list of values that you want contained in each pixel - for example a temporary distance in Dijkstra's algorithm.grid=pygrille.Grid(PIXEL_SIZE,GRID_DIMENSIONS,extras=["Hello","World"],framerate=60,default_colour=pygrille.random_colour(),border_width=10)# Ensures the grid has not been closed each frame.# Also updates the newclick and newkey variables (booleans - True if there is a new click or key press)# And the lastclick (tuple - grid location of most recent click) and lastkey (string - name of most recent key pressed) variables.whilegrid.check_open():# If the user clicks on a square, set it to a random colour and set the border to a random colour.ifgrid.new_mouse_up:grid[grid.last_mouse_up[0]][grid.last_mouse_up[1]].colour=pygrille.random_colour()grid[grid.last_mouse_up[0]][grid.last_mouse_up[1]].extras["Hello"]="Clicked"grid.border_colour=pygrille.random_colour()# If the spacebar is pressed, print the status of the extra value "Hello" in the top left pixel.ifgrid.newkey:ifgrid.lastkey=="space":print(grid[0][0].extras["Hello"])# Draw the grid to the screengrid.draw()# Keep the grid running.grid.tick()# Once pygrille is closed, finish quitting it.grid.quit()Updates0.3.3Allow for Non Square Pixels0.3.2Fixed bug with image sizes when images were used multiple times.0.3.1Fixed bug with mouse-down on UI elements.0.3.0Added support for border size overrides - this allows for certain border lines to be wider than others.Added mouse-down and mouse-over support. Replaced "lastclick" and "newclick" with "last_mouse_up" and "new_mouse_up". Please update any past code that used these attributes to reflect this.0.2.1Added a check for clicking UI elements via the Grid.newclick_ui and Grid.clicked_ui attributes.Fixed an error in the example code in this README.Other minor changes.0.2.0.1Reupload due to issue with first upload of 0.2.0.0.2.0Updated grid initialisation.Added text as a UI option.Added image caching to speed up programs.Other code refactoring and minor changes.0.1.0 (Mistakenly uploaded to PyPI as 0.1.1)Added the ability to force a window size and set the position of the grid in relation to this as desired.Added the possibility for UI elements.Added methods to Grid to get global coordinates from grid coordinates or vice-versaOther minor changes
Package: py-grim
py-grimGraph Imputationpy-grimis the successor ofGRIMMwritten in Python and based onNetworkXHow to develop on the project locally.Make sure the following pre-requites are installed.gitpython >= 3.8build tools egmakeClone the repository locallygitclonegit@github.com:pbashyal-nmdp/py-grimcdpy-grimMake a virtual environment and activate it, runmake venv>makevenvpython3-mvenvvenv--promptpy-grim-venv=====================================================================Toactivatethenewvirtualenvironment,executethefollowingfromyourshellsourcevenv/bin/activateSource the virtual environmentsourcevenv/bin/activateDevelopment workflow is driven throughMakefile. Usemaketo list show all targets.> make
 clean                remove all build, test, coverage and Python artifacts
 clean-build          remove build artifacts
 clean-pyc            remove Python file artifacts
 clean-test           remove test and coverage artifacts
 lint                 check style with flake8
 behave               run the behave tests, generate and serve report
 pytest               run tests quickly with the default Python
 test                 run all(BDD and unit) tests
 coverage             check code coverage quickly with the default Python
 dist                 builds source and wheel package
 docker-build         build a docker image for the service
 docker               build a docker image for the service
 install              install the package to the active Python's site-packages
 venv                 creates a Python3 virtualenv environment in venv
 activate             activate a virtual environment. Run `make venv` before activating.Install all the development dependencies. Will install packages from allrequirements-*.txtfiles.makeinstallThe Gherkin Feature files, step files and pytest files go intestsdirectory:tests
|-- features
|   |-- algorithm
|   |   `-- SLUG\ Match.feature
|   `-- definition
|       `-- Class\ I\ HLA\ Alleles.feature
|-- steps
|   |-- HLA_alleles.py
|   `-- SLUG_match.py
`-- unit
    `-- test_grim.pyPackage Module files go in thegrimdirectory.grim
|-- __init__.py
|-- algorithm
|   `-- match.py
|-- model
|   |-- allele.py
|   `-- slug.py
`-- grim.pyRun all tests withmake testor different tests withmake behaveormake pytest.make behavewill generate report files and open the browser to the report.Usepython app.pyto run the Flask service app in debug mode. Service will be available athttp://localhost:8080/Usemake docker-buildto build a docker image using the currentDockerfile.make dockerwill build and run the docker image with the service.  Service will be available athttp://localhost:8080/=======
History0.0.1 (2021-08-25)First release on PyPI.