Saravanan666/pypi-org huggingface dataset:
Package: cmd-find
cmd-findcmd-find is a command line tool that finds linux commands from their descriptions.InstallationUse pip to install cmd-find by running the following command:pip install cmd-findUsageNormal command callsRun thecmd-findcommand followed by a description enclosed in single or double quotes and the number of suggested commands.The tool should be used in the following way:cmd-find [NUM OF SUGGESTED COMMANDS] [COMMAND DESCRIPTION]An example would look like this:cmd-find 2 "change the current working directory"An example output of this command would look like this:Best choice:
Command name: cd
Description: change the shell working directory
Enter 'help cd' to get more information

Other suggestions:
Command name: git-stash
Description: stash the changes in a dirty working directory away
Enter 'man git-stash' to get more informationAlternative command callsUsing single quotes or swapping the positions of the two arguments is also allowed:cmd-find 'change the current working directory' 2If the number of suggested commands is not specified, its default value is 3.The following command would result in 3 suggested commands:cmd-find "change the current working directory"HelpThe command takes too longThe command takes a long time to runwhen it is first used. This is because the transformer model used needs to be downloaded.After the first use, the command will be much faster because the model will have been cached.An incorrect command is outputtedcmd-find works better if short descriptions that directly describe what a command does are used.Usecmd-find 3 "list all files in a directory"Do not usecmd-find 3 "I want a command that lists the files in a directory"cmd-find can only find commands withinpage 1of theLinux man pagesor those covered by thehelpcommand.If the command you are looking for is not within this list, it will not be found by the tool.The tool can also only output commands once at a time. If the task you are trying to achieve requires multiple different commands to be exectued, these will not all be found by the tool.Installation failedCheck pip and pythonEnsure that both python and pip are installed.Runpip --versionandpython3 --versionto check that they are both installed.Ensure that both of the above commands execute successfully and that you are connected to the internet. If this is the case, retry the installation.If python and pip are both installed and the installation still fails, try the following commands:pip3 install cmd-find

python3 -m pip install cmd-find

python -m pip install cmd-findManually install dependenciesIf the installation still fails, you can try and manually install the dependencies by running the following commands:pip install numpy
pip install sentence-transformersIf you are trying to install onto something like a raspberry pi, ensure you have a64-bitOS installed. This is required for thesentence-transformerslibrary.The command results in an errorEnsure that the given description is enclosed within either single or double quotes:cmd-find 3 "create a new directory"is correct.cmd-find 3 'create a new directory'is also correct.cmd-find 3 create a new directoryis incorrect.
Package: cmdfor
nd for every line of inputFree software: MIT licenseDocumentation: (COMING SOON!)https://cmdfor.readthedocs.org.FeaturesA shell utility (and package) which runs a command for every line of input.It allows for spawning an arbitrary number of concurrent threads, and control
over where to keep each commands output.In my daily work, I have to run all manner of commands on huge batches of
items. These things are usually not CPU bound, so it makes sense to
multithread these tasks.Thus, I find myself doing bash commands such as the following, which takes an
input file of items, splits it into equal(ish) parts, and then spawns a worker
for each part, all the while keeping granular logs and return codes:lines=`wc -l domains.txt | awk '{print $1}'`; threads=10; split=$(((lines/threads)+1)); mkdir -p in out; split -d -l ${split} domains.txt in/part. ; ls in/ | while read -r f; do cat in/${f} | while read -r d; do host -t a "${d}" > out/${d} 2>&1; echo -e "${d}\t$?"; done > log.${f} & echo ${!}; done > pidsThat gets pretty tiring to type all the time. Why not usexargs-Pyou say?
Well that works perfectly fine for cases where I don’t need to make very
complicated commands, and don’t need to log all return codes. Maybe I can do
all of that withxargs, but I wanted to make this anyway as a learning
experience.How-ToThe program can take input from STDIN or from a file passed with the -i option.All arguments that aren’t options are considered the subcommand to run. All
wildcards{}are replaced with the corresponding positional field from the
input data.To delete a list of files, basically the same behaviour as xargs:cat files.txt | cmdfor rm {}To run the fictional commandimaploginfor every line of a csv that
contains <email>,<password> fields, logging each individual command’s output
to an file in the directory ./out:cat email_users.csv | cmdfor -d, -o ./out -- imaplogin -u {} -p {}To look up the IP addresses of a huge amount of hostnames, using 10 concurrent
threads, and storing each individual commands stdout and stderr in seperate
files in the directory ./results, with each file being named after the hostname
on which the query was performed:cat hostnames.txt | cmdfor -t 10 -Eo ./results -l 1 -- host -t a {}To-Do1. Come up with a real test case. Since this is a shell utility and really only
deals with shell subcommands, I don’t know what will work and what won’t on
travis.ci (can I run a shell command there?)
2. By default, it suppresses all output from subprocesses, and writes a message
to STDOUT for each process spawn and reap. This output is too verbose for the
default behaviour, and so it should be toggled with -v. The default should be
quitier and simpler. Perhaps just the returncodes of each task.
3. Refactoring some stuff to be a little less messy. The function signatures
are huge, and there are messages generated in odd places. I think it would be
better to pass a context object.History2018-04-09  v0.1.0  initial release, still need to do tests and docs
2018-04-10  v0.1.5  fixing import issues and removing <2.7 support
Package: cmdfunctools
When developing a new package, there are python functions that
you want to make also available from the command line.
To do so, an additional function is needed; a specially designed command-line-function
which is then referenced in the setup.py file, inside theentry_pointskey.
This command-line-function is special indeed, since
it cannot have arguments (it uses insteadsys.stdinorsys.argvas inputs) and
cannot have return values (it uses insteadprint()as output).With cmdfunctools you can automatically create a command-line-function from any python function.InstallationThe source code can be downloaded from GitHub, where the code isalways available.It can also be installed from PyPI running:$ pip install cmdfunctoolsUsageTo create a command-line-function use thecomand_funcdecorator:from cmdfunctools import command_func

@command_func(itype='int', otype='int')
def add(a, b)
    res = a + b
    return resNow the function can be referencedas isinentry_pointsinside setup.py and,
after the package installation, it can be used from the command line interface:$ add 3 2
5The original function can still be used within python code using the __wrapped__() method:>>> add.__wrapped__(3, 2)
5FeaturesAutomatic number of arguments checkAutomatic argument type checkOptional argument length check (equal or less-or-equal)Pipelines supportedI/O argument types supported:integerhexadecimalThe project is in3-Alphadevelopment status, new features will be added before 5-Production/Stable.
Package: cmd-fwk
hi , padbget startpip install padbpadb --helpusage:commandline

positionalarguments:{device-info,log-info}optionalarguments:-h,--helpshowthishelpmessageandexit--versionshowprogram'sversionnumberandexit-sSERIAL_NO,--serialSERIAL_NOusedevicewithgivenserialpadb device-infousage:commandlinedevice-info[-h][-b][--top_activity][-i]optionalarguments:-h,--helpshowthishelpmessageandexit-b,--basicdevicebasicinfo--top_activitytopactivity-i,--imeigetimeipadb device-info -b[device-info:b/HONORs/CUYDU19701014125cid/A00000AD7B3287]>>parse_argsNamespace(basic=True,func=<boundmethodBaseCommand.__executeof<pyadb.cmd.device_info.DeviceInfoobjectat0x102d06f28>>,imei=False,serial_no='',top_activity=False)[device-info:b/HONORs/CUYDU19701014125cid/A00000AD7B3287]>>execute[=]model:YAL-AL00[=]brand:HONOR[=]name:YAL-AL00[=]wmsize:(1080,2340)[=]wmdensity:480[=]androidversion:10[=]imei:A00000AD7B3287[=]ip/mac:('192.168.1.102/24','0x00001043')[=]board:YAL[=]abilist:['arm64-v8a','armeabi-v7a','armeabi'][=]cpucoresize:8[=]heapsize/m:512padb log-infousage:commandlinelog-info[-h][--tagsTAGS][--format{none,brief,process,tag,raw,time,threadtime,long}][-e]optionalarguments:-h,--helpshowthishelpmessageandexit--tagsTAGStag--format{none,brief,process,tag,raw,time,threadtime,long}format-e,--eventeventframework轻量级终端指令框架，pip install cmd-fwk即可在自己的项目接入。只要创建一个存放命令的文件夹cmds即可。初始化框架importfwk,osdefentry():fwk.load_cmds(os.path.dirname(__file__),'cmds')在cmds目录下面编写自己的指令fromfwkimportBaseCommandfromfwk.deviceimport(get_model,get_brand,get_name,get_wm_size,get_wm_density,get_android_version,get_imeis,get_ip_and_mac,get_board,get_abilist,get_cpu_core_size,get_heap_size,)fromfwk.logimportprint_with_barclassDeviceInfo(BaseCommand):#声明指令的功能def_create_parser(self,p):pyadb_parser=p.add_parser('device-info')pyadb_parser.add_argument('-b','--basic',action='store_true',help='device basic info')pyadb_parser.add_argument('--top_activity',action='store_true',help='top activity')pyadb_parser.add_argument('-i','--imei',action='store_true',help='get imei')returnpyadb_parser#获取指令中的数据def_parse_args(self,args:"ArgumentParser"):self.__basic=args.basic#执行指令的逻辑def_execute(self):ifself.__basic:print_with_bar(0,'model:',get_model(self._serial_no))print_with_bar(1,'brand:',get_brand(self._serial_no))print_with_bar(2,'name:',get_name(self._serial_no))print_with_bar(3,'wm size:',get_wm_size(self._serial_no))print_with_bar(4,'wm density:',get_wm_density(self._serial_no))print_with_bar(5,'android version:',get_android_version(self._serial_no))print_with_bar(6,'imei:',get_imeis(self._serial_no))print_with_bar(7,'ip/mac:',get_ip_and_mac(self._serial_no))print_with_bar(8,'board:',get_board(self._serial_no))print_with_bar(9,'abilist:',get_abilist(self._serial_no))print_with_bar(10,'cpu core size:',get_cpu_core_size(self._serial_no))print_with_bar(11,'heap size/m:',get_heap_size(self._serial_no))package source codepip3 install setuptools  ; pip3 install wheelpython3 setup.py sdist bdist_wheelupload packagepip3 install twinetwine upload dist/*reference:awesome adbAndroid】ADB工具原理探究python代码规范
Package: cmdgpt
简体中文| EnglishCMDGPT | Manipulate command line with natural languageInstallpipinstallcmdgptError:command not found: cmdgptPlease add the following content to your/.bashrcor/.zshrcfile:exportPATH=$PATH:~/.local/binThen runsource ~/.bashrcorsource ~/.zshrcto reload the file.UsageSet OpenAI api-key:cmdgpt--key"sk-xxx……xxx"Describe your opeartioncmdgpt"Create a folder named 'www' with an 'index.html' file inside."Chat Modecmdgpt--chatSet api-urlcmdgpt--url"你的api-url"Know IssueUnable to use commands such ascdandsource.CMDGPT on Windows only supports providing commands, it cannot execute them.
Package: cmdhelper
cmdhelper is a Python utility for writing command line scripts with a
consistent style, default set of command line options, and common
approach to logging.cmdhelper provides:Parsing of command line options using either argparse or optparse.Setup of logging with the possibility to copy stdout or stderr into
the logfile.Possibility to e-mail log messages upon completion with an option
to send the e-mail only if a log message with a severity at or
above a trigger level was recorded.Definition of a set of default options, including options to set
verbosity and logging options.A utility function to run external commands whose output can be
logged and parsed for error messages.A utility function for asking the user to confirm actions.ExampleA script that processes different commands with optional command
arguments might include:from cmdhelper import *

cmdHelper = CmdHelper('argparse', __version__)
cmdHelper.add_argument('cmd', help='command')
cmdHelper.add_argument('args', help='command arguments', nargs='*')
cmdHelper.add_option('-x', '--example', dest='value', default=None, help='sample option')
options = cmdHelper.parse()

try:
    # processing goes here
    pass

except Exception as e:
     handleError(e,options.debug)Running the above code with –help will produce the following output:usage: example.py [-h] [--version] [-i] [-v] [--debug] [--noscreen]
                  [--logfile LOGFILE] [--loglevel LOGLEVEL]
                  [--logseparator LOGSEPARATOR]
                  [--logtimestampfmt LOGTIMESTAMPFMT]  [--emailto EMAILTO]
                  [--emailsubject EMAILSUBJECT] [--emaillevel EMAILLEVEL]
                  [--emailtriglevel EMAILTRIGLEVEL] [-x VALUE]
                  cmd [args [args ...]]

positional arguments:
  cmd                   command
  args                  command arguments

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -i, --interactive     enter interactive Python at completion
  -v, --verbose         verbose output
  --debug               debugging output
  --noscreen            disable logging output to screen
  --logfile LOGFILE     write logging information to this file (default: )
  --loglevel LOGLEVEL   logging level for logfile (default: INFO or DEBUG)
  --logseparator LOGSEPARATOR
                        message to write to logfile at beginning of new log
  --logtimestampfmt LOGTIMESTAMPFMT
                        timestamp format string (in logging formatter format)
  --emailto EMAILTO     email address receiving any log messages
  --emailsubject EMAILSUBJECT
                        subject for log e-mails
  --emaillevel EMAILLEVEL
                        logging level for e-mails (default: WARNING)
  --emailtriglevel EMAILTRIGLEVEL
                        trigger level for sending e-mails (default: None)
  -x VALUE, --example VALUE
                        sample option
Package: cmdict
cmdict ·cmdictnot only is an English-to-Chinese dictionary application with a command-line interface, but also provide out-of-box features like extracting highlighted words from a PDF file. It runs on Linux, macOS, and Windows. Additionally, it can be used as a Python package.How to installThe easiest way is to useHomebrew:brewinstallpastydev/cmdict/cmdictTo install it fromPyPI:pipinstallcmdictHow to use$cmdict--helpUsage: cmdict [OPTIONS] COMMAND [ARGS]...Command line interface.Options:--help  Show this message and exit.Commands:download  Download necessary database before using cmdict.extract   Extract highlighted words with specified color in a PDF file.scan      Scan all words in a txt file and return search results.search    Type in one English word and echo its Chinese translation.To echo Chinese translation for one or multiple English words.$cmdictsearchapple--------applephonetic: 'æpldefinition:- n. fruit with red or yellow or green skin and sweet to tart crisp whitish flesh- n. native Eurasian tree widely cultivated in many varieties for its firm rounded edible fruitstrans:- n. 苹果, 家伙- [医] 苹果collins: 3oxford: 1bnc: 2446frq: 2695$cmdictsearchapplebananaTo extract highlighted words in blue ofsample.pdf:$cmdictextractsample.pdf--colorblue--------applephonetic: 'æpldefinition:- n. fruit with red or yellow or green skin and sweet to tart crisp whitish flesh- n. native Eurasian tree widely cultivated in many varieties for its firm rounded edible fruitstrans:- n. 苹果, 家伙- [医] 苹果collins: 3oxford: 1bnc: 2446frq: 2695Data supportskywind3000/ECDICT: a free English to Chinese dictionary database (英中双解词典数据库).$cmdictdownload--------Downloading the dictionary...100%|████████████████████████| 217M/217M [00:29<00:00, 666MiB/s]cmdict is ready to use!How to contribute
Package: cmdinter
# cmdinter## DescriptionThis is a library that can be used to apply a *command interface* to functions.It's main purpose is to apply the *returncode* convention to python functionsand to give you some control on how to run these functions. E.g. if you need torun a function silently (no stdout), if you need to return the stdout that afunction produces or if you need to prevent a function from throwing errors.`cmdinter` was created for the [buildlib](https://pypi.python.org/pypi/buildlib)package.## API### CmdFuncResultA *cmd function* should return a `CmdFuncResult` object.```pythonclass CmdFuncResult(NamedTuple):returncode: intreturnvalue: Anysummary: str````returncode` Unix returncode convention...`returnvalue` The value the function returns. That would be what you usuallyreturn via the `return` keyword.`summary`, contains a cmd summary with a Status flag (see Status below). E.g.:```[OK] Run apt-get install.[Error] pip install package x.[Skip] Mount hard drive. Drive alrady mounted.```### StatusStatus flags that can be used as `summary` prefix.```pythonclass Status(object):ok: str = '[OK]'error: str = '[ERROR]'skip: str = '[SKIP]'```### run_cmd()This function can be used in case you want to run a child function as a command.You run it like this```pythonresult: CmdResult = run_cmd(func=my_func,args=my_args,kwargs=my_kwargs,silent=True,return_stdout=True,catch_err=False,)```This is from the source code:```pythondef run_cmd(silent: bool = False,return_stdout: bool = False,catch_err: bool = False,) -> Callable:"""This function works in combination with functions that return a'CmdFuncResult' object. With `run_cmd()` you get a some more control overthese functions.Call it like this:run_cmd(silent=True, return_stdout=True)(my_func, args, kwargs)The curried function returns a `CmdResult` object.@silent: Mute child output of child function if set to True.@return_stdout: Return stdout of child function.@catch_err: Catch errors that are raised by child functions and return errormessage with 'CmdResult' object."""# ...```### CmdResultA function that is run via the `run_cmd()` function returns a `CmdResult`object.```pythonclass CmdResult(NamedTuple):returnvalue: Anyreturncode: intsummary: strstdout: Optional[str]stderr: Optional[str]traceback: Optional[str]```The `CmdResult` object is an extended version of `CmdFuncResult`.`stdout` In case you return stdout from a child function, it's stored here.`stderr` In case use the `catch_err` option to catch errors from a child function, it's stored here.`traceback` Error traceback is stored here.
Package: cmdkit
A library for developing command-line applications in Python.Thecmdkitlibrary implements a few common patterns needed by well-formed command-line
applications in Python. It only touches a few concepts but it implements them well.
The idea is to reduce the boilerplate needed to get a full featured CLI off the ground.
Applications developed usingcmdkitare easy to implement, easy to maintain, and easy to
understand.InstallationCmdKitis tested on Python 3.7+ forWindows,macOS, andLinux, and can be installed
from thePython Package IndexusingPip.$ pip install cmdkitDocumentationDocumentation for getting started, the API, and common recipes are available atcmdkit.readthedocs.io.ContributionsContributions are welcome in the form of suggestions for additional features, pull requests with
new features or bug fixes, etc. If you find bugs or have questions, open anIssuehere. If and
when the project grows, a code of conduct will be provided along side a more comprehensive set of
guidelines for contributing; until then, just be nice.
Package: cmdline-AndrikBJavaCCF
This is Python command line applications, for JavaCCFExample of usage:Installation sets up bootstrap commandOpen command line and write:$ pip install cmdline-AndrikBJavaCCFNow, theAndrikBJavaCCFcommand is available:On Unix-like systems, the installation places aAndrikBJavaCCFscript into a
centralizedbindirectory, which should be in yourPATH. On Windows,AndrikBJavaCCF.exeis placed into a centralizedScriptsdirectory which
should also be in yourPATH.Exaples of usagefor get help:$ AndrikBJavaCCF -hfor fix:$ AndrikBJavaCCF -f -p dir
$ AndrikBJavaCCF -f -d dir
$ AndrikBJavaCCF -f -f test.javafor validate:$ AndrikBJavaCCF -v -p dir
$ AndrikBJavaCCF -v -d dir
$ AndrikBJavaCCF -v -f test.java
Package: cmdline-bootstrap
This is a structure template for Python command line applications, ready to be
released and distributed via setuptools/PyPI/pip for Python 2 and 3.Please have a look at the corresponding article:http://gehrcke.de/2014/02/distributing-a-python-command-line-application/UsageClone this repository and adopt the bootstrap structure for your own project.
This is just a starting point, but I hope a good one. From there on, you should
read and followhttp://python-packaging-user-guide.readthedocs.org/en/latest/,
the definite resource on Python packaging.BehaviorFlexible invocationThe application can be run right from the source directory, in two different
ways:Treating the bootstrap directory as a packageandas the main script:$ python -m bootstrap arg1 arg2
Executing bootstrap version 0.2.0.
List of argument strings: ['arg1', 'arg2']
Stuff and Boo():
<class 'bootstrap.stuff.Stuff'>
<bootstrap.bootstrap.Boo object at 0x7f43d9f65a90>Using the bootstrap-runner.py wrapper:$ ./bootstrap-runner.py arg1 arg2
Executing bootstrap version 0.2.0.
List of argument strings: ['arg1', 'arg2']
Stuff and Boo():
<class 'bootstrap.stuff.Stuff'>
<bootstrap.bootstrap.Boo object at 0x7f149554ead0>Installation sets up bootstrap commandSituation before installation:$ bootstrap
bash: bootstrap: command not foundInstallation right from the source tree (or via pip from PyPI):$ python setup.py installNow, thebootstrapcommand is available:$ bootstrap arg1 arg2
Executing bootstrap version 0.2.0.
List of argument strings: ['arg1', 'arg2']
Stuff and Boo():
<class 'bootstrap.stuff.Stuff'>
<bootstrap.bootstrap.Boo object at 0x7f366749a190>On Unix-like systems, the installation places abootstrapscript into a
centralizedbindirectory, which should be in yourPATH. On Windows,bootstrap.exeis placed into a centralizedScriptsdirectory which
should also be in yourPATH.
Package: cmdline-csv2shp
# .csv to .shp file type conversion scriptRequirements :
pip install -r requirements.txtUsage:cd into main direcory and run
python src/csv2shp.pyto convert all csv files in all base_dir  located in ‘main/swirl_csv_files’ into shape files which will be saved to coresponding base dir in’main/swirl_shp_files/’I have provided with examles swirl_csv_files and swirl_shp_files.you can test the programe with removing all folders and files from swirl_shp_files folder and run the script which will automatically create the base dir in swirl_shp_files and put generate .shp files into corrospoding base_dir
Package: cmdline-iaod
This package takes a whole-genome sequence file and an annotation file (a GTF or
GFF3 file in most cases) and uses them to create an SQLite database of
intron annotation information. This package uniquely annotates intron class for
every intron annotated in the annotation file, so it can be used to identify
all U12-dependent introns in any genome with annotated introns.There is also a script called “search_functions.py” that allows one to execute
various queries against the SQLite database without needing to write any SQL.
For more details about executing queries, run the script with no arguments.