Saravanan666/pypi-org huggingface dataset:
Package: pyglet2d
Polygon primitives forpyglet.This package provides aShapeobject that can be acts as an interface between the librariespolygonandpyglet.
The former provides numerical routines for handling shapes, and the latter can process OpenGL bindings.
With pyglet2d, you can incorporate 2D shapes into your applications without having to write your own OpenGL calls.FeaturesIn addition to the standard constructor (from a list or array of points), four others are provided:Shape.regular_polygon,Shape.circle,Shape.rectangle, andShape.from_dict.
The latter is a specification-based constructor that is easy to use with JSON or YAML.Shapehas two methods that are useful aspygletcallbacks:Shape.drawandShape.update.
AShapecan be given a velocity and/or an angular velocity, and it will be updated accordingly whenShape.updateis called.AShapecan be manipulated using the methodsShape.scale,Shape.rotate,Shape.flip_x,Shape.flip_y,Shape.flip, andShape.translate, or with in-place arithmetic (e.g.shape += [5, 0]).Alternatively, setting the propertiesShape.centerandShape.radiuswill translate and scale the shape, respectively.Clipping operations provided bypolygonare bound to the operators |, +, (union), & (intersection), - (difference), and ^ (xor).Additionalpolygonmethods can be accessed directly from theShape.polyattribute, where thePolygonobject is stored.Shortcuts are provided topolygonfunctions via the boolean methodsShape.overlaps(other)andShape.covers(other).ExampleSeetests/graphics_demo.pyfor a usage example.
This script also serves as a test.
Run it to make sure that your graphics pipeline is working correctly:python tests/graphics_demo.pyRequirementsPython >= 3.3pyglet>= 1.2alpha1. This must be manually installed as it is not on PyPi.polygon>= 3numpyInstallationpip install pyglet2d --upgradeDocumentationhttps://pyglet2d.readthedocs.org/DevelopmentTo run the all tests run:toxChangelog0.2.1 (2014-07-27)All in-place operations now return theShape, allowing operations to be chained.0.2.0 (2014-07-27)Added optional argumentsy_factorandcentertoShape.scale.ImplementedShape.rotate.Implemented angular velocity.Argumentstart_angleinShape.regular_polygonis now in radians.graphics_test.pyrenamed tographics_demo.py.ImplementShape.flip_x,Shape.flip_y, andShape.flip.Explicitly set thePolygon3data style toSTYLE_NUMPY.ImplementShapeunion and difference with the addition and subtraction operators.Don’t throw an error when comparing the equality of shapes with different numbers of vertices.0.1.2 (2014-07-26)Fixed Shape docstring.Changed docs from napoleon to numpydoc.0.1.1 (2014-07-26)Mocking of graphics calls to pyglet, for testing without a display (e.g., on Travis).Fixed intersphinx links in docs.Fixed coveralls.io integration.0.1.0 (2014-07-25)First release on PyPI.
Package: pyglet_helper
Pyglet Helper=============.. image:: doc/examples/all_objects.gif.. image:: https://travis-ci.org/CatherineH/pyglet_helper.svg?branch=master:target: https://travis-ci.org/CatherineH/pyglet_helper.. image:: https://coveralls.io/repos/github/CatherineH/pyglet_helper/badge.svg?branch=master:target: https://coveralls.io/github/CatherineH/pyglet_helper?branch=masterThe goal of this project is to make pyglet_ usable to people with no OpenGL experience byreproducing the functionality of VPython_ for drawing geometric primitives... _pyglet: http://www.pyglet.org/.. _VPython: https://github.com/BruceSherwood/vpython-wxInstallation------------To Install this project, either pull it from the PyPI:::pip install -i https://testpypi.python.org/pypi PygletHelperor clone it and build from source:::git clone https://github.com/CatherineH/pyglet_helpercd pyglet_helperpython setup.py installUsage-----The following example will show how to create a window with a sphere:.. image:: doc/examples/sphere.pngFirst, create a pyglet window to draw the shapes to:::from pyglet.window import Windowwindow = Window()Then, create a pyglet_helper view:::from pyglet_helper.objects.renderable import Viewscene = View()Create a gl light:::_light = Light()_light.render(scene)Geometric objects can be added to scene. For example, to define a red sphere in the center of the view:::from pyglet_helper.util import color_ball = Sphere(pos=(1, 1, 0), radius=0.5, color=color.red)Finally, render the object, and run the pyglet window:::_ball.render(scene)pyglet.app.run()Documentation-------------The documentation is available on my `github page`_... _github page: http://catherineh.github.io/pyglet_helper/
Package: pyglfw-cffi
pyglfw-cffiWritten byFabrice Salvaire.This Python module provides a CFFI wrapper for the GLFW library.GLFW is an Open Source, multi-platform library for creating windows with OpenGL contexts and
receiving input and events.Look the filesimple-test.pyto learn how to use the wrapper.InstallationDependenciespyglfw-cffi requires the following dependencies:Python2.7CFFI0.8.6GLFW3Installation from PyPi Repositorypyglfw-cffi is made available on thePyPIrepository athttps://pypi.python.org/pypi/pyglfw-cffiRun this command to install the last release:pipinstallpyglfw-cffiInstallation from SourceThe pyglfw-cffi source code is hosted athttps://github.com/FabriceSalvaire/pyglfw-cffiTo clone the Git repository, run this command in a terminal:gitclonegit@github.com:FabriceSalvaire/pyglfw-cffi.gitThen to build and install pyglfw-cffi run these commands:pythonsetup.pybuildpythonsetup.pyinstallTestingTo test the wrapper run this script:pythonsimple-test.py
Package: pyglib
pyglib provides a clean, consistent setup for writing commandline
scripts and applications in Python. It makes use of python-gflags and
python-glog, and adds an app startup helper that deals with
initialization boilerplate so you don’t have to think about it.Example usage:#!/usr/bin/env pythonfrompyglibimportapp,gflags,loggflags.DEFINE_integer('bananas',7,'Number of bananas.')FLAGS=gflags.FLAGSdefmain(args):log.info('There are%sbananas.',FLAGS.bananas)log.debug('This will only show up if you run with --verbosity=10')if__name__==__main__:app.run()The above module is usable as a commandline app, complete with argument
parsing and validation. It automatically has a few flags like--helpand--verbositythat come from gflags and glog. Any positional
arguments left over after parsing flags are passed along to the main()
function.This example module can also be imported as a library for use in another
app. When used that way, any script that imports this one will inherit
the--bananasflag defined here.
Package: pyg-library
pyg-libInstallationInstallationWe provide pre-built Python wheels for all major OS/PyTorch/CUDA combinations from Python 3.7 till 3.11, seehere.
Note that currently, Windows wheels are not supported (we are working on fixing this as soon as possible).To install the wheels, simply runpip install pyg-lib -f https://data.pyg.org/whl/torch-${TORCH}+${CUDA}.htmlwhere${TORCH}should be replaced by either1.11.0,1.12.0,1.13.0or2.0.0${CUDA}should be replaced by eithercpu,cu102,cu113,cu115,cu116,cu117orcu118The following combinations are supported:PyTorch 2.0cpucu102cu113cu115cu116cu117cu118Linux✅✅✅WindowsmacOS✅PyTorch 1.13cpucu102cu113cu115cu116cu117cu118Linux✅✅✅WindowsmacOS✅PyTorch 1.12cpucu102cu113cu115cu116cu117cu118Linux✅✅✅✅WindowsmacOS✅PyTorch 1.11cpucu102cu113cu115cu116cu117cu118Linux✅✅✅✅WindowsmacOS✅Form nightlyNightly wheels are provided for Linux from Python 3.7 till 3.11:pip install pyg-lib -f https://data.pyg.org/whl/nightly/torch-${TORCH}+${CUDA}.htmlFrom masterpip install git+https://github.com/pyg-team/pyg-lib.git
Package: pygll
Pygmentssyntax highlighting styles for dark and light backgroundsInstallationInstall with:$ pip install pygllAfter installation, two new Pygments styles are available:Python classPlugin namepygll.LivingLogicLightStylelivinglogic-lightpygll.LivingLogicDarkStylelivinglogic-darkUsage with SphinxIf you want to use this Pygments style with Sphinx put the following in yourconf.py:pygments_style = 'livinglogic-light'Whether and how you can specify both styles to let the browser automatically
switch them depending on the current OS color scheme depends on the HTML theme
you’re using.History0.1 (2021-07-23)Initial release.
Package: pyglm-typing
# pyglm-typingTyping stubs for [PyGLM](https://github.com/Zuzu-Typ/PyGLM).Install via:python -m pip install pyglm-typingCopyright 2021 Erik SomaPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Package: pyglobal
Global accessors for things like settings. This could be used across applications and modules to share data.This utility is to help easily share values across multiple modules and libraries without having to pass values around.ExampleSimple example.# settings.pyimportpyglobalpyglobal.set('abc',123)pyglobal.default('qwerty','')pyglobal.set('Hello','World!')pyglobal.default('SECRET_KEY','!!!CHANGE!!!')# Warning: Any library using pyglobal could then look for this value.pyglobal.set('DATABASE_URL','http://')# Warning: Any library using pyglobal could then look for this value.Then use the settings in another part of the project# main.pyimportpyglobalimportsettings# Set pyglobal values before using in other modulesimportdbapp=App(SECRET_KEY=pyglobal.get('SECRET_KEY'))The sub module db.py doesn’t have to know anything about settings.py and can be nested down packages.# db.pyimportpyglobaldb=Database(pyglobal.get('DATABASE_URL'))Avoiding clashes with other projectsAvoid clashes and add some small amount of security to your app with a scope# settings.pyimportpyglobalimportuuidapp_scope='MYAPP='+str(uuid.uuid4())defscope_get(key,default=None):returnpyglobal.get(key,default,app_scope)defscope_set(key,value)returnpyglobal.set(key,value,app_scope)pyglobal.scope_get=scope_getpyglobal.scope_set=scope_setpyglobal.set('SECRET_KEY','!! Change !!',scope=app_scope)scope_set('DATABASE_URL','http://')Once again you can use in other files, but you would also need the scope to access.# main.pyimportpyglobalimportsettingssecret=pyglobal.scope_get('SECRET_KEY')db_url=pyglobal.get('DATABASE_URL',scope=settings.app_scope)At some point code can always be disassembled, so this isn’t really secure.
All scopes are is another level of obfuscation and a way to avoid global names from clashing with other projects.
Package: py-glo-board
py-glo-boardA python library to help interact with GitKrakenGlo Boards APISupported Endpoints & FeaturesAPI Endpoints:This package supports the following v1Glo Boards API endpointsBoardsGet BoardsCreate BoardGet Boards by IDEdit BoardDelete BoardColumnsCreate columnEdit columnDelete columnCardsGet CardsCreate CardCreate Cards batchGet Card By IDEdit CardDelete CardGet Cards By Column IDLabelsCreate LabelEdit LabelDelete LabelAttachmentsGet AttachmentsCreate AttachmentCommentsGet Comments By Card IDCreate CommentEdit CommentDelete CommentUserGet UserRequirementsPython 3.6 or higherInstallingpipinstallpy-glo-boardExamplefrompy_glo_boards_apiimportGloBoard,typesgloboard=GloBoard('<YOUR_PAT_TOKEN_HERE>')# List all boards available (Only gets the id and the name of the board)globoard.get_boards()# Or select the fields you need, with the options available in the Glo apifields=['archived_columns','archived_date','columns','created_by','created_date','invited_members','labels','members','name']boards=globoard.get_boards(fields,per_page=3)# Get cardgloboard.get_card('<BOARD_ID>','<CARD_ID>').to_dict()FAQPlease refer toGit Kraken Documentationfor any
further reading.LicenseThe source code for py-glo-board is released under theMIT License.
Package: pyglome
PyGLOMEThis is not an officially supported Google product.This repository contains a Python implementation for the GLOME
protocol. You can find the library in the folder pyglome. The test
files can be found in the test folder.Python APIRequirementsPython >= 3.6pyca/cryptography >= 2.5ExampleWe provide a brief example of use.  In order for Alice and Bob to communicate,
the first step would be to generate some new keys:importpyglomealice_keys=pyglome.generate_keys()bob_keys=pyglome.generate_keys()Suppose that Alice knows Bob'spublic_keyand wants to send Bob the messagemsgand no other message have been shared before. Alice will need to:glome=pyglome.Glome(bob_keys.public,alice_keys.private)first_tag=glome.tag(msg,counter=0)And Alice will send Bob bothmsg,first_tagas well as Alice's public key.
On Bob's end he will need to do the following:glome=pyglome.Glome(alice_keys.public,bob_keys.private)try:glome.check(first_tag,msg,counter=0)exceptpyglome.TagCheckErrorastag_error:## Handle the exception.## do what you have to doKey generation.Should you want to use a preexisting key, it should match the formatX25519Private/PublicKeyprovided inpyca/cryptography.
Such a key can be easily read from a bytes object as follows:fromcryptography.hazmat.primitives.asymmetricimportx25519my_private_key=x25519.X25519PrivateKey.from_private_bytes(private_key_bytes)my_public_key=x25519.X25519PublicKey.from_private_bytes(public_key_bytes)We provide a key generation functiongenerate_keysthat uses these methods to
create a new key pair fromos.urandombytes.DocumentationFor more information see the in-code documentation.TestIn the test folder we have scripts that implement test classes based on unittest. To run all tests use:python -m testfrom this directory. If you only want to execute a particular test module, then run:python -m test.my_module_namewheremy_module_nameis the name of the test module to be executed (the name of the file without the .py).
Package: pygloo
pyglooPygloo provides Python bindings forgloo.
It is implemented usingpybind11.It is currenlty used inRay for collective communicationbetween CPUs.RequirementsPython>=3.6InstallationInstall From WheelsWe provide prepackaged Python wheels (manylinux2014_x86_64,manylinux_2_24_x86_64). To install from wheels:pipinstallpyglooBuilding from sourceOne can build pygloo from source if none of released wheels fit with the development environment.Pygloo usesBazelto automatically manange dependencies and compilation.
To compile from source, install Bazel>=2.0.0 following theBazel installation guide.
After installing Bazel, build and install pygloo following this command:pythonsetup.pyinstallTestingPygloo usesRayto create multiple, distributed processes for collective communication tests. Seetestsdirectory.ExampleAn example for allreduce.importosimportrayimportpyglooimportnumpyasnp@ray.remote(num_cpus=1)deftest_allreduce(rank,world_size,fileStore_path):'''rank  # Rank of this process within list of participating processesworld_size  # Number of participating processesfileStore_path # The path to create filestore'''context=pygloo.rendezvous.Context(rank,world_size)# Prepare device and store for rendezvousattr=pygloo.transport.tcp.attr("localhost")dev=pygloo.transport.tcp.CreateDevice(attr)fileStore=pygloo.rendezvous.FileStore(fileStore_path)store=pygloo.rendezvous.PrefixStore(str(world_size),fileStore)context.connectFullMesh(store,dev)sendbuf=np.array([[1,2,3],[1,2,3]],dtype=np.float32)recvbuf=np.zeros_like(sendbuf,dtype=np.float32)sendptr=sendbuf.ctypes.datarecvptr=recvbuf.ctypes.datapygloo.allreduce(context,sendptr,recvptr,sendbuf.size,pygloo.glooDataType_t.glooFloat32,pygloo.ReduceOp.SUM,pygloo.allreduceAlgorithm.RING)if__name__=="__main__":ray.init(num_cpus=6)world_size=2fileStore_path=f"{ray.worker._global_node.get_session_dir_path()}"+"/collective/gloo/rendezvous"os.makedirs(fileStore_path)ray.get([test_allreduce.remote(rank,world_size,fileStore_path)forrankinrange(world_size)])LicenseGloo is licensed under the Apache License, Version 2.0.
Package: pygloo-rec
pyglooPygloo provides Python bindings forgloo.
It is implemented usingpybind11.It is currenlty used inRay for collective communicationbetween CPUs.RequirementsPython>=3.6InstallationInstall From WheelsWe provide prepackaged Python wheels (manylinux2014_x86_64,manylinux_2_24_x86_64). To install from wheels:pipinstallpyglooBuilding from sourceOne can build pygloo from source if none of released wheels fit with the development environment.Pygloo usesBazelto automatically manange dependencies and compilation.
To compile from source, install Bazel>=2.0.0 following theBazel installation guide.
After installing Bazel, build and install pygloo following this command:pythonsetup.pyinstallTestingPygloo usesRayto create multiple, distributed processes for collective communication tests. Seetestsdirectory.ExampleAn example for allreduce.importosimportrayimportpyglooimportnumpyasnp@ray.remote(num_cpus=1)deftest_allreduce(rank,world_size,fileStore_path):'''rank  # Rank of this process within list of participating processesworld_size  # Number of participating processesfileStore_path # The path to create filestore'''context=pygloo.rendezvous.Context(rank,world_size)# Prepare device and store for rendezvousattr=pygloo.transport.tcp.attr("localhost")dev=pygloo.transport.tcp.CreateDevice(attr)fileStore=pygloo.rendezvous.FileStore(fileStore_path)store=pygloo.rendezvous.PrefixStore(str(world_size),fileStore)context.connectFullMesh(store,dev)sendbuf=np.array([[1,2,3],[1,2,3]],dtype=np.float32)recvbuf=np.zeros_like(sendbuf,dtype=np.float32)sendptr=sendbuf.ctypes.datarecvptr=recvbuf.ctypes.datapygloo.allreduce(context,sendptr,recvptr,sendbuf.size,pygloo.glooDataType_t.glooFloat32,pygloo.ReduceOp.SUM,pygloo.allreduceAlgorithm.RING)if__name__=="__main__":ray.init(num_cpus=6)world_size=2fileStore_path=f"{ray.worker._global_node.get_session_dir_path()}"+"/collective/gloo/rendezvous"os.makedirs(fileStore_path)ray.get([test_allreduce.remote(rank,world_size,fileStore_path)forrankinrange(world_size)])LicenseGloo is licensed under the Apache License, Version 2.0.
Package: pyglot
A python library for interacting with the Google Translate API.Note: This uses the translate v2 APIYou will need aserverkey configured with Google, and a payment method on file,
as there is no courtesy limit for translations.Usage:See the [Google Translate docs](https://developers.google.com/translate/v2/using_rest) for more details.>>> from pyglot import Translator
>>> lang = Translator(key='YOUR-KEY')# Translating text:
>>> lang.translate(‘The quick brown fox jumped over the lazy dog’, target=’de’)
GTranslation({u’translatedText’: u’Der schnelle braune Fuchs sprang xfcber den faulen Hund’, u’detectedSourceLanguage’: u’en’})# Detecting the language of text:
>>> lang.detect(‘The quick brown fox jumped over the lazy dog’)
[GLanguage({u’isReliable’: False, u’confidence’: 0.79904306, u’language’: u’en’})]# Getting a list of language codes, with names in english:
>>> lang.languages(target=’en’)
[GLanguage({u’name’: u’Afrikaans’, u’language’: u’af’}), GLanguage({u’name’: u’Albanian’, u’language’: u’sq’}), … ]
Package: pyglotaran-alias
pyglotaran-aliasConvenience module which allows to usepyglotaranas an alias in the CLI and imports, when working withpyglotaran.Since the python implementation of glotaran was renamed to pyglotaran to prevent ambiguity, about which glotaran was used,
at times one might be tempted to useimport pyglotaraninstead ofimport glotaran.UsageimportpyglotaranOrfrompyglotaranimportParameterGroupFor autocompletion to work in an interactive session (i.e.python repl,jupyter-consoleorjupyter-notebooks) you need to first import thepyglotaran-aliasi.e. withimport pyglotaran.
After this is doneglotaranis registered under the aliaspyglotaran, and autocomplete should work.How does it work?When you useimport pyglotaranthe following happens:pyglotaran-alias's__init__.pyis called.The module cache (sys.modules) is populated with allglotaranmodules.For eachglotaranmodule an additional corresponding entry withpyglotaranis added to the module cache.The local variables used to modify the module cache are deleted, so they won't pollute your globals.Thepyglotaranglobal variable replacesitselfwith theglotaranpackage.Known problemsLinter shows error "No name '<module or attribute name>' in module 'pyglotaran'", when using a text editorSince most linters use a static file analysis, they won't understand the live swapping of modules at runtime and think thatpyglotaranis defined inpyglotaran-alias, where<module or attribute name>most likely doesn't exist.
Thus you have aSchrödinger-Linter, which is right and wrong at the same time.Autocomplete doesn't work, when using a text editorThis is due to the fact that autocomplete engines (similar to linters) use a static file analysis and thus think thatpyglotaranis defined inpyglotaran-alias. Sadly I didn't find a way to fix this issue yet, since it also strongly depends on the used autocomplete engine.Autocomplete in interactive session shows attributes onpyglotaranwhich aren't part ofglotaranWhen using an interactive session (i.e.python repl,jupyter-consoleorjupyter-notebooks), the autocomplete will pick up the replaced module and allow you to get autocompletion for modules and attributes defined inglotaran.
But due to static file analysis it will also pick up modules and attributes defined inpyglotaran-alias
Package: pyglotaran-extras
pyglotaran-extrasSupplementary package for pyglotaran with (example) plotting code for use with the pyglotaran package.
Can be installed as a python package or from sources.InstallationPrerequisites:Python 3.10 or 3.11Python packagepyglotaranv0.7.0 (or later)Stable ReleaseTo install pyglotaran-extras fromPyPI, run this command in your terminal:pip install pyglotaran-extrasIf you want to install it via conda, you can run the following command:conda install -c conda-forge pyglotaran-extrasFrom SourceTo install pyglotaran-extras from sources, either clone this repository or download the latest release, then run this command in your terminal:git clone https://github.com/glotaran/pyglotaran-extras.gitcd pyglotaran-extraspip install -e .or directlypip install git+https://github.com/glotaran/pyglotaran-extras.git