Saravanan666/pypi-org huggingface dataset:
Package: sbc-utils
Copyright (c) 2020 Stickboy Creative PythonPermission 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
Keywords: python
Platform: Independant
Classifier: Development Status :: 1 - beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Package: sb-db-common
Db Common LibMainly for myself, switching between different database providers all the time, I wanted a consistent interface.Thats what this is for.More consistent (Think ADO.NET) db connectivityOverviewLinks psgsql, mysql and sqlite in a common interfaceUnit tests provided to show usageUsageConnection string format is:<provider>://<username>:<password>@<host>/<database>The supported providers are:sqlite, mysql, pgsqlwith SessionFactory.connect(<connection string>) as session:
    id = session.execute_lastrowid("insert into test(name) values (:name);", {"name": "bob"})
    session.execute("update test set name = :name where id = :id", {"id": id, "name": "bob1"})The session closes and commits automatically when it goes out of scope.For more control, manually call commit and rollback.The queries are db specific, but the mechanisms are the same for all.Major differences are the different field types, the parameter specification and in the use of identity columns across the different db's.Remember to addreturning <field>to the insert statement for pgsql or you won't get the identity back.DifferencessqliteCREATE TABLE test(
    id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 
    name TEXT
);INSERT INTO test(name) VALUES (:name)mysqlCREATE TABLE test(
    id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, 
    name VARCHAR(50) NULL
);INSERT INTO test(name) VALUES (%(name)s);pgsqlCREATE TABLE test(
    id INT NOT NULL PRIMARY KEY GENERATED ALWAYS AS IDENTITY, 
    name VARCHAR(50) NULL
 );INSERT INTO test(name) VALUES (%(name)s) RETURNING id;Buildingpython -m buildDeployingpython -m twine upload --repository testpypi dist/*
Package: sbe
sbe-pythonEasy to use, fast, pure Python FIXSBEencoder and decoder.InstallpipinstallsbeUsageSimple DecodingDecode SBE to Python dictionaries in one line. Good for exploratory data analysis.importsbewithopen('your-schema.xml','r')asf:schema=sbe.Schema.parse(f)wtihopen('your-data.sbe','rb')asf:buf=f.read()# Get a Python dict in one-linex=schema.decode(buf)x.name# The template message namex.value# {'userId': 11,# 'timestamp': 1598784004840,# 'orderSize': 0,# 'price': 5678.0,# ...# If you need an initial offset, apply it Pythonicallyschema.decode(buf[19:])# decode_header to filter out messages based on header to avoid decoding# message bodies that are not neededschema.decode_header(buf)['templateId']High Performance Decoding (Wrapping)This gives you decent performance while still retaining high code readability.importsbewithopen('your-schema.xml','r')asf:schema=sbe.Schema.parse(f)wtihopen('your-data.sbe','rb')asf:buf=f.read()# Wrap the buffer without decoding it, fields are converted to Python variables# on demandx=schema.wrap(buf)x.header['templateId']x.body['price']x.body['someGroup'][2]['price']Direct Access with Pointersget_raw_pointergives you the required information to unpack a variable frommemoryview/bytes. This gets you very close to the fastest achievable performance in Python:importsbewithopen('your-schema.xml','r')asf:schema=sbe.Schema.parse(f)header_pointer=schema.header_wrapper.get_raw_pointer('templateId')# Let's say we are only interested in messages of templateId == 3price_pointer=schema.message_wrappers[3].get_raw_pointer('price')wtihopen('your-data.sbe','rb')asf:buf=f.read()# pass `memoryview` to `unpack` to avoid copyingbuf=memoryview(buf)[initial_offset:]template_id=header_pointer.unpack(buf)# calls buf[offset:offset+size].cast("I")[0] directlyiftemplate_id==3:print(price_pointer.unpack(buf))Encodingimportsbewithopen('./your-schema.xml','r')asf:schema=sbe.Schema.parse(f)# message_id from the schema you want to encodemessage_id=3obj={'userId':11,'price':5678.0,# ...}# Encode from Python dict in one-lineschema.encode(schema.messages[3],obj)# You can supply your header values as a dictschema.encode(schema.messages[3],obj,headers)
Package: sbeaver
SbeaverThis is sbeaver - a lightweight and extremely simple http server for creating APIs.To install sbeaver on your system, you can use thepip install sbeavercommand, or you can download this repository and runpython setup.py installUsageimportsbeaverserver=sbeaver.Server(address="localhost",port=8000,sync=True)this code will import and make the basic configuration of the sbeaver server in your project
To start, you need to callserver.start()Decorators are used to bind paths on the server to internal methods.sbind is used to bind static paths (e.g. home page)@server.sbind('/')defindex(request):return200,{'status':'ok'}You can also bind a regular expression usingbind@server.bind(r'/regex/(\w*)(?:\.|/)(\w*)(?:|/)')defregex(request,param1=None,param2=None):return200,{'first':param1,'second':param2}Or if you can't work with the regex, you can use easy bind(ebind)@server.ebind('/ebind/<submethod>/<method>')defmethod(request,submethod=None,method=None):return200,{'section':submethod,'method':method}You can also interact with the user's request. For example, this code will return all known information about a particular request@server.sbind('/info')definfo(request):request.parse_all()# get and save data, url params, ip from requestreturn200,{'info':request.dict}If the function required for the path is not found during request processing, the code404 function is called. It can be assigned by code@server.code404()defpage_not_found(request):return{'error404':f"path{request.path}not found"}Also done with 500 code. When an exception occurs during the processing of a user request, an error will be displayed and the code function will be called@server.code500()definternal_server_error(request):return{'error500':f"Exception happened"}RedirectingYou can redirect user to another page using method redirectExample:@server.sbind('/')# static binddefargs(request):returnsbeaver.redirect(307,'/info')# redirect with data(307 code)FilesYou can return files using method file@server.sbind('/photo')defphoto(request):returnsbeaver.open_file('beaver.png',sbeaver.Types.Image.png)
Package: sbelt
Py_SBeLTRivers transport sediment particles. Individual particles can exhibit transport behavior that differs significantly when compared to other particles. py_SBeLT provides a simple Python framework to numerically examine how individual particle motions in rivers combine to produce rates of transport that can be measured at one of a number of downstream points. The model can be used for basic research, and the model's relatively straightforward set-up makes it an effective and efficient teaching tool to help students build intuition about river transport of sediment particles.InstallationQuick InstallationpipinstallsbeltInstallation from SourceClone thepy_SBeLTGitHub repositorygitclonehttps://github.com/szwiep/py_SBeLT.gitThen set your working directory topy_SBeLT/and build the projectcdpy_SBeLT/pythonsetup.pybuild_ext--inplacepipinstall-e.Getting StartedUsers can work through the Jupyter Notebooks provided to gain a better understanding of py_SBeLT's basic usage, potential, and data storage methods. Either launch the binder instance (), clone the repository, or download the notebooks directly to get started.If notebook's aren't your thing, simply run:sbelt-runorfromsbeltimportsbelt_runner
sbelt_runner.run()To get started. For help, reach out with questions to the repository ownerszwiepand reference the documenation indocs/andpaper/!DocumentationDocumentation, including Jupyter Notebooks, API documentation, default parameters, and model nomeculture, can be found in the repository'sdocs/directory. Additional information regarding the theoritical motivation of the model can be found in thepaper/paper.mdandTHEORY.mdfiles.AttributionTBD
Package: sberbank
Sberbank========Installation-----------1. Add "sberbank" to your INSTALLED_APPS settings:```pythonINSTALLED_APPS = [...'sberbank',]```2. Add merchants params to your settings:```pythonMERCHANTS = {%merchant_id%: {'username': %merchant_username%,'password': %merchant_password%,'success_url': %default_success_url%}}```3. Add callback url to you urls.py:```pythonurlpatterns = [...url('/sberbank', include('sberbank.urls'))]```Sberbank========Installation-----------1. Add "sberbank" to your INSTALLED_APPS settings:```pythonINSTALLED_APPS = [...'sberbank',]```2. Add merchants params to your settings:```pythonMERCHANTS = {%merchant_id%: {'username': %merchant_username%,'password': %merchant_password%,'success_url': %default_success_url%}}```3. Add callback url to you urls.py:```pythonurlpatterns = [...url('/sberbank', include('sberbank.urls'))]```4. Run `python manage.py migrate` to create models.Usage-----------* Pay```pythonfrom sberbank.service import BankServiceinstance = BankService(%merchant_id%)payment = instance.pay(amount=%amount%)```Response:| name | type | example ||----- | ---- | ------- || payment_id | UUID | UUID('8b7e1798-eb96-402d-ac0e-fa23042d05a7') || redirest_url | string | https://3dsec.sberbank.ru/payment/merchants/upravdoma/payment_ru.html?mdOrder=c12f8fae-447c-7853-c12f-8fae0000302b |* Check payment status:```pythonfrom sberbank.service import BankServiceinstance = BankService(%merchant_id%)status = instance.check_status(%payment_id%)```Response:| name | type | example ||----- | ---- | ------- || status | ENUM | <Status.CREATED: 0> || amount | decimal | 190.82 || created| datetime | datetime.datetime(2018, 1, 26, 9, 4, 1, 950122) || updated| datetime | datetime.datetime(2018, 1, 26, 9, 4, 1, 950122) |
Package: sberbank-async-cryptography
Sberbank signature verification using async cryptographyThe code of keys generation and message signing and signature verification is universal,
it is not only Sberbank-compatible. You can use it for your own purposes.
However there is asberbank_toolsmodule that consist sberbank-specific functions.The repo is open for pull requests. The author will be glad to hear some good feedback from you.Python versionPython version that has been used while coding is 3.8. Other versions has not been tested but they might work.Installationpipinstall-isberbank_callback_async_cryptographyFlask exampleimportosfromdotenvimportload_dotenvfromflaskimportrequestfromflask_restfulimportResourcefromsb_async_cryptography.sberbank_toolsimportverify_signature,params_get_checksumfromsb_async_cryptography.signatureimportpublic_key_import_from_x509_certificate_fileload_dotenv()SBERBANK_PUBLIC_KEY_FILE=os.getenv('SBERBANK_PUBLIC_KEY_FILE')pub_key=public_key_import_from_x509_certificate_file(SBERBANK_PUBLIC_KEY_FILE)classNotification(Resource):defget(self):"""Status change notification from Sberbank"""params=request.argssignature=params_get_checksum(params)ifnotverify_signature(pub_key,signature,params):return{"errors":"Signature verification failed."},400# some other code hereFastAPI exampleimportosfromdotenvimportload_dotenvfromfastapiimportRequestfromsb_async_cryptography.sberbank_toolsimportverify_signature,params_get_checksumfromsb_async_cryptography.signatureimportpublic_key_import_from_x509_certificate_filefromstarlette.responsesimportJSONResponseload_dotenv()SBERBANK_PUBLIC_KEY_FILE=os.getenv('SBERBANK_PUBLIC_KEY_FILE')pub_key=public_key_import_from_x509_certificate_file(SBERBANK_PUBLIC_KEY_FILE)asyncdefnotification(request:Request):"""Status change notification from Sberbank"""params=dict(request.query_params)signature=params_get_checksum(params)ifnotverify_signature(pub_key,signature,params):returnJSONResponse(status_code=400,content={"errors":"Signature verification failed."})# some other code here
Package: sbermarket-api
sbermarket-apiNot official python client for product market Sbermarket.Задачи что преследовал:Поиск самого дешевого товара среди магазинов вокруг.Отлеживание в целом цен на продукты.Сделать алерт на дешевые товары.Вести статистику на цены товаров.Что внутри?Токен получается только из статического js скрипта. Где содержится JSON вида:{"api-version":"3.0","client-token":"TOKEN","is-storefront-ssr":l.sk}Скорее всего он у всех одинаковый.Installationpipinstall-Usbermarket-apior install withPoetrypoetryaddsbermarket-api📈 ReleasesYou can see the list of available releases on theGitHub Releasespage.We followSemantic Versionsspecification.We useRelease Drafter. As pull requests are merged, a draft release is kept up-to-date listing the changes, ready to publish when you’re ready. With the categories option, you can categorize pull requests in release notes using labels.🛡 LicenseThis project is licensed under the terms of theMITlicense. SeeLICENSEfor more details.AlternativesSbermarket client on TypeScripthttps://github.com/x0rium/sbermarket-api
Package: sberpm
SberProcessMining (SberPM) – Process Mining Python frameworkSberPM is an open-source Python library for conducting a comprehensive analysis of business processes with the use of process mining and machine learning techniques. By implementing this tool, objective and deep insights into the process on all levels can be revealed. These insights are then used to detect problems such as bottlenecks and deviations and identify potential opportunities for process improvement and optimization.With SberPM you can:Discover the real process flow and create visualization of the generated modelHaving the event log of a business process, you can build the process model in the form of a graph by using the algorithms called miners and visualize it. In order to do this, the library provides a number of algorithms, that is Simple Miner, Causal Miner, Heuristic Miner, Alpha/Alpha+ Miners, and Inductive Miner. Thus different process weaknesses such as bottlenecks, loops, and deviations can be identified.Calculate process performance indicatorsAs a part of performance analysis, SberPM offers five basic types of metrics, each designed for a prticular object to group by. In fact, it can be metrics by IDs, unique traces (=sequences of activities), activities, transitions (=two consequent activities), or users.Visualize process performance indicatorsOnce the process performance indicators are assessed, they can be either mapped on a data-driven process graph or plotted in a separate interactive figure. By doing this, it is possible to understand of how things are working and where shifts are possible.SberPM Python library is being developed by the Sber Process Mining Team.InstallationInstallation via pippipinstallsberpmAdditionally, you might need to install graphviz executables and add the path to the executables to PATH variable:https://graphviz.org/download/ExamplesTo find out how to work with SberPM, seetutorialsin files tar.gz.ContactsIf you have any questions or suggestions, feel free to contact us!Andrey Bugaenko (aabugaenko@sberbank.ru)
Package: sbg-cli
SBG-CliWorks on Linux and OS X.Requirements Linux:
Docker==1.7.* (need to support api version 1.19)Install:
- install docker and add your user to docker group
- pip install sbg-cliRequirements OS X:
docker-machine (need to support api version 1.19)Running:
- make sure that boot2docker is running before using sbg-cli (boot2docker start)
Package: sbgnrender
SBGNRender Python libraryThis library is using Selenium to control ChromeDriver, to run a JS website rendering SBGN (based on Newt)To install it, the simplest way is via PyPI :sudo pip3 install sbgnrenderAfter installing the library, usage is the following :from sbgnrender import renderSBGN

renderSBGN(
    input_file,  // Path as a string
    output_file, // Path as a string
    format,      // Format as a string : svg, png, jpg
    scale,       // Scale of the network (default 1 for svg, 3 for jpg/png)
    bg,          // Background color as HTML String (ex #fff for white), None for transparent (available for png/svg),
    max_width,   // Maximum width in pixels
    min_width,   // Minimum width in pixels
    quality,     // Quality (available for jpg),
    layout,      // Perform automatic layout
    verbose      // True | False
)This library depends on ChromeDriver, which can be installed on ubuntu/debian systems withsudo apt install chromium-chromedriverOn Ubuntu 19.x and later, chromium installation is using snap package manager, which causes a problem while writing and accessing temporary files. The current workaround is to change chromium temporary directory permissions with :sudo chmod 711 /tmp/snap.chromiumThis is just a temporary which you will have to do at startup (after having run chrome at least once) everytime. If somebody knows a trick, contributions are welcome
Package: sbijax
sbijaxSimulation-based inference in JAXAboutSbiJAX implements several algorithms for simulation-based inference usingJAX,HaikuandBlackJAX.SbiJAX so far implementsRejection ABC (RejectionABC),Sequential Monte Carlo ABC (SMCABC),Sequential Neural Likelihood Estimation (SNL)Surjective Sequential Neural Likelihood Estimation (SSNL)Sequential Neural Posterior Estimation C (shortSNP)ExamplesYou can find several self-contained examples on how to use the algorithms inexamples.UsageInstallationMake sure to have a workingJAXinstallation. Depending whether you want to use CPU/GPU/TPU,
please followthese instructions.To install from PyPI, just call the following on the command line:pipinstallsbijaxTo install the latest GitHub , use:pipinstallgit+https://github.com/dirmeier/sbijax@<RELEASE>AuthorSimon Dirmeiersfyrbnd @ pm me
Package: sbin
sbinAutomate your project setup with a simplebin.ymlfile.HelpSeedocumentationfor more details.InstallationWe recommend installingsbinglobally throughpip install sbin.sbinand its aliasbinexecutables will be available from the command line.Please note that the documentation will refer tosbinasbin.Quick startStart by creating an examplebin.yamlfile at the root of your project withbin initYou can explore bin commands throughbin <help|h|-h|--help>. Here
are some built-in ones:bin req   # makes sure you have the requirements to run the projet 
bin up    # sets up whatever is needed to run the project
bin down  # tear down whatever was upExamplesHere are few projectexamplesutilizingbin.ContributingSee thecontributingdoc.
Package: sbio
sbioCollection of simple Bioinformatic tools.fastq_qualityScript usage:fastq_quality.py -r1 *R1*.fastq.gz -r2 *R2*.fastq.gzfastq_quality.py -hModule usage:from sbio.fastq_quality import FASTQ_Qualityfq = FASTQ_Quality(read1, read2, sampling_number)fq.run()Files must be .gz zippedPaired reads must contain _R1 or _R2 in file nameAlong with the FASTQ file and sample name 5 FASTQ attributes are obtained:file_size --> FASTQ file size (human readable)
total_read_count --> Total read count within each FASTQ filesampling_size  --> Random analyzed read countlength_mean --> Average read lengthread_average --> Average read qualityreads_gt_q30 --> Read counts with an average quality greater than 30Note: when calculating percent of reads above Q30 use reads_gt_q30/sampling_sizeAfter ran object will contain nested dot notation for each read, fq.read1.fastq --> 'sample_S25_L001_R1.fastq.gz'
Package: sb-json-tools
python-json-toolsTools for working with json (especially) json-arrays.Usesorjsonorujsonif present, otherwise standardjson.UsageInstallationpip install sb-json-toolsjson-val (lib: sb_json_tools.jt_val)Allows you to validate iterables of json-objects
according tojson-schemaRegular and async functions.json-diff (lib: sb_json_tools.jsondiff)Allows you to compare two json-objects and get a report
how they differ, if they do.json-valCommand-line tool to validate a json-file with a schemajson-schema.DevelopmentAfter cloning the repo, just run$ make testto setup a virtual environment,
install dev dependencies
and run the unit tests.Note:If you run the command in a activated virtual environment,
that environment is used instead.
Package: sbk
SBK: Split Bitcoin KeysSBK is still ALPHA quality software, please only use if you want to contribute.SBK is a program to generate and recover Bitcoin wallets. The goal of SBK is to enable most people to live up to the security mantra of Bitcoin:Your keys, your coins; not your keys, not your coins.Project/Repo:Code Quality/CI:NamerolesinceuntilManuel Barkhau (mbarkhau@gmail.com)author/maintainer2019-01-Development/Testing$gitclonehttps://gitlab.com/mbarkhau/sbk
$cdsbk
$makeinstall
$makelintmypytestChangelog forhttps://gitlab.com/mbarkhau/sbkv201912.1001-alphaInitial release
Package: sbl2py
sbl2pytranslates code written in theSnowballstring processing
language intoPython:import sbl2py
import sbl2py.utils

sbl_code = """
externals ( stem )
define stem as (
    backwards ( ['ly'] delete )
)
"""
py_code = sbl2py.translate_string(sbl_code)
module = sbl2py.utils.module_from_code('demo_module', py_code)
print module.stem('fabulously')Output:fabulousFeaturessbl2pyshould support all of the Snowball features that are commonly
used. In particular, all features used by the stemming algorithms from
the Snowball stemmer package are supported.InstallationInstallingsbl2pyis easy usingpip:pip install sbl2pyUsageThe easiest way to translate a Snowball file into a Python module is
using thesbl2pyscript which is automatically installed withsbl2py:sbl2py SNOWBALL_FILE PYTHON_FILESeesbl2py--helpfor the available options.You can also usesbl2pyfrom within Python. Thesbl2pymodule
offers two functions that translate Snowball code from a string
(translate_string) or a file (translate_file) and return the
corresponding Python source as a string. If you want to execute the
code, simply use themodule_from_codefunction of thesbl2py.utilsmodule.The generated Python modules export all routines from the original
Snowball code that are listed in theexternalssection. That is,
if you haveexternals ( stem )in your Snowball code and store
the generated Python module in a file calledmystemmer.pythen
you can call thestemroutine as follows:import mystemmer
print mystemmer.stem('foobar')Licensesbl2pyis covered by theMIT License. The Snowball source code
and the word lists in thetestdirectory are covered by theBSD-3 License. Please see theLICENSEfile for details.
Package: sblgntparser
A python parser for theSBL Greek New TestamentThis package provides a parser and tools for theSBL Greek New
Testamentformat.Compatibilitypython 3.3, 3.4pypy3Installationviapipfrom the Python Package Index -pypi(recommended)globalpip install sblgntparserlocalpip install--usersblgntparserfrom the git repositorygit clone git@github.com:KLINGTdotNET/sblgntparser.gitcd sblgntparsermake && pip install--userUsage Examplesseegithub