Saravanan666/pypi-org huggingface dataset:
Package: print_helper
This project write some useful functions related to print:p, pp, pl, ppl,
p_format, pp_format, pl_format, ppl_format.github:https://github.com/jichen3000/py_print_helperpypi:https://pypi.python.org/pypi/print_helperAuthorColin Jijichen3000@gmail.comHow to installpip install print_helperHow to usep, pp, pl, ppl, p_format, pp_format, pl_format, ppl_format these
functions could been used by any object.p, print with title. This function will print variable name as the
title. code:import print_helper

value = "Minitest"
value.p()

value.p("It is a value:")

value.p(auto_get_title=False)print result:value : 'Minitest'

It is a value: 'Minitest'

'Minitest'pp, pretty print with title. This function will print variable name as
the title in the first line, then pretty print the content of variable
below the title. code:import print_helper

value = "Minitest"
value.pp()

value.pp("It is a value:")

value.pp(auto_get_title=False)print result:value :
'Minitest'

 It is a value:
'Minitest'

'Minitest'pl, print with title and code loction. This function just like pt, but
will print the code location at the first line. And some editors support
to go to the line of that file, such as Sublime2. code:import print_helper

value = "Minitest"
value.pl()

value.pl("It is a value:")

value.pl(auto_get_title=False)print result:File "/Users/Colin/work/minitest/test.py", line 76
value : 'Minitest'


    File "/Users/Colin/work/minitest/test.py", line 77
 It is a value: 'Minitest'


    File "/Users/Colin/work/minitest/test.py", line 78
'Minitest'ppl, pretty print with title and code loction. This function just like
ppt, but will print the code location at the first line. Notice: it will
print a null line firstly. code:import print_helper

value = "Minitest"
value.ppl()

value.ppl("It is a value:")

value.ppl(auto_get_title=False)print result:File "/Users/Colin/work/minitest/test.py", line 76
value :
'Minitest'


    File "/Users/Colin/work/minitest/test.py", line 77
 It is a value:
'Minitest'


    File "/Users/Colin/work/minitest/test.py", line 78
'Minitest'p_format, get the string just like p function prints. I use it in
debugging with log, like: logging.debug(value.p_format()) code:import print_helper

value = "Minitest"
value.p_format()return result:value : 'Minitest'pp_format, get the string just like pp function prints. I use it in
debugging with log, like: logging.debug(value.pp_format()) code:import print_helper

value = "Minitest"
value.pp_format()return result:value :\n'Minitest'pl_format, get the string just like pl function prints. I use it in
debugging with log, like: logging.debug(value.pl_format()) code:import print_helper

value = "Minitest"
value.pl_format()return result:line info: File "/Users/Colin/work/minitest/test.py", line 76, in <module>\nvalue : 'Minitest'ppl_format, get the string just like ppl function prints. I use it in
debugging with log, like: logging.debug(value.ppl_format()) code:import print_helper

value = "Minitest"
value.ppl_format()return result:line info: File "/Users/Colin/work/minitest/test.py", line 76, in <module>\nvalue :\n'Minitest'
Package: print-helpers
Edit a file, create a new file, and clone from Bitbucket in under 2 minutesWhen you’re done, you can delete the content in this README and update the file with details for others getting started with your repository.We recommend that you open this README in another tab as you perform the tasks below. You can [watch our video](https://youtu.be/0ocf7u76WSo) for a full demo of all the steps in this tutorial. Open the video in a new tab to avoid leaving Bitbucket.—## Edit a fileYou’ll start by editing this README file to learn how to edit a file in Bitbucket.ClickSourceon the left side.Click the README.md link from the list of files.Click theEditbutton.Delete the following text:Delete this line to make a change to the README from Bitbucket.After making your change, clickCommitand thenCommitagain in the dialog. The commit page will open and you’ll see the change you just made.Go back to theSourcepage.—## Create a fileNext, you’ll add a new file to this repository.Click theNew filebutton at the top of theSourcepage.Give the file a filename ofcontributors.txt.Enter your name in the empty file space.ClickCommitand thenCommitagain in the dialog.Go back to theSourcepage.Before you move on, go ahead and explore the repository. You’ve already seen theSourcepage, but check out theCommits,Branches, andSettingspages.—## Clone a repositoryUse these steps to clone from SourceTree, our client for using the repository command-line free. Cloning allows you to work on your files locally. If you don’t yet have SourceTree, [download and install first](https://www.sourcetreeapp.com/). If you prefer to clone from the command line, see [Clone a repository](https://confluence.atlassian.com/x/4whODQ).You’ll see the clone button under theSourceheading. Click that button.Now clickCheck out in SourceTree. You may need to create a SourceTree account or log in.When you see theClone Newdialog in SourceTree, update the destination path and name if you’d like to and then clickClone.Open the directory you just created to see your repository’s files.Now that you’re more familiar with your Bitbucket repository, go ahead and add a new file locally. You can [push your change back to Bitbucket with SourceTree](https://confluence.atlassian.com/x/iqyBMg), or you can [add, commit,](https://confluence.atlassian.com/x/8QhODQ) and [push from the command line](https://confluence.atlassian.com/x/NQ0zDQ).
Package: printify
Python pretty printA small printer package to get some better looking print statements.InstallpipinstallprintifyUsagefromprintifyimportprintifyprintify('test',{'title':'Test dictionary'},['test','list'])Output----------*----------test----------*----------{'title':'Test dictionary'}----------*----------['test','list']----------*----------colorprintify("test",color="red")Color listColorCodedefault\033[0mwarning\033[93merror\033[91mblue\033[94msuccess\033[92mheader\033[95mred\033[91mgreen\033[92mcyan\033[96mwhite\033[97myellow\033[93mmagenta\033[95mgrey\033[90mblack\033[90m
Package: printipigeon
printi pigeonPython package to send images to the printi APIInstall using:python3-mpipinstallprintipigeonExample usage:importprintipigeonaspppp.send_from_path("somewhere/cat.jpg")Example sending image from memory to printi.me/gallery :importprintipigeonasppimportiofromPILimportImageimg=Image.open("somewhere/cat.jpg")forxinrange(100):foryinrange(255):img.putpixel((x,y),(y,y,y))f=io.BytesIO()img.save(f,format="PNG")f.seek(0,0)# writing to f has moved the positionpp.send_binary_image_data("art.png",f,"gallery")
Package: printipy
PrintiPyThe Printify API for PythonPrintify's REST API gives your scripts or applications power to manage Printify shops. Create and update products, submit orders, build custom integrations, and so much more!Tested with Python 3.9 - 3.11.InstallpipenvinstallprintipyExampleQuickly connect to the Printify API via PrintiPy. Pass an API token for the Printify account and an optional Shop ID and start automating!fromprintipy.apiimportPrintiPyapi=PrintiPy(api_token='...',shop_id='...')forproductinapi.products.get_products():print(product)APIRead the docshere!Developmentpipenv installBuildpython setup.py sdist bdist_wheelTestspipenv run pytestDocumentationBuild docs usingpipenv run mkdocs buildDeploy docs usingmkdocs gh-deploy. This pushes the generated/sitetogh-pagesbranch on Github.ReleasingSpecific contributors are allowed to create a tag. Upon a tag's push, Actions will deploy to TestPypi and Pypi
Package: printj
printjPrint log info and color text, speak text and helps debugging.InstallationMethod 1: Pip installpipinstallprintjMethod 2pipinstallhttps://github.com/jitesh17/printj/archive/master.zipMethod 3: Git clonegitclonehttps://github.com/jitesh17/printj.gitcdprinjpipinstall-e.UsageScriptimportprintjprintj.red('YOUR TEXT')printj.bold('YOUR TEXT')printj.blue.italic_on_yellow('YOUR TEXT')Output
Package: printjson
Simple python utility for using in shell scripts.FeaturesPrint colorized JSONMinimized and formatted outputOutput elements by keys and indexesCheck JSON for correctnessAutomatically disabling color sequences, when prints to pipeline, file or other non-tty outputExamplestest.json{"arr":[123,"λάμβδα ラムダ lambda",["1","2"]],"test":"test"}Colorized indentedprintjsontest.jsonMinimized monochromeprintjson-omtest.jsonResult:{"test":"test","arr":[123,"λάμβδα ラムダ lambda",["1","2"]]}Print third entry of “arr” array, using “__” as delimiterprintjson-k'arr__2'-d'__'test.jsonResult:["1","2"]
Package: print_json_middleware
JSON prettyprinter WSGI middlewareHandy for viewing JSON payloads which would otherwise be downloaded by your web browser (due to the Content-Type response header being set to an unrecognized type like “application/json”).If a special query parameter (by default “pj”, short for “Print JSON”) is found in the query string, assume the response body contains JSON data which should be “printed” to the response by setting the response Content-Type to “text/plain”.Example usage:http://foo.org/some/json?pjIf the parameter has a positive integer value, prettyprint the JSON (sort the keys and treat the parm value as an indent value).Example usage:http://foo.org/some/json?pj=2Note that the parameter is removed from the request query string before the middleware invokes the wrapped application.SetupIf using Paster, edit your .ini file and add a new filter section:[filter:print_json]
use = egg:print_json_middleware#print_jsonThen find the application section (typically under the header[app:main]) and add:filter-with = print_jsonIf you’d rather use some other parameter name than “pj”, specify it in the[filter:print_json]section:parm = whateverAs an alternative to Paster configuration, you could do the application wrapping in Python code:from print_json_middleware import PrintJsonMiddleware
application = PrintJsonMiddleware(application)If you’d rather use some other parameter name than “pj”, pass it as a second argument:application = PrintJsonMiddleware(application, "whatever")
Package: printkit
Printkit - Make your outputs look greatPrintkit is an easy to use python package which contains various tools that enable you to have a distinct and good looking outputs.Features:Change Text ColorsChange Background ColorsStill working on making the program better with additional features. :blush:InstallationInstall and update usingpippipinstallprintkitHow to use printkitImportsfromprintkitimport*Usagecprint.[colorname]([string])#change text colorbgcolor.[colorname]([string])#change background color#custom optionscprint.custom([string],color=[ansicolorcode])bgcolor.custom(color=[ansicolorcode])Miscellaneous Methodsimportprintkit#To get printkit versionprintkit.version()#To get the available colornamesprintkit.colors()For changing output colorCode#To print 'Success' in green text colorcprint.green('Success')OutputFor changing background color of terminal/consoleCode#Change the background color to cyanbgcolor.cyan()#Print with black textcprint.black('Hello World')#Make the background color to defaultbgcolor.default()OutputClickhereto see the available colors
Package: printlist-and-taskkill
Etaskkill Packageprintlistpkg是一个可以打印缩进列表的示例函数,示例代码如下：from example_pkg_zx1 import nestList
alist = ["grace", "angle", "roy", 
            ["anna", "jhon", "richard", ["nio", "lily"]], 
            "bluce"]        
printlistpkg.print_list(alist)
Package: print-loader
Print LoaderTable of ContentsInstallationIntroductionLicenseInstallationpip install print-loaderIntroductionSometimes you want to put an indefinite loader for a set of statements to see
the progress in terminal. This package tries to solve that exact problem.Examplesfromprint_loaderimportprintlimporttimewithprintl("Sleeping"):time.sleep(3)withprintl("Sleeping",update_every=0.1):time.sleep(3)withprintl("Sleeping",update_every=0.1,loading_chars=["-","|"]):time.sleep(3)withopen("large_file.txt","w")asfp,printl("Writing to file"):foriinrange(50000):fp.write(str(i)*30000+"\n")Licenseprint-loaderis distributed under the terms of theMITlicense.
Package: printlog
PrintlogColorize your logs to spot them at a glance.Installpip install printlogUsageLogThe methods in log automatically print.fromprintlogimportloglog.success("It is a success")log.success("It is a success with background",bg=True)log.error("Is is an error")log.error("Is is an error with background",bg=True)Result :Colorfromprintlog.colorimportred,green,yellow,magenta,cyanprint(red("This a red text"))print(red("This a red text with background",bg=True))print(green("This a green text"))print(green("This a green text with background",bg=True))print(yellow("This a yellow text"))print(yellow("This a yellow text with background",bg=True))print(blue("This a blue text"))print(blue("This a blue text with background",bg=True))print(magenta("This a magenta text"))print(magenta("This a magenta text with background",bg=True))print(cyan("This a cyan text"))print(cyan("This a cyan text with background",bg=True))Result :
Package: printm
printmprintm is an open-source Python package providing CUI output like more/less command in Python script.Featuresimple: you can use likeprint.freedom: you can change placeholder and blank, etc.Install$ pip install printmUsagefromprintmimportprintmprintm(output="your output string",placeholder="placeholder string",)LICENCEprintm is licensed under the terms of MIT license.
Package: print-msg
print_msg moduleThis module helps to print status messages in color depending on their content.Installation:Github:$ git clone https://github.com/shvetsovdmitry/print-msg/$ cd print-msg/$ python3 setup.py sdist$ cd dist/$ sudo pip install print_msg-0.9.3.tar.gzpip:$ sudo pip install print-msgUsing:importprint_msgprint_msg(status='%status_code%',msg='%message%',end='%optional%')Status codes:'ok'->[--OK--] %Message%;'error'->[-ERROR-] %Message%;'status'->[STATUS] %Message%;'time'->[-TIME-] Execution time -> %time%;
Package: print-on-steroids
print-on-steroids :weight_lifting_man:A lean and hackable rich logger and drop-in enhanced replacement for the nativeprintfunction.InstallationYou can installprint-on-steroidswithpip:pipinstallprint-on-steroidsorconda:condainstall-cconda-forgeprint-on-steroidsWe use thebetter-exceptionspackage if available to pretty print tracebacks. To installbetter-exceptions, usepip install print-on-steroids[exceptions]instead or runpip install better-exceptionsmanually.FeaturesSupport for logging only on rank zero in distributed setups (e.g. DistributedDataParallel or sharded training in Deep Learning)Gracefully handlestqdmandtqdm.richprogress bars (logs during training do not interrupt the progress bar!)A context manager and decorator for beautiful and enriched exception printingRich meta-information for free like timestamps and originating line of code (turned into a clickable deeplink by VS Code)Easy switching betweendevandpackagemodes when publishing packages to PyPI (cleaner logs without clutter)Usageprint_on_steroids- likeprintbut on steroids!fromprint_on_steroidsimportprint_on_steroidsasprint# Enjoy enhanced print with optional log levels, timestamp, and originating line of codeprint("Enhanced","print!",level="success",print_time=True,print_origin=True)# Logging with multiple processes - avoid terminal clutterprint("Gets printed",rank=0,rank0_only=True)print("Doesn't get printed",rank=1,rank0_only=True)Useloggerfor more advanced use cases:fromprint_on_steroidsimportlogger# Full-fledged logger object out-of-the-boxlogger.log("This","is","cool",level="info")# or give the log level directly:logger.info("This","is","cool")logger.warning("This","is","dangerous")logger.error("This","is","fatal")...# Easy setup for distributed setting:logger.config(rank=RANK,print_rank0_only=True)# Afterwards, the rank is remembered and does not need to be passed agailogger.success("Dataset processing finished!")# <-- this now prints only on rank zero# For cleaner logs when publishing a package, use this:logger.config(mode="package",package_name="MyPackage")All methods gracefully handletqdm- no interrupted progress bars:fromprint_on_steroidsimportlogger,print_on_steroidsasprintfromtqdmimporttqdmforiintqdm(range(42),desc="This works!"):sleep(1)logger.success("Work done:",i)print_on_steroids("Work done:",i)Beautifully formatted Exception and traceback printing:fromprint_on_steroidsimportgraceful_exceptions# As a context manager:withgraceful_exceptions():# Do stuff...# As a decorator:@graceful_exceptions()defdo_stuff():# Do stuff...
Package: printopia
IntroductionThis code provides functions to print colored messages in the console, as well as decorators to print the return values and arguments of a function.UsageFunctionsThe print_colored, print_error, print_log, and print_success functions all take the same arguments:*args: the arguments to be printed.color: the color in which to print the text (default: white).sep: the separator to be used between the arguments (default: " ").end: the character to be used at the end of the printed text (default: "\n").Example usage:print_colored("This text is white.")print_error("This text is red.")print_log("This text is yellow.")print_success("This text is green.")DecoratorsThe print_return and print_return_info decorators can be used to print the return value and/or arguments of a function.Example usage:@print_returndefadd_numbers(x,y):returnx+yadd_numbers(2,3)## Output:# 5            <-     add_numbers@print_return_infodefmultiply_numbers(x,y):returnx*ymultiply_numbers(2,3)## Output:# 6             <-     multiply_numbers(2, 3)Dependenciescolorama="^0.4.6"
Package: print-partial-datasets
print_partial_datasetsCommand-line tool to scan a dataset organised in structured directories and print a table to highlight gaps. This is useful for spotting missing data or broken analyses.
It relies on the wonderfulfsl.utils.filetreetool fromfslpy. For example:Complete datasets
    participant    session    raw_T1    raw_bold    raw_fmap_mag    raw_fmap_ph
───────────────────────────────────────────────────────────────────────────────
            01         01         x           x               x              x
───────────────────────────────────────────────────────────────────────────────
            01         02         x           x               x              x
───────────────────────────────────────────────────────────────────────────────
Partial datasets
    participant    session    raw_T1    raw_bold    raw_fmap_mag    raw_fmap_ph
───────────────────────────────────────────────────────────────────────────────
            04         02                     x               x              x
───────────────────────────────────────────────────────────────────────────────
            07         02         x                           x              x
───────────────────────────────────────────────────────────────────────────────
            10         02         x                           x              x
───────────────────────────────────────────────────────────────────────────────Installationpip installprint-partial-datasetsUsageSpecify your own file tree in a text file as shown in thefsl.utils.filetreedocumentation. This can be as simple as the example below. If your dataset is already organised in a structure such asBIDS, you may be able to use one of the preset trees:sub-{participant}
  ses-{session}
    anat (anat_dir)
      sub-{participant}_ses-{session}_T1w.nii.gz (anat_image)
      sub-{participant}_ses-{session}_T1w_brain.nii.gz (brain_extracted)
    dwi (dwi_dir)
      sub-{participant}_ses-{session}_dwi.nii.gz (dwi_image)You can either call the script from the command line, or programmatically from a python console or script.Command lineprint_partial_datasets-d/data/directory-f/path/to/file.tree-sanat_image brain_extracted dwi_image-vparticipant sessionPythonExample python usage:from print_partial_datasets import print_partial_datasets

datadir = "/data/directory"
filetree = "/path/to/file.tree"
short_name = ["anat_image", "brain_extracted", "dwi_image"]
variables = ["participant", "session"]

print_partial_datasets(datadir, filetree, short_name, variables)This should produce a nice printed summary of your data, with complete datasets followed by partial ones.Free software: Apache Software License 2.0Documentation:https://print-partial-datasets.readthedocs.io.CreditsThis is little more than a user-friendly wrapper around code written by Michiel Cottaar and Paul McCarthy.This package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2021-03-17)First release on PyPI.
Package: printplus
printplusSimple package to print text to terminal with colors and alignmentClasses Available:PrintPlusMethods in the class:text( message : str)Add text to print, can be called multiple times to add text to previous messagered()Adds red color to text added before the call which does not already have colorgreen()Adds green color to text added before the call which does not already have colorblue()Adds blue color to text added before the call which does not already have coloryellow()Adds yellow color to text added before the call which does not already have colorviolet()Adds violet color to text added before the call which does not already have colorbold()Makes all the text added before the call boldhighlight()Highlights all the texts, even those added after the callunderline()Underkines all the texts, even those added after the callblanks( char : chr)Specify with what char to spill the blanks. By default it will be filled by spacesshow()Prints the constructed text and clears all the values storedcenter() and right()Aligns the text as specified, the one thats called latest will be appliedend()Sepcify the end char of text, by default it will be \n , the one thats called latest will be appliedgetColored(message:str,color:str)Returns colored string to use in other methods, the argument color can be one of:- PrintPlus().colors['RED']- PrintPlus().colors['GREEN']- PrintPlus().colors['VIOLET']- PrintPlus().colors['BLUE']- PrintPlus().colors['YELLOW']- PrintPlus().colors['BOLD']- PrintPlus().colors['UNDERLINE']- PrintPlus().colors['HIGHLIGHT']Usage:from printplus import PrintPlus

printer = PrintPlus()

printer.text('Hello').green().text('World!!').red().underline().text(' by printplus').yellow().center().bold().show()Try:pip3 install printplus