Saravanan666/pypi-org huggingface dataset:
Package: colored-traceback
Automatically color Python’s uncaught exception tracebacks.This one’s for anybody who’s ever struggled to read python’s stacktraces on the
terminal. Something about the two-lines-per-frame approach really just makes
them tough to scan visually.Compare this:Traceback (most recent call last):
  File "./workflowy.py", line 525, in <module>
    main()
  File "./workflowy.py", line 37, in main
    projects = cli.load_json(args, input_is_pipe)
  File "./workflowy.py", line 153, in load_json
    return json.load(sys.stdin)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 365, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 383, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decodedTo this:Traceback(mostrecentcalllast):File"./workflowy.py",line525,in<module>main()File"./workflowy.py",line37,inmainprojects=cli.load_json(args,input_is_pipe)File"./workflowy.py",line153,inload_jsonreturnjson.load(sys.stdin)File"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py",line290,inload**kw)File"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py",line338,inloadsreturn_default_decoder.decode(s)File"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py",line365,indecodeobj,end=self.raw_decode(s,idx=_w(s,0).end())File"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py",line383,inraw_decoderaiseValueError("No JSON object could be decoded")ValueError:NoJSONobjectcouldbedecodedInstallationThrough pip:pipinstallcolored-tracebackOr directly:gitclonehttp://www.github.com/staticshock/colored-traceback.pypythonsetup.pyinstallOn Windows, which has no real support for ANSI escape sequences, there’s an
additional dependency oncolorama:pipinstallcoloramaUsageColored Traceback can be executed as a module:python-mcolored_tracebacksomefile.pyColored Traceback also works well within a script or even directly in the
interpreter REPL. Standard usage will color the output, unless it’s being
redirected to a pipe:importcolored_tracebackcolored_traceback.add_hook()If want to retain color even when stderr is being piped, tack on analways=Trueargument:importcolored_tracebackcolored_traceback.add_hook(always=True)There are also a couple of convenience imports, which get the footprint down to
one line:# Same as add_hook()importcolored_traceback.auto# Same as add_hook(always=True)importcolored_traceback.alwaysIt goes without saying that you might want to catchImportError, making the
presence of the package optional:try:importcolored_traceback.autoexceptImportError:pass
Package: colored-with-contactform
colored-with-contactformColored-with-contactformis a theme forpelicanthat I used for my personal blog, I make it public so everyone can benefit from it. I used css3 preprocessorSassto make it easy to customized,  You can change the colors and font and sizes easy.Live previewInstallationThis theme is available atpypi.org, so you can install it with:pip install colored-with-contactformThen update the filepelicanconf.pyin your project:Import the theme by adding the folling line in the begining of the fileimportcolored_with_contactformThen change the Folowing variables:THEME=colored_with_contactform.PATHJINJA_ENVIRONMENT=colored_with_contactform.JINJA_ENVIRONMENTJINJA_FILTERS=colored_with_contactform.JINJA_FILTERSAdd the plugini18n_subsites:PLUGIN_PATHS=['pelican-plugins']PLUGINS=['i18n_subsites']
Package: coloreflection
ColoreflectionA tool with which you can use colors in your Python code to decorate terminal output.Installpipinstallcoloreflectionor,poetryaddcoloreflectionCapabilitiesDark PyCharm themeLight PyCharm themeUsagefromcoloreflectionimportColorC=Color()print(C.border(" Using style for text "))print(C.FG.red("Changing text color"))print(C.BG.green("Changing text background"))print(C.border(C.bold(C.FG.pink("You can"))),"combine",C.BG.blue(C.FG.yellow(f"different colors{C.reverse(' and styles.')}")))
Package: colores
ColoresA simplifier of theColoramaAPI,
and some extra functions.DescriptionColors was originally born inChuy.
But little by little, as I created more terminal applications
I realized that in all of them I had some helper methods related to colorama,
so I decided to separate it to a new package.UsageIs very simple to use this package:fromcoloresimportcolorized_print,colorized_input,CYAN,MAGENTA,YELLOWcolorized_print(colorized_input("Enter a text:"),CYAN)All the functions are defined incolores/core.pyand are well documented.LicenseThis project is licensed under theMIT License
Package: colorex
colorex is a powerful console tool that displays files highlighting some patterns with colorsCopyright (C) 2011  http://www.scopart.frThis program is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation, either version 3 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program.  If not, see http://www.gnu.org/licenses/gpl-3.0.txt.Installation============if you haven't setuptools installed you can just copy the "colorex" script into your path (eg: /usr/local/bin)don't forget to check that colorex is executable.else:python setup.py installUsage=====colorex [options] [file1] [file2] ...Display files or sdtin with pretty colors for matched patterns. if you don't specifyfiles, stdin is used.Options=======--version                         show program's version number and exit--help, -h                        show this help message and exit--blue=BLUE, -b BLUE              display BLUE pattern in blue--red=RED, -r RED                 display RED pattern in red--green=GREEN, -g GREEN           display GREEN pattern in green--yellow=YELLOW, -y YELLOW        display YELLOW pattern in yellow--magenta=MAGENTA, -m MAGENTA     display MAGENTA pattern in magenta--cyan=CYAN, -c CYAN              display CYAN pattern in cyan--bblue=BBLUE, -B BBLUE           display BBLUE pattern in blue background--bred=BRED, -R BRED              display BRED pattern in red background--bgreen=BGREEN, -G BGREEN        display BGREEN pattern in green background--byellow=BYELLOW, -Y BYELLOW     display BYELLOW pattern in yellow background--bmagenta=BMAGENTA, -M BMAGENTA  display BMAGENTA pattern in magenta background--bcyan=BCYAN, -C BCYAN           display BCYAN pattern in cyan background--blink=BLINK, -K BLINK           display BLINK pattern blinking (not widely supported)--bold=BOLD, -D BOLD              display BOLD pattern in bold--undrln=UNDRLN, -u UNDRLN        display UNDRLN pattern underlined--bisounours, -N                  display with random colorsRegular expressions are interpreted, so if you want to match a '*' or a '[' or any element of the regexp grammaryou have to escape it with a backslash.Examples========to display every word "ERROR" in red of foo.txt, type:colorex --red ERROR foo.txtto watch logfile.txt displaying "WARNING" in yellow and "INFO" in green:tail -f logfile.txt | colorex -y WARNING --green INFOexit with CTRL cto display "(" and ")" contained in foo.txt in blue:colorex -b '\(|\)' foo.txtto diplay in red "FATAL" or "ERROR" and strings like [1234] or [4567] with red background, just type:colorex -r 'ERROR|FATAL' -R '\[[0-9]{4}\]'another case:tail -f /var/log/syslog | colorex -G '[0-9]{2}:[0-9]{2}:[0-9]{2}' -b $(hostname) -M '\[[0-9]{1,5}\]' -y root
Package: colorexlib
ColorEx LibraryColorExis a data visualization and summarization library that uses color creatively to represent data, make visualization interactive, and ultimately be a great tool for learning patterns in data. It is meant to be simple, easy, and straight-forward.FeaturesSupportsCSVdata files for input.Generates and outputscolor gridinHTMLformat.Themessupported both in-built and user-defined.Templatessupported both in-built and user-defined.RequirementsPython 3.7+CheetahInstallationInstall using pip (recommended)To begin using theColorExlibrary, we first install it usingpip.(NOTE: You'll need an Internet connection for this one!)$pipinstallcolorexlibLet's Get StartedYour first program!Let's get started with your first python program using theColorExlibrary.Create a new directory on your computer.Copy and pastethe followingcodeinto a new file and save it asfirst_colorex.py, in in your directory.# import modulesfromcolorexlib.coloreximportColorExGrid# set tile grid optionsoptions=dict()options['source']=['attendance.csv','csv']options['title']='Student Attendance'options['subtitle']='Attendance of students per month in 2018'options['theme']='sun.cxt'# create ColorEx object, passing options.colorex_grid=ColorExGrid(options)# create color grid in HTMLcolorex_grid.to_html('attendance.html','template.html')In this repository, download the filesattendance.csvandtemplate.htmlin thefirst_examplesdirectory and move them into the directory you created in step (1).Now you should havethree files (3)in the same directory:first_colorex.py,attendance.csvandtemplate.html.Let's carry on!Now open andrunyour python scriptfirst_colorex.py.If all things go smoothly, a newHTML filecalledattendance.htmlwill be created in the same directory.Open this new HTML file, and you will see a color grid quite similar to the one shown below:Yayyy! So you've completed your first everColorExscript. Pretty simple right?!ExamplesOne of the best ways of learning how to useColorExis by looking at and studying a couple of examples. We've got you covered in this area. In this repo, navigate to theexamplesdirectory. You will notice a few examples that will help you achieve a solid understanding of how things work, along with the required CSV data files, templates, and theme files too.ContributingWe valuecontributionsfrom anyone, especially you! There is always something to be tested, fixed, developed, and documented here. If you're everinterested, please seeContributingto learn how you can get started helping us to develop and improveColorEx!LicenseThis project is licensed underMIT License.SeeLicensefor more information.
Package: colorez
colorezSimple addition of color to the builtin print and input functionsInstallationSimply runpip install colorez. The PyPI package is athttps://pypi.org/project/colorez/Example Usagefromcolorezimportcolor_print,Color,color_inputcolor_print("This is red",color="red")color_print("This is gold",color=178,end="\t")color_print("This is pink",color="#ed0ecc")print(Color("hi",23,["1","2"],color="blue"),Color(0,0,255,color="blue"))print("No color",Color(1,2,3,color="green"),"\t",Color("hello",color="orange"))color_input(">",color="yellow")
Package: colorFinder
Common Colors Finder WebsiteWhy color pick when you can grab the 5 most used colors inside a logo or an image and use them for your design and css!Upload your image or provide an image url and check instantly.UsagefromcolorFinderimportColorFindercolor_finder=ColorFinder(image_url="https://warehouse-camo.ingress.cmh1.psfhosted.org/f10043f97c4efa219b0dca9bab54a6caf620718b/68747470733a2f2f7365637572652e67726176617461722e636f6d2f6176617461722f62306163633463623730383637613663373463306139653465656330356464653f73697a653d3430",num_colors=5)colors_list=color_finder.get_common_colors()print(colors_list)OutputReturns a list of tuples containing the RGB value and color count matching your top num_colors[((113, 113, 113), 17), ((127, 127, 127), 14), ((117, 117, 117), 13), ((105, 105, 105), 12), ((166, 166, 166), 12)]ContributingContributions are welcome! If you find any issues or have suggestions for improvement, please open an issue or submit a pull request onGitHub.LicenseThis project is licensed under the MIT LicenseYou can now copy this code and use it as your README.md file.
Package: colorframe
colorframeA simple package to add a colored frame on pictures.InstallThis code is compatible withPython 3.6+.
Install it in your virtual enrivonment with:pipinstallcolorframeUsageWith this package is installed in the activated enrivonment, it can be called throughpython -m colorframeor through a newly createdcolorframecommand.Detailed usage goes as follows:Usage:colorframe[OPTIONS][PATH]Addacoloredframeonpictures,easily.

Arguments:[PATH]Location,relativeorabsolute,tothefileordirectoryoffilestoaddacoloredborderto.


Options:--verticalINTEGERSize(width)ofthewhiteframetoaddontheverticalimageedges.[default:150]--horizontalINTEGERSize(height)ofthewhiteframetoaddonthehorizontalimageedges.[default:150]--colorTEXTThedesiredcoloroftheaddedborder.ShouldbeakeywordrecognizedbyPillow.[default:white]--log-levelTEXTThebaseconsolelogginglevel.Canbe'debug','info','warning'and'error'.[default:info]--install-completionInstallcompletionforthecurrentshell.--show-completionShowcompletionforthecurrentshell,tocopyitorcustomizetheinstallation.--helpShowthismessageandexit.The script will crawl files, add borders and export the results in a newly createdoutputsfolder.You can otherwise import the high-level object from the package, and use at your convenience:fromcolorframeimportBorderCreatorborder_api=BorderCreator(commandline_pathp="path_to_your_images",vertical_border=150,horizontal_border=100,color="blue")border_api.execute_target()Made with ♥︎ by fsoubeletMIT © 2020 Felix Soubelet
Package: colorfulconsole
color.pyA Python package enable rich text in console outputDemoUsage - Methodscolor.print()to print colorful output
params:color = int: color.test().code | str: 'r', 'g', 'b', 'y', 'c', 'm'weight = str: 'normal', 'bold'bg = str: 'r', 'g', 'b', 'y', 'c', 'm', '1', '0'end = str: [any string]color.test()cheatsheet for color code
params:None
Package: colorful-debug
Colorful DebugAuthor: Nabil El Ouaamari (nabil.elouaamari.dev@gmail.com)DescriptionColorful Debug is a Python module that provides colorful and customizable debug print messages with timestamps. It's designed to make debugging your applications more user-friendly and visually appealing.InstallationYou can install Colorful Debug using pip:pipinstallcolorful_debugUsagefromcolorful_debugimportColorfulDebug# As default, timestamp and bold font are enableddebug=ColorfulDebug(show_timestamp=True,all_bold=False)# Print debug messages with different message typesdebug.print(message,msg_type="normal",ov_bold=None)# default behavior, 'ov_bold' overrides all_bolddebug.print("This is a normal message")# color is 'white' by defaultdebug.print("This is a warning message",msg_type="warning")# color is 'yellow' by defaultdebug.print("This is an info message",msg_type="info")# color is 'cyan' by defaultdebug.print("This is an error message",msg_type="error")# color is 'red' by defaultCustomization# Customize color and prefix for different message typesdebug.set_color("warning","yellow")debug.set_prefix("info","[Info]")# Disable timestampdebug.set_show_timestamp(False)# Create a new message typedebug.new_message_type("success",prefix="[Success]",suffix="",color="green",bold=False)# Use the new message typedebug.print("This is a success message",msg_type="success")# Update the new message typedebug.set_color("success","blue")debug.set_prefix("success","[OK]")debug.set_suffix("success"," (OK)")debug.set_bold("success",True)ConfigurationYou can configure Colorful Debug to fit your needs. Customize colors, prefixes, timestamps, and more.LicenseThis project is licensed under the MIT License. See theLICENSEfile for details.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Contact / SupportIf you have any questions, suggestions, or concerns, feel free to contact me atnabil.elouaamari.dev@gmail.com.AcknowledgementsTermcolor
Package: colorful_hieroglyph_theme
To make go:` $ pip installcolorful-hieorglyph-theme`In your conf.py:import osuosl_hieroglyph_theme
html_theme = 'colorful'  ##(must be changed in file)!
html_theme_path = colorful.get_html_theme_path()
html_static_path = ['_static', html_theme_path + '/colorful/static/'] ##(must be changed in file)
slide_theme_options = {'custom_css' : 'colorful.css'}
Package: colorful-print
Color PrintInstallpipinstallcolorful_printUsage 1importsysfromcolorful_printimportcolora=[1,'a',2.3]b=(4,'b',5.6)color.black('Print Black',a,b)color.red('Print Red',a,b)color.green('Print Green',a,b)color.yellow('Print Yellow',a,b)color.blue('Print Blue',a,b)color.magenta('Print Magenta',a,b)color.cyan('Print Cyan',a,b)color.white('Print White',a,b)sys.stdout.write("\n")color.red('Print Red',a,b)color.green('Print Bold Green',a,b,bold=True)color.yellow('Print Bold Italic Yellow',a,b,bold=True,italic=True)color.blue('Print Bold Italic Underline Blue',a,b,bold=True,italic=True,underline=True)color.magenta('Print Bold Italic Underline StrikeOut Magenta',a,b,bold=True,italic=True,underline=True,strike_out=True)color.cyan('Print Bold Italic Underline Reverse Cyan',a,b,bold=True,italic=True,underline=True,reverse=True)color.white('Print Bold Italic Underline StrikeOut Reverse White',a,b,bold=True,italic=True,underline=True,strike_out=True,reverse=True)sys.stdout.write("\n")color.black('Print Black',a,b,sep='\t\t',end='\n\n',flush=True)color.red('Print Red',a,b,sep='\t\t',end='\n\n',flush=True)color.green('Print Green',a,b,sep='\t\t',end='\n\n',flush=True)Usage 2fromcolorful_printimportcolordefcolorful_dispatcher(c:str,msg:str,*args,**kwargs):dispatch=getattr(color,c)dispatch(msg,*args,**kwargs)defred(msg:str,*args,**kwargs):colorful_dispatcher('red',msg,*args,**kwargs)defyellow(msg:str,*args,**kwargs):colorful_dispatcher('yellow',msg,*args,**kwargs)red('123',456,italic=True)yellow('789',123.456,italic=True,bold=True)
Package: colorgb
ColorgbA Python packages to coloring and styling default terminal text.
ColorGB using3-bit and 4-bit colors(8-16 Colors) ANSI Escape Code.Installpip install colorgbList & ExamplesColor & Style list :https://github.com/LyQuid12/colorgb/blob/master/color_list.mdExamples :https://github.com/LyQuid12/colorgb/tree/master/examplesLicense and CopyrightThis project under MIT LicenseMIT License

Copyright (c) 2022-present LyQuid

Permission 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.
Package: color-generation
color-generatorgenerate random good-looking colorsInstallationpip install color-generationusage examplefromcolor_generatorimportColor,generate# simple color-generationcolor=generate()print(color)# <Color (139,242,38)># specific color-generationcolor=generate("colorless")print(color)# <Color (1,70,24)># and various formats depending on your needprint(color.rgb)# (1, 70, 24)print(color.hex)# '#014618'print(color.hls)# (0.3888888888888889, 35.5, -1.0)print(color.hsv)# (0.3888888888888889, 0.9857142857142858, 70)print(color.yiq)# (44.239999999999995, -26.532799999999995, -29.053599999999996)# and you can also transform between formatsColor.from_hex('#014618').rgb# (1, 70, 24)generation modespassed as string togenerate(mode)basicno-monocolorfulcolorlessbasiccan contain the full variety of colorsno-monoattempts to avoid colors like black and whitecolorfulgenerates brighter colorscolorlessgenerates darker colors
Package: colorGenerator
Color GeneratorHandle color calculation in a pythonic way !Feel free to contribute !!!Source CodeInstallationhttps://pypi.org/project/colorGenerator/Install from Pypi :pipinstallcolorGeneratorImport into your code and ready to goimportcolorGeneratorascGFirst step using colorGenerator1 Converting RGB to HEX and HSLimportcolorGeneratorascG# Print some colorred=cG.Color(rgb=(255,0,0))# Representation of red in HEXprint(f"Representation of red in HEX :{red}")# Representation of red in RGBr,g,b=red.__repr__()print(f"Representation of red in RGB :{(r,g,b)}")# References# http://en.wikipedia.org/wiki/HLS_color_space# Representation of red in HSLh,s,l=red.hsl()print(f"Representation of red in HSL :{(h*360,s*100,l*100)}")# Show the color in the Terminalred.show()cG.credits()2 Finding complementary of a color and median of a paletteimportcolorGeneratorascGred=cG.Color(rgb=(255,0,0))blue=cG.Color(rgb=(0,255,0))# Find the complementary of redc_red=red.complementary()print("The complementary of red is : ",end="")c_red.show()# Find the median of red and blue# We create a palettepalette=cG.Palette(colors=[red,blue])med=palette.average_hsl()print("The median of red and blue is : ",end="")med.show()3 Saving and Loading color and palette of colorsimportcolorGeneratorascGred=cG.Color(rgb=(255,0,0))blue=cG.Color(rgb=(0,255,0))# Save red into test3-red.jsonred.save("test3-red.json")# Loading saved colorload_red=cG.Color.load("test3-red.json")print("The saved color is : ",end="")load_red.show()# We create a palettepalette=cG.Palette(colors=[red,blue])# Save the palette test3-palette.jsonpalette.save("test3-palette.json")# Loading saved paletteload_palette=cG.Palette.load("test3-palette.json")print("The saved palette of red and blue is : ",end="")load_palette.show()4 Selecting automatically text color for an imageimportcolorGeneratorascGimportcv2,requestsfromPILimportImage,ImageDraw,ImageFont# Let's Download the background image aturl="https://raw.githubusercontent.com/tttienthinh/colorGenerator/main/test/test4-bg.jpg"image=requests.get(url)open("test4-bg.jpg","wb").write(image.content)# Pick two colors from the imageimg=cv2.imread("test4-bg.jpg")up_left_color=cG.Color(rgb=img[300,480,::-1])down_right_color=cG.Color(rgb=img[1500,2400,::-1])# This is the 2 picked colors from the imageup_left_color.show()down_right_color.show()# Creating the palettepalette=cG.Palette(colors=[up_left_color,down_right_color,])# Extrating the text color as the averagetext_color=palette.average_hsl().invert_luminosity()text_color.show()# opening the image and writing textimg=Image.open("test4-bg.jpg")draw=ImageDraw.Draw(img)font=ImageFont.truetype("test4-font.ttf",335)draw.text((150,320),text="colorGenerator",font=font,fill=text_color.__repr__())img.save("test4-result.jpg")5 Picking color with TkinterimportcolorGeneratorascGfromtkinter.colorchooserimportaskcolor# Ask for a colorcolor=askcolor()print(color[1])r,g,b=color[0]# Creating the colornew_color=cG.Color(rgb=(r,g,b))new_color.show()