Saravanan666/pypi-org huggingface dataset:
Package: quickrspecpuppet
# quickrspecpuppetPython CLI that allows you to quickly create basic rspec tests for your puppet modules## Get StartedInstall `quickrspecpuppet` using one of the following:$ pip install quickrspecpuppet$ python setup.py installRun `quickrspecpuppet` in the root directory of your puppet module:$ quickrspecpuppet## UsageQuickly create basic rspec tests for your puppet modules```Usage:quickrspecpuppet [ --directory=DIRECTORY ] [ --force ] [ --verbose ]quickrspecpuppet (-h | --help)Options:-d, --directory=DIRECTORY Base directory of puppet module [default: os.cwd]-f, --force               Overwrite tests if they exist-v, --verbose             Enable verbose logging-h, --help                Show this screen.```## PackagingBuilding an RPM:```make rpms```
Package: quickrun
quickrunquickrun is a module designed to make it easy to run commands and gather info from multiple servers.Dependenciespython3.8aws cli (v1)Getting startedSetupInstall:pip3 install quickrunUse:importquickrunfromquickrun.cli.awsimportfind_instances# Define instanceqr=quickrun.QuickRun()# Configureqr.servers=[quickrun.Server(host="my-ip-address-or-hostname",name="my-web-server",user="username")]# or from aws cliqr.servers=quickrun.Servers.from_list(find_instances({'tag:environment':'production','tag:name':'*web*'},region='eu-west-1'))qr.commands=[quickrun.Command(name="Get openssl version",cmd="openssl version")]qr.formatter=quickrun.formatters.table# Callqr.main()qr.display()This will display something like:Results
┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ server             ┃ host        ┃ command         ┃ output                     ┃
┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ my-instance-name-1 │ 192.168.0.1 │ openssl version │ OpenSSL 1.1.1  11 Sep 2018 │
│ my-instance-name-2 │ 192.168.0.1 │ openssl version │ OpenSSL 1.1.1  11 Sep 2018 │
│ my-instance-name-3 │ 192.168.0.1 │ openssl version │ OpenSSL 1.1.1  11 Sep 2018 │
│ my-instance-name-4 │ 192.168.0.1 │ openssl version │ OpenSSL 1.1.1  11 Sep 2018 │
└────────────────────┴─────────────┴─────────────────┴────────────────────────────┘Making a scriptOption 1: Basic script using some of the functionsYou can just write a normal python script and use some of the functions from this module.Seeexamples/healthcheck.pyas an example.Option 2: Calling out to QuickRunThere is also the baseQuickRunclass which can be configured and called.Seeexamples/openssl-version.pyandexamples/list-logs.pyas examples.Option 3: Extending QuickRunYou could also create your own class extending fromQuickRun.This is handy since you can override thehook methods.Seeexamples/get-memory-settings.pyas an example.HelpersThere are a few core helpers built in to quickrun.FormattersThere are a few formatters defined inquickrun.formattersdefault: Just prints out the python objectnone: Does nothingfake_shell: Formats the run as if it was ran directlytable: Outputs the run as a tablecli.awsThere is also a helpfulquickrun.cli.aws.find_instances()function that takes a dict of filters and returns matching instances.Example:find_instances({'tag:name':'web','tag:environment':'prod'},region='eu-west-1')cli.helpersThere is a collection of misc CLI helpers inquickrun.cli.helpers.Currently there is onlychallenge(expect: str) -> boolwhich prompts the user to re-enter a value.HooksTODO
Package: quicksave
A (very) simple file versioning systemVersion:1.7.0Detailed documentation on the available commands can be found on thequicksave wikiGetting started:The first thing you’ll need to do is create a new database where
quicksave can store its data:$ quicksave init <path>That will setup the new database so it’s ready to use.After that, you’re good to go. You canregisternew files so they’re
tracked by quicksave,savenew states of registered files, andrevertto previously saved states. There are several other commands
which modify the database itself, but I’m only covering those three
listed commands in this guide (and none of their various options). For
detailed documentation on all of the available commands, check out thewiki page.To track (AKA register) a new file in quicksave use:$ quicksave register <filepath>Which will copy the initial state of the file, and provide the names of
the file and state keys you’ll need use this file. For a brief
description of file and state keys, seethis
noteon the wiki.To then save a new state of the file, use the save command:$ quicksave save <filepath>Quicksave will use the the absolute path and the base file name derived
fromfilepathto automatically decide which file key to use.Lastly, to get the file back into a previously saved state, use the
revert command:$ quicksave revert <filepath> <state>Again, quicksave will attempt to determine which file key to use based
on the absolute path and the file name. Quicksave will lookup the
providedstatekey and revert the file.
Package: quick-sci-plot
Quick Scientific PlotThe toolkit aims to plot neat charts and figures given datasets for scientific publications.ExamplesExample 1: Word frequency statfromquick_sci_plotimport*importpickle# load a dictionary (term, count)dict_tags_count=pickle.load(open("datasets/dict_tags_count.pickle","rb"))plot_bar(dict_tags_count)Example 2: Performance changefromquick_sci_plotimport*metrics=['UMass','C_V','NPMI','UCI']sub_fig=['(a)','(b)','(c)','(d)']csv_path="datasets/topic model performance.csv"plot_reg(csv_path,sub_fig=sub_fig,metrics=metrics,x_label='Number of topics')LicenseThequick-sci-plottoolkit is provided byDonghua Chenwith MIT License.
Package: quickscope
QuickscopeQuickscope is a lightweight exploit thrower for attack-defense CTFs.
This entails being able to communicate with a game interface (thetracker) and being able to launch exploits (theshooter).pip install quickscopeHow do I write an exploit?Write an ordinary script that takes its input as the environment variables$HOSTand$FLAG_ID.
You should hardcode the port used for the service, unless it is a very special variable service, in which case you should use$PORT.chmod +xthe script and make sure it has a shebang.
You should put the textx-service-name: servicenamein your script somewhere so that the shooter knows to shoot it against the serviceservicename.How do I launch an exploit?quickscope --everyone --script my_exploit.pyYour exploit must contain the textx-service-name: <myservice>, where<myservice>is replaced with the name of the service to fire at.How do I launch all my exploits forever?quickscope --forever --corpus my_exploitsThe difference between --everyone and --forever is that --everyone only shoots at each target for the current tick once.How do I set up the tracker?In order for quickscope (the shooter) to fire exploits, it needs to be able to connect to the tracker.
The tracker is a python file that you should write for each CTF. Here's an example of it:fromquickscope.trackerimportTrackerclassMyTracker(Tracker):...if__name__=='__main__':MyTracker.main()You should implement the values marked as not implemented in tracker.py - this meansFLAG_REGEX,get_status,submit_flags, andinstrument_targets.
Seefake/stub_tracker.pyfor an example implementation!You can then directly run your script and it will start tracking the game.If you're running the tracker in a non-hardcoded location, you will need to specify the--serverargument to the shooter.
Package: quicksect
DescriptionQuicksect is a fast python / cython implementation of interval search based on the pure python version inbx-pythonI pulled it out, optimized and converted to cython and James Taylor has incoporated it back into bx-python
with his improvements.I have brought this project back from the dead because I want a fast, simple, no-dependencies Interval
tree.License is MIT.Installationpip install quicksectorconda install -c bioconda quicksectUse>>> from quicksect import IntervalNode, Interval, IntervalTreeMost common use will be via IntervalTree:>>> tree = IntervalTree()
>>> tree.add(23, 45)
>>> tree.add(55, 66)
>>> tree.search(46, 47)
[]
>>> tree.search(44, 56)
[Interval(55, 66), Interval(23, 45)]>>> tree.insert(Interval(88, 444))
>>> res = tree.find(Interval(99, 100))
>>> res
[Interval(88, 444)]
>>> res[0].start, res[0].end
(88, 444)Thats pretty much everything you need to know about the tree.Test$ python setup.py testLow-LevelIn some cases, users may want to utilize the lower-level interface that accesses
the nodes of the tree:>>> inter = IntervalNode(Interval(22, 33))
>>> inter = inter.insert(Interval(44, 55))
>>> inter.intersect(24, 26)
[Interval(22, 33)]>>> inter.left(Interval(34, 35), n=1)
[Interval(22, 33)]>>> inter.right(Interval(34, 35), n=1)
[Interval(44, 55)]
Package: quicksectx
DescriptionQuicksect is a fast python / cython implementation of interval search based on the pure python version inbx-pythonI pulled it out, optimized and converted to cython and James Taylor has incoporated it back into bx-python
with his improvements.I have brought this project back from the dead because I want a fast, simple, no-dependencies Interval
tree.(https://github.com/brentp/quicksect)Extended with removal operations and allows pretty print to display tree structure (By Jianlin)License is MIT.Installationpip install quicksectxUseTo use extended quicksect(quicksectx):>>> from quicksectx import IntervalNode, IntervalTree, Interval
>>> tree = IntervalTree()
>>> tree.add(1, 3, 100)
>>> tree.add(3, 7, 110)
>>> tree.add(2, 5, 120)
>>> tree.add(4, 6, 130)
>>> print(tree.pretty_print())
Inv(1, 3, d=100)
r:  Inv(3, 7, d=110)
l:    Inv(2, 5, d=120)
r:    Inv(4, 6, d=130)
>>> print(tree.find(Interval(2, 5)))
[Inv(1, 3, d=100), Inv(3, 7, d=110), Inv(2, 5, d=120), Inv(4, 6, d=130)]
>>> tree.remove(Interval(2, 5))
>>> print(tree.find(Interval(2, 5)))
[Inv(1, 3, d=100), Inv(3, 7, d=110), Inv(4, 6, d=130)]To use traditional quicksect, you can still using the same syntax:>>> from quicksect import IntervalNode, Interval, IntervalTreeMost common use will be via IntervalTree:>>> tree = IntervalTree()
>>> tree.add(23, 45)
>>> tree.add(55, 66)
>>> tree.search(46, 47)
[]
>>> tree.search(44, 56)
[Interval(55, 66), Interval(23, 45)]>>> tree.insert(Interval(88, 444, 'a'))
>>> res = tree.find(Interval(99, 100, 'b'))
>>> res
[Interval(88, 444)]
>>> res[0].start, res[0].end, res[0].data
(88, 444, 'a')Thats pretty much everything you need to know about the tree.Test$ python setup.py testLow-LevelIn some cases, users may want to utilize the lower-level interface that accesses
the nodes of the tree:>>> inter = IntervalNode(Interval(22, 33))
>>> inter = inter.insert(Interval(44, 55))
>>> inter.intersect(24, 26)
[Interval(22, 33)]>>> inter.left(Interval(34, 35), n=1)
[Interval(22, 33)]>>> inter.right(Interval(34, 35), n=1)
[Interval(44, 55)]Since 0.3.7, you can use python’s native pickle to pickle an IntervalTree object. For details, checktest_serialization.pyFor DevNow the version specification has been integrated with setup.py and pyproject.toml. To update versions, only need to change the __version__ inquicksectx/__init__.py
Package: quick-secure
Quick SecureString encryptionInstallpipinstallquick-secureUsageimportquick_securemessage="sample message for encryption"password="confidential"# Encrypt messageencrypted_message=quick_secure.encrypt(message,password)print(encrypted_message)# Decrypt messagedecrypted_message=quick_secure.decrypt(encrypted_message,password)print(decrypted_message)
Package: quickselect
quickselectIn what followspythonis an alias forpython3.5or any later
version (python3.6and so on),pypyis an alias forpypy3.5or any later
version (pypy3.6and so on).InstallationInstall the latestpip&setuptoolspackages versions:withCPythonpython-mpipinstall--upgradepipsetuptoolswithPyPypypy-mpipinstall--upgradepipsetuptoolsUserDownload and install the latest stable version fromPyPIrepository:withCPythonpython-mpipinstall--upgradequickselectwithPyPypypy-mpipinstall--upgradequickselectDeveloperDownload the latest version fromGitHubrepositorygitclonehttps://github.com/lycantropos/quickselect.gitcdquickselectInstall dependencies:withCPythonpython-mpipinstall--force-reinstall-rrequirements.txtwithPyPypypy-mpipinstall--force-reinstall-rrequirements.txtInstall:withCPythonpythonsetup.pyinstallwithPyPypypysetup.pyinstallUsage>>>fromquickselectimportfloyd_rivest,hoare>>>sequence=list(range(-100,101))>>>key=abs>>>(floyd_rivest.nth_largest(sequence,0,key=key)...==hoare.nth_largest(sequence,0,key=key)...==max(sequence,key=key))True>>>(floyd_rivest.nth_smallest(sequence,0,key=key)...==hoare.nth_smallest(sequence,0,key=key)...==min(sequence,key=key))TrueDevelopmentBumping versionPreparationInstallbump2version.Pre-releaseChoose which version number category to bump followingsemver
specification.Test bumping versionbump2version--dry-run--verbose$CATEGORYwhere$CATEGORYis the target version number category name, possible
values arepatch/minor/major.Bump versionbump2version--verbose$CATEGORYThis will set version tomajor.minor.patch-alpha.ReleaseTest bumping versionbump2version--dry-run--verbosereleaseBump versionbump2version--verbosereleaseThis will set version tomajor.minor.patch.Running testsInstall dependencies:withCPythonpython-mpipinstall--force-reinstall-rrequirements-tests.txtwithPyPypypy-mpipinstall--force-reinstall-rrequirements-tests.txtPlainpytestInsideDockercontainer:withCPythondocker-compose--filedocker-compose.cpython.ymlupwithPyPydocker-compose--filedocker-compose.pypy.ymlupBashscript (e.g. can be used inGithooks):withCPython./run-tests.shor./run-tests.shcpythonwithPyPy./run-tests.shpypyPowerShellscript (e.g. can be used inGithooks):withCPython.\run-tests.ps1or.\run-tests.ps1cpythonwithPyPy.\run-tests.ps1pypy
Package: quicksemble
QuicksembleQuicksembleis a simple package to create a stacked ensemble for quick
experiments. It is developed inT2P Co., Ltd.DependenciesNumpypip install numpyScikit Learnpip install scikit-learnXgboostpip install xgboostInstallationpip install quicksembleBasic Usagefromsklearn.ensembleimportRandomForestClassifierfromxgboostimportXGBClassifierfromquicksemble.ensemblerimportEnsembler## Define train and test dataset here#models=[RandomForestClassifier(random_state=21),XGBClassifier(random_state=21)]# Default meta classifier is LogisticRegression. Hence it is weighted voting.ensemble=Ensembler(models)ensemble.fit(X_train,y_train)ensemble.predict(X_test)To change the default meta classifer:fromsklearn.ensembleimportRandomForestClassifierfromxgboostimportXGBClassifierfromquicksemble.ensemblerimportEnsembler## Define train and test dataset here#models=[RandomForestClassifier(random_state=21),XGBClassifier(random_state=21)]# Use Neural Network as meta classifierensemble=Ensembler(models,meta_model=MLPClassifier())ensemble.fit(X_train,y_train)ensemble.predict(X_test)By default, Base models use "hard" voting, i.e., it outputs predictions of the
base models. We can switch it to "soft" voting, i.e., it outputs probabilities
of each class by the base model.To change voting style:fromsklearn.ensembleimportRandomForestClassifierfromxgboostimportXGBClassifierfromquicksemble.ensemblerimportEnsembler## Define train and test dataset here#models=[RandomForestClassifier(random_state=21),XGBClassifier(random_state=21)]# Use soft voting.ensemble=Ensembler(models,voting='soft')ensemble.fit(X_train,y_train)ensemble.predict(X_test)To view output of intermediary state i.e., output of base layers (layer 1)
that is going into meta layer (layer 2). Internally, it uses Pipelines from
scikit-learn. So, feel free to read docs about pipelines.ensemble=Ensembler(models,voting='soft')ensemble.fit(X_train,y_train)# This line will output the values. Note that you need to fit it first.ensemble.ensemble.named_steps['base_layer'].transform(X_train)For already saved models, use modelpaths. Note that it should be pickled.es=Ensembler(modelpaths=['rf.pkl','xg.pkl'])es.fit(X_train,y_train)es.predict(X_train)
Package: quicksets
Quicksets is a lightweight settings library based on Python classes.No dependency!It provides inheriting settings classes.
Rewrite just attributes that you really need to change:>>> # File: `myapp.settings.develop.py`
>>> class DevelopConfig:
...     POSTGRESQL_HOST = 'localhost'
...     POSTGRESQL_PORT = 5432
...     POSTGRESQL_USERNAME = 'postgres'
...     POSTGRESQL_PASSWORD = None
...     POSTGRESQL_DATABASE = 'db'
...     POSTGRESQL_POOL_MIN_SIZE = 4
...     POSTGRESQL_POOL_MAX_SIZE = 32
...     POSTGRESQL_POOL_RECYCLE = True
...
...     @property
...     def POSTGRESQL_CONNECTION_OPTIONS(self):
...         return {
...             'user': self.POSTGRESQL_USERNAME,
...             'password': self.POSTGRESQL_PASSWORD,
...             'host': self.POSTGRESQL_HOST,
...             'port': self.POSTGRESQL_PORT,
...             'database': self.POSTGRESQL_DATABASE,
...             'minsize': self.POSTGRESQL_POOL_MIN_SIZE,
...             'maxsize': self.POSTGRESQL_POOL_MAX_SIZE,
...             'pool_recycle': self.POSTGRESQL_POOL_RECYCLE
...         }
...>>> # File: `myapp.settings.testing.py`
>>> from myapp.settings.develop import DevelopConfig
>>>
>>> class TestingConfig(DevelopConfig):
...     POSTGRESQL_DATABASE = 'db_test'
...>>> # File: `myapp.settings.product.py`
>>> from myapp.settings.develop import DevelopConfig
>>>
>>> class ProductConfig(DevelopConfig):
...     POSTGRESQL_HOST = '10.0.0.1'
...     POSTGRESQL_DATABASE = 'db_prod'
...     POSTGRESQL_USERNAME = 'prod_user'
...     POSTGRESQL_PASSWORD = '?????????'
...>>> # File: `myapp.application.py`
>>> # run bash command `export SETTINGS="myapp.settings.product"`
>>> from quicksets import settings
>>>
>>> settings.POSTGRESQL_CONNECTION_OPTIONS
{'minsize': 4, 'maxsize': 32, 'host': '10.0.0.1', 'user': 'prod_user', 'database': 'db_prod', 'pool_recycle': True, 'password': '?????????', 'port': 5432}copyright:Copyright 2019-2020 by the Ihor Nahuliak, see AUTHORS.license:GNU General Public License v3 (GPLv3), see LICENSE for details.Home-page:https://github.com/ihor-nahuliak/quicksetsAuthor: Ihor Nahuliak
Author-email:ihor.nahuliak@gmail.comLicense: GPL v.3.0
Description: UNKNOWN
Platform: any
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Development Status :: 1 - Planning
Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
Provides-Extra: dev
Package: quickshear
Quickshear uses a skull stripped version of an anatomical images as a reference
to deface the unaltered anatomical image.Usage:quickshear.py [-h] anat_file mask_file defaced_file [buffer]

Quickshear defacing for neuroimages

positional arguments:
  anat_file     filename of neuroimage to deface
  mask_file     filename of brain mask
  defaced_file  filename of defaced output image
  buffer        buffer size (in voxels) between shearing plane and the brain
                (default: 10.0)

optional arguments:
  -h, --help    show this help message and exitFor a full description, see the following paper:[Schimke2011]Schimke, Nakeisha, and John Hale. “Quickshear defacing for neuroimages.”
Proceedings of the 2nd USENIX conference on Health security and privacy.
USENIX Association, 2011.
Package: quick-sketches
Quick SketchesWhile implementing a paper, we had to create a new library for Count-Min Sketches and Count-Sketches, as current solutions were inadequate. C++ libraries are difficult to use, and Python packages tend to be slow. Thus, we wrote a Python package that contains Python bindings to a C++ library to calculate the predictions of the count-min sketch and count sketches. In short, you can take advantage of C++ code to get predictions for the count-min sketch and count sketch while writing just Python!Quick SketchesInstallationUsageInstallationTo install the package, one simply only needs to runpip install quick_sketchesUsageConsider the following example to get the count-min sketch when there is three of an element, four of another element, and finally five of a last element. There are five levels in the sketch, and each level contains 100 counters.import quick_sketches as m
import numpy as np

a = np.array([3, 4, 5])
m.cm_sketch_preds(5, a, 100, 1) # usually [3, 4, 5], but sometimes not![numpy array of long longs] cm_sketch_preds(int nhashes, [numpy array of long longs] np_input, ll width, int seed)takes as inputnhashes:The number of hash functions used in the sketchnp_input:The numpy array containing the frequencies of each key (note that order doesn't matter)width:The width of the sketch, or the number of entries in each row of the sketchseed:A random seed.Then, it outputs what a count-min sketch would give as predicted frequencies with that particular set of parameters, where the output prediction at index i corresponds to the key in np_input at index i. For example, if np_input was [3, 4, 5], the output might also be [3, 4, 5], but it could not be [4, 3, 5], by the conservative nature of the sketch.[numpy array of doubles] count_sketch_preds(int nhashes, [numpy array of long longs] np_input, ll width, int seed)performs the same function for the Count-Sketch, with parameters:nhashes:The number of hash functions used in the sketchnp_input:The numpy array containing the frequencies of each key (note that order doesn't matter)width:The width of the sketch, or the number of entries in each row of the sketchseed:A random seed.Note one key difference, however: the output is indoubles, because the count-sketch takes medians, which sometimes leads to half-integer outputs!
Package: quickSms
<pre>Welcome to quickSms!  This is a quickSms applicaion can be used from CLI from unix system===================================================================How to use thsi application1. sms 8147830733 Hi I am Dipankar2. sms -s 160by2 8147830733 Hi! Dipankar again !3. sms -s way2sms -m 8147830733 -t Yes ! Dipankar Again!!Use: -h / --help to get help---------------------------------------Author : Dipankar DuttaEmail : dutta.dipankar08@gmail.com---------------------------------------</pre>