Saravanan666/pypi-org huggingface dataset:
Package: genaibook
genaibookThis package contains some utilities to support the upcoming O’Reilly
bookHands-On Generative AI with Transformers and Diffusion
Models.
The book is currently in progress, if you have access to theEarly
Releasethrough your O’Reilly account, feel free to explore it and send
us your feedback!SetupCode is an essential part of the book content, and we highly recommend
to run the code examples while reading it. We also recommend to explore
on your own by modifying the code snippets or creating your own!This package will help you setup your environment and provides some
basic utilities used throughout the book.Hardware and Software Requirementsgenaibookonly requires Python 3.10 or better. Dealing with
transformers and diffusion models is a compute-intensive task, so having
access to a computer with a NVIDIA GPU will be needed. There are
multiple online options that you can use such asGoogle
ColaboratoryandKaggle
Notebooks.You can also run in a local environment if your computer has a NVIDIA
GPU. Support formpson Apple Silicon Macs has not been tested yet.Local EnvironmentIf you want to install in your computer, please install a Python 3.10
virtual environment using your preferred method. As an example, you can
do it withcondalike this:condacreate-ngenaibookpython=3.10
condaactivategenaibookPackage InstallIf you are using your own local environment, just run the following in a
terminal window:pipinstallgenaibookIf you are using a notebook-based environment such asGoogle
ColaboratoryorKaggle
Notebooks, enter the following
in the first cell of a new notebook:!pipinstallgenaibookThis will in turn install PyTorch, matplotlib, numpy and other
essentials.Additional Software InstallIf you are following the book, you’ll also need to installtransformers,diffusersand other related libraries:pipinstalltransformersdiffusersacceleratedatasets[audio]evaluatesentencepiece
Package: genai_dlp_prompter
GenAI DLP Prompt GeneratorGenAI DLP Prompt Generator is a Python tool designed to scrape DLP data and use it to generate GenAI prompt. It has three main modules:It fetches DLP test sample data from specified URLs, saves the data in text format, and then converts these text files into PDFs.It uses an OpenAI Assistant to generate DLP mock dataIt uses OpenAI Chat Completions to generate prompts for each DLP categoryThe output is suitable for benchmarking DLP systems or Generative AI Language Learning Models (GenAI LLMs).FeaturesWeb scraping from specified URLs.Data extraction and saving in text format.Conversion of text data to PDF format, ideal for benchmarking DLP systems or GenAI LLMs.InstallingTo install DLP Data Scraper, clone the repository and install the required packages:gitclonehttps://github.com/BenderScript/DLPDataScraper.gitcdDLPDataScraper/dlp_data_scraper
pip3install-rrequirements.txtUsageMake sure you have a OpenAI API key and set it as an environment variable:exportOPENAI_API_KEY=<yourkeyhere>The file with DLP categories currently undertests/dlp_categories.md. Need to be copies to a new location
and the path passed to theOpenAIDLPAssistantorOpenAIChatclasses.To use the DLP Data Scraper:The scraper access a URL with dynamic content, waits for it to load and extracts all DLP categoriesfromdlp_data_scraper.umbrellaimportUmbrellafromfile_utils.FileUtilsimportFileUtilspdf_data="umbrella/pdf_data"text_data="umbrella/text_data"file_utils=FileUtils()url=('https://support.umbrella.com/hc/en-us/articles/4402023980692-Data-Loss-Prevention-DLP-Test-Sample-Data-for''-Built-In-Data-Identifiers')scraper=Umbrella(url=url,text_data=text_data,pdf_data=pdf_data)html_content=scraper.initialize_browser()scraped_data=scraper.scrape_data()scraper.save_data_to_files()file_utils.convert_txt_to_pdf(text_data,pdf_data)print("Scraping and conversion to PDF completed.")After the run is over, the generated data under theumbrella/text_dataandumbrella/pdf_datadirectory. There will be one file for each DLP category.To use the OpenAI Assistant DLP generator:fromdlp_data_gen.openai_dlp_assistantimportOpenAIDLPAssistantdlp_gen_assistant=OpenAIDLPAssistant(text_data="openai_dlp/text_data",pdf_data="openai_dlp/pdf_data",dlp_categories_file="dlp/dlp_categories.md")dlp_gen_assistant.run()After the run is over, the generated data will be under theopenai_dlp/text_dataandopenai_dlp/pdf_datadirectory. There will be a single file with mock DLP data for
each category.To use the OpenAI DLP Prompt Generatorfromprompt_gen.openai_chatimportOpenAIChatchat_gen=OpenAIChat(text_data="openai_chat_prompt/text_data",pdf_data="openai_chat_prompt/pdf_data",dlp_categories_file="dlp/dlp_categories.md")chat_gen.run()ContributingContributions to DLP Data Scraper are welcome. Please feel free to submit pull requests or open issues to improve the project.
Package: genai-evaluation
GENAI EVALUATIONGenAI Evaluation is a library which contains methods to evaluate differences in Real and Synthetic Data.Functionsmultivariate_ecdf: Computes joint or multivariate ECDF in contrast to the univariate capabilities provided by packages like statsmodelsks_statistic: Calculates the KS Statistic for two multivariate ECDFsAuthorsDr. Vincent Granville- ResearchRajiv Iyer- Development/MaintenanceInstallationThe package can be installed withpip install genai_evaluationTestsThe test can be run by cloning the repo and running:pytest testsIn case of any issues running the tests, please run them after installing the package locally:pip install -e .UsageStart by importing the classfromgenai_evaluationimportmultivariate_ecdf,ks_statisticAssuming we have two pandas dataframes (Real & Synthetic) and only numerical columns, we pass them to the multivariate_ecdf function which returns the computed multivariate ECDFs of both.query_str,ecdf_real,ecdf_synth=multivariate_ecdf(real_data,synthetic_data,n_nodes=1000,verbose=True)We then calculate the multivariate KS Distance between the ECDFsks_stat=ks_statistic(ecdf_real,ecdf_synth)MotivationThe motivation for this package comes from Dr. Vincent Granville's paperGenerative AI Technology Break-through: Spectacular Performance of New SynthesizerIf you have any tips or suggestions, please contact us on email.History0.1.0 (2023-09-11)First release on PyPI.0.1.1 (2023-09-11)CorrectedFunction name from compute_ecdf to multivariate_ecdf0.1.2 (2023-09-11)EnhancedAdded a new parameter verbose in multivariate ECDF function0.1.3 (2023-09-11)CorrectedRemoved unecessary docstrings from code0.1.4 (2023-09-11)FixedResolved issues with special characters in the column names0.1.5 (2023-09-11)FixedEarlier version considered underscore as a special character. That is rectified in this version
Package: genaikit
genaikitAI code and general assistant powered byOpenAIInstallation$pipinstallgenaikitUsageTODOContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensegenaikitwas created by Vagner Bessa. Vagner Bessa retains all rights to the source and it may not be reproduced, distributed, or used to create derivative works.Creditsgenaikitwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: genalgopy
Genetic AlgorithmThis is a pure Python implementation for a genetic algorithm. It has precreated classes and functions for using this algorithm.The genetic module is compossed of a Individual and GeneticAlgorithm class.fromgenetic_algorithm.geneticimportGeneticAlgorithm,Individualfromgenetic_algorithm.chooserimportDefaultChooserfromgenetic_algorithm.rulesimportsingle_crossover,SimpleMutatordefget_pop()->list[Individual]:...deffitness(indivdual:Individual)->float:# or int...ga=GeneticAlgorithm(get_pop(),DefaultChooser(),single_crossover,SimpleMutator(),tracker=...,n_keep=...,n_mutated_keeped=...)ga.train(iterations=10,fitness)# or use ga.evololution(fitness, do_sort) where fitness is a list of tuples of a number representing a score and an Individual# if the list isn't sorted already, pass True for do_sortWhen creating your population, you should give the Individuals a list of values, akeras.Model, akeras.Sequentialor aNNobject, as well as a id.TheNNobject can be created with the simple_nn modul. You will need tenserflow for forkeras.Modelandkeras.Sequential.
Package: genalpy
Genetic algorithms with genalpyGenalpy is an easy-to-use Python library to solve different types of optimization problems using genetic algorithms.Installationpip install genalpyGet startedHow to find the extremum of a function:fromgenalpyimportSolver# Instantiate a Multiplication objectextremum_solver=Solver(function='-x*x + 4',goal='max',dimensions=2,boundaries=[-100,100])# Call the solve methodresult=extremum_solver.solve()
Package: gename
SummaryThis package is for anyone who wants to speculate the gender given a first
name. There is no magic involved, the speculate method simply does a local
database lookup.Usage>>> from gename import Gender
>>> gender = Gender()
>>> gender.speculate('Bertrand')
'M'
>>> gender.speculate('Simone')
'F'
>>> gender.speculate('Unicorn')
'U'U is for Unknown.
Package: genanki-chinese
genanki-chineseSimple package which automates the creation of Chinese notes for Anki.It produces notes with the following:Chinese word or phrase (Simplified)Chinese word or phrase (Traditional)English translationAudio in ChinesePinyinof the phrase or wordInstallationpip install genanki-chineseUsageusage:genanki-chinese[-h][-oOUTPUT][-dDECKNAME]file

positionalarguments:filePathofthefiletoimport

optionalarguments:-h,--helpshowthishelpmessageandexit-oOUTPUT,--outputOUTPUTPathwheretoputtheresult-dDECKNAME,--decknameDECKNAMEDecknametoupdateThefileshould have the following structure:咖啡<br>	kāfēi<br><br>coffee	
水<br><br>waterThis is done so you can export your decks from Anki and improve it creating a new one.You can also have word by word separated by newlines without the<br>html element.To update decks you have to install theAnki-Connectplugin in Anki.
Package: genapy
gapyGenetic algorithm for Python 3.What is this?This algorithm is simply a class which can be directly implemented in your project.Required PackagesYou will need the following packages to run this algorithm (also listed insrc/gapy/requirements.txt)numpy
pandas
scipyPandas is only used for aesthetic reasons on thewritemethod for the printing and is entirely optional. To remove this feature, simply comment out the method and set logging to False.InstalationA testing version is available in PyPI:pip3 install genapyHow to useThe filetest.pypresents an example on how to use this algorithm. It requires a fitness function, which must receive a numpy array containing the population on each line, each composed of real numbers, and output a numpy vector with the fitness of each individual as a real number.Probabilities for crossover or mutation are numbers in the interval [0,1] and set by the parameterscrossoverandmutationrespectively. They both default to 0.5.The output range of each parameter used to make up the individual can be scaled separately by passing a numpy array containing the upper and lower bounds in the shape (k,2), where k is the number of parameters (chromosome_size), and also settinghas_maskto True.The number of bits for each parameter can also be set as an integer inresolution.A printing delay for thewritemethod is set by passing the desired value in seconds ontime_print.
Package: gen-autoconf
Create C project skeletongen_autoconfis tool for creating C project skeleton.Developed inpythoncode.The README is used to introduce the modules and provide instructions on
how to install the modules, any machine dependencies it may have and any
other information that should be provided before the modules are installed.Table of ContentsInstallationInstall using pipInstall using buildInstall using py setupInstall using dockerDependenciesTool structureDocsContributingCopyright and LicenceInstallationUsed next development environmentCurrently there are four ways to install frameworkInstall process based on using pip mechanismInstall process based on build mechanismInstall process based on setup.py mechanismInstall process based on docker mechanismInstall using pipPython is located atpypi.org.You can install by using pip#python3pip3installgen_autoconfInstall using buildNavigate torelease pagedownload and extract release archive.To installgen-autoconfruntarxvzfgen-autoconf-x.y.z.tar.gzcdgen-autoconf-x.y.z# python3wgethttps://bootstrap.pypa.io/get-pip.py
python3get-pip.pypython3-mpipinstall--upgradesetuptools
python3-mpipinstall--upgradepip
python3-mpipinstall--upgradebuild
pip3install-rrequirements.txt
python3-mbuild-s--no-isolation--wheel
pip3installdist/gen-autoconf-x.y.z-py3-none-any.whl
rm-fget-pip.pyInstall using py setupNavigate to releasepagedownload and extract release archive.To installgen_autoconftype the followingtarxvzfgen_autoconf-x.y.z.tar.gzcdgen_autoconf-x.y.z/# python3pip3install-rrequirements.txt
python3setup.pyinstall_lib
python3setup.pyinstall_data
python3setup.pyinstall_egg_infoInstall using dockerYou can use Dockerfile to create image/container.Dependenciesgen_autoconfrequires next modules and librariesats-utilities - Python App/Tool/Script UtilitiesTool structuregen_autoconfis based on OOPGenerator structuregen_autoconf/├──conf/|├──gen_autoconf.logo│├──gen_autoconf.cfg│├──gen_autoconf_util.cfg│├──project.yaml│└──template/│├──autogen.template│├──configure.template│├──Makefile.template│├──README.template│└──src/│├──main.template│└──Makefile.template├──__init__.py├──log/│└──gen_autoconf.log├──pro/│├──__init__.py│├──read_template.py│└──write_template.py└──run/└──gen_autoconf_run.pyDocsMore documentation and info atgen_autoconf.readthedocs.iowww.python.orgContributingContributing to gen_autoconfCopyright and LicenceCopyright (C) 2020 - 2024 byvroncevic.github.io/gen_autoconfgen_autoconfis free software; you can redistribute it and/or modify
it under the same terms as Python itself, either Python version 3.x or,
at your option, any later version of Python 3 you may have available.Lets help and support PSF.
Package: gen-aws-federated-signin-url
gen_aws_federated_signin_urlGenerate AWS Federated Signin URLInstallpip install gen_aws_federated_signin_urlUsagefromgen_aws_federated_signin_urlimportGenAwsFederatedSigninUrlurl=GenAwsFederatedSigninUrl.client()signin_url=url.genrate(role_arn='arn:aws:iam::123456789012:role/role-name',)print(signin_url)
Package: genbank-download
Download nucleotide sequences from genbank using an accession numberSimon Greenhill, 2009Usage:python genbankdownload.py [options] ACCESSION-NUMBERe.g.
python genbankdownload.py J01415.1
python genbankdownload.py J01415.1 > mysequence.xml
python genbankdownload.py -m fasta J01415.1 > mysequence.fasta
Package: genbarcode
genBarcodegenBarcode is a cli tool I created to simply take a string and generate barcode.I use an application on my phone to track numerous packages. When I get the tracking on my phone it's relatively easy to just add the tracking directly. But when it's on my computer I tend to copy the tracking number and paste it into one of the many online barcode generator sites. Sometimes these sites don't make the barcode big enough, or they use some different barcode that my phone has trouble reading.I figureed I'd just create a python tool to generate the barcode for me. This makes it so I don't have to rely on sites, or dealing with the hassle. The code uses python-barcode and supports the full gambit of formats offered by that library.Additionally this just a fun project to improve my skills such aslearning more about packaging python toolsbuilding wheelsuploading to pypibuilding a reliable development environmentusing poetryusing pipxInstallationI highly recommend you usepipxto install this, as it creates the virtualenv for you and seamlessly handles the loading of the virtual environment when running this tool. If you choose not to usepipx, you should create a virtualenv and possibly a wrapper script to launch this in the virtualenv.pipxinstallgenBarcodeUsageThe following is the help for the programusage: genbarcode [-h] [-V] [-v] [-l] [-m METHOD] [-d DATA] [-t TRACKING]

 program description to be displayed by argparse
    ex: python genBarcode.py


optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -v, --verbose
  -l, --list-methods    Enumerate available generators and exit
  -m METHOD, --method METHOD
                        set the barcode generated type (default: code128)
  -d DATA, --data DATA  Provide data to be used to generate the barcode
  -t TRACKING, --tracking TRACKING
                        Provide tracking number to be used to generate the barcode, stub for --dataOne of-dor-tis required. You can use either one.Examples# print help/usagegenBarcode-h# print all available barcode formatsgenBarcode-l# print all available barcode formatsgenBarcode-l# USPS samplegenBarcode-d9400123456789999876500# UPS samplegenBarcode--data1Z9999999999999999# Fedex samplegenBarcode--tracking123456789012# Generate isbn for 1984/George.OrwellgenBarcode-misbn-d9780451524935genBarcode-misbn13-d9780451524935genBarcode-misbn10-d0451524934CreditsThis package was created withCookiecutterand thetbennett6421/pythoncookieproject template.
Package: genbox
`` genbox`` is the input data generator forboxmoxDocumentationmaintained athttps://boxmodeling.meteo.physik.uni-muenchen.de/documentationInstallationpip install genboxChangelog1.0.0 (2017-12-19)Peer-reviewed version to be published in Knote et al., GMD0.1.0 (2017-08-12)Initial release
Package: genbq
Copyright (c) 2017 Geoffrey A. ReedPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.Description: Not for use
Keywords: sample setuptools development
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Package: genbu
genbuGenbu is a library for creating composable command-line interfaces.FeaturesInfer shell arguments parser from type hints.Override inferred parsers using shell parser combinators.Compose command-line interfaces declaratively (subcommands).Dispatch automatically to the appropriate command callback.Generate usage messages by usinggenbu.usage.InstallpipinstallgenbuUsage# hello.pyfromgenbuimportGenbuprint(Genbu(lambdaname:f"Hello,{name}!").run())# Usage example: python hello.py --name "world"Seeexamples.LicenseMIT
Package: genc
Gencprovides the information in the Geopolitical Entities, Names
and Codes (GENC) standard as a Python distribution.Installation$ pip install gencUsage>>> import genc
>>> genc.region_by_alpha3('DEU')
Region(alpha3='DEU', alpha2='DE', numeric='276', name='Germany',
       uppername='GERMANY', fullname='Federal Republic of Germany')

>>> genc.region_by_alpha2('DE').name
'Germany'

>>> genc.region_by_name('germany').alpha2
'DE'

>>> genc.region_by_name('unknown region') is None
True

>>> for region in genc.REGIONS:
...     # do something
...     passLicensegencis offered under the Apache License 2.0.Changelog0.2 (2015-09-22)Ensure that all attributes are proper Unicode.Add a JSON version of the subdivision data.0.1 (2015-09-04)Initial release.
Package: gencbor
gencborThis is a simple genericCBOR (RFC8949)encoder / decoder which
will not look at any tag values.How to use>>> import gencbor
>>> gencbor.encode(gencbor.Tag(0x1001, [3, 4, 5]))
b'\xd9\x10\x01\x83\x03\x04\x05'
>>> gencbor.decode(b'\xd9\x10\x01\x83\x03\x04\x05')
Tag(4097, (3, 4, 5))
>>> gencbor.encode(gencbor.Map([(0, 'int'), (0.0, 'float')]))
b'\xa2\x00cint\xf9\x00\x00efloat'
>>> gencbor.decode(gencbor.encode(gencbor.Map([(0, 'int'), (0.0, 'float')])))
Map({0: int, 0.0: float})
>>> gencbor.decode(gencbor.encode([gencbor.SimpleValue(i) for i in range(18, 24)]))
(SimpleValue(18), SimpleValue(19), False, True, None, undefined)
>>>GeneralThe library is will treat0and0.0as distinct, i.e. both values can be
in keys in the same map.The library is also supposed to treat differentnanvalues as different,
but currently there is a bug when encoding non-standardnanvalues.The library will check for well-formed-ness and forbasic validity. It will not check for tag validity.false,trueandnullwill by default be decoded toFalse,TrueandNone.
Package: gencedula
generatecedulaPython3 module to generate random and verify
uruguay identification document.InstallationInstall with pippip3 install -U generatecedulaUsageIn [1]: import gencedula

In [2]: for x in range(10):
	print(
		gencedula.generate_cedula(
			start=4_000_000,
			stop=5_000_000,
			step=200
			)
		)
46308006
47486005
49378000
41064007
40756005
45282003
47958004
44844000
41564007
49684003
Package: gen-changelog
gen_changeloggen_changelog is a very simple script that generates a changelog from a repository with
commit messages compatible withConventional
Commits. The main difference of this script fromgitchangelogis that this script will
generate sections from dates/months instead of git tags of versions.UsageJust run it in the root of your repository:$./gen_changelog"Your project's name"You're done.CustomizationYou can customize the sections you want in the changelog by passing the--categoriesparameter:$./gen_changelog--categories"add:Added|rem:Removed|chg:Changed|cs:CS:GO stuff"With pre-commitTo use this with pre-commit, add this to your.pre-commit-config.yaml:-repo:https://gitlab.com/stavros/gen_changelog.gitrev:ccc6fa1dbe1a937c9b729e356b5fd91bf9d59ca4hooks:-id:gen-changelogstages:[commit]