Saravanan666/pypi-org huggingface dataset:
Package: ansiconverter
🌀 ANSI ConverterConvert any colour to theANSI formatto write in colours in your terminal.⌨️ InstallationRun this command to installansiconverter:python-mpipinstall-UansiconverterTo install fordevelopment:gitclonehttps://github.com/thomassamoth/ansiconverter.gitcdansiconverter

pipinstall-e.[dev]TestsTo ensure the installation of this package has been successful, you can run thetests.Make sure you have installed thepytestmodule. Otherwise, run:pipinstallpytestAfter you downloaded the code and installed the package, run the tests by executing:python-mpytesttest/💻 UsageConverter module⚠️WarningSome colour combinations between background and foreground are incompatible. The result can be slightly different from what is expected.Convert fromRGBcolour toANSI# How to print a green text on a white backgroundfromansiconverterimportRGBtoANSIprint(RGBtoANSI(text='Green text on a white background',foregound=[0,255,0],background=[255,255,255]))Result:Result:Convert fromhexadecimaltoANSI# How to print a yellow text on a navy blue background, with hexadecimal values.fromansiconverterimportHEXtoANSIprint(HEXtoANSI('Some yellow text on blue background','#fdf31f','000080'))Result:Result:ℹ️NoteAnother little tool has been added to convert RGB to hexadecimal and vice versa. It can't be used to write in color in the terminal but could be useful for other applications.Convert fromhexadecimaltoRGBfromansiconverterimportHEXtoRGBprint(HEXtoRGB("#0b38c1"))Result:[11,59,193]Convert fromRGBtohexadecimalfromansiconverterimportRGBtoHEXprint(RGBtoHEX([11,59,193]))Result:"#0b3bc1"🎨 Styles moduleSeveral text styles are available as well. You can evencombine them with coloursStyleMethodboldbolditalicitalicfaintedfaintunderlinedunderlinebold & underlinedbold_and_underlinestrikethroughedstrikethroughreversed(colours inverted)reversefromansiconverterimportboldprint(bold("Some text in bold"))Replace.boldin the example with any method above to get the desired style.Combination of colours and styles⚗️ It is possible to combine text styles with colours by doing so:fromansiconverterimportHEXtoANSI,boldprint(bold(HEXtoANSI('A yellow text in bold','#f6cf6c')))Result:N.B: the order between the style and the text format isn't important and you can switch them.print(bold(HEXtoANSI('A yellow text in bold','#f6cf6c')))will work the same asprint(HEXtoANSI(bold('A yellow text in bold'),'#f6cf6c'))NoteThis structure of this repository is based on a talk byMark Smith, which is availablehere, and itslinked repositoryLicenseThis repository is licensed under the MIT license. See theLICENSEfile for more information.
Package: ansictrls
AnsiCtrlsLibrary for working with ANSI Escape Sequences in a terminal.For more information see thedocumentation.History2019-06-25 (0.3.0)Add function clear()2019-05-12 (0.2.0)HTML-style colors can now use the short form,
i. e. #F00 instead of #FF00002019-01-11 (0.1.1)Bugfix: sgr_print() was broken2018-12-14 (0.1.0)First public release
Package: ansideps
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included inall copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, 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 INTHE SOFTWARE.Description: ========ansideps========.. image:: https://badge.fury.io/py/ansideps.png:target: http://badge.fury.io/py/ansideps.. image:: https://travis-ci.org/dhutty/ansideps.png?branch=master:target: https://travis-ci.org/dhutty/ansideps.. image:: https://pypip.in/d/ansideps/badge.png:target: https://crate.io/packages/ansideps?version=latestResolve Ansible role relationships.* use `--help` for usage instructions.Features--------* takes one or more role names, creates a graph of the relationships between the roles in the Ansible roles_path and returns the dependencies (ancestor or descendant)* can also write dot (graphviz) files with the entire graph.Requirements------------- Python >= 2.6 or >= 3.3License-------MIT licensed. See the bundled `LICENSE <https://github.com/dhutty/ansideps/blob/master/LICENSE>`_ file.Keywords: ansible dependencyPlatform: UNKNOWNClassifier: Development Status :: 2 - Pre-AlphaClassifier: Intended Audience :: DevelopersClassifier: License :: OSI Approved :: MIT LicenseClassifier: Natural Language :: EnglishClassifier: Programming Language :: Python :: 2Classifier: Programming Language :: Python :: 2.7Classifier: Programming Language :: Python :: 3Classifier: Programming Language :: Python :: 3.4Classifier: Programming Language :: Python :: Implementation :: CPythonClassifier: Programming Language :: Python :: Implementation :: PyPy
Package: ansidoc
Ansidoc=======A simple tool to generate ansible role's documentation.Usage-----This tool generates a ``README.md`` file using data from multiple sources.* From role content:* role ``defaults/main.yml``* role ``vars/*.yml``* You content.* role ``docs/*.yml``* role ``docs/*.md``Content of your role ``vars/*`` and ``defaults/*`` will also be literally insertedin between ``yaml`` codeblocks. Put nice comments//explanations of variable'spurpose in them!The role ``docs`` directory may contain YAML files that will be parsed. Variableswithin will be use to enrich the resulting ``README.md`` file. All markdown fileswill also be include. Top header must be of level H2. Currently there are nomechanism to defined the inclusion order.Prepare your role^^^^^^^^^^^^^^^^^For best results, create a ``docs/<you-var-file>.yml`` file inside your role and fill thosevariables:.. code-block:: yaml---github_account: <your-role-github-account-username>todos: [] # (optional) list of todos to print in your README filecli^^^.. code-block:: shellusage: ansidoc [-h] [-v] [-V] [-d] [-s TARGET] [-nf] [-e EXCLUDE] [-p] dirpathpositional arguments:dirpath               Either a 'roles_path' wich is a roles' directory or apath to a single role. If 'roles_path' basename is'roles' it will loop over subdirectories assuming eachof them contains a role.optional arguments:-h, --help            show this help message and exit-v, --verbose         increase output verbosity-V, --version         show program's version number and exit-d, --dry-run         dry run, Outputs pure markdown to stdout nothing iswritten to disk-s TARGET             (docs | README.md) Create a symlink in PWD to TARGET.This is useful when used from sphinx as you cannot addrelative entries such as '../*' in the toctree. Ifunspecified, no symlink is created.-nf, --no-ansidoc-footerDo not render the ansidoc project footer.-e EXCLUDE, --exclude EXCLUDEcsv list of role names to exclude. Must matchdirectory name found under specified 'dirpath'-p, --private         Consider role(s) private, e.g.: Skip installation fromgithub part from rendered template.>From sphinx^^^^^^^^^^^You can import in your code and pass arguments similarly as you would do on thecli.For example:.. code-block:: pythonfrom ansidoc import Ansidocansidoc = Ansidoc(dirpath=<path/to/role>, dry_run=True)ansidoc.run()wishlist--------* role dependency grapher* role variables analysis (to audit what is defined where)* create sphinx documentation for this program* make this a sphinx plugin* include mardown files in defined order (alphabetical?, number the files?)* override parts of template with custom one.* search paths to find templates (\ ``.ansidoc/templates/*``\ ?)* multi-role variables* search paths to find config (\ ``.ansidoc/config.yml``\ ?)* exclude list configurable in config fileLicense-------MIT.Similar Projects----------------* `Ansible-DocGen <https://github.com/toast38coza/Ansible-DocGen>`_
Package: ansiescapes
ANSI escape codesfor manipulating the terminal - A Python port ofsindresorhus’sansi-escapesNode.js module.Installation$pipinstallansiescapesUsageimportansiescapesimportsys# Moves the cursor two rows up and to the leftsys.stdout.write(ansiescapes.cursorUp(2)+ansiescapes.cursorLeft)#=> '\u001B[2A\u001B[1000D'APIcursorTo(x, [y])Set the absolute position of the cursor.x0y0is the top left of the screen.cursorMove(x, [y])Set the position of the cursor relative to its current position.cursorUp(count)Move cursor up a specific amount of rows. Default is1.cursorDown(count)Move cursor down a specific amount of rows. Default is1.cursorForward(count)Move cursor forward a specific amount of rows. Default is1.cursorBackward(count)Move cursor backward a specific amount of rows. Default is1.cursorLeftMove cursor to the left side.cursorSavePositionSave cursor position.cursorRestorePositionRestore saved cursor position.cursorGetPositionGet cursor position.cursorNextLineMove cursor to the next line.cursorPrevLineMove cursor to the previous line.cursorHideHide cursor.cursorShowShow cursor.eraseLines(count)Erase from the current cursor position up the specified amount of rows.eraseEndLineErase from the current cursor position to the end of the current line.eraseStartLineErase from the current cursor position to the start of the current line.eraseLineErase the entire current line.eraseDownErase the screen from the current line down to the bottom of the screen.eraseUpErase the screen from the current line up to the top of the screen.eraseScreenErase the screen and move the cursor the top left position.scrollUpScroll display up one line.scrollDownScroll display down one line.clearScreenClear the terminal screen.beepOutput a beeping sound.image(input, [options])Display an image.Currently only supported on iTerm2 >=3Seetermimgfor a higher-level module.inputType:BufferBuffer of an image. Usually read in withopen.Example:importansiescapesimportsysfromcodecsimportopenwithopen('image.png','rb')asimageFile:f=imageFile.read()b=bytearray(f)sys.stdout.write(ansiescapes.image(b))optionswidthheightType:stringnumberThe width and height are given as a number followed by a unit, or the word “auto”.N: N character cells.Npx: N pixels.N%: N percent of the session’s width or height.auto: The image’s inherent size will be used to determine an appropriate dimension.preserveAspectRatioType:booleanDefault:truesetCwd([path])Type:stringDefault:os.getcwd()Inform iTerm2of the current directory to help semantic history and enableCmd-clicking relative paths.LicenseMIT. See theLICENSE filefor more info.
Package: ansifmt
AnsiFmtANSI escape sequences to format strings that are printed to terminal.UsageimportAnsiFmtasfmtstring="Hello, world"# Print the string with underlineprint(fmt.underline(string))# Set it to have red backgroundprint(fmt.bg(string,1))# Color can be either an integer, a hex color string or a tuple of (red, green, blue)print(fmt.fg(string,'#3cde2f'))# Formats can be nested since each function returns a formatted stringprint(fmt.bg(fmt.fg(fmt.bold(string),4),15))Functionsbg(str, color)fg(str, color)blink(str)bold(str)dim(str)double_underline(str)hide(str)invert(str)italic(str)overline(str)strike(str)underline(str)colorcan either be an integer of ANSI color codes, a hex color string, or a tuple of (red, green, blue) values.
Package: ansify
ansifyAwesomeansifyis a Python CLI to create ANSI/ASCII art from images.好玩的终端图片艺术工具工具特点任意图片转成任意字符支持彩色输出使用说明安装工具 ansifypipinstall-UansifyLet's go原图黑白ansify--columns120--no-colorexamples/ycy.jpg彩色ansify--columns120examples/ycy.jpg像素ansify--columns120--grayscalepixelexamples/ycy.jpg自定义字符ansify--columns120--diy-grayscale"你我爱超越"examples/ycy.jpg其他示例ansify--columns80--diy-grayscale" 谁咬我苹果"examples/apple.pngansify--columns80--grayscaleemojiexamples/apple.pngansifyhttps://b-ssl.duitang.com/uploads/item/201712/06/20171206200408_txunr.thumb.700_0.jpeg参数说明$ansify--help
Usage:ansify[OPTIONS]IMAGECLItocreateANSI/ASCIIartfromimages.

Arguments:IMAGEImagefilePATHorURL.[required]Options:-c,--columnsINTEGEROutputcolumns,numberofcharactersperline.[default:252]-o,--outputPATHSaveANSI/ASCIIarttotheOUTPUTfile.-s,--scaleFLOATThelargerthescale,thethinnertheart.[default:0.43]-g,--grayscale[simple|morelevels|pixel|dragon|emoji]Chooseabuilt-ingrayscale.[default:simple]-d,--diy-grayscaleTEXTCustomizeyourgrayscale.-n,--no-colorOutputaANSI/ASCIIartwithoutcolor.[default:False]-r,--reverse-grayscaleReversethegrayscale.[default:False]-R,--reverse-colorReversethecolor.[default:False]-q,--quiteHideoutputinformation.[default:False]-v,--versionPrintstheversionoftheansifypackage.--helpShowthismessageandexit.必要参数：IMAGE: 本地图片文件路径，或者网络图片 URL可选参数：-c, --columns：转化后图片的列数（汉字占两个字符，列数会减半），默认为终端的宽度-o, --output：指定文件名如output.txt后，将输出字符保存到文件-s, --scale：受终端配置（字间距、行高）与字符长宽比的影响，输出图像的长宽比与原图有差别。必要时使用此参数调整长宽比，该值越大，图片越高瘦-g, --grayscale：预设的几种灰阶递增（字符越来越密集）字符，[simple|morelevels|pixel|dragon|emoji]-d, --diy-grayscale：自定义灰阶字符，可以是单字符，多字符最好灰阶递增或递减-n, --no-color：禁用彩色-r, --reverse-grayscale：灰阶字符反转，终端背景为亮色时可以试试看-R, --reverse-color：颜色反转-q, --quite：输出结果中，屏蔽除字符图的其他信息其他：-v, --version：打印工具版本信息--help：打印工具使用说明Release History1.0.0Initial release on PyPI.🛡 LicenseThis project is licensed under the terms of theMITlicense. SeeLICENSEfor more details.📃 Citation@misc{ansify,
  author = {lonsty},
  title = {Awesome `ansify` is a Python CLI to create ANSI/ASCII art from images.},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/lonsty/ansify}}
}CreditsThis project was generated withpython-package-template.
Package: ansilog
#033[1;31m [ANSIlog] 033[0m: Utilities for colorful output, logging, and
# basic terminal control.ansilogis a CLI-focused module that provides colorful output primitives and
basic terminal control.  It currently supports 16-color terminal escape
sequences, along with various ANSI control sequences, attributes, and some
extra terminal control features.  It also offersansilog.StreamHandler, which
can be added to loggers to enable colorized log levels and other colorized
output.ansilogis smart enough to know when it is writing to attyor a
file, and will strip all ANSI sequences before writing to files.Colors and attributes are wrapped in a convenient tag interface, with theansilog.print()function andansilog.StreamHandlerbeing able to convert
these tags to output strings and strip ANSI sequences from them when necessary.The tags help automate the labor of resetting to terminal defaults (and
previous highlights) when switching between highlight modes.  You can include
any number of string-able objects in the tag factory function and they will
be concatenated.ANSIlog respects theNO_COLORenvironment variable in that all color and
format sequences will be ignored if it is set, however cursor escapes and
explicitly constructed escape sequences (alaseq()) will not be suppressed.` from ansilog import *print('Welcometo the ',bright(fg.red('U'),fg.white('S'),fg.blue('A')),'!',sep = '') `For more precise control, you can output the colors and
attributes directly as well, but you must remember to reset afterwards.` from ansilog import *print('Welcometo the ', bright, fg.red, 'U', fg.white, 'S', fg.blue, 'A', reset,'!',sep = '') `### License
ANSIlog is released under a 3 clause BSD license.  See LICENSE for more details.
Package: ansinject
ANS INJECTImage byDarwin LaganzonfromPixabayAndroid Network Security Config InjectorThis tool is simply an easier way to use some collection of other tools which can inject a network security config into an Android APK. Mainly it's sole pupose is making it easier to use the tools in the requirements list below with one line of command.This is useful when you want to test an app that uses HTTPS but you don't have a valid certificate. This tool will allow you to bypass the certificate check.DisclaimerThis tool is provided as is. I am not responsible for any damage caused by this tool. Use it at your own risk.Requirementsadb(Part of the Android SDK)zipalign(Part of the Android SDK)jarsigner(Part of the JDK)keytool(Part of the JDK)apktool(Need to be installed manually)InstallationpipinstallansinjectUsageansinject--helpansinjectinject[input_apk][output_apk]--temp-dir[temp_dir]Basicly the script will do the following:Extract the APKCopy the following network security config onto/res/xml/network_security_config.xml<?xml version="1.0" encoding="utf-8"?><network-security-config><base-configcleartextTrafficPermitted="true"><trust-anchors><certificatessrc="system"/><certificatessrc="user"/></trust-anchors></base-config></network-security-config>Rebuild the APKGenerate a keystore in order to sign the APKSign the APKAlign the outputLicenseThis project is licensed under the MIT License - see theLICENSEfile for detailsAcknowledgementsstackoverflow - Capturing mobile phone traffic on wiresharkgist - unoexperto - How to patch Android app to sniff its HTTPS traffic with self-signed certificateexandroid - Capture all android network traffic
Package: ansipants
ansipantsA Python module and command-line utility for converting .ANS format ANSI art to HTML.Installationpip install ansipantsCommand-line usagepython -m ansipants input.ans > output.htmlFor additional options, runpython -m ansipants --help.The output is a fragment of HTML, in UTF-8 encoding, intended to be inserted into a preformatted text element (<pre>...</pre>). Further styling is up to you - for the proper MS-DOS experience,The Ultimate Oldschool PC Font Pack by VileRis recommended.Python APIExample code:fromansipantsimportANSIDecoderwithopen('input.ans','rt',encoding='cp437')asf:decoder=ANSIDecoder(f)print(decoder.as_html())classansipants.ANSIDecoder(stream=None, palette='vga', width=80, strict=False)Parameters:stream- the ANSI input data as a file-like object. This should be opened for reading in text mode, which means you'll need to specify the appropriate encoding - for ANSI art created for DOS this will most likely becp437.palette- the colour palette to use; either'vga'or'workbench'width- the number of columns the text should wrap atstrict- If True, the decoder will raise anansipants.ANSIDecodeErrorexception on any unrecognised or malformed escape codes; if False, it will skip past them.ANSIDecoder.as_html()Returns the HTML output as a string.ANSIDecoder.as_html_lines()Returns the HTML output as an iterator, yielding one line at a time.AuthorMatt Westcottmatt@west.co.tt
Package: ansiqa
A utility for managing Ansible Roles. Designed to be run inside therolesdirectory.Inspired by [ansigenome](https://github.com/nickjj/ansigenome/)Host Dependsdepends functionality requires on graphviz to be installed.Features### Statsansiqa statsPrints stats about roles. With no arguments,statswill print the following for each:Number of tasksNumber of variables setNumber of defaults setIf a README.* file is presentIf meta/main.yml is presentIf extras/main.yml is present (used by Ansiqa to generate READMEs)### Metaansiqa metaGenerate base meta files for roles from values in the AnsiQA config file.### Extraansiqa extraGenerate base extra files for roles from values in the AnsiQA config file, stored inextra/main.yml. These values are used by AnsiQA to generate READMEs.### Docsansiqa docsGenerate a README by filling a Jinja2 template. The readme template must end in .j2, and can be put in the following places:Specified in the AnsiQA config file, by the root level tokentemplateFound in the current working directory, matching the README.*.j2 globFound in the user’s home directory, matching the README.*.j2 globThis template is fed a role dictionary, which contains the following tokens` 'name': the role name 'path': the role absolute path 'defaults': the defaults provided by the role, formatted as yaml 'files': a list of files by the role 'handlers': a list of handlers provided by the role 'meta': a dict containing the values in meta/main.yml 'tasks': a list of tasks provided by the role 'templates': a list of templates provided by the role 'tests': a boolean value, if the tests directory exists 'vars': the variables provided by the role, formatted as yaml 'extra': a dict containing the values in extra/main.yml `### Dependsansiqa dependsDependency introspection. With no arguments,dependsprints the number of dependencies each role has, the number of times each role is depended on, and the “dependency depth” of each role (how long the longest dependency chain is.)With the–graphflag, ansiqa generates a GraphViz graph to visualize the dependency tree.ConfigurationThe configuration file should be a yaml file named.ansiqaand be located either in the current working directory or in the user’s home directory. It can have the following root level tokens` meta: A dict containing the default values for the meta/main.yml extra: A dict containing the default values for the extra/main.yml template: A string containing the path to the README template, first checking the current working directory for the path, then the home directory, and finally checking it as an absolute path. `
Package: ansiscape
ansiscapeansiscapeis a Python package and CLI tool for creating and interpreting ANSI escape codes.Support fornamed,8-bitand24-bit colours.Create formatted strings withnested sequencesandproperty reversions.Convert embedded escape codes intoexplanatory dictionaries.Write sequences asfully resolved stringsandexplanatory JSON.Full documentation is published atansiscape.readthedocs.io.InstallationansiscaperequiresPython 3.8 or later.pipinstallansiscapeBasic CLI usageansiscapeon the command line will read from stdin and emit a JSON document describing the text and its escape codes.For example:ls--color|ansiscape["ansiscape\nbuild.sh\ncoverage.xml\ndocs\nhtmlcov\nLICENSE\nlint.sh\nMANIFEST.in\nmkdocs.yml\nmypy.ini\nPipfile\nPipfile.lock\npyproject.toml\nREADME.md\nsetup.py\ntest-cli.sh\ntests\ntest.sh"]Full documentation is published atansiscape.readthedocs.io.Basic Python usageansiscapeprovides a library of functions for formatting text.For example, to make text bold:fromansiscapeimportheavyprint(heavy("Hello, world!"))[1mHello, world![22mThese functions can be nested to create complex formatted strings. Specific instructions can also be embedded:fromansiscapeimportInterpretation,Sequence,heavyfromansiscape.enumsimportMetaInterpretation,Weightsequence=Sequence(Interpretation(weight=Weight.HEAVY),"Hello, world!",Interpretation(weight=MetaInterpretation.REVERT),)print(sequence)[1mHello, world![22mFull documentation is published atansiscape.readthedocs.io.👋 Hello!Hello!I'mCariad Ecclestonand I'm an independent/freelance software engineer. If my work has value to you, please considersponsoring.If you ever raise a bug, request a feature or ask a question then mention that you're a sponsor and I'll respond as a priority. Thank you!
Package: ansistrip
AnsistripModule to strip ANSI Escape codes from a string.InstallationInstall with pippip3 install -U ansistripUsageIn [1]: import ansistrip

In [2]: text =  "\x1b[1m\x1b[38;5;10mtest\x1b0m"

In [3]: ansistrip.ansi_strip(text)

Out[3]: 'test'