Saravanan666/pypi-org huggingface dataset:
Package: gallavant
GallavantA jupyter widget for analysis of geospatial video dataInstallationYou can install usingpip:pipinstallgallavantIf you are using Jupyter Notebook 5.2 or earlier, you may also need to enable
the nbextension:jupyternbextensionenable--py[--sys-prefix|--user|--system]gallavantUsageInitializationThe first load may be a bit slow but will create a.peaks.jsonfile in the same directory as your source video. Subsequent loads will be significantly faster.Optional:for more screen real estate runfromIPython.core.displayimportdisplay,HTMLdisplay(HTML("<style>.container { width:100% !important; }</style>"))NavigationNavigate a video by clicking the timeline, a transcript line, or a point on the map.Tag SelectionData Formats and StructureDevelopment InstallationCreate a dev environment:condacreate-ngallavant-dev-cconda-forgenodejsyarnpythonjupyterlab
condaactivategallavant-devInstall the python. This will also build the TS package.pipinstall-e.When developing your extensions, you need to manually enable your extensions with the
notebook frontend.You need to run:jupyter nbextension install --sys-prefix --symlink --overwrite --py gallavant
jupyter nbextension enable --sys-prefix --py gallavantNote that the--symlinkflag doesn't work on Windows, so you will here have to run
theinstallcommand every time that you rebuild your extension. For certain installations
you might also need another flag instead of--sys-prefix, but we won't cover the meaning
of those flags here.How to see your changesJupyter Notebook:For Jupyter Notebook you can just watch for JS changes:yarnwatchPython:If you make a change to the python code then you will need to restart the notebook kernel to have it take effect.
Package: galleries
GalleriesGalleries is a python package to manage images galleries and is mainly designed for recognition purposes. With this package you can create a gallery specifying where to get the images from and how to get annotations (if exist) from each image.Installationpip install galleriesUsageGallery constructionfromgalleries.annotations_parsers.file_name_parserimportFileNameSepParserfromgalleries.galleryimportGalleryfromgalleries.images_providers.local_files_image_providersimportLocalFilesImageProviderimages_provider=LocalFilesImageProvider("path/to/images")annotations_parser=FileNameSepParser(["label","age"],sep="_")gallery=Gallery(images_provider,annotations_parser)Traverse imagesimages=gallery.get_images()# returns a generatorforimageinimages:# image is a numpy ndarraypassGet annotationsannotations=gallery.get_annotations()# returns a generatorforannotationinannotations:# annotation is a dictionarypassYou can also generate new data for each image and easily save it using aGalleryDataHandler, which is an abstract class.GalleryGenericDataHandleris an implementation of this class that takes information of how to generate the new data and where to save it.For instance, this is a code example of how to extract features from a gallery and save it to disk:fromgalleries.write_gallery_dataimportGalleryGenericDataHandlerfeature_extractor=...# your feature extractor here which has a features(image) methoddata_generator="<folder name>","<feature extractor name>",feature_extractor.features# write features if do not existgallery_features_writer=GalleryGenericDataHandler(gallery,"directory/to/save/features")exist_features=gallery_features_writer.exists_data(data_generator)ifnotexist_features:gallery_features_writer.write_data(data_generator)# read featuresfeatures=gallery_features_writer.read_data(data_generator)
Package: galleries-qt
Galleries-qtGalleries-qt provides Qt widgets to create and manage images galleries through a user interface. The galleries are created withgalleriespython package.Installationpip install galleries-qtUsageGalleries-qt provides two widgets. A galleries manager to create, update and delete galleries:fromgalleries_qt.galleries_managerimportGalleriesManagerwidget=GalleriesManager()and a combobox that allows to select from all galleries you have createdfromgalleries_qt.galleries_comboboximportGalleriesComboboxwidget=GalleriesCombobox()
Package: gallerist
GalleristClasses and methods to handle pictures for the web, usingPillow.$pipinstallgalleristFeaturesCode api to handle the generation of pictures in various sizes (e.g. medium
size picture, small size, thumbnail)Both asynchronous api and synchronous apiSupports user defined stores for binaries, for example to read and write
files inAzure Blob
Storage, orAWS
S3Handles by default JPG, PNG, GIF, MPO; and provides a code api to support
adding more supported formatsSupports scaling animated GIF files (resized gifs are still animated)Maintains PNG transparenciesSee alsoGallerist Azure Storage Blob Service integrationGallerist Azure Functions integrationExamplesBasic example using the synchronous api, and reading files from file system:fromgalleristimportGalleristfromgallerist.fsimportFileSystemSyncFileStoregallerist=Gallerist(FileSystemSyncFileStore('tests'))metadata=gallerist.process_image('files/blacksheep.png')Configuring sizesfromgalleristimportGallerist,ImageSizefromgallerist.fsimportFileSystemSyncFileStorestore=FileSystemSyncFileStore("tests")# configuring sizes by mime (use '*' to match any other mime):gallerist=Gallerist(store,sizes={"image/jpeg":[ImageSize("a",500),ImageSize("b",400),ImageSize("c",300)],"image/png":[ImageSize("a",350),ImageSize("b",250),ImageSize("c",150)],},)metadata=gallerist.process_image("files/pexels-photo-126407.jpeg")print(metadata)The original picture is not modified, it is only read to produce more images
in other sizes.Metadata:<ImageMetadata width=2520 height=1418 extension=".jpg" mime="image/jpeg" versions=[
  <ImageVersion
    size_name="a"
    id="bbf665ba8dd3412a84ac435a086fc7ad"
    max_side=500
    file_name="a-bbf665ba8dd3412a84ac435a086fc7ad.jpg"
  >,
  <ImageVersion
    size_name="b"
    id="7e4b38b977964c2a91544c1e0621c3a1"
    max_side=400
    file_name="b-7e4b38b977964c2a91544c1e0621c3a1.jpg"
  >,
  <ImageVersion
    size_name="c"
    id="847cad2796004b5086269bec9d705cdc"
    max_side=300
    file_name="c-847cad2796004b5086269bec9d705cdc.jpg"
  >
]>Implementing a custom file storeCustom stores must implement one of the following protocols:fromgallerist.abcimportFileStore,SyncFileStoreclassMyAsyncFileStore(FileStore):"""Implement your async file store, then use gallerist.process_image_async method"""asyncdefread_file(self,file_path:str)->bytes:passasyncdefwrite_file(self,file_path:str,data:bytes):passasyncdefdelete_file(self,file_path:str):passclassMySyncFileStore(SyncFileStore):"""Implement your sync file store, then use gallerist.process_image method"""defread_file(self,file_path:str)->bytes:passdefwrite_file(self,file_path:str,data:bytes):passdefdelete_file(self,file_path:str):pass
Package: gallerize
Create a static HTML/CSS image gallery from a bunch of images.Copyright:2007-2021 Jochen KupperschmidtLicense:MIT, see LICENSE for details.FeaturesIntegratesImageMagickto resize images and create thumbnails.Generates clean, slim, semantically appropriate HTML5 and uses
CSS 3 for styling.  As a result, the output can easily be themed.Provides HTML access keys for keyboard navigation.Optimizes images to reduce size and remove metadata.RequirementsPython3.7+JinjaImageMagick(tested with 6.6.9-7)jpegoptim(tested with 1.4.6)InstallationIt is recommended to create a virtual environment and run gallerize
inside it.To installImageMagick,jpegoptim, andvirtualenvon Debian/Ubuntu:$aptitudeinstallimagemagickjpegoptimpython-virtualenvThis should also give you a copy ofpip.Create a virtual environment calledvenvin the application path:$virtualenvvenvActivate it (note the space after the first dot!):$.venv/bin/activateInstall the dependencies of this application:$pipinstall-rrequirements.txtInstall gallerize itself:$pipinstall-e.TestsInstall test dependencies:$pipinstall-rrequirements-test.txtRun tests:$pytestUsageTo create a gallery in the directoryoutputfrom a all images in the
directoryimages:$gallerizeoutput/images/*See the usage help for more information on specifying a gallery title,
image captions, image dimensions, and more:$gallerize--helpChangelogVersion 0.4Released 2021-05-21Added support for Python 3.7, 3.8, and 3.9. Removed support for
versions older than that.Added command line option--html-onlyto only regenerate HTML
files. (contributed by Ryan Daniels)Added command line option--optimize-imagesto optimize and strip
metadata from images. (contributed by Ryan Daniels)Added command line option--versionto show version number.Turned single module into package.Added type hints.Tweaked HTML and CSS.Updated Jinja to 3.0.1 (from 2.11.3).Version 0.3.2Released 2015-08-09Added support for Python 3.4.A few tweaks here and there.Version 0.3.1Released 2013-10-03Added support for Python 3 (3.3, actually).Handle missing static path.Improved documentation.Version 0.3Added README.Added tests.Added option to include image captions from text files.Switched from XHTML to HTML5.Tweaked template markup and styling. Added CSS transitions.Version 0.2Released 2010-04-02Switched image processing from Python Imaging Library (PIL) to
ImageMagick.Switched template engine from Genshi to Jinja 2.Merged formerly separate script to resize images into the main script.Added option to only copy but not resize images.Removed jQuery-based animation (because it became annoying).Version 0.1Released 2007-08-11Initially released.
Package: gallerycrawler
https://github.com/idlesign/gallerycrawlerDescriptionGeneric crawling for galleriesCrawler starts from gallery listing URL;It visits every details page mentioned on current listing page;It gathers information from each details page;It moves to the next listing URL.Etc.fromgalerycrawler.toolboximportCrawler,dump# Define crawler.classMyCrawler(Crawler):selector_listing_next:str='.page-next a'selector_listing_thumbnails:str='.thumbnail img'selector_details:str='.page-details a'selector_details_title:str='.page-title'selector_details_img:str='.image img'selector_details_author:str='.image-author'# Run dumping.dump(crawler=MyCrawler,url='https://mysite.some/gallery/',fpath='dumped.html',probe=True,# Use this to quick test your crawler)
Package: gallery-dvk
gallery-dvkgallery-dvkis a command-line program designed to download media from various media sharing websites:See Supported SitesIt is heavily inspired bygallery-dl, and if I were smart, I probably would have just forked gallery-dl, but I couldn't fully wrap my head around how the codebase works, so here we are. I may not be able to parse the code very well, but I've ripped off gallery-dl's user documentation pretty thoroughly here.Contents:InstallationUsageConfigurationAuthenticationInstallationgallery-dvkcan be downloaded from it's PyPI package using pip:pip3 install gallery-dvkIf you are installing from source, the following python packages are required:beautifulsoup4HTML-String-ToolsMetadata-MagicPython-Print-Toolsrequeststqdmpillow(If using image stitching for Webtoon)UsageTo usegallery-dvkcall it with the URL you wish to download from:gallery-dvk URLYou can also download a from a list of URLs from a text file:gallery-dvk -i FILEUsegallery-dvk --helpfor a full list of command-line options. You can access aditional options and configuration using a config file.ConfigurationConfiguration files forgallery-dvkare stored in JSON format.DocumentationDocumentation for all the available configuration options can be found at/docs/configuration.mdA default config file can be found at/docs/gallery-dvk.jsonA more in-depth example config file can be found at/docs/gallery-dvk-example.jsonLocationgallery-dvklooks for config files in the following locations:WINDOWS:%APPDATA%\gallery-dvk\config.json%USERPROFILE%\gallery-dvk\config.json%USERPROFILE%\gallery-dvk.json(%USERPROFILE%usually refers to a user's home directory, i.e. C:\Users<username>)LINUX/MAC/UNIX-BASED:/etc/gallery-dvk.json${HOME}/.config/gallery-dvk/config.json${HOME}/.gallery-dvk.jsonAuthenticationUsername and PasswordMost extractors require login credentials to access some locked content, and some require login credentials to access the site at all.You can set the necessary login information in yourconfiguration file.{
    "transfur":
    {
        "username": "<USERNAME>",
        "password": "<PASSWORD>"
    }
}
Package: galleryserve
galleryserveA django app for serving collections of images or videosDependencies:PillowTo install:pip install galleryserveAdd 'galleryserve' to INSTALLED_APPSConfiguration Options:GALLERYSERVE_EXCLUDE_FIELDS- This can be added as a list in your settings.py
file to exclude certain fields from appearing in the admin.Template tag example:{% load gallerytags %}

{% get_gallery name %}
{% for slide in gallery %}
<div title="{{ slide.title }} - {{ slide.credit }}">
{% if slide.url %}<a href="{{ slide.url }}">{% endif %}
{% if slide.image %}<img src="{{ slide.image.url }}" alt="{{ slide.alt }}" />{% endif %}
{% if slide.url %}</a>{% endif %}
{% if slide.video_url %}<a href="{{ slide.video_url }}">{{ slide.title }}</a>{% endif %}
{{ slide.title }} - {{ slide.credit }}<br />
{{ slide.content|safe }}
</div>
{% endfor %}Change log:Changes in 0.2.0 - 05-25-22
Updated build process for py3 compatible appChanges in 0.1.5 - 06-27-13
Allow for gallery title to be passed in as context variable instead of always
treating it as a string.Changes in 0.1.3 - 11-02-12
Moved to git. Added ANTIALIAS to image processingChanges in 0.1.2 - 10-22-11
Fail silently on gallery not existingChanges in 0.1.1 - 9-20-11
Added random boolean to control whether gallery item sort should be random
psql command to insert column:
alter table galleryserve_gallery ADD column random boolean not null default false;
Package: gallia
GalliaGallia is an extendable pentesting framework with the focus on the automotive domain.
The scope of the toolchain is conducting penetration tests from a single ECU up to whole cars.
Currently, the main focus lies on theUDSinterface.
Acting as a generic interface, the logging functionality implements reproducible tests and enables post-processing tasks.
Therendered documentationis available via Github Pages.
Alternatively, the documentation is hosted onreadthedocsas well.
The documentation for the currentstablerealease is available on readthedocs.Keep in mind that this project is intended for research and development usage only!
Inappropriate usage might cause irreversible damage to the device under test.
We do not take any responsibility for damage caused by the usage of this tool.QuickstartSee thesetup instructions.First create a config template with--template, store it to a file calledgallia.toml, and adjust it to your needs.galliareads this file to set the defaults of the command line flags.
All options correspond to a command line flag; the only required option for scans isgallia.scanner.target, for instanceisotp://can0?src_addr=0x123&dst_addr=0x312&tx_padding=0xaa&rx_padding=0xaa.$ gallia --template > gallia.tomlYou are all set to start your first scan, for instance read the diagnostic trouble codes:$ gallia primitive uds dtc readThe target can also be specified by the--targetoption on the command line.
For the format of the--targetargument see thetransports documentation.AcknowledgmentsThis work was partly funded by the German Federal Ministry of Education and Research (BMBF) as part of theSecForCARsproject (grant no. 16KIS0790).
A short presentation and demo video is available at thispage.
Package: gallica-autobib
pygallica-autobibAutomatically match Bibliographies against bnf.gallica.fr!Standalone Usagegallica-autobibmy-bibliography.bibpdfs# match my-bibliography and put files in ./pdfsgallica-autobib--helpAs a libraryfrompathlibimportPathfromgallica_resource.pipelineimportBibtexParserparser=BibtexParser(Path("outdir"))withPath("articles.bib").open()asf:parser.read(f)parser.run()forresultinparser.results:print(result)Gallica-Autobib is capable of much more than this. For more information, see thehomepage.
Package: gallicaGetter
gallica-getterFind documents where a word occurs, context for the occurrence, full text for OCR document pages. Compose Gallica services using Python classes that represent each service.ExamplesHere are a few examples from a JSON API I am currently hosting:asyncdefget_documents_with_occurrences(args:ContextSearchArgs,on_get_total_records:Callable[[int],None],on_get_origin_urls:Callable[[List[str]],None],session:aiohttp.ClientSession,semaphore:asyncio.Semaphore,)->List[VolumeRecord]:"""Queries Gallica's SRU API to get metadata for a given term in the archive."""link=Noneifargs.link_distanceandargs.link_term:link=(args.link_term,args.link_distance)# get the volumes in which the term appearsvolume_Gallica_wrapper=VolumeOccurrence()gallica_records=awaitvolume_Gallica_wrapper.get(terms=args.terms,start_date=make_date_from_year_mon_day(args.year,args.month,args.day),end_date=make_date_from_year_mon_day(args.end_year,args.end_month,args.day),codes=args.codes,source=args.source,link=link,limit=args.limit,start_index=args.cursoror0,sort=args.sort,on_get_total_records=on_get_total_records,on_get_origin_urls=on_get_origin_urls,session=session,semaphore=semaphore,)returnlist(gallica_records)asyncdefget_sample_context_in_documents(records:List[VolumeRecord],session:aiohttp.ClientSession,semaphore:asyncio.Semaphore,)->List[ExtractRoot]:"""Queries Gallica's search result API to show a sample of context instead of the entire batch."""# warn if terms length is greater than 1ifany(len(record.terms)>1forrecordinrecords):print("Warning: using sample context for multi-word terms; only the first term will be used.")context_snippet_wrapper=ContextSnippets()context=awaitcontext_snippet_wrapper.get([(record.ark,record.terms[0])forrecordinrecords],session=session,semaphore=semaphore,)returnlist(context)asyncdefget_context_include_full_page(keyed_docs:Dict[str,VolumeRecord],session:aiohttp.ClientSession,sem:asyncio.Semaphore,context_source:Callable,):"""Queries Context and PageText to get the text of each page a term occurs on."""page_text_wrapper=PageText()queries:List[PageQuery]=[]# build records to be filled with page text for each page w/occurrencegallica_records:Dict[str,GallicaRecordFullPageText]={record.ark:GallicaRecordFullPageText(**record.dict(),context=[])forrecordinkeyed_docs.values()}forcontext_responseinawaitcontext_source(records=list(keyed_docs.values()),session=session,semaphore=sem):record=keyed_docs[context_response.ark]forpageincontext_response.pages:queries.append(PageQuery(ark=record.ark,page_num=int(page.page_num),))page_data=awaitpage_text_wrapper.get(page_queries=queries,semaphore=sem,session=session)foroccurrence_pageinpage_data:record=gallica_records[occurrence_page.ark]terms_string=" ".join(record.terms)record.context.append({"page_num":occurrence_page.page_num,"text":occurrence_page.text,"page_url":f"{record.url}/f{occurrence_page.page_num}.image.r={terms_string}",})returnlist(gallica_records.values())
Package: gallows
The goal of this project is to learn and implement the best practices,
in writing and maintaining a Python project. For this purpose, we use
a simple Hangman game program, from the book“Invent Your Own
Computer Games with Python”.UsageThe game can be installed using the following command$ pip install gallowsOnce installed the game can be played using the following command$ gallows.pyDevelopmentAfter cloning the repository, install the game in development mode
using the following command$ python3 setup.py developYou can modify the program and then test it by using the following
command$ gallows.pyYou can execute the unit tests, using the following command$ python3 setup.py testYou can build the documentation, using the following commands$ pip install -r doc-requirements.txt
$ cd doc
$ make html
Package: galore
Apply Gaussian and Lorentzian broadening to data from ab initio
calculations. The two main intended applications areBroadening of electronic density-of-states to simulate photoemission
spectroscopy (PES) data. Orbital contributions may also be weighted to
account for the frequency-dependent photoionisation cross-section.Application of Lorentzian instrumental broadening to simulated
Raman spectra from DFPT calculations.
Package: galoshes
# galoshes[![PyPI](https://img.shields.io/pypi/v/galoshes.svg?maxAge=2592000)](https://pypi.python.org/pypi/galoshes)
[![PyPI](https://img.shields.io/pypi/pyversions/galoshes.svg?maxAge=2592000)](https://pypi.python.org/pypi/galoshes)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/bsmithyman/galoshes/blob/master/LICENSE)
[![Travis Status](https://travis-ci.org/bsmithyman/galoshes.svg?branch=master)](https://travis-ci.org/bsmithyman/galoshes)
[![Coverage Status](https://coveralls.io/repos/bsmithyman/galoshes/badge.svg?branch=master&service=github)](https://coveralls.io/github/bsmithyman/galoshes?branch=master)
[![Code Issues](https://www.quantifiedcode.com/api/v1/project/65dcfec3894e43d6b6c9413d86ae85e9/badge.svg)](https://www.quantifiedcode.com/app/project/65dcfec3894e43d6b6c9413d86ae85e9)Tools for bootstrapping classes from key-value stores without getting your feet wet.
Package: galpy
Galactic Dynamics in pythongalpyis a Python package for galactic dynamics. It supports orbit integration in a variety of potentials, evaluating and sampling various distribution functions, and the calculation of action-angle coordinates for all static potentials.galpyis anastropyaffiliated packageand provides full support for astropy’sQuantityframework for variables with units.AUTHORJo Bovy - bovy at astro dot utoronto dot caSeeAUTHORS.txtfor a full list of contributors.If you find this code useful in your research, please let me know.If
you use galpy in a publication, please citeBovy
(2015)and link tohttp://github.com/jobovy/galpy. Seethe acknowledgement documentation
sectionfor a more detailed guide to citing parts of the code. Thanks!LOOKING FOR HELP?The latest documentation can be foundhere. You can also join thegalpy slack communityfor any questions
related togalpy; joinhere.If you findanybug in the code, please report these using theIssue
Trackeror by joining thegalpy
slack community.If you are having issues with the installation ofgalpy, please first
consult theInstallation
FAQ.PYTHON VERSIONS AND DEPENDENCIESgalpysupports Python 3. Specifically, galpy supports Python 3.8, 3.9, 3.10,
and 3.11. GitHub Actions CI builds regularly check support for
Python 3.11 (and of 3.8, 3.9, and 3.11 using a more limited, core set of tests)
on Linux and Windows (and 3.11 on Mac OS). Python 2.7 is no longer supported.This package requiresNumpy,Scipy, andMatplotlib. Certain advanced
features require the GNU Scientific Library
(GSL), with action calculations
requiring version 1.14 or higher. Other optional dependencies include:Support for providing inputs and getting outputs as Quantities with units is provided throughastropy.Querying SIMBAD for the coordinates of an object in theOrbit.from_nameinitialization method requiresastroquery.Displaying a progress bar for certain operations (e.g., orbit integration of multiple objects at once) requirestqdm.Plotting arbitrary functions of Orbit attributes requiresnumexpr.Speeding up the evaluation of certain functions in the C code requiresnumba.Constant-anisotropy DFs ingalpy.df.constantbetadfrequireJAX.Use ofSnapshotRZPotentialandInterpSnapshotRZPotentialrequirespynbody.Other parts of the code may require additional packages and you will be alerted by the code if they are
not installed.CONTRIBUTING TO GALPYIf you are interested in contributing to galpy's development, take a
look atthis brief
guideon the wiki. This will hopefully help you get started!Some further development notes can be found on thewiki. This includes a list of
small and larger extensions of galpy that would be usefulhereas
well as a longer-term roadmaphere. Please let the main
developer know if you need any help contributing!