Saravanan666/pypi-org huggingface dataset:
Package: tidyhome
tidyhome: a package for accessing CFPB U.S. home mortgage dataWhat is tidyhome?Tidyhome is a package that simplifies the process of retrieving Home Mortgage Disclosure Act (HMDA) data from the Consumer Financial Protection Bureau's (CFPB)HMDA Platform API.The 'HMDA Platform API' refers to several APIs designed to handle various tasks. Of these APIs, tidyhome interacts with the 'Data Browser' API.The goal of tidyhome is to allow users the option to circumnavigate making API requests in their web browser. The freedom to do so may prove useful to data scientists who are tasked with analyzing HMDA data.InstallationInstall tidyhome using:pipinstalltidyhomeHow to use tidyhomeTidyhome contains several classes and functions that are designed to simplify and guide the process of making a valid API request.Below is a brief overview of each class/function and an example of how tidyhome can be used.Classes:Race: an enumerated class containing races recorded as part of a home mortgage application or loan. To be used as input to a function's 'races' parameter to get data for only the races you specify.Action: an enumerated class containing actions taken by lending institutions on the filed application or loan. To be used as input to a function's 'actions' parameter to get data for only the actions you specify.Functions:get_aggregations: returns a pandas DataFrame containing aggregate data of all loans reported.get_loans: returns a pandas DataFrame containing all lending institutions that reported HMDA data.get_institutions: returns a pandas DataFrame containing raw HMDA data on all individual loans reported.Clickherefor more information regarding pandas, a powerful Python data analysis package.Usage example:>>>importtidyhomeasth>>>th.get_loans(2019,"dc",th.Action.INCOMPLETE,[th.Race.BLACK,th.Race.WHITE])The above function call returns a DataFrame containing HMDA data on all individual loans in 2019 in DC where the file was closed for incompleteness and the reported races of applicants/borrowers were black or white.Github Page:https://github.com/summitllc/tidyhome-pyBug Tracking Page:https://github.com/summitllc/tidyhome-py/issues
Package: tidyML
tidyMLMachine learning pipelines are too often built from spaghetti. This package provides utilities to consolidate logic
and minimize duplication, which helps you write maintainable code.ModulesDataMediatorExperimentTrackerNeptuneExperimentTrackerWandbExperimentTrackerHyperparameterOptimizerBayesianOptimizerGaussianProcessRegressorRegressorCollectionEnvironmentPython 3.9 or greaterDevelopment quickstartInstall Python, open a terminal in the tidyML directoryInstall dependencies withpip install -r requirements.txt
Package: tidyms
TidyMS: Tools for working with MS data in metabolomicsTidyMS is a python library for processing Mass Spectrometry data. It aims to
provide easy to use tools to read, process and visualize MS data generated in
metabolomic studies.FeaturesTidyMS provides functionality to:Read raw MS data in the mzML formatSpectrum and chromatogram creation.Powerful and flexible peak picking functions optimized for chromatographic
and spectral data.Feature detection and feature correspondence in LC-MS data.Reading processed data in a variety of formats (XCMS, MZMine2, ...)Data matrix curation using widely accepted guidelines from the metabolomics
community.Interactive visualizations of raw and processed data using Bokeh, or
publication quality plots using seaborn.InstallationThe latest release can be installed from PyPI:pip install tidymsExamplesJupyter notebooks with examples are availablehere.TestsTidyMS uses unit tests for most of its functionality.
The tests can be executed withpython setup.py testDocumentationThe official documentation is available atreadthedocs.CitationIf you find TidyMS useful, we would appreciate citations:Riquelme, G.; Zabalegui, N.; Marchi, P.; Jones, C.M.; Monge, M.E. A Python-Based
Pipeline for Preprocessing LC–MS Data for Untargeted Metabolomics Workflows.Metabolites2020, 10, 416, doi:10.3390/metabo10100416.
Package: tidynamics
A tiny package to compute the dynamics of stochastic and molecular simulations.License:BSD 3-clauseAuthor:Pierre de BuylWebsite:http://lab.pdebuyl.be/tidynamics/tidynamicsperforms the computation of mean-square displacements and correlation functions.accepts as input NumPy arrays storing the positions and velocities of particles.implements the so-called Fast Correlation Algorithm proposed by Kneller and others for thenMOLDYNanalysis program.depends onlyPythonandNumPy.For a quick jump into tidynamics, have a look at the examples.Goals and plans:Minimal dependencies.Serve as a reference implementation for common algorithms that are useful for molecular
and stochastic simulations.Provide later a bit more flexibility to handle cross correlations and many-body systems.InstallationIt is necessary to have Python and NumPy to install and use tidynamics.tidynamics can be installed with pip:pip install --user tidynamicsor with conda (via conda-forge):conda install -c conda-forge tidynamicsIt is also possible to download the source code and execute pip locally.Tests are run with Python 3.7 to 3.11. Python 2 is not supported anymore.  If
you encounter any issue, let me know (see Contact below).CitationWhen using tidynamics in a publication, please cite the following paper:Pierre de Buyl (2018),tidynamics: A tiny package to compute the dynamics of
stochastic and molecular simulations, The Journal of Open Source
Softwarehttps://doi.org/10.21105/joss.00877TestingWe usepytestfor testing:python -m pytestInstalling tidynamics does not install the tests. It is necessary to download tidynamics’
source and to install pytest to run the tests.Contact, support, and contribution informationTo contact the author about tidynamics, you can either write an email toPierre de Buylor use theissue trackerof the GitHub project.
Existing contributors are listed in the file CONTRIBUTORS.Bug reports are welcome. If you consider proposing a feature, please keep in mind the goals
and plans exposed above.
Package: tidynotes
TidynotesA script to generate a notebook in Markdown. The basic setup is designed around how I take digital notes but should be fairly hackable. I use it to make a single file per day that can then be merged into a single hmtl export or an export for each project I'm working on.Inside each note:There's a single level 1 heading that is the name of the note (generally the day it covers),Each project goes under a level 2 heading,Tasks within those projects have a level 3 heading,Level 4 & 5 headings are optional sub-divisions within those tasks,The script is designed to be called from the command-line. It takes a directory passed as a positional argument and a number of flags:-g/--generate_notegenerates a note for the current day,-s/--make_seriesgenerates notes for n days in the future,-i/--initialise_notebookgenerates a blank notebook in the directory,-r/--render_allmerges all markdown files and renders them into a single html output,-c/--cleanruns a simple heading cleanup routine and runs user-set regex over all notes,-e/--extract_projectextracts and renders the notes for a specific project,-a/--extract_allextracts and renders the notes for all projects,The script also allows for a few additional features (mainly during cleanup):Storing a list of all projects / tasks. This is mainly to allow corrections of misspellings etc.A list of regex corrections. The default set:Standardises newlines between tasks,Newline at the end of each file,Homogenises quote marks (e.g. ’ to '),
Package: tidypandas
tidypandasAgrammar of data manipulationforpandasinspired bytidyversetidypandaspython package providesminimal, pythonicAPI for common
data manipulation tasks:tidyframeclass (wrapper over pandas dataframe) provides a
dataframe with simplified index structure (no more resetting indexes
and multi indexes)Consistent ‘verbs’ (select,arrange,distinct, …) as methods
totidyframeclass which mostly return atidyframeUnified interface for summarizing (aggregation) and mutate (assign)
operations across groupsUtilites for pandas dataframes and seriesUses simple python data structures, No esoteric classes, No pipes,
No Non-standard evaluationNo copy data conversion betweentidyframeand pandas dataframesAn accessor to applytidyframeverbs to simple pandas datarames…Exampletidypandascode:df.filter(lambda x: x['col_1'] > x['col_1'].mean(), by = 'col_2')equivalent pandas code:(df.groupby('col2')
   .apply(lambda x: x.loc[x['col_1'] > x['col_1'].mean(), :])
   .reset_index(drop = True)
   )Why usetidypandastidypandasis for you if:youfrequentlywrite data manipulation code using pandasyou prefer to have stay in pandas ecosystem (see accessor)youpreferto remember alimited set of
methodsyou do not want to write (or be surprised by)reset_index,rename_axisoftenyou prefer writing free flowing, expressive code indplyrstyletidypandasrelies on the amazingpandaslibrary and offers a
consistent API with a differentphilosophy.PresentationLearn more about tidypandas
(presentation)InstallationInstall release version from Pypi using pip:pip install tidypandasFor offline installation, use whl/tar file from thereleases
pageon github.Contribution/bug fixes/Issues:Open an issue/suggestion/bugfix on the githubissuespage.Use the master branch fromgithubrepo to submit your
PR.
Package: tidypath
TidypathFor people that have to compute and store a large variety of data and/or figures.Keep your files tidy!Don't spend time creating directories, deciding filenames, saving, loading, etc. Decoratorssavefig&savedatawill do it for you.savedatacomputes output and stores it in the first function call. Future calls reads it from memory. Default LZMA compressionsavefigsaves output figure.Although recommended, it is not needed to start a new project usingtidypath. You can continue using your previous code and applytidypathon new code.savedataExample functionslow_computationin modulepackage.subpackages.module@savedata("x+z")
def slow_computation(x, y, *args, z=1, **kwargs):
    ...
    return resultApply to function (result of any type).Choose the variables to record in the filenames.Optionally, choose file extension and other specifications. Supported:lzma(default),bz2,npz,csv,JSON.Result will be saved atdata/subpackages/module/slow_computation/x-'x'_z-'z'_.lzma('x' = value of x passed toslow_computationduring call)If you want to recompute and overwrite, you can passoverwrite=Truetoslow_computation. The decorator adds the arguments:save,overwrite,keysandfuncname_in_filename.savefig@savefig("kwargs")
def plot_results(*args, **kwargs):
    ...
    return figureSame steps assavedata. Only difference is the output type.Supportsmatplotlibandplotlyand all figure extensions (png,eps, ...) includinghtml(plotly).Decorator adds the same arguments assavedataplusreturn_fig(bool).Adaptable to code modificationsCaching data depends on the specific variables set to store, since they define the filenames. Suppose we want to add a new variablemethodindicating a new method for computing the results, but already computed results are still useful. We canModify the variables to record in thesavedatadecorator:@savedata("x+z")     =>    @savedata("x+z+method")Assignmethod='original'to all existing pre-computed files:add_arg(slow_computation, method='original')Now access is granted for the already computed data, and data corresponding to new methods will be stored in separate files.Use the functionsadd_arg,modify_arg,delete_argto ensure cached data is loaded after modifying function arguments.ExampleDefining functionsCalling functions & modifying argsDocsGithub pagesInstallpip install tidypath
Package: tidy-project
:rocket: This is Tidy Project1. setuptools.setup参数含义name - 项目的名称version - 项目的版本。需要注意的是，PyPI上只允许一个版本存在，如果后续代码有了任何更改，再次上传需要增加版本号author和author_email - 项目作者的名字和邮件description - 项目的简短描述long_description - 项目的详细描述，会显示在PyPI的项目描述页面。上面的例子里直接用了README.md中的内容做详细描述long_description_content_type - 用于指定long_description的markup类型，上面的例子是markdownurl - 项目主页的URL，一般给出代码仓库的链接packages - 指定最终发布的包中要包含的packages。上面的例子中find_packages() 会自动发现项目根目录下所有的packages，当然也可以手动指定package的名字install_requires - 项目依赖哪些库，这些库会在pip install的时候自动安装entry_points - 上面的例子中entry_points用来自动创建脚本，上面的例子在pip - install安装成功后会创建douyin_image这个命令，直接可以在命令行运行，很方便classifiers - 其他信息，一般包括项目支持的Python版本，License，支持的操作系统。上面的例子中，我们指定项目只能在Python 3上运行，使用MIT License，不依赖操作系统。关于classifiers的完整列表，可参考https://pypi.org/classifiers/。2. 打包项目pip install setuptools
pip install wheel
python setup.py sdist bdist_wheel上面的命令会在dist/目录下生成一个tar.gz的源码包和一个.whl的Wheel包。dist/douyin_image-0.1-py3-none-any.whldouyin_image-0.1.tar.gz打包完之后，我们可以从本地安装库，来验证我们的项目能否被成功安装，如下pip3 install dist/douyin_image-0.1-py3-none-any.whl3. 创建Pypi账户上传项目到PyPI我们使用twine上传项目，先安装twinepip3 install twine安装完之后，运行下面的命令将库上传twine upload dist/*上传完成后，我们的项目就成功地发布到PyPI了
Package: tidypyspark
tidypysparkMakepysparksingdplyrInspired bysparklyr,tidyversetidypysparkpython package providesminimal, pythonicwrapper around
pyspark sql dataframe API intidyverseflavor.With accessorts, applytidypysparkmethods where both input and
output are mostly pyspark dataframes.Consistent 'verbs' (select,arrange,distinct, ...)Also seetidypandas: Agrammar of data manipulationforpandasinspired bytidyverseUsage# assumed that pyspark session is active
from tidypyspark import ts 
import pyspark.sql.functions as F
from tidypyspark.datasets import get_penguins_path

pen = spark.read.csv(get_penguins_path(), header = True, inferSchema = True)

(pen.ts.add_row_number(order_by = 'bill_depth_mm')
    .ts.mutate({'cumsum_bl': F.sum('bill_length_mm')},
               by = 'species',
               order_by = ['bill_depth_mm', 'row_number'],
               range_between = (-float('inf'), 0)
               )
    .ts.select(['species', 'bill_length_mm', 'cumsum_bl'])
    ).show(5)
    
+--------------+-------+-------------+------------------+
|bill_length_mm|species|bill_depth_mm|         cumsum_bl|
+--------------+-------+-------------+------------------+
|          32.1| Adelie|         15.5|              32.1|
|          35.2| Adelie|         15.9| 67.30000000000001|
|          37.7| Adelie|           16|105.00000000000001|
|          36.2| Adelie|         16.1|141.20000000000002|
|          33.1| Adelie|         16.1|             174.3|
+--------------+-------+-------------+------------------+Exampletidypysparkcode:(pen.ts.select(['species','bill_length_mm','bill_depth_mm', 'flipper_length_mm'])
 .ts.pivot_longer('species', include = False)
 ).show(5)
 
 +-------+-----------------+-----+
|species|             name|value|
+-------+-----------------+-----+
| Adelie|   bill_length_mm| 39.1|
| Adelie|    bill_depth_mm| 18.7|
| Adelie|flipper_length_mm|  181|
| Adelie|   bill_length_mm| 39.5|
| Adelie|    bill_depth_mm| 17.4|
+-------+-----------------+-----+equivalent pyspark code:stack_expr = '''
             stack(3, 'bill_length_mm', `bill_length_mm`,
                      'bill_depth_mm', `bill_depth_mm`,
                      'flipper_length_mm', `flipper_length_mm`)
                      as (`name`, `value`)
             '''
pen.select('species', F.expr(stack_expr)).show(5)tidypysparkrelies on the amazingpysparklibrary and spark
ecosystem.Installationpip install tidypysparkOn github:https://github.com/talegari/tidypysparkOn pypi:https://pypi.org/project/tidypyspark
Package: tidytcells
tidytcellstidytcellsis a lightweight python package that cleans and standardizes T cell receptor (TR) and Major Histocompatibility (MH) data to beIMGT-compliant.
The main purpose of the package is to solve the problem of parsing and collating together non-standardized TR datasets.
It is often difficult to compile TR data from multiple sources because the formats/nomenclature of how each dataset encodes TR and MH gene names are slightly different, or even inconsistent within themselves.tidytcellscan ameliorate this issue by auto-correcting and auto-standardizing your data!
Check out thedocumentation page.InstallationViaPyPI(recommended)tidytcellscan be installed usingpip:$pipinstalltidytcellsFromsourceThe source code for the package is availableon Github.
To install from source, clone the git repository, and run:$pipinstall.from inside the project root directory.Useful linksDocumentationPyPI page
Package: tidytext
tidytext-pyHandy text processing in python, using pandas DataFrames.This library is a python port of theR package tidytext.Installpip install tidytextThis will also install the nltk package.
However, you will need to download additional resources to use tidytext, using the code below.nltk.download("punkt")Functions implementedbind_tfidfunnest_tokensExamplesunnest_tokensimportpandasaspdpd.set_option("display.max_rows",6)zen="""The Zen of Python, by Tim PetersBeautiful is better than ugly.Explicit is better than implicit.Simple is better than complex.Complex is better than complicated.Flat is better than nested.Sparse is better than dense.Readability counts.Special cases aren't special enough to break the rules.Although practicality beats purity.Errors should never pass silently.Unless explicitly silenced.In the face of ambiguity, refuse the temptation to guess.There should be one-- and preferably only one --obvious way to do it.Although that way may not be obvious at first unless you're Dutch.Now is better than never.Although never is often better than *right* now.If the implementation is hard to explain, it's a bad idea.If the implementation is easy to explain, it may be a good idea.Namespaces are one honking great idea -- let's do more of those!"""zen_split=zen.splitlines()df=pd.DataFrame({"zen":zen_split,"line":list(range(len(zen_split)))})dfzenline001The Zen of Python, by Tim Peters122.........19If the implementation is hard to explain, it's a bad idea.1920If the implementation is easy to explain, it may be a good idea.2021Namespaces are one honking great idea -- let's do more of those!2122 rows × 2 columnsfromtidytextimportunnest_tokensunnest_tokens(df,"word","zen")lineword00NaN11the11zen.........2121more2121of2121those145 rows × 2 columnsbind_tf_idffromtidytextimportunnest_tokens,bind_tf_idffromsiubaimport_,count,arrange(df>>unnest_tokens(_.word,_.zen)>>count(_.line,_.word)>>bind_tf_idf(_.word,_.line,_.n)>>arrange(-_.tf_idf))linewordntfidftf_idf379counts10.5000002.9957321.497866389readability10.5000002.9957321.4978665613explicitly10.3333332.9957320.998577.....................9918is10.1250000.6931470.08664311219is10.0909090.6931470.06301312420is10.0769230.6931470.053319140 rows × 6 columns
Package: tidytuesday
tidytuesdayPyDownload TidyTuesday data.  Inspired bytidytuesdayR.UsagefromtidytuesdayimportTidyTuesdaytt=TidyTuesday("2021-04-06")If you do not provide a date (i.e.justTidyTuesday()), then the latest TidyTuesday will be used.  Note that this will not be good for reproducability in the future!You can then access each data set from the data field using the filename, dropping the extension.df=tt.data["forest"]You can also access the readme.print(tt.readme)TODOImplement parsers for rds formatsDocumentation
Package: tidytuesdaypy
TidyTuesdayPyA Python library to download TidyTuesday data, inspired by the{tidytuesdayR}package for R.:warning:This package is currently under developmentGet StartedInstallingThe easiest way to installtidytuesdaypyis viapip:pip install tidytuesdaypyDeep DiveContributingClone this repositorygit clone git@github.com:alwinw/tidytuesdaypy.gitInstall the development versionpip install -v -e .[<extras>](-eneeds pip >= 22.0 for pyproject.toml) orpoetry install --extras "<extras>"Make your changes and commit usingcommitizenand ensurepre-commitis activeWhen ready, bump the version and runpoetry build -v. If deploying, runpoetry publish --build -vAcknowledgementsThis package is heavily inspired by{tidytuesdayR}. It would not be possible withoutR4DSand of coursetidytuesday
Package: tidytwitter
tidytwitterDelete your old tweets and favorites using the Twitter API.tidytwitter tweetsdeletes all of your tweets that are older than --days (default: 60) except
those that you have favorited yourself or have more than --favorite-threshold
favorites (default: 20).tidytwitter favoritesdeletes all of your favorties that are older than --days (default: 60)
except those that are of your own tweets.tidytwitter bothdeletes both tweets and favorites.Seetidytwitter --help,tidytwitter tweets --helpandtidytwitter favorites --helpfor more.The idea to preserve self-favorited tweets is stolen with thanks froma script
by Chris
Albon.Installationpip install tidytwitterCreate a new project in yourTwitter developer
accountand get the key, secret, access
token and access token secret.You can either export those as environment variables:export TIDYTWITTER_API_KEY="your_api_key"
export TIDYTWITTER_API_SECRET="your_api_secret"
export TIDYTWITTER_ACCESS_TOKEN="your_access_token"
export TIDYTWITTER_ACCESS_TOKEN_SECRET="your_access_token_secret"or pass them as command line options (--api-key, etc., see--help).Shell completionYou can optionally enable shell completion by running the appropriate command
for your shell:eval"$(_TIDYTWITTER_COMPLETE=bash_sourcetidytwitter)">>~/.bashrc# basheval"$(_TIDYTWITTER_COMPLETE=zsh_sourcetidytwitter)">>~/.zshrc# zsh_TIDYTWITTER_COMPLETE=fish_sourcefoo-bar>~/.config/fish/completions/tidytwitter.fish# fishAutomation with GithubSeetidytwitter-cron.
Package: tidy-twitter
Welcome to tidy-twittertidy-twitter is a small program that is intended for those who want to clean up their Twitter history. A working Python3
environment and Twitter OAuth keys are required to run this program.Installation and quickstartIt's recommended to install tidy-twitter withpipx. Install pipx first.After pipx is installed run:pipx install tidy-twitter
  tidy_twitter --helpTwitter OAuth keysTwitter OAuth keys can be obtained fromhttps://developer.twitter.com/Export the following keys before running this program:TWITTER_CONSUMER_KEYTWITTER_CONSUMER_SECRETTWITTER_ACCESS_TOKENTWITTER_ACCESS_TOKEN_SECRETDeveloper quick startThis program requires exporting Twitter OAuth keys to environment before use.Use of virtual env is strongly recommended to not mess up your other / default Python environments.Clone this repoInstall Python 3.9 with pyenvRun the following to install all required dependencies and the program:poetry installRun:poetry run tidy_twitter --helpUsageFor help run$ tidy-twitter --help
    Usage: tidy-twitter [OPTIONS]
    
      This program deletes all tweets for user handle older than given number of
      days.
    
      It requires following Twitter OAuth keys to be exported to the environment
      before use:
    
      TWITTER_CONSUMER_KEY
    
      TWITTER_CONSUMER_SECRET
    
      TWITTER_ACCESS_TOKEN
    
      TWITTER_ACCESS_TOKEN_SECRET
    
    Options:
      -s, --screen_name TEXT  Twitter screen name (@username).  [required]
      -d, --days INTEGER      Number of days, defaults to 30 days.
      --version               Show the version and exit.
      --help                  Show this message and exit.This program takes a few command line arguments in addition to fore-mentioned Twitter OAuth keys (as environment
variables):--screen_name / -s- Twitter user handle (@username) that tweets will be deleted for. Write it herewithout an @.--days / -d- All tweets older than this number of days will be deleted. Default is 30 (days).--version- displays program version--help- displays help messageLicenseThis software is released under MIT License. See LICENSE.txt for details.Bugs, issues, feature requestsFeel free to use this repo's Issue Tracker If you have any bugs to report or any requests / issues.Thanks,Sven