Saravanan666/pypi-org huggingface dataset:
Package: argus-ticket-jira
argus_ticket_jiraThis is a plugin to create tickets in Jira fromArgusSettingsTICKET_PLUGIN:"argus_ticket_jira.JiraPlugin"if installed via pipTICKET_ENDPOINT:"https://jira.atlassian.net"or link to self-hosted instance, absolute URLTICKET_AUTHENTICATION_SECRET: Create anAPI token{
    "token": token,
}If you're using a cloud-hosted instance, also add your email address:{
    "token": token,
    "email": email address,
}TICKET_INFORMATION:
Projekt key or id (obligatory)To know which project to create the ticket in the Jira API needs to know
the project key or id of it. To figure out the project key visit the
sectionProject Keyof theJira ticket documentation.To figure out the project id visit thisguide on how to get the project id{
    "project_key_or_id": project_key_or_id,
}Task type (optional)If the tickets should have a different type thanTaskthis need to be declared.{
    "type": "Epic"|"Story"|"Task"|"Bug"|"Subtask"|any other ticket type,
}Custom fields (optional)There are two ways of automatically filling custom fields:Custom fields that are always the same, independent of the incident.
These will be set incustom_fields_setwith the name of the custom field as key and the fixed value as value.{
    "custom_fields_set" : {
        "name_of_custom_field": set_value,
    }
}Custom fields that are filled by attributes of the Argus incident. These are set incustom_fields_mappingwith the name of the custom field as key and the name of the attribute as it is returned by the API  as value (e.g.start_time). If the information can be found in the tags the value consists of a dictionary withtagas the key and the name of the tag as the value (e.g. {"tag": "host"}).{
    "custom_fields_mapping" : {
        "name_of_custom_field": attribute_of_incident,
        "name_of_custom_field": {"tag": name_of_tag},
    }
}A completely filledTICKET_INFORMATIONcould look like this:```
  {
      "project_key_or_id": "AT",
      "type": "Bug",
      "custom_fields_set" : {
          "source": "Argus",
      },
      {
      "custom_fields_mapping" : {
              "start": "start_time",
              "host": {"tag": "host"},
          }
      }

  }
  ```Code styleargus_ticket_jira uses black as a source code formatter. Black can be installed
by running$pipinstallblackA pre-commit hook will format new code automatically before committing.
To enable this pre-commit hook, run$pre-commitinstall
Package: argus-ticket-rt
argus_ticket_rtThis is a plugin to create tickets in Request Tracker fromArgusThe API supported is RT V2. RT 4.4 needsRT::Extension::REST2to support V2, while RT 5.0.0 and later has the support included.SettingsTICKET_ENDPOINT: Link to instance, absolute URLTICKET_AUTHENTICATION_SECRET: Standard username/password or token:{
    "username": username,
    "password": password
}or{
    "token": token
}It is recommended to create an RT API user and to ensure that that user has
the necessary authorization for creating tickets in the relevant queue.Username and password login can be disabled if the login happens through an
external provider. In that case an authentication token should be used.If authentication tokens are enabled in RT they can be created under
"Logged in as ..." -> "Settings" -> "Auth tokens".This could however be turned off side-wide or just for that specific user.
In that case please contact the responsible RT administrator.TICKET_INFORMATION:Queue (obligatory){
    "queue": queue_name
}Custom fields (optional)There are two ways of automatically filling custom fields:Custom fields that are always the same, independent of the incident.
These will be set incustom_fields_setwith the name of the custom field as key and the fixed value as value.{
    "custom_fields_set" : {
        "name_of_custom_field": set_value,
    }
}Custom fields that are filled by attributes of the Argus incident. These are set incustom_fields_mappingwith the name of the custom field as key and the name of the attribute as it is returned by the API  as value (e.g.start_time). If the information can be found in the tags the value consists of a dictionary withtagas the key and the name of the tag as the value (e.g. {"tag": "host"}).{
    "custom_fields_mapping" : {
        "name_of_custom_field": attribute_of_incident,
        "name_of_custom_field": {"tag": name_of_tag},
    }
}LibraryThe library used isrtinstead ofrt-clientbecause "rt-client" does not support token authentication.Code styleargus_ticket_rt uses black as a source code formatter. Black can be installed
by running$pipinstallblackA pre-commit hook will format new code automatically before committing.
To enable this pre-commit hook, run$pre-commitinstall
Package: argusvision
Argus Visionargusvision package provides easy to use access to image embedding models pretrained on Bing data - Argus Vision models.
Interface is based on popular torchvision.In version 1.0, supported model is Argus Vision V6 - resnext101 32x8dPlease note that provided models are offering image embeddingsInstallationpip install argusvisionFor Windows, torch needs to be install from wheel file.
Please download the latest torch from here:https://download.pytorch.org/whl/torch_stable.htmland then install it using: pip install <.whl file>UsageInput images should be inBGRformat of shape (3 x H x W), where H and W are expected to be at least 224.
The images have to be loaded in to a range of [0, 1] and then normalized using mean = [0.485, 0.456, 0.406] and std = [0.229, 0.224, 0.225].Example script:import argusvision
import torch

# This will load pretrained model
model = argusvision.models.resnext101_32x8d()

# This will initialize weights with default values
model = argusvision.models.resnext101_32x8d(pretrained=False) 

# Load model to CPU memory, interface is the same as torchvision
model = argusvision.resnext101_32x8d(map_location=torch.device('cpu'))Example of creating image embeddings:import argusvision
from torchvision import transforms
import torch
from PIL import Image

def get_image():
    img = cv2.imread('example.jpg', cv2.IMREAD_COLOR)
    img = cv2.resize(img, (256, 256))
    img = img[16:256-16, 16:256-16]
    preprocess = transforms.Compose([
        transforms.ToTensor(),
        transforms.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
    ])
    return preprocess(image).unsqueeze(0) # Unsqueeze only required when there's 1 image in images batch

model = argusvision.models.resnext101_32x8d(map_location=torch.device('cpu'))
features = model(get_image())
print(features.shape)Should output...
torch.Size([1, 2048])BenchmarksHere are the evaluations of the popular datasetsModelCIFAR-10STL-10Torchvision, ResNext101 32x8d90%81.1%Argusvision, ResNext101 32x8d92.6%84.2%
Package: argutil
argutilWrapper for argparse that uses JSON config files to define command line
parsersChangelogv1.1.9Add auto-deploy via Travis-CIv1.1.6Fix bug with auto-detected script pathv1.1.5Add jsonschema validation for definitions fileAdd example for template usageAdd tests for submodules and templatesv1.1.4Add callable() decorator to replace env parameter in get_parserbool added to primitive typesv1.1.3Fix load/save within ParserDefinitionFix get/set defaults for submodulesAdd default func for submodulesv1.1.1ParserDefinition.__init__() and get_parser() no longer require an explicit filepathv1.1.0API: abstract parser definition functionality behind class ParserDefinitioncreate CHANGELOG.rstv1.0.7fix package metadataMIT LicenseCopyright (c) 2018 Corey McCandlessPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: argutils
argutilsprovides a set of functions for quickly building command-line programs with matching config files. In particular, instead of separately building an ArgumentParser and ConfigParser,argutilslets the user build an interface from a JSON or YAML file, and then uses that to build both an argument parser and matching config file.Installation$pipinstallargutilsUsage exampleLet’s say we have a toy program that takes three arguments: a message to print, the number of times to print it, and where to print it. We have two files, an argument spec file we’ll callexample_spec.yml, and our program,example.py.Inexample_spec.yml:_meta:help:>A program that prints a message some number of times to an outputfilemessage:help:the message to printdefault:"Helloworld!"times:help:how many times to print the messagedefault:3type:intoutput:help:where to write the file_exclude:Truedefault:stdouttype:File-winit:help:write a config file with default values_exclude:Trueargtype:flagInexample.py:try:importConfigParserexceptImportError:importconfigparserasConfigParserimportargutilsfromargutilsimport(read,export)SPEC_FILE='example_spec.yml'CONF_FILE='example.cfg'defmain():# Used in the config file and argument parser's helpprog_name='example.py'config=ConfigParser.SafeConfigParser()# Read the spec and build a parser from itargsdict=read.from_yaml(open(SPEC_FILE).read())parser=export.to_argparser(prog_name,argsdict)# If the config file exists and we can read it, use it to set the# defaultsifconfig.read(CONF_FILE):parser=argutils.set_parser_defaults(parser,config)args=parser.parse_args()ifargs.init:export.to_config_file(prog_name,argsdict,CONF_FILE)for_inrange(args.times):args.output.write(args.message+'\n')if__name__=='__main__':main()Let’s see what we’ve got:$pythonexample.py--helpusage:example.py[-h][--messageMESSAGE][--timesTIMES][--outputOUTPUT][--init]Aprogramthatprintsamessagesomenumberoftimestoanoutputfileoptionalarguments:-h,--helpshowthishelpmessageandexit--messageMESSAGEthemessagetoprint--timesTIMEShowmanytimestoprintthemessage--outputOUTPUTwheretowritethefile--initwriteaconfigfilewithdefaultvaluesWe can see that all the arguments we specified in the YAML file are here. Let’s write a config file and check that out:$pythonexample.py--init$catexample.cfg## A program that prints a message some number of times to an output file[example.py]# the message to printmessage=Helloworld!# how many times to print the messagetimes=3Note that two arguments don’t show up here:outputandinit. These were excluded using the_excludeflag in the YAML file. This is useful for arguments that shouldn’t be set using a config file, including one-time arguments.Let’s test it:$pythonexample.pyHelloworld!Helloworld!Helloworld!$pythonexample.py--times1Helloworld!We can specify the arguments either with command-line flags or by modifying the values in the config file. Values specified on the command line take precedence, followed by the config file values, and resorting to the spec file defaults if nothing else is given.
Package: argv
Simpler command line argument parsingIn the spirit of`optimist<https://github.com/substack/node-optimist>`__: less
magic, more flexibility.pi install argvQuickstartManual specification of arguments, no configuration:import argv
argv.parse(['-i', 'input.txt', '-z', '--verbose'])
>>> {'i': 'input.txt', 'verbose': True, 'z': True}Usessys.argv(without the executable name) if no argument list is
given:import sys
sys.argv
>>> ['/usr/local/bin/bottler', 'exec', 'prog.py', '--debug']
argv.parse()
>>> {'_': ['exec', 'prog.py'], 'debug': True}Configuration:parser = argv.Parser()
parser.add('action')
parser.add('target')
parser.add('-d', '--debug')
parser.parse(['exec', 'prog.py', '--debug'])
>>> {'action': 'exec', 'd': True, 'debug': True, 'target': 'prog.py'}TestingContinuous integration:Or run tests locally:python setup.py testDevelopmentTerminology:flag: a command line argument marked with a double dash or each
component of a group denoted by a single dash. E.g.,--verbose--logfilelogs/app.txthas two flags:verboseandlogfile.-czfarchive.tgz app/has three flags:c,z, andf.token: a white-space separated command line item. E.g.,`–input= –logfile logs/app.txtRelated librarieshttps://github.com/docopt/docopthttp://docs.python.org/2/library/argparse.htmlhttp://docs.python.org/2/library/optparse.html(Deprecated)TODO: write about differences between this library (argv) and these
libraries, relative merits of each, opposing philosophies, etc.LicenseCopyright (c) 2013 Christopher Brown.MIT
Licensed.
Package: argvparser
ArgvParserArgvParser allows to format an argument vector in a structure easier to read and use for command line applications.Installationpython -m pip install argvparserImportationimport argvparserUsingimport argvparser
import sys

args = argvparser.argvparser.parse(sys.argv)DocumentationArgvParser.parseFormate arguments vector to a dictionnary:param argv: The arguments vector
:type argv: list:return: The formated arguments
:rtype: dict:raise Exception: Argument assigned to any option:Example:Parsing with several concatenated options>>> argvparser.argvparser.parse(['app.py', 'ls', '-lar', '42', '--float', '3.14'])
{
    'app': 'app',
    'command': 'ls',
    'options': {
        '-l': None,
        '-a': None,
        '-r': 42,
        '--float': 3.14
    }
}Parsing without command specified>>> argvparser.argvparser.parse(['app.py', '--print', 'My message I want to print', '-i'])
{
    'app': 'app',
    'command': None,
    'options': {
        '--print': 'My message I want to print',
        '-i': None
    }
}Parsing with duplicated options>>> argvparser.argvparser.parse(['app.py', '-v', '/var/www', '-i', '-v', '/var/bin/bash'])
{
    'app': 'app',
    'command': None,
    'options': {
        '-v': [
            '/var/www',
            '/var/bin/bash'
        ],
        '-i': None
    }
}ArgvParser.parse_multi_optionsRetrieves multiple argument (like -li) and reconstruct it to a correct format:param argv: The arguments vector
:type argv: list:return: Correctly formated arguments vector
:rtype: list:Example:>>> argvparser.argvparser.parse_multi_options(['app.py', '-liar', '--test'])
['app.py', '-l', '-i', '-a', '-r', '--test']ArgvParser.is_optionCheck if the argument in parameter is an option or not:param arg: The argument to control
:type arg: str:return: True if arg is an option, else false
:rtype: bool:Example:>>> argvparser.argvparser.is_option('-t')
True

>>> argvparser.argvparser.is_option('--test')
True

>>> argvparser.argvparser.is_option('test')
FalseArgvParser.parse_typeConvert the passed argument into the appropriate type:param arg: The argument to convert
:type arg: str, None:return: The converted argument
:rtype: int, float, str, None:note: The default type returned is a str:Example:>>> argvparser.argvparser.parse_type('test')
'test'

>>> argvparser.argvparser.parse_type('42')
42

>>> argvparser.argvparser.parse_type('3.14')
3.14
Package: argvsucks
argvsucks { argv to dict }Latest Release|Current Code|API DocumentationInstallation...as a standalone lib# Set up a virtualenv.python3-mvenvvenvsourcevenv/bin/activate# Install from PyPI...pipinstall--upgradepip
pipinstall-Uargvsucks# ...or, install from updated source code.pipinstallgit+https://github.com/argvsucks/argvsucks...from sourcegitclonehttps://github.com/argvsucks/argvsuckscdargvsucks
poetryinstallExamplesUsagefromargvsucksimporthandle_command_linedct=handle_command_line(["program ···","start","end=0","finish","n=5","name=Foo","lst=a,b,c"],n=int,start=False,end=bool,lst=list)print(dct)"""{'start': True, 'end': False, 'finish': True, 'n': 5, 'name': 'Foo', 'lst': ['a', 'b', 'c']}"""VersioningWhile the version scheme has a meaningful calendar component (minor=yymmdd), it is still compatible with semantic versioning.
For instance, the version0.230215.1meansmajor=0,minor=230215,micro/patch=1. Notes:Whilemajor=0, some compatibility-breaking changes may occur.Frommajor=1onwards, compatibility-breaking changes increment it, and update the minor version to reflect the release date.New (non breaking) features update only the minor version to reflect the release date.Bug fixes (including compatibility-breaking ones) increment only the micro version.ContributingDonationCurrently there are no established forms of donation.
Expenses:Programming hoursSupportCustom featuresDomain name maintenance yearly costs
Package: argy
argyArgy is a simple tool for creating CLI programs using python, it tries to remove all the fuzz that comes with the standard library.Usageimport argy


@argy
def add_numbers(x, y, subtract=False):
    """Adder of numbers
    Just adds two numbers, nothing really special about it

    :param x: The first number
    :type x: int
    :param y: The second number
    :type y: int
    :param subtract: Should we subtract instead?
    :type subtract: bool
    """
    if not subtract:
        return x + y
    else:
        return x - yThis will create a CLI-program with the expected arguments, see also example.py$ python example.py -h
usage: example.py [-h] [--subtract SUBTRACT] x y

positional arguments:
x                    The first number
y                    The second number

optional arguments:
-h, --help           show this help message and exit
--subtract SUBTRACT  Should we subtract instead?ContributionsContributions are welcome!
Package: argyle
Argyle is a collection of Fabric utilities for Django deployment. This project
is still in very early phases.RequirementsFabric >= 1.1Jinja2 >= 2.3These tasks were written primarily for deployments on Ubuntu Linux. Your
mileage may vary with other operating systems and flavors of Linux.Questions or Issues?If you have questions, issues or requests for improvements please let me know onGithub.
Package: aria2
Aria2 Wheelpython wheel for aria2 static buildCI/CDCodePackageMetaDocumentation:https://wsh032.github.io/aria2-wheel/Source Code:https://github.com/WSH032/aria2-wheel/Introductionaria2is a lightweight multi-protocol & multi-source command-line download utility.It's easy to install aria2 on Linux (apt install aria2), however it's not easy to install aria2 on Windows (at least can't one-click to install).So I build this python wheel to binding aria2 static build. You can install it bypipfrompypion Windows.Now, we support:manylinux_2_17_x86_64musllinux_1_1_x86_64manylinux_2_17_aarch64musllinux_1_1_aarch64win_amd64win32Featuresaria2-wheelinternally bundles the aria2c binary and utilizes theentry_pointtechnology.Therefore, it does not modify your system'sPATHenvironment variable, and there is no need forsudopermissions.You can completely uninstall it by runningpip uninstall aria2.Creditsaria2This project is notaria2official project.aria2-static-buildThe bound aria2 executable file directly comes fromaria2-static-buildproject, andaria2-wheelassumes no responsibility for your use.The license ofaria2-wheelproject is consistent witharia2-static-buildproject.checkhatch_build.pyand.github/workflows/publish.ymlto know how we build the wheel.Installpipinstallaria2or install in global environment withpipx# https://pypa.github.io/pipx/pipxinstallaria2Usagecli usageAll api is the same asaria2aria2c--helporpython-maria2c--helpctrl + c,ctrl + break,kill <pid>will work well, even exit code.subprocess.PopenDo not shutdown the subprocess byPopen.terminate()orPopen.kill(), which can not shutdown aria2 subprocess properly.Use following code instead:importosimportsignalimportsubprocessimportsysfromsubprocessimportPopenfromtypingimportTypedDictclassWin32PopenKwargs(TypedDict):"""Popen kwargs for Windows."""creationflags:intclassUnixPopenKwargs(TypedDict):"""Popen kwargs for Unix."""start_new_session:boolpopen_kwargs=(UnixPopenKwargs(start_new_session=True)ifsys.platform!="win32"elseWin32PopenKwargs(creationflags=subprocess.CREATE_NEW_PROCESS_GROUP))withPopen(args=("aria2c","--enable-rpc"),**popen_kwargs)asp:try:# Do whatever you want here....finally:# following code can shutdown the subprocess gracefully.ifsys.platform=="win32":# https://stackoverflow.com/questions/44124338/trying-to-implement-signal-ctrl-c-event-in-python3-6os.kill(p.pid,signal.CTRL_BREAK_EVENT)else:os.killpg(os.getpgid(p.pid),signal.SIGINT)developmentIf you find any issues, please don't hesitate toopen an issue.If you need assistance, feel free tostart a discussion.Follow ourCONTRIBUTING.md,PR Welcome!Security 😰❗: We value any security vulnerabilities,please report to us privately, pretty appreciated for that.English is not the native language of the author (me), so if you find any areas for improvement in the documentation, your feedback is welcome.If you think this project helpful, consider giving it a star, which makes me happy. :smile:
Package: aria2-dht-dat-parser
aria2_dht_dat_parserparse aria2's dht.dat into human-readable jsonInstallpipinstallaria2-dht-dat-parserUsageuse as a cli toolaria2-dht-dat-parser-idht.dat[-odht.json]use as a python modulefromaria2_dht_dat_parserimportparseresult=parse('dht.dat')Parsed Result Example{"format_id":2,"version":3,"file_saved_time":1620000000,"local_node_id":"xxxxxxxxxxxxxxxxxxxx","num_node":100,"nodes":[{"ip":"127.0.0.1","port":6881,"id":"xxxxxxxxxxxxxxxxxxxx"},...]}LicenseMIT
Package: aria2jrpc
Aria2jrpcA wrapper aroundAria2 JSON-RPCExample usagefromaria2jrpcimportAria2JRPCaria2_client=Aria2JRPC("http://127.0.0.1:6800",secret="your-secure-secret")gid=aria2_client.add_uri("http://example.com/file.zip")aria2_client.pause(gid)