Saravanan666/pypi-org huggingface dataset:
Package: pygovee
pygoveeA Python wrapper for the HTTP Govee Developer API to control Govee WiFi supported devices.Developed by Shravan Prasanth (c) 2022.Installationpip3installpygovee==1.0.2orpipinstallpygovee==1.0.2Usage**Retreive API Key from Govee Home App (Profile → About Us → Apply for API Key)***10 requests per minute per devicefrompygoveeimportGoveeclient=Govee.GoveeClient(apiKey="<your api key>")client.login()Get Device List**Mock MAC Address and Model, THIS DATA WON'T WORK!client.get_device_list()# Kitchen Lights: MAC_ADDRESS: 3E-C7-8A-95-A5-40, MODEL:: H6159# Bedroom Lights: MAC_ADDRESS: 23-14-96-F0-0D-58, MODEL:: H6159Replace <DEVICE_MAC_ADDRESS> and <DEVICE_MODEL> with your device information when running the command above.Turn Devices On and Offclient.device_on("<DEVICE_MAC_ADDRESS>","<DEVICE_MODEL>")client.device_off("<DEVICE_MAC_ADDRESS>","<DEVICE_MODEL>")Change Device Brightnessbrightness_level should be anint!client.change_device_brightness("<DEVICE_MAC_ADDRESS>","<DEVICE_MODEL>",brightness_level)Change Device Color using R,G,B Valuesr_value, g_value, b_value should all be anint!client.change_device_color("<DEVICE_MAC_ADDRESS>","<DEVICE_MODEL>",r_value,g_value,b_value)
Package: pygow-poker
pygow-pokerSimulate or play your favorite pai gow poker variant with python!InstallationRun the following to installpip install pygow-pokerOn init (Windows)python -m virtualenv venv

source venv/Scripts/activate

pip install -r dev-requirements.txtOn init (Mac)virtualenv venv

source venv/bin/activate

pip install -r dev-requirements.txtBuildpip install --upgrade build
python -m build
Package: pygpe
DescriptionPyGPE is a CUDA-accelerated Python library for solving the Gross-Pitaevskii
equations for use in simulating Bose-Einstein condensate systems.Documentation:https://wheelermt.github.io/pygpe-docs/Supported featuresScalar, two-component, spin-1, and spin-2 BEC systems.1D, 2D, and 3D grid lattices.HDF5 data saving system.Method for generating vortices within the system.RequirementsPython (3.10 and above),h5py(>=3.6.0),CUDA Toolkit (>=11.2)CuPy(>=10.2.0).
Package: pygpg
A better way to use GPGpygpg is an easy to use wrapper around the GPG CLI. It simplifies some operations that really shouldn't be as tedious
as they are when using the GPG CLI. The aim is to offer a cohesive and intuitive set of commands that makes GPG key
management and usage simple and easy!InstallationWith PipInstalling is simply done by runningpip install pygpg.From SourceThis is fairly simple as well. Just clone the project and runpython setup.py install(note that you should specify
the package version on the CLI, because the version is not insetup.pyorsetup.cfg. For an example, see thepublish workflow. Specifically, theBuild & Publishstep of thepublishjob.)UsageUsing pygpg is super simple :pg {options}orpygpg {options}Both versions behave the same way, butpgis shorter and more convenient to type. Running either command yields the
help menu, which should be detailed enough to use pygpg effectively!
Package: pygpib
The pygpib module provides Python access to GPIB adapters. It provides access
to GPIB instruments through an interface that hides the ugly details of GPIB.IntroductionIn general, USB-GPIB adapters require special drivers provided by the
manucaturer, or linux-gpib. Vendor drivers are usually limited to one operating
system. linux-gpib requires out-of-tree kernel modules, making it cumbersome
to set up and update with new kernels.pygpib is designed to allow the use of USB-GPIB adapters without the need for
special drivers or kernel modules. The interface is centered around read() and
write() calls with minimal GPIB-centric configuration and housekeeping.Tentative interfaceimportpygpibasgpibinterface=gpib.list_adapters()[0]interface.open(primary_address=10)instrument=interface.get_instrument(primary_address=22)instrument.configure(end_read_on_eos=True,eos_char='\n')instrument.query('*IDN?')
Package: pygpiotools
Python tools to control gpio pins on pl2303, cp210x and (maybe) others.IntroductionRemember those cheap usb-to-uart modules that have gpio pins? Want to
control them from your app in linux, windows and (hopefully) mac. Old
pl2303gpio doesn’t get the job done? This library aims to fix the
problems.Hardware support matrixChip(s)DriverWindowsLinuxMac OSPL2303HXApl2303YesYesMaybeCP210xcp210xWiPYesMaybeInstallationRequirementsAny recent python 3.x. 3.7 and above should be good. Please report you
successes so that I can add the information here.Linux (and mac, perhaps) versions need pyusb. Windows versions need
Visual Studio Build Tools installed. It’s a huge download, but it’s
needed. Grab it atMicrosoft download
site.Building Installing python modulepip install .This library will be uploaded to pypy once inital work and porting code
from pl2303gpio is done.pip install pygpiotoolsUsing commandline toolTODOAPI and examplesTODOAuthorsAndrewNecromantAndrianov <andrew@ncrmnt.org> - pl2303/cp2102
gpio code and initial implementationLicenseTBD
Package: pygplib
Pygplib: Python First-Order Graph Property LibraryIntroductionPygplib(Python First-Order Graph Property Library) is a Python module
for constructing, manipulating, and encoding graph properties expressible
with first-order logic of graphs.
It serves as a prototyping tool to tackle with
various graph related applications.
It provides access to state-of-the-art satisfiability technologies
without advanced knowledge.
Basic steps to follow are :Express a graph property of interest as a first-order formula.Set a graph structure, and encode a first-order formula into CNF,
a canonical normal form for propositional formulas.Apply satisfiability tools to the CNF to compute satisfying
assignments.Decode the result into an assignment of first-order variables.DocumentationFor installation, examples, tutorials, and so on, please seeonline documentation.CitationPlease cite the following paper if you usepygplib:Takahisa Toda, Takehiro Ito, Jun Kawahara, Takehide Soh, Akira Suzuki, Junichi Teruyama, Solving Reconfiguration Problems of First-Order Expressible Properties of Graph Vertices with Boolean Satisfiability, The 35th IEEE International Conference on Tools with Artificial Intelligence (ICTAI 2023), accepted.Bugs/Requests/DiscussionsPlease report bugs and requests fromGitHub Issues, and
ask questions fromGitHub Discussions.HistoryPlease seeCHANGES.LicensePlease seeLICENSE.
Package: pygpm
Git Project ManagerA cross platform tool for managing a large number of GitHub projects from the command line.FeaturesTrack git projects:pygpm has the ability to keep track of all repositories on your machine, this allows it to present you with the stats and status of all of your local projects and keep them up to date.Enhancedgit status:Want a status command that actually checks if your branch is behind the current head? Well now you can. You can also check up on all of your tracked repositories at the same time.Start using it at your own pace:pygpm has the ability to grab all of the git repositories on your computer, but you don't need to do that if you don't want to. Track one repository at a time and see how it goes. Note that the true power of pygpm comes from using it for a massive amount of projects.InstallCurrently to install pygpm it is required that you clone the repository on your local machine.git clone https://github.com/BrandonPacewic/pygpm.git
python3 -m pip install pygpm/LicenseCopyright (c) Brandon PacewicSPDX-License-Identifier: MIT
Package: pyGPs
```Marion Neumann [m dot neumann at wustl dot edu]Daniel Marthaler [dan dot marthaler at gmail dot com]Shan Huang [schan dot huang at gmail dot com]Kristian Kersting [kristian dot kersting at cs dot tu-dortmund dot de]This file is part of pyGPs.The software package is released under the BSD 2-Clause (FreeBSD) License.Copyright (c) byMarion Neumann, Daniel Marthaler, Shan Huang & Kristian Kersting, 18/02/2014```pyGPs is a Python library for Gaussian Process (GP) Regression and Classification.Here is an online [documentation](http://www-ai.cs.uni-dortmund.de/weblab/static/api_docs/pyGPs/), where you will find a comprehensive introduction to functionalities and demonstrations. You can also find the same doc locally in `/doc/build/html/index.html`.Generally speaking, pyGPs is an object-oriented GPs implementation. The functionality follows roughly the gpml matlab implementation by Carl Edward Rasmussen and Hannes Nickisch (Copyright (c) by Carl Edward Rasmussen and Hannes Nickisch, 2013-01-21). Standard GP regression and classification as well as FITC (sparse GPs) inference is implemented.Further, pyGPs includes implementations of- minimize.py implemented in python by Roland Memisevic 2008, following minimize.m which is copyright (C) 1999 - 2006, Carl Edward Rasmussen- scg.py (Copyright (c) Ian T Nabney (1996-2001))- brentmin.py (Copyright (c) by Hannes Nickisch 2010-01-10.)Finally, pyGPs is constantly maintained. If you feel you have some relevant skills and are interested in contributing then please do get in touch. We appreciate any feedback.Installing pyGPs------------------You can install via pip (**Recommended!**):pip install pyGPsAlternatively, download the archive and extract it to any local directory.Install the package using setup.py:python setup.py installor add the local directory to your PYTHONPATH:export PYTHONPATH=$PYTHONPATH:/path/to/local/directory/../parent_folder_of_pyGPsRequirements--------------- python 2.6 or 2.7 or *NEW:* python 3- scipy (v0.13.0 or later), numpy, and matplotlib: open-source packages for scientific computing using the Python programming language.Acknowledgements--------------The following persons helped to improve this software: Roman Garnett, Maciej Kurek, Hannes Nickisch, Zhao Xu, and Alejandro Molina.This work is partly supported by the Fraunhofer ATTRACT fellowship STREAM.Citation-------------To cite pyGps, please use the following BibTex:```@article{JMLR:v16:neumann15a,author  = {Marion Neumann and Shan Huang and Daniel E. Marthaler and Kristian Kersting},title   = {pyGPs -- A Python Library for Gaussian Process Regression and Classification},journal = {Journal of Machine Learning Research},year    = {2015},volume  = {16},pages   = {2611-2616},url     = {http://jmlr.org/papers/v16/neumann15a.html}}```
Package: pygpso
pyGPSOVisit the project'sgithub page.pyGPSOis a python package for Gaussian-Processes Surrogate Optimisation. GPSO is a Bayesian optimisation method designed to cope with costly, high-dimensional, non-convex problems by switching between exploration of the parameter space (using partition tree) and exploitation of the gathered knowledge (by training the surrogate function using Gaussian Processes regression). The motivation for this method stems from the optimisation of large-scale biophysical models in neuroscience when the modelled data should match the experimental one. This package leveragesGPFlowfor training and predicting the Gaussian Processes surrogate.This is port of originalMatlab implementationby the paper's author.Reference: Hadida, J., Sotiropoulos, S. N., Abeysuriya, R. G., Woolrich, M. W., & Jbabdi, S. (2018). Bayesian Optimisation of Large-Scale Biophysical Networks. NeuroImage, 174, 219-236.
Package: pygpsparser
GPS parser moduleStepsStep 1: install pygpsparser modulepip install pygpsparserStep 2: import GPSParserfrompygpsparserimportGPSParserStep 3: prepare GPS sentences, e.g.,sentence_RMC='$GNRMC,062357.00,A,2502.3376,N,12133.52528,E,0.132,,231221,,,A*68'Step 4: create GPSParser instancegps_parser=GPSParser(local_time_zone='Asia/Taipei')local_time_zone: set the local time zone for datetime conversionStep 5: get the RMC messageifgps_parser.parse_NMEA(sentence_RMC)isTrue:print(f'local datetime:{gps_parser.local_datetime}')print(f'latlon in radian:{gps_parser.latlon_radian_RMC}')
Package: pygpt4all
PyGPT4AllOfficial Python CPU inference forGPT4Alllanguage models based onllama.cppandggmlInstallationTutorialModel instantiationSimple generationInteractive DialogueAPI referenceLicenseInstallationpipinstallpygpt4allTutorialYou will need first to download the model weightsModelDownload linkGPT4ALLhttp://gpt4all.io/models/ggml-gpt4all-l13b-snoozy.binGPT4ALL-jhttps://gpt4all.io/models/ggml-gpt4all-j-v1.3-groovy.binModel instantiationOnce the weights are downloaded, you can instantiate the models as follows:GPT4All modelfrompygpt4allimportGPT4Allmodel=GPT4All('path/to/ggml-gpt4all-l13b-snoozy.bin')GPT4All-J modelfrompygpt4allimportGPT4All_Jmodel=GPT4All_J('path/to/ggml-gpt4all-j-v1.3-groovy.bin')Simple generationThegeneratefunction is used to generate new tokens from thepromptgiven as input:fortokeninmodel.generate("Tell me a joke ?\n"):print(token,end='',flush=True)Interactive DialogueYou can set up an interactive dialogue by simply keeping themodelvariable alive:whileTrue:try:prompt=input("You: ",flush=True)ifprompt=='':continueprint(f"AI:",end='')fortokeninmodel.generate(prompt):print(f"{token}",end='',flush=True)print()exceptKeyboardInterrupt:breakAPI referenceYou can check theAPI reference documentationfor more details.LicenseThis project is licensed under the MITLicense.
Package: pyGPT-api
pyGPTAn (unofficial)ChatGPTAPI made by yoinking code fromrevChatGPTand adapting it to usetls-client.InstallationpipinstallpyGPT_apiGetting startedAn access token is required for this package to run correctly. You can get yourshereor open thechat.openai.comwebpage, access the developer console, and get the token fromApplication->Cookies->__Secure-next-auth.session-token.Below is a basic example that will let you converse with ChatGPT as much as you'd like.frompyGPT_apiimportAIai=AI("your_token_here")whileTrue:message=""fordatainai.send_message(input(" > ")):message=data["message"]print("\nChatGPT:",message,"\n")
Package: pygptj
PyGPT-JPython bindings for GPT-Jggmllanguage models.Almost the same API aspyllamacpp.Table of contentsInstallationCLITutorialQuick startInteractive DialogueAttribute a persona to the language modelAPI referenceLicenseInstallationThe easy way is to use the prebuilt wheelspipinstallpygptjBuild from source:gitclonegit+https://github.com/abdeladim-s/pygptj.gitCLIYou can run the following simple command line interface to test the package once it is installed:pygtjpath/to/ggml/modelTutorialQuick startfrompygptj.modelimportModelmodel=Model(model_path='path/to/gptj/ggml/model')fortokeninmodel.generate("Tell me a joke ?"):print(token,end='',flush=True)Interactive DialogueYou can set up an interactive dialogue by simply keeping themodelvariable alive:frompygptj.modelimportModelmodel=Model(model_path='/path/to/ggml/model')whileTrue:try:prompt=input("You: ",flush=True)ifprompt=='':continueprint(f"AI:",end='')fortokeninmodel.generate(prompt):print(f"{token}",end='',flush=True)print()exceptKeyboardInterrupt:breakAttribute a persona to the language modelThe following is an example showing how to"attribute a persona to the language model":frompygptj.modelimportModelprompt_context="""Act as Bob. Bob is helpful, kind, honest,and never fails to answer the User's requests immediately and with precision.User: Nice to meet you Bob!Bob: Welcome! I'm here to assist you with anything you need. What can I do for you today?"""prompt_prefix="\nUser:"prompt_suffix="\nBob:"model=Model(model_path='/path/to/ggml/model',prompt_context=prompt_context,prompt_prefix=prompt_prefix,prompt_suffix=prompt_suffix)whileTrue:try:prompt=input("User: ")ifprompt=='':continueprint(f"Bob: ",end='')fortokeninmodel.generate(prompt,antiprompt='User:'):print(f"{token}",end='',flush=True)print()exceptKeyboardInterrupt:breakYou can always refer to theshort documentationfor more details.API referenceYou can check theAPI reference documentationfor more details.LicenseThis project is licensed under the MITLicense.
Package: pygptwrapper
pygptwrapper - A Python Wrapper for the ChatGPT APIpygptwrapper is a Python library that provides a simple way to interact with the ChatGPT API, which is a powerful language model trained by OpenAI that can generate human-like text based on input prompts.This library makes it easy to integrate the ChatGPT API into your Python applications, allowing you to generate text in real-time, create chatbots, or automate text generation tasks. It provides context-based model using newly introduced modelgpt-3.5-turbo.InstallationTo install pygptwrapper, you can use pip:pipinstallpygptwrapperUsageHere's a basic example of how to use pygptwrapper:frompygptwrapperimportContextualGPT# Instantiate the ContextualGPT object with a task and api_keygpt=ContextualGPT(task="You are a chatbot assistant. You will give recommendations for restaurants."api_key=api_key)Initiate a conversation with instanciated bottext=gpt.ask(question="What is the meaning of life?")print(text)This will generate a response from the ChatGPT API based on the input prompt. Notice that contextual conversation is stored ingpt.conversation.
Package: pygpyg
pygPython tools to handlefast data management using dictable,simplified mongodb access both sync/async and supporting seemless push/pull of complete objects and pandas dataframestimeseries analytics that work the same across pandas and numpy.A conda installation is available from my anaconda channelhttps://anaconda.org/yoavgit/pygFull manual pdf is available herehttps://github.com/gityoav/pyg/blob/master/docs/pyg.pdfHTML manual is available here:https://gityoav.github.io/pygio/Interactive tutorials using jupyter and can be found in docs/labpyg is now split into separate packages:pyg-base: fast data management and DAG creationpyg-mongo: synchronous mongodb accesspyg-timeseries: timeseries analyticspyg-mongo-async: extending pyg-mongo to asynchronous mongo access using the Motor package.
Package: pygql
This is a GraphQL client for Python. Plays nicely withgraphene,graphql-core,graphql-jsand any other GraphQL implementation
compatible with the spec.GQL architecture is inspired byReact-RelayandApollo-Client.Installation$ pip install gqlUsageThe example below shows how you can execute queries against a local
schema.frompygqlimportgql,Clientclient=Client(schema=schema)query=gql('''
{
  hello
}
''')client.execute(query)LicenseMIT
License
Package: py-gql-next
python-graphqlPython client of GraphGL.This package mainly usesrequeststo build the http/https requests.Installpipinstallpy-gql-nextUsage:(example of gitlab graphql api)frompygqlimportClientgitlab=Client(url="https://www.gitlab.com/api/graphql")query={"query":"""{currentUser {name}}"""}print(gitlab.execute(query))Result{"data":{"currentUser":None}}TODO:async supportadd tests
Package: pygrab
PyGrabPyGrab is a simple and performant Python library for making HTTP requests written in rust. It is designed to be fully interoperable with the popularrequestspackage in Python.ReferencesGitHub RepoPyPi PageDocumentationFeaturesSimple: PyGrab's API is designed to be straightforward and easy to use. If you're familiar withrequests, you'll feel right at home.Flexible: Whether you need to make a simple GET request, post data to a server, or download a file, PyGrab has you covered.Performant: With its Rust-powered backend, PyGrab offers enhanced performance for CPU-bound tasks, providing faster data decompression, thread handling, and network handling..Asynchronous Support: PyGrab includes functions for making asynchronous HTTP requests, allowing you to efficiently grab data from multiple URLs at once.JavaScript Support: PyGrab can render JavaScript-enabled websites, allowing you to grab data from dynamic web pages.Interface with Tor Network: PyGrab includes built-in support for routing requests through the tor network.Automated IP Rotation: PyGrab includes built-in support for rotating connections to the Tor Network.LimitationaPyGrab is only supported on windows an linux currently.InstallationYou can install PyGrab using pip:pipinstallpygrabUsageHere's a simple example of how to use PyGrab to make a GET request:importpygrabresponse=pygrab.get('http://example.com')print(response.text)In this example,responseis syntactically similar to therequests.Responseobject. You can use it just like you would inrequests.Here's an example of how to use PyGrab to make asynchronous GET requests through the Tor Network:importpygrabpygrab.Tor.start_tor()urls=['http://example.com','http://example.org','http://example.net']responses=pygrab.get_async(urls)forresponseinresponses.values():print(response.text)In this example,responsesis a dictionary of urls matched to their respectivepygrab.HttpResponseobjects. Each response corresponds to the URL at the same index in theurlslist.ContributingContributions are welcome. Please submit a pull request with any improvements.
Package: pygrabber
python_grabberThis is a Python library that enables you to use video cameras from Python on Windows. It is based on DirectShow.
In particular, it allows to:Capture photos from a video cameraView installed cameras on a systemSet the camera optionsSave a vide captured from a cameraThe library is available on PyPI:https://pypi.org/project/pygrabber/0.1/Basic example# This code lists the cameras connected to your PC:frompygrabber.dshow_graphimportFilterGraphgraph=FilterGraph()print(graph.get_input_devices())Save images example# Captures a frame from the first camera found on your computer every second and saves it to a fileimportcv2fromdatetimeimportdatetimefromthreadingimportEvent,Threadfrompygrabber.dshow_graphimportFilterGraphfromosimportpathPAUSE_BETWEEN_CAPTURE=1# 1 sec.OUTPUT_FOLDER=r"C:\test\\"CAMERA_INDEX=0# Using first camera foundglobalstart_timedefcapture_photos_loop(event_):globalstart_timestart_time=datetime.now()whilenotevent_.isSet():graph.grab_frame()event_.wait(PAUSE_BETWEEN_CAPTURE)defshow_image(image):globalstart_timecapture_time=datetime.now()-start_timeimage_file_name=path.join(OUTPUT_FOLDER,str(capture_time.seconds*1000+int(capture_time.microseconds/1000))+".jpg")cv2.imwrite(image_file_name,image)print(f"Image{image_file_name}written")if__name__=="__main__":event=Event()capture_thread=Thread(target=capture_photos_loop,args=(event,))graph=FilterGraph()devices=graph.get_input_devices()print(f"Connecting to device{devices[CAMERA_INDEX]}")graph.add_video_input_device(CAMERA_INDEX)graph.add_sample_grabber(lambdaimage:show_image(image))graph.add_null_render()graph.prepare_preview_graph()graph.run()capture_thread.start()input(f"Capturing images every{PAUSE_BETWEEN_CAPTURE}s, press ENTER to terminate.")event.set()capture_thread.join()print("Done")View live video example# This code shows a screen with the live image from the first camera in your PC.# We add to the graph two filters: one is a source filter corresponding to the first camera connected to your PC,# the second is the default render, that shows the images from the camera in a window on the screen.# Then we call prepare, that connects the two filters together, and run, to execute the graph.# Finally, we need a method to pause the program while watching the camera video.# I use the Tkinter mainloop function which fetches and handles Windows events, so the application does't seem frozen.frompygrabber.dshow_graphimportFilterGraphfromtkinterimportTkgraph=FilterGraph()graph.add_video_input_device(0)graph.add_default_render()graph.prepare_preview_graph()graph.run()root=Tk()root.withdraw()# hide Tkinter main windowroot.mainloop()See also the other examples on the "examples" folder and the articlehttps://www.codeproject.com/Articles/1274094/%2FArticles%2F1274094%2FCapturing-images-from-camera-using-Python-and-Dire.Sample GUI applicationThe file run_gui.py will run a tool with a GUI that enables you to use a camera connected to your system, capture still frames or videos, do basic image porcessing.
Package: pygrabcomics
pyGrabComics is part of GNU phpGrabComics.
pyGrabComics provides a set of methods to connect to a phpGrabComics site,
read and parse an xml comic index and download your favourite comics.
It can be used from the command line or imported as module.
On posix environments running Gnome it can display a small icon
in the task notification area that allows easy access to the functions.