Saravanan666/pypi-org huggingface dataset:
Package: pillow-scripts
This directory contains a number of more or less trivial utilities
and demo programs.Comments and contributions are welcome.</F>pildriver.py (by Eric S. Raymond)A class implementing an image-processing calculator for scripts.
Parses lists of commands (or, called interactively, command-line
arguments) into image loads, transformations, and saves.viewer.pyA simple image viewer.  Can display all file formats handled by
PIL.  Transparent images are properly handled.thresholder.pyA simple utility that demonstrates how a transparent 1-bit overlay
can be used to show the current thresholding of an 8-bit image.enhancer.pyIllustrates the ImageEnhance module.  Drag the sliders to modify the
images.  This might be very slow on some platforms, depending on the
Tk version.painter.pyIllustrates how a painting program could be based on PIL and Tk.
Press the left mouse button and drag over the image to remove the
colour.  Some clever tricks have been used to get decent performance
when updating the screen; see the sources for details.player.pyA simple image sequence player.  You can use either a sequence format
like FLI/FLC, GIF, or ARG, or give a number of images which are
interpreted as frames in a sequence.  All frames must have the same
size.gifmaker.pyConvert a sequence file to a GIF animation.Note that the GIF encoder provided with this release of PIL writes
uncompressed GIF files only, so the resulting animations are rather
large compared with these created by other tools.explode.pySplit a sequence file into individual frames.
Package: pillow-snippet
pillow_snippetsome useful snippet and utils using pillow to handle imageRequirementsPillowInstallpip install pillow-snippetDocumentationTutorialorigin imageorigin image2convert an Image to a circled Imagefrom pillow_snippet import convert
origin_image = Image.open('colorful_example.png')
image = origin_image.resize((200, 200))
circle_image = convert.circle_image(image)
circle_image.save("test_result/circle_image.png")delete the white pixel from an imageit seems there is still white but if fact it is transparent. You can open the image in new tab to see more detailsmask = Mask(image)
exclude_white_image = mask.get_exclude_white_image(tolerance=8)
exclude_white_image.save("test_result/exclude_white_image.png")convert the image to only contains red color according it's brightnessmask = Mask(image)
change_to_red_image = mask.convert_to_single_color("#ff0000ff")
change_to_red_image.save("test_result/change_to_red_image.png")convert the imge to only contains green color according it's opacity instead of it's brightnessmask2 = Mask(origin_image2)
change_to_green_image = mask2.convert_to_single_color("#00ff00ff", mode="L")
change_to_green_image.save("test_result/change_to_green_image_L.png")
change_to_green_image = mask2.convert_to_single_color("#00ff00ff", mode="opacity")
change_to_green_image.save("test_result/change_to_green_image_opacity.png")compare difference mode* mode = "L"* mode = "opacity"Contributionclone the codemake your commitmake testsudo pip install .
python3 test.pycreate a pull request
Package: pillow-stackblur
pillow-stackblurThe Stack Blur filter for Pillow.The Stack Blur Algorithm was invented by Mario Klingemann,mario@quasimondo.comand described here:http://incubator.quasimondo.com/processing/fast_blur_deluxe.phpThis original C++ RGBA (32 bit color) multi-threaded version
by Victor Laskin (victor.laskin@gmail.com) could be found here:http://vitiy.info/stackblur-algorithm-multi-threaded-blur-for-cppThe python implementation is porting from C++ multi-threaded version.
And wrap the implementation as a filter for pillow.Example:Blur the image with radius 10.fromPILimportImagefromstackblurimportStackBlurim=Image.open('img.png')im=im.filter(StackBlur(10))im.save('blurred_img.png')Installation:pip install pillow-stackblurPlease remember to installpillowbefore using this library.
Package: pillowtalk
|travis build| |Coverage Status||pillow\_talk\_icon| # **Pillowtalk**Creates intuitive python wrappers for APIs. **Pillowtalk** talks to APIsand handles all of the model relationships behind the scenes, providinga clean and easy-to-use wrapper for your models.Why another package?====================While there are plenty of excellent libraries for creating APIs, butcreating intuitive wrappers for these APIs isn't entirelystraightforward. **Pillowtalk** cleanly captures the underlying databaserelationships APIs may be providing making it easy to write pythonmodels. It provides a wrapper for making intuitive live API calls usingyour python models and the underlying relationships you specified.In future versions, **pillowtalk** will be able to create and updateyour code based on a list of JSON files and *guess* at the underlyingrelationships between models. From there, **pillowtalk** willautomatically generate or update python models. This means changes tosome API can trigger an automatic update to your python wrapper to thatAPI!Features and Examples=====================Minimalistic models with relationships--------------------------------------e.g. Person with ONE Address; Address has MANY people.. code:: pythonclass MyBase(PillowtalkBase):@classmethoddef find(cls, id):...def where(cls, data):...@add_schemaclass Person(MyBase):FIELDS = ["id", "name"]RELATIONSHIPS = [One("address", "find Person.address_id <> Address.id")]@add_schemaclass Address(MyBase):FIELDS = ["id", "str"]RELATIONSHIPS = [Many("people", "where Address.id <> Person.address_id")]Intuitive calls uses live API connection to deserialize data to yourmodels.. code:: python# address.people doesn't exist yetaddress = Address.find(3)# calling .people causes a api call using "where" and deserialization of datapeople = address.people # returns a list of People objects found through "where"# returned is a list of Person objects!assert type(people[0]) is PersonHandling impartial data.. code:: pythonperson = {"id": 5,"name": "Joe","address": {"id": 4}}p = Person.load(person_data)# a.address will magically return Address object even though data is enveloped in a json.# we do not specifically have to handle deserialization of impartial data since the# relationship between Person.address_id <> Address.id was already defined.a = p.addressassert type(a) is Addressassert person.address_id == 4 # this wasn't defined explicitly but it is inferred from "address": {"id": 4}More examples and magic to come!--------------------------------::Other things include:* Magic chaining in relationships* Session managing suggestions* automatically creating model skeletons from list of JSON* model relationships through associations* examples of connecting to MySQL or SQLlite* examples of using CLI through hug.. |travis build| image:: https://img.shields.io/travis/jvrana/**Pillowtalk**.svg:target: https://travis-ci.org/jvrana/**Pillowtalk**.. |Coverage Status| image:: https://coveralls.io/repos/github/jvrana/**Pillowtalk**/badge.svg?branch=master:target: https://coveralls.io/github/jvrana/**Pillowtalk**?branch=master.. |pillow\_talk\_icon| image:: images/pillowtalk_icon_medium.png?raw=true
Package: pillow-tools
pillow-toolsA collection of useful tools for python pillow and ffmpy.Installpip install pillow-toolsCreate a thumbnailYou can create a smaller version of an image (including .gif) while maintaining the aspect ratio.from pillow_tools import OptimizeToSize

imagePath = '/dir/image.png'
thumbPath = OptimizeToSize(imagePath, maxWidth=1280, maxHeight=720)
# The thumbPath image is now in the same directory as imagePath.
# This will scale the image to a new resolution not exceeding the maxWidth/maxHeight but preserving the aspect ratio

print('thumbPath=', thumbPath)Output>>> thumbPath= '/dir/image_1280x720.png'
Package: pilmoji
PilmojiPilmoji is an emoji renderer forPillow,
Python's imaging library.Pilmoji comes equipped with support for both unicode emojis and Discord emojis.FeaturesDiscord emoji supportMulti-line rendering supportEmoji position and/or size adjustingMany built-in emoji sourcesOptional cachingInstallation and RequirementsYou must have Python 3.8 or higher in order to install Pilmoji.Installation can be done withpip:$pipinstall-UpilmojiOptionally, you can add the[requests]option to install requests
alongside Pilmoji:$pipinstall-Upilmoji[requests]The option is not required, instead ifrequestsis not installed,
Pilmoji will fallback to use the builtinurllib.You may also install from Github.UsagefrompilmojiimportPilmojifromPILimportImage,ImageFontmy_string='''Hello, world! 👋 Here are some emojis: 🎨 🌊 😎I also support Discord emoji: <:rooThink:596576798351949847>'''withImage.new('RGB',(550,80),(255,255,255))asimage:font=ImageFont.truetype('arial.ttf',24)withPilmoji(image)aspilmoji:pilmoji.text((10,10),my_string.strip(),(0,0,0),font)image.show()ResultSwitching emoji sourcesAs seen from the example, Pilmoji defaults to theTwemojiemoji source.If you prefer emojis from a different source, for example Microsoft, simply
set thesourcekwarg in the constructor to a source found in thepilmoji.sourcemodule:frompilmoji.sourceimportMicrosoftEmojiSourcewithPilmoji(image,source=MicrosoftEmojiSource)aspilmoji:...It is also possible to create your own emoji sources via subclass.Fine adjustmentsIf an emoji looks too small or too big, or out of place, you can make fine adjustments
with theemoji_scale_factorandemoji_position_offsetkwargs:pilmoji.text((10,10),my_string.strip(),(0,0,0),font,emoji_scale_factor=1.15,emoji_position_offset=(0,-2))ContributingContributions are welcome. Make sure to followPEP-8styling guidelines.
Package: pilmoji-fixed
PilmojiPilmoji is an emoji renderer for Pillow, Python's imaging library.It supports not only unicode emojis, but also Discord emojis.Pilmoji usestwemojifor unicode emojis.For Discord emojis, Pilmoji will send a request to Discord's CDN.Everything is cached, to ensure fast results.You can also use Microsoft's emojis instead of Twemoji, if that's what you prefer.FeaturesAsynchronous supportMulti-line supportDiscord emoji supportEmoji position and size adjustingTwemojiandMicrosoft emoji supportCachingAsynchronous SupportPilmoji has both synchronous (requests)
and asynchrounous (aiohttp) support.InstallationPilmoji should be installed usingpip:pip install pilmojiInstalling from Github will most likely fail.ExamplesBasic usagefrompilmojiimportPilmojifromPILimportImage,ImageFontmy_string='''Hello, world! 👋 Here are some emojis: 🎨 🌊 😎I also support Discord emoji: <:rooThink:596576798351949847>'''withImage.new('RGB',(550,80),(255,255,255))asimage:font=ImageFont.truetype('arial.ttf',24)withPilmoji(image)aspilmoji:pilmoji.text((10,10),my_string.strip(),(0,0,0),font)image.show()ResultAsync usageimportasynciofrompilmojiimportAsyncPilmojifromPILimportImage,ImageFontmy_string='''Hello, world! 👋 Here are some emojis: 🎨 🌊 😎I also support Discord emoji: <:rooThink:596576798351949847>'''asyncdefmain():withImage.new('RGB',(550,80),(255,255,255))asimage:font=ImageFont.truetype('arial.ttf',24)asyncwithAsyncPilmoji(image)aspilmoji:awaitpilmoji.text((10,10),my_string.strip(),(0,0,0),font)image.show()asyncio.run(main())Results are the exact same.Size/position adjustmentsIs an emoji too low, or too small for a given font?You can also render emojis with offsets:pilmoji.text((10,10),my_string.strip(),(0,0,0),font,emoji_size_factor=1.15,emoji_position_offset=(0,-2))Using Microsoft emojisPilmoji also supports Microsoft emojis.Simply set theuse_microsoft_emojikwarg to True, as such:withPilmoji(image,use_microsoft_emoji=True)aspilmoji:...Notes[async] If you're running PIL in an executor, use thesyncversion of Pilmoji instead.[async] It is not recommended to run PIL in asynchronous conditions (PIL is blocking.)If you really have to, run the manipulation in an executor.
Package: pilosa
Python Client for PilosaPython client for Pilosa high performance distributed row index.What's New?See:CHANGELOGRequirementsCompatible with Pilosa 1.2 and Pilosa 1.3Requires Python 2.7 and higher or Python 3.4 and higher.InstallPilosa client is onPyPI. You can install the library usingpip:pip install pilosaUsageQuick overviewAssumingPilosaserver is running atlocalhost:10101(the default):importpilosa# Create the default clientclient=pilosa.Client()# Retrieve the schemaschema=client.schema()# Create an Index objectmyindex=schema.index("myindex")# Create a Field objectmyfield=myindex.field("myfield")# make sure the index and field exists on the serverclient.sync_schema(schema)# Send a Set query. PilosaError is thrown if execution of the query fails.client.query(myfield.set(5,42))# Send a Row query. PilosaError is thrown if execution of the query fails.response=client.query(myfield.row(5))# Get the resultresult=response.result# Act on the resultifresult:columns=result.row.columnsprint("Got columns: ",columns)# You can batch queries to improve throughputresponse=client.query(myindex.batch_query(myfield.row(5),myfield.row(10),))forresultinresponse.results:# Act on the resultprint(result.row.columns)DocumentationData Model and QueriesSee:Data Model and QueriesExecuting QueriesSee:Server InteractionImporting and Exporting DataSee:Importing and Exporting DataOther DocumentationTracingContributingSee:CONTRIBUTINGLicenseSee:LICENSE
Package: pilosa-roaring
Pilosa Roaring Bitmaps for PythonThis library implements Roaring Bitmaps with Pilosa 64 bit extension, compatible with Pilosa Roaring Bitmap imports.The purpose of this library is supporting Roaring Bitmap imports with 64bits in thePython client library for Pilosa.  Because of that, the implementation only supports adding bits and serializing bitmaps and leaves out many of the features of Roaring Bitmaps, such as removing bits and all bit operations.Copyright 2018 Pilosa Corp.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
Package: pilot-config
# Pilot Config ToolConfiguration tool for the Pilot Automation PlatformThis tool configures the firmware for your Pilot Mainboard and attached modules. You need at least a supported single board computer (SBC, currently Raspberry Pi and Google Coral are supported) and a Pilot Mainboard attached to it.There are two options:
- Install pilot-config locally on the SBC
- Install pilot-config on a PC that can access the SBC via SSH## Installationsudo pip3 install pilot-config## Upgradesudo pip3 install –upgrade pilot-config## Run locally (on the single board computer)sudo pilot setup## Run remotelypilot setup –host [IP] –user [user] –password [password][IP]       = hostname or IP address of your SBC
[user]     = SSH username
[password] = SSH password## Infos when regerating ProtosIfgenerate_protobuf.shis run, the import ingrpc_gen/pilotbuild_pb2_grpc.pyis not generated correctly.
You need to change the import in line 5 to:` python from . import pilotbuild_pb2 as pilotbuild__pb2 `
Package: pilote
Pilote======< French for 'Pilot' (noun). Meaning - test (a scheme, project, etc.) before introducing it more widely >Current status, version 0.7.0, pre-alpha release------------------------------------------------This project is under development and at a very pre mature stage.We are working to make it stable and make it ready for production.THIS PROJECT IS UNDER DEVELOP MODE, IF YOU WANT TO USE IT -FIX WHAT YOU NEED. FEEL FREE TO SEND US YOUR IMPROVISATIONS.Right now we're targeting to integrate more deliverypartners to make your work easier.Details-------Project codebase: <https://github.com/omprakash1989/pilote>Project Documentation: <http://pilote.readthedocs.io/en/latest>Delivery Partner integration is a very important step in building an ecommerce portal.We realised the importance of the same and tried creating a layer which would involve less time and resourcePilote was build to solve the following issues:- Indigenous Delivery Partner integration- Lack of python based sdk's for most of the Delivery Partners- Reduce the time taken for such integrationsPrior to Pilote , Initially it would have taken something around 2 weeks for a single integration.Now it can be done in less than a minute.Currently we have integrated the following delivery partners:- Blue Dart- Delhivery- Ecom ExpressDoes it not sound cool enough..!!Look how easy it is to use:Features--------- One click installation- All partners in one go- Create Shipment- Create Pickup- Cancel Shipment- Build things fasterTo Come-------- Tracking Shipments- More Delivery Partners- Install Specific Delivery Partner- Disable Delivery Partner- Automated DP Assignments- Logger- Dynamic Status MappingInstallation------------Install pilote by running:pip install piloteContribute----------- Issue Tracker: https://github.com/omprakash1989/pilote/issues- Source Code: http://github.com/omprakash1989/piloteSupport-------At this point, we are expecting active contributions, feature suggestionsand raising  any/all kinds of issues.If you are experiencing issues, please let us know.You can raise the issue directly to github issue tracker.About the Organisation----------------------Fynd is a product based Fashion Marketplace.We at Fynd, believes a lot in open sourcing. As per our Open Sourcing policies, we are now making some essential modules Open Source so that anyone/everyone can benefit from the same.License-------The project is licensed under the MIT License.Usage=====.. code::# Import the service you want to use.# from pilotes.[pilote_name].services import CreateShipment, CancelShipment, CreatePickupfrom pilotes.ecomm.services import CreateShipment, CancelShipment, CreatePickupdef test_ecomm_create_package_success():TEST_CREDS = {"username": 'testusername',"password": 'testpass',"debug": True}# Test data set for sending request with params as key and param value as value.# Follow the documentation for dummy data.test_data = {}create_package = CreateShipment(TEST_CREDS)response = create_package.send_request(test_data)return response
Package: pilot-platform-common
commonImportable package responsible for cross-service tasks within the Pilot Platform (e.g. logging, Vault connection, etc.).Getting StartedInstallation & Quick StartThe latest version of the common package is available onPyPiand can be installed into another service via Pip.Pip install from PyPi:pip install pilot-platform-commonInpyproject.toml:pilot-platform-common = "^<VERSION>"Pip install from a local.whlfile:pip install pilot_platform_common-<VERSION>-py3-none-any.whlContributionYou can contribute the project in following ways:Report a bug.Suggest a feature.Open a pull request for fixing issues or adding functionality. Please consider usingpre-commitin this case.For general guidelines on how to contribute to the project, please take a look at thecontribution guide.
Package: pilot-platform-object-storage
Pilot Platform Storage ManagerProvides a simple and flexible Python library for efficient and reliable object storage solutions. Enables direct interaction with multiple object storage APIs, starting with Azure Blob API and with plans to add more in the futureGetting StartedManagerimportasynciofromobject_storage.factoriesimportget_managerconnection_string='DefaultEndpointsProtocol=https;AccountName=pilot;AccountKey=any;EndpointSuffix=core.windows.net'azr_manager=get_manager('azure',connection_string)account_sas=asyncio.run(azr_manager.get_container_sas('test'))print(blob_sas)>'https://pilot.blob.core.windows.net/test/file.txt?sp=rw&st=2023-04-28T15:15:14Z&se=2023-04-28T23:15:14Z&spr=https&sv=2021-12-02&sr=b&sig=account_signature'blob_sas=asyncio.run(azr_manager.get_blob_sas('test','small.txt'))print(blob_sas)>'https://pilot.blob.core.windows.net/test/file.txt?sp=rw&st=2023-04-28T15:15:14Z&se=2023-04-28T23:15:14Z&spr=https&sv=2021-12-02&sr=b&sig=blob_signature'blobs_list=asyncio.run(azr_manager.list_objects('test'))print(blobs_list)>[<class'azure.storage.blob._models.BlobProperties'>, ...]blobs_list=asyncio.run(azr_manager.create_container('test'))File Clientimportasynciofromobject_storage.factoriesimportget_file_clientblob_sas_url='https://pilot.blob.core.windows.net/test/file.txt?sp=rw&st=2023-04-28T15:15:14Z&se=2023-04-28T23:15:14Z&spr=https&sv=2021-12-02&sr=b&sig=account_signature'azr_file_client=get_file_client('azure',blob_sas_url)asyncio.run(azr_file_client.upload_file('./small.txt'))Container Clientimportasynciofromobject_storage.factoriesimportget_container_clientcontainer_sas_url='https://pilot.blob.core.windows.net/test?sp=rw&st=2023-04-28T15:15:14Z&se=2023-04-28T23:15:14Z&spr=https&sv=2021-12-02&sr=b&sig=account_signature'azr_container_client=get_container_client('azure',container_sas_url)asyncio.run(azr_container_client.upload_file('small.txt','./small.txt'))Installation & Quick StartThe latest version of the object-storage package is available onPyPiand can be installed into another service via Pip.Pip install from PyPi:pip install pilot-platform-object-storageInpyproject.toml:pilot-platform-object-storage = "^<VERSION>"Pip install from a local.whlfile:pip install pilot_platform_object_storage-<VERSION>-py3-none-any.whlDocumentationAPI Reference and User Guide available atpilotdataplatform.github.io/object-storageContributionYou can contribute the project in following ways:Report a bug.Suggest a feature.Open a pull request for fixing issues or adding functionality. Please consider usingpre-commitin this case.For general guidelines on how to contribute to the project, please take a look at thecontribution guide.