Saravanan666/pypi-org huggingface dataset:
Package: pyInterDemand
pyInterDemand - Intermittent Demand LibraryDemand forecasting is a critical component of supply chain management and business operations. While traditional demand forecasting methods are geared towards continuous and stable demand patterns, intermittent demand characterized by irregular or sporadic purchase events presents a unique set of challenges. pyInterDemand is a Python library designed to address these challenges by offering a comprehensive suite of algorithms tailored for intermittent demand forecasting.The supported algorithms are:Croston- Croston's method separates the intermittent demand data into two separate sequences, one for the non-zero demand and another for the intervals between non-zero demands. The method then applies separate exponential smoothing on both.SBA (Syntetos & Boylan Approximation)- This approach extends Croston's method by adjusting the smoothing parameter based on the bias in the forecast error.SBJ (Syntetos, Boylan & Johnston)- An evolution of the SBA method, SBJ introduces an additional parameter to optimize the estimation further.TSB (Teunter, Syntetos & Babai)- TSB offers a modification of Croston's method to improve forecast accuracy by dynamically updating the smoothing parameter.HES (Hyperbolic-Exponential Smoothing)- This is a generalized exponential smoothing technique adapted for intermittent demand scenarios.LES (Linear Exponential Smoothing)- LES employs a linear function to model the demand, smoothing the data points over time.SES (Simple Exponential Smoothing)- The most straightforward among the techniques, SES applies an exponential decay to past observations.UsageInstallpipinstallpyInterDemandImport# ImportfrompyInterDemand.algorithm.intermittentimportplot_int_demand,classification,mase,rmsefrompyInterDemand.algorithm.intermittentimportcroston_method# Load Datasetdata={'DATE':pd.Series(['21/08/2020','22/08/2020','23/08/2020','24/08/2020','25/08/2020','26/08/2020','27/08/2020','28/08/2020','29/08/2020','30/08/2020','31/08/2020','01/09/2020']),'Value':pd.Series([5,10,0,0,0,0,7,0,0,0,6,0]),}dataset=pd.DataFrame(data)dataset['DATE']=pd.to_datetime(dataset['DATE'],dayfirst=True).map(lambdax:x.strftime('%d-%m-%Y'))# Prepare Time Series TSts=dataset['Value'].copy(deep=True)ts.index=pd.DatetimeIndex(dataset['DATE'],dayfirst=True)ts=ts.sort_index()ts=ts.reindex(pd.date_range(ts.index.min(),ts.index.max()),fill_value=0)ts=ts.loc[ts[(ts!=0)].first_valid_index():]print('')print('Total Number of Observations: ',ts.shape[0])print('Total Number of Zeros: ',len(ts[ts==0]))print('Start Date: ',ts.index[0])print('End Date: ',ts.index[-1])print('')# Time Series Classificationadi,cv_sq=classification(ts)# Time Series Plotplot_int_demand(ts,size_x=15,size_y=10,bar_width=0.3)# Crostonv,q,forecast=croston_method(ts,alpha=0.5,n_steps=4)plot_int_demand(ts,size_x=15,size_y=10,bar_width=0.3,prediction=forecast)# Errorprint('MASE = ',round(mase(ts,forecast),3),', RMSE = ',round(rmse(ts,forecast),3))Try it inColab:Croston (Colab Demo) (Paper)SBA (Colab Demo) (Paper)SBJ (Colab Demo) (Paper)TSB (Colab Demo) (Paper)HES (Colab Demo) (Paper)LES (Colab Demo) (Paper)SES (Colab Demo) (Paper)
Package: pyinterface
Interface PCI board driver for pythonEnvironmentLinuxpython 3require :portio moduleInstallationpip install pyinterfaceUsageimport pyinterface

board_name = 2724
rsw_id = 2

b = pyinterface.open(board_name, rsw_id)
b.input_byte('IN1_8')
>>> [0, 0, 0, 0, 0, 0, 0, 0]

b.output_byte([0, 1, 0, 1, 0, 0, 1, 1], 'OUT25_32')
>>> 000000CADocumentshttp://pyinterface.readthedocs.io/ja/latest/index.html
Package: pyintergraph
pyintergraphConvert Python-Graph-Objects between networkx, python-igraph and graph-tool.InstallationThis package can be installed via:pip install pyintergraphFor the note on imports and dependencies, see the section at the bottom of the page.Usageimportnetworkxasnximportpyintergraphnx_graph=nx.karate_club_graph()graph_tool_graph=pyintergraph.nx2gt(nx_graph,labelname="node_label")igraph_graph=pyintergraph.gt2igraph(graph_tool_graph,labelname="node_label")reversed_nx_graph=pyintergraph.igraph2nx(igraph_graph)# orGraph=pyintergraph.InterGraph.from_networkx(nx_graph)graph_tool_graph=Graph.to_graph_tool(labelname="node_label")igraph_graph=Graph.to_igraph()reversed_nx_graph=Graph.to_networkx()assertlist(nx_graph.nodes(data=True))==list(reversed_nx_graph.nodes(data=True))assertlist(nx_graph.edges(data=True))==list(reversed_nx_graph.edges(data=True))asserttype(nx_graph)==type(reversed_nx_graph)A note on imports and dependenciesBecause the installation of python-igraph and graph_tool can be tricky, they are not set as required dependencies for this package. As not everyone has all three packages installed, imports happen just when the two functions of interest are called. That way it is possible to convert networkX-Graphs to igraph-Graphs even when graph_tool is not installed.
Package: pyinterpolate-datasets
pyinterpolate-datasetsDatasets used throughout tutorials and examples inpyinterpolatePyinterpolate RepositoryDatasetsPoint Krigingcsvpl_dem.csv: sample of DEM readings for region near the Polish city Gorzow Wielkopolski. Sample retrieved fromCopernicus Land Monitoring Service,EU-DEM dataset.meuse/meuse.csvandmeuse/meuse_grid.csv: from Pebesma, Edzer. (2009). The meuse data set: a tutorial for the gstat R package. URL:https://cran.r-project.org/web/packages/gstat/vignettes/gstat.pdfnumpyarmstrong_data: data from bookBasic Linear Geostatisticswritten byMargaret Armstrongwith DOI:https://doi.org/10.1007/978-3-642-58727-6txtpl_dem.txt: seepl_dem.csv,pl_dem_epsg2180.txt: the same dataset aspl_dem.txtbut reprojected to metric system.Block Krigingcancer_data.gpkgBreast cancer rates are taken from the Incidence Rate Report for U.S. counties and were clipped to the counties of the Northeastern part of U.S.National Cancer Institute - Incidence Rates Table: Breast Cancer: Pennsylvania State. Observations are age-adjusted and multiplied by 100,000 for the period 2013-2017.Population centroids are retrieved from the U.S. Census Blocks 2010United States Census Bureau - Centers of Population for the 2010 Census. Breast cancer affects only females but for this example the whole population for an area was included. Raw and transformed datasets are available in a dedicated Github repository.meta:block / polygon layer:areas,point support / population layer:points,point support value:POP10,block and point support geometry column:geometry,block index column:FIPS,block values column:rate.Raw data and transformation steps
Package: pyintersection
# pyintersectionOverviewThe pyintersection package provides a set of functions for finding intersections of two parameter 3d or 6d manifolds. The package aims to simplify orbit calculations.DocumentationUser documentationhttps://github.com/suspiciousFruit/pyintersection/tree/master/doc/usrDeveloper documentationhttps://github.com/suspiciousFruit/pyintersection/tree/master/doc/devHello World>>> import pyintersection as pyi
>>> import numpy as np
>>> apoints = np.array([[0, 0.0, 1, 1, 1], [1, 0.1, 1, 1, 2], [2, 0.2, 1, 1, 3]])
>>> bpoints = np.array([[0, 0.3, 1, 2, 2], [1, 0.4, 1, 1, 2], [2, 0.5, 1, 0, 2]])
>>> cubes, points, tols = pyi.intersect3d(apoints, bpoints, 0.5)
>>> print(cubes)
    [[0.  1.  1.  1.  1.5 1.5 2. ]]
>>> print(points)
    [[0.  0.  1.  0.1 1.  1.  2. ]
    [0.  1.  1.  0.1 1.  1.  2. ]]
>>> print(tols)
    [0.  0.5 0.5]
Package: pyinterval
This library provides a Python implementation of an algebraically
closed interval system on the extended real number set. Interval
objects, as defined in this library, consist of a finite union of closed,
possibly unbound intervals in the mathematical sense.LinksProject home pageOnline documentationEntry in the Python Package IndexHistory1.2.0 (2017-03-05)To improve readability, do not test the examples in the
documentation with Python 2.6.Code pathways that are specific to one Python version are marked
with# pragmadirectives, and the collection of coverage
statistics ignores them as appropriate.Add support for Python 3.6.Implement#11: Take the absolute value of an interval.Provide a helpful message during installation if setuptools is
outdated (#13).1.1.1 (2016-08-10)Fix#5: Intervals can now be pickled and used with the
functions in thecopymodule.1.1.0 (2016-06-10)Add support for Python 3.Addinterval.fpu.isintegeras a portable way to check whether a
value is an instance of an integer type.Spin off Python binding to CRlibm into a separate project:PyCRlibm.1.0.0 (2015-10-23)Migrate Project hosting from Google Code to GitHub.Use Travis CI and AppVeyor as continuous integration services.Add support for Python 2.6 and 2.7.Drop support for Python 2.5.1.0.b21 (2008-08-27)Initial release.
Package: pyinterview
DescriptionThis library contains useful data structures and algorithms that are commonly used in coding interviews. The goal of this project is to provide modules that can actually be used to solve interviewing problems. This project is NOT a code dump of solutions to interviewing problems. The classes and functions were designed to be compatible with LeetCode.InstallationThepyinterviewpackage can be installed directly usingpip.pip install pyinterviewUsageUsers can import common data structures and algorithms from several different modules. For example:To manually construct a binary tree, import theTreeNodeclass from thetreesmodule:frompyinterview.treesimportTreeNoderoot=TreeNode(2)root.left=TreeNode(1)root.right=TreeNode(3)To construct a undirected graph adjacency list, import theundirected_adj_listfunction from thegraphsmodule:frompyinterview.graphsimportundirected_adj_listedges=[('A','B'),('A','C'),('C','D')]adj_list=undirected_adj_list(edges)DocumentationThe documentation is a work in progress, but contributions are welcome!pyinterview documentation
Package: pyintesishome
pyIntesisHomeThis project is a python3 library for interfacing with Intesis air conditioning controllers, including cloud control of IntesisHome (Airconwithme + anywAiR) and local control of IntesisBox devices.
It is fully asynchronous using the aiohttp library, and utilises the private API used by the IntesisHome mobile apps.Home AssistantTo use withHome Assistant, add the following to your configuration.yamlIntesisHome configuration exampleclimate:-platform:intesishomeusername:YOUR_USERNAMEpassword:YOUR_PASSWORDIntesisBox configuration exampleclimate:-platform:intesishomedevice:IntesisBoxhost:192.168.1.50Library usageInstantiate the IntesisHome controller device with username and password for the user.intesishome.com website.Status can be polled using the poll_status command suggested maximum of once every 5 minutes.Commands are sent using a TCP connection to the API which will then remain open until the connection times out.While the persistent TCP connection is open, status updates are pushed to the device over the socket meaning polling is not required (check usingis_connectedproperty)Callbacks to be notified of state updates can be added with the add_callback() method.Library basic exampleimportasynciofrompyintesishomeimportIntesisHomeasyncdefmain(loop):controller=IntesisHome('username','password',loop=loop,device_type='airconwithme')awaitcontroller.connect()print(repr(controller.get_devices()))# Imagine you have a device with id 12015601252591ifawaitcontroller.get_power_state('12015601252591')=='off':awaitcontroller.set_power_on('12015601252591')awaitcontroller.set_mode_heat('12015601252591')awaitcontroller.set_temperature('12015601252591',22)awaitcontroller.set_fan_speed('12015601252591','quiet')if__name__=="__main__":loop=asyncio.get_event_loop()result=loop.run_until_complete(main(loop))Control methodsset_mode_heat(deviceID)set_mode_cool(deviceID)set_mode_fan(deviceID)set_mode_dry(deviceID)set_mode_auto(deviceID)set_temperature(deviceID, temperature)set_fan_speed(deviceID, 'quiet' | 'low' | 'medium' | 'high' | 'auto')set_power_on(deviceID)set_power_off(deviceID)
Package: pyinthesky
This library is to make it straight-forward to connect toSky+boxes - using theUPnPprotocol, you can invoke
actions to interact with the box.Example Usage>>> import pyinthesky
>>> skybox = pyinthesky.locate() # Find the Sky box on the network.
>>> conn = pyinthesky.Connection(skybox)
>>> conn.connect()
>>>
>>> recs = conn.get_recordings()
>>> next(recs)
<Recording "Doctor Who: The Seeds Of Death" (horror channel) at 2015-05-12 10:00>
>>>
>>> conn.count_recordings()
171
>>>
>>> conn.get_disk_space_info()['perc_used']
77.67807431685328
>>>
>>> # The below methods are dynamically created when a connection is made and we
>>> # load up the service descriptions from the box.
>>> conn.Pause(0) # Pause the currently playing show.
>>> conn.Play(0)  # And resume.You can browse the source code and file bug reports at the projectrepository. Full documentation can be foundhere.
Package: pyIntradel
pyIntradelA python connector for waste collection for province of Liège. This connector is using screen scraping to collect
following data (for the current year)"Green bin" (organic waste) and "black bin" residual wasteTotal weightNumber of collectionsdetails of all the collectionschip numberstarting date (01/01 of the current year)Recyparkdetails of all the visits(01/01 of the current year)UsageThetownparameter is the name of the town, you can check it here:townsPython moduleimportaiohttpfrompyintradelimportapiasyncwithaiohttp.ClientSession()assess:awaitapi.get_data(sess,login,password,town)Command linepython3api.pyuserpasswtown
Package: pyinuse
pyinusepyinuseis the official Python client forInUseAPI.It provides the following main API methods:listcreateupdatepartial_updateretrievedestroyFor main end points such as:manufacturersmachine_modelsmachinesproducerssiteslinesmachinespropertiesmultispanscsvspoststriggerssynopticsfilesagentsgroupsfavoritesnotificationsalertssandboxesPlease refer to InUse API documentation (Accessible from the Studio) for more details.API versioningThe actual API version is theinternalAPI (not versioned) and is subject to changes. A versioned public API will be created in a later stage and used in this python client.Example of usage# Library used to type a password in a secured way.importgetpass# Client library for the InUse API.frompyinuseimportInUse# Library for loggingimportlogginglogging.basicConfig(format="%(asctime)s,%(name)s,%(levelname)s,%(message)s",level=logging.INFO)manufacturer_code="mycompany"# replace with your manufacturer code# logininuse=InUse(base_url=f"https://studio.{manufacturer_code}.productinuse.com")inuse.login(input("Username? "),getpass.getpass("Password? "))# get my manufacturer# each endpoint is accessible by its name as an attribute of InUse instancemanufacturer=inuse.manufacturers.list()[0]# create a new machine_modelmachine_model=inuse.machine_models.update_or_create(params={"manufacturer":manufacturer["pk"],"code":"my-machine-model"},data={"manufacturer":manufacturer["pk"],"code":"my-machine-model","name":"my machine model",},)# logout once you're doneinuse.logout()History0.1.2Add session headers0.1.1Handle response error0.1.0First version based on the internal API
Package: pyinvesting
Investing.com® API - Market and historical data downloaderpyinvesting is an API to download online and historical data from investing.com.Quick StartSearch ModuleThe search module is used to search all the information related to a specific ticker.The information that can be retrieved is:Tickers: It will be used by the rest of the modules to get online or historical dataNews: They are all the news related to a specific search.Articles: They are all the articles related to a specific search.The fileexample_search.pyshows a basic example of how to use the module.Online ModuleThe online module handles the connection and subscription with the server and allows a client to subscribe to investing.com and receive all the change events.The fileexample_online.pyshows a basic example of how to use the module.History ModuleThe history module is used to download historical data.
This module allows downloading data from 2 different places (chart and advanced chart sources)The fileexample_history.pyshows a basic example of how to use the module.RequirementsPython>= 3.6+Pandas>= 1.0.0Numpy>= 1.18.1Requests>= 2.21.0Websocket-client>= 0.57.0PyQuery>= 1.2LegalSee the fileLICENSEfor our legal disclaimers of responsibility, fitness or merchantability of this library as well as your rights with regards to use of this library.pyinvestingis licensed underApache Software License.Attributions and Trademarksinvesting.com is trademark of Fusion Media Limited.
Package: pyinvestingsnippets
Python Module for Investing SnippetsPandas extensions and utility classes for stock and investment analysis.InstallationpipinstallpyinvestingsnippetsExamples and DocumentationPlease see detailed examples under theexamplesdirectory and read the documentationhereDevelopFirst install the required venv and toxpython3-mvenv.venvsource.venv/bin/activate
pipinstalltoxOn osx with Big Sur there is anissuewith installing cython! Due to that, you candocker run --rm -v $(PWD):/app --workdir=/app -it --entrypoint=sh python:3.8Run tox test and linttoxInstall the package locallypipinstall.tox/dist/pyinvestingsnippets-<version>.zipRun examplespython3-mvenv.venvtestsource.venvtest/bin/activate
pipinstall-rrequirements.txt
pipinstall-rexamples/requirements.txt
pythonexamples/matplotlib_report.pyIf on OSX set env var toOBJC_DISABLE_INITIALIZE_FORK_SAFETY=YESReleaseOn master change the version inpyinvestingsnippets/__init__.pygitcommit-am"v<VERSION>"gittag-av0.0.3
gitpushorigin--tags
gitpush-u
tox-erelease
Package: pyinvestor
# PyInvestorPyInvestor is a python wrapper for the IEX API.[![](https://travis-ci.com/SamurAi-sarl/PyInvestor.svg?token=1ybw2N4PGqXLfqpxx5kG&branch=master)]()[![](https://img.shields.io/github/license/SamurAi-sarl/PyInvestor.svg)](https://github.com/SamurAi-sarl/PyInvestor/LICENSE)![Python 3.6](https://img.shields.io/badge/Python-3.6-blue.svg)[![Documentation Status](https://readthedocs.org/projects/ansicolortags/badge/?version=latest)](https://samurai-sarl.github.io/PyInvestor/)## DocumentationThe documentation related to the details of the different methods of **PyInvestor** is found here:[https://samurai-sarl.github.io/PyInvestor/](https://samurai-sarl.github.io/PyInvestor/)## FeaturesAs of now, **PyInvestor** is a wrapper for the IEX API. However,we have the ambition to grow it and integrate several financialAPIs into one single Python library, **PyInvestor**. Now, someof the features are:- IEX Stocks app using the stocks endpoint;- Access to the OHLC of more than 7k stocks;- Get relevant news at the stock level;- Access to fundamental data such as dividends, earnings, etc.## Dependencies- Pandas- Requests## Installation``` bashpip install pyinvestor```## Examples### Market__SectorPerformance__``` pythonfrom PyInvestor import marketmarket.SectorPerformance()```![text](./docs/market.gif)### Stock__Earnings__```pythonfrom PyInvestor.stock import StockAMZN = Stock('AMZN')AMZN.Earnings()```![text](./docs/stock.gif)## Todos| API      | Integration                               ||----------|------------------------------------------  || IEX      | [![IEX](http://progressed.io/bar/75)]()   || Quandl   | [![Quandl](http://progressed.io/bar/0)]() || News API | [![Quandl](http://progressed.io/bar/0)]() |## LegalAs **PyInvestor** is a wrapper for the IEX API, we have to say that> Data is provided  for free by [IEX](https://iextrading.com/developer/).> View [IEX's Terms of Use](https://iextrading.com/api-exhibit-a/)## DevelopersMade with :heart: by [SamurAI](https://www.samurai.team/). Follow us on [Linkedin](https://www.linkedin.com/company/samurai-team/) to get the latest news first!We're always happy to receive your feedback!
Package: pyinvisiblewatermark
图片隐水印生成/解码复刻https://invisiblewatermark.net/的python版本实现。算法原理，参见:https://invisiblewatermark.net/how-invisible-watermarks-work安装pip3 install pyinvisiblewatermark使用命令行使用# encode
ivwm encode "hello world!" $YOUR_IMAGE_PATH

# decode
ivwm decode $INPUT_IMAGE_PATH $OUTPUT_IMAGE_PATH代码使用# encodeimportpyinvisiblewatermarkasivwmivwm.generate_watermark(img_fp="data/origin.png",wm_txt="hello world!",save_to="data/encode.png",font="font/ZiTiQuanWeiJunHei-W1-2.ttf")# decodeimportpyinvisiblewatermarkasivwm# 图片加水印示例ivwm.extract_watermark(img_fp="data/encode.png",save_to="data/decode.png")效果示例原图加水印图水印解码图水印文本hello world!｜
Package: pyinvoicer
PyInvoicerCommandline tool to generate HTML-based and PDF invoices.PyInvoicer is a light-weight commandline tool written in Python to generate HTML-based and PDF invoices.
The usage is very straightforward and easy to use:
prepare your invoice content in YAML as the input of PyInvoicer.
That's it!! No complicated setup like database is needed.Quick highlights:run locallycontent of input in YAMLoutput html and pdfuse as less third party dependency as possible.Getting StartedPrerequisitesPythonThe release has been tested with Python 3.9.1.InstallationThe tool has been released to PyPI. You can install it directly from PyPI via pip.pip install pyinvoicerIf you want to install from the source, you may needpoetry, the package dependency management tool.
This project is managed bypoetry. Fetch the source andpoetry install. SeeContributingfor
more details.Usageinvoicer <your content yaml>You will getinvoice.pdfin the same folder. Theexamplesfolder of the source
shows an example of the content yaml.Output in Different FormatFor example, if you want to output your invoice in html, invoke:invoicer <your content yaml> --format htmlOutput with Customized Name and Pathinvoicer <your content yaml> /path/you/want/to/use/your-invoice.pdfMore Usage OptionsPlease refer toinvoicer --help.ContributingSeeContributingAuthorsTaihsiang Ho (tai271828)tai271828@gmail.comCreated fromLee-W/cookiecutter-python-templateversion 0.7.2
Package: pyinvoke
pyinvokepyinvokeis a simple module that is used to invoked Python applications
using a full function specifier, similar to distlib entrypoints.The key advantage is that the Python application you want to run will be
loaded as its proper module instead of as the__main__module.pyinvokewill be the__main__module for this operation.One of the motivating cases wherepyinvokecomes in handy is the following:$ python -m module.main
Traceback (most recent call last):
  File "module/main.py", line 7, in <module>
    from .stuff import ham
SystemError: Parent module '' not loaded, cannot perform relative importTo run the application withpyinvoke:$ python3 -m pyinvoke module.main:mainApplications that depend on restarting can read the original commandline
fromsys.__argv__:argv=getattr(sys,'__argv__',sys.argv)Copyright © 2018 Niklas Rosenstein
Package: pyinvokedepends
Extends pythonic task management & command execution with file dependencies.Documentationpyinvokedependsis an extension ofpyinvoketo allow more "makefile" like task definitions.It introduces an additional decorator@dependswhich can be used in addtion topyinvoke's decorator@task. Adding this decorator to a task will make sure that the task is only executed when any oftofiles is newer than one of thecreatedfiles.For a simple example, consider the followingtasks.py. In contrast to traditionalmake, this will always rungcc hello.cfrom invoke import task
@task
def compile(c):
  c.run("gcc hello.c", echo=True)Withpyinvokedependswe can add dependencies:from invoke import task
from pyinvokedepends import depends
@depends(on=["./hello.c"], creates=["./a.out"])
@task
def test(c):
def compile(c):
  c.run("gcc hello.c", echo=True)The task will only execute if the file./hello.cis newer than the file./a.out. Otherwise, the execution will be skipped.The values of the parametersonandcreatesare lists ofglobs. At lease one the files matching (one of) theonglobs must exist. The task is executedif no file exists which matches (any of) thecreatesglobs, orone of the files matching theonglobs is newer than at least one file of thecreatesglobs.It does not automatically addpreorpoststeps to the task based on the dependencies.