Saravanan666/pypi-org huggingface dataset:
Package: python-sonic-client
pysonicpysonic is a Python client for lightweight and fast search engine -SonicInstallationUse the package managerpipto install foobar.pipinstallpython-sonic-client--upgradeUsageimportpysonicc=pysonic.Client()withc.mode(pysonic.Mode.INGEST)asingestor:resp=ingestor.ping()withc.mode(pysonic.Mode.SEARCH)assearcher:resp=searcher.ping()TODO 0.1.0Ingest commands: POP, COUNT, FLUSHC, FLUSHB, FLUSHOImplement queue, auto reconnect socketSupport escape charactersSupport Control modeSupport push a bulk by parallel socketsSupport LANGAdd tags: testcov, version, buildUpdate testsContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT
Package: python-sonycisip2
python_sonycisip2Python library to interface with Sony's CISIP2 Protocolpython_sonycisip2
├─ LICENSE
├─ README.md
├─ setup.py
└─ src
   └─ python_sonycisip2
      ├─ commandset.py
      ├─ python_sonycisip2.py
      ├─ variables.py
      └─ __init__.py
Package: python-soql-parser
CONTRIBUTORS WANTED!!Installationpip install python-soql-parseror, with poetrypoetry add python-soql-parserUsagefrompython_soql_parserimportparseparse_result=parse("SELECT Id FROM Account")whereparse_resultis aParseResultsobject frompyparsing.Notable caveatsUnsupported featuresSubqueries (e.g.,SELECT Name, (SELECT LastName FROM Contacts) FROM Account)Aggregate queriesSOQL specific WHERE-clause tokens (e.g.,LAST_N_DAYS:<integer>)Partially supportedThese are either partially supported or weakly supportedRelated attributes (e.g.,SELECT Id, Account.Name FROM Contact). The object name is not yet parsed out on its own. This will simply parse out"Account.Name"ContributingA lot of work remains to be done. Practically no SOQL-specific features are supported as of yet.
If you want to contribute, just open a PR! (and add a test for your new feature)Setting up locallyFirst installpoetry. Afterwards, to install the dependencies, runpoetry installRunning the testsSimply executepytestHouse cleaningPlease sort imports withisortand format the code withblack(in that order).
Package: python-sorter
python-sorterAPythonpackage to apply multiple type of sorting algorithm on your data and also compare which sorting is fastes on your data. Visit the page forpython-sorterInstallationpip install python-sorterUsageimport data_sorter

arr = [0.32, 0.33, 0.37, 0.42, 0.47, 0.51, 0.52]

####### To perform sorting #########
arr = data_sorter.bubble_sort(arr)
print(arr)

##### To compare execution time between different algos ######

# apply all sorting technique
result = data_sorter.get_comparison(arr)

# specify which sorting algorithm to apply
result = data_sorter.get_comparison(arr, ['bubble_sort'])

##### To plot execution time between different algos ######

# apply all sorting technique
result = data_sorter.plot_comparison(arr)

# specify which sorting algorithm to apply
result = data_sorter.plot_comparison(arr, ['bubble_sort'])Available sorting algorithms- brick_sort
- bubble_sort
- bucket_sort (only for float data)
- comb_sort
- counting_sort (only for integer data)
- cycle_sort
- gnome_sort
- heap_sort
- insertion_sort
- intro_sort
- merge_sort
- pigeonhole_sort (only for integer data)
- quick_sort
- radix_sort
- selection_sort
- stooge_sort
- strand_sort
- tree_sort
Package: python-sotools
python-sotoolsCollection of tools to debug and diagnose ELF objects dynamic linking.Dynamic linkerThe module contains methods to mimic the default dynamic linker on Linux. Theresolvemethod implements all the rules involving the search and selection of a shared object given a shared object name (soname) string.Dynamic linker cacheThe dynamic linker cache (usually present at/etc/ld.so.cache) is a database generated at install time to cache the locations of select shared objects on the system.python-sotoolssupports reading and parsing this file, along with customized search for matches.Library setTo simplify the use of the linker, theLibrarySetobject is a specialization of a pythonsetthat allows to quickly resolve a dependency tree. It containsLibraryobjects and is complete when all dependencies are contained in the set, and allows to verify all the members' required definitions are also present in another set member.ScriptsThe following scripts are installed automatically when installingpython-sotools:ldd.pySimple re-implementation of ldd with the contents ofpython-sotools. This version does not use the actual linker and can be trusted not to run any code when executed with unknown executables, unlike the original.sowhichWhich library is resolved ? This command returns the path for the library name given as an argument. That's it.
Package: python-sourcemaps
Python library for parsing and generating source maps.UsageOverviewExample:>>> import sourcemaps
>>> sourcemaps.discover('...')
'jquery.min.map'
>>> sourcemap = sourcemaps.decode('...')
>>> sourcemap.tokens[3]
<Token: dst_line=10 dst_column=10 src='jquery.js' src_line=50 src_col=200 name='lol'>
>>> sourcemaps.encode(sourcemap)
'{version: 3, mappings: 'AAAA,...', ...}'CompatibilityPython 2.7Python 3.3PyPy
Package: python-sox
Copyright (c) 2014 Hide. Tokuda Laboratory, Keio University, JapanPermission 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.Description: UNKNOWN
Platform: UNKNOWN
Package: python-space
Space is a command line tool + api wrapper for Spacewalk’s xmlrpc library.Installation$pipinstallpython-spaceDocshttps://space.readthedocs.org/en/latest/index.htmlChangelog0.0.5 (2013-04-22)Various bugfixesCode coverage now 100%0.0.4 (2013-04-20)fixing the package.0.0.3 (2013-04-20)fixed the return on the call function when exception is raised.added n-v-r lookup to the package copy function, with testsupdated docs a bit more.
Package: python-spacetraders
python-spacetradersA client library for accessing SpaceTraders APIUsageFirst, create a client:fromspacetradersimportClientclient=Client(base_url="https://api.spacetraders.io/v2")If the endpoints you're going to hit require authentication, useAuthenticatedClientinstead:fromspacetradersimportAuthenticatedClientclient=AuthenticatedClient(base_url="https://api.spacetraders.io/v2",token="SuperSecretToken")Now call your endpoint and use your models:fromspacetraders.modelsimportGetMyAgentResponse200fromspacetraders.typesimportResponseresponse:Response[GetMyAgentResponse200]=client.agents.get_my_agent()Or do the same thing with an async version:fromspacetraders.modelsimportGetMyAgentResponse200fromspacetraders.typesimportResponseresponse:Response[MyDataModel]=awaitclient.agents.get_my_agent()By default, when you're calling an HTTPS API it will attempt to verify that SSL is working correctly. Using certificate verification is highly recommended most of the time, but sometimes you may need to authenticate to a server (especially an internal server) using a custom certificate bundle.client=AuthenticatedClient(base_url="https://internal_api.example.com",token="SuperSecretToken",verify_ssl="/path/to/certificate_bundle.pem",)You can also disable certificate validation altogether, but beware thatthis is a security risk.client=AuthenticatedClient(base_url="https://internal_api.example.com",token="SuperSecretToken",verify_ssl=False)There are more settings on the generatedClientclass which let you control more runtime behavior, check out the docstring on that class for more info.Things to know:All path/query params and bodies become method arguments.Tagged endpoints will use the first tag as a module name for the functionAny endpoint which did not have a tag will be inclient.defaultRefreshing the API definitionThis project is generated fromSpaceTradersAPI/api-docs. The following steps outline how to refresh from a new schema:Clone the version of the api-docs to be generated in another directorygit clone https://github.com/SpaceTradersAPI/api-docs /tmp/api-docsNavigate to/tmp/api-docsand generate a single OpenAPI bundlenpx @redocly/openapi-cli@latest bundle -o bundle.jsonIn this projects directory, refresh the generated class withpoetry run openapi-python-client update --path /tmp/api-docs/bundle.json --meta none --config openapi-client.yml --custom-template-path=openapi-client-templateBuilding / publishing this ClientThis project usesPoetryto manage dependencies and packaging.  Here are the basics:Update the metadata in pyproject.toml (e.g. authors, version)Publish the client withpoetry publish --build -r <your-repository-name>or, if for public PyPI, justpoetry publish --buildIf you want to install this client into another project without publishing it (e.g. for development) then:If that projectis using Poetry, you can simply dopoetry add <path-to-this-client>from that projectIf that project is not using Poetry:Build a wheel withpoetry build -f wheelInstall that wheel from the other projectpip install <path-to-wheel>
Package: python-spdylay
Python-spdylay is a Python SPDY library on top of Spdylay C
library. It supports SPDY/2 and SPDY/3 protocol.It does not perform any I/O operations. When the library needs them,
it calls the callback functions provided by the application. It also
does not include any event polling mechanism, so the application can
freely choose the way of handling events.It provides almost all API Spdylay provides with Pythonic fashion.The core library API works with Python 2 and 3.  ButThreadedSPDYServerrequires Python 3.3 because it uses TLS NPN
extension.InstallationFirst install Spdylay library. You can grab a source distribution fromsf.net download pageorclone git repository.SeeSpdylay documentationfor the
required packages and how to build Spdylay from git repository.After Spdylay is installed, runbuild_extcommand to build
extension module:$ python setup.py build_extIf you installed Spdylay library in other than standard location, use--include-dirsand--library-dirsto specify header file and
library locations respectively.DocumentationSeepython-spdylay documentation.SamplesHere is a simple SPDY server:#!/usr/bin/env python

# The example SPDY server. Python 3.3 or later is required because TLS
# NPN is used in spdylay.ThreadedSPDYServer. Put private key and
# certificate file in the current working directory.

import spdylay

# private key file
KEY_FILE='server.key'
# certificate file
CERT_FILE='server.crt'

class MySPDYRequestHandler(spdylay.BaseSPDYRequestHandler):

    def do_GET(self):
        self.send_response(200)
        self.send_header('content-type', 'text/html; charset=UTF-8')

        content = '''\
<html>
<head><title>SPDY FTW</title></head>
<body>
<h1>SPDY FTW</h1>
<p>The age of HTTP/1.1 is over. The time of SPDY has come.</p>
</body>
</html>'''.encode('UTF-8')

        self.wfile.write(content)

if __name__ == "__main__":
    HOST, PORT = "localhost", 3000

    server = spdylay.ThreadedSPDYServer((HOST, PORT),
                                        MySPDYRequestHandler,
                                        cert_file=CERT_FILE,
                                        key_file=KEY_FILE)
    server.start()Here is a simple SPDY client:#!/usr/bin/env python

# The example SPDY client.  You need Python 3.3 or later because we
# use TLS NPN.
#
# Usage: spdyclient.py URL...
#
import sys
import spdylay

class MyStreamHandler(spdylay.BaseSPDYStreamHandler):
    def on_header(self, nv):
        sys.stdout.write('Stream#{}\n'.format(self.stream_id))
        for k, v in nv:
            sys.stdout.write('{}: {}\n'.format(k, v))

    def on_data(self, data):
        sys.stdout.write('Stream#{}\n'.format(self.stream_id))
        sys.stdout.buffer.write(data)

    def on_close(self, status_code):
        sys.stdout.write('Stream#{} closed\n'.format(self.stream_id))

if __name__ == '__main__':
    uris = sys.argv[1:]
    spdylay.urlfetch(uris, MyStreamHandler)
Package: python-specbar
specbar.py is a small library to use with thespectrwmwindow manager.
It has some builtin info functions and is easy extensible using the
Python decorator syntax.InstallationThe simplest way to install specbar is to use pip:pip install specbarAnother way is to download the source and copy specbar.py somewhere in
your PYTHONPATH.UsageExample:# Extending with own info function
>>> import specbar
>>> @specbar.info_collector(42)
... def get_some_info(num):
...     return dict(square=num**2)
...
>>> specbar.loop(format_str='Square info: {square}')
Square info: 1764
Shutting down specbar...
>>>That’s it now your own function get’s called every 5 (default) seconds and
the format string is displayed in the statusbar. The loop (when testing) can
easily killed by pressing CTRL+C.Using builtin functions:>>> import specbar
>>> specbar.register(specbar.get_gmail_count, 'myuser', 'mysecret')
>>> specbar.loop('New Mails: {gmail_count:<3}', 15)Now every 15 seconds your Gmail account is checked for new mail and the
result is displayed.Every info function must return a dict. All dicts where merged in a
defaultdict to have no exception on missing keys. See the source of
specbar.py for the returned keys of the builtin functions.In the source distribution an example.py file is included which shows
the usage of specbar.py.Integration with spectrwmCreate your own script or edit example.py to your needs, put it somewhere
on your PATH, make it executable (chmod +x) and add it to ~/.spectrwm.conf
as your bar_action.MiscSpecbar is mainly written for spectrwm onArch Linuxwhere Python 3 is the
standard Python. I think it can be used with any other window manager which
reads from stdin and with any other (posix) os which has Python 3 available.
Package: python-specfor
It is inspired from Ruby’s RSpec.
Spec definition is based on Python decorator description.FeaturesPython decorator based “Spec” definition“Spec” definition is compatible withunittest.TestCaseSpec files can execute withunittestornosetestsRSpec like Expectation (e.g.the[xxx].should.be[yyy])Decorator based “Mock” object definitionAll features can be used independently: e.g. use spec withnose.toolsMarkdown document generator from spec fileSingle code implementation for multi python version (2.5-2.7, 3.1)Spec Example# examples/sum_spec.py
from specfor import the, spec

empty_list = spec.of("empty list")
int_list = spec.of("int list")

@empty_list.before()
def prepare(its):
    its.list = []
    its.sum = 0

@int_list.before()
def prepare(its):
    its.list = [2, 3, 5, 7, 11]
    its.sum = 28

@empty_list.that("sum")
@int_list.that("sum")
def sum_spec(its):
    result = sum(its.list)
    the[result].should == its.sum

spec.publish(globals())For more detail, seeREADME.md
Package: pythonspell
pyspellDescriptionThis package is intended as a lightweight, efficient, and customizable
spelling corrector. By using the Damerau-Levenshtein distance and a
cached BK tree, the code narrows down possible typos and ranks them
based on their ordering in an dictionary.txt file.UsageCheckerThe Checker class is the root of all of the spellchecking, and should be
used under most circumstances. To load the cached BK tree (or generate a
new one, should the need present itself), call the load method. It takes
two paramters, a wordlist and a pickling location (defaults to
bktree.pickle in the root directory). If there is no cache present at
the given location, it will generate one. 

Methods:
-----

.. code:: python

    Checker.repickle()

This should be called following dictionary modifications not made with
the inbuilt updateDict function. The tree must be recalculated on
change.

.. code:: python

    Checker.load()

Loads the BK tree and sets up the dictionary.

.. code:: python

    Checker.check(word,returnNum,returnType,repeat,forcePrecision)

Checks for a word or list of words. word:list or str returnNum: The
number of arguments to return; 0 is all of the items found within the
tolerance of the tree. 1 will return only the best element of the list,
as defined by the order of the given dictionary. returnType: "pairings",
"rankings", or "words" (default) - Pairings returns an array of each
item and its ranking in the dictionary (in tuple form). I.e:
[(cow,16),(frog,11)] - Rankings returns an array of *just the rankings*
based on the dictionary. - Words returns words in respect to.

repeat: This is primarily a speed saving option. In situations involving
extremely heavy programs or dictionaries, this should be set to False.
It allows the tolerance to increase recursively until at least one match
is found for unknown words. forcePrecision: A manual way to change the
tolerance. The internal mechanism is almost always sufficient, and this
should seldom be changed from its default, False. This method returns a
String, an Array, or None.

.. code:: python

    Checker.updateDict(word,priority,pickle)

Inserts a word,dictionary, or list into a chosen point in the wordlist.
Word can be a dictionary with the keys of the intended words and each
key have a location attribute for where to insert it into the list.
Lists will be inserted in reverse chronological order for priority.
Strings are simply inserted. Priority defines where to put an item in
the dictionary, with -1 (default) being at the very end. (low priority)
Pickle defaults to true, and repickles it after the word(s) is added.
This should be set to false if you intend to call repickle later, after
further modifications.

Example of base code:

.. code:: python

    from pyspell.checker import *
    check=Checker("./pyspell/data/wordlist.txt","./pyspell/data/bktree.pickle"); 
    check.load(); 
    print(check.check("grat")) # --> great 
    print(check.check("diiffficult"))  # ---> difficult

(example.py)
Package: python_spin
spina small utility to assist in setting usage modes of laptop-tablet
devicesfeaturesautomatic palm rejection when using stylusautomatic disable/enable of touchpad and nipple when device toggled
between laptop and tablet statesmanual control of display orientation and input devicessetupThis utility requires X11.Install PyQt5. On Ubuntu 16.04 LTS, run the following:sudoaptinstallpython-qt5On Ubuntu 18.04 LTS, run the following:sudoaptinstallpyqt5-devpyqt5-dev-toolsNow install spin by running the following:sudopipinstallpython_spinTo set up globally a Linux desktop launcher with icon, execute the
following:sudowget--content-disposition-N-P/usr/share/icons/https://raw.githubusercontent.com/wdbm/spin/master/python_spin/static/spin.svgsudowget--content-disposition-N-P/usr/share/applications/https://raw.githubusercontent.com/wdbm/spin/master/python_spin/static/spin.desktopquick startThis utility can be run in its default graphical mode or in a
non-graphical mode. The graphical mode is engaged by runningspinwhile the non-graphical mode is engaged by using the option--no_GUI:spin--no_GUIThere are other options which are described byspin--help.By default, this utility disables the touchscreen on detecting the
stylus in proximity and it changes between the laptop and tablet modes
on detecting toggling between the laptop and tablet usage
configurations. These default behaviours are provided by both the
graphical and non-graphical modes of this utility. This utility should
be initiated in the laptop usage configuration.compatibilitycomputer
modeloperating system and
setupcommentThinkPad S1
YogaUbuntu 16.04 (X11,
Unity)workingThinkPad S120
YogaUbuntu 16.04 (X11,
Unity)workingThinkPad Yoga
14Ubuntu 16.04 (X11,
Unity)possibly working with some reduced
functionalityThinkPad Yoga
P40Ubuntu 16.04 (X11,
Unity)possibly workingacceleration controlThere is an experimental acceleration control included which is
deactivated by default. It can be activated by selecting the appropriate
button in the graphical mode.futureUnder consideration is state recording in order to avoid execution of
unnecessary commands and better handling of subprocesses.
Package: python-splitter
python_splitterCurrently experimenting and planning! More Features will be added soon...Developed by Bharat Adhikari (c) 2022Examples of How To Use (Buggy Alpha Version)Creating Train-Test foldersimportpython_splitter$python_splitter.split_from_folder("SOURCE_FOLDER",train=0.5,test=0.3,val=0.2)$python_splitter.split_from_folder("SOURCE_FOLDER",train=0.5,test=0.3)# Note: Both above code gives same result because 0.5+0.3=0.8 .So,val=0.2iscalculatedautomatically.$python_splitter.split_from_folder("SOURCE_FOLDER, train = 0.5, test = 0.5)But,thiswillnotcreate"val"folderbecausetrain+test=0.5+0.5=1.0# SOURCE_FOLDER = PATH_TO_THE_FOLDER_CONTAINING_IMAGE_CLASSES_FOLDERS
Package: python-spresso
python-spresso==============python-spresso is a framework that aims at making it easy to provide authenticationvia `SPRESSO <https://spresso.me/>`_ within an application stack.Status======python-spresso is under development. All main parts of the `SPRESSO Paper <http://infsec.uni-trier.de/publications/paper/FettKuestersSchmitz-TR-spresso-2015.pdf>`_ have been implemented.Indices and tables==================* :ref:`genindex`* :ref:`modindex`* :ref:`search`
Package: pythonspt
pyspt - python simple pomodoro timerpyspt is a simple terminal timer that uses the pomodoro technique.Installation$ pip install pythonsptUsage$ pyspt -h

usage: pyspt [-h] [-p POMODORO] [-sb SHORT_BREAK] [-lb LONG_BREAK] [-lbi LONG_BREAK_INTERVAL]

A simple terminal timer that uses the pomodoro technique.

options:
  -h, --help            show this help message and exit
  -p POMODORO, --pomodoro POMODORO
                        Pomodoro duration in minutes (default: 25)
  -sb SHORT_BREAK, --short-break SHORT_BREAK
                        Short break duration in minutes (default: 5)
  -lb LONG_BREAK, --long-break LONG_BREAK
                        Long break duration in minutes (default: 15)
  -lbi LONG_BREAK_INTERVAL, --long-break-interval LONG_BREAK_INTERVAL
                        Long break interval (default: 3)