Saravanan666/pypi-org huggingface dataset:
Package: greenify
greenifycan make Python extension modules having network operations in C
code to be compatible withgevent.greenifyuses the Dynamic Function Redirecting technique same asELF-Hookto patch blocking network operations at runtime, without the need modify
the original modules.Currentlygreenifyonly supports ELF format modules, and is tested on Linux.Install from sourcegreenifymodule is installed using setuptools or pip:python setup.py installor:pip install greenifyUsageActivegreenifybefore initiate environment:import greenify
greenify.greenify()Make sure the dynamic module(e.g. libmemcached) is patched before using:assert greenify.patch_lib('/usr/lib/libmemcached.so')Import and use the corresponding module, which is nowgeventcompatible.Thread SafetyOnce activated, the green C functions will, on potentially blocking operation,
pass control to gevent’s main event loop, which may switch to other ready
greenlet which is also in one of the green functions.  So, make sure your C
code can handle this kind of execution pause and resume.  A thread safe
program usually is ready for greenify, but remember that all the switches
happen in a single thread.Licensegreenifyis written and maintained bydoubanand is licensed under New BSD license.
Package: green-invoice
Green Invoice APIA Python 3 module to interact with the Green Invoice API.Installpipinstallgreen-invoiceExamplefromdatetimeimportdatetimeimportloggingimportgreen_invoicefromgreen_invoice.modelsimport(Currency,DocumentLanguage,DocumentType,PaymentCardType,PaymentDealType,PaymentType,IncomeVatType,)fromgreen_invoice.resourcesimportDocumentResourcedefmain():green_invoice.client.configure(env="sandbox",# Authenticationapi_key_id="YOUR_API_KEY_ID",api_key_secret="YOUR_API_KEY_SECRET",# Loggerlogger=logging.root,)order_amount=50order_amount_currency=Currency.USDcreate_document_for_order(order_amount,order_amount_currency)defcreate_document_for_order(amount,amount_currency):documentResource=DocumentResource()created_document=documentResource.create({"type":DocumentType.TAX_INVOICE_RECEIPT,"client":{"name":"Tom Hanks","add":False,},"currency":amount_currency,"lang":DocumentLanguage.ENGLISH,"signed":True,"rounding":False,"income":[{"price":amount,"currency":amount_currency,"quantity":1,"description":"My Cool Product","vatType":IncomeVatType.INCLUDED,}],"payment":[{"type":PaymentType.CREDIT_CARD,"date":datetime.today().strftime("%Y-%m-%d"),"dealType":PaymentDealType.REGULAR,"cardNum":"4242","cardType":PaymentCardType.VISA,"price":amount,"currency":amount_currency,}],})print(created_document)if__name__=="__main__":main()AuthorYaniv Pinchasgithub/yanivps
Package: greenlab
Green LabInstallationThe code requirespython>=3.8, as well aspytorch>=1.7andtorchvision>=0.8. Please follow the instructionshereto install both PyTorch and TorchVision dependencies.Install Green Lab:pip install greenlabInstall dependencies:pip install -r requirements.txtor if you are using conda:conda env create -f environment.ymlGetting StartedCiting Green LabIf you use Green Lab in your research, please use the following BibTeX entry.@inproceedings{chen2021defakehop,
  title={Defakehop: A light-weight high-performance deepfake detector},
  author={Chen, Hong-Shuo and Rouhsedaghat, Mozhdeh and Ghani, Hamza and Hu, Shuowen and You, Suya and Kuo, C-C Jay},
  booktitle={2021 IEEE International Conference on Multimedia and Expo (ICME)},
  pages={1--6},
  year={2021},
  organization={IEEE}
}
Package: greenlab-library
[GreenLab] - Libraries1. DescriptionThis library is built for specific tasksFace Recognition ProjectFace DetectionExtract Face EmbeddingSearch Face in databaseLicense Plate Recognition ProjectCrowd Counting ProjectDensity Map-based methodPerson Detection-based methodImutilsModify the source code ofhttps://github.com/jrosebr1/imutilsfor our purposeDocumentation:https://leviethung2103.github.io/Pypi Project:https://pypi.org/project/greenlab-library/2. Table of ContentsSetup guideUsageExamplesAPIsReferences3. Setup guide3.1 System requirementsPython>=3.6CUDA==10.1Tensorflow-GPU>=2.1.0Keras==2.3.13.2 InstallationCreate a new virtual environment, you can choosevirtualenvoranaconda.Virtualenvpython3 -m venv venv
source venv/bin/activateAnaconda# create environment 
conda create --name face_recog_test python=3.7
conda activate face_recog_testInstall packages and dependencies# install dependencies for cpu 
pip install -r configs/requirements/cpu_base.txt
# or install dependencies for gpu 
pip install -r configs/requirements/gpu_base.txt

# install face recognition library
pip install --upgrade greenlab-library4. Usage4.1 Face Recognition LibraryDocumentation:https://leviethung2103.github.io/pkg/face_recognition.htmlGetting started code:https://github.com/leviethung2103/face-recognition-baseline4.2 License Plate LibraryDocumentation:https://leviethung2103.github.io/pkg/license_recog.htmlGetting started code:https://github.com/leviethung2103/license-plate-baseline4.3 Crowd Counting LibraryDocumentation:Getting started code:https://gitlab.com/greenlabs/crowdcounting5. APIs6. References1. RetinaFaceModel7. MaintainersAuthor:Hung Le VietLast Update:July 20, 2020Updates[Jul 9]Initial version0.1.1[Jul 13]Make the models can run on GPU/CPU. Integratedrcnnlibrary.[Jul 20]Version0.1.3: Update crowd counting into library. Restructure for requirements file.[Nov 15]Fix bugnd.waitAll()when inference
Package: greenland5
Greenland5 PackageAbout'greenland5' pulls in all currently publicly released Greenland5
packages by dependencies.LICENSEgreenland5-bundle - Bundle to pull in by dependency all public Greenland5 packages.
Copyright (C) 2020 M E Leypold

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.
Package: greenland5-base
Greenland5 Base PackageAbout'greenland5-base' provides foundational features that need to be
available to every Greenland5 package and interfaces (hooks) into
installed Greenland5 packages. Currently this is mostly a commandline
interface - 'greenland' - that allows to execute the built-in self
tests via 'greenland bist'.Future PlansFactor out runtime for commandline interfaces (mainly the subcommand
registry) and make it available via the (future) 'greenland.cmdline'
package. See Stories/cmdline-runtime-exposed.org.How to ContributeFork the project on gitlab
(https://gitlab.com/m-e-leypold/greenland5-base), then set a merge
request. Please clean up your changeset (squashing, rebasing,
rewriting the commit messages) before setting the merge request.Report bugs at gitlab.We're currently not providing a way to submit pull-requests per mail
or requesting merges from repositories outside of gitlab. This might
come in the future when community contributions become significant.You can try to send patches to the maintainer e-mail address, but we
strongly prefer at the moment that you use gitlab.LICENSEgreenland5-base - Foundational features for Greenland5 packages
Copyright (C) 2020 M E Leypold

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.
Package: greenlet
Greenlets are lightweight coroutines for in-process concurrent
programming.The “greenlet” package is a spin-off ofStackless, a version of
CPython that supports micro-threads called “tasklets”. Tasklets run
pseudo-concurrently (typically in a single or a few OS-level threads)
and are synchronized with data exchanges on “channels”.A “greenlet”, on the other hand, is a still more primitive notion of
micro-thread with no implicit scheduling; coroutines, in other words.
This is useful when you want to control exactly when your code runs.
You can build custom scheduled micro-threads on top of greenlet;
however, it seems that greenlets are useful on their own as a way to
make advanced control flow structures. For example, we can recreate
generators; the difference with Python’s own generators is that our
generators can call nested functions and the nested functions can
yield values too. (Additionally, you don’t need a “yield” keyword. See
the example intest_generator.py).Greenlets are provided as a C extension module for the regular unmodified
interpreter.Who is using Greenlet?There are several libraries that use Greenlet as a more flexible
alternative to Python’s built in coroutine support:ConcurrenceEventletGeventGetting GreenletThe easiest way to get Greenlet is to install it with pip:pip install greenletSource code archives and binary distributions are available on the
python package index athttps://pypi.org/project/greenletThe source code repository is hosted on github:https://github.com/python-greenlet/greenletDocumentation is available on readthedocs.org:https://greenlet.readthedocs.io
Package: greenletio
greenletioThis project allows synchronous and asynchronous functions to be used together.
Unlike other methods based on executors and thread or process pools,greenletioallows synchronous functions to work like their asynchronous
counterparts, without the need to create expensive threads or processes.ExamplesThe following are some of the possibilities when usinggreenletio.Convert a sync function into an awaitableimportasynciofromgreenletioimportasync_@async_defsync_function(arg):passasyncdefasync_function():awaitsync_function(42)asyncio.run(async_function())Use await inside a sync functionfromgreenletioimportawait_asyncdefasync_function():passdefsync_function():await_(async_function())Call an async function as a normal functionfromgreenletioimportawait_@await_asyncdefasync_function():passdefsync_function():async_function()ResourcesDocumentationPyPIChange Log
Package: greenlet_tornado
Greenlet-Tornado================An easy way to seamlessly use Greenlet with Tornado.----------------------------------------------------This allows you to write code as if it were synchronous, and not worry about callbacks at all.You also don't have to use any special patterns, such as writing everything as a generator.Overall this allows you to structure your program in a much more sensible, straightforward way.It's also immensely helpful when porting synchronous code to Tornado.Derived from this blog article:<http://blog.joshhaas.com/2011/06/marrying-boto-to-tornado-greenlets-bring-them-together/>Install-------pip install greenlet_tornadoExample Usage:--------------import tornado.webfrom greenlet_tornado import greenlet_asynchronous, greenlet_fetchclass ExampleHandler(tornado.web.RequestHandler):@greenlet_asynchronousdef get(self):# ...self.helper()# ...self.write("Hello World!")def helper(self):# Fetch something. greenlet_fetch() will block until the request is complete,# but the tornado IOLoop can do other things in the meantime.http_response = greenlet_fetch("http://www.mopub.com")# ... Do something with the response ...Run tests---------pip install -r requirements_tests.txtnosetests -s  --cover-branches --cover-erase --with-coverage --cover-inclusive --cover-package=greenlet_tornado --tests=tests
Package: greenlight
greenlightis a powerful decorator that helps you write code usinggevent.
You can decorate an existing function to run it in a greenlet:>>> from greenlight import greenlight
>>> from gevent.greenlet import Greenlet
>>> @greenlight
... def async_squaring(n):
...     "An extremely useful function"
...     return n**2
...
>>> g = async_squaring(10)
>>> isinstance(g, Greenlet)
True
>>> g.get()
100More interestingly, you can chain greenlets inside a greenlit generator
(similar to Twisted’sinlineCallbacks). This saves boilerplate; one would
otherwise have to callgevent.spawn()on each function, then eitherlink()them together, or, perhaps, calljoin()orget()on each one
and pass the result to the next. Withgreenlight, you can simply yield to
get results inline:>>> @greenlight
... def square_thrice(n):
...     squared = yield async_squaring(n)
...     tothe4th = yield async_squaring(squared)
...     tothe8th = yield async_squaring(tothe4th)
...
>>> square_thrice(2).get()
256Since a greenlit function always returns a greenlet itself, you can write code
very similar to the synchronous code you normally would, while still ensuring
execution order, simply by chaining greenlit functions together.You can explicitly return values from the greenlit generator using thegreen_returnfunction. Ifgreen_returnis not used, the result of the
last greenlet yielded is returned (as in the previous example):>>> from greenlight import green_return
>>> @greenlight
... def greater_than_100():
...     a = 2
...     while True:
...         a = yield async_squaring(a)
...         if a>100:
...             green_return(a)
...
>>> greater_than_100().get()
256Error handling works as you would expect:>>> @greenlight
... def something_bad():
...     raise Exception('O NOES')
...
>>> @greenlight
... def main():
...     try:
...         hundred = yield async_squaring(10)
...         yield something_bad()
...     except Exception, e:
...         print e
...         green_return(None)
...
>>> main().get()
O NOESgreenlightnormally behaves likegevent.spawn, in that it starts greenlets for
you. If you don’t want that to happen, you can usegreenlight_nostart:>>> from greenlight import greenlight_nostart as greenlight
>>> @greenlight
... def squared(n):
...     return n**2
...
>>> g = squared(4)
>>> g.started
False
>>> g.start(); g.get()
16
Package: green-magic
Green Magic is a library containing class models allowing users to train machine learning models as well as visualize cannabis strain data. It has functionality for encoding raw cannabis strain data into features usefull for visualization and cluster analysis. It contains implementations for model evaluation and methods for data exploration.Key features of the Library:Data cleaningSeemless dataset creationExtendable feature extraction systemUsage of the Somoclu library [1] as the backend, which allows for ‘fast execution of Self-Organizing Maps by parallelization: OpenMP and CUDA are supported’.Visualization of mapsKmeans and Affinity-propagation based clusteringFormatted print of statistics and distributionsUsageA simple example is below.from green_magic import WeedMaster
from green_magic.clustering import ClusteringFactory, DistroReporter, get_model_quality_reporter
all_vars = ['type', 'effects', 'medical', 'negatives', 'flavors']
active_vars = ['type', 'effects', 'medical', 'negatives', 'flavors']
wd = 'pd'
wm = WeedMaster()
dt = wm.create_weedataset(dt_path, wd)
dt.use_variables(active_vars)
dt.clean()
vectors = wm.get_feature_vectors(dt)
print(dt)
wm.save_dataset(wd)
som = wm.map_manager.get_som('toroid.rectangular.30.30.pca')
wm.map_manager.show_mmap(som)
clf = ClusteringFactory(wm)
cls = clf.create_clusters(som, 'kmeans', nb_clusters=10, vars=all_vars, ngrams=1)
print(cls)
cls.print_map()
r = DistroReporter()
r.print_distros(cls0, 'type', prec=3)
qr = get_model_quality_reporter(wm, wd)
print(qr.measure(cls, metric='silhouette'))
print(qr.measure(cls, metric='cali-hara'))InstallationThe code is available on PyPI, hence it can be installed by$ pip install green_magicCitationPeter Wittek, Shi Chao Gao, Ik Soo Lim, Li Zhao (2017). Somoclu: An Efficient Parallel Library for Self-Organizing Maps.  Journal of Statistical Software, 78(9), pp.1–21. DOI:10.18637/jss.v078.i09. arXiv:1305.1422.
Package: greenmountainpower
Green Mountain PowerThis is an unofficial Python client that uses the undocumented API for Green Mountain Power accounts.QuickstartTo start using this client, install it using pip.pip3installgreenmountainpowerAnd then import the client and use it to fetch usage data.importdatetimeimportgreenmountainpowerprint("Collecting usage...")gmp=greenmountainpower.api.GreenMountainPowerApi(account_number=58504395849,username="jsmith",password="mypassword")now=datetime.datetime.now()one_day_ago=now-datetime.timedelta(days=1)usages=gmp.get_usage(precision=greenmountainpower.api.UsagePrecision.HOURLY,start_time=one_day_ago,end_time=now,)forusageinusages:print(f" - Time:{usage.start_time.isoformat()}, Usage:{usage.consumed_kwh}KWH")Output:Collecting usage...
 - Time: 2021-11-14T01:00:00, Usage: 0.27 KWH
 - Time: 2021-11-14T02:00:00, Usage: 0.22 KWH
 - Time: 2021-11-14T03:00:00, Usage: 0.24 KWH
 - Time: 2021-11-14T04:00:00, Usage: 0.25 KWH
 - Time: 2021-11-14T05:00:00, Usage: 0.26 KWH
 - Time: 2021-11-14T06:00:00, Usage: 0.26 KWH
 ...PublishingTo publish a new version, follow these steps.gittag<version># ensure all changes are committedpython3-mbuild# build the packagetwineupload--repositorypypidist/*
Package: greenops
greenopsSoftware to measure the footprints of deep learning models at training, testing and evaluating to reduce energy consumption and carbon footprints.How to useimportgreenopsasgoAnd you can usegreenopsright now.To begin a new a measurement simply typemeasure=go.Measure()There are two main approaches to make measurements.You can usemeasure.start()andmeasure.stop().You can usemeasure.update().measure.start()# Your code to measuremeasure.stop()orwhilecondition:measure.update()# Your code to measureBothstart(),stop()andupgrade()accepts astage_nameparameter. You can manage different stages concurrently.Go advancedInstead ofMeasureyou can useadvanced.ThreadMeasureortorchmeasure.TorchMeasureas well.More detailsComing soon.
Package: greenpak
GreenPak DriverA Python package to access and program Renesas GreenPak SPLD's.This Python package provides a simple to use API to read/write/program Renseas GreenPak PLDs over a USB to I2C link.As of December 2023, the package supports the following USB to I2C interfaces and new ones can be easily added based on the examples indrivers.py:I2C Driver(two variants, mini and full.)I2C Adapter(four variants, including a bare Raspberry Pico.)Sample usage using anI2C Adapter:importgreenpakasgpprint("Connecting.")i2c_driver=gp.drivers.GreenPakI2cAdapter(port="COM17")gp_driver=gp.GreenpakDriver(i2c_driver,device="SLG46826",control_code=0b0001)print("Loading configuration.")data=gp.read_bits_file("test_data/slg46826_blinky_fast.txt")gp.hex_dump(data)print("Programming the NVM.")gp_driver.program_nvm_pages(0,data)print("Resetting the device.")gp_driver.reset_device()For full documentation seehttps://greenpak.readthedocs.io/en/latest
Package: greenpeace
greenpeacePython environment clean up.The package allows you to generate your package dependencies requirements directly from your source code. Python scripts.pyand notebooks.ipynbare supported. You can also pin the package versions extracted with your current environment.importgreenpeaceasgpgp.cleanup_requirements(".",output_path="requirements.txt")The package is also able to extract from a python script or a notbook the modules dependencies in your project. This feature is useful if you want to isolate a script or notebook from you project into a dedicated folder.importgreenpeaceasgpgp.isolate("[YOUR_PATH]/notebook.ipynb","./isolated")The isolated folder will contains all you project dependencies and arequirements.txtfile for all package dependencies in use.
Package: greenplum-python
GreenplumPython is a Python library that enables the user to interact with database in a Pythonic way.GreenplumPython provides apandas-like DataFrame API thatlooks familiar and intuitive to Python usersis powerful to do complex analytics, such as statistical analysis, with UDFs and UDAsencapsulates common best practices and avoids common pitfalls in Greenplum, compared to writing SQL directlyInstallationTo install the latest development version, dopip3install--usergit+https://github.com/greenplum-db/GreenplumPythonTo install the latest released version, dopip3install--usergreenplum-pythonNote:The--useroption in an active virtual environment will install to the local user python location.
Since a user location doesn't make sense for a virtual environment, to install theGreenplumPythonlibrary,
just remove--userfrom the above commands.DocumentationThe documentation of GreenplumPython can be viewed at:Latest development versionLatest released version
Package: greenponik-atlas-scientific-oem-i2c
GreenPonik_Atlas_Scientific_OEM_i2c.py Library for Raspberry piA python3 class to use Atlas Scientific OEM circuits on i2c bus.! Only tested on Raspberry Pi 3 A+ !Table of ContentsGreenPonik_Atlas_Scientific_OEM_i2c.py Library for Raspberry piTable of ContentsInstallationExamplesCreditsInstallation>gitclonehttps://github.com/GreenPonik/GreenPonik_Atlas_Scientific_OEM_i2c.gitcdGreenPonik_Atlas_Scientific_OEM_i2c
pip3install-rrequirements.txt

or

>pip3installgreenponik-atlas-scientific-oem-i2cfromGreenPonik_Altas_Scientific_i2c.ECI2cimportECI2cfromGreenPonik_Altas_Scientific_i2c.PHI2cimportPHI2cExamplesRead ECworks with EC circuithttps://www.atlas-scientific.com/circuits/conductivity-oem-circuit/fromGreenPonik_Altas_Scientific_OEM_i2c.ECI2cimportECI2cif__name__=="__main__":try:print("get device infos")ec_i2c=ECI2c(bus=1,addr=ECI2c.ADDR_OEM_TXT_TO_HEXA['EC'],moduletype="EC",)print(ec_i2c.get_device_info())# put here the current temperatureprint(ec_i2c.set_temperature(25.00))ec=ec_i2c.get_read()print("current ec is%.2f"%ec)exceptExceptionase:print("Exception occured",e)go toec exampleRead pHworks with pH circuithttps://www.atlas-scientific.com/circuits/ph-oem-circuit/fromGreenPonik_Altas_Scientific_OEM_i2c.PHI2cimportPHI2cif__name__=="__main__":try:print("get device infos")ph_i2c=PHI2c(bus=1,address=PHI2c.ADDR_OEM_TXT_TO_HEXA['PH'],moduletype="PH",)print(ph_i2c.get_device_info())print(ph_i2c.get_read())exceptExceptionase:print("Exception occured",e)go toph exampletodo listadd calibration workflow in examplesadd compatibility with all circuits (OD / ORP / CO2 / PRESSURE / FLOW)CreditsWrite by Mickael Lehoux, fromGreenPonik, 2020
Package: greenponik-bh1750
GreenPonik_BH1750.py Library for Raspberry piThis is the sample code for read light with BH1750 sensor.Table of ContentsGreenPonik_BH1750.py Library for Raspberry piTable of ContentsInstallationMethodsExamplesCreditsInstallation>gitclonehttps://github.com/GreenPonik/GreenPonik_BH1750.gitcdGreenPonik_BH1750
pip3install-rrequirements.txt

or>pip3installgreenponik-bh1750fromGreenPonik_BH1750.BH1750importBH1750Methods"""Get light data"""defread_bh1750():ExampleimporttimefromGreenPonik_BH1750.BH1750importBH1750if__name__=="__main__":try:bh=BH1750()whileTrue:lux=bh.read_bh1750()print(lux)time.sleep(1)exceptExceptionase:print('An exception occurred:{}'.format(e))CreditsWrite by Mickael Lehoux, fromGreenPonik, 2019
Package: greenponik-ble
GreenPonik_BLEA python3 project to use Bluetooth BLE on raspberry pi! Only tested on Raspberry Pi 3 A+Table of ContentsInstallationExamplesCreditsInstallationDependenciessudoapt-getinstalldbussupervisorDevelopment / Tests needssudoapt-getupdate&&sudoapt-getinstall-y\python3-gi-cairo\python3-dbus\python3-gi\python3-gi-cairo\python-gobject\libdbus-1-devlibdbus-glib-1-dev

python3-mvenvvenvon linuxsourcevenv/bin/activateor on windowsvenv/Scripts/activateon CI linux runnerpip3installdbus-pythonpycairoPyGObjectpipinstall-rrequirements.txtScript to installsudobashsetup_ble_server.shExamplehere the example of how to implement the BLE serverCreditsWrite by Pierre Antoine Grout, fromGreenPonik, 2021Inspired byhttps://github.com/Douglas6/cputempthank youhttps://github.com/Douglas6