Saravanan666/pypi-org huggingface dataset:
Package: generarPrimos
Este proyecto es un pequeÃ±o ejemplo de un paquete Python.Contiene una funciÃ³n que permite generar un conjunto de nÃºmeros primos comprendidos
entre 2 y un valor introducido por el usuario (este Ãºltimo no incluido).
License
=======numerosPrimos Copyright 2021, Enrique A.RThis program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
Package: generate-ascii
Generate ASCII ImageGenerateA S C I Iiamge.InstructionsInstall:pip install generate_asciiGenerate an ASCII image:fromgenerate_asciiimportsynthesize# initialize drive object (to generate ASCII image)drive=synthesize.Drive()# generate a ASCII visual (dark_mode optional)drive.generate(dark_mode=True)# save to pngdrive.to_png('img_name.png')
Package: generate-background-image
Generate background imageThis repo is about how to Generate a background image of words in a given string using the wordcloud module. A generated background image can be used in Git repos, blogs, or articles.Getting StartedInstallationpip3 install generate-background-imageUsageTo generate image with black background.from generate_background_image import generate_background_image

word_string = "Iron man,Thanos,Doctor Strange,Captain Marvel,Hulk,Vision,Thor,Groot,Rocket,Winter Soldier,Hela,Spiderman,Black Panther,Ultron,Wanda,Gamora,Star Lord,War Machine,Silver Quick,Mantis,Captain America,Loki,Antman,Black Widow,Hawkeye,Falcon,Drax,Shuri"

generate_background_image(words=word_string, out="output_image.png", layout_color="black")To generate image with white background.from generate_background_image import generate_background_image

word_string = "Iron man,Thanos,Doctor Strange,Captain Marvel,Hulk,Vision,Thor,Groot,Rocket,Winter Soldier,Hela,Spiderman,Black Panther,Ultron,Wanda,Gamora,Star Lord,War Machine,Silver Quick,Mantis,Captain America,Loki,Antman,Black Widow,Hawkeye,Falcon,Drax,Shuri"

generate_background_image(words=word_string, out="output_image.png", layout_color="white")Command line argumentstag (* = required)variableoptionsdefault value-ws *word_stringstring of words separated by commaREQUIRED-o *outpath to output image"output_image.png"-llayout_colorchoices=["black", "white"]"black"-Wwidthwidth of image1200-Hheightheight of image800-sstep_sizedifference between freqencies of words50-bbiaslowest initial frequency of a word10LICENSEThis project is licensed under the terms of theMIT license.Follow meFollow me on Linkedin:mohdsaqibhbiSubscribe my Youtube channel:StarrAI
Package: generate-bes-from-template
generate-bes-from-templateGenerate BigFix Content From a TemplateTestedon Mac, Windows, Linux on Python 3Install with pipUsepipto install the latest:pip install generate-bes-from-templateRelated:https://github.com/jgstew/generate_prefetchhttps://github.com/jgstew/tools/blob/master/Python/url_to_prefetch.py
Package: generate_captcha
==================Generate Captcha==================* 基于第三方库 ``Pillow`` 生成验证码图片* 注意： 若不指定字体类型，需要把文件中的 ``msyh.ttf`` 拷贝到系统字体库中---------创建画笔---------.. code-block:: pythondraw = ImageDraw.Draw(img)  # 创建画笔----------增加干扰线----------.. code-block:: pythondef create_lines():"""绘制干扰线"""line_num = random.randint(*n_line)  # 干扰线条数for i in range(line_num):# 起始点begin = (random.randint(0, size[0]), random.randint(0, size[1]))# 结束点end = (random.randint(0, size[0]), random.randint(0, size[1]))draw.line([begin, end], fill=(0, 0, 0))----------增加干扰点----------.. code-block:: pythondef create_points():"""绘制干扰点"""chance = min(100, max(0, int(point_chance)))  # 大小限制在[0, 100]for w in range(width):for h in range(height):tmp = random.randint(0, 100)if tmp > 100 - chance:draw.point((w, h), fill=(0, 0, 0))-----------------绘制验证码字符-----------------.. code-block:: pythondef create_text(xy_, font_type_):"""绘制验证码字符"""c_chars = get_chars()text_ = '%s' % ' '.join(c_chars)  # 每个字符前后以空格隔开if font_type_ is None:curr_path = os.path.dirname(os.path.abspath(__file__))font_type_ = os.path.join(os.path.dirname(curr_path), "packages", "msyh.ttf")font = ImageFont.truetype(font_type_, font_size)if xy_ is None:font_width, font_height = font.getsize(text_)xy_ = ((width - font_width) / 3, (height - font_height) / 3)  # 左右距离/上下距离draw.text(xy_, text_, font=font, fill=fg_color)return ''.join(c_chars)---------保存图片---------.. code-block:: python# 图片路径file_name_ = file_name if file_name else textfile_name = "{}.{}".format(file_name_, suffix)file_path = os.path.join(image_path, file_name)img.save(file_path)
Package: generate-changelog
Generate ChangelogUse your commit log to make a beautiful changelog file.DocumentationGitHubgenerate-changelogdoes what it says: it generates a full changelog, or updates an existing one. Git tags and commits are the inputs by whichgenerate-changelogperforms its task.The primary goal of this tool was to provide the benefits ofconventional commitswithout requiring a strict syntax.generate-changelogaccomplishes this using configurable regular expressions or commit metadata matching. The thought is natural language is easier for developers to remember and requires less tooling to enforce.FeaturesCommit and tag processingFilter out commits and tags based on regular expression matching.Classify commit messages into sections such as "New", "Fixes", and "Changes" using configurable regular expressions, metadata, or custom criteria.Rewrite commit summary or commit body using pipelines of actions.Extract parts of the commit summary or body into metadata available for templates and filters.Built-in issue parsers for Jira, GitHub, Azure DevOps Board.Built-in conventional commit parserChangelog renderingTemplated usingJinjatemplates.Each template has a large amount of metadata that allows linking to a commit, a version diff, and issue trackers.Easily customize just the template you want.Supports full or incremental changelog generation.Release hintsCan use user-defined rules to suggest a release type for use in another part of your CI pipeline.Git supportSupports your merge or rebase workflows and complicated git histories.Supports of multi-authors for one commit through configurabletrailers key values.Built-in parser for turningtrailers key valuesinto metadata.RequirementsPython 3.7 or higher.Installation$pipinstallgenerate-changelogUsageCreate a default configuration file.$generate-changelog--generate-configThis creates a file named.changelog-config.yaml. You can make changes to the default configuration.Generate your changelog via:$generate-changelog
Package: generateCitationNetwork
A tool to generate a network of cited and referenced papers for a given DOI.FeaturesTODODocumentationThe full documentation can be generated with Sphinx:History0.1.0 (2020-12-09)First release on PyPI.0.2.0 (2021-02-19)Refactored to include references without DOI.New routine to determine publication year from different fields.Publications without year data are set to the source DOI year.
Package: generate-corr-sequence
Generate stationary correlated time-seriesSummaryThis Python function creates a time-series (discrete-time random process) with a specific
autocorrelation function (ACF) and continuous probability distribution, e.g with predefined probability density function (PDF).Usage:fromgenerate_corr_sequenceimportgen_corr_sequencegen_corr_sequence(dist_obj=uniform,target_acf=1-np.minimum(np.arange(0,100),100)/100,L:int=2**20,seed=None,debug:bool=False,plot_figures_name:str=None)Argumentsdist_obj- A continuous distribution object fromscipy.stats,
default isuniformtarget_acf- A required ACF function, default is a linear functionL- Number of required samplesseed- Seed of the random number generatordebug- Plots PDF and ACF graphsplot_figures_name- Filename of the debug figure to be saved, only whendebugisTrue. In no extension is provided, the default ispng.Returns:A random sequence with pre-defined ACF and distribution with typenumpy.ndarray.ExamplesDefault settings with uniform distribution and linear ACFThe example below shows the default settings of the function from theexamples/default_settings_example.ipynbfile.# Example usage of the function with default settingssequence=generate_corr_sequence(debug=True)Nakagami distribution with Bessel function ACFThe example below is from theexamples/nakagami_example.ipynbfile.# Example usage of the function with Nakagami distribution and an autocorrelation functionfromgenerate_corr_sequenceimportgen_corr_sequenceimportnumpyasnpfromscipy.statsimportnakagamifromscipy.specialimportj0# %%m=np.arange(0,100)signal=gen_corr_sequence(dist_obj=nakagami(nu=1),target_acf=np.array(j0(0.1*np.pi*abs(m))),debug=True)NotesThere is no responsibility for the correctness of the results. It may work and it may not - use debug option to check the results.Examples for different distributions (uniform, exponential, Laplace, Rayleigh, triangle,
gamma, lognormal, Nakagami) and four different ACFs are provided in theexamples/evaluation/folder.
Theevaluate_PDFs.ipynbfile used for generation of all the ACF figures in the directory.It takes about 2-3 seconds to generate a single default-length sequence.The example of code repeatability is provided in theexamples/nakagami_example.ipynbnotebook as extension of Nakagami distribution example. The sequence is generated 20 times with ACFs as follows.ReferencesThe algorithm is mainly based on the following papers:Filho, José Cândido Silveira Santos, and Michael Daoud Yacoub.
"Coloring Non-Gaussian Sequences." IEEE Transactions on Signal
Processing, vol. 56, no. 12, 2008, p. 6.Liu, Bede, et al. "Generation of a Random Sequence Having a
Jointly Specified Marginal Distribution and Autocovariance." IEEE
Transactions on Acoustics, Speech, and Signal Processing, vol. ASSP-30,
no. 6, 1982, p. 11.ContributorsDima Bykhovsky,Netanel Tochilovsky,Alexander RudyakLicenseThis project is licensed under theMITlicense.Todocustom (non-scipy) distributions supporthigher-speed algorithm for Gaussian distributionsfix lognormal distribution problem for oscillatory ACFs
Package: generate-dense-patches
generate-dense-patchesA simple plugin to create a lot of training data from a 3D volume and mask. For help with this plugin please open an issue, for issues with napari specifically raise an issue here instead.Thisnapariplugin was generated withCookiecutterusing@napari'scookiecutter-napari-plugintemplate.InstallationIt's recommended to have installed napari and pyqt through conda.conda install napari pyqtThen to install this plugin viapip:pip install generate-dense-patchesTo install latest development version :pip install git+https://github.com/volume-em/generate-dense-patches.gitUsageTo use this plugin with napari:Drag and drop an image and/or segmentation mask (tif) into the viewer.Open "Plugins" Toolbar and select "Generate dense patches" and click "Generate 2D Patches"This plugin works to create a lot of 2D training data by generating an $n^3$ cube, rotating every $\theta$ slices and saving every (step size) slice of the generated volume.Make sure the "save directory box", "step size", "rotation theta", and "patch size" is filled inIf no point is placed, then the center of the image will be used as the center of the cube. If a point is placed, then the center of the cube will be the point.Press run and wait for the patches to be generated.ContributingContributions are very welcome. Tests can be run withtox, please ensure
the coverage at least stays the same before you submit a pull request.LicenseDistributed under the terms of theBSD-3license,
"generate-dense-patches" is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.
Package: generate-dockerignore-from-gitignore
generate-dockerignore-from-gitignoreAs the name implies, this package generates a.dockerignorefor you based on.gitignorerules
found in your source tree.Why generate this file, you ask? Because there are a number of differences between.dockerignoreand.gitignorerule processing which can make it non-trivial to make
your Docker file tree match your local git tree.Generating your.dockerignorefile based on your configured.gitignorerules means you only have
to think about which files should not be distributed with your project only once. This also can
promote reproducible builds by ensuring that the only files your Docker context has access to are
those files that are tracked by your git repository.The following differences between.dockerignorevs.gitignoreprocessing are handled by this tool:behavior.gitignore.dockerignoreplain patterns without slashes or wildcards⏬️ match recursively⬆️ match top-level onlyseparate per-directory ignore files✅ allowed❌ not allowedlocal .git/info/exclude file✅ included-global core.excludesFile file✅ included-The code's handling of these behavioral differences istestedusing actual
git and Docker calls, followed by validation that the resultant git source trees are
equal to the Docker build contexts.References:https://git-scm.com/docs/gitignorehttps://docs.docker.com/engine/reference/builder/#dockerignore-fileInstallationpip install generate-dockerignore-from-gitignoreUsageusage: generate-dockerignore [-h] [-C DOCKER_ROOT] [-v] [-o OUTPUT] [PATH ...]

.dockerignore file generator based on .gitignore file(s)

positional arguments:
  PATH                  gitignore file(s), or directories under git source control (which will be
                        searched for **/.gitignore).

options:
  -h, --help            show this help message and exit
  -C DOCKER_ROOT, --docker-root DOCKER_ROOT
                        Docker context directory to chdir into before continuing
  -v, --verbose         Output per-file logging to stderr
  -o OUTPUT, --output OUTPUT
                        File path for generated .dockerignore rule output, or - for stdout
                        (default: .dockerignore)
Package: generate-docs
The Sample Programs Docs GeneratorPreviously known as the Sample Programs Wiki Generator, the Sample Programs Docs
Generator repo houses thegenerator.pyscript which we use in the Sample Programs
repository to generate our documentation. The script is automated by a GitHub Actions
build in the Sample Programs repo.If you would like to propose a change, feel free to leverage the issues tab or make
a pull request.How It WorksThegenerator.pyscript works by analyzing the information in the Sample Programs
repository and storing that information in objects. These objects are then used to
generate various documentation pages in Markdown.What is AutomatedCurrently, the script does two things:It maintains our entireSample Programs wikiIt maintains all of our READMEs in the Sample Programs repoIn terms of wiki automation, it generates 27 pages: 1 alphabet catalog and 26 alphabet pages.The alphabet catalog contains a table with links to each alphabet page as well as
metadata like the number of scripts and languages per letter. In addition, the
alphabet catalog contains the total number of scripts and languages for the entire repo.Each alphabet page contains a table which lists each language for that particular letter
as well as metadata like the number of scripts per language as well as linking to articles
and issues.How to RunAt this time, the wiki generator is hardcoded for the Sample Programs repo. In order to
run it, you can install it as a package usingpip:pip install generate_docsAfter that, you'll need a copy of the Sample Programs repo:git clone https://github.com/TheRenegadeCoder/sample-programs.gitFinally, you can build the wiki using the following command:wikig /path/to/sample-programs/repo/archiveLikewise, you can build the READMEs using the following command:wikir /path/to/sample-programs/repo/archiveAlternatively, you can clone this repo to run thegenerate_wiki.pyscript directly:python generator.py /path/to/sample-programs/repo/archiveBoth solutions are designed to handle repo exploration from the/archive/directory.
If successful, you should begin to see print statements for the various links under test
for The Renegade Coder. When finished, you'll have a/wiki/directory next to your script
which contains the wiki. Likewise, all the READMEs should be updated.At this point, you can push the wiki directly to the Sample Programs wiki.Recently, as of 2.3.0, this script has been expanded to support projects outside
of the Sample Programs repo. For example, this code now supports the automated
generation of the How to Python repo as follows:wikihThat's it!
Package: generate-docstring
Docstring generatorInstall instruction# Install docstring packagepipinstall.# Copy vim plugin to vim packmkdir-p~/.vim/packs/plugins/start
ln-s$PWD/plugins~/.vim/packs/plugins/start/generate-docstringTODO:add tox support                       [ ]parse existing docstring              [ ]don't fail if no typing (annotation)  [X]recusrive subscipt (ex: typing.Dict)  [X]add raise on function                 [X]module attribute                      [ ]module name, extract filename         [X]Dev tools:poetry run pylint --rcfile=.pylintrc ./src/
Package: generateDS
Notice: The source code repository for generateDS is moving to SourceForge.net.
You can find it here:https://sourceforge.net/projects/generateds/To download and clone the repository, please use:
hg clonehttp://hg.code.sf.net/p/generateds/codegeneratedsgenerateDS.py generates Python data structures (for example, class
definitions) from an XML Schema document.  These data structures
represent the elements in an XML document described by the XML
Schema.  It also generates parsers that load an XML document into
those data structures.  In addition, a separate file containing
subclasses (stubs) is optionally generated.  The user can add
methods to the subclasses in order to process the contents of an
XML document.
Package: generate-dummyf
generate-dummyf Python PackageOverviewThe generate-dummyf Python package is a versatile tool for generating dummy files in different formats such as JSON, Excel, DOCX, TXT, and CSV. This package
simplifies the process of creating sample data files for testing, development, and other purposes.FeaturesGenerate dummy data files in Json, Xlsx, Docx, Txt, and Csv formats. Easily specify the file size, the structure (columns and their data type) of files, path for
saving your output file. Generate a file with random data for a wide range of use cases.NOTE:file_sizeis a mandatory argument for each generate_* function whose value should be inbytesand the size of the output file may not be exactly
equal to the user's file_size inputInstallationYou can install the package using pip:pip install generate-dummyfUsageHere's a quick guide on how to use thegenerate-dummyfpackage to generate dummy files:Import the packagefrom generate_dummyf import *Generate a JSON filejson_data = generate_json(file_size=50000)
json_data = generate_json(file_size=50000, column_description={"Contact" : "int", "Name" : "str", "Status": "boolean", "Created_Time": "datetime", "Amount": "float"})
json_data = generate_json(file_size=50000, save_file_path="/home/user-pc/Documents/")Generate an Excel fileexcel_data = generate_excel(file_size=50000)
excel_data = generate_excel(file_size=50000, column_description={"Contact" : "int", "Name" : "str", "Status": "boolean", "Created_Time": "datetime", "Amount": "float"})
excel_data = generate_excel(file_size=50000, save_file_path="/home/user-pc/Documents/")Generate a CSV filecsv_data = generate_csv(file_size=5000)
csv_data = generate_csv(file_size=5000, column_description={"Contact" : "int", "Name" : "str", "Status": "boolean", "Created_Time": "datetime", "Amount": "float"})
csv_data = generate_csv(file_size=50000, save_file_path="/home/user-pc/Documents/")Generate a DOCX filedocx_data = generate_word(file_size=50000)
docx_data = generate_word(file_size=50000, font_size = 30, save_file_path="/home/user-pc/Documents/")Generate a TXT filetext_data = generate_txt(file_size=5000)
txt_data = generate_txt(file_size=50000, save_file_path="/home/user-pc/Documents/")View the generated filesBy default, the generated files will be saved in the downloads directory; however, you can manually specify the path using thesave_file_pathargumentRun the tests (For developers)python -m unittest tests/test_csv.py 
python -m unittest tests/test_excel.py 
python -m unittest tests/test_json.py 
python -m unittest tests/test_txt.py 
python -m unittest tests/test_word.pyContributingContributions to generate-dummyf are welcome! If you'd like to contribute to this project, please follow our contribution guidelines.LicenseThis project is licensed under the MIT License - see the LICENSE file for details.Support and ContactIf you have any questions, issues, or feature requests, please feel free to open an issue.
Package: generate-elan
GENERATE ELANThis package reads all the audio files in the directory and generates an ELAN file for each audio file.InstallingYou can install this package by running the following command from PyPi:pipinstallgenerate-elanHow to useGenerate ELAN files (with.eafextension) from of audio files from a directory:python-mgenerate_elan-dDIRECTORYYou can also specify some options:-dDIRECTORY,--directoryDIRECTORYDirectorycontainingaudiofiles
-eEXTENSION,--extensionEXTENSIONAudioextension
Package: generate-fastapi
Generate FastAPIA code generation tool for FastAPIUsesnymann/fastapi-templateas a
base template.Generates route(s) given an SQL migration file or JSON (seeexamples).$ generate_fastapi --help 
Usage: generate_fastapi [OPTIONS] FILE

Arguments:
  FILE  Path to a SQL upgrade migration or a JSON file  [required]

Options:
  --target-directory TEXT         Path to the target directory  [default: .]
  --project-name TEXT             Your project name fx. 'my_program'
                                  [required]

  --from_repo TEXT
  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.

  --help                          Show this message and exit.
Package: generateGUID
GUID-coreTool to generate GUID using sha256InstallationUse the package managerpipto install GUID-core.pipinstallgenerateGUIDUsageimportgenerateGUIDgenerateGUID.generate_GUID(string)# returns guidfirstname=stringlastname=stringdateOfBirth=stringgender=stringgenerateGUID.generate_GUID2(firstname,lastname,dateOfBirth,gender)# returns guidContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT