Saravanan666/pypi-org huggingface dataset:
Package: read-roi
read-roiRead ROI files .zip or .roi generated with ImageJ. Code is largely inspired from :http://rsb.info.nih.gov/ij/developer/source/ij/io/RoiDecoder.java.htmlFunctionsfromread_roiimportread_roi_filefromread_roiimportread_roi_ziproi=read_roi_file(roi_file_path)# orrois=read_roi_zip(roi_zip_path)NoteSome format specifications are not implemented. SeeRoiDecoder.javafor details.Most of "normal" ROI files should work.Feel free to hack it and send me modifications.RequirementsPython 3.5 and above.Installpip install read-roiOr you can use Anaconda andconda-forge:conda config --add channels conda-forge
conda install read-roiLicenseUnder BSD license. SeeLICENSE.AuthorsHadrien Maryhadrien.mary@gmail.comRelease a new versionRun tests:pytest -v read_roi/.Installrever:conda install -y rever.Run check:rever check.Bump and release new version:rever VERSION_NUMBER.
Package: readset.i18n
This package provides a Normalizer for Chinese character.
Convert from Chinese character string to Chinese Pinyin string,
that is human-readable ASCII character format.It is aimed at Plone, however this package should work with plain Zope systems.FeaturesCan be bullet pointsExamplesThis add-on can be seen in action at the following sites:
- Is there a page on the internet where everybody can see the features?DocumentationFull documentation for end users can be found in the “docs” folder, and is also available online athttp://docs.plone.org/foo/barTranslationsThis product has been translated intoKlingon (thanks, K’Plai)InstallationInstall readset.i18n by adding it to your buildout:[buildout]

...

eggs =
    readset.i18nand then runningbin/buildoutContributeIssue Tracker:https://github.com/collective/readset.i18n/issuesSource Code:https://github.com/collective/readset.i18nDocumentation:https://docs.plone.org/foo/barSupportIf you are having issues, please let us know.
We have a mailing list located at:project@example.comLicenseThe project is licensed under the GPLv2.ContributorsJian Aijun,jianaijun@gmail.comChangelog1.0 (2018-08-24)PEP8/PyFlakesRemoved no longer needed utility from configure.zcml.Added more tests.Use the @implementer class decorator instead of implements.The implements API is deprecated, and will not work in Python3.Replace the pinyin with the python-slugify.1.0.dev0 (2012-10-28)Initial release
Package: readsltext
readsltext by suizokukan (suizokukan AT orange DOT fr)Note : this Python3 project can’t be used with python2.project’s purpose(Python3/GPLv3) modules to read text files with lines split on several lines.installation$pip3 install readsltextmoresee README.md file (“how to use” section)
seehttps://github.com/suizokukan/readsltext
Package: read-source
Read Python3 Source File With Correct Encodingaccording tohttps://www.python.org/dev/peps/pep-0263/,
python3 source file encoding are default to beutf-8.Butopen()'s encoding will begbkon windows,
So don't useopenwithout encoding to read a python3 source file.example:fromread_sourceimportget_encoding,readprint(get_encoding('tests/source/gb18030/dash-star-dash.py'))# gb18030withread('tests/source/gb18030/dash-star-dash.py')asf:print(f.read())# -*- coding: gb18030 -*-
Package: readsql
readsqlConvert SQL to most human readable format. For the time being it upper cases SQL keywords, it might prettify of even suggest improvements of SQL code in the future. It converts SQL code and even SQL-strings in programming languages (only Python at the moment).So if we writeselectsushi,avg(price)fromtokyowhereocean='pacific'groupbysushireadsql will help us read it asSELECTsushi,AVG(price)FROMtokyoWHEREocean='pacific'GROUPBYsushiInstallationpip install readsqlUsageFormat SQL code provided in command linereadsql <SQL_STRING> -sFormat an SQL file or folderas in a folder, it will look for files ending with .sql or .pyreadsql <FILE_OR_FOLDER_PATH>It supports multiple strings and files or folders as wellreadsql<SQL_STRING1><SQL_STRING2>-sIn Python files it looks forquerystrings and formats themreadsql<FILE_OR_FOLDER_PATH1><FILE_OR_FOLDER_PATH2>We can look for different strings in Python files with a-pyargumentsreadsql<FILE_OR_FOLDER_PATH>-py<PY_VAR1><PY_VAR2>Usage examplesreadsql 'select sushi from tokyo' -scommand returnsSELECT sushi FROM tokyoa.readsql sql_example.sqlcommand, whilesql_example.sqlis a SQL file with code as below,selectmax(height),avg(mass),min(age)fromjunglegroupbyforestwhereanimal=elephant;replaces the file with this codeSELECTMAX(height),AVG(mass),MIN(age)FROMjungleGROUPBYforestWHEREanimal=elephant;2.c.readsql sql_in_python_variable_example.pycommand, whilesql_in_python_variable_example.pyis a Python file with code as below,defget_query():limit=6sql=f"SELEct speed from world where animal='dolphin' limit{limit}"returnsqlreplaces the file with this codedefget_query():limit=6sql=f"SELECT speed FROM world WHERE animal='dolphin' LIMIT{limit}"returnsql2.c.readsql sql_in_python_variable_example.py -py sqlcommand, whilesql_in_python_variable_example.pyis a Python file with code as below,defget_query():limit=6sql=f"SELEct speed from world where animal='dolphin' limit{limit}"returnsqlreplaces the file with this codedefget_query():limit=6sql=f"SELECT speed FROM world WHERE animal='dolphin' LIMIT{limit}"returnsql2.d.readsql tests -ncommand outputs all of the formated SQL code intestsfolder, files are not replaced by the formatted version (-nargument stand for not-replace)Add a pre-commit hookHow to add apre-commithook of readsql?repos:-repo:https://github.com/AzisK/readsqlrev:0.0.5-alpha# Replace by any tag/version: https://github.com/azisk/readsql/tagshooks:-id:readsqlDevelopmentHaving the repo cloned dig intopython -m readsql "select sushi from tokyo" -stakes the"select sushi from tokyo"string as input and outputs it formattedpython -m readsql tests/sql_example.sqlconverts example SQL code to easier readable formatpython -m readsql tests/sql_in_python_example.pyconverts example SQL code in Python (it looks for variablesquery)we can change the SQL variable with-pyoptionpython -m readsql tests/sql_in_python_variable_example.py -py sqlpython -m readsql testsformats all Python and SQL files intestsfolderTestingHavepytestinstalled and runpytest -v(-v stands for verbose)
Package: readstr
readstrProvidesreadstr, a function that can read a lot of different types from strings:fromreadstrimportreadstrimporttypingimportuuidreadstr('1,2,3',typing.Set[int])readstr('foo=3,bar=10',typing.Dict[str,int])readstr('vUfDOuQwRVavn3_QjMxp7Q',uuid.UUID)Useful for reading arguments from command line arg, from environment variables, etc.ExtensiblefromdataclassesimportdataclassfromtypingimportListfromreadstrimportreadstr,reads@dataclassclassPath:path:str@readsdefread_path(str_value:str)->Path:returnPath(str_value)readstr('file://a,file://b',List[Path])
Package: readthedocs-build
WarningThis repo is only used as a configuration parser for readthedocs.org builds,
and it’s unsupported for other uses.InstallInstall with pip:pip install readthedocs-buildLibrary UseExample uses of this library is:https://github.com/rtfd/readthedocs.org/blob/master/readthedocs/doc_builder/config.py#L8-L9https://github.com/rtfd/readthedocs.org/blob/master/readthedocs/projects/tasks.py#L27DevelopmentJust run:pip install -e .This will install the project into your environment, and have it pick up
changes as you edit them in the code.To run the tests:tox
Package: readthedocs-custom-steps
readthedocs-custom-stepsA hack to run custom steps when building documentation on Read the Docs.Important: This module should not be installed outside of a Read the Docs build environment.
It will rename your Python executable and install a substitute. It does not currently provide an
automated way to revert this change.InstallationThis package must be installed only during the Read the Docs build process, for example as an extra
requirement or through an additional requirements file.Example:# .readthedocs.ymlversion:2mkdocs:configuration:"docs/mkdocs.yml"python:version:"3.7"install:-path:"."extra_requirements:["rtd"]How to use this?RtdCS overrides yourpythoninstallation with a Bash script that dispatches the
execution of custom steps upon invokation ofpython -m mkdocsorpython -m sphinx.
The commands to run are either defined inpyproject.tomlor in a file called.readthedocs-custom-steps.yml(deprecated).Example:pyproject.toml.readthedocs-custom-steps.yml[tool.readthedocs-custom-steps]script="""bash .scripts/generate-changelog.sh >docs/changelog.mdpython -m "$@""""steps:
- bash .scripts/generate-changelog.sh >docs/changelog.md
- python -m "$@"Here,$@contains the arguments afterpython -min the Read the Docs build step, for example:mkdocs build --clean --site-dir _site/html --config-file mkdocs.ymlsphinx -T -b html -d _build/doctrees -D language=en . _build/htmlAn infinite recursion of this script invoking itself in the example above is prevented automatically
with theRTD_CUSTOM_ENTRYenvironment variable that is set before your script/steps are executed.ConfigurationIf apyproject.tomlexists and it contains a[tool.readthedocs-custom-steps]section, the configuration
will be read from there. Otherwise, a file called.readthedocs-custom-steps.ymlmust exist and will be
searched for in the following locations:.readthedocs-custom-steps.ymldocs/.readthedocs-custom-steps.ymlRelative to any directories from which requirements files are specified in the.readthedocs.ymlfile
under the$.python.install[*].requirementsconfiguration option.EnvironmentIn addition to passing the original arguments to the custom steps, RtdCS providesPYTHONenvironment variables
as detected from the~/.pyenv/shimsfolder in the RTD build environment. (e.g. if there is a shimpython3.6andpython3.7, there'll bePYTHON,PYTHON36andPYTHON37environment variables, andPYTHONwill point to 3.7).Copyright © 2022 Niklas Rosenstein
Package: readthedocs-sphinx-ext
This module adds extensions that make Sphinx easier to use.
Some of them require Read the Docs features,
others are just code that we ship and enable during builds on Read the Docs.We currently ship:An extension for building docs like Read the Docstemplate-meta- Allows users to specify template overrides in per-page context.ReleasingIncrement the version insetup.pyTag the release in git:git tag $NEW_VERSION.Push the tag to GitHub:git push--tagsorigin mainUpload the package to PyPI:$python-mpipinstall--upgradepipbuildtwine$rm-rfdist/$python-mbuild--sdist--wheel$twineupload--username=__token__--password=$PYPI_TOKENdist/*
Package: readthedocs-sphinx-search
readthedocs-sphinx-searchis aSphinxextension to enablesearch as you typefor docs hosted onRead the Docs.
Try it athttps://readthedocs-sphinx-search.readthedocs.io/en/latest/?rtd_search=testing.Installationpipinstallreadthedocs-sphinx-searchConfigurationAdd this extension in yourconf.pyfile as:extensions=[# ... other extensions here'sphinx_search.extension',]
Package: readthedocs-version-warning-mkdocs-plugin
ReadTheDocs version warning MkDocs plugin"ReadTheDocs version warning MkDocs plugin" is a very basicmkdocs pluginthat replace placeholder text (### VERSION-WARNING-BANNER-PLACEHOLDER ###) in the theme template with warning admonition.Configurationplugins:-readthedocs-version-warning:project_id:"000000"show_on_versions:-latestproject_id- Id of the target project on ReadTheDocs.
From this project will be used the default version to render link to the stable version.show_on_versions- List of versions on which the banner should appear.
Package: readthis
ReadthisReadthis is a command line tool that reads aloud a given text file using the gTTS (Google Text-to-Speech) interface.Usage$readthis[OPTIONS]FILEPositional ArgumentsFILE: The file to read aloud. Use - to read from stdin.Options-h, --help: Show the help message and exit.--lang LANG, -l LANG: Choose the language to use for reading. Specify the language using the language code (e.g., fr for French). Defaults to English.--url, -u: fetch an URL instead of a fileInstallation$pipinstallreadthisExamplesRead a text file named sample.txt in English:$readthis--langensample.txtRead from stdin in French:$echo"Bonjour, comment ça va ?"|readthis-lfrFetch and read an article:$readthis-uhttps://example.comLicenseThis project is licensed under theMIT License.
Package: readtime
readtimeCalculates the time some text takes the average human to read, based on Medium'sread time forumula.AlgorithmMedium's Help Center says,Read time is based on the average reading speed of an adult (roughly 265 WPM). We take the total word count of a post and translate it into minutes, with an adjustment made for images. For posts in Chinese, Japanese and Korean, it's a function of number of characters (500 characters/min) with an adjustment made for images.Source:https://help.medium.com/hc/en-us/articles/214991667-Read-time(Read Sept 23rd, 2018)Double checking with real articles, the English algorithm is:seconds = num_words / 265 * 60 + img_weight * num_imagesWithimg_weightstarting at12and decreasing one second with each image encountered, with a miniumimg_weightof3seconds.Installationvirtualenv venv
. venv/bin/activate
pip install readtimeOr if you like to live dangerously:sudo pip install readtimeUsageImportreadtimeand pass it some text, HTML, or Markdown to get back the time it takes to read:>>> import readtime
>>> result = readtime.of_text('The shortest blog post in the world!')
>>> result.seconds
2
>>> result.text
u'1 min'The result can also be used as a string:>>> str(readtime.of_text('The shortest blog post in the world!'))
u'1 min read'To calculate read time of Markdown:>>> readtime.of_markdown('This is **Markdown**')
1 min readTo calculate read time of HTML:>>> readtime.of_html('This is <strong>HTML</strong>')
1 min readTo customize the WPM (default 265):>>> result = readtime.of_text('The shortest blog post in the world!', wpm=5)
>>> result.seconds
96
>>> result.text
u'2 min'
>>> result.wpm
5ContributingBefore contributing a pull request, make sure tests pass:virtualenv venv
. venv/bin/activate
pip install tox
toxMany thanks to allcontributors!
Package: readtime-cli
📖 Readtime-CLICLI to calculates the time some text takes the average human to read, based on Medium'sread time forumula.🧮 AlgorithmMedium's Help Center says,Read time is based on the average reading speed of an adult (roughly 265 WPM). We take the total word count of a post and translate it into minutes, with an adjustment made for images. For posts in Chinese, Japanese and Korean, it's a function of number of characters (500 characters/min) with an adjustment made for images.SourceDouble checking with real articles, the English algorithm is:seconds = num_words / 265 * 60 + img_weight * num_imagesWithimg_weightstarting at12and decreasing one second with each image encountered, with a miniumimg_weightof3seconds.RequirementsMacOS or LinuxPython 3.9+Readtime-CLI stands on the shouders of giants:TyperReadtime🛠 InstallationPoetrypoetry add readtime-cliPipvirtualenv venv
. venv/bin/activate
pip install readtime-cli💻 UsageVersionreadtimeversionCalculate Read time Markdown filesreadtimemdFILE_PATH[OPTIONS]Calculate Read time HTML filesreadtimehtmlFILE_PATH[OPTIONS]Calculate Read time Text filesreadtimetextFILE_PATH[OPTIONS]Options for all commands--wpm INTEGER          Word Per Minute  [default: 265]
--language [en|pt-br]  [default: Languages.en]
--help                 Show this message and exit.
Package: read-vme-offline
readvmeofflinewe read asc data files from CAEN - created by gregory (or mc2). Create
histograms, count zeroes etc...Usage - brief version 2022We try to update - with experiment 2021 12 03./bin_readvme cut ~/09_DATA_ANALYSIS/20211203_54fe_nfs_ganil/Evaluation_1_fe40/run0055_211203_203227_1Fe40p3.asc 0 5 15cuts channel 0 from 5sec to 15 secevacuttimesimple_read.eva_cut_timecallsgeneral.readtablecallsgeneral.select_channelscallsgeneral.enhance_by_dtus...callgeneral.detect_zeroesfor timewindow 4.2usoffersUsage -brief version (OLD)# convert asc to h5
read_vme_offline a2df run0022_20190719_070923.asc

# create spectra and table and ORG (text) file
read_vme_offline df2s run0014_20190718_165928.h5 --Emax 15200 -Ethres 5

# MASS CONVERT:
ls -1 *asc | xargs -n 1 -I III  read_vme_offline a2df III
ls -1 *h5 | xargs -n 1 -I III  read_vme_offline df2s  III  --Emax 15200 -Ethres 5Installationyou can use./pipall.pyto get all python modules neededsince this is an exprerimental project, the recommended way to
install ispip3 install -e .then you work on the code in local repo and run it globally in
the same timeremove withpip3 uninstall projectInstallation of ROOTwe start the manual with 6.22:https://root.cern/releases/release-62206/the fileroot_v6.22.06.Linux-ubuntu20-x86_64-gcc9.3.tar.gzcreate/unpack in in~/rootrunsource ~/root/bin/thisroot/shgo to~/root/tutorials/pyrootand runpython3 demo.pysomething works, but there is a lot of problemsConnecting togetherin the terminal, wheresource thisroot.shwas run try to callread_vme_offlineinstalldependent module's detailsrootnumpySeehttp://scikit-hep.org/root_numpy/create and FILL HISTOGRAMS fromnumpy arrayan efficient interface between ROOT and NumPyAt the core of rootnumpyare powerful and flexible functions for
converting ROOT TTrees into structured NumPy arraysconverting NumPy arrays back into ROOT TTreesfunction for creating a random NumPy array by sampling a ROOT
function or histogram:from root_numpy import fill_hist
import numpy as np

# Fill a ROOT histogram from a NumPy array
hist = TH2D('name', 'title', 20, -3, 3, 20, -3, 3)
fill_hist(hist, np.random.randn(1000000, 2))
hist.Draw('LEGO2')pylatexlibrary for creating and compiling LaTeX files or snippetsdependencies maybesudo apt-get install texlive-pictures texlive-science texlive-latex-extra latexmkhttps://github.com/JelteF/PyLaTeXHistoryjm entered 2020 05 26jm access 2021 02 19
Package: readwise
Python Module to use the Readwise APIThis module is a wrapper for the Readwise API.It allows you to easily access your Readwise data in Python.Installationpipinstall-UreadwiseHow to useReadwise APIfromreadwiseimportReadwiseclient=Readwise('token')books=client.get_books(category='articles')forbookinbooks:highlights=client.get_book_highlights(book.id)iflen(highlights)>0:print(book.title)forhighlightinhighlights:print(highlight.text)Readwise Readwise APIfromreadwiseimportReadwiseReaderclient=ReadwiseReader('token')response=client.create_document('https://www.example.com')response.raise_for_status()DocumentationThe latest documentation can be found athttps://rwxd.github.io/pyreadwise/If you've checked out the source code (for example to review a PR), you can build the latest documentation by runningmake serve-docs.
Package: readwise-api
Readwise APIAn unofficial Python client for theReadwise Reader API.Installationpip install readwise-apiUsagePrerequisitesFirst, you have to obtain aReadwise access token.
Then, the token has to be stored, either into an.envfile or an environment variable usingexport READWISE_TOKEN=<your_token>.Python APIimportreadwiseList all documents:readwise.get_documents(location="new")Get a single document by its ID:readwise.get_document_by_id("<document_id>")CLIList all documents:readwiselistnewNaturally, the output can be saved to a JSON file:readwiselistnew>new_documents.jsonGet a single document by its ID:readwiseget<document_id>
Package: readwise-django-rq-scheduler
# Django RQ SchedulerA database backed job scheduler for Django RQ.## RequirementsCurrently, when you pip install Django RQ Scheduler the following packages are also installed.django >= 2django-model-utils >= 2.4django-rq >= 0.9.3 (Django RQ requires RQ >= 0.5.5)rq-scheduler >= 0.6.0pytz >= 2015.7croniter >= 0.3.24Testing also requires:factory_boy >= 2.6.1psycopg2 >= 2.6.1## Usage### InstallUse pip to install:` pip installdjango-rq-scheduler`### Update Django SettingsInsettings.py, adddjango_rqandschedulertoINSTALLED_APPS:INSTALLED_APPS=[...'django_rq','scheduler',...]Configure Django RQ. Seehttps://github.com/ui/django-rq#installation### MigrateThe last step is migrate the database:` ./manage.py migrate `## Creating a JobSeehttp://python-rq.org/docs/jobs/orhttps://github.com/ui/django-rq#job-decoratorAn example:myapp.jobs.py@jobdefcount():return1+1## Scheduling a Job### Scheduled JobSign into the Django Admin site,http://localhost:8000/admin/and locate theDjango RQ Schedulersection.Click on theAddlink for Scheduled Job.Enter a unique name for the job in theNamefield.In theCallablefield, enter a Python dot notation path to the method that defines the job. For the example above, that would bemyapp.jobs.countChoose yourQueue. Side Note: The queues listed are defined in the Django Settings.Enter the time the job is to be executed in theScheduled timefield. Side Note: Enter the date via the browser’s local timezone, the time will automatically convert UTC.Click theSavebutton to schedule the job.### Repeatable JobSign into the Django Admin site,http://localhost:8000/admin/and locate theDjango RQ Schedulersection.Click on theAddlink for Repeatable JobEnter a unique name for the job in theNamefield.In theCallablefield, enter a Python dot notation path to the method that defines the job. For the example above, that would bemyapp.jobs.countChoose yourQueue. Side Note: The queues listed are defined in the Django Settings.Enter the time the first job is to be executed in theScheduled timefield. Side Note: Enter the date via the browser’s local timezone, the time will automatically convert UTC.Enter anInterval, and choose theInterval unit. This will calculate the time before the function is called again.In theRepeatfield, enter the number of time the job is to be ran. Leaving the field empty, means the job will be scheduled to run forever.Click theSavebutton to schedule the job.## Reporting issues or FeaturesPlease report issues via [GitHub Issues](https://github.com/istrategylabs/django-rq-scheduler/issues) .
Package: readwise-pyinstapaper
Instapaperis a tool for saving web pages to read later, e.g. offline on a
mobile device.  PyInstapaper is a Python wrapper for thefull Instapaper API.To use it, in addition to your Instapaper account username and password,
you’ll need to request API credentials from Instapaper.Usagefrompyinstapaper.instapaperimportInstapaper,FolderINSTAPAPER_KEY='MY_INSTAPAPER_API_KEY'INSTAPAPER_SECRET='MY_INSTAPAPER_API_SECRET'INSTAPAPER_LOGIN='me@example.com'INSTAPAPER_PASSWORD='p@ssw0rd'instapaper=Instapaper(INSTAPAPER_KEY,INSTAPAPER_SECRET)instapaper.login(INSTAPAPER_LOGIN,INSTAPAPER_PASSWORD)# Get the 10 latest instapaper bookmarks for the given account and do# something with the article textbookmarks=instapaper.get_bookmarks('starred')forbookmarkinenumerate(bookmarks):do_something(bookmark.get_text())bookmark.archive()# Create a new folderfolder=Folder(instapaper,title='cool stuff')result=folder.add()InstallationTo install PyInstapaper, simply:pipinstallpyinstapaperAdditional infoFree software: MIT LicenseDocumentation:https://pyinstapaper.readthedocs.org.Boilerplate courtesy of cookiecutter:https://github.com/audreyr/cookiecutterThanks toRyan Gallowayfor pointing the way to using the Python oauth2
library for Instapaper’s XAuth implementation, though ideally pyinstapaper
would userequests-oauthlib
Package: readwrite
Quickly read and write file based on their extension.InstallCLI UsageCode UsageSupported ExtensionsInstallpython3 -m pip install --upgrade readwriteCLI Usagereadf[FILE-PATHS...]orreadfile<EXTENSION>[EXTENSION-SPECIFIC-OPTIONS][FILE-PATHS...]Code Usageimportreadwriteasrw# will use pandas.read_csv(...)df=rw.read("data.csv")# will use pandas.to_parquet(...)rw.write(df,"data.parquet")Supported ExtensionsHandlerExtensionsBackendBinarybinPython'sbytesCsvcsvpandasExcelxlsxpandasJsonjsonPython'sjsonParquetparquetpandasPicklepkl,picklePython'spickleTomltomltomlTexttxtPython'sstrYamlyml,yamlPyYAML