Saravanan666/pypi-org huggingface dataset:
Package: cleantest
cleantestA testing framework for developers who need clean environments in a hurryExplore cleantest docs »Aboutcleantest is a testing framework for quickly bringing up testing environments using the test authors hypervisor of choice. It was created out of NucciTheBoss's desire to efficiently test snap packages, Python code, and Juju charms without needing to make potentially system breaking modifications to the underlying host operating system.Below is an outline of currently supported operating systems, Python versions, and hypervisors:Supported operating systemsSupported python versionsSupported hypervisorsGetting startedInstalling cleantestThe recommended way to install cleantest is by downloading the published package on PyPI:pip install cleantestFor those who wish to use the latest, bleeding-edge, and potentiallyunstableversion cleantest of cleantest, the
following command can be used to install cleantest from the main branch of this repository:git clone https://github.com/NucciTheBoss/cleantest.git
cd cleantest
python3 -m pip install .Configuring a test environment providerBefore you can start using cleantest to run tests, you need to set up a test environment provider. Currently, the only
supported environment provider isLXD. You can set LXD up on your system using the following
commands:sudo snap install lxd
lxd init --autoRun your first testYou can use any testing framework of your choice with cleantest, but this example will usepytest:pip install pytestHere is a test written using cleantest that you can download::clipboard:test.py#!/usr/bin/env python3"""A basic test"""fromcleantest.providerimportlxd@lxd(preserve=False)defdo_something():importsystry:importurllibsys.exit(0)exceptImportError:sys.exit(1)classTestSuite:deftest_do_something(self)->None:result=do_something()assertresult.exit_code==0With the test file downloaded, run the test using pytest:pytest test.pyWhere to next?Please the see thedocumentationfor more information on all that you can
do with cleantest.ContributingPlease read through thecontributing guidelinesif you are interested in contributing to cleantest. Included are guidelines for opening issues, code formatting
standards, and how to submit contributions to cleantest.LicenseCode and documentation copyright © 2022 Jason C. Nucciarone, Canonical Ltd. Please see theApache-2.0license for more details.RoadmapHere are my (NucciTheBoss's) goals to get cleantest to release version 1.0.0:Add support for injecting tests into LXDAdd support for multiple distros:UbuntuDebianCentOSRockyFedoraArchEnable support for running parallel tests with LXDBetter test logging capabilitiesSupport for a select few popular packaging formats:SnapPipCharm librariesDebs, Rpms, Pacs, etc.ApptainerRobust hook mechanism -> i.e. an actual specification for hooks.Comprehensive documentation
Package: cleantext
cleantextcleantextis a an open-source python package to clean raw text data. Source code for the library can be foundhere.Featurescleantext has two main methods,clean: to clean raw text and return the cleaned textclean_words: to clean raw text and return a list of clean wordscleantext can apply all, or a selected combination of the following cleaning operations:Remove extra white spacesConvert the entire text into a uniform lowercaseRemove digits from the textRemove punctuations from the textRemove or replace the part of text with custom regexRemove stop words, and choose a language for stop words
( Stop words are generally the most common words in a language with no significant meaning such as is, am, the, this, are etc.)Stem the words
(Stemming is a process of converting words with similar meaning into a single word. For example, stemming of words run, runs, running will result run, run, run)Installationcleantext requiresPython 3andNLTKto execute.To install using pip, usepip install cleantextUsageImport the library:importcleantextChoose a method:To return the text in a string format,cleantext.clean("your_raw_text_here")To return a list of words from the text,cleantext.clean_words("your_raw_text_here")To choose a specific set of cleaning operations,cleantext.clean_words("your_raw_text_here",clean_all=False# Execute all cleaning operationsextra_spaces=True,# Remove extra white spacesstemming=True,# Stem the wordsstopwords=True,# Remove stop wordslowercase=True,# Convert to lowercasenumbers=True,# Remove all digitspunct=True,# Remove all punctuationsreg:str='<regex>',# Remove parts of text based on regexreg_replace:str='<replace_value>',# String to replace the regex used in regstp_lang='english'# Language for stop words)Examplesimportcleantextcleantext.clean('This is A s$ample !!!! tExt3% to   cleaN566556+2+59*/133',extra_spaces=True,lowercase=True,numbers=True,punct=True)returns,'this is a sample text to clean'importcleantextcleantext.clean_words('This is A s$ample !!!! tExt3% to   cleaN566556+2+59*/133')returns,['sampl','text','clean']fromcleantextimportcleantext="my id, name1@dom1.com and your, name2@dom2.in"clean(text,reg=r"[a-z0-9\.\-+_]+@[a-z0-9\.\-+_]+\.[a-z]+",reg_replace='email',clean_all=False)returns,"my id, email and your, email"LicenseMITFor any questions, issues, bugs, and suggestions please visithere
Package: cleantimer
cleantimerTrack progress of long-running scripts, without cluttering your code with log statements.cleantimer is a minimal wrapper around a couple of my favorite packages for timing scripts -contexttimerandtqdm. It merges their most useful features in a clean API based simply on the way I've found I like to use them. Hopefully you find it simply useful. 😊Installationpip install cleantimerImport:from cleantimer import CTimerUse casesA basic timer with a message for what you're timing:withCTimer("Waking up"):sleep(4)Waking up (3:22PM)...done. (4.0s)Print with varying precision:withCTimer("Waking up",3):sleep(4.123456)Waking up (3:22PM)...done. (4.123s)Sub-timerswithCTimer("Making breakfast")astimer:sleep(2)withtimer.child("cooking eggs")aseggtimer:sleep(3)withtimer.child("pouring juice"):sleep(1)Making breakfast (3:22PM)...
    cooking eggs (3:22PM)...done. (3.0s)
    pouring juice (3:23PM)...done. (1.0s)
done. (6.0s)Progress meter on a Pandas applydf=pd.DataFrame({"A":list(range(10000))})deftimes2(row):returnrow["A"]*2withCTimer("Computing doubles")astimer:df["2A"]=timer.progress_apply(df,times2)Computing doubles (3:22PM)...
    : 100% ██████████████████████████ 10000/10000 [00:07<00:00, 135869it/s]
done. (7.4s)Segmented progress meterdf=pd.DataFrame({"A":list(range(10000)),"type":[1]*5000+[2]*5000})deftimes2(row):returnrow["A"]*2withCTimer("Computing doubles")astimer:df["2A"]=timer.progress_apply(df,times2,split_col="type",message="part{}")Computing doubles (3:22PM)...
    part 1: 100% ██████████████████████████ 5000/5000 [00:07<00:00, 135869it/s]
    part 2: 100% ██████████████████████████ 5000/5000 [00:07<00:00, 122854it/s]
done. (8.2s)
Package: cleantweet
CleanTweet version 0.1.1CleanTweet helps in Natural Language Processing tasks especially in the area of preprocessing and cleaning your datafetched from the Twitter API Backend.Installationpip install cleantweetGet StartedHow to clean your Twitter Object:Example 1: If the text file containing the Twitter JSON Data is in the same directory as project files.!pip install cleantweetfrom cleantweet import CleanTweetimport nltknltk.download('punkt')Instantiate the CleanTwitter Objectdata = CleanTweet('sample_text.txt')Call the clean methodprint(data.clean())Example 2: When the above is not the case.!pip install cleantweetfrom cleantweet import CleanTweetimport nltknltk.download('punkt')import the os moduleimport osInstantiate the CleanTwitter Objectdata = CleanTweet(os.path.join('./nameoffolder', 'sampling.txt'))Call the clean methodprint(data.clean())In this first version, the method clean() would only preprocess and clean the Twitter Object's default parameters whichare the id and text.
Package: cleantxt
cleantxtcleaning text from noise for nlp tasksinstallationwith pippip install cleantxtinstall from sourcegit clone https://github.com/jemiaymen/cleantxt.gitgo to the cleantxt directorycd cleantxtinstall with pippip install .cli usagecleantxt --doc=[path_to_doc]  --out=[path_out_file] --f=[0]  --t=[100]  --do_lower=True --white_space=True  --punctuation=True  --duplicated_chars=True --alpha_num=True  --accent=True  --escape key,value ə,a œ,oecheck exampleapi usageimport text modulefrom cleantxt import textclean texttxt = text.clean_text('mella 7ayawaaanéé hadddddda mta3@@@@@ @tfih')print the resultmella 7ayawane hada mta3 tfihparamstext : -> (str) raw textwhitespace : -> (boolean) escape spaces [default True ]punctuation : -> (boolean) escape punctuation [default True ]duplicated : -> (boolean) escape duplicated chars [default True ]alphanum : -> (boolean) escape non alpha numeric chars [default True ]accent : -> (boolean) escape accent [default True ]do_lower : -> (boolean) lower case text [default True ]others : -> ( list( tuple() ) ) escape rules [ default [('ə', 'a')] ]new functionword countwc => (word count) params (path :str, unique=False, both=False)from cleartxt import textprint( text.wc('file.txt',both=True) )(51515,5547)output tuple (all words , unique words)word frequencyword_frequency => params (path : str, top=100)from cleartxt import textprint( text.word_frequency('file.txt') )[('\n', 54898), ('', 48757), ('w', 27717), ('el', 16679), ('fi', 9399), ('ya', 8611)]output list of tuples (word , frequency)
Package: cleantxty
cleantxtyPython package to clean strings and making them reasonable for NLP.cleantxtyis a an open-source python package cleaning text from raw text format. Source code for the library can be foundhere.Featurescleantxt has two main methods,clean: to clean raw text and return the cleaned textclean_words: to clean raw text and return a list of clean wordsother menthods that can be used simultaneoulsy are:remove_link: to remove link from the textremove_extra_white_space: to remove extra white space from the textlower_text: to make case of the text to lower caseupper_text: to make case of the text to upper caseremove_stopwords: to remove stopwords from the textremove_digits: to remove digits from the textremove_punctuations: to remove punctuations from the textcustom_regex: to use custom regex and appy to textstem_text: to stem the provided textInstallationcleantext requiresPython 3andNLTKto execute.To install using pip, usepip install cleantxtyUsageImport the library:importcleantxtyChoose a method:To return the text in a string format,cleantxty.clean("raw_text_here")To return a list of words from the text,cleantxty.clean_words("raw_text_here")To choose a specific set of cleaning operations,cleantxty.clean("raw_text_here",default_case="lower",# lower by default change to upper for upper case resultregex=None# Provide custom regex to use)cleantxty.clean_words("raw_text_here",default_case="lower",# lower by default change to upper for upper case resultregex=None# Provide custom regex to use)Examplesimportcleantxtycleantxty.clean('This is A s$ple ? tExt3% to   cleaN566556+wow8 ')returns,'this is a sample text to clean'importcleantxtycleantext.clean_words('This is A s$ample !!!! tExt3% to   cleaN566556+2+59*/133')returns,['sampl','text','clean']fromcleantxtyimportcleantext="my id, name1@dom1.com and your, name2@dom2.in"clean(text,regex=r"[a-z0-9\.\-+_]+@[a-z0-9\.\-+_]+\.[a-z]+")returns,"my id, email and your, email"LicenseMITFor any questions, issues, bugs, and suggestions please visithere
Package: cleanup
CleanUpA simple command line utility that organises files in a directory into subdirectories based on the files' extensions.UsageWhen run without any option, it organises the files in the specified directory into subdirectories based on the files' extensions.Options-d,--dry-runJust displays the changes that would be made, without actually doing anything.cleanup-dpath/to/dir# dry run the cleanupcleanup-drpath/to/dir# dry run the reverting a cleanup-s,--silentPrevents displaying any information while performing operations. Errors, however, are displayed irrespective of whether this option is enabled or not.cleanup-spath/to/dir# silently cleanupcleanup-srpath/to/dir# silently revert a cleanup-r,--revertReverts the cleanup of a directory. Note that for this to work, the specified directory should have been cleaned up before.cleanup-rpath/to/dir# revert the cleanup of a directory-h,--helpDisplays the help text.cleanup-hDevelopmentSetupClone the repo andcdinto it.Set up a Python 3 virtual environment usingpipenv:pipenv--three# create Python 3 virtual environmentpipenvinstall--dev# install all dependenciespipenvshell# activate virtual environment shellThe cleanup script can now be run from the root directory of the project:python3-mcleanup.cleanup-hTestMake sure you're in the root directory of the project. You can then run the test using:python3-mtests.testLicenseThis project is licensed under the terms of theMIT license.
Package: cleanupd
Thecleanupmodule provides primitives aiding in releasing of no
longer used resources in an exception-safe manner. In particular, it
definesdefer, a function that, when used as a context manager, acts
as an object for registering cleanup functions for acquired resources.
An example:client=Client()withdefer()asd:obj=Object()d.defer(obj.destroy)obj.register(client)d.defer(obj.unregister,client)# Alternative syntax:# d.defer(lambda: obj.unregister(client))raiseException()Here, thedefercreates a context objectdthat is guaranteed to
be released during block exit (even in the face of exceptions). It is
used to “defer” an invocation ofobj.destroyjust after the object
got created. This way, the object is guaranteed to be destroyed
properly. Furthermore, the object is registered with a client. This
registration should be undone before the object vanishes and so another
“defer” operation is used to register theunregisterinvocation.
This example also illustrates another important fact: execution of the
various cleanup routines happens in reverse order of their registration.
This property is important in most scenarios where resources of interest
have dependencies.Sometimes cleanup is only necessary in case an error occurs. That is, if
all operations (resource acquisitions etc.) succeed, we do not want to
roll back and undo a part of them. To that end, a defer context can be
“released” in which case no cleanup happens after block exit. Revisiting
the example above:client=Client()withdefer()asd:obj=Object()d.defer(obj.destroy)obj.register(client)d.defer(lambda:obj.unregister(client))# Do some action that potentially raises an error.# If we got here we want to keep the object created and registered# with the client.d.release()This mechanism not only works on the level of a context but also for
individually deferred functions:client=Client()withdefer()asd:obj=Object()f=d.defer(obj.destroy)# Do some action that potentially raises an error.f.release()InstallationThecleanuppackage does not have any external dependencies. In
order to use it it only needs to be made known to Python, e.g., by
adding the path to thesrc/directory to thePYTHONPATHenvironment variable.If you are usingGentoo Linux, there is anebuildavailable that
can be used directly.SupportThe module is tested with Python 3. There is no work going on to ensure
compatibility with Python 2.
Package: cleanup-dungeondraft-asset-packs
cleanup-dungeondraft-asset-packsis a CLI tool to cleanup Dungeondraft asset packs.I noticed that some asset packs fromCartographyAssetswould register entries in theDungeondrafttag list that are associated with an empty asset list. This made the asset discovery process quite painful.I wrote that CLI tool to automate the process of cleaning up these empty tag entries, in order to keep the tag list as clean as possible.InstallationTo install the CLI, runpip3 install cleanup-dungeondraft-asset-packsNote: This script is wrapping thedungeondraft-unpackanddungeondraft-packcommands, installable viahttps://github.com/Ryex/Dungeondraft-GoPackager. You'll need to follow their installation instructions as well. Don't worry if you don't havegoinstalled locally, they provide pre-compiled binaries that you have to download and move into yourPATH.
Package: cleanup-py
cleanupClean files and directories using Unix-Shell Style wildcards.
Multiple clean parameters can be used in a single command, or they can be written to a file for easy execution.Installation using pippip install cleanup_pyBuilding from Sourcespython -m build
pip install .\dist\cleanup_py-0.1.32-py3-none-any.whlCommandcleanup --helpusage: cleanup [-h] [-p PATTERNS] [-e EXCLUDES] [config_file]

Clean up the current folder

positional arguments:
  config_file           Configuration file, default to .cleanup in the current working directory

options:
  -h, --help            show this help message and exit
  -p PATTERNS, --patterns PATTERNS
                        Matching expressions for folders and files, using Unix Shell style. If there are multiple expressions, use commas to separate them    
  -e EXCLUDES, --excludes EXCLUDES
                        Match expressions for files or folders that are not cleaned, using Unix Shell style. If there are multiple expressions, use commas    
                        to separate themUsing .cleanup# Matching expressions for folders and files, using Unix Shell style. If there are multiple expressions, use commas to separate them
patterns = dist,log,__pycache__,tmp,.pytest_cache,*.pyc
# Match expressions for files or folders that are not cleaned, using Unix Shell style. If there are multiple expressions, use commas to separate them
exclude_patterns = ./venv/*,*.tar.gz
Package: cleanup-pypi
cleanup_pypi#Reference for creating python packageofficial python page#Reference URLURL helpful for creating python packageThis library has 3 functions:-1) replacing null values
2) standardization the column values 
3) finding the variance_inflation_factor value column wisePoints to keep a noteThe base minimum parameter which it expects is either a numpy array or a DataFrame.

The only things we need to keep in mind is make sure there is no column in date format if so once you have preprocessed it then use these functions.
If any column has values in dataformat then it may give error.
Also in case of a DataFrame kindly ensure the first column is target column or dependent column. Only then start using this function.WHAT IS AN ISSUE??
Package: cleanup-pypi-sushantsur23
cleanup_pypi#Reference for creating python packageofficial python page#Reference URLURL helpful for creating python packageThis library has 3 functions:-1) replacing null values
2) standardization the column values 
3) finding the variance_inflation_factor value column wisePoints to keep a noteThe base minimum parameter which it expects is either a numpy array or a DataFrame.

The only things we need to keep in mind is make sure there is no column in date format if so once you have preprocessed it then use these functions.
If any column has values in dataformat then it may give error.
Also in case of a DataFrame kindly ensure the first column is target column or dependent column. Only then start using this function.WHAT IS AN ISSUE??
Package: cleanup_zope_persistent_registry
cleanup_zope_persistent_registryBefore 3.5.2,zope.interfacewas broken :
it did not remove keys when unregistering adapters or unsubscribing
subscribers.This implies that even when proper unregistration of adapters and subscribers
had been done, interfaces were left over, pickled in persistent registries.This leads to nasty bugs when the code that defined those interfaces is removed
from the system.This package defines a function that cleans up those leftover interfaces.
It must be called on a site manager, instance ofPersistentComponentslike the local site manager of a Plone site:from zope.component import getSiteManager
from cleanup_zope_persistent_registry import cleanup_leftovers

site_manager = getSiteManager(my_plone_site)
cleanup_leftovers(site_manager)TestedChangelog0.1.1 (2012-10-03)Fix : cleanup was not properly persisted.0.1 (2012-08-20)Initial release.
Package: cleanurl
cleanurlRemove clutter from URLs and return a canonicalized versionInstallpip install cleanurlor if you're using poetry:poetry add cleanurlUsageBy defaultcleanurlretuns a cleaned URL without respecting semantics.
For example:>>> import cleanurl
>>> r = cleanurl.cleanurl('https://www.xojoc.pw/blog/focus.html?utm_content=buffercf3b2&utm_medium=social&utm_source=snapchat.com&utm_campaign=buffe')
>>> r.url
'https://xojoc.pw/blog/focus'
>>> r.parsed_url
ParseResult(scheme='https', netloc='xojoc.pw', path='/blog/focus', params='', query='', fragment='')The default parameters are useful if you want to get acanonicalURL without caring if the resulting URL is still valid.If you want to get a clean URL which is still valid call it like this:>>> r = cleanurl.cleanurl('https://www.xojoc.pw/blog/////focus.html', respect_semantics=True)
>>> r.url
'https://www.xojoc.pw/blog/focus.html'celeanurl.cleanurlparameters:generic-> if True don't use site specific rulesrespect_semantics-> if True make sure the returned URL is still valid, altough it may still contain some superfluous elementshost_remap-> whether to remap hosts. Example:>>> import cleanurl
>>> cleanurl.cleanurl('https://threadreaderapp.com/thread/1453753924960219145', host_remap=True).url
'https://twitter.com/i/status/1453753924960219145'
>>> cleanurl.cleanurl('https://threadreaderapp.com/thread/1453753924960219145', host_remap=False).url
'https://threadreaderapp.com/thread/1453753924960219145'For more examples see theunit tests.Why?While there are some libraries that handle general cases, this library has website specific rules that more aggresivly normalize urls.UsersInitially used fordiscu.eu.Discussions around the webWho?cleanurlwas written byAlexandru Cojocaru.LicensecleanurlisFree Softwareand is released asAGPLv3
Package: cleanweb
Python wrapper for cleanweb API of Yandex to fight spam.Yandex.Clean Webhelps against spam in text message in comments, on forums, etc.
It detects spam messages based on their content and offers API for graphic CAPTCHA.
Technlogies that power Yandex.Mail spam defence are behind Yandex.Clean Web.InstallInstall via pip:pip install cleanwebIf you understand and acceptlicence agreementyou need toObtain mandatory API key(yandex login is required)API is provided as isUsageExamples show basic usage of cleanweb api, for details check sources anddocs:>> from cleanweb import Cleanweb
>> client = Cleanweb(key='cw.1.1.fc4c0c5c3be05adb04c9400214T193305Z')check if message contains spam:>> client.check_spam(body='This might be some spam message')
{'id': '036151771200000F', 'links': [], 'spam_flag': False}get captcha to show bots:>> client.get_captcha()
{'captcha': '20_iC0ZHRYtEllRhgEAngpsenpKGCIyi',
 'url': 'http://i.captcha.yandex.net/image?key=20_iC0ZHRYtEllRhgEAngpsenpKGCIyi'}check captcha:>> client.check_captcha(captcha='20_iC0ZHRYtEllRhgEAngpsenpKGCIyi', value='48151632')
Truecomplain on spam detector:>> client.complain(id='036151771200000F', is_spam=False)
True