Saravanan666/pypi-org huggingface dataset:
Package: shattered
ShatteredSTOMP meetsbottle.pyGetting StartedInstallationpip install shatteredCLIshattered runwill run a Shattered app, using one of the following (in order):The--appflag.TheSHATTERED_APPenvironment variable.app.pyas the application module name.Useshattered configto see the current configuration (same app resolution asruncommand).Echo Serverapp.pyimportloggingfromshatteredimportShatteredlogging.basicConfig(level=logging.INFO)logger=logging.getLogger(__name__)app=Shattered(host="rabbitmq")@app.subscribe("/queue/echo")defecho(headers,body,conn):logger.info("%s%s",headers,body)@app.subscribe("/queue/echo")defecho_fancy(headers,body,conn):logger.info("✨✨✨%s%s✨✨✨",headers,body)app.run()Running the DemoStart up RabbitMQ usingdocker-compose upIn another shell, rundocker-compose run shattered python examples/echo/echo.pyIn another shell, rundocker-compose run shattered python examples/echo/send.py
Package: shatteringdt
Useful tools to work with Statistical Learning Theory (SLT) over scikit-learn decision trees.DescriptionLearning, in Machine Learning (ML) area, is one of the most important steps in the construction of algorithms that seek to predict a certain task, whether this is the classification of objects, the forecast of demand for a specific product or even the diagnosis of malignant diseases. In ML, we can study supervised (which have a label, e.g., a class) and unsupervised algorithms, used for tasks such as pattern detection, grouping, among others that do not depend directly on a label. Knowing this, the present work aims to carry out the study of different supervised learning algorithms, in this case, the classification algorithms, more specifically Decision Trees, to carry out an analytical study about the steps that make up the learning process of the algorithm, exploring concepts of the SLT that provide tools for studies and allow to prove issues such as the guarantee of learning of a certain algorithm. Reference: Rodrigo Fernandes de Mello, Chaitanya Manapragada, Albert Bifet: "Measuring the Shattering coefficient of Decision Tree models". Expert Syst. Appl. 137: 443-452 (2019)It consists of two main modules:InstallationDependenciesPython (>= 3.6)numpytqdmsklearnmatplotlibUser installationpipinstallshatteringdtAbout this workThis project is a result of a Master's discipline of Institute of Mathematics and Computer Sciences (ICMC) of University of Sao Paulo (USP)
Package: shaunsephton.recipe.uwsgi
shaunsephton.recipe.uwsgiBuildout recipe downloading, compiling and configuring uWSGI.Creates abin/uWSGIexecutable andpartsXML configuration file with which you can easily launch Buildout sandboxeduWSGIprocesses.Contentsshaunsephton.recipe.uwsgiUsageAuthorsCreated ByContributorsChangelogUsageAdd a part to yourbuildout.cfglike so:[buildout]
parts=uwsgi

[uwsgi]
recipe=shaunsephton.recipe.uwsgiRunning the buildout will download and compileuWSGIand add an executable with the same name as your part in thebin/directory. In this casebin/uwsgi. It will also create auwsgi.xmlconfiguration file in apartsdirectory with the same name as your part. In this casebin/uwsgi/uwsgi.xml.This allows you to start auWSGIprocess configured by the generated XML file, i.e.:$ ./bin/uwsgi --xml parts/uwsgi/uwsgi.xmlThe generated XML configuration includespythonpathdirectives referencing the various Python eggs installed by Buildout allowinguWSGIto utilize them.You can specify any and all additionaluWSGIconfiguration options as additional options of the Buildout part. For instance to specify a socket and module and to enable the master process addsocket,moduleandmasteroptions to the buildout part, i.e.:[buildout]
parts=uwsgi

[uwsgi]
recipe=shaunsephton.recipe.uwsgi
socket=127.0.0.1:7001
module=my_uwsgi_package.wsgi
master=TrueYou can also provided a set of eggs explicitly using theeggsoption, i.e.:[buildout]
parts=uwsgi

[uwsgi]
recipe=shaunsephton.recipe.uwsgi
eggs=my_uwsgi_packageAuthorsCreated ByShaun SephtonContributorsmooballChangelog0.0.9 (2011-09-21)Dynamic option resolution.Moved conf to parts.Regenerate XML on update to catch updated eggs.
Package: shawn
ShawnShawn is a dog.Shawn is a software engineer.Shawn is, most importantly, a command line chatbot that provides you with well formatted answers to you code related questions.SetupRequirementsPython 3.8+InstallationInstall it with pip$ pip install shawnor add it to yourPoetryproject:$ poetry add shawnUsageAfter installation, you can start chatting with the following command:$shawnchator ask Shawn to explain your source code in natural language$shawndigpath/to/file.c$shawndigpath/to/folder
Package: shayancalculatortest
Getting startedSimple calculator API hosted on APIMATICHow to BuildYou must have Python2 >=2.7.9or Python3 >=3.4installed on your system to install and run this SDK. This SDK package depends on other Python packages like nose, jsonpickle etc.
These dependencies are defined in therequirements.txtfile that comes with the SDK.
To resolve these dependencies, you can use the PIP Dependency manager. Install it by following steps athttps://pip.pypa.io/en/stable/installing/.Python and PIP executables should be defined in your PATH. Open command prompt and typepip --version.
This should display the version of the PIP Dependency Manager installed if your installation was successful and the paths are properly defined.Using command line, navigate to the directory containing the generated files (includingrequirements.txt) for the SDK.Run the commandpip install -r requirements.txt. This should install all the required dependencies.How to UseThe following section explains how to use the Shayancalculatortest SDK package in a new project.1. Open Project in an IDEOpen up a Python IDE like PyCharm. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.Click onOpenin PyCharm to browse to your generated SDK directory and then clickOK.The project files will be displayed in the side bar as follows:2. Add a new Test ProjectCreate a new directory by right clicking on the solution name as shown below:Name the directory as "test"Add a python file to this project with the name "testsdk"Name it "testsdk"In your python file you will be required to import the generated python library using the following code linesfromshayancalculatortest.shayancalculatortest_clientimportShayancalculatortestClientAfter this you can write code to instantiate an API client object, get a controller object and  make API calls. Sample code is given in the subsequent sections.3. Run the Test ProjectTo run the file within your test project, right click on your Python file inside your Test project and click onRunHow to TestYou can test the generated SDK and the server with automatically generated test
cases. unittest is used as the testing framework and nose is used as the test
runner. You can run the tests as follows:From terminal/cmd navigate to the root directory of the SDK.Invokepip install -r test-requirements.txtInvokenosetestsInitializationAPI client can be initialized as following.client=ShayancalculatortestClient()Class ReferenceList of ControllersSimpleCalculatorControllerSimpleCalculatorControllerGet controller instanceAn instance of theSimpleCalculatorControllerclass can be accessed from the API Client.simple_calculator_controller=client.simple_calculatorget_calculateCalculates the expression using the specified operation.defget_calculate(self,options=dict())ParametersParameterTagsDescriptionoperationRequiredThe operator to apply on the variablesxRequiredThe LHS valueyRequiredThe RHS valueExample Usagecollect={}operation=OperationTypeEnum.MULTIPLYcollect['operation']=operationx=4collect['x']=xy=5collect['y']=yresult=simple_calculator_controller.get_calculate(collect)Back to List of Controllers
Package: shay-dists
This repository contains the code of a Python package that implementsGaussianandBinomialdistributions.DownloadDependenciesThis package requires:Python (>= 3.7.4)seaborn (>=0.11.1)matplotlib.pyplot (>=3.3.3)numpy (>=1.19.5)InstallationTo install the package use pip as follows:$ pip3 install shay-distsHow to usefromdistributionsimportGaussian,BinomialMaking a Gaussian instanceThe constructor receives the mean and standard deviation:gaussian=Gaussian(25,6)Making a Binomial instanceThe constructor receives the probability of an event ocurring and the size of the distribution:binomial=Binomial(0.7,10)Adding two distributionsDue to Python magic methods, it's possible to sum two Gaussians and it outputs a new Gaussian class with the updated mean and standard deviation. The same applies to Binomial class.gaussian_one=Gaussian(10,3)gaussian_two=Gaussian(32,7)gaussian_one+gaussian_twoReading data from a fileYou can load data from a .txt file using the methodread_data_file()in both classes:gaussian=Gaussian()gaussian.read_data_file('numbers.txt')And calculate the mean and standard deviation from the data using the methodscalculate_mean()andcalculate_stdev(), respectively.In the Binomial class, to update the probability of an event ocurring from the dataset, use the methodreplace_stats_with_data().Plotting histogramFor the Gaussian class use the methodplot_histogram()and for the Binomial classe useplot_bar().Probability density functionIn the Binomial class, you can calculate the probability ofkpositive events ocurring in a sample of sizenusing the methodpdf(k).
Package: shazamctl
shazamctlshazamctl is not released yet. Install it from Git:pipxinstallgit+https://gitlab.com/notpushkin/shazamctlUsage$ shazamctl recognize path/to/rickroll.mp3
At 0:00:10: Never Gonna Give You Up by Rick Astley$ shazamctl recognize path/to/1h_hardbass_mix.mp3 --multiple
At 0:00:16: Russian Vodka by XS Project
At 0:03:21: ...$ shazamctl listen
Not implemented... yet
Package: shazamLyric
shazamLyricInstallpip install shazamLyricImport libraryfrom shazamLyric import *All codefrom shazamLyric import *
app = shazamLyric('la belle',3,0,'BR')
print(len(app.key()))
print(app.title())
print(app.subtitle())
print(app.lyrics())
print(app.youtube())FunctionsUse below code to call functionsapp = shazamLyric('la belle',3,0,'BR')*shazamLyric([text music],[number results],[number offset],[text country])Use the code below to get the number of songsprint(len(app.key()))Use the code below to get music codeprint(app.key())Use the code below to get music titleprint(app.title())or choose index of listprint(app.title()[0])Use the code below to get music subtitleprint(app.subtitle())or choose index of listprint(app.subtitle()[0])Use the code below to get music lyricsprint(app.lyrics())or choose index of listprint(app.lyrics()[0])Use the code below to get youtube linkprint(app.youtube())or choose index of listprint(app.youtube()[0])LinksSee myGitHub.
Package: shazam.py
shazam.pyPython library for theShazamAPI. This library is based off ofShazamAPIandSongRecbut some added features.NOTE: that this is still in its design and development phase. It works and *could* be used in production but beware of possible breaking changes.Installpip3 install shazam.pyIf you're on linux, you'll also have to installpkg-configandlibasound2-devwith your preferred package manager.UsageSynchronous Shazam:fromshazamimportShazammp3_file=open('a.mp3','rb').read()withShazam(mp3_file)asshazam:print(shazam.result)# data received from the shazam apiA partially-asynchronous method is also provided:
(partially because only requests are done asynchronously and not the signature generation. See#1)fromshazamimportAsyncShazammp3_file=open('a.mp3','rb').read()asyncwithAsyncShazam(mp3_file)asshazam:print(shazam.result)There is also support for using your own session objects and usingShazamandAsyncShazamoutside of
a context manager using the execute function.Notes on the Shazam APIShazam's api takes a "signature" of a song to search in their database before returning a result.If you want to know more about the specifics of the algorithm, you can read thepaperwritten by a co-founder of Shazam.The implementation of the algorithm was written by @marin-m intheir project.
It was adapted to work with python through pyo3 here.Why is this better than all other libraries ever?Because rustCredits to:https://github.com/marin-m/SongRechttps://github.com/Numenorean/ShazamAPI
Package: shazib-seriesbox
shazib_seriesboxshazib_seriesbox is a Python library for dealing with triangular & Prime function series.InstallationUse the package managerpipto install shazib_seriesbox.pipinstallshazib_seriesboxUsagefromshazib_seriesboximporttriangular,Prime# returns 'triangular series'num=17trangular(num)#returns 'prime series'num=25Prime(num)ContributingPull 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: shcheck
shcheck - Security Header CheckCheck security headers on a target websiteI did this tool to help me to check which security headers are enabled on certain websites.The tool is very simple and it's the result of few minutes of coding.It just check headers and print a report about which are enabled and which notI think there is a lot to improve, and I will be grateful if somebody wants to helpHow to run:Pypipip3installshcheck
shcheck.pyhttps://insecurity.blogDockerFirst build your docker container using something like this:docker build -t shcheck .Then simply run your docker container using something like this where you specify which website you want to check headers on:docker run -it --rm shcheck https://insecurity.blogFrom sourcegitclonehttps://github.com/santoru/shcheck&&cdshcheck
./shcheck.pyhttps://insecurity.blogUsageUsage: ./shcheck.py [options] <target>

Options:
  -h, --help            show this help message and exit
  -p PORT, --port=PORT  Set a custom port to connect to
  -c COOKIE_STRING, --cookie=COOKIE_STRING
                        Set cookies for the request
  -a HEADER_STRING, --add-header=HEADER_STRING
                        Add headers for the request e.g. 'Header: value'
  -d, --disable-ssl-check
                        Disable SSL/TLS certificate validation
  -g, --use-get-method  Use GET method instead HEAD method
  -j, --json-output     Print the output in JSON format
  -i, --information     Display information headers
  -x, --caching         Display caching headers
  -k, --deprecated      Display deprecated headers
  --proxy=PROXY_URL     Set a proxy (Ex: http://127.0.0.1:8080)
  --hfile=PATH_TO_FILE  Load a list of hosts from a flat file
  --colours=COLOURS     Set up a colour profile [dark/light/none]
  --colors=COLOURS      Alias for colours for US English
Package: shcmd
Note: Work in Progress.This lib aims to provide a Human friendly interface for subprocess.If you need piped subprocesses, giveenvoya try.Usageimportshcmdwithshcmd.cd("/tmp"):# get result directlyassertshcmd.run("pwd")=="/tmp"# get streamed result packed in a generatorstreamed=shcmd.run("ls",stream=True)forfilenameinstreamed.iter_lines():print(filename)# get full stdout/stderrprint(streamed.stdout)print(streamed.stderr)
Package: shcmder
_                        _           
     | |                      | |          
  ___| |__   ___ _ __ ___   __| | ___ _ __ 
 / __| '_ \ / __| '_ ` _ \ / _` |/ _ \ '__|
 \__ \ | | | (__| | | | | | (_| |  __/ |   
 |___/_| |_|\___|_| |_| |_|\__,_|\___|_|   
          by Manny Berruetashcmderis a shim for running shell commands and programs as a subprocess through python
Package: sh-copilot
Shell CopilotDescriptionShell Copilot is a set of tools to help you in your daily shell usage.InstallationTo install Shell Copilot, simply run the following command:pipinstall--usersh-copilotor with an isolated environment:python-mvenv~/bin/sh_copilot_venv
~/bin/sh_copilot_venv/bin/pipinstallsh-copilot

ln-s~/bin/sh_copilot_venv/bin/sh_copilot~/bin/sh_copilot
ln-s~/bin/sh_copilot_venv/bin/sc~/bin/scUsageTo use Shell Copilot, simply run the following command :sh_copilot--helpor with the alias :sc--helpContributingTo contribute to Shell Copilot, simply fork the repository and create a pull request. Please make sure to include a detailed description of your changes. Here are the things I will check during the review :Is CHANGELOG.md have been updated (required)Is the lint score did not decrease (required)Is the test coverage did not decrease (required)Is the documentation have been updated (if required)If tests have been added (optional)DevelopmentThis repository usesTaskfileto manage the development tasks. To see the available tasks, run the following command:task--list
Package: sh-crypt
SH CryptA simple symetric encyption decryption algorithmAboutSH Crypt is base on library cryptography algorithm and use more specifically the Electronic Code Book (ECB) for symetric encryption and decryption.Here are some code example to use the library.Generate a key, encrypt and decrypt textfromsh_cryptimportGenKeySH,SymCryptSH,AsymCryptSHimportrandomasrnd################################# Symetric Cipher# Create key generatorseed=rnd.randint(1,1e12)key_gen=GenKeySH(seed)key=key_gen.gen_sym_key(path_store="mykey.txt")# Ex : 'e169344ae15719669ed2fecea1ac4773'password="Hello World !!"crypt=CryptSH(key)encrypt_password=crypt.encrypt_message(password)# Ex : '469feb93adc2af609a98e6b7cee859bb'crypt.decrypt_message(encrypt_password)# 'Hello World !!'################################# Asymetric Cipherkey_gen=GenKeySH()priv_key,public_key=key_gen.gen_asym_key()# We can store the key with parameters path_store="file_path".crypt=AsymCryptSH()crypt.add_key(priv_key)crypt.add_key(public_key)message="Hello World !!!"# Encrypt / Decrypt Messagemessage_enc=crypt.encrypt_message(message)crypt.decrypt_message(message_enc)# Sign message / check signaturesignature=crypt.sign_message(message)ifcrypt.check_sign_message(signature,message):print("Signature is valid")else:print("Signature is invalid")As you can see in the example, you can store your generated key in a text file and reuse it later, with thepath_storeargument.InstallYou can install sh-crypt withpip:pipinstallsh-cryptor download thesh-crypt source, choose your version, and install with the command:pythonsetup.pyinstall
Package: shd
Show pretty HDD/SSD listLong time ago when I've switched from Solaris to Linux, I missed "hd" utility.
In Linux "hd" command is used for a hex dump, in Solaris it displayed a pretty
table with HDD info.I wrote "shd" shell script with a similar functionality. Now I rewrote it in
Python, added options and pretty colors, and releasing it to public.InstallationInstallsmartmontools, then:python3 -m pip install shdUsageTool should be started under root, to obtain S.M.A.R.T. infoshd [-h] [--temp-warn TEMP] [--temp-crit TEMP] [-R] [-y] [-e] [-s] [-J]

  --temp-warn TEMP  Warning temperature, default: 40 C
  --temp-crit TEMP  Critical temperature, default: 45 C
  --fh, --fahrenheit  Temperature in Fahrenheit
  -R, --raw         Suppress colors
  -y, --full        Display full disk info
  -e, --errors      Display only disks with errors / critical temperature
  -s, --no-header   Suppress header
  -J, --json        Output as JSONExit codes1critical temperature2errors detectedThe tool considers drive has an errors, if the following S.M.A.R.T. fields are
greater than zero:End-to-End_ErrorSeek_Error_RateRaw_Read_Error_RateUDMA_CRC_Error_Count
Package: shdlc-sps30
SHDLC Driver for Sensirion SPS30This Python module is developed to be used with the SPS30 Evaluation Kit (SEK-SPS30). I am using and testing it with a Raspberry Pi.Sps30ShdlcDeviceis implemented according toCreate a Device Class @ Sensirion SHDLC Python Driver.Please check the source code for documentation.Installpip install shdlc-sps30Usagefrom shdlc_sps30 import Sps30ShdlcDevice

with ShdlcSerialPort(port='/dev/ttyUSB0', baudrate=115200) as port:
	device = Sps30ShdlcDevice(ShdlcConnection(port))
        serial_number = device.device_information_serial_number()
        print("serial_number: %s" % serial_number)ExampleSeetest.py.$ ./test.py
product_type: 00080000
serial_number: 8CCABCFAE3201F49
fw: 2.2 rev: 7 shdlc: 2.0
604800
(False, False, False)
((1.2945550680160522, 4.506138324737549, 7.045137405395508, 7.552936553955078), (1.6411240100860596, 6.789977550506592, 10.12799072265625, 10.780089378356934, 10.878416061401367), 1.6299999952316284)
Package: shdoc
This is a tool for generating HTML documentation from anything that
uses#as a comment character.  I originally put it together for
producing documentation from [Ansible][] playbooks, but it works
equally well with Python, shell scripts, etc.[ansible]:http://ansible.com/## Synopsisusage: shdoc [-h] [–template TEMPLATE] [–chunk-template CHUNK_TEMPLATE][–title TITLE] [–shortname] [–output OUTPUT]
[–language LANGUAGE] [–map-extension MAP_EXTENSION]
[–metadata METADATA]
[input]## Options–template-directory,-tDIRECTORYSpecifies the path to a directory containing [Jinja2][] templates.  The
main template is calledtemplate.html.  You may override any or
all of the internal templates.–title,-TTITLESet the document title.  This will be available to the template as
thetitlevariable.–shortnameBy default, if you don’t provide an explicit title with–title,
the document title will be the full path of the input document.  If
you specify–shortname, the title will be the basename of the
input document.–output,-oOUTPUTSend output to the named file, rather thanstdout.–language,-lLANGUAGESet the default value of thelanguagevariable toLANGUAGE.
This value will be used if a language cannot be determined from an
extension mapping (see–map-extension).  This value will be
available to your template in thelanguagevariable.–map-extension,-mEXT=LANGUAGEMap file extensions to values of thelanguagekeyword.  For
example,-m .py=pythonwould setlanguagetopythonif you are
processing a.pyfile.This option may be specified multiple times:shdoc -m .py=python -m .yml=yaml …–metadata,-dKEY=VALUESets arbitrary metadata that will be available to your templates in
themetadatadictionary.[jinja2]:http://jinja.pocoo.org/docs/dev/templates/## ExampleRun:shdoc shdoc/main.py –title ‘An Example’ -o main.htmlAnd then open the resultingmain.htmlfile in your browser.  This
will rendershdoc/main.pyusing the default template, which isn’t
very pretty but shows how things work.For real world use, you would probably want a fancier template,
possibly including things like Javascript-driven syntax highlighting.## Licenseshdoc, a documentation generator
Copyright (C) 2016 Lars Kellogg-Stedman <lars@oddbit.com>This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
Package: shear
ShearTrim Excess Quotes from your Stringsfeaturesworks great out of the boxremoves regular quotes like"and'removes python quotes like''',""", andb''removes JavaScript quotes like`command line interface includedinstallpipenv install shearorpip3 install shearusagepythonfromshearimportshearstring="`Sheep`"string=shear(string)# string is now Sheep instead of `Sheep`command line interfacestring="'Sheep'"echo$(shear$string)# string is now Sheep instead of 'Sheep'supportPost an issue athttps://github.com/DanielJDufour/shear/issuesor email the package author atdaniel.j.dufour@gmail.com