Saravanan666/pypi-org huggingface dataset:
Package: tidyarxiv
A simple script to prepare your LaTeX paper for arXiv submission.Descriptiontidyarxivis a tiny script to run before publishing your paper on arXiv.First, you create atidyarxiv.cfgconfiguration file within your project directory.
Then you runtidyarxivon the root of your project directory.tidyarxivfirst copies overonlythe files you specify into a separate
temporarystagingdirectory (first creating a list of all the files
you choose toinclude, and then excluding all the files you choose
toexclude, if any). Itfiltersthose files by removing unwanted
TeX comments from the relevant files (typically .tex and .sty).Next, it builds your project within the staging directory to produce your
final PDF file. Among the present files in the staging directory after
the build, it keeps only the ones you choose to include in your final
arxiv. Finally, it produces a .pdf and .tar.gz ready for submission
toarXiv.InstallingInstall using pip:pip install tidyarxivRequirementsPython 3.10+ConfigCreate atidyarxiv.cfgfile in the root of your project. Seethe example.
You can just copy over the example configuration, which has sane defaults.The file should be a JSON file, which is a dictionary with the following
configuration keys:target: Optional. Specifies the root .tex file of your project
(not including the .tex extension). If skipped, "main" is used.outdir: Optional. Output directory in which to store the generated
.pdf and .tar.gz file. If skipped, "." is used.files: Optional. Array ofglob file patternsnecessary to build your project. By default, all .tex, .sty., and .bib
files are included.files_exclude: Optional. Array ofglob file patternsto exclude from the build process of your project. By default, no files
are excluded.arxiv_files_include: Optional. Array ofglob file patternsofadditionalfiles, in addition tofiles, to include in the tarball after your project
has been built. Note that not all output files of the build process are included by default,
just files listed infiles! By default, this includes all .bbl files.arxiv_files_exclude: Optional. Array ofglob file patternsof files to exclude from the tarball after your project has been built.
By default, this include all .bib files.filter_files: Optional. Array ofglob file patternsof files to filter for TeX comments.
By default, this includes all .tex and .sty files.filter_files_exclude: Optional. Array ofglob file patternsof files to exclude from TeX filtering.
Empty by default.build_command: Optional. A string specifying how to build your project.
Any occurence of %FILE% within the build command will be replaced by
your target .tex filename. The default command is "latexmk -pdf %FILE%".RunningAfter installing and configuring, run in the root of your project directory:tidyarxivFeaturesIncludes only the files you want, and excludes the files you don't want.Removes LaTeX comments (anything after a "%", nothing more complex).Gets rid of .bib files from the final tarball.Configurable.Sane configuration defaults.AuthorsDionysis Zindros and Joachim Neu, Stanford UniversityLicenseGPL v3AlternativesSee also the more complexarxiv-latex-cleaner.
Package: tidybear
TidyBearA tidier approach to pandas.This package was originally a collection of functions, routines, and processes that I found myself often repeating. It has since evolved into a desire to work my way through the tidyverse to reimplement my favorite tidy features in python. This project is not aimed at creating abetterexperience for every pandas task, but rather just a different one that sometimes feels more natural to me. I hope something here can be useful to you.InstallationpipinstalltidybearUsageimportpandasaspdimporttidybearastbVerbs# rename columnstb.rename(data,old="new")# select columnstb.select(data,["col1","col2"])# count number of rows across multiple columnstb.count(data,["col1","col2"])# pivot long to wide or wide to longtb.pivot_longer(data,["val1","val2"],names_to="val_type")tb.pivot_wider(data,names_from="val_type",values_from="value")# slice rowstb.slice_max(data,order_by="val1",n=10)tb.slice_min(data,order_by="val1",n=10,groupby="col1")# join dataframestb.left_join(data1,data2,"colA")#  use "colA" as keytb.right_join(data1,data2,col1A="col1B")#  use "col1A" from left and "col1B" from righttb.cross_join(data1,data2)Groupby and Summarise APIwithtb.GroupBy(df,"group_var")asg:g.n()g.sum("value",name="total_value")g.n_distinct("ids",name="n_unique_ids")summary=g.summarise()TidySelectorseverything()- Select all columnslast_col- Select last columnfirst_col- Select first columncontains(pattern)- Select columns that contain the literal stringmatches(pattern)- Select columns that match the regular expression patternstarts_with(pattern)- Select columns that start with the literal stringends_with- Select all columns that end with the literal srtingnum_range- Select all columns that match a numeric range like x01, x02, x03These can be used in a variety of tidybear verbsfromtidybear.selectorsimportcontains,everything# select all columns that contain "foo"tb.select(data,contains("foo"))# pivot all columns to long formattb.pivot_longer(data,everything())You can also negate these, so if you wanted everything except one columns, you could do:fromtidybear.selectorsimportlast_coltb.select(data,-last_col())Coming Soon (maybe)Method chainingTribbles!
Package: tidybib
tidybibA BibTeX formatter, written in PythonThetidybibcommand takes BibTeX input files and reformats their contents.
There is no configuration; everyone gets the same boring output.InstallationInstalltidybibwith pip:pip install tidybibAlternatively, you can runtidybibusingpipxwithout installation:pipx run tidybibUsageRuntidybibon BibTex filesmain.bibandaux.bib:tidybib main.bib aux.bibAfter the command has run, the contents ofmain.bibandaux.bibhave been
reformatted in place. Copies of the original files are kept undermain.bib.untidyandaux.bib.untidy-- these will be overwritten the next
timetidybibruns on changed input files.You can also runtidybibon standard input:cat main.bib aux.bib | tidybibThis will produce the formatted contents on standard output, and no files are
changed.Pre-commit hookThis repository contains apre-commithook to
automatically runtidybibwhen committing BibTeX files with git. To use the
hook, add this to thereposlist in your.pre-commit-config.yamlfile:-repo:https://github.com/ntessore/tidybibrev:v0.1.3hooks:-id:tidybibAcknowledgementsAll of the hard work of extracting a grammar and parser from the BibTeX source
code was done byaclements/biblib.
Package: tidybot
Tidybot traverses one or more source directories, and
runs all HTML files it finds through the TidyLib
checker, collecting all warnings and errors it
encounters and presenting them nicely in an XHTML
report. It is possible to specify files/directories to
exclude from the checks, warnings/errors to suppress in
the generated report, and ‘key:value’ options to pass
directly to the underlying TidyLib engine. The
generated report can use a custom CSS stylesheet.
Tidybot has both a command-line interface and a GUI.
Package: tidycal-python
tidycal-pythontidycal-pythonis an API wrapper for Tidycal, written in Python.This library uses Oauth2 for authentication.Installingpip install tidycal-pythonUsagefromtidycal.clientimportClientclient=Client(client_id,client_secret,redirect_uri=redirect_uri)To obtain and set an access token, follow this instructions:Get authorization URLurl=client.authorization_url(state=None)# This call generates the url necessary to display the pop-up window to perform oauth authentication# param state(code) is required for direct request for oauth, for local test isn't necessaryGet access token using codetoken=client.get_access_token(code)# "code" is the same response code after login with oauth with the above url.Refresh access token using refresh_tokentoken=client.refresh_access_token(refresh_token)# "refresh_token" is the token refresh in response after login with oauth with the above url.- Get current userclient.get_current_user()- List of Bookingsclient.list_bookings(starts_at=None,ends_at=None,cancelled=None,page=None)# Receives only one parameter at a time# starts_at = DATE, Get bookings starting from a specific date.# ends_at = DATE, Get bookings ending before a specific date.# cancelled = BOOLEAN, Get only cancelled bookings.# page = NUMBER, Page number.- List of Booking Typesclient.list_booking_types()- List of Contactsclient.list_contacts()
Package: tidychef
TidychefTidychef is a python framework to enable “data extraction for humans” via simple python beginner friendly "recipes". It aims at allowing users to easily transform tabulated data sources that use visual relationships (human readable only data) into simple machine readable "tidy data" in a repeatable way.i.e: it allows you to reliably turn something that looks like this:into something that looks like this:Note: image cropped for reasons of practicality.Currently supported input formats arexls,xlsx,odsandcsv. Though users can add additional formats relatively easily and without a codebase change being necessary.Tidychef isdesigned to allow even novice python users or analysts to quickly become productivebut also has an advanced feature set and is designed to be readily and easily extended (adding new source of tabulated data, your own use case specific methods and filters and domain specific validation etc are all possible and documented in detail).In depth training material, examples and technical documentationcan be found here.Installationpip install tidychefAcknowledgementsTidychef is directly inspired by the python packagedatabakercreated byThe Sensible Code Companyin partnership with the United KingdomsOffice For National Statistics.While I likeddatabakerand successfully worked with it on multiple ETL projects over the course of almost a decade, this software should be considered the culmination of that work and the lessons learned from that time.
Package: tidycsv
tidyCSV.pyTired of having pseudo CSV files full of invalid entries ? Me too, this is my solution.It has probably occurred to you as it has to me to get this error
when reading a csv into Python usingpandas.ParserError:Errortokenizingdata.Cerror:Expected8fieldsinline7,saw47This happens because some lines in your
file have more columns than you have
in the header, or simply other kind of inconsistencies such as intermediate blank lines or lines containing random tokens.Fear no more becausetidyCSVprovides a simple and clear interface to access
the semantically coherent chunks of your csv file (if there are any). By default it selects the biggest group found (that is the one containing the most lines).Maybe I'll add an option to select how many columns you expect, in order to filter the groups according to a preconceived criteria.
Eventually I would like this project to become a command line tool as well as having a richer set of features, but It currently serves its purpose so it is not a priority.InstallationThe package has been published to PyPI! You can install it as any other package usingpip(I recommend installing it
within a virtual environment created in a per project basis).pipinstalltidycsvOtherwise you can install the latest development version using:pipinstallgit+https://github.com/gmagannaDevelop/tidyCSV.pyUsageUse the context manager provided at top-level
to read an otherwise unreadable csv as follows:importpandasaspdfromtidycsvimportTidyCSVastidycsvwithtidycsv("your-messy-csv-file.csv")astidy:df=pd.read_csv(tidy)Now you have a dataframe ready to be used instead of an Exception.Bugs and feature requestsIf you find thattidyCSVis not behaving as you would expect it to, please feel free to open an issue. The same goes for feature requests.
Package: tidydata
tidydataInstallation GuideFor a seamless installation of our package, which is tightly coupled with fixed versions of Python and its dependencies, we highly recommend setting up a Python virtual environment and using a version management tool. Our preferred tool for managing Python versions isRye, which offers a straightforward and user-friendly interface for this purpose.PrerequisitesBefore proceeding with the installation, ensure that you have Rye installed on your system. If you haven't installed Rye yet, please visitRye's Installation Guidefor detailed instructions on how to set it up.
Package: tidydev
tidydevtidydev is a Python package that provides a set of tools to make your development life easier. It allows analyzing
a directory of git and non-git directories.InstallationpipinstalltidydevUsageUsage: tidydev <commands>

Available commands:
    help              - show this help
    version           - show version
    analyze <path>    - analyze the given path for git repositories and build files
Package: tidy-dir
tidy-dirtidy-dir is a simple tool designed to help you clean up your directories. It provides an easy and efficient way to manage and organize your files.InstallationYou can install tidy-dir using pip. Run the following command in your terminal:pipinstalltidy-dirUsageUsing tidy-dir is straightforward. After installation, you can run the command followed by the directory you want to tidy up:tidy-dir/path/to/your/directory/For example, if you want to tidy up a directory located at /mydirectory/smt/, you would use:tidy-dir/mydirectory/smt/or current directory:tidy-dir.Configurationtidy-dir requires a .tidy-dir-config.json file in the directory you want to tidy up. This configuration file should follow the schema:{"new_dir":[".fileextension"]}In this schema, replace ".fileextension" with the file extension of the files you want to move to the new directory.
For example:{"docs":[".txt",".pdf",".docx",".doc",".pptx",".ppt",".xlsx",".xls"],"images":[".png",".jpg",".jpeg",".gif",".svg"],"videos":[".mp4",".mov",".avi",".mkv",".wmv"],"music":[".mp3",".wav",".ogg",".flac",".m4a"],"archives":[".zip",".rar",".tar",".gz",".7z",".iso",".xz",".bz2"],}ContributingContributions to tidy-dir are always welcome. If you have any ideas or suggestions, feel free to open an issue or submit a pull request.Licensetidy-dir is licensed under the (MIT license)[./LICENSE]. For more information, see the LICENSE file in our repository.
Package: tidyexc
TidyExc provides an exception base class that makes it easy to raise rich,
helpful exceptions:Rich: Instead of simply storing an error message, TidyExc exceptions
separately store parameters and message templates.  This separation makes it
easier for exception handling code to access information describing the error
and to respond accordingly.Helpful: TidyExc is inspired by the error message conventions promoted by
thetidyverse style guide.  Briefly, these conventions state that an
error message should consist of a brief statement of the problem, followed by
a bullet-point list of relevant contextual information.  The bullet-point
format makes it easy to include lots of detail, without the detail becoming
overwhelming.The following example shows TidyExc in action:>>> from tidyexc import Error
>>> class CheeseShopError(Error):
...     pass
...
>>> err = CheeseShopError(
...         product_name="Red Leicester",
...         num_requested=1,
...         num_available=0,
... )
>>> err.brief = "insufficient inventory to process request"
>>> err.info += "{num_requested} {product_name} requested"
>>> err.blame += "{num_available} available"
>>> raise err
Traceback (most recent call last):
  ...
CheeseShopError: insufficient inventory to process request
• 1 Red Leicester requested
✖ 0 available
Package: tidyexp
tidyexpEasy-to-use, offline-first ML experiment management solution.What does it solve?Other competitors are complex in nature – they have a slight steep learning curve and aren’t often beginner-friendly. Some of them require you to create an account on their platform to get started.tidyexp aims to provide a free, easy-to-use platform for tracking ML experiment metadata.InstallationThroughpip:pip install tidyexpUsageImport tidyexp:importtidyexpCreate a Logger instance with the experiment metadata:log=tidyexp.Logger(experiment_id="1",experiment_dir=".",time_track=["num_epochs"],stats_track=["mse"],overwrite=True,model_type="torch")Track experiment metadata in the training loop:foriinrange(epochs):....time_dict={"num_epochs":i}stats_dict={"mse":curr_loss}log.update(time_dict,stats_dict)Save logs:log.save()Load logs:fromtidyexp.load.load_logimportload_log,load_stats,load_timelogs=load_log("abcd/logs/log_1.hdf5")stats=load_stats("abcd/logs/log_1.hdf5","1")time_stats=load_time("abcd/logs/log_1.hdf5","1")Save model:log.save_model(model)Load model:fromtidyexp.load.load_modelimportload_modelckpt=load_model("abcd/models/final/final_1.pt","torch")Create archive (.zip):log.archive("archive")Upload to Google Drive:log.upload_gdrive("./credentials.json","MyExperiment","archive.zip")Push to local Git repository:log.commit("C:\\Users\\ExampleUser\\Experiments",".\abcd")Licensetidyexp is licensed under the MIT License.
Package: tidyextractors
Overviewtidyextractorsmakes extracting data from supported sources as painless as possible, delivering you a populated Pandas DataFrame in three lines of code.tidyextractorswas inspired byHadley Wickham’s (2014) paperwhich introduces “tidy data” as a conceptual framework for data preparation.For more information, including code examples, API reference, and general documentation, clickHERE.FeaturesExtracts data with minimal effort.Creates readable code that requires minimal explanation.Exports Pandas Dataframes to maximize compatibility with the Python data science ecosystem.Currently Implemented Data SourcesLocal Git RepositoriesTwitter User Data (including Tweets) using the Twitter APIEmails stored in the Mbox file format.InstallingIn the near future,tidyextractorswill be distributed on PyPI and accessible viapip. For now, clone the repository and runpip install-e.in the cloned directory.
Package: tidyfasta
tidyfastaA python program to tidy and sanitise FASTA sequence files.It can be imported as a package or used directly from the command line.If run in non-strict mode (default), any sequence that a breaking issue, such as a non-canonical AA, dangerous characters (any non-alphanumeric character with the exception of_ -), or is just an ID without a sequence, will be ignored.
If run in strict mode then an exception is raised.When run from the command line interface the script will write a file to the same directory as the input file with the prefixtidied-followed by the input file name.
If there is already an output file, then the prefix will betidied-UNIXTIME-where UNIXTIME is the time at which the script was called.If imported, after calling the classProcessFasta, two member variables are available.ProcessFasta.fasta_arrayreturns a minimally validated array of strings, where split lines are combined, excess whitespace is removed, and missing names are added.ProcessFasta.validated_arrayreturns a validated_array of objects, where each object has two variablesidandsequence.
The validated array is checked for non-canonical AA in the sequence and banned characters from the ID.Problems and fixesProblemFix (Strict mode)Sequence without IDID name addedMultiline sequenceOne line per sequenceID without sequenceSequence ignored (Exception raised)Non canonical AASequence ignored (Exception raised)Dangerous characters in IDSequence ignored (Exception raised)Lowercase AAConverts to uppercase AAExcessive WhitespaceRemoves excessive whitespaceInstallpip install tidyfastaUsageCommand line interface$ tidyfasta --input file.txt

$ tidyfasta --input file.txt --strict --single

$ tidyfasta --input file.txt --version

$ tidyfasta --input file.txt --helpScriptfrom tidyfasta.common.process import ProcessFasta

input_file = "sample.txt"

np = ProcessFasta(input_file, strict=True, single=False)

fasta_array = np.fasta_array
print(fasta_array)

for i in np.validated_array:
    print(i.id+"\n")
    print(i.sequence+"\n")

np.write_fasta()
Package: tidygrad
TidyGradTidyGrad |Documentation|DiscordA tidy library for gradient-based optimizationInstallpipinstall-etidygradDevpipinstall-e.[dev]# Local install with dev dependenciesHackHackHack(edit and run the notebooks in the./nbsdirectory).nbdev_preparenbdev_preparewill:Export all norebooks into the./tidygraddirectory.Note: the notebooks themselves have an export cell, so they are
exported every time you run them.Run all notebooks (equivalent of testing)Generate REDME.md from the index.ipynbGenerate the docsHow to use# Later
Package: tidygraphtool
tidygraphtoolA tidy API for network manipulation withgraph-tool libraryinspired bytidygraph. This is an experimental project of mine. Use at your own risk.Usagefromtidygraphtool.allimport*g=play_sbm(n_k=500)(g>>activate("nodes")>>add_property("degree",centrality_degree,mode="total")>>filter_on("degree == 2")>>summary())InstallationInstallation is a bit weird because graph-tool cannot be pip-install. The easiest way to install is to clone this repo, then from the root directory of the package:condaenvcreate--filetidy_gt.yml&&condaactivatetidy_gt&&pipinstalltidygraphtoolThe first and second lines create an environement with all the depenencies fromgt.yml. The third line install tidygraphtool frompypithe package at large within thegtenvironment.INSPIRATIONgraph_tool: tidygraph is thin wrapper of graph_tool (https://graph-tool.skewed.de/).tidygraph: the tidy API that cast graph analysis as two dataframe (https://github.com/thomasp85/tidygraph).dplyr: verbs like API from which tidygraph draw inspiration .MODELS TO INTEGRATEhSBM_Topicmodel: topic modeling based on graph_tool (https://github.com/martingerlach/hSBM_Topicmodel)bipartiteSBM: bipartite community detection based on graph_tool (https://github.com/junipertcy/bipartiteSBM)PROTOYPE FUNCTIONAL INTERFACE#### Currentg=gt_graph(nodes=nodes,edges=edges)g=add_property(g,"node_coreness",node_coreness)g=add_property(g,"pr",centrality_pagerank)g=filter_on(g,"node_coreness > 3")g=activate(g,"edges")g=add_property(g,"edge_bet",centrality_edge_betweenness)g=gt_graph(nodes=nodes,edges=edges)g=(g>>add_property("node_coreness",node_coreness(g))>>add_property("pr",centrality_pagerank(g))>>filter_on("node_coreness > 3 & pr > 10")>>activate("edges")>>add_property("edge_bet",centrality_edge_betweenness(g)))
Package: tidy_headers
tidy_headerstidy_headersstores metadata in beautifully readable plain text headers.exampleFor somefilepath,importcollectionsimporttidy_headersmeta=collections.OrderedDict()meta['date']='2017-11-10'meta['location']='Madison, Wisconsin, USA'meta['name']=['batch','apples','pineapple','oregano','tomatoes']tidy_headers.write(filepath,meta)To get the dictionary back, simplyread:meta=tidy_headers.read(filepath):tada:See the examples directory for more:minimal.txtnamed.txtinstallationusing pippip install tidy_headersusing condaconda config --add channels conda-forge
conda install tidy_headersallowed valuestidy_headersstrives to write plain text headers in an unambiguous way such that an identical metadata dictionary can be generated usingread. This process is only reliable for the following subset of python types:strintfloatlistcontaining any combination of the abovenumpy.ndarray(arbitrary size and dimensionality)Metadata dictionaries containing only these types are guaranteed toreadandwritesuccesfully.