Saravanan666/pypi-org huggingface dataset:
Package: python-photon
Photon is a data driven tool designed to run workflows against an AZ using
Ansible.A workflow is comprised of one more more playbooks, each configurable
with its own flags and options to be passed down to underlying call toansible-playbook. It supports the ability to resume a workflow from any
point in the event of a playbook failure.Quick StartInstall photon using pip:$pipinstallpython-photonCreate a file calledphoton.ymland define at least one AZ and workflow.azs:proxmox:inventory:path/to/inventoryworkflows:test_password_playbooks:playbooks:-path:playbooks/tests/update_passwords.ymlImportantazs.<name>.inventoryis the only required value when defining an AZ.workflows.<name>.playbooksis the only required value when defining a
workflow.To execute a workflow against an AZ, simply run:$photontest_password_playbooksproxmoxDocumentationhttps://python-photon.readthedocs.io/LicenseMITThe logo is licensed under theCreative Commons NoDerivatives 4.0 License.
If you have some other use in mind, contact us.
Package: python-picard
This repository hosts Python/Octave/Matlab code of the Preconditioned ICA
for Real Data (Picard) and Picard-O algorithms.See thedocumentation.AlgorithmPicard is an algorithm for maximum likelihood independent component analysis.
It shows state of the art speed of convergence, and solves the same problems as the widely used FastICA, Infomax and extended-Infomax, faster.The parameterorthochoses whether to work under orthogonal constraint (i.e. enforce the decorrelation of the output) or not.
It also comes with an extended version just like extended-infomax, which makes separation of both sub and super-Gaussian signals possible.
It is chosen with the parameterextended.ortho=False, extended=False: same solution as Infomaxortho=False, extended=True: same solution as extended-Infomaxortho=True, extended=True: same solution as FastICAortho=True, extended=False: finds the same solutions as Infomax under orthogonal constraint.InstallationWe recommend theAnaconda Python distribution.condaPicard can be installed withconda-forge.
You need to addconda-forgeto your conda channels, and then do:$ conda install python-picardpipOtherwise, to installpicard, you first need to install its dependencies:$ pip install numpy matplotlib numexpr scipyThen install Picard with pip:$ pip install python-picardor to get the latest version of the code:$ pip install git+https://github.com/pierreablin/picard.git#egg=picardIf you do not have admin privileges on the computer, use the--userflag
withpip. To upgrade, use the--upgradeflag provided bypip.checkTo check if everything worked fine, you can do:$ python -c 'import picard'and it should not give any error message.matlab/octaveThe Matlab/Octave version of Picard and Picard-O isavailable here.QuickstartTo get started, you can build a synthetic mixed signals matrix:>>>importnumpyasnp>>>N,T=3,1000>>>S=np.random.laplace(size=(N,T))>>>A=np.random.randn(N,N)>>>X=np.dot(A,S)And then use Picard to separate the signals:>>>frompicardimportpicard>>>K,W,Y=picard(X)Picard outputs the whitening matrix, K, the estimated unmixing matrix, W, and
the estimated sources Y. It means that Y = WKXNEW: scikit-learn compatible APIIntroducingpicard.Picard, which mimicssklearn.decomposition.FastICAbehavior:>>>fromsklearn.datasetsimportload_digits>>>frompicardimportPicard>>>X,_=load_digits(return_X_y=True)>>>transformer=Picard(n_components=7)>>>X_transformed=transformer.fit_transform(X)>>>X_transformed.shapeDependenciesThese are the dependencies to use Picard:numpy (>=1.8)matplotlib (>=1.3)numexpr (>= 2.0)scipy (>=0.19)These are the dependencies to run the EEG example:mne (>=0.14)CiteIf you use this code in your project, please cite:Pierre Ablin, Jean-Francois Cardoso, Alexandre Gramfort
Faster independent component analysis by preconditioning with Hessian approximations
IEEE Transactions on Signal Processing, 2018
https://arxiv.org/abs/1706.08171

Pierre Ablin, Jean-François Cardoso, Alexandre Gramfort
Faster ICA under orthogonal constraint
ICASSP, 2018
https://arxiv.org/abs/1711.10873
Package: python-picnic
Python bindings for Picnicpython-picnic provides Python bindings based onCythonfor thePicnicpost-quantum signature scheme.DependenciesCython >= 0.28(only for building)pkgconfig(only for building)PicnicQuick installation guildepython-picnic can be installed viapip:pipinstallpython-picnicor by running:python3setup.pyinstallPackages for Ubuntu are also available via thepicnic
PPA:sudoadd-apt-repositoryppa:s-ramacher/picnic
sudoaptupdate
sudoaptinstallpython3-picnicUsageimportpicnic# create keypairsk,pk=picnic.keygen(picinc.Picnic_L1_full)# sign a messagesig=picnic.sign(sk,b"a message")# verify a signaturepicnic.verify(pk,b"a message",sig)LicenseThe code is licensed under the MIT license.
Package: python-picnic-api
Unofficial Python wrapper for thePicnicAPI. While not all API methods have been implemented yet, you’ll find most of what you need to build a working application are available.This library is not affiliated with Picnic and retrieves data from the endpoints of the mobile application. Use at your own risk.Getting startedThe easiest way to install is directly from pip:$ pip install python-picnic-apiUsageI’ll go over a few common operations here you’ll most likely use in applications.
To login:frompython_picnic_apiimportPicnicAPIpicnic=PicnicAPI(username='username',password='password',country_code="NL")The country_code parameter defaults to NL, but you have to change it if you live in a different country than the Netherlands (Germany: DE, Belgium: BE).
You can also store your credentials by setting the store value to true, this will store your credentials and country_code in /config/app.yaml.Searching for a product>>>picnic.search('coffee')[{'type':'CATEGORY','id':'coffee','links':[{'type':'SEARCH','href':'https://storefront-prod.nl.picnicinternational.com/api/15/search?search_term=coffee'}],'name':'coffee','items':[{'type':'SINGLE_ARTICLE','id':'10511523','decorators':[{'type':'UNIT_QUANTITY','unit_quantity_text':'500 gram'}],'name':'Lavazza espresso koffiebonen','display_price':599,'price':599,'image_id':'d3fb2888fc41514bc06dfd6b52f8622cc222d017d2651501f227a537915fcc4f','max_count':50,'unit_quantity':'500 gram','unit_quantity_sub':'€11.98/kg','tags':[]},...Check cart>>>picnic.get_cart(){'type':'ORDER','id':'shopping_cart','items':[],'delivery_slots':[...Manipulating your cartAll of these methods will return the shopping cart.# adding 2 'Lavazza espresso koffiebonen' to cartpicnic.add_product('10511523',count=2)# removing 1 'Lavazza espresso koffiebonen' from cartpicnic.remove_product('10511523')# clearing the cartpicnic.clear_cart()See upcoming deliveries>>>picnic.get_current_deliveries()[]See available delivery slots>>>picnic.get_delivery_slots()
Package: python-pid
# python-pid## 简单描述一个关于python pid管理的模块,借助于fcntl来给锁文件加入状态.[更多python-pid的介绍](http://xiaorui.cc)本来是打算把进程名字和daemon都做进去的,但是考虑Pid本是个判断进程在不在的事事，没必要让别的逻辑参合进来.## 安装方法方法1.```pip install python-pid```方法2```git clone git@github.com:rfyiamcool/python-pid.gitcd python-pidpython setup.py install```## 使用方法可以在你的主函数加一个装饰器，可以传递pidfile的文件路径.```#coding:utf-8@PidFileDeco('my')def main():import timetime.sleep(1000)```或者是直接调用，acquire是锁定，release()是释放```import timefrom python_pid import PidFilef = PidFile("mydaemon")f.acquire()time.sleep(100)f.release()```使用with关键词,调用__enter__ , __exit__```with PidFile("mydaemon"):time.sleep(100)print 'blog:  xiaorui.cc'```END... ...
Package: python-pidfile
Python context manager for managing pid files. Example usage:importpidfileimporttimeprint('Starting process')try:withpidfile.PIDFile("/var/run/example.pid"):print('Process started')time.sleep(30)exceptpidfile.AlreadyRunningError:print('Already running.')print('Exiting')The context manager will take care of verifying the existence of a pid file,
check its pid to see if it’s alive, check the command line (which should be<something>/<python name>), and
if all the conditions are met, rise apidfile.AlreadyRunningErrorexception.PIDFile()defaults topidfilefor the file name, but it’s possible to specify another, e.g.PIDFile(‘foobar.pid’).Under the hoodThe algorithm of the library is very simple, at startup, a file is created,
and after checking that another instance of the program is not running, the
current process ID is written to it.The check works as follows:If the file does not exist, then the check is passed.An identifier is written in the file, it is read and checked that a
process running with such an identifier exists, and has the same command line.
Package: python-pie
python-piePython-pie(python insert env) parses static files such as YAML and insert in them data from environment variablesGetting StartedSyntax exampleUsing as module from command lineDocker exampleRun testsGetting Startedpipinstallpython-pieYou can use python-pie to insert env variables to static configurations,
like that:frompieimportprocess_filefilepath='/docker/configuration.yaml'process_file(filepath)The syntax of files supported by python-pie is similar
to that of pythonfstrings:f"54 {from_env or 'default_value'} some text"Depends if your environment has a from_env variable or not, python-pie will load it,
or in case of absence take the default valueSyntax examplehosts:-f"{host}"loglevel:4f"{'log_file_path'}":f"/file/path/{filename or 'tmp.log'}"log_rotate_count:1afterprocess_file(filepath)hosts:-localohstloglevel:4log_file_path:/file/path/tmp.loglog_rotate_count:1Using as module from command lineYou can use python-pie in command line.python-mpie-f/node54/config.ymlFlags:(you should provide at least one of those)-f --filepath to config file.-s --stringstring to precess.optional:-tf --to-filepath to output config file.--keep-fileif pie should keep original file without change.Docker exampledockercreate-t--namepie-ipython:3.9||true;dockerstartpie;dockerexecpiepython-mpipinstallpython-pie;dockerexecpiepython-mpie-f/node54/config.yml;during build:FROMpython:3.9-alpineASbuilder
RUNpipinstallpython-pie
RUNpython-mpie-f/tmp/template.yml-tf/app/config.yml-e.envRun testsTo run tests installpytestlibrary and run the command:pytesttests/
Package: python-ping
A pure python ping implementation using raw sockets.Note that ICMP messages can only be sent from processes running as root
(in Windows, you must run this script as ‘Administrator’).Original Version fromMatthew Dixon Cowlescopyleft 1989-2011 by the python-ping team, seeAUTHORSfor more details.license: GNU GPL v2, seeLICENSEfor more details.usage~/python-ping$ sudo ./ping.py google.com

PYTHON-PING google.com (209.85.148.99): 55 data bytes
64 bytes from google.com (209.85.148.99): icmp_seq=0 ttl=54 time=56.2 ms
64 bytes from google.com (209.85.148.99): icmp_seq=1 ttl=54 time=55.7 ms
64 bytes from google.com (209.85.148.99): icmp_seq=2 ttl=54 time=55.5 ms

----google.com PYTHON PING Statistics----
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip (ms)  min/avg/max = 55.468/55.795/56.232TODOsrefactor ping.pycreate a CLI interfaceadd a “suprocess ping”, with output parsercontributeFork this repoonGitHubandsend pull requests. Thank you.Revision historyOct. 12, 2011Merge sources and create a seperate github repository:https://github.com/jedie/python-pingAdd a simple CLI interface.September 12, 2011Bugfixes + cleanup by Jens Diemer
Tested with Ubuntu + Windows 7September 6, 2011Cleanup by Martin Falatic.Restored lost comments and docs. Improved functionality: constant time between
pings, internal times consistently use milliseconds. Clarified annotations
(e.g., in the checksum routine). Using unsigned data in IP & ICMP header
pack/unpack unless otherwise necessary. Signal handling. Ping-style output
formatting and stats.August 3, 2011Ported to py3k by Zach Ware. Mostly done by 2to3; also minor changes to
deal with bytes vs. string changes (no more ord() in checksum() because
>source_string< is actually bytes, added .encode() to data in
send_one_ping()).  That’s about it.March 11, 2010changes by Samuel Stauffer:
replaced time.clock with default_timer which is set to
time.clock on windows and time.time on other systems.November 8, 2009Fixes byGeorge Notaras,
reported byChris Hallman:Improved compatibility with GNU/Linux systems.Changes in this release:Re-use time.time() instead of time.clock(). The 2007 implementation
worked only under Microsoft Windows. Failed on GNU/Linux.
time.clock() behaves differently underthe two OSes.May 30, 2007littlerewrite by Jens Diemer:change socket asterisk import to a normal importreplace time.time() with time.clock()delete “return None” (or change to “return” only)in checksum() rename “str” to “source_string”December 4, 2000Changed the struct.pack() calls to pack the checksum and ID as
unsigned. My thanks to Jerome Poincheval for the fix.November 22, 1997Initial hack. Doesn’t do much, but rather than try to guess
what features I (or others) will want in the future, I’ve only
put in what I need now.December 16, 1997For some reason, the checksum bytes are in the wrong order when
this is run under Solaris 2.X for SPARC but it works right under
Linux x86. Since I don’t know just what’s wrong, I’ll swap the
bytes always and then do an htons().
Package: python-pinterest
A simple Python wrapper for Pinterest REST API (Beta) (5.x) ✨ 🍰 ✨IntroductionThis library provides a service to easily use Pinterest REST API for v5.x.And supportAsyncAndsyncmode.More docs has published onhttps://sns-sdks.lkhardy.cn/python-pinterest/UsingThe API is exposed via thepinterest.Apiclass andpinterest.AsyncApiclass.INSTANTIATEYou can initial an instance withaccess token:# Sync
>>> from pinterest import Api
>>> p = Api(access_token="Your access token")
# Async
>>> from pinterest import AsyncApi
>>> ap = AsyncApi(access_token="Your access token")UsageGet pin info:# Sync
>>> p.pins.get(pin_id="1022106077902810180")
# Pin(id='1022106077902810180', created_at='2022-02-14T02:54:38')
# Async
>>> await ap.pins.get(pin_id="1022106077902810180")
# Pin(id='1022106077902810180', created_at='2022-02-14T02:54:38')More docs has published onhttps://sns-sdks.lkhardy.cn/python-pinterest/TODOTests
Package: python-pip
Python PIP WrapperA thin wrapper around PIP which can be used at runtime.Installation1. Install package from PyPipip install python-pip2. Create a virtual environmentpython -m venv venn3. Activate the virtual environment./venv/Scripts/activate4. Running tests after installationpip install -r requirements-tests.txt
pytestExample output=================== test session starts ===================
platform win32 -- Python 3.9.2, pytest-7.1.1, pluggy-1.0.0
rootdir: D:\Personal Projects\python-pip
collected 6 items
src\tests\test_all.py ...... [100%] 
=================== 6 passed in 9.64s ===================5. Install all required librariesThere are no requirements at the moment6. Usagefrom python_pip import pip# Initialize object
pip = pip.PIP()
print(pip.version)# Install a package
pip.install(package_name='requests')# Uninstall a package
pip.uninstall(package_name='requests')ContributingYou are welcome to contribute to the repo as you likeAuthors and acknowledgmentJordan RaychevEmail: jpraychev at gmail dot comWebsite:https://jraychev.comLicenseMIT. Please refer to LICENSE file
Package: python-pipedrive
python-pipedrive================Python library for interacting with the pipedrive.com APIThis is being developed for my specific use so there's no guarantee I'll cover all of the aspects of the Pipedrive API. Feel free to add features though, I welcome pull requests.All features should be supported though as this is just a lightweight wrapper around the API.Usage:Create a Pipedrive object, passing either the api key or your username and password as the parameters```pythonfrom pipedrive import Pipedrivepipedrive = Pipedrive(USERNAME, PASSSWORD)```or```pythonfrom pipedrive import Pipedrivepipedrive = Pipedrive(API_KEY)```The rest of the functions relate to the URL as specified in the [API Docs](https://developers.pipedrive.com/v1).Do yourself a favor and try a few simple requests and look the raw responses to know what data Pipedrive's API gives you. This will aid in knowing how to deal with your responses in python code. For example, to find an organzation:curl 'https://api.pipedrive.com/v1/organizations/find?api_token=abcd1234abcd1234abcd1234abcd1234abcd1234&term=microsoft'which spits out something like:{"success":true,"data":[{"id":215,"name":"Microsoft Main Organization","visible_to":"3"},{"id":360,"name":"Microsoft Subdivision Company","visible_to":"3"}],"additional_data":{"pagination":{"start":0,"limit":100,"more_items_in_collection":false}}}The two things to note are the HTTP Method, and the path:Examples:1.  List the organizations```pythonpipedrive.organizations(method='GET')```2.  Add a New Deal```pythonpipedrive.deals({'title': 'Big Sucker','value': 1000000,'org_id': 2045,'status': 'open'}, method='POST')```3.  Delete an Activity```pythonpipedrive.activities({'id': 6789}, method='DELETE')```4.  Find a person, and use the search results. The variable ```term``` is the search term that has been passed in.```pythonimport json...response = pipedrive.persons_find({'term':term}, method='GET')results = response['data']suggestions = []if results != None:for result in results:suggestions.append({'value': result['name'], 'data': result})json_response = {'query': term, 'suggestions': suggestions}data = json.dumps(json_response)```And return ```data``` to some kind of javascript search result autocomplete thing (this example is formatted for devbridge's simple and easy-to-use [jquery.autocomplete.js](https://github.com/devbridge/jQuery-Autocomplete))
Package: python-pit
pit-- Python as a stream filter=======================================What's new in version 0.3~~~~~~~~~~~~~* Autoimport support with [autoimp](github.com/autoimp). Dependency frozen at 1.0.4 for now.* Runs on Python 3* Version flagWhat's new in version 0.2~~~~~~~~~~~~~* NOTE: expression evaluation is now default; -e now stands for _execute_* -b flag can be used to execute code before loop* optional positonal statement after loopWhat's new in version 0.1.1~~~~~~~~~~~~~* Lines of standard input can be split up by a field separator.* -e flag evaluates command as an expression.Pit is a tool for making it easier to run Python on the command line.It is designed to be a swiss army knife for people who aren't as familiar with(or who don't want to deal with) the entire array of Unix utilities.Example uses:-------------Quick calculator~~~~~~~~~~~~~~~::pit "math.log(.97**12)"String processing~~~~~~~~~~~~~~~Lines of standard input are piped into the underscore variable, _::cat document.txt | pit "_[::-1]" #Reverses all linesFilter lines~~~~~~~~~~~~~~::cat document.txt | pit -f 'len(_) > 10' # Filter for long linescat document.txt | pit -f 'random.random() > 0.5' # Sample lines from document with probability 0.5Count unique occurences of lines in a document:~~~~~~~~~~~~~~The -e flag causes pit to execute the code, rather than evaluate it.The -b flag (--begin) allows initialization code to be set up.An optional positional argument after the main code section is run after the input ends.::cat redundant.txt | pit -b 'a=set()' 'a.add(_)' 'print(len(a))'Convert entire document to base64:~~~~~~~~~~~~~~The -p flag reads until EOF into the underscore variable.::>cat document.txt | pit -p 'base64.encodestring(_)'
Package: python-piwik
Python implementation of the Piwik HTTP API.Note: This project is calledpython-piwikon PyPI sincepypiwikis already taken by an abandoned project.# UsageBasic usage:from pypiwik.tracker import PiwikTracker
tracker = PiwikTracker(’http://example.com’, 1)now you can calltracker.track_page_view()to make a server-to-server tracking request, or calltracker.tracking_code()to generate the correct Javascript snippet.## Tracking variablesTracking variables are set as class attributes on thetrackerobject. Have a look at thepypiwik.tracker.PARAMETERSdictionary to see which attribute maps to which tracking parameter, e.g.:tracker = PiwikTracker(’http://example.com’, 1)
tracker.action_name = ‘Help / Support’
tracker.track_page_view()You can also pass the tracking variables to thetrack_page_viewortracking_codecall as kwargs. The code above is equivalent to the following:tracker = PiwikTracker(’http://example.com’, 1)
tracker.track_page_view(action_name=’Help / Support’)## Custom variablesCustom variables can be set in thepage_custom_varsandvisit_custom_varsdictionary to track custom variables in thepageandvisitscope:_Note:_ Piwik allows at most 5 custom variables per scope. When making server-to-server requests, the code does not check for the numbers of variables in the dictionary.## Server APIWhen making server-to-server calls,pypiwikwill use HTTP headers for the following variables to reduce the request size:user_agentrefererlangIf you want to pass the values as regular variables, setspoof_requesttoFalseon the tracker instance.## Cloning another requestIf you want to make server-to-server requests based on a HTTP request of an actual user, pass the request object to__init__:tracker = PiwikTracker(’http://example.com’, 1, request)_Note:_ atm, only Django-like request objects supported (an object which has aMETAdictionary).# TODOImplement [Bulk-Tracking](http://developer.piwik.org/api-reference/tracking-api#bulk-tracking)Implement the [Ecommerce variables](http://developer.piwik.org/api-reference/tracking-api#optional-ecommercehttppiwikorgdocsecommerce-analytics-info)
Package: pythonpixels
PythonpixelsAn API wrapper for the python discord pixels projectRequirementspillow, rich and request are required for this library. These are automatically installed with this library.UsageGetting startedFirst make an instance of the Client class and pass your token to the contructor.
Everything in this library is done from the Client class.importpythonpixelsclient=pythonpixels.Client("TOKEN")# Your token must be inserted where it says TOKENMethodsclient.get_pixel(x,y)Returns the hexadecimal color code of the given pixelParams:
x: int - The x position of the pixel
y: int - The y position of the pixelReturns:
int - The color of the requested pixelclient.get_canvas(scale)Fetch the entire canvas and returns it as a pillow Image instance. Optionally resize it by a scale factorParams:
scale: int - A factor to resize the image byReturns:
pillow.Image - The current canvasclient.get_size()Returns the size of the canvasParams:
NoneReturns:
tuple - The width and height of the canvasclient.set_pixel(x,y,color)Sets a pixel on the canvasParams:
x: int - The x position of the pixel
y: int - The y position of the pixel
color: int - the RGB colorcode of the pixelReturns:
Noneclient.set_picture(x,y,img)Starts a job to add a picture with offset x an y. Img can either be a file directory, an direct URL (Only HTTP supported) or a pillow.ImageParams:
x: int - The x offset
y: int- The y offset
img: typing.Union[str, pillow.Image.Image] - The image to upload. Can either be a path, a HTTP direct image link or a pillow image instanceReturns:
Noneclient.get_limits()Return the last known rate limits of the API. These are refreshed every request.Params:
NoneReturns:
dict - A dictionary with the rate limits formatted as follow
"set_pixel": tuple(remaining, timeout)
"get_pixel": tuple(remaining, timeout)
"get_canvas": tuple(remaining, timeout)