Saravanan666/pypi-org huggingface dataset:
Package: amberelectric
Amber - An entirely new way to buy electricityAmber is an Australian-based electricity retailer that pass through the real-time wholesale price of energy.Because of Amber's wholesale power prices, you can save hundreds of dollars a year by automating high power devices like air-conditioners, heat pumps and pool pumps.This Python library provides an interface to the API, allowing you to react to current and forecast prices, as well as download your historic usage.DetailsAPI version: 1.0Package version: 1.0.3RequirementsPython >= 3.6Getting startedNot an Amber customer yet? Join here:https://join.amber.com.au/signupOnce your account has been created, you need to create anAPI tokenInstallationpip installIf the python package is hosted on a repository, you can install directly using:pipinstallamberelectricUsageSetup and confirguration# Import the libraryimportamberelectricfromamberelectric.apiimportamber_api# These are just for demo purposes...frompprintimportpprintfromdatetimeimportdate# Insert the API token you created at https://app.amber.com.au/developersconfiguration=amberelectric.Configuration(access_token='psk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')# Create an API instanceapi=amber_api.AmberApi.create(configuration)Fetching SitesAll the interesting functions require a site id, so find one of those first - they can be identified by the National Metering Identifier (NMI)try:sites=api.get_sites()exceptamberelectric.ApiExceptionase:print("Exception:%s\n"%e)This will return a List of SitesFetching PricesThe API allows you to fetch previous, current and forecast prices by day.If no start_date or end_date is supplied, it default to the current day.Note: If duration is 30, there will be 48 intervals per channel. A duration of
5 returns 288 intervals.site_id=sites[0].idtry:start_date=date(2021,6,1)end_date=date(2021,6,2)range=api.get_prices(site_id,start_date=start_date,end_date=end_date)today=api.get_prices(site_id)exceptamberelectric.ApiExceptionase:print("Exception:%s\n"%e)You can also just ask for the current pricesite_id=sites[0].idtry:current=api.get_current_prices(site_id)exceptamberelectric.ApiExceptionase:print("Exception:%s\n"%e)and the current price plus some number of previous and next intervalssite_id=sites[0].idtry:current=api.get_current_price(site_id,next=4)# returns the current interval and the next 4 forecast intervaslexceptamberelectric.ApiExceptionase:print("Exception:%s\n"%e)UsageYou can request your usage for a given day.site_id=sites[0].idtry:usage=api.get_usage(site_id,date(2021,6,1),date(2021,6,1))exceptamberelectric.ApiExceptionase:print("Exception:%s\n"%e)
Package: amber-electric
Python Library for Amber Electric APIDescriptionConnects to theAmber Electric APIand retrieves market, usage and pricing informationNoteThis is in no way affiliated with Amber Electric.IssuesI don't know what the usage data for an account looks like at the moment.
Until I have an account with active usage data - this part of the API is going to be very light.Logging / DebuggingThis library usesloggingjust set the log level and format you need.ExampleThe examples below may look a little complex - because this library relies on functions like.auth()and.update()beingawaited.See current market pricingimportasynciofromamber_electricimportAmberElectricapi=AmberElectric(latitude=-37.828690,longitude=144.997460,)asyncdefdisplay_market_pricing():awaitapi.market.update()print(api.market)asyncio.get_event_loop().run_until_complete(display_market_pricing())Get your current pricingimportasynciofromamber_electricimportAmberElectricapi=AmberElectric(latitude=-37.828690,longitude=144.997460,username="family@example.com",password="secret")asyncdefget_account_pricing():awaitapi.auth()awaitapi.price.update()print(api.price)asyncio.get_event_loop().run_until_complete(get_account_pricing())Get your current usage (WIP)importasynciofromamber_electricimportAmberElectricapi=AmberElectric(latitude=-37.828690,longitude=144.997460,username="family@example.com",password="secret")asyncdefget_account_pricing():awaitapi.auth()awaitapi.usage.update()print(api.usage)asyncio.get_event_loop().run_until_complete(get_account_pricing())Support
Package: amberelectric.py
Amber - An entirely new way to buy electricityAmber is an Australian-based electricity retailer that pass through the real-time wholesale price of energy.Because of Amber's wholesale power prices, you can save hundreds of dollars a year by automating high power devices like air-conditioners, heat pumps and pool pumps.This Python library provides an interface to the API, allowing you to react to current and forecast prices, as well as download your historic usage.DetailsAPI version: 1.0Package version: 1.0.0RequirementsPython >= 3.6Getting startedNot an Amber customer yet? Join here:https://join.amber.com.au/sign-upOnce your account has been created, you need to create anAPI tokenInstallationpip installIf the python package is hosted on a repository, you can install directly using:pipinstallamberelectric.pyUsageSetup and confirguration# Import the libraryimportamberelectricfromamberelectric.apiimportamber_api# These are just for demo purposes...frompprintimportpprintfromdatetimeimportdate# Insert the API token you created at https://app.amber.com.au/developersconfiguration=amberelectric.Configuration(access_token='psk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')# Create an API instanceapi=amber_api.AmberApi.create(configuration)Fetching SitesAll the interesting functions require a site id, so find one of those first - they can be identified by the National Metering Identifier (NMI)try:sites=api.get_sites()exceptamberelectric.ApiExceptionase:print("Exception:%s\n"%e)This will return an List of SitesFetching PricesThe API allows you to fetch previous, current and forecast prices by day.If no start_date or end_date is supplied, it default to the current day.Note: If duration is 30, there will be 48 intervals per channel. A duration of
5 returns 288 intervals.site_id=sites[0].idtry:start_date=date(2021,6,1)end_date=date(2021,6,2)range=api.get_prices(site_id,start_date=start_date,end_date=end_date)today=api.get_prices(site_id)exceptamberelectric.ApiExceptionase:print("Exception:%s\n"%e)You can also just ask for the current pricesite_id=sites[0].idtry:current=api.get_current_prices(site_id)exceptamberelectric.ApiExceptionase:print("Exception:%s\n"%e)and the current price plus some number of previous and next intervalsYou can also just ask for the current pricesite_id=sites[0].idtry:current=api.get_current_price(site_id,next=4)# returns the current interval and the next 4 forecast intervaslexceptamberelectric.ApiExceptionase:print("Exception:%s\n"%e)UsageYou can request your usage for a given day.site_id=sites[0].idtry:usage=api.get_usage(site_id,date(2021,6,1),date(2021,6,1))exceptamberelectric.ApiExceptionase:print("Exception:%s\n"%e)
Package: ambhas
ambhasAmbhas python libraryInstalling ambhasInstalling ambhas can be done by downloading source file (ambhas--.tar.gz), and after unpacking issuing the command::python setup.py installThis requires the usual Distutils options available.Or, download the ambhas--.tar.gz file and issue the command::pip install /path/to/ambhas--.tar.gzOr, directly using the pip::pip install ambhasUsageImport required modules::import numpy as np
from ambhas.errlib import rmse, correlationGenerate some random numbers::x = np.random.normal(size=100)
y = np.random.normal(size=100)
rmse(x,y)
correlation(x,y)AuthorSat Kumar Tomer
satkumartomer at gmail dot comChanges0.1.0Initial version0.1.1Minor corrections in setup.py files0.2.0few packages added0.3.0groundwater, sun_rise_set, soil texture module, etc. added0.3.1manifest.in file edited0.3.2extract_gis_data, richards, risat added0.4.0extract_gis_data, richards, risat added1.0.0Updated for Python3Removed copula from this and is available now only as a seperate libraryAny questions/commentsIf you have any comment/suggestion/question,
please feel free to write me atsatkumartomer@gmail.comYou may go throughhttps://github.com/tomersk/learn-pythonto see the examples.
Package: ambibulb
AMBIBULBAmbibulb attempts to provide the similar experience to Ambilight® (Philips TV's feature that projects color onto the wall behind a TV) using Raspberry PI and an IR remote controlled LED light bulb.Please watch the demo.ambibulbcontrols the color of RC lights based on the dominant color of an image on your screen. This can enhance your viewing experience or just make your party more colorful 🌈.HARDWARERaspberry PI (tested on 3B+)HDMI output (TV, projector, display)RGBW LED light bulb with IR remote control (currently supported model: OSRAM LED STAR+)IR transmitter (tested on KY-005)IR receiver(tested on KY-022, optional)wiringSOFTWARE DEPENDENCIESRaspberry Pi OS (10 buster, or any other RPI compatible OS)LIRC (Linux Infrared Remote Control)SETUP AND INSTALLATIONInstall Raspberry PI OS on yourSD cardInstall lirc on your RPI:$ apt install lircConfigure lirc, connect and configure IR transmitter,guidelineInstall ambibulb. There are 2 ways, either build, install and configure locally:$ wget https://github.com/bespsm/ambibulb/archive/main.zip
 $ unzip main.zip
 $ cd ambibulb-main
 $ make install
 $ make configureor using pip (recommended in venv) and configure locally:$ python3 -m pip install ambibulb
 $ wget https://github.com/bespsm/ambibulb/archive/main.zip
 $ unzip main.zip
 $ cd ambibulb-main
 $ make configureCOMMANDSStart ambibulb service:$ systemctl --user start ambibulb.serviceStop ambibulb service:$ systemctl --user stop ambibulb.serviceCheck ambibulb service current status, two options:$ systemctl --user status ambibulb.service
$ journalctl -fConfigure/change the settings of ambibulb service:$ ambibulb-config
Package: ambient
ambientis a building physics and simulation Python library.The aims ofambientare to be:Simple: Provide intuitive defaults to get started quickly.Modular: Simulate only the parts you are interested in.Extensible: Enable users to create and modify their own components.Open: Provide an open-source building simulation library.Featuresambientcurrently offers modules for the analysis of:Layered constructions (including steady-state and dynamic response)Solar conditions (including design day calculations)Psychrometrics of moist airSimulations can be read from, and written to, JSON format for persistence.InstallationInstallambientin a virtual environment using:pipinstallambientLicenseambientis licensed under the terms of the Apache License, Version 2.0.
Refer to theLICENSEfile for details.
Package: ambientco2
ambientco2Python module for CozIR Ambient CO2 sensorsThe CozIR Ambient family of sensors all provide CO2 measurements, at different ranges. Some are able to measure temperature and relative humidity as well. The sensors use serial UART and analog voltage output.This library has been developed using aCozIR Ambient 0-5000 ppm CO2 (only)sensor.DevelopmentMilestoneFeaturesVersionStatusBetaBasic reading0.x.x:heavy_check_mark:LaunchModes, settings1.x.xSensorsRange, CO2, relative humidity, temperature2.x.xLibrary DocumentationAdd the following line to use this libraray:fromambientco2importSensorMember functionsNameParametersReturnsDescriptionSensor()str serial_devicevoidConstructorsetup()int mode, int fieldsvoidSensor setupread()str valueintReads CO2 concentration in PPMInstallationpip$pipinstallambientco2Usagefromambientco2importSensorserial_device="/dev/ttyUSB0"# Debian (Ubuntu, Raspberry Pi OS etc.)sensor=Sensor(serial_device)co2=sensor.read()print(type(co2))print(co2)Seeget_co2.pyfor a basic exampleSensor DocumentationProduct pageData sheetUser's ManualApplication Noteandsample code
Package: ambiguous
ambiguousbecause magic is funInstallpip install ambiguousUsagedecorator: because decorators should accept args too@decorator
def suffix(fn, str_='xyz'):
    '''add a suffix to the result of the wrapped fn'''
    def wrapper(*args, **kwargs):
        return '%s_%s' % (fn(*args, **kwargs), str_)
    return wrapper

@suffix
def abc(): return 'abc'

abc()
> 'abc_xyz'

@suffix('123')
def count(repeat=1): return '0' * repeat

count()
> '0_123'
count(3)
> '000_123'thing_or_things: merges gets and multigets@thing_or_things
def itself(args):
  return { x : x for x in args }

itself(1)
> 1
itself([1, 2])
> { 1 : 1, 2 : 2 }


# specified argument
@thing_or_things('args')
def prefix(prefix, args):
  return { x : "%s_%s" % (prefix, x) for x in args }

prefix('abc', [1, 2])
> { 1 : 'abc_1', 2 : 'abc_2' }


# works with default args
@thing_or_things
def multiply(args, factor=1):
  return { x : x * factor for x in args }

multiply(2)
> 2
multiply(2, factor=2)
> 4
multiply([1, 2], factor=3)
> { 1 : 3, 2 : 6 }what, parentheses optional?!   (warning: still highly experimental)import ambiguous

@ambiguous
def foo():
  return 'foo'

print foo
> 'foo'
print foo()
> 'foo'
foo + 'abc'
> 'fooabc'
Package: ambio
AmbioA light-weight bioinformatics library written in Python. It contains a variety of algorithms and functions that deal with strings.DocumentationThe complete documentation can be found onambio.readthedocs.ioInstallationRun the following command in a terminal to install:$pipinstallambioDevelopmentTo installambio, along with the tools you need to develop and run tests, run the following command:$pipinstall-e.
Package: ambisafe
InstallUse pippip install ambisafeUsageCreate clientImport Client and create client objectfrom ambisafe import Client

client = Client(ambisafe_server_url, secret, api_key, api_secret)You can set prefix for account idclient = Client(ambisafe_server_url, secret, api_key, api_secret, account_id_prefix='prefix')You can provide read and connect timeout (in seconds)client = Client(ambisafe_server_url, secret, api_key, api_secret, connect_timeout=2.5, read_timeout=5)Create accountSimple security schemaaccount = client.create_simple_account(account_id, currency='BTC')Wallet4 security schemaGenerate operator container using secret and create user container from
public_key, data (encrypted private key), iv and saltfrom ambisafe import Container

operator_container = Container.generate(client.secret)
user_container = Container(public_key, data, iv, salt)Create account for security schema “Wallet4” and “BTC” currencyaccount = client.create_wallet4_account(account_id, user_container=user_container,
                                        operator_container=operator_container,
                                        currency='BTC')Update Wallet4 accountCreate new containers and update accountaccount = client.update_wallet4_account(account_id, user_container=user_container,
                                        operator_container=operator_container,
                                        currency='BTC')Get balanceGet balance in floatbalance = client.get_balance(account_id, 'BTC')Get accountaccount = client.get_account(account_id, 'BTC')Make paymentFor Simple accountBuild and submit transactiontransaction = client.build_transaction(account_id, 'BTC', address, amount)
result = client.submit(account_id, transaction, 'BTC')For Wallet4 accountsBuild transactiontransaction = client.build_transaction(account_id, 'BTC', address, amount)Sign this transaction by user, then sing by operator and submit ittransaction = client.sign_wallet4_transaction(transaction, account_id, 'BTC')
client.submit(account_id, transaction, 'BTC')

# or

result = client.cosign_wallet4_and_submit(transaction, account_id, 'BTC')Build recovery transactiontransaction = client.build_recovery_transaction(account_id, currency, old_address)DisclaimerThe library still in BETA. There can be changes without backward
compatibility.
Package: ambition-django-timezone-field
A Django app providing database and form fields forpytztimezone objects.ExamplesDatabase Fieldimportpytzfromdjango.dbimportmodelsfromtimezone_fieldimportTimeZoneFieldclassMyModel(models.Model):timezone1=TimeZoneField(default='Europe/London')# defaults supportedtimezone2=TimeZoneField()timezone3=TimeZoneField()my_inst=MyModel(timezone1='America/Los_Angeles',# assignment of a stringtimezone2=pytz.timezone('Turkey'),# assignment of a pytz.DstTzInfotimezone3=pytz.UTC,# assignment of pytz.UTC singleton)my_inst.full_clean()# validates against pytz.common_timezonesmy_inst.save()# values stored in DB as stringstz=my_inst.timezone1# values retrieved as pytz objectsrepr(tz)# "<DstTzInfo 'America/Los_Angeles' PST-1 day, 16:00:00 STD>"Form Fieldfromdjangoimportformsfromtimezone_fieldimportTimeZoneFormFieldclassMyForm(forms.Form):timezone=TimeZoneFormField()my_form=MyForm({'timezone':'America/Los_Angeles',})my_form.full_clean()# validates against pytz.common_timezonestz=my_form.cleaned_data['timezone']# values retrieved as pytz objectsrepr(tz)# "<DstTzInfo 'America/Los_Angeles' PST-1 day, 16:00:00 STD>"InstallationFrompypiusingpip:pipinstalldjango-timezone-fieldAddtimezone_fieldto yoursettings.INSTALLED_APPS:INSTALLED_APPS=(...'timezone_field',...)Changelog2.0 (2016-01-31)Drop support for django 1.7, add support for django 1.9Drop support for python 3.2, 3.3, add support for python 3.5Remove tests from source distribution1.3 (2015-10-12)Drop support for django 1.6, add support for django 1.8Variousbug fixes1.2 (2015-02-05)For form field, changed default list of accepted timezones frompytz.all_timezonestopytz.common_timezones, to match DB field
behavior.1.1 (2014-10-05)Django 1.7 compatibilityAdded support for formatingchoiceskwarg as[[<str>, <str>], …],
in addition to previous format of[[<pytz.timezone>, <str>], …].Changed default list of accepted timezones frompytz.all_timezonestopytz.common_timezones. If you have timezones in your DB that are inpytz.all_timezonesbut not inpytz.common_timezones, this is a
backward-incompatible change. Old behavior can be restored by
specifyingchoices=[(tz, tz) for tz in pytz.all_timezones]in your
model definition.1.0 (2013-08-04)Initial release astimezone_field.Running the TestsInstalltox.From the repository root, runtoxPostgres will need to be running locally, and sqlite will need to be
installed in order for tox to do its job.Found a Bug?To file a bug or submit a patch, please head over todjango-timezone-field on github.CreditsOriginally adapted fromBrian Rosner’s django-timezones. The full list of contributors is available ongithub.
Package: ambition-django-uuidfield
Provides a UUIDField for your Django models.InstallationInstall it with pip (or easy_install):pip install ambition-django-uuidfieldUsageFirst you’ll need to attach a UUIDField to your class. This acts as a char(32) to maintain compatibility with SQL versions:from uuidfield import UUIDField

class MyModel(models.Model):
    uuid = UUIDField(auto=True)Check out the source for more configuration values.Enjoy!
Package: ambition-inmemorystorage
dj-inmemorystorageAn in-memory data storage backend for Django.Compatible with Django’sstorage API.Supported VersionsPython 2.6/2.7 with Django 1.4+
Python 3.2/3.3/3.4 with Django 1.5+UsageIn your test settings file, addDEFAULT_FILE_STORAGE='inmemorystorage.InMemoryStorage'By default, theInMemoryStoragebackend is non-persistant, meaning that
writes to it from one section of your code will not be present when reading
from another section of your code, unless both are sharing the same instance of
the storage backend.If you need your storage to persist, you can add the following to your settings.INMEMORYSTORAGE_PERSIST=TrueDifferencesThis library is based ondjango-inmemorystorageby Cody Soyland,
withmodificationsmade by Seán Hayes with support for theurlmethod,
withadditional supportfrom Tore Birkeland for writing to the file.Wave’s modifications include packaging, and test modifications such thatpython setup.py testworks. This version
also bumps the version to1.0.0and renames it to dj-inmemorystorage such that it doesn’t conflict on PyPI.The biggest difference is that this package works with Django 1.4 now (previously only 1.5+).
It also supports Python 2.6/2.7 with Django 1.4+ and Python 3.2/3.3/3.4 with Django 1.5+.ContributingEnsure that you open a pull requestAll feature additions/bug fixes MUST include tests
Package: ambition-rando
ambition-randoRandomization class and model for AmbitionTo load the randomization list:pythonmanage.pyimport_randomization_listTo rebuild the records in RandomizationList:fromdjango.core.exceptionsimportObjectDoesNotExistfromdjango.contrib.sites.modelsimportSitefromedc_registration.modelsimportRegisteredSubjectfromambition_rando.modelsimportRandomizationListcurrent_site=Site.objects.get_current()forobjinRegisteredSubject.on_site.all():try:randobj=RandomizationList.objects.get(sid=obj.sid)exceptObjectDoesNotExist:print(f'missing for{obj.subject_identifier},{obj.sid}.')else:randobj.alocated_site=current_siterandobj.subject_identifier=obj.subject_identifierrandobj.allocated_datetime=obj.consent_datetimerandobj.allocated=Truerandobj.save()
Package: ambition-utils
RequirementsPython 3.6+Django 1.11+Postgres 9.5+InstallationTo install the latest release, type:pip install ambition-utilsTo install the latest code directly from source, type:pip install git+git://github.com/ambitioninc/ambition-utils.gitDocumentationNote: As of version 0.5.0, this project only supports Python3.6+
If you need Python2 support, pin toambition-utils==0.4.0Full documentation is available athttp://ambition-utils.readthedocs.orgLicenseMIT License (see LICENSE)
Package: ambition-validators
|pypi| |travis| |coverage|ambition-validators-----------------.. |pypi| image:: https://img.shields.io/pypi/v/ambition-validators.svg:target: https://pypi.python.org/pypi/ambition-validators.. |travis| image:: https://travis-ci.com/ambition-trial/ambition-validators.svg?branch=develop:target: https://travis-ci.com/ambition-trial/ambition-validators.. |coverage| image:: https://coveralls.io/repos/github/ambition-trial/ambition-validators/badge.svg?branch=develop:target: https://coveralls.io/github/ambition-trial/ambition-validators?branch=develop
Package: ambiverseclient
Note:This client is not affiliated with Ambiverse or the Max-Planck-Institute.Table of ContentsInstallUsageLicenseInstallInstall with pip:`sh pip installambiverse-client`UsageKnowledgeGraph Clientfromambiverseclient.clientsimportKnowledgeGraphkg=KnowledgeGraph(API_ENDPOINT_HOST,port=API_ENDPOINT_PORT)entity_list=["http://www.wikidata.org/entity/Q104493","http://www.wikidata.org/entity/Q103968"]result=kg.entities(entity_list)AmbiverseNLU Clientfromambiverseclient.clientsimportAmbiverseNLUfromambiverseclient.modelsimportAnalyzeInputac=AmbiverseNLU(API_ENDPOINT_HOST,port=API_ENDPOINT_PORT)request_doc=AnalyzeInput(docId="test",language="en")request_doc.text="""Brexit: UBS to move London jobs to Europe as lack of transition deal forces
                     'significant changes' Swiss banking giant expects to merge UK entity with its
                     German-headquartered European ..."""ac.analyze(request_doc)LicenseThis code is distributed under the terms of the GPLv3  license.  Details can be found in the file
[LICENSE](LICENSE) in this repository.Package AuthorLinus Kohl, <linus@munichresearch.com>
Package: ambra-sdk
Ambra-SDKWelcome to ambra-sdk library for intract with ambrahealth service and storage api.Quickstartpipinstallambra-sdkRunningfromambra_sdk.apiimportApifromambra_sdk.modelsimportStudyfromambra_sdk.service.filteringimportFilter,FilterConditionfromambra_sdk.service.sortingimportSorter,SortingOrder# Usually, URL has a form:# url = https://ambrahealth_host/api/v3# username and password - ambrahealth credentials.api=Api.with_creds(url,username,password)user_info=api.Session.user().get()studies=api\.Study\.list()\.filter_by(Filter('phi_namespace',FilterCondition.equals,user_info.namespace_id,),)\.only([Study.study_uid,Study.image_count])\.sort_by(Sorter('created',SortingOrder.ascending,),)\.all()forstudyinstudies:print(study.study_uid,study.image_count)LicenseAmbra-SDK is licensed under the terms of the Apache-2.0 License (see the file LICENSE).Read the docsDocumentation:https://dicomgrid.github.io/sdk-python/index.html