Saravanan666/pypi-org huggingface dataset:
Package: thumbhash-python
ThumbHash for PythonIntroductionThe thumbhash library implements theThumbhashimage placeholder generation algorithm invented byEvan Wallacein Python.A full explanation and interactive example of the algorithm can be found athttps://github.com/evanw/thumbhashInstallationYou need Python 3.7+.$pipinstallthumbhash-pythonUsageCreate thumbhash from image file:fromthumbhashimportimage_to_thumbhashwithopen('image.jpg','rb')asimage_file:hash=image_to_thumbhash(image_file)You can also pass file name as parameter to the function:fromthumbhashimportimage_to_thumbhashhash=image_to_thumbhash('image.jpg')These functions use the Pillow library to read the image.If you want to directly convert a rgba array to a thumbhash, you can use the low-level function:fromthumbhash.encodeimportrgba_to_thumbhashrgba_to_thumbhash(w:int,h:int,rgba:Sequence[int])->bytesTo decode a thumbhash into an image:fromthumbhashimportthumbhash_to_imageimage=thumbhash_to_image("[THUMBHASH]",base_size=128)image.show()image.save('path/to/file.png')Alternatively you can use the following function to deal directly with the pixels array (without relying on Pillow):fromthumbhash.decodeimportthumbhash_to_rgbadefthumbhash_to_rgba(hash:bytes,base_size:int=32,saturation_boost:float=1.25)->Tuple[int,int,List[int]]CLIYou can also use the CLI mode to encode or decode directly via your shell.Usage:$thumbhash[OPTIONS]COMMAND[ARGS]...Options:--install-completion: Install completion for the current shell.--show-completion: Show completion for the current shell, to copy it or customize the installation.--help: Show this message and exit.Commands:decode: Save thumbnail image from thumbhashencode: Get thumbhash from imagethumbhash decodeSave thumbnail image from thumbhashUsage:$thumbhashdecode[OPTIONS]IMAGE_PATHHASHArguments:IMAGE_PATH: The path where the image created from the hash will be saved  [required]HASH: The base64-encoded thumbhash  [required]Options:-s, --size INTEGER RANGE: The base size of the output image  [default: 32; x>=1]--saturation FLOAT: The saturation boost factor to use  [default: 1.25]--help: Show this message and exit.thumbhash encodeGet thumbhash from imageUsage:$thumbhashencode[OPTIONS]IMAGE_PATHArguments:IMAGE_PATH: The path of the image to convert  [required]Options:--help: Show this message and exit.ContributingSeeContributing documentationLicensethumbhash-pythonis distributed under the terms of theMITlicense.
Package: thumbnailer
Python module to turn images into 120x180 JPEG thumbnails.InstallationMake sure you have Python 3 installed. Then:pip install thumbnailerUsagethumbnailer can either be used in your code:import thumbnailer

thumbnailer.thumbnail("MyCoolPic.png")It will then create a 120x180 JPEG version of your picture. If it already was a JPEG, thumbnailer will overwrite it.Alternatively, you can use thumbnailer from the console:python3 -m thumbnailer [path to image here]or:thumbnailer [path to image here]
Package: thumbnails
ThumbnailsThis tool stands out for its unparalleled optimization for lightning-fast thumbnail generation. By utilizing minimal
resources, you can generate more in less time. And with a user-friendly CLI and a convenient Python API, this tool is
the ultimate solution for efficient and streamlined thumbnail creation.Compatible with Major Video PlayersModern web video players use theWebVTTformatted files to preview thumbnails at a pointed time.WebVTTis a format for displaying timed text tracks (such as subtitles or captions).
Open-source video players such asPlyr,Video.js,Flowplayer,Fluid Player,
and more, use this format for showing the thumbnails. And, with the use ofexternal plugins,
Video.js even has the capability to handleJSONformatted thumbnail metadata. This is where our tool comes in,
offering the ability to generate the perfect thumbnails to match your needs.FeaturesWide-ranging video format compatibility, accommodating all major video formats as input files. (mp4, mkv, avi, mov, ogv, webm, mpeg, mpg, wmv, etc.)Flexible output options, supporting both WebVTT and JSON formats.Generating video thumbnails through the CLI and the Python API.Customize your thumbnail creation to fit your specific needs with various options.Image compression technology, ensuring optimized file sizes for quick and efficient loading times.How to Use?CLI Tool UsageThe CLI is a convenient way to generate thumbnails for a video file. And it accepts files or directories as arguments.
For the complete list of options, runthumbnails --help.thumbnails--base/media/--output/var/www/movie.com/media/thumbnails/--interval5~Videos/moviesPython API UsageThe Python API provides a flexible way to integrate video thumbnail generation into your existing applications.
Both the CLI and the Python API share the same set of options.fromthumbnailsimportGeneratorinputs=("~Downloads/movie.mp4","~Videos/movies/1.avi","~Videos/movies/2.ogv",)generator=Generator(inputs)generator.base="/media/"generator.skip=True# skip existing thumbnailsgenerator.output="/var/www/movie.com/media/thumbnails/"generator.interval=5generator.generate()DevelopmentRun the following command in the package's root directory to install it in editable mode.python3-mpipinstall-e.This command will install the package in your local environment and allow you to make changes to the code and see the
updates immediately. It will also install all the required dependencies.ContributeEveryone is welcome to contribute to this project. Please read and follow thecontribution guidelinesbefore you start. Contributions can be considered:Reporting an issueOpening a pull-requestSuggesting an idea atdiscussionsStarring the repository if you like itBefore you open a PR, please run the unit tests in the local environment to ensure everything is working. You need to
installtoxand run the tests for configured environments.python3-mpipinstalltox&&toxIf you want to run tests only for the current environment with your local Python interpreter, you can use the following
commands.python3-mpipinstall-rtests/requirements.txt
python3-mpytestLicenseCopyright (C) 2023 Artyom Vancyan.Apache 2.0
Package: thumbnails-readme
thumbnails-readme --- Create thumbnailsCreate thumbnails for raster and vector images in parent and its subdirectories and append them to the README.md fileDescription 📋The "thumbnails-readme" package is a simple library devoted to automatically generating thumbnails from a directory. It is explicitly designed to create thumbnails from Git folders. The thumbnails are shown in the README file of that Git folder. 📁🌐📸Multi-pages PDFs are turned into .gif thumbnails 🔄Current supported filetype extensions are: ".bmp", ".gif", ".ico", "jpeg", ".jpg", ".png", ".tga", ".tiff", ".webp", ".pdf" and ".svg"GitHub action 🚀See also the associated GitHub action in the following repository:thumbnails-readme-action.How does it work? 💡In the first step the program finds graphical material in your directories:['fig1.pdf', 'fig2.pdf', 'fig3.pdf', 'fig4.pdf']In the second step the program generates thumbnails for each material identified in folders.In the third step the program appends thumbnails to the README file.Installation 📦Install thumbnails-readme with pip:pipinstallthumbnails-readmeIn case you want to install directly from the source code, use:$gitclonehttps://github.com/firefly-cpp/thumbnails-readme.git
$cdthumbnails-readme
$poetrybuild
$pythonsetup.pyinstallTo install thumbnails-readme on Alpine Linux, please use:$apkaddpy3-thumbnails-readmeTo install thumbnails-readme on Arch Linux, please use anAUR helper:$yay-Syyupython-thumbnails-readmeAdditional dependenciesWindowsWindows users have to download poppler for Windows. Add poppler
path in your Python file (see the main example).poppler_path = path/to/your/poppler/bin/for example:poppler_path = C:/Program Files/poppler-0.68.0/binLinuxLinux's users can install poppler-utils from the main repositories.Example# Maximum thumbnail size - lower the number, smaller the thumbnailMAX_SIZE=(128,128)# PDF quality, lower the number, lower the qualitypdf_quality=15# Skiplist - which directories to ignoreskiplist=(".git",)# Path to your directorypath=os.getcwd()path=os.path.dirname(path)# Path to the folder, you want new thumbnails to be placed inpath_to_thumbnails_folder=Path(path+"/image_thumbnails")# Path to README.md file to be written topath_to_readme=Path(path+"/README.md")Run the script# Prepare thumbnails folder (check if exists, delete old thumbnails and create new ones)thumbnails_readme.prepare_thumbnails_folder(path_to_thumbnails_folder)# Prepare README.md file (check if exists, delete last modifications and place newly generated ones)thumbnails_readme.prepare_readme(path_to_readme)# Generate thumbnailsthumbnails_readme.crawl(path,path_to_readme,path_to_thumbnails_folder,MAX_SIZE,pdf_quality,skiplist,poppler_path)Use Caseshttps://github.com/firefly-cpp/figureshttps://github.com/firefly-cpp/postersLicenseThis package is distributed under the BSD-3-Clause license. This license can be found online athttp://www.opensource.org/licenses/bsd-3-clause/.DisclaimerThis framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!Thumbnails
Package: thumbor
Jointhumbor-bootcampfor a learning and contribution experience with ❤️ and 🤗 from the thumbor teamCrop, resize, transform and much more, all on-demand and AI Poweredthumbor is trusted by hundreds of companies worldwideand many more!thumbor is a smart imaging service that enables on-demandcropping, resizing, applying filters and optimizingimages.Cropping photos automatically can be a frustrating experience with severed heads involved. thumbor
usesAI for smart detection.thumbor is an HTTP server and you can create as many different images as you want just by varying path parameters:http://<thumbor-server>/300x200/smart/thumbor.readthedocs.io/en/latest/_images/logo-thumbor.pngYou should see an image of the thumbor logo in 300x200.Learn more about all you can do inthumbor's documentation.⚙️ InstallationDecide which installation option you want to use.Option 1: pip# thumbor with main dependencies onlypipinstallthumbor# thumbor with OpenCV dependencypipinstallthumbor[opencv]# thumbor with all dependenciespipinstallthumbor[all]Option 2: Binarysudoadd-apt-repositoryppa:thumbor/ppa
sudoaptitudeupdate
sudoaptitudeinstallthumborFor more ways, please check outInstallation.RunRunning it is as easy as hit:thumborAfter this, you can reach it onhttps://localhost:8888/unsafe/https://raw.githubusercontent.com/thumbor/thumbor/master/example.jpgTroubles?If you experience any troubles, try running:thumbor-doctorIf you have athumbor.conffile, you can use that to help thumbor-doctor:thumbor-doctor-cthumbor.confIf you still need help, pleaseraise an issue. Remember to send yourthumbor-doctoroutput in the issue:thumbor-doctor--nocolor-cthumbor.conf🎯 Featuressupports all common images formats out of the boxintelligent cropping and resizingblazing fast using cachingsupports many storages (local storage, AWS S3, Rackspace, Ceph, ...)AI-powered cropping based on face and feature detection (glasses, interesting points, ...)integrated with many programming languages and frameworksand many more...highly extensible🌟 Awesome Goodiesawesome-thumboris a curated list of all things thumbor. There you can find filters, storages, engines, loaders, docker images, extensions in your favorite language and framework, and much more.All of it with a clear indication of each project's quality. Have fun!👍 Contributethumbor is an open-source project with many contributors. Join themcontributing codeorcontributing documentation.If you use thumbor, please take 1 minute and answerthis survey? Only 2 questions!Join the chat athttps://gitter.im/thumbor/thumbor👀 DemoYou can see thumbor in action athttp://thumborize.me/
Package: thumbor-aliases
Thumbor URL Aliases plugin==========================.. image:: https://travis-ci.org/bluekiri/thumbor-aliases.svg?branch=master**thumbor_aliases** let's you create custom urls to redirect your most-used requestusing a friendly url.Imagine that your company decides that all thumbnails should go to ``100x100/smart``.Wouldn't be awesome to just name this url: ``thumbnail``? So, if you need to changeit later, you can even just modify the alias to point to ``200x200/smart`` instead,without having to change your application code.Install^^^^^^^^^^Before installing, be sure you're using Python2.7 (Python3 isn't supported yet).Install it by using pip::$  pip install thumbor-aliasesEasy, right?Configure^^^^^^^^^Create, if not done yet, your thumbor config file::$ thumbor-config > config.cfgAnd enable **thumbor_aliases** plugin on community extensions. This can be done byjust adding next lines at the end of configuration file::COMMUNITY_EXTENSIONS = ['thumbor_aliases',...]By default it will use the ``yaml_file`` storage handler, which reads a file located on ``~/aliases.yml``.In case you want to change the file location, you can set the config variable: ``ALIASES_STORAGE_FILE`` ::ALIASES_STORAGE_FILE = "~/your_custom_filename.yml"The YAML file should follow next format::alias: "url/to/redirect"For example::thumbnail: "100x100/smart"header: "800x200/smart"And in order to finally execute the app and let the magic happen, run next command::$ thumbor --conf=your_thumbor_config.cfg -a tc_core.app.App
Package: thumbor-arcface
thumbor_arcfaceThumbor ArcFace can recognize side faces and higher recognition rate, solve the problem of low recognition rate of OpenCV.中文文档EnvironmentThumbor >= 7.0.0ArcFace SDK >= 3.0Installationpipinstallthumbor_arcfaceEnable detectorAddthumbor_arcfaceto yourthumbor.conf.DETECTORS = [
    'thumbor_arcface',
    'thumbor.detectors.feature_detector',
]At the end of yourthumbor.conf, add ArcFace'sARC_APP_IDandARC_SDK_KEY, Remember to modify the value.########### ArcFace #########
ARC_APP_ID = ''
ARC_SDK_KEY = ''
ARC_FACE_SCALE = 32
ARC_FACE_MAX_NUM = 10ThanksArcSoft SDKArcFace-pythonthumbor_rekognition
Package: thumbor-cassandra
[![Build Status](https://travis-ci.org/glborges/thumbor-cassandra.svg?branch=master)](https://travis-ci.org/glborges/thumbor-cassandra)Introduction[Thumbor](https://github.com/globocom/thumbor/wiki) is a smart imaging service. It enables on-demand crop, resizing and flipping of images.[Apache Cassandra](https://cassandra.apache.org/) is a free and open-source, distributed, wide column store, NoSQL database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. Cassandra offers robust support for clusters spanning multiple datacenters,[1] with asynchronous masterless replication allowing low latency operations for all clients.InstallationIn order to install the Apache Cassandra Module for Thumbor, you have to install Apache Cassandra ecosystem first.## Apache Cassandra installationThe Apache Cassandra Module for Thumbor was originally developed and tested using the Cassandra docker image [Cassandra Official Docker Image](https://hub.docker.com/_/cassandra).## Thumbor installationYou have to install [Thumbor](https://github.com/globocom/thumbor) following the [Thumbor Installation Guide](https://github.com/globocom/thumbor/wiki/Installing)…## Apache Cassandra Module installation… and finally the Apache Cassandra Module :pip install thumbor_cassandraUsageUsing it is simple, just change your configuration in thumbor.conf:CASSANDRA_LOADER_SERVER_HOST = ‘localhost’
CASSANDRA_LOADER_SERVER_PORT = 9042
CASSANDRA_LOADER_KEYSPACE = ‘general’
CASSANDRA_LOADER_TABLE_NAME = ‘images’
CASSANDRA_LOADER_TABLE_ID_COLUMN = ‘image_id’
CASSANDRA_LOADER_TABLE_BLOB_COLUMN = ‘image_data’
CASSANDRA_LOADER_QUERY’ = ‘SELECT * FROM {0} WHERE {1}=%s’To use thumbor_cassandra for loading original images, change your thumbor.conf to read:LOADER = ‘thumbor_cassandra.loader’TestingIn order to execute [pyvows](http://heynemann.github.com/pyvows/) tests, you have to install pyvows :pip install pyvowsand run tests with :pyvows vowsLicenseLicensed under the MIT license:http://www.opensource.org/licenses/mit-licenseCopyright (c) 2019 TMG Digital - Speurders.nl
Package: thumbor-cloud-storage
Release Information===================3.0.0 (2017-04-21)------------------Changes:^^^^^^^^Initial release.Credits=======``thumbor-cloud-storage`` was written by `Pedro Gimenez <me@pedro.bz>`_, and is maintained by `Superbalist Engineering <tech@superbalist.com>`_.A full list of contributors can be found in `GitHub's overview <https://github.com/superbalist/thumbor-cloud-stoarge/graphs/contributors>`_.
Package: thumbor-expire
thumbor-expireAdd timeout verification for thumborUseServer sidethumbor config file setURL_SIGNER = thumbor_expire.base64_hmac_sha1_expireClient sideusefrom thumbor_expire.crypto import CryptoURLclass and pass expire argument, accept type:obj:int| :obj:float| :obj:datetime.timedelta| \ :obj:datetime.datetime| :obj:datetime.time, optional
Package: thumbor-gcs
thumbor-gcsThumbor Loader and Result Storage forGoogle Cloud
Storage,it can also be
abbreviated asgcs📢 AttentionThe thumbor storage can be customized as follows:Storages,Image
Loaders,Result
Storages.This project currently only implementsImage LoadersandResult StoragesInstallationpip install thumbor-gcsAuthenticationAuthentication is handled by the Google Cloud Storage SDK, seegoogle-cloud-storageSDKdocumentationContributionYou can make a pull requestsHERE, thank you for
your contribution.ConfigurationYou should create the corresponding bucket first in google cloud storageLoader settingsLOADER = 'thumbor_gcs.loader.gcs_loader'
# set your google cloud storage bucket name
LOADER_GCS_BUCKET_ID = ''
# set your google cloud project id
LOADER_GCS_PROJECT_ID = ''
LOADER_GCS_ROOT_PATH = ''AssumingLOADER_GCS_ROOT_PATHis set tooriginal, if the PATH
of the URL is/public/sample.png, then the file storage path in
the bucket of google cloud storage isoriginal/public/sample.pngResult storage settingsRESULT_STORAGE = 'thumbor_gcs.result_storage.gcs_result_storage'
# set your google cloud storage bucket name
RESULT_STORAGE_GCS_BUCKET_ID = ''
# set your google cloud project id
RESULT_STORAGE_GCS_PROJECT_ID = ''
RESULT_STORAGE_GCS_ROOT_PATH = ''OtherIf yourImage LoadersandResult Storagesuse the same
bucket, please use the two configuration itemsLOADER_GCS_ROOT_PATHandRESULT_STORAGE_GCS_ROOT_PATHas
appropriate, and pay attention to the file storage path (also calledobject path) in this bucket.
Package: thumbor-hsl
An extendedhttploader for thumbor which introduces an additional statd
counteroriginal_image_with_size_fetch.$code.$host.$widthx$height.$parsedUrl## ConfigurationLOADER=”thumbor_hsl.loaders.http_loader”### Optional query parsingIf you specify theHSL_REGEX_MATCH_URLoption, you can provide a regex with a group which value will be appended
in$parsedUrlExample:HSL_REGEX_MATCH_URL=”someQuery=(d+)”For a given url, e.g.https://my-image?someQuery=10the result of10will be appended to the counter.## Installpip install thumbor_hsl
Package: thumbor-icon-handler
thumbor-icon-handlerA thumbor handler for servefavicon.icorequestInstallationpip install thumbor-icon-handlerContributionYou can make a pull requestsHERE, thank you for
your contribution.# ConfigurationHANDLER_LISTSsettingsHANDLER_LISTS = [
  'thumbor.handler_lists.healthcheck',
  'thumbor.handler_lists.upload',
  'thumbor.handler_lists.blacklist',
  # Add this config
  'thumbor_icon_handler.icon',
]Optionally specify a localfavicon.icofileYou can use thefavicon.icofile in the local file system, or you
can ignore this configuration item and use thefavicon.icofile in
the Loader# specify your local filesystem favicon.ico file full path
# for example /srv/file/favicon.ico
ICON_IMAGE_LOCAL_PATH = ''
Package: thumbor-multidir
Thumbor file loader that checks multiple pathsIntroduction[Thumbor](https://github.com/globocom/thumbor/wiki) is a smart imaging service. It enables on-demand crop, resizing and flipping of images.UsageUsing it is simple, just change your configuration in thumbor.conf (or enviroment variable) before running Thumbor:# List of paths to check for file to load
# defaults to empty list which is an error so all requests will return 404
TC_MULTIDIR_PATHS = [‘/home/media’, ‘/mnt/media’]To use tc_multidir for loading original images, change your thumbor.conf or environment variables to read:LOADER = ‘tc_multidir.loader’Running ThumborNote: If using environment variables run Thumbor with the–use-environmentflag or other method to load it into the thumbor.conf template.See [Thumbor repo](https://github.com/thumbor/thumbor)
or use the Docker container maintaned by [MinimalCompact](https://github.com/MinimalCompact/thumbor/tree/master/thumbor) as a base image… see [/docker/Dockerfile](https://github.com/benneic/thumbor_multidir/tree/master/docker) for an example.
Package: thumbor_rekognition
Enable thumbor to use AWS rekognition to run face detectionthumboris a smart imaging service. It enables on-demand crop,
resizing and flipping of images. It also features a smart detection of
important points in the image for better cropping and resizing, using
opencv face detection algorithms.AWS Rekognitioncan quickly detect faces in image using sophisticated
deep learning-based visual search and image classification.thumbor_rekognition helps to use AWS Rekognition service to do face
detection in thumbor easily.Installationpipinstallthumbor_rekognitionEnable detectorAddthumbor_rekognitionto yourthumbor.conf. Do not include
thumbor’s out-of-box face detector.DETECTORS=[# Do not use out-of-box face detector# 'thumbor.detectors.face_detector',# Include thumbor_rekognition'thumbor_rekognition','thumbor.detectors.feature_detector',]The above configuration tells thumbor that it should run both the facial
detection and the feature detection. These are mutually exclusive,
meaning that if a face is detected, the feature detector won’t be run.AWS RekognitionAuthenticationAuthentication is handled by botocore, seeBoto3 documentation.RegionTo set the region to use Rekognition service, addREKOGNITION_REGIONto yourthumbor.conf. Default isus-east-1.# AWS region for the Rekognition serviceREKOGNITION_REGION='us-west-2'Using itAfter installing thumbor_rekognition, you can test it by using the
following URL.http://<thumbor>:<port>/unsafe/300x300/smart/my.domain.com/picture.pngIf you need to see what thumbor is seeing in your image, prepend/debugto all the parameters.http://<thumbor>:<port>/unsafe/debug/300x300/smart/my.domain.com/picture.png
Package: thumbor-video-engine
This package provides a thumbor engine that can read, crop, and transcode
audio-less video files. It supports input and output of animated GIF, animated
WebP, WebM (VP9) video, and MP4 (default H.264, but HEVC is also supported).UsageTo enable this engine, add the following setting to your thumbor.conf:ENGINE='thumbor_video_engine.engines.video'For non-video files, this engine will fall back to using'thumbor.engines.pil'.
An alternative image engine fallback can be configured by settingIMAGING_ENGINE.To enable transcoding between formats, add'thumbor_video_engine.filters.format'to yourFILTERSsetting. If'thumbor.filters.format'is already there,
replace it with the filter from this package.