Saravanan666/pypi-org huggingface dataset:
Package: arf-mime
arf-mimeprovides simple abstract classes for representing and inspecting Abuse
Reporting Format (ARF) messages as defined inhttp://www.faqs.org/rfcs/rfc5965.htmlOverviewThere are two main classes included in this module;ARFMessageandFeedbackReport.ARFMessageObjects derived fromARFMessagerepresent a full feedback report as defined
inSection 2 of RFC 5965. Convenience
methods are provided for accessing the various sub-parts of the full message.FeedbackReportObjects derived fromFeedbackReportrepresent themessage/feedback-reportpart of the full message as defined inSection 3 of RFC 5965. Convenience methods are provided to access the required and optional
fields.Installationarf-mimeis provided through PyPi and can be install withpip. Run$ pip install arf-mimeUsageimport arf
arf.ARFMessage(string representing the message)orimport arf
arf.load_arf("/path/to/arf.file")Contributing and Reporting IssuesBug reports, feature requests, and contributions are all welcome. Please open issues ans PRs as
needed.
Package: arfs-gen
All Relevant Feature Selection Generator Library (ARFS-Gen)This repository contains a python library to generate synthetic (toy) data for use in research papers when evaluating all relevant feature selection e.g.  used infri.It allows creating datasets with a specified number of strongly and weakly relevant features as well as random noise features.In the newest revision it also includes methods which generate data with privileged information.It works by utilizing existing methods fromnumpyandscikit-learn.InstallThe library is available onPyPi.
Install viapip:pipinstallarfs_genor clone this repository and use:pipinstall.UsageIn the following we generate a simple regression data set with a mix of strongly and weakly relevant features:# Import relevant methodfromarfs_genimportgenRegressionData# Import modelfromsklearn.svmimportLinearSVR# Specify parametersn=100# FeaturesstrRel=2strWeak=2# Overall number of features (Rest will be filled by random features)d=10# Generate the dataX,y=genRegressionData(n_samples=n,n_features=d,n_redundant=strWeak,n_strel=strRel,n_repeated=0,noise=0,)# Fit a modellinsvr=LinearSVR()linsvr.fit(X,y)DevelopmentFor dependency management we use the newly releasedpoetrytool.If you havepoetryinstalled, use$poetryinstallinside the project folder to create a newvenvand to install all dependencies.
To enter the newly createdvenvuse$poetryenvto open a new shell inside.
Or alternatively run commands inside thevenvwithpoetry run ....TestTest it by runningpoetry run pytest.
Package: arg
𝘼𝙍𝙂: Parse command line arguments made easier...Installpip install argUsage$ python test.py ford -m mustang --year 2017 redtest.pyimportarg# argv without file nameprint(arg())# => ['ford', '-m', 'mustang', '--year', '2017', 'red']# argvprint(arg.v())# => ['test.py', 'ford', '-m', 'mustang', '--year', '2017', 'red']# argcprint(arg.c())# => 7# args as stringprint(arg.s())# => test.py ford -m mustang --year 2017 red# file nameprint(arg.fileName())# => test.py# argument at nprint(arg.at(2))# => -mAPIarg()Return an array with the arguments without the file nameReturn Type:list.v()Return an array with all the arguments. (arg.v~> argvArgumet Vector)Return Type:list.c()Return an array with all the arguments. (arg.c~> argcArgument Count)Return Type:int.s()Return an string with all the arguments. (arg.s ~> Arguments to String)Return Type:str.fileName()Return an string with the name of the fileReturn Type:str.at(n)Return the value of the argument at value atnReturn Type:strRelatedlupe: A better CLI Helper.TeamCarlos AbrahamLicenseMITLicense ©Carlos Abraham
Package: argali
ARGALIArgali is a data analytics framework that provides high level access to a wide range of statistics and visualisations. This package can be used to develop an understanding of variables and data sets. Argali can also be used to create summaries of variables that can provide consistent overviews for analytical process'.The package provides a single command univariate descriptive summary that captures core information about dispersion and central tendency. This summary includes detailed interpretations of the statistics and comparisons between statistics to strengthen user confidence in and understanding of the analysis and its potential impact on decision making.This means that is it possible for users to review an automatically generated report that covers statistical analysis in a topical fashion, identify the most relevant analytical information and easily incorporate these statistics into further analysis, reports and dashboards.Descriptive StatisticsDescriptive statistics provide insight around dispersion and central tendency.UnivariateThe univatiate descriptive statistics class provides easy access to a wide range of variables that are easily
accessible via a set of intuitively named functions.The summary function provides key details relating to the variable and provides a four plots that exposure the structure
and distribution of the data.Usage:from argali import descriptive_statistics

x = [1, 2, 3, 4, 3, 4, 5, 6, 7, 6, 7, 8, 7, 8, 8, 6, 5, 44, 3, 4, 5, 6, 7, 8, 9, 33, 22, 11, -1]

x_summary = descriptive_statistics.Univariate(data=x)

x_summary.descriptive_summary()
Package: argapp
argapp - A Python package for CLI application developmentOverviewargapp is an OOP wrapper forargparseandargcomplete:Allows writing CLI applications using OOP - encapsulatesargparseAPI.Provides limited support for the shell completion viaargcomplete.Full documentation is available athttps://deohayer.github.io/argapp-ws.FeaturesOffers several classes for CLI parsing via OOP.Argrepresents optional and positional arguments, with the most essential use cases covered.Apprepresents a main command or a subcommand.The fields are validated upon construction or setting, raising anExceptionin case of any issues.The parsing can be overridden by subclassingArg.Offers shell completion support if argcomplete is installed:The required API calls are already in place. It is only required to install argcomplete and add thePYTHON_ARGCOMPLETE_OKcomment to the script.Specific completions are added automatically.DependenciesLinuxPython 33.63.73.83.93.103.11InstallationThe package can be installed globally by running:pip3installargappThe Gitrepositorycan be used directly.
The repository layout is designed with exactly this use case in mind.For the argcomplete installation, please follow the officialdocumentation.LimitationsNo abbreviated optional arguments.No argument groups of any kind.No partial parsing.argcomplete.autocomplete()call is hidden and cannot be parametrized.The completion has no test coverage.
Package: argc
A argument parsing module that also can run commands.Note the argc.get key is the string but only if the argument started with an "-"if it started with "--" then you can use it by added and "-" in front of the string```pyargc().get("s") # - shortargc().get("-long") # -- long```## Changelog2.1.0 - single file version2.0.2 - Bugfixes2.0.1 - Fixed detectType for python22.0.0 - Added tests working way better now1.1.3 - stupid dots1.1.2 - removed / in as an arguement1.1.1 - Some more bugfixes!1.1.0 - Thought so. and python2 support1.0.2 - Confusion1.0.1 - Bugfix1.0.0 - Release### Example 1```pyfrom argc import argcif __name__ import "__main__":# for python 2 do as it does not support charectar conversion# args = argc(sys.argv, False)args = argc() # uses sys.argv by defaultargs.add("version", 10.0, True) # the true means that it will exit when the command is doneargs.add("func", lambda: 100**10, True) # real time calculations and running of functionsargs.add("func_2", functionname) # or just a functionargs.add("help", ["It also supports lists for multi-line prints","With support for {}".format("functions"),lambda: 10-9**10,"So yeah... Awsome"], True)args.run() # checks and runs arguments (can stop program)args.get("-config_name", True) # get config if by default it will return Value but# add True it will return True/False```### Example 2```py# example program that takes some arguments# run as ${python} test.py ${args}import randomfrom argc import argc__version__ = "1.0.0"__author__ = "Monty python"__package__ = "STRING RING"__help__ = ["Usage: ","   import STRING_RING as sr","   tone = 10","   sr.RING(tone)","Author: {}".format(__author__),"Name: %(__package__)s"]# arguments are case sensetive but the -- and - is stripped# so you only need the names. but that also means that -hallo,  --hallo and /hallo# all triggers the hello command# optionif __name__ == "__main__":args = argc() # uses sys.argv by defaultargs.add("help", __help__, True) # exits on helpargs.add("version", __version__,  True)# supports functions (prints return value)args.add("func", lambda: random.randint(0, 10**10), True)# checks and runs commandsargs.run()# code after .run# Use .get for configif args.get("useL"):print("Using L")else:print("am not using L")# and for custom config using longprint(args.get("-config", False)) # Use raw data returns None if it does not exist```
Package: arg-cat
Arg Cat PackageThis is a package for read params from args and env.How to Useargcat.add_key("env")This will find args-eor--env, or find environmentENV.Only read arg:argcat.from_arg()Only read environment:argcat.from_environ()Read both arg and environment:argcat.from_arg_and_environ()Remove arg:argcat.remove("env")Examplefromarg_catimportArgCatargcat=ArgCat()argcat.add_key("env")argcat.add_key("release",is_a_bool=True)argcat.add_key("some_path",is_a_path=True)argcat.from_arg_and_environ(environ_override_all=False)print(f'env:{argcat.get_string("env")}')print(f'release:{argcat.get_bool("release")}')print(f'some_path:{argcat.get_string("some_path")}')This example will get 3 params,env,releaseandsome_path.ArgCat will find-eor--envin args for env.ArgCat will find-ror--releasein args for release.ArgCat will find-sor--some_pathin args for some_path.ArgCat will findENVin environment for env.ArgCat will findRELEASEin environment for release.ArgCat will findSOME_PATHin environment for some_path.from_arg_and_environwill using environment first, then using the args value to override those values. Sometimes, you may want to use environment value to override the args value, you should letenviron_override_allto beTure.environ_override_alldefault value isFalse.Running this will be like:python3 demo.py --env dev -r -s ./this/is/pathSituation 1environ_override_all=FalseEnvironment:ENV=this is from env
RELEASE=FalseArgs:--env "from arg" -s ./helloResult:env: from arg
release: False
some_path: YOUR_WORK_PATH/./helloSituation 2environ_override_all=TrueEnvironment:ENV=this is from env
RELEASE=FalseArgs:--env "from arg" -s ./helloResult:env: this is from env
release: False
some_path: YOUR_WORK_PATH/./helloSync FileDefault, we using./params.jsonfile to be the params file.sync_from_filewillremoveall of exist values, and load those params json file's values.argcat=ArgCat(params_file='YOUR_CUSTOM_PARAMS_FILE.json')argcat.sync_to_file()argcat.sync_from_file()Note for ownerBuildpython-mbuildRelease To Testpython3-mtwineupload--repositorytestpypidist/*Release To Releasepython3-mtwineuploaddist/*
Package: argchoose
ArgChooserArgChooser is Python module which allows for fast and easy creation of function chooser.Gives end-user an option to choose which functions to execute by cmdline args or cmdline menuJust add flag names and functionsExecute and watch magic!Table of ContentsDocumentationInstallationQuick StartExamplesLicenseDocumentationInstallationSimply use pip to install the ArgChooser packagepipinstallargchooseQuick StartUsing ArgChooser is as simple as possible. Simple three steps:Createobject of ArgChooserBindmethods with flags using add_argumentExecuteArgChooser!fromargchooseimportArgChooserdeffoo():print('bar')ac=ArgChooser()ac.add_argument('-f','--foo',method=foo)ac.execute()Now You are able to run your program from cmdline like that to execute method:pythonexample.py-fOr without flags to see this:ExamplesAdding argumentsChanging default ArgChooser parametersAdding argumentsadd_argument- allows to bind flag (or flags) with chosen method.
It is possible to also specify category and help prompt.Takes*flags: str,method: Callable[,help: str,category: str]Returns nothing.Example is based onThis.Categories allows to make menu clearer.As You can see,helpalso makes it more descriptive, but also could be printed using -h flag like cmdline tools usually do!pythondefault_usage.py-hTo execute chosen methods, end-user has to choose, if they want to use it straight from cmdline or menu:Changing default ArgChooser parametersArgChoosercould be initialized without any parameters, but gives possibility to change a few little things as shownHere.Takes [category_style: str,default_category_name: str,style: Dict[Token, str],validation_func: Callable(List) -> bool,validation_error: str].category_styleis string on which is used format method with category name.{}must be included in string.Default is== {} ==.default_category_nameis string which will be used as category name for every uncategorized methods.
Default isOther.styleis dictionary made fromTokens and strings which represents hex colors with textformatting keywords (likebold).validation_funcis function used for validating answers at the end of parsing (for example for checking if amount of answers is bigger than two).This function must take one argument which isListand must returnboolvalue.Default functions checks if any answer is chosen.validation_erroris string which will be printed ifvalidation_funcreturnedFalse.Default isYou must choose at least one module..Whenvalidation_funcreturnFalse,validation_erroris printed like that:This is going to be changed to this, after releasing new version of PyInquirer with fixedvalidationparameter:LicenseCopyright (c) 2020 PaweĹ‚ KusiĹ„skiDistributed under the MIT License. SeeLICENSEfor more information.
Package: argcmd
# argcmd - a super-clean, super-simple Class-based API for git-like command line arguments## WhyI got sick of implementing this multiple times, and other people asked me how to do it too.## RequirementsPython 3.7 or later.## InstallationDownload the `*.whl` file from under `https://github.com/lee-b/argcmd/Releases`, and installit with `pip install`. `pip` remote install, and `poetry` instructions to follow.## UsageSee `src/argcmd/__main__.py` for an example.  You can run this example as `argcmd-test` afterinstallation (`argcmd-test` will go away when proper unit tests are added instead).## LicenseGNU Aferro General Public License v3.0.  See included LICENSE.TXT file for details.## ContactsRaise a ticket at github.com/lee-b/argcmd/issues, or email me at `leebraid@gmail.com` _if (and only if)_a ticket isn't appropriate.
Package: argcomb
Quickstartargcomb (argument combiner) is a simple utility that allows you to build
complex command-line arguments in a modular fashion.To install it:pip install argcombSuppose we want to run the following combination of commands (e.g., if you're
doing a hyperparameter sweep):echo train --eta 0.1 --num-iters 5 --greedy
echo train --eta 0.1 --num-iters 5
echo train --eta 0.1 --num-iters 10 --greedy
echo train --eta 0.1 --num-iters 10You can write the followingargcombprogram (calledexample1.pyin this repo):from argcomb import *

run(
    "echo", "train",
    arg("eta", 0.1),
    selarg(None, "num-iters", 5, 10),
    sel(None, [], arg("greedy")),
)Hereruntakes a (hierarchical) list of arguments to be concatenated.
Special functions likeselallow us to specify the selection/iteration over
multiple possible values in place (as opposed to having a big for loop on the
outside).To run it:# Actually executes the commands
python example1.py

# Print out the commands rather than execute them
python example1.py -nWe can also use environment variables (e.g.,@mode) to parametrize the runs.
For example:from argcomb import *

run(
    "echo", "train",
    let_if_undefined("@mode", "slow"),  # Set default
    sel("@mode", {
        "fast": [arg("num-iters", 5), arg("greedy")],
        "slow": arg("num-iters", 10),
    }),
    arg("output", fmt("@mode.out")),
)To run it:python example.py             # slow (default)
python example.py @mode=fast  # fastDevelopmentHandy commands:# Install environment
virtualenv -p python3.7 venv
venv/bin/pip install -r requirements.txt

# Format code (skip `example*.py`)
venv/bin/black -t py37 argcomb test_argcomb.py

# Do type checking
venv/bin/python -m mypy argcomb test_argcomb.py example*.py

# Run unit tests
venv/bin/python -m pytest test_argcomb.py

# Build PyPI package and deploy it
venv/bin/python setup.py sdist
venv/bin/twine upload dist/*
Package: argcompile
ArgCompileCommand-line parsing libraryThis module proposes to extendargparsecommand-line parsing library objects in order to promote devices to easily apply post-parsing processing over supplied arguments.The package contains three public design classes, some useful implementations of them and other auxiliary classes. The most significant ones are described bellow:ArgumentCompilerThe main entry point for command-line parsing, extended to process new-design group usage test, attribute formation andNamespacecompilation. Following its superclass,ArgumentParser, it's filled byActionsthat defines as command line should be parsed. By extension,add_attribute()method process the inclusion of complexActionsContainernamed accordingly.FileSelector: A multiple file opener that filters selection based on path, filename(s) and extension(s)FileComputer: AFileSelectorspecialization that also defines an output targetYamlCompuler: AFileComputerbased class that restrictsyamlandymlfile extensions, already loading its content to a dictionaryAttributeAnActionsContainerspecialization to manage parsing of multiple arguments into an uniqueNamespaceattribute. Implementations of it can be made in order to define how aNamespaceattribute should be constructed based on the several target arguments parsed.Target: Defines a reference collection of the main parsed objectExtension: Designed to accumulate a list of extensions, allowing defining special arguments for desired optionsOutput: Defines title and opening-mode of a writing fileCustomGroupA group-type class that allows post parsing usage tests to be executed. This design enables the implementation of custom rules inActiongroups.RequiredGroup: A simple group that checks the presence of its arguments to require at least one has been providedDependentGroup: Restricts the use of its arguments based on presence of its dependence listExampleThe following code is a Python program that prints out the file list of a target path# ls.pyfromargcompileimportFileSelectorclassLs(FileSelector):def__call__(self,namespace):forfileinnamespace.file:print(file.name)compiler=Ls(path={'*':['path'],'nargs':1})compiler.parse_args()It can be run at the command line and provides useful help messages:$ python3 ls.py -h
usage: ls.py [-h] [--all] [-e ext [ext ...]]
           path [filename [filename ...]]

positional arguments:
  path                  define path to look up files from
  filename              define chosen filenames

optional arguments:
  -h, --help            show this help message and exit
  --all                 select all filenames
  -e ext [ext ...],     restrict files extension(s)When run with the appropriate arguments, it does the job:$ python3 ls.py . --all
./.gitignore
./DESCRIPTION.md
./LICENSE
./makefile
./MANIFEST.in
./README.md
./setup.cfg
./setup.py
Package: argconfig
argconfigargparse + yaml config systemThis takes the same format as the argparse.ArgumentParser class; however
it adds the feature of setting a default yaml file for base configuration
to override the default set in the code. Usage has the following overwrite
priority:command line > config file > default set in codeThis enables a flexible configuration based, commandline interface options
at scale.RequirementsPython 3.7+pyyamlargparseExampleConfig FileUse the example.yaml config file in the same directory as your example python code:$ cat example.yaml
foo : test1
bar : 2.0Example CodeThe example python code setsup the variables foo and bar to equal 'testing' and 2.0 respectively.
(Note the syntax is almost identical as argparse.ArgumentParser.)import argconfig

parser = argconfig.ArgumentParser(description='argconfig example',config='./example.yaml')
parser.add_argument('-f','--foo', type=str, default='testing',
                    help='foo (default=testing, config=test)')
parser.add_argument('--bar',
                    help='bar (default=None, config = 2.0)')
args = parser.parse_args()

print('foo:',args.foo)
print('bar:',args.bar)Example Command Line UsageRun time of the example with foo and bar set by command line:python example.py --foo test --bar 3.0returns the following two print statements:foo: test
bar: 3.0While the values set in example.yaml is used when the values are not overriden by the command line:python example.pyreturns the following two print statements:foo: test1
bar: 2.0
Package: argdb
ArgDBA Datastore for argumentsArgDB is a datastore, API, and suite of tools for working with argument data represented using the Simple Argument Description Format (SADFace). The default backend datastore is SQLite3. This currently supports storage of raw SADFace documents in JSON format using the native JSON support within SQLite3. The CLI is a python flask application that provides two modes of interaction. The first is as a command line app, passing in and retrieving data from the store via command line arguments. This can be useful to script interaction with the datastore, treating ArgDB like any other command line tool. The second is a REPL mode that allows a user manipulate their argument datastore directly and interactively. The API is a Python-Flask web-app that provides a public interface to the datastore that is appropriate to the domain. The API is designed to serve the contents of the datastore publiclly if so exposed, i.e. serving using a compliant WSGI  server (uWSGI or Waitress are good choices), ideally proxied behind a static webserver like NGinX to provide TLS support. The GUI is a Pywebview web-app that provides a web-based user interface to the datastore. As for the API, this can be proxied publily or kept for private use.UsageRunning the CLI REPL:$ python -m argdbRunning the (web) gui:$ python -m argdb --guiHistoryPrior to version 0.1, ArgDB used CouchDB as the default backend. However, recent advances in support JSON within SQLite3 meant that a simpler implementation could be produced that could use a single backend to store raw SADFace documents, as well as a relational subset of SADFace that could be optimised for scalability and ad hoc search.
Package: argdcls
ArgdclsA simple tool to use dataclass as your config.Usagefromdataclassesimportdataclassimportargdcls@dataclassclassConfig:lr:floatadam:bool=Falseconfig=argdcls.load(Config)print(config)$python3main.py@lr=1.0
Config(lr=1.0,adam=False)$python3main.pylr=1.0adam=True
Config(lr=1.0,adam=True)$python3main.pylr=1.0adm=True# typo!Parameter\"adm\"isnotinthedataclassfields:['lr','adam'].
$python3main.pylr=1.0@adam=True# avoid overwritingParameter"adam"musthavenodefaultvaluebuthavedefaultvalue:"False".Youmayuse"adam=True"instead.@param=valueavoids overwriting the default values.BenefitsAttribute suggestions from IDEs (e.g.,config.a<tab>indicatesconfig.adam)LicenseMIT