Saravanan666/pypi-org huggingface dataset:
Package: pygeine
InstallationTo install the package, run the following command:pip install pygeineEducational Modulesto use a function or project explaination just import the function like this :from pygeine.pybasics import calculator  , receiptplot moduleThe plot module provides a set of interactive visualization tools for exploring data using popular machine learning algorithms. It includes functions for plotting scatter plots, confusion matrices, and classification reports for various classification models, such as random forests and support vector machines. The module also provides interactive widgets for adjusting model parameters, such as the number of estimators in a random forest. The visualizations can be customized with different colors and labels to better understand the model's performance.Downloading a Projectif you need to download the Actual code for any projects just import the project name and add (_download) like this :from pygeine.pybasics  calculator_download , receipt_downloadExample NotebookCheck out thisGoogle Colab notebookfor an example of how to use the functions in this package.
Package: pygel
pygel=====*pygel* is a pure-python event loop library that works on *Python 2.7+*, *Python 3.4+* and PyPy as well*pygel* implements its own event loop library from scratch using [socketqueue](http://github.com/caetanus/socketqueue/)it was initially based on pygtk2/gobject interfaces but has gained its own life and its own interfaces and the pygtk2/gobject is no longer supported anymoreit can interface with another event libraries as Qt4, Qt5, Gi(work in progress), pygtk2(work in progress)in some level it mimicks single flow application in some methods as: *sleep*, *selector* and *@threaded_wrapper*A more deatailed documentation is in progress.Usage Example---------------------```python"""example using pygel"""import socketfrom gel import Gelreactor = Gel()socket_server = socket.socket()socket_server.bind(("", 12345))socket_server.listen()my_socket = socket.socket()my_socket.connect(socket_server.getsockname())connection, _ = socket_server.accept()def application():connection.send(b"some data")reactor.sleep(2000)print("sleeping doesn't stop the main_loop")def on_socket_read(sock):print("data received", sock.recv(1024))def timeout():print("i'm called after the timeout.")reactor.main_quit()reactor.register_io(my_socket)reactor.idle_call(application)reactor.timeout_call_seconds(3.0, timeout)reactor.main()```
Package: pygelbooru
PyGelbooruPyGelbooru is an unofficial and lightweight asynchronous library for theGelbooruAPI.InstallationThis library requiresPython 3.6or above.You can install the library through pip as follows,pipinstallpygelbooruUsageSearchingThe primary use for this library is, naturally, to search for images with specific tags.This can be done as so:frompygelbooruimportGelbooru# API key/user ID is optional, but access may be limited without themgelbooru=Gelbooru('API_KEY','USER_ID')results=awaitgelbooru.search_posts(tags=['dog ears','1girl'],exclude_tags=['nude'])[<GelbooruImage(id=5105386,filename='b77e69be0a4b...dde071dc.jpeg',owner='anon2003')>,<GelbooruImage(id=5105161,filename='bf169f891ebe...02bceb5e.jpeg',owner='cpee')>,<GelbooruImage(id=5104148,filename='46df3ebe2d41...4316d218e.jpg',owner='danbooru')>,<GelbooruImage(id=5104080,filename='e8eec23d151e...419293401.png',owner='anon2003')>,<GelbooruImage(id=5103937,filename='5bf279f3c546...be3fc53c8.jpg',owner='danbooru')>,...Tagscancontain spaces when passed as arguments, they will simply be reformated with underscores before being queried, so you don't need to reformat them yourself.Results are returned as a list of GelbooruImage containers. When cast to a string, this will return the image_url,str(results[0])'https://img2.gelbooru.com/images/b7/7e/b77e69be0a4b581eac597527dde071dc.jpeg'You can also pull other information returned by the API,https://github.com/FujiMakoto/pygelbooru/blob/master/pygelbooru/gelbooru.py#L32-L47Searching (Random)In addition to searching for a large list of images, PyGelbooru also provides a helper method for when you're really just after a single, random image that matches the specified tags.This method will automatically pull a random image from the last 20,000 Gelbooru image submissions.result=awaitgelbooru.random_post(tags=['cat ears','1girl','cat hood','bell'],exclude_tags=['nude'])<GelbooruImage(id=5106718,filename='bbbdfbf9e883...161753514.png',owner='6498')>CommentsYou can fetch post comments directly from the GelbooruImage container,post=awaitgelbooru.get_post(5099841)awaitpost.get_comments()[<GelbooruComment(id=2486074,author='Anonymous',created_at='2020-01-28 08:47')>]TagsBesides searching for images, you can also pull information on tags as follows,awaitgelbooru.tag_list(name='dog ears')<GelbooruTag(id=773,name='dog_ears',count=22578)># Use "name_pattern" to search for partial matches to a specified tagawaitgelbooru.tag_list(name_pattern='%splatoon%',limit=4)[<GelbooruTag(id=892683,name='splatoon_(series)',count=11353)>,<GelbooruTag(id=759189,name='splatoon_2',count=3488)>,<GelbooruTag(id=612372,name='aori_(splatoon)',count=2266)>,<GelbooruTag(id=612374,name='hotaru_(splatoon)',count=2248)>]
Package: pygelf4ovh
pygelf4ovhpygelf adaptation that work for OVH Logs Data PlatformInstallJust use pypi repositorypipinstallpygelf4ovhUsageJust add GelfOVHHandler in logging handler#import pygelf4ovhimportpygelf4ovhimportloggingOVH_URL='gra2.logs.ovh.com'OVH_PORT=2202OVH_TOKEN="your ovh api token"frompygelf4ovhimportGelfOVHHandlerlogger=logging.getLogger('mylog')logger.setLevel(logging.INFO)sh=GelfOVHHandler(host=OVH_URL,port=OVH_PORT,ovh_token=OVH_TOKEN,include_extra_fields=True,debug=True)logger.addHandler(sh)# now your handler work as usuallogger.info("my info log")Some warnPygelf4ovh has been only tested with python3Release noteVersion 0.3Add some docVersion 0.2Test done on OVH  PlatformThanks to : Ivan Mukhin for PyGelf :PyGelf GitHub projectVersion 0.1Initial commit - first working version
Package: pygellan
PygellanPygellan is a Python library for enabling microscope acquisition control and data analysis. It works together with theMicro-managerplugin,Micro-magellan. Pygellan has two subpackages,pygellan.acquireandpygellan.magellan_datawhich are for data acquisition/hardware control and data anlysis, respectively. Pygellan is integrated with other projects in the scientific python ecosystem, includingNapari(for data visualization) andDask(for large scale data analysis). Pygellan development is currently in alpha--new features are being added and there are not yet guarantees on the stability of the API. Information about future development can be found on the issues page. Feel free to add comments, ideas, or other feedback on theissuespage.SetupInstall pygellan usingpip install pygellan(Pygellan is tested with Python 3.6 but should also work with other versions of Python3)If using pygellan for acquisition control with micro-manager, you also must:Download and install Nico Stuurman's 2.0gamma build of micro-manager. Latest nightly builds can be foundhereOpen Micro-manager, select tools-options, and check the box that says "Run server on port 4827"Acquisition controlTo use Pygellan for acqusition control, simply open the micro-manager2.0gamma GUI as usual and launch the Micro-magellan plugin. Start a python process in a way of your choosing (e.g. terminal, IDE, Jupyter notebook). Type:from pygellan.acquire import PygellanBridge

bridge = PygellanBridge() #establish communication with MagellanIf the bridge object is created successfully, you are connected to Micro-Magellan and can use the rest of thepygellan.acquireAPI.Controlling the Micro-manager coreThe micro-manager core provides low-level functionality like capturing images and controlling individual devices. An example can be seenhere.The core API is discovered dynamically at runtime, though not every method is implemented. Typingcore.and using autocomplete with IPython is the best way to discover which functions are available. Documentation on for the Java version of the core API (which Pygellan ultimately calls) can be foundhere.Controlling Micro-magellan acquisitionsThis area is still under active development.  Future plans can be seenon the issues tabwith the enhancement label. Comments/feedback./requests for different use cases are welcome.In the mean time, some basic functionality is already available:Seethis examplefor how to start and stop Micro-magellan acquisitions through Python.This exampleshows how to call the various acquisition settings on the Micro-magellan GUI to automatically setup experimentsReading data in PythonThepygellan.magellan_dataAPI enables reading of data acquired with pygellan/Micro-magellan directly in python. Tiles can be loaded individually, or all data can be loaded simulataneously into a memory-mappedDaskarray, which works like a numpy array and also allows scalable processing of large datasets and viewing data inNapari. More information can be seen inthis example
Package: pygem
Python Glacier Evolution Model (PyGEM)Overview: Python Glacier Evolution Model (PyGEM) is an open-source glacier evolution model coded in Python that models the transient evolution of glaciers. Each glacier is modeled independently using a monthly timestep. PyGEM has a modular framework that allows different schemes to be used for model calibration or model physics (e.g., climatic mass balance, glacier dynamics).  In the newest version under development, PyGEM is working to become compatible with the Open Global Glacier Model (OGGM;https://oggm.org/).Manual: Details concerning the model physics, installation, and running the model may be found here:https://github.com/drounce/PyGEM/wikiUsage: PyGEM is meant for large-scale glacier evolution modeling.  PyGEM is still under active development.  Therefore, if you would like to run the model independently, it is suggested to install Release PyGEMv0.2.0.  However, given the major changes to the code, this release of the code is not being actively supported anymore.  We therefore highly encourage you to contact the lead developer (David Rounce) if you're interested in using the version that is actively being developed.Contributing: We welcome contributions from any interested parties and are in the process of outlining how to best incorporate outside contributions. For the time being, if you would like to contribute to the development of the model, please contact David Rounce (drounce@cmu.edu).Credits: If using PyGEM for scientific applications, please cite the following:
Rounce, D.R., Hock, R., Maussion, F., Hugonnet, R., Kochtitzky, W., Huss, M., Berthier, E., Brinkerhoff, D., Compagno, L., Copland, L., Farinotti, D., Menounos, B., and McNabb, R.W. “Global glacier change in the 21st century: Every increase in temperature matters”, Science, 379(6627), pp. 78-83, (2023), doi:10.1126/science.abo1324.License: PyGEM uses an MIT license.
Package: pygeminfo
Pygeminfo is a python package for displaying statistics about Rubygems. Its equivalent is the Rubygem calledgeminfo. It allows you to see several information about a Gem likeName, Author, UserID, Secure Hash Algorithm, Key, Total downloads, Latest version, total gems owned by author, gem’s release dateetc.MODULES –> gemsContains a classStatsthat takes one argumentGem nameand has seventeen methods to display several information.Statsname() –> returns gem name.authors() –> return gem’s Author names.total() –> return gem’s total download for all versions.latest() –> return Gem’s total download for latest version.latestversion() –> returns gem’s latest version.info() –> returns gem’s description.licenses() –> returns gem’s licenses.metadata() –> returns gem’s metadata.sha() –> returns gem’s Secure Hash Algoruthm 256 Checksum.projectURL() –> returns gem’s project URL.gemURL() –> returns gem’s URL.homepage() –> returns gem’s dedicated website.wikiURL() –> returns gem’s wiki URL.docURL() –> returns gem’s documentation URL.mailURL() –> returns gem’s mailing list URL.sourceURL() –> returns gem’s source-code URL.bugURL() –> returns gem’s bug tracking URL.as well as seven other methods.Methods# Argument is gem's name
gemversions("eventsims")

# Argument is username or ID
usergems("pixeltrix")

# Argument is gem's name
owner("rails")

# Argument is gem's name, optional--> (page number , amount to show)
search("gem")

# Optional --> (amount to show)
latestgems(5)

# Optional --> (amount to show)
updatedgems(3)

# No optional argument
downloads()Importingfrom pygeminfo.gems import *help on using this package is included in theexamples folder.For more help information please see examples in the package or checkout itsdocumentationathttp://www.pythonhosted.org/pygeminfo/RequirementsAny version of pythonDownloadDownload and install using:pip install pygeminfoIssuesThere are someunicode encodingissues on python 2 but it works fine on Python 3. It also works on Python 2 but sometimes, the errors arise so its better and advisable to use it on Python 3. Furthermore, you may need to dopip install json
pip install requestsif it doesn’t come with your python packageAcknowledgementsAll glory belongs to God and praise be to his holy name.ContactIf further information or help is needed, feel free to contact me on my email attaiwo.kareem36@gmail.comThis is still in a test mode please if any error or bugs is found, feel free to contact the developer and give details
Package: pygemstones
Python GemstonesPython package that group a lot of classes and functions that help software development.RequirementsPython 3.7+How To UseTo use in your project, installpygemstonesmodule:python3 -m pip install pygemstonesor:poetry add pygemstonesAnd before call any pygemstones module, import system boostrap and callinitmethod:frompygemstones.systemimportbootstrapbootstrap.init()ModulesThere are several implemented modules for you to use:io.fileio.netio.packsystem.bootstrapsystem.platformsystem.runnersystem.settingstype.listtype.stringutil.logvendor.awsDevelopmentThese are the requirements for local development:Python 3.7+Poetry (https://python-poetry.org/)You can install locally:poetry installOr can build and generate a package:poetry buildTestspoetry run pytestCoverage Testspoetry run pytest --cov=pygemstones --cov-report=html testsNote: see coverage report in htmlcov/index.htmlLintersTo run all linters use:poetry run black --check pygemstones/
poetry run black --check tests/
poetry run mypy --ignore-missing-imports pygemstones/
poetry run mypy --ignore-missing-imports tests/Build and PublishTo build the package use:poetry buildSet the token from your PyPI account with:poetry config pypi-token.pypi [PyPI-Api-Access-Token]And publish with:poetry publish --buildReleaseTo create a release for Github Actionpublish stepscreate a tag and push. Example:git tag v0.0.1
git push origin v0.0.1After release action finish, publish the release on Githubreleasespage and Github Action will runpublish stepsautomatically.Buy me a coffeeLicenseMITCopyright (c) 2021-2024, Paulo Coutinho
Package: pygenal
pygaPython implementation of Genetic AlgorithmInstallationpip3installpygenalUsagethis test is able to find global maximum of 6th order polynom with two variables in 500ms with precision approximately 10-4to 10-5% (depending on hardware)#!/usr/bin/env python3# import required classesfrompygenal.gaimportPopulation,Individual,Gene,geneTypes,Durationimportnumpyasnpimporttime# create population of your own, override fitness method to suit your needs.# your system evaluation goes here, for sake of demonstration, use polynomclassPolynom(Population):deffitness(self,individual):x=individual.get("x").valuey=individual.get("y").valuecolor=individual.get("color").value# test against function with global maximum:# max{x + 3 x^2 - x^4 - y^6 + y/3 - y^3 4 - y - 5} ≈ 3.35864# at (x, y) ≈ (1.30084, -1.27413)# + favorize chocolate over shorter colors, just for demonstrationreturn(x+3*(x**2)-x**4-y**6+y/3.0-(y**3)*4-y-5)+len(color)/10# introduce non-number options such as color, good for selectionscolors=["brown","green","grey","blue","chocolate"]if__name__=='__main__':# spawn individuali1=Individual()# construct "DNA"i1+=Gene("x",geneTypes.REAL,np.random.randint(-10,10),min=-10,max=10)i1+=Gene("y",geneTypes.REAL,np.random.randint(-10,10),min=-10,max=10)i1+=Gene("color",geneTypes.VALUE,np.random.choice(colors),availableOptions=colors,dominant=True)# create tribe with size of 100 individuals based on your first Individualpopulation=Polynom(species=i1,size=100,chanceOfMutationStart=.5,chanceOfMutationStop=0.0001)tStart=time.time()# start evolution until:#   you didn't pass 1000 generations OR#   fittest didn't change for 200 generations OR#   2.5s didn't passes yetpopulation.evolve(allowCrossover=True,generations=100,verbose=True,timeout=Duration(seconds=0,miliseconds=500),)print(f"Evolved in{time.time()-tStart}s, precision:{(4.258642115713602-population.fittest.score)*100}%")print(f"Fittest:{population.fittest}, genes:{repr(population.fittest)}")
Package: pygenderbr
Python library to interface with “Nomes” IBGE API. Further, the tools
can be used to query the persons names from Brazil. The IBGE API is
based on 2010 Census.FeaturesQuery by name(s) gender(s) based on 2010 IBGE Census from Brazil.
Gender return are ‘F’ or ‘M’. Indefined gender is ‘’.Query by name(s) ocurrence(s) by gender on Brazil or specific stateQuery by name(s) occurrence(s) on specific gender or on allQuery by names ranking occurrence on Brazil (20’s most)PrerequisitesPython 2 or newerrequestsPandasSitehttps://github.com/alexfurtunatoifrn/pygenderbrInstallation$ pip3 install pygenderbrUsageClass Gender>>> from pygenderbr import Gender
>>> gapi = Gender()
>>> g = gapi.getgender('joao')
>>> print(g)
name
JOAO    M
Name: gender, dtype: object
>>> g = gapi.getgender(['joao','maria'])
>>> print(g)
name
JOAO     M
MARIA    F
Name: gender, dtype: object
Package: pygenec
PyGENECGenetic algorithm in Python and Numpy.Instalation$pipinstallpygenecOr$pythonsetup.pyinstallUsagefromnumpyimportexp,array,mgridimportmatplotlib.pyplotaspltfrommpl_toolkits.mplot3dimportaxes3dfrommatplotlib.animationimportFuncAnimationfrompygenec.populacaoimportPopulacaofrompygenec.selecao.roletaimportRoletafrompygenec.cruzamento.kpontosimportKPontosfrompygenec.mutacao.flipimportFlipfrompygenec.evolucaoimportEvolucaodeffunc(x,y):tmp=3*exp(-(y+1)**2-x**2)*(x-1)**2\-(exp(-(x+1)**2-y**2)/3)\+exp(-x**2-y**2)*(10*x**3-2*x+10*y**5)returntmpdefbin(x):cnt=array([2**iforiinrange(x.shape[1])])returnarray([(cnt*x[i,:]).sum()foriinrange(x.shape[0])])defxy(populacao):colunas=populacao.shape[1]meio=int(colunas/2)maiorbin=2.0**meio-1.0nmin=-3nmax=3const=(nmax-nmin)/maiorbinx=nmin+const*bin(populacao[:,:meio])y=nmin+const*bin(populacao[:,meio:])returnx,ydefavaliacao(populacao):x,y=xy(populacao)tmp=func(x,y)returntmpgenes_totais=16tamanho_populacao=100populacao=Populacao(avaliacao,genes_totais,tamanho_populacao)selecao=Roleta(populacao)cruzamento=KPontos(tamanho_populacao)mutacao=Flip(pmut=0.9)evolucao=Evolucao(populacao,selecao,cruzamento,mutacao)evolucao.nsele=10evolucao.pcruz=0.5fig=plt.figure(figsize=(100,100))ax=fig.add_subplot(111,projection="3d")X,Y=mgrid[-3:3:30j,-3:3:30j]Z=func(X,Y)ax.plot_wireframe(X,Y,Z)x,y=xy(populacao.populacao)z=func(x,y)graph=ax.scatter(x,y,z,s=50,c='red',marker='D')defupdate(frame):evolucao.evoluir()x,y=xy(populacao.populacao)z=func(x,y)graph._offsets3d=(x,y,z)ani=FuncAnimation(fig,update,frames=range(10000),repeat=False)plt.show()
Package: py-gene-fusions
py-gene-fusionsBase Package for Fusion CurationInstallationTo install py-gene-fusions:pip install py-gene-fusionsFor a development install, we recommend using Pipenv. See thepipenv docsfor direction on installing pipenv in your compute environment.Once installed, from the project root dir, just run:pipenv lock
pipenv syncInit coding style testsCode style is managed byflake8and checked prior to commit.We usepre-committo run conformance tests.This ensures:Check code styleCheck for added large filesDetect AWS CredentialsDetect Private KeyBefore first commit run:pre-commit installRunning unit testsRunning unit tests is as easy as pytest.pipenv run pytest
Package: pygenenet
PyGeneNet---------This package implements GeneNet algorithm for learning causal genetic network from time series data. The original implementation is described hereN. A. Barker, C. J. Myers, and H. Kuwahara, “Learning Genetic Regulatory Network Connectivity from Time Series Data,” IEEE/ACM Transactions on Computational Biology and Bioinformatics, vol. 8, no. 1, pp. 152–165, Jan. 2011.Installation------------The program requires python 2.7 and packages below* numpy 1.8.2* pandas 0.15.2* graphviz 0.4.3* matplotlib (only required for timing in ``examples``)To use this program, please have python installed on your system, and run:python setup.py installThe package will be installed in Python ``site-packages`` directory by default and will be available under the name pygenenet.To check your installation:python>>> import pygenenetshould not return an errorTo remove the package, run (with appropriate permission)pip uninstall pygenenetOr manually remove the files in the location installed above. The exact locations of each files can be obtained by running installation again with the --record optionpython setup.py install --record files.txtLocation of files will be written to `files.txt`.Usage-----Example use can be found in pygenenet/examplesData files:``net3_ssa_10``  : synthetic data from stochastic simulation of a 3-species network, for 2000s, trajectories written every 10s``net3_ssa_100`` : synthetic data from stochastic simulation of a 3-species network, for 2000s, trajectories written every 100s``net4_ssa_10``  : synthetic data from stochastic simulation of a 4-species network, for 2000s, trajectories written every 10s``net4_ssa_100`` : synthetic data from stochastic simulation of a 4-species network, for 2000s, trajectories written every 100sExample scripts:1. ``demo_net3.py`` to learn the network from ``net3_ssa_10``. The result should look like thisLearned causal network in 23.927177906sCI  LacI  TetRCI     0     0    -1LacI  -1     0     0TetR   0    -1     02. ``demo_net4.py`` to learn the network from ``net4_ssa_10``. The result should look like thisLearned causal network in 23.927177906sCI  GFP  LacI  TetRCI     0    0    -1     0GFP    0    0     1     0LacI   0    0    -1     0TetR   0    0    -1     03. ``performance_net3.py`` and ``performance_net4.py`` will time the learning algorithm with various input subsets and input data frequencies and report a plot. These scripts require ``matplotlib``.
Package: pygenerategui
pygenerateguiUtility for generating simple GUI to execute Python codeThis was originally a hobby project, but I realized it could be useful at work. I'm an SDET, and I think this could be a handy way to e.g. expose an existing automation library's functionality to people uncomfortable with scripting. I'm sure it could be valuable in any number of other cases.I've chosen the painful option of tkinter for the sake of maximum portability. You shouldn't need any modules that don't come in a typical python install.Runpython example_app_base.pyfor examplesMost functionality is demonstrated inexample_module.pyBasic UsageDecorate functions with@pggui. Make an app launcher file modeled afterexample_app_base.py, then run it with python (or maybe make a shell script to do so, so that your target users just have to double-click a file. :)Function args should have type hinting or be overridden (see advanced section)Param / return info from docstring is shown in UIDefault values are setReturn or error are displayedAdvanced UsageFunction name can be replaced in ui by specifingnameargument of decoratorArguments can be limited to a predefined set using dict, enum, or list by overriding the arg in decorator argsThis is also useful if the argument is not a basic type (bool, string, number)Example:@pggui(name='MyFunc', arg2=some_dict)Arguments can also be overridden with another function, which will then be nested in the guiTODOAdd ability for returned values to be stored and passed in to some other functionMitigated with results in selectable text, for nowBetter error messagingSend me a note if you're using this, I'm curious!