Saravanan666/pypi-org huggingface dataset:
Package: grab-from-libgen
grab-from-libgenAn easy API for searching and downloading books from Libgen.Before InstallingBe sure that you have installed Calibre and have added the necessaryebook-convertcommand to your path!calibreis "a powerful and easy to use e-book manager". It's also free, open-source, and super easy to use.You can install an calibre executable, through MacOS Homebrew, compile from source... pick your poison. They only thing you need to be sure of
is the commandebook-convertis in your PATH.InstallInstall bypip install grab-from-libgenQuickstartThe example below shows to grab the first book returned from a search and save it to your current working directory as a pdf.fromgrab_from_libgenimportLibgenSearchres=LibgenSearch('fiction',q='test')res.first(convert_to='pdf')This is an example the gets and downloads a book that matches a given title.fromgrab_from_libgenimportLibgenSearchres=LibgenSearch('fiction',q='test')res.get(title='a title',save_to='.')Documentationget_resultsget_results(self) -> OrderedDictCaches and returns results based on the search parameters theLibgenSearchobjects was initialized with. Results are ordered
in the same order as they would be displayed on libgen itself with the book's id serving as the key.firstfirst(save_to: str = None, convert_to: str = None) -> DictReturns a the first book (as a dictionary) from the cached or obtained results.getget(save_to: str = None, convert_to: str = None, **filters) -> DictReturns the first book (as a dictionary) from the cached or obtained results that match the given filter parameters.The filter parameters must be pulled from the keys that the book dictionary object returns.
Package: grabify-cli
Grabify🎼 A command-line tool that allows you to download artwork and metadata from Spotify tracks and albums without authentication.InstallationTo install Grabify, run the following command:pip install grabify-cliUsageTo use Grabify, run the following command:grabify [OPTIONS] COMMAND [ARGS]Where[ARGS]is the Spotify URL of the track or album you want to download.ExampleDataThere is example how to download data for the track "Bending Hectic" by The Smilegrabify data https://open.spotify.com/track/2tA4gq8tO9TPPPpbgK5n4wThis will save the data to the fileDownloads/grabify/bending_hectic.json.ArtworkFor example, to download the artwork for the album "Currents" by Tame Impala, you would run the following command:grabify art https://open.spotify.com/album/79dL7FLiJFOO0EoehUHQBvThis will save the artwork to the fileDownloads/grabify/Currents.jpg.ContributingContributions are welcome! Please submit pull requests to theGitHub repository.Licensegrabifyis licensed under the MIT License. See theLICENSEfile for more information.
Package: grablib
Copyright (C) 2013-2020 Samuel ColvinKind of like bower, but in Python, and simpler, and with some more features.grablibcan:download files from urls, including extracting selectively from zip files.create.grablib.lockwhich retains hashes of all downloaded files meaning assets can’t change unexpectedly.compile sass/scss/css usinglibsass.concatenate and minify javascript usingjsmin.Definition files can either be JSON or YAML (seeexamples).Installationgrablib requirespython 3.6+.pip install grablib[build](You can also use simplypip install grablibto install without build requirements,
this is useful when you’re not using grablib for building as it avoids installingjsminandlibsasswhich can be slow.)CLI UsageDefine your static files thus: (grablib.yml)download_root:'static/libs'download:'http://code.jquery.com/jquery-1.11.3.js':'js/jquery.js''https://github.com/twbs/bootstrap-sass/archive/v3.3.6.zip':'bootstrap-sass-3.3.6/assets/(.+)$':'bootstrap-sass/''GITHUB/codemirror/CodeMirror/5.8.0/lib/codemirror.js':'codemirror/'# simple scss file to import and compile bootstrap from above,# generally this would be in your code# this file just reads "@import 'bootstrap-sass/stylesheets/bootstrap';"'https://git.io/v1Z5J':'build_bootstrap.scss'debug:truebuild_root:'static/prod'build:# delete the entire static/prod directory before building, this is required for sass,# and generally saferwipe:'.*'cat:# concatenate jquery and codemirror into "libraries.js"# it won't get minified as debug is true, but without that it would'libraries.js':-'DL/js/jquery.js'-'DL/codemirror/codemirror.js'sass:# compile all css, scss and sass files which don't start with _ from the "download_root"# into the "css" directory, here that will just be build_bootstrap.scss which will# build the whole of bootstrap.# debug: true means you'll get map files and a copy of sass files so maps work properly.'css':'DL/'Then download and build you static files with just:grablibLibrary UsageYou can also call grablib from python:fromgrablibimportGrabgrab=Grab('path/to/definitions.json|yml')grab.download()grab.build()
Package: grablinkgooglesearch
grablinkgooglesearchA python package for Grab Link Google Search and export it to a file csv or txt.InstallationRequirement library:pipinstallbeautifulsoup4
pipinstallgoogle
pipinstallcsvTo install, run the following command:python3-mpipinstallgrablinkgooglesearchusageEnter in python interactive mode:python3Using python package with following usage:importgrablinkgooglesearchgrablinkgooglesearch.main()
Package: grabngo
GraB’n GoOptimal Permutation-based SGD Data Sampler for PyTorchFree software: Apache Software License 2.0Documentation:https://grabngo.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2023-09-02)First release on PyPI.
Package: grabrun
grabrunAdd a short description here!A longer description of your project goes here…Making Changes & ContributingThis project usespre-commit, please make sure to install it before making any
changes:pip install pre-commit
cd grabrun
pre-commit installIt is a good idea to update the hooks to the latest version:pre-commit autoupdateDon’t forget to tell your contributors to also install and use pre-commit.NoteThis project has been set up using PyScaffold 4.4. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.
Package: grab-screen
Take screenshots and upload anywhere!InstallingYou installgrab-screenwith pip:$pipinstallgrab-screenUsage$grab-screen--helpUsage:grab-screen[OPTIONS]COMMAND[ARGS]...Options:-h,--helpShowthismessageandexit.-v,--versionShowtheversionandexit.Commands:configGetandsetoptions.imageMakeascreenshotanduploadtoastorage.Configurations$grab-screenconfig list- show configs.$grab-screenconfig set NAME [VALUE]- set an option. You can add--upsetto remove the option.$grab-screenconfig reset- remove all options.Taking screenshots$grab-screenimage- take a screenshot.Use-h/--helpto see more options.StoragesCloudAppBefore uploading screenshots to CloudApp, provider your credentials:$grab-screenconfigsetcloudapp_usernameYOUR-USERNAME$grab-screenconfigsetcloudapp_passwordThen take a screenshot:$grab-screenimage--browse--storagecloudappLicensingMIT License
Package: grabutils
GrabutilsUtils and helpers for crawling websitesInstallpipinstallgrabutilsor from Githubpipinstallgit+git://github.com/sniter/grabutils.git#egg=grabutilsUsageSee tests as usage exampleInstallpipinstallgrabutils[all]Forbsmodule:pipinstallgrabutils[bs]Forrestmodule:pipinstallgrabutils[rest]Forsshmodule:pipinstallgrabutils[ssh]
Package: gracedb-sdk
gracedb-sdkA modern, performant REST API client for GraceDB, based onRequests. For documentation, seehttps://gracedb-sdk.readthedocs.io.BenchmarksTime in seconds to perform common taskslscsoft/ligo-gracedb. Measured on a residential Internet connection on the US East Coast.Notes for software packagingSoftware packaging files exist for the following systems:RPM:https://git.ligo.org/packaging/rhel/python-gracedb-sdkDebian:https://git.ligo.org/packaging/debian/gracedb-sdkConda:https://github.com/conda-forge/gracedb-sdk-feedstock
Package: grace-dizmogen-converter
Grace To dizmoGen ConverterThis simple script converts an existing grace dizmo into a dizmoGen dizmo. It requires dizmoGen (but not Grace) to be available on the system.RequirementsPython3npm - @dizmo/generator-dizmoInstallationLinux/MacOSThe preferred way of installing dizmogen_converter is to make use of Python's virtual environment.python3 -m venv .venv
source .venv/bin/activate
pip install grace-dizmogen-converterIf you rather install it globally you can do so, but you will need superuser privileges:sudo pip3 install grace-dizmogen-converterWindowsThere is currently no easy installer for windows. If you have a complete python environment set up it is the same as on linux/mac, otherwise you can always make use of the linux subsytem for windows.UsageTo use the converter, navigate into a Grace dizmo directory and executedizmogen_converter. This will create a new directory inside the parent directory of the current directory with the converted dizmo.Example (with source to .venv, only use this if you are using a virtual env.):$ cd some_grace_dizmo
$ dizmogen_converter
$ cd ../some_grace_dizmo__converter
$ npm install
Package: graceful-exit
Python Graceful Exit Context ManagerA flexible context manager for python to handle graceful termination of python programsInstallationpipinstall-Ugraceful-exitHow to use:Synchronous examplefromgraceful_exit.moduleimportGracefulExitfromgraceful_exit.helpersimportwrap_in_system_exitdefmain():app=App()withGracefulExit[App](app=app,exit_handler=app.exit_handler_sync)aswrapped_app:wrapped_app.run_sync()if__name__=="__main__":wrap_in_system_exit(main())Asynchronous examplefromgraceful_exit.moduleimportGracefulExitfromgraceful_exit.helpersimportwrap_in_system_exitasyncdefmain():app=App()asyncwithGracefulExit[App](app=app,exit_handler=app.exit_handler_async)aswrapped_app:awaitwrapped_app.run_async()if__name__=="__main__":wrap_in_system_exit(asyncio.run(main()))
Package: gracefully-kill
Terminates a subprocess gracefully, if it doesn't work, it will be killed (Windows only)pip install gracefully_killTested against Windows 10 / Python 3.10 / AnacondaThe function attempts to terminate the subprocess gracefully by closing its standard input, output, and error streams, waiting for a specified timeout,
and finally terminating the process.
This allows the subprocess to clean up its resources and exit properly.
The function checks if the process is still alive after termination attempts.
If it is, it uses the taskkill_force_pid_children function from the taskkill module to forcibly terminate
any child processes associated with the given process ID.
This ensures that the entire process hierarchy is terminated if necessary.pro=subprocess.Popen('ping -t 8.8.8.8')kill_process(pro,timeout=1)
Package: graceful-sigterm
graceful-sigtermReceive the kill signal from the operating system and gracefully wait for the worker thread to end.Note: The package name isgraceful-sigtermbut the module name issigtermfor short.Installpip install graceful-sigtermUsage Example 1example1.pyimport time
import signal
import sigterm


def worker():
    print("Press Ctrl+C, and wait 5 seconds to stop...")
    while not sigterm.is_stopped():
        print(".", end="", flush=True)
        sigterm.wait_until_stop(timeout=1)
    print("")
    for i in range(5):
        print("x", end="", flush=True)
        time.sleep(1)


def main():
    sigterm.setup()
    sigterm.setup(signal.SIGINT)
    sigterm.register_worker(worker)
    sigterm.execute()


if __name__ == "__main__":
    main()outputtest@test-Pro sigterm % python example1.py
Press Ctrl+C, and wait 5 seconds to stop...
....^C
xxxxx%Releasesv0.1.0First realse.v0.1.1Doc update.
Package: grachev
Grachev packageFree software: BSD 2-Clause LicenseInstallationpip install grachevYou can also install the in-development version with:pip install https://github.com/aljeshishe/python-grachev/archive/master.zipDocumentationhttps://python-grachev.readthedocs.io/DevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.0.0 (2020-04-11)First release on PyPI.
Package: gracie-dictionary-api
This package provides a simple wrapper around the Toposlabs Gracie API platform.Sample usageimportgracie_dictionary_apiasGracieDictionayAPIdefgracie_connect():sso_server=<fullurltossosever>login_name=<loginname>login_password=<loginpassword>host=<hostoripofserver>port=443e_api=GracieDictionayAPI.GracieAPI(host,sso_server,port,login_name,login_password)# print currently logged in user informationprint(e_api.call_api('usersController','whoAmI'))# process some text and print JSON resultsprint(e_api.call_api('searchController','processText',text='Boston is the capital and most populous city of the Commonwealth of Massachusetts in the United States'))
Package: gracie-feeds-api
This package provides a simple wrapper around the Toposlabs Gracie API platform.Sample usageimportgracie_feeds_apiasGracieFeedsAPIdefgracie_connect():sso_server=<fullurltossosever>login_name=<loginname>login_password=<loginpassword>host=<hostoripofserver>port=443e_api=GracieFeedsAPI(host,sso_server,port,login_name,login_password)# print currently logged in user informationprint(e_api.call_api('usersController','whoAmI'))# create a new project - exception will be thrown if project already existsproject=e_api.call_api('projectsController','add',name='Test Project')# process some text and print JSON resultsprint(e_api.call_api('projectsController','processText',text='Boston is the capital and most populous city of the Commonwealth of Massachusetts in the United States',privacyMode=False,projectId=project['id']))
Package: grAdapt
grAdapt: Gradient-Adaptation for Black-Box OptimizationgrAdaptis a Python package for black-box optimization with fixed budget. It is running on top of scikit-learn, scipy and numpy.It adapts first-order optimization methods to black-box functions by estimating the gradient with different approaches without the need of additional function evaluations. Further, it samples new starting points from multivariate probability distributions to escape local optima. It is a stochastic and sequential model-based optimization method (SMBO). Most SMBO techniques suffer from quadratic, cubic or even worse time complexities. This is caused by refitting the surrogate model without prior information.grAdaptestablishes incremental learning and a sliding window technique to improve the complexity significantly. In stock settings, the runtime ofgrAdaptscales linearly with the number of function evaluations.Instead of establishing one optimization method,grAdaptis a modular package where thesampling method, surrogate, optimizer, escape function, and the domain constraintcan be changed. This makesgrAdaptvery adaptable to many optimization problems and not only specifically to black-box optimization.Due to the fixed budget, it suits optimization problems with costly objectives. The most common application ofgrAdaptis hyperparameter optimization.It was started in 2019 by Manh Khoi Duong as a project and was since then continually developed, maintained by the author himself under the supervision of Martha Tatusch.InstallationDependenciesgrAdapt requires:numpy ~= 1.18scipy ~= 1.4scikit-learn ~= 0.22tqdm ~= 4.44deprecated ~= 1.2.7How-to installThe current stable release can be installed from the pip distribution by:$ pip install grAdaptThe nightly release can be installed by pulling this repository, navigating to the source directory and then simply installing thesetup.pyfile:$ python setup.py installor alternatively (with VCS Support):$ pip install git+https://github.com/mkduong-ai/grAdapt.gitTestingTo verify that the installation went well without any complications, go to the source directory, then navigate totests$ cd testsand run:$ python run_all.pyAll tests should end with an OK.First start: Optimizing the sphere functionimportnumpyasnpimportgrAdaptfromgrAdapt.modelsimportSequentialfromgrAdapt.space.datatypeimportInteger,Float,Categorical# Black-Box FunctiondefsphereMin(x):returnnp.sum(x**2)# create model to optimizemodel=Sequential()# defining search spacevar1=Float(low=-10,high=10)var2=Float(low=-10,high=10)var3=Float(low=-10,high=10)bounds=[var1,var2,var3]# minimizen_evals=100# budget/number of function evaluationsres=model.minimize(sphereMin,bounds,n_evals)# getting the historyx=res['x']y=res['y']# best solutionsx_sol=res['x_sol']y_sol=res['y_sol']CitationWhen usinggrAdaptin your publication, we would appreciate if you cite us.BibTeX entry:@misc{grAdapt,
title={grAdapt: Gradient-Adaptation for Black-Box Optimization},
author={Manh Khoi Duong and Martha Tatusch and Stefan Conrad and Gunnar W. Klau}
howpublished={The Python Package Index: PyPi}
}LicenseThis project is distributed under the Apache License 2.0.
Package: graddy
graddy: A Gradient-weighted Class Activation Mapping PackageGrad-CAM (Gradient-weighted Class Activation Mapping) is a technique used to visualize the importance of different regions of an input image for a specific classification decision made by a convolutional neural network (CNN).When it comes to using Grad-CAM for segmentation, the main difference is that instead of generating a heatmap for a single class, we generate a heatmap for each pixel of the image, indicating its importance for segmentation. This requires modifying the implementation of Grad-CAM to calculate the gradients of the output segmentation mask with respect to the input image, rather than just the gradients of the output classification score with respect to the convolutional feature maps.The modified implementation typically involves computing the gradient of the output segmentation mask with respect to the final convolutional layer, then using these gradients to weight the activation maps of this layer to generate a heatmap. The heatmap can then be overlaid on the input image to highlight the regions of the image that are most important for the segmentation.Who's your graddy? 🌚This package provides a simple implementation of Grad-CAM (Gradient-weighted Class Activation Mapping) for visualizing and interpreting the predictions of convolutional neural networks. Grad-CAM is a technique for generating heatmaps that indicate which regions of an input image are most important for the model's prediction. This can be helpful for understanding what features the model is using to make its decision.graddy specialises in class activation map generation for classification and segmentation, as well as capturing them and your mom.Refer test_gradcam.py to use the package.InstallationYou can install this package via pip:pip install graddygradcam ClassThe gradcam class in the package can be used to generate Grad-CAM heatmaps for a trained classification model. Here's an example:import numpy as np
import matplotlib.pyplot as plt
from graddy import seg_gradcamLoad your modelmodel_path = "model_path.h5"
gradcam = seg_gradcam(model_path)Load an example imageimage_path = "example_image_path.jpeg"
image = Image.open(image_path)Generate the heatmap overlay imageheatmap_image = gradcam.generate_heatmap_image(image_path)Display the heatmap overlay imageplt.imshow(heatmap_image)
plt.axis("off")
plt.show()Arguments for seg_gradcam classThe seg_gradcam class takes the following arguments:model_path: the path to the saved Keras model file.target_size (optional): the size to which images should be resized (height, width.Default is (512, 512).preprocess_input (optional): a function that will be applied to the image before passing it to the model. Default is None.colormap (optional): the colormap to use for the heatmap. Default is "jet".alpha (optional): the transparency of the heatmap. Should be between 0 and 1. Default is 0.5.
Package: grade
GradeA python package focused on making autograding easy, especially for executable programs and scripts.SetupPippython -m pip install gradeDockerFROMthoward27/grade:latestSourcesgit clone https://github.com/thoward27/grade.git
cd grade
python -m pip install .DocumentationAvailable onReadTheDocsExampleSeeexample.pyfor an example on how to work with Grade.
Package: grade50
grade50This is a small tool to be used in combination with theCS50 automarker check50.
It allows to grade a student's submission based on check50's json report and a given grading scheme.Synopsisusage: grade50 [-h] [-v] [-o {ansi,json}] [-t TEMPLATE] [-V] scheme report

grade student submissions based on check50 json reports.


positional arguments:
  scheme
  report

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose
  -o {ansi,json}, --output {ansi,json}
                        output format
  -t TEMPLATE, --template TEMPLATE
                        jinja2 template for ansi output
  -V, --version         output version information and exitInstallationpip install grade50Grading Schemesare given in YAML format and have to contain a list of parts, each of which is a dictionary defining a name and a list of checks.
A check is a dictionary withnamea string, has to appear as check name in the check50 report file. This means our problem set has a check (python function) by that name.points, an integer, the number of points given if the check passes. Can be zero.fail_comment(optional), a string that will be added as a feedback comment in case the check fails. This may contain variables that will be replaced by the contend of the check50 check. For instance, "{log}" for the logging strings or "{cause[rationale]}" for the rationale in failing checks. This will default to "{cause[rationale]}" if not given, i.e. the short string produced by check50 on the console if the check fails.pass_comment(optional), a string that will be added as a feedback comment in case the check passes. Sometimes it is nice to say "well done for X". This will default to no comment if unset.Example:-name:"Part1"checks:-name:caesar_existspoints:0fail_comment:"Caesar.javawasnotsubmitted"-name:caesar_compilespoints:0fail_comment:"Caesar.javadoesnotcompile\n{log}"-name:"Part2"checks:-name:caesar_rotate_string_shift_5points:2# no fail_comment set. This is equivalent to# fail_comment: {cause[rationale]}pass_comment:Your rotation seems to work. Well done!-name:caesar_many_argspoints:2fail_comment:|Caesar does not print the right error message whe run with too many arguments (too many newlines/spaces?).expected was---{cause[expected]}actual was---{cause[actual]}Outputgrade50 can output either plain text or json data for further use in scripts.jsonusegrad50 -o jsonto output json data.
This will be a dictionary mappingpointsandpoints_possibleto the total score and total possible score, respectively.
Further, it mapspartsto a list of dicts, each withnamepointspoints_possiblecomments(a list of comment strings for all checks in this part)textTextual output is the default. It is based on the above and the default template (seegrade50/templates/default.jinja2).
You can pass any other jinja2 template as by means of the--templateoption.
This way one can easily generate for example latex sources that can be compiled into pdf feedback files for students.
Package: gradec
GradecA Python library for meta-analytic functional decoding of cortical gradient of functional
connectivity.Currently, gradec implements a range of gradient segmentation, and meta-analytic decoding algorithms.InstallationPlease see ourinstallation instructionsfor information on how to install gradec.Installation with pippip install gradecLocal installation (development version)pip install git+https://github.com/JulioAPeraza/gradec.gitCiting gradecIf you use gradec in your research, we recommend citing the Zenodo DOI associated with the gradec version you used.
You can find the Zenodo DOI associated with each gradec release at .ContributingPlease see ourcontributing guidelinesfor more information on contributing to gradec.We ask that all contributions togradecrespect ourcode of conduct.