Saravanan666/pypi-org huggingface dataset:
Package: lowatt-enedis
lowatt-enedisA command-line tool and Python library to accessEnedisSGE SOAP web-services, provided byLOWATT.Disclaimer: this package isNOTaffiliated to Enedis, but provided by Lowatt
in case it could be useful to other users of the SGE web-services provided by
Enedis.LicensingIt is published under the terms of the GPL 3 license.Installationpip install lowatt-enedisCommand line usageSeelowatt-enedis --helpfor CLI usage. You'll be able to call the services
controlled using options and see the SOAP response.  You can take a look atdoc/homologation.mdfor a sample session to go through Enedis'homologation
process.Some flags are required by all or most of the commands so they can be
configured once by their respective environment variables.OptionEnvironment variable--cert-fileENEDIS_CERT_FILE--key-fileENEDIS_KEY_FILE--loginENEDIS_LOGIN--contratENEDIS_CONTRATPython library usageHere is a sample code to access to theConsultationMesuresDetailleesfrom
Python code :importdatetimeimportlowatt_enedisimportlowatt_enedis.servicesconfig={'login':'you@example.com','certificateFile':'fullchain.pem','keyFile':'privkey.pem','prm':'30000123456789',}# get client for the 'details' service using appropriate client# certificate and keyclient=lowatt_enedis.get_client(lowatt_enedis.COMMAND_SERVICE['details'][0],config['certificateFile'],config['keyFile'],)# actually call the web to get values for the past weekresp=lowatt_enedis.services.point_detailed_measures(client,{'login':config['login'],'prm':config['prm'],'type':'COURBE','courbe_type':'PA','corrigee':True,'from':datetime.date.today()-datetime.timedelta(days=7),'to':datetime.date.today(),})# get a list of (UTC timestamp, value(W))data=lowatt_enedis.services.measures_resp2py(resp)ContributionsContribution are welcome through theGithub
repository.Feel free to contact for more info by writing atinfo@lowatt.fr.Sponsors
Package: lowatt-grdf
lowatt-grdfA command-line tool and Python library to accessGrDF AdictAPI, provided byLowatt.LicensingIt is published under the terms of the MIT license.Installationpip install lowatt-grdfCommand line usage$ lowatt-grdf --help
Usage: lowatt-grdf [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  declare-acces
  donnees-consos-informatives
  donnees-consos-publiees
  donnees-contractuelles
  donnees-techniques
  droits-accesEach subcommand implement the related API endpoint and output json that can easily be piped tojqfor reading.
Also each command will require to supply--client-idand--client-secret, or via corresponding environment variablesCLIENT_IDandCLIENT_SECRET. These access are only provided by GRDF.Thedroits-accessubcommand has also a--checkparameter which will check consent validation:statut_controle_preuvemust not bePreuve en attenteorPreuve Vérifiée KOetat_droit_accesmust beActiveThis command is intended to be used at a daily basis in CI or cron, raising an alert in case of error, because it will require a manual correction.Python library usageHere is a sample code to access to thedonnees-consos-publieesendpoint:fromlowatt_grdf.apiimportAPIclient_id="ID"client_secret="SECRET"pce="23000000000000"grdf=API(client_id,client_secret)forreleveingrdf.donnees_consos_publiees(pce,from_date="2021-01-01",to_date="2021-08-23"):conso=releve["consommation"]print(conso["date_debut_consommation"],conso["date_fin_consommation"],conso["energie"])ContributionsContribution are welcome through theGithub
repository.Feel free to contact for more info by writing atinfo@lowatt.fr.
Package: lowdash
LowdashLowdash is a simple implementation of lodash in python.Lowdash will provide you with a set of functions that will help to work with arrays, objects and other data structures.InstallingpipinstalllowdashGetting StartedTo get started you can use the following code:fromlowdash.arraysimport*compact(['a','','b',None,'c'])# Output : ['a', 'b', 'c']Documentation Comming Soon!
Package: lowDB
LowDB-pyHeavy inspired from lowDb a node packagetypicode/lowdbWhy ??Not every project requires a full on database with proper dbm and you requiring to write a db module, sometiems all you want is a basic storage for your Proof of concept or for the project where you are something very new and don't want to focus on database functions.SolutionA simple JSON file with a wrapper sdk to handle basic operations locally to a file, which can later be exported to Firestore or mongodb directly.To build and install the project# Install package building toolspython3-mpipinstallsetuptoolswheel# Build the projectpython3-msetup.pysdistbdist_wheel# Install the project to your local machinepython3-mpipinstall-e.
Package: lowEBMs
This python package is an implementation of low-dimensional energy balance models.It shall serves as a framework to compile and simulate energy balance models from a collection of parameterizations which describe the energy transport of reduced/simplified earth system.Models (Parameterizations) implemented are:-0D energy balance models-1D energy balance modelsThe range of applications and features is constantly extended. They focus on:-Exploration and quantification of parameterizations describing the climate system-Exploration and quantification of radiative climate forcings-Fast and accessible tools to analyze climate system simulations-Tools for the optimization of parameterizationsThe most implementations are based on the work of former developers of climate models which are tried to be gathered and combined within this package. The central approaches to formulate energy balance models included in this package are based on the publications from Sellers (1969) and Budyko (1968).A detailed description of the implementations, installation, usage, future plans and further references can be found in the packages documentation.For more information please see:https://lowebms.readthedocs.io/en/latest/You are very welcome to work with this package and extend it to allow an application to anything you are interested.If you are interested in contributing to this project or have problems with the usage, feel free to contact me:Benjamin Schmiedel (mail: benny.schmiedel@gmail.com, github-username: BenniSchmiedel)
Package: lowendspirit
lowendspirit is an MIT Licenced library, writen in Python 3.It has modules for sending requests to CloudFlare, SolusVM and Virtualizor API. It is intended to be used by end users.
All you need to do is get API Keys and API hashes to make it work.InstallationTo install lowendspirit, simply:pip install lowendspiritDocumentationDocumentation is available athttp://pythonhosted.org/lowendspiritUsagefrom lowendspirit import Cloudflare_Enduser_API, Solus_Enduser_API, Virtualizor_Enduser_APIContributeCheck for open issue or open a fresh issue to start a discussionForrepositoryon GithubSend a pull request
Package: lowercase-booleans
Lowercase BooleansHave you ever felt the need to usetrueandfalsein your Python program? Then this is the perfect module for you!Installationpip install lowercase_booleansUsageJust add this to the top of your Python file:from lowercase_booleans import true, falseThat's it, now you are good to go. Use lowercase booleans to your hearts content.from lowercase_booleans import true, false


def contains(haystack, needle):
    for item in haystack:
        if item == needle:
            return true
    return false


print(contains(range(10), 5))
print(contains("boolean", "c"))TestsSimply runpytest test.pyAfter all, we need to make sure that true is still true and false is still false.
100% statement coverage, 100% branch coverage and even 100% path coverage, guaranteed!(Yes, this is satire in case you were wondering.)
Package: lowerpines
LowerPines: GroupMe API Wrapper for PythonThis library provides a Python wrapper around theGroupMev3 API.InstallationUsepipto install:pip3 install lowerpinesBasic UsageThis requires a Access Token from theGroupMe developers siteThe first step to doing anything with this library is to create aGMIobject:from lowerpines.gmi import get_gmi

gmi = get_gmi(access_token='access token here')A GMI object stores a copy of the Access Token and serves as a context for various functions.
Theget_gmi(access_token)method will get a GMI from the cache or create one if necessary.
GMI objects also provide common functions:for group in gmi.groups:
    print(group, group.name)

for bot in gmi.bots:
    print(bot, bot.group)

for chat in gmi.chats:
    print(chat, chat.other_user)

test_group = gmi.groups.get(name='Testing Group')
test_bot = gmi.bots.get(group_id=test_group.group_id)
test_bot.post('Hello, world!')GroupMe supports complex message structures, such as including GroupMe-specific emoji, pictures, etc. This information
can be utilized throughComplexMessageobjects:from lowerpines.message import ImageAttach

# This will dynamically create a ComplexMessage object:
complex_message = ImageAttach('URL to GroupMe processed image here') + 'Look at my cool picture'
test_bot.post(complex_message)The variousMessageAttachobjects (such asImageAttach,EmojiAttach, etc.) will automatically convert themselves into aComplexMessageobject when added to astror to anotherMessageAttachobject.
However, aMessageAttachobject isnotaComplexMessageobject, so the following is not allowed:test_bot.post(ImageAttach('URL here'))  # This will trigger an exceptionThe correct way to do this is to create aComplexMessageobject manually:from lowerpines.message import ComplexMessage

complex_message = ComplexMessage(ImageAttach('URL here'))
test_bot.post(complex_message)Viewing messages for groups is also available:for message in test_group.messages.recent():
    print(message.text)Each message’s text is also available as aComplexMessageobject throughmessage.complex_textPlease see thedocsdirectory for more information.
Package: lowess-grouped
Lowess GroupedApply groupwise lowess smoothing to a dataframe.Smooth data for each category using thelowess(aka loess) algorithm.
You can use this code for all forms of data that should be smoothed independently by group:Figure 1: Smoothed temperature data for each regionUsageInstall the package (Python 3.8 or higher):pip install lowess-groupedImport the package and call the functionlowess_groupedwith your dataframedf. Use the parameterfracto control the strength of the smoothing:fromlowess_grouped.lowess_groupedimportlowess_groupeddf_smoothed=lowess_grouped(df,x_name="year",y_name="temperature_anomaly",group_name="region_name",frac=0.05)For a detailed example, refer to the notebooktemperature-example.ipynb.TestcasesTests are defined in the foldertests. To run them manually, follow these steps:Download thesource codefrom GitHub.Install package locally by executing the following command in the project folder:pip install -e .You might need to upgrade your version of pip for this to work:pip install --upgrade pipRun the tests:python ./tests/test_lowess_grouped.py -vMotivationSmoothing data can greatly improve the interpretability of visualizations.
One commonly used method is lowess, also knows as loess, sometimes also referred asSavitzky–Golay filter.However, the built-in lowess function in Statsmodels (a popular statistics package) applies smoothing to the entire dataframe.
This can lead to undesirable results when you need independent smoothing for multiple groups (e.g., temperature data by regions).This package was developed to address this limitation and provide some convenience, like getting a dataframe with column names back, instead of unnamed numpy arrays.
Internally it still uses Statsmodels.AttributionThis project builds upon the lowess function fromstatsmodels.
The temperature data used in the example notebook and testcases is fromBerkley Earth, and licensed underCreative Commons BY-NC 4.0 International.
Package: lowhaio-aws-sigv4
lowhaio-aws-sigv4AWS Signature Version 4 signing for lowhaioInstallationpipinstalllowhaiolowhaio_aws_sigv4UsageTherequestfunction returned fromlowhaio.Poolmust be wrapped withlowhaio_aws_sigv4.signed, as in the below example.importosfromlowhaioimportPoolfromlowhaio_aws_sigv4importsignedrequest,_=Pool()# A coroutine that returns a tuple a tuple of access key id, secret access# key, any other headers, such as x-amz-security-tokenasyncdefcredentials():returnos.environ['AWS_ACCESS_KEY_ID'],os.environ['AWS_SECRET_ACCESS_KEY'],()signed_request=request(request,credentials=credentials,service='s3',region='eu-west-1',)code,headers,body=awaitsigned_request(b'GET','https://s3-eu-west-1.amazonaws.com/my-bucket/my-key')asyncforchunkinbody:print(chunk)
Package: lowhaio-aws-sigv4-unsigned-payload
lowhaio-aws-sigv4-unsigned-payloadAWS Signature Version 4 signing forlowhaio, but with UNSIGNED-PAYLOAD. This avoids having to buffer entire objects to memory before upload to S3. However, the length of the object must be known before upload begins.Installationpipinstalllowhaiolowhaio_aws_sigv4_unsigned_payloadUsageTherequestfunction returned fromlowhaio.Poolmust be wrapped withlowhaio_aws_sigv4_unsigned_payload.signed, as in the below example.importosfromlowhaioimportPoolfromlowhaio_aws_sigv4_unsigned_payloadimportsignedrequest,_=Pool()chunk='abcdefghijklmnopqrstuvqxyz'content_length=str(len(chunk)*1000).encode()asyncdefbody():for_inrange(0,1000)yieldchunk# A coroutine that returns a tuple a tuple of access key id, secret access# key, any other headers, such as x-amz-security-tokenasyncdefcredentials():returnos.environ['AWS_ACCESS_KEY_ID'],os.environ['AWS_SECRET_ACCESS_KEY'],()signed_request=request(request,credentials=credentials,service='s3',region='eu-west-1',)code,headers,body=awaitsigned_request(b'PUT','https://my-bucket.s3-eu-west-1.amazonaws.com/my-key',body=bodyheaders=((b'content-length':content_length),))awaitbuffered(body)
Package: lowhaio-chunked
lowhaio-chunkedChunked transfer request encoding forlowhaio. This is only needed ifcontent-lengthis unknown before the body starts to transfer.Installationpipinstalllowhaiolowhaio_chunkedor just copy and paste the below 8 lines of code into your project, ensuring to also follow the requirements in the LICENSE file.defchunked(body):asyncdef_chunked(*args,**kwargs):asyncforchunkinbody(*args,**kwargs):yieldhex(len(chunk))[2:].encode()+b'\r\n'yieldchunkyieldb'\r\n'yieldb'0\r\n\r\n'return_chunkedUsageUsage is very similar to standard lowhaio, except that thebodydata should be wrapped with thechunkedfunction; thetransfer-encoding: chunkedheader is required; and thecontent-lengthheader shouldnotbe specified.So instead of a request likefromlowhaioimportPoolrequest,_=Pool()body=...code,headers,body=awaitrequest(b'POST','https://example.com/path',body=body,headers=((b'content-length',b'1234'),),)you can writefromlowhaioimportPoolfromlowhaio_chunkedimportchunked# Or paste in the code aboverequest,_=Pool()body=...code,headers,body=awaitrequest(b'POST','https://example.com/path',body=chunked(body),headers=((b'transfer-encoding':b'chunked'),),)
Package: lowhaio-redirect
lowhaio-redirectWrapper of lowhaio that follows HTTP redirectsInstallationpipinstalllowhaiolowhaio_redirectUsageTherequestfunction returned fromlowhaio.Poolmust be wrapped withlowhaio_redirect.redirectable, as in the below example.importosfromlowhaioimportPoolfromlowhaio_redirectimportredirectablerequest,_=Pool()redirectable_request=redirectable(request)code,headers,body=awaitredirectable_request(b'GET','https://example.com/path')asyncforchunkinbody:print(chunk)Method and body changingThe default behavior is as below.301, 302 redirects from a POST are converted to GETs with empty bodies; all other requests do not change methods and bodies.303 redirects, all non HEAD and GET requests are converted to GETs with empty bodies.307 and 308 redirects, the method and bodies are always unchanged.Note however, that an unchanged body is actuallynotguaranteed by this wrapper. For each request the function passed as thebodyargument is called, and it may return different things on each call. It is up the the developer to handle this case as needed: there is no one-size-fits all approach, since for streaming requests, the body may not be available again. In many cases, a redirect that expects a resubmission of a large upload may be an error; or if an API is never expected to return a redirect,notusing this wrapper at all may be a viable option, and instead a few lines of code that raises an exception if a redirect is returned from the server.Customise redirectsIt is possible to customise which redirects are followed, and how they affect the method and body. As an example, to recreate the default behaviour explicitly, the below code could be used.defget(method,body,body_args,body_kwargs,headers):# Asynchronous generator that end immediately, and results in an empty bodyasyncdefempty_body():whileFalse:yieldnext_request_headers=tuple((key,value)forkey,valueinheadersifkey.lower()notin(b'content-length',b'transfer-encoding'))return(b'GET',empty_body,(),(),next_request_headers)defunchanged(method,body,body_args,body_kwargs,headers):return(method,body,body_args,body_kwargs,headers)redirectable_request=redirectable(request,redirects=((b'301',lambdamethod:unchangedifmethod!=b'POST'elseget),(b'302',lambdamethod:unchangedifmethod!=b'POST'elseget),(b'303',lambdamethod:unchangedifmethodin(b'GET',b'HEAD')elseget),(b'307',lambdamethod:unchanged),(b'308',lambdamethod:unchanged),))Authorization headerBy default, the Authorization header is not passed to if redirected to another domain. This can be customised. As an example, to recreate the default behaviour explicitly, the below code can be used.defstrip_authorization_if_different_host(request_headers,request_host,redirect_host):forbidden=\(b'authorization',)ifrequest_host!=redirect_hostelse\()returntuple((key,value)forkey,valueinrequest_headersifkey.lower()notinforbidden)redirectable_request=redirectable(request,transform_headers=strip_authorization_if_different_host)
Package: lowhaio-retry
lowhaio-retryWrapper that retries failedlowhaioHTTP requests. Allows retries of exceptions from failed HTTP requests.Installationpipinstalllowhaio_retryUsageTherequestfunction returned fromlowhaio.Poolmust be wrapped withlowhaio_retry.retry, as in the below example. This will retry the request, waiting the specified interval between retries. If the request still fails, the final exception will be bubbled up to client code.So instead of a request likefromlowhaioimportPoolrequest,_=Pool()body=...code,headers,body=awaitrequest(b'PUT','https://example.com/path',body=body,headers=((b'content-length',b'1234'),),)you can writefromlowhaioimportPool,HttpConnectionError,HttpDataErrorfromlowhaio_retryimportretryrequest,_=Pool()retriable_request=retry(request,exception_intervals=(# Seconds to wait after each exception(HttpConnectionError,(0,0,0)),(HttpDataError,(0,1,2,4)),),)body=...code,headers,body=awaitretriable_request(b'PUT','https://example.com/path',body=body,headers=((b'content-length',b'1234'),),)
Package: low-index
Low Index SubgroupsThe low_index project provides a Python module which implements a variant
of Charles Sims’ Low Index Subgroups algorithm for enumerating all of
the conjugacy classes of subgroups of a finitely presented group with
finite index less than a given bound.The package is available on pypi, so the simplest way to install it for
Python versions 3.6 - 3.11 is to use pip:pip3installlow-indexHere is a sample computation:>>>fromlow_indeximport*>>># Conjugacy classes of subgroups of F_3 with index at most 4:>>>reps=permutation_reps(rank=3,short_relators=[],long_relators=[],max_degree=4)>>>len(reps)653>>>fromsnappyimport*>>>G=Manifold('K11n34').fundamental_group();GGenerators:a,b,cRelators:aaBcbbcAcaacAbCBBaCAAbbcBc>>># Degree at most 7 covers of the exterior of the Conway knot:>>>reps=permutation_reps(G.num_generators(),G.relators()[:1],G.relators()[1:],7)>>>len(reps)52>>>reps[25][[1,0,3,2,5,6,4],[1,4,0,6,2,5,3],[3,0,2,6,4,1,5]]CreditsPrimarily developed byMarc Culler,Nathan Dunfield, andMatthias GoernerLicenseCopyright 2022 by Marc Culler, Nathan Dunfield, Matthias Goerner
and others.This code is released under theGNU General Public License, version 2or (at your option) any
later version as published by the Free Software Foundation.
Package: lowpy
Welcome to LowPy (Pre-release)!LowPyis a high level GPU simulator of low level device characteristics in machine algorithms. It seeks to streamline the investigation process when considering memristive and other novel devices for implementing a machine learning algorithm in hardware. By using the familiarKerassyntax, it will be second nature to write GPU-optimized code to push your algorithm to its limits.FeaturesThe aim is to focus first on the algorithms most published on in the field of neuromorphic computing, for both static and time series datasets.DatasetsMNISTAlgorithmsSingle Layer Perceptron (SLP)Multi-Layer Perceprton (MLP)Activation FunctionsSigmoidOptimization FunctionsStochastic Gradient Descent (SGD)SGD with MomentumInitialization DistributionsUniformNormalDevice CharacteristicsWrite VariabilityRequirementsThe following are required to use LowPy:GPU: NVIDIAOS: Linux (should work on Windows, not tested)Python 3.0 or newerPyCUDA
Package: lowrapper
lowrapperThe lowrapper is a library for quickly and easily creating an environment for tapping the API without implementation.Typing theClientclass creates a simple API wrapper with type completion.Also, it may also be useful for creating API wrappers.Let's start by looking at Simple Example below to see how it works.Simple ExampleThis is theweather forecast API'slow wrapper.# 天気予報 API the low level wrapperfromlowrapperimportClient,Responseclient:Client[Response]=Client("https://weather.tsukumijima.net/api/")print(client.forecast(method="GET",params={"city":120010}).json())# [GET] https://weather.tsukumijima.net/api/forecast?city=120010This example uses the weather forecast API to get weather forecast information for Chiba Prefecture.(Chiba Prefecture is a prefecture in Japan.)Explanation for Simple ExamplePass the API endpoint base URL toClient.Write the end of the endpoint of the API in the class attribute. (client.forecast->/forecast)Hit the API.As you can see, you can create an endpoint with Python class attributes.You can also change the arguments for the request.  (Let's seeFAQs)InstallationYou can install lowrapper by running this command.pip install lowrapperIf you want asynchronous lowrapper, you can get this by running this command.pip install lowrapper[asynchronous]orpip install aiohttpFAQsQ: I want to hit an endpoint that changes dynamically.A:You can hit this by using like dictionary as follows.client[YOUR_DYNAMIC_ENDPOINT]("GET", ...)Q: I want to type the client class.A:You can type by inheriting the client class as follows.fromlowrapperimportClient,Path,ResponseclassEndpoint(Path[Response]):ping:Path[Response]classMySomeAPIClient(Client[Response]):some:Endpointclient=MySomeAPIClient("https://api.some.web/")print(client.some.ping(method="GET").text)# [GET] https://api.some.web/some/ping# -> Some's PONG!Q: I want to use asynchronous version of lowrapper.A:You can use it by importinglowrapper.aioas follows.fromlowrapper.aioimportClient,Path,CoroutineResponseclient:Client[CoroutineResponse]=Client("https://asynchronous.love/")And you should installaiohttpto request.Q: I want to change the request args.A:You can change the request args like bellow.fromlowrapperimportClient,Path,Method,ResponseclassMyClient(Client[Response]):BASE="https://simple.chat/"def__init__(self):super().__init__(self.BASE)defsend(self,message:str)->Response:returnself.__request__(self,method="POST",json={"content":message})client=MyClient()client.send("Hi")# [POST] https://simple.chat/send# <Data> {"content": "Hi"}Q: I want a guide.A:Let's see documentation's guide.ContributingLet's cooperate by making an issue and submitting a Pull Request!In case of Pull Request, please try not to change the style of the code. (65% PEP8)DocumentationUserGuide and Documentation ishere.
Package: lowtime
Lowtime: A Time-Cost Tradeoff Problem SolverLowtime is a library for solving thetime-cost tradeoff problem.What do I uselowtimefor?Say you want to execute aDAG of operations or tasks, and each operation has multiple execution options each withdifferent time and cost.Given the definition of the DAG,lowtimewill find thecomplete time-cost Pareto frontierof the entire DAG.You definecost. Any positive floating point number that is at odds with time!