Saravanan666/pypi-org huggingface dataset:
Package: sandstone-spawner
# sandstone-spawnerJupyterHub Spawner class for starting Sandstone HPC user instances## Installation**This module requires the JupyterHub Login Handler for Sandstone, found at https://github.com/SandstoneHPC/sandstone-jupyterhub-login**Install the module with```python setup.py install```Set the `SANDSTONE_SETTINGS` environment variable to the absolute path of your Sandstone settings file, and then set the `SANDSTONE_APP_PATH` environment variable to the absolute path of the `sandstone-jupyterhub` executable. This executable is provided by `sandstone-jupyterhub-login`.```export SANDSTONE_APP_PATH=/path/to/sandstone-jupyterhub```## JupyterHub ConfigModify your JupyterHub config file to set the default spawner as `SandstoneSpawner`.```pythonc.JupyterHub.spawner_class = 'sandstone_spawner.spawner.SandstoneSpawner'```### Spawn Jupyter Notebooks and SandstoneIf you would like JupyterHub to be able to spawn Sandstone as well as Jupyter Notebooks, configure the _ProfilesSpawner_ to wrap the _SandstoneSpawner_:```pythonc.JupyterHub.spawner_class = 'wrapspawner.ProfilesSpawner'c.Spawner.http_timeout = 120c.ProfilesSpawner.profiles = [( "Host process",'local','jupyterhub.spawner.LocalProcessSpawner', {'ip':'0.0.0.0'} ),('Sandstone', 'sandstone','sandstone_spawner.spawner.SandstoneSpawner', {}),]```## Running the Docker ImageThe Docker image included in this repo provides an example setup of a JupyterHub instance that can spawn either a Jupyter Notebook or Sandstone instance. The image has two example users _(username:password)_:* sandstone1:sandstone1* sandstone2:sandstone2To build and run this image:```docker build -t sandstone-jupyterhub .docker run -p 8000:8000 -d sandstone-jupyterhub```JupyterHub will be accessible on http://localhost:8000/.
Package: sanduuzlogformatter
Sanduuz Log Formatter (SLF)Sanduuz Log Formatter is a custom log formatter for the python logging library.Usage:importloggingfromsanduuzlogformatterimportSLFformatter=SLF()stream_handler=logging.StreamHandler()stream_handler.setFormatter(formatter)logger=logging.getLogger()logger.addHandler(stream_handler)logger.setLevel(logging.INFO)logger.info("This is a message from SLF!")Features:A custom date format can be given to the formatter during initialization:formatter=SLF(datefmt="%Y-%m-%d")A custom maximum length for the info section| module:function:linenumber |can be given to the formatter during initialization:formatter=SLF(info_section_max_length=75)
Package: sane-finances
Sane FinancesA library for download and parse financial data from various sources.Library provides unified interface for access to various sources of financial data.
Such as stocks or bonds historical values.DisclaimerThis library acts like some sort of "middleware" between financial source API and user.
It does not store or analyze data.
So in many (or most) cases you may need legal permission for access to source API and usage of downloaded data.
This library does not provide any of such permission by design.Before use of this library you have to examine user agreement of each source independently.
If you have no special permission or breach user agreement then use library on your own responsibility.
Package: sane-out
sane-out for PythonA lightweight library for clean console outputInstallWith pip:pipinstallsane-outWith Poetry:poetryaddsane-outWith pipenv:pipenvinstallsane-outUseDefault behaviourfromsane_outimportoutout("This is an info message")out.info("This is an info message too")out.debug("This is a debug message. It won't be printed without 'verbose=True'")out.verbose=Trueout.debug("Now this debug message will be printed")out.warning("Warning! This is a message that will be printed to stderr")out.error("Your code will print an error message crash with code -1!")out.error("You can crash your program with a custom code",42)out.calm_error("You can also print an error message without crashing")Custom instancefromsane_outimport_SanePrinter# Setup your output with constructor paramstalkative=_SanePrinter(verbose=True,colour=True)boring=_SanePrinter(verbose=False,colour=False)talkative.debug("Shhh... This is a debug message")boring.debug("I will not print this")boring.warning("And this won't have amy colour")LicenseMIT © Nikita Karamov
Package: saneround
saneroundPython package providing sane round() instead of official insane round().Quick startInstall this package using pip:pip install saneroundImportsaneroundpackage assrand usesr.round(number: Union[int, float], ndigits: int = 0) -> float:>>>importsaneroundassr>>>sr.round(0.4)0.0>>>sr.round(0.5)1.0>>>sr.round(1.4)1.0>>>sr.round(1.5)2.0>>>sr.round(-0.4)0.0>>>sr.round(-0.5)-1.0>>>sr.round(-1.4)-1.0>>>sr.round(-1.5)-2.0>>>sr.round(1234.567,2)1234.57>>>sr.round(1234.576,-2)1200.0Comparison with othersThere are some similar packages:builtinround2 (0.0.4)math-round (0.0.3.post1)math-round-af (1.0.3)Comparison results are here:saneroundbuiltinround2math-roundmath-round-afround(0.5)1.00111.0round(1.5)2.02222.0round(-0.5)-1.00-10-1.0round(-1.5)-2.0-2-2-1-2.0round(0.49999999999999994)0.00010.0round(1.255, 2)1.261.251.251.251.25round(123456.78, -2)123500.0123500.0nan123500.0Errorround(0.12345, -1)0.00.0nan0.0Errorround(42.0, 308)42.042.0nanErrorErrorround(0.42, 2**30)0.420.42nan(too late)(too late)round(2.5e20, -20)3e+202e+20nan3e+20Errorround(0.5, 23)0.50.5-1.0717247280990649e-080.499999999999999940.49999999999999994saneround is very robust.
Package: saneschema
saneschemasaneschema is a JSON schema package for people who want an easier-to-parse schema than that provided byjsonschema.
saneschema checks that a JSON file conforms to a given structure, or schema, which can be a very useful tool for data validation.InstallationPyPi & PipInstallation with PyPi and Pip is the easier option and will ensure you have the most up to date, stable version
The following command assumes that python 3 is your default version of python.pipinstallsaneschemaGit & PipInstallation with Git and Pip is a bit more work but will ensure you have the most up to date version.
The following commands assume that python 3 is your default version of python and pip.gitclonehttps://github.com/Murto/saneschema.gitcdsaneschema
pythonsetup.py
pipdist/saneschema-2.0-py3-none-any.whl
Package: sanest
sane nested dictionaries and listssanestis a python (3+) library that makes it easy to work with nested
dictionaries and lists, such as those commonly used in json formats,
without losing your sanity.Documentation:https://sanest.readthedocs.io/Python Package Index (PyPI):https://pypi.python.org/pypi/sanest/Source code and issue tracker:https://github.com/wbolster/sanest
Package: sanetinel
SanetinelThe sentinel that keeps you sane when tracking down unexpected behavior in algorithms.Sanetinel is a simple sanity-check system for monitoring your algorithms.This is a proof of concept version and is not stablefromsanetinelimportsanetinels=sanetinel('algorithm')s.train()s.log('variable',1)s.log('variable',2)s.log('variable',3)s.test()s.log('variable',100)BuildingInstallation:pip install --user --upgrade setuptools wheelBuild with:python setup.py sdist bdist_wheelLicense(c) 2020 Simon Rovder, James RenwickThis library is licensed under the GPL-3.0 license.
Package: saneyaml
This micro library is a PyYaml wrapper with sane behaviour to read and
write readable YAML safely, typically when used with configuration files.With saneyaml you can dump readable and clean YAML and load safely any YAML
preserving ordering and avoiding surprises of type conversions by loading
everything except booleans as strings.Optionally you can check for duplicated map keys when loading YAML.Works with Python 3. Requires PyYAML 5.x or higher.license: apache-2.0
homepage_url:https://github.com/nexB/saneyamlUsage:pip install saneyaml

>>> from  saneyaml import load
>>> from  saneyaml import dump
>>> a=load('''version: 3.0.0.dev6
...
... description: |
...     AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file
...     provides a way to document a software component.
... ''')
>>> a
dict([
    (u'version', u'3.0.0.dev6'),
    (u'description', u'AboutCode Toolkit is a tool to process ABOUT files. '
    'An ABOUT file\nprovides a way to document a software component.\n')])

>>> pprint(a.items())
[(u'version', u'3.0.0.dev6'),
 (u'description',
  u'AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file\nprovides a way to document a software component.\n')]
>>> print(dump(a))
version: 3.0.0.dev6
description: |
  AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file
  provides a way to document a software component.
Package: sangaboard
pySangaboardThis is the python module that communicates to the Sangaboard v0.3, an open-source board for driving unipolar stepper motors. It also supports older versions of the Sangaboard that were  based on an Arduino Nano and a couple of Darlington pair ICs.ContributorsRichard Bowman (University of Bath, UK) Wrote the initial version of the library when the board was specific to the OpenFlexure Microscope.
Julian Stirling (University of Bath, UK) Contributed to the initial library, and divided to code base to make an independent sangaboard library
Boyko Vodenicharski and Filip Ayazi (University of Cambridge, UK) contributed Python 3 support, endstop support.This project is (c) 2017 by the contributors, and released GNU GPL v3.0 (software).InstallYou can install pySangaboard with the following pip commandpip install sangaboardDocumentationThe documentation is available onRead the DocsDeveloper notesPublishingpip install twinepython setup.py sdist bdist_wheeltwine check dist/*twine upload dist/*
Package: sangdvtest
A sample Python projectA sample project that exists as an aid to thePython Packaging User
Guide'sTutorial on Packaging and Distributing
Projects.This project does not aim to cover best practices for Python project
development as a whole. For example, it does not provide guidance or tool
recommendations for version control, documentation, or testing.The source for this project is available here.Most of the configuration for a Python project is done in thesetup.pyfile,
an example of which is included in this project. You should edit this file
accordingly to adapt this sample project to your needs.This is the README file for the project.The file should use UTF-8 encoding and can be written usingreStructuredTextormarkdownwith the appropriatekey set. It will be used to generate the project webpage on PyPI and will be
displayed as the project homepage on common code-hosting services, and should be
written for that purpose.Typical contents for this file would include an overview of the project, basic
usage examples, etc. Generally, including the project changelog in here is not a
good idea, although a simple “What's New” section for the most recent version
may be appropriate.
Package: sanger-sequencing
Semi-automated Sanger sequence analysis for plasmid verification.This package is the result of an internal hackathon at the Novo Nordisk
Foundation Center for Biosustainability and represents our approach to
improving the workflow of geneticists who need to verify plasmid
constructs by Sanger sequencing.Getting StartedFrom a Python environment that has Python 3.6 or later installed you can easily$pipinstallsanger-sequencingor usepip3depending on your environment.When you import the package, two main components are made available to you: a
configuration class that you can instantiate to set some global configuration
values and a high level analysis interface.importsanger_sequencingconfig=sanger_sequencing.Configuration()print(config.threshold)print(config.output)You can read more about the meaning of those attributes in the configuration
documentation. The main entry point for doing any kind of analysis is thesanger_verificationfunction. This function requires three arguments: a
template table of what to analyze, a mapping from plasmid identifiers to
their sequence records (typically coming from Genbank files), and a mapping
from sample identifiers to sequence records (.ab1files).You can find the complete documentation at:https://sanger-sequencing.readthedocs.io.CopyrightCopyright (c) 2018 Novo Nordisk Foundation Center for Biosustainability, Technical University Denmark licensed
under the Apache License, Version 2.0CreditsThis package was created usingcookiecutterand theDD-DeCaF/cookiecutter-decaf-pythonproject template.
Package: sangfor-sslvpn-api
基于M7.6.8 R2版本开发，如不适用你的版本，请提issuse安装说明1.pip安装requests2.修改config.py里面参数配置注意！如果SSLVPN没有单独配置证书,用默认自带的证书，config里SSL_ENABLE设置为false有问题可以提issuse
Package: sangfor-trans
sangfor_trans: Free sangfor translate for Pythonpython 3.4+
python 2.7+QuickstartYou can install it from PyPI:code: bash$ pip install sangfor_transor manual install:code: bash$ python setup.py installsingle sentence translationcode: python>>> from sangfor_trans import get_translate
>>> from sangfor_trans.config import GOOGLE, BAIDU
>>> translator = get_translate.GetTranslator(GOOGLE)
>>> translator.translate("auto", "zh", "hello world. \n this is my book")
u'你好，世界。这是我的书'support language.. code::'afrikaans': 'af','arabic': 'ar','belarusian': 'be','bulgarian': 'bg','catalan': 'ca','czech': 'cs','welsh': 'cy','danish': 'da','german': 'de','greek': 'el','english': 'en','esperanto': 'eo','spanish': 'es','estonian': 'et','persian': 'fa','finnish': 'fi','french': 'fr','irish': 'ga','galician': 'gl','hindi': 'hi','croatian': 'hr','hungarian': 'hu','indonesian': 'id','icelandic': 'is','italian': 'it','hebrew': 'iw','japanese': 'ja','korean': 'ko','latin': 'la','lithuanian': 'lt','latvian': 'lv','macedonian': 'mk','malay': 'ms','maltese': 'mt','chinese_simplified': 'zh-CN','chinese_traditional': 'zh-TW','auto': 'auto'How to make python third-party library and upload to PyPistep1: python setup.py sdiststep2: pip install twinestep3: we need to register an account on PyPI and create a file ~/.pypirc in the local user root directory（windows: the .pypirc file is in C:\Users\sangfor）, so that we don't need to enter the account password in the future.[distutils]
index-servers=pypi

[pypi]
repository = https://upload.pypi.org/legacy/
username = <username>
password = <password>step4: Next comes the last step, uploading packaged libraries. We use twine here. If there is no installation in the environment, we need to use PIP install twine to install it first.twine upload dist/*End: At this point, you can see your own source code package on the web page, and you can use our own Python library by using PIP install package name.
Package: sangmyung-univ-auth
sangmyung-univ-auth상명대학교 재학생 인증 라이브러리Features상명대학교 재학생 여부를 간편하게 확인하는 라이브러리입니다.재학생 인증 방식은 상명대학교 포털 SSO 인증 방식입니다.Easy to installPip:pip install sangmyung-univ-authDirect:git clone https://github.com/hyunmin0317/sangmyung-univ-authpython setup.py installEasy to use>>>fromsangmyung_univ_authimportauth>>>result=auth('201911019','<my-password>')>>>resultAuthResponse(is_auth=True,code='success',body={'name':'최현민','department':'컴퓨터과학전공','email':'choihm9903@naver.com'})>>>result.is_authTrue>>>result.code'success'>>>result.body{'name':'최현민','department':'컴퓨터과학전공','email':'choihm9903@naver.com'}AuthResponseAuthResponse(is_auth=True,code='success',body={'name':'최현민','department':'컴퓨터과학전공','email':'choihm9903@naver.com'})is_auth: 인증 성공 여부Type: boolValueTrue: 인증 성공False: 인증 실패code: Authenticator 반환 코드Type: strValue'success': 인증에 성공할 경우'auth_failed': 인증에 실패할 경우'unknown_issue': 기타 라이브러리 오류body: 메타데이터Type: dictKeyname: 이름department: 학과email: 이메일Sangmyung University Auth APIRequestURLhttps://smunity.co.kr/api/authMethodPOSTBody{"username":"<학번>","password":"<비밀번호>"}ResponseSuccess: 200 OK{"is_auth":true,"code":"success","body":{"name":"최현민","department":"컴퓨터과학전공","email":"choihm9903@naver.com"}}Fail: 401 Unauthorized{"is_auth":false,"code":"auth_failed","body":{"message":"아이디 및 비밀번호가 일치하지 않습니다."}}Referenceshttps://github.com/hyunmin0317/sangmyung-univ-authhttps://pypi.org/project/sangmyung-univ-auth/https://smunity.co.kr/api/auth
Package: sangreal-odo
Data migration in PythonDocumentationExampleOdo migrates data between different containers>>>fromodoimportodo>>>odo((1,2,3),list)[1,2,3]It operates on small, in-memory containers (as above) and large, out-of-core
containers (as below)>>>odo('myfile.hdf5::/data','postgresql://user:pass@host::my-table')Table('my-table',MetaData(bind=Engine(postgresql://user:****@host)),...)Odo leverages the existing Python ecosystem.  The example above usessqlalchemyfor SQL interation andh5pyfor HDF5 interaction.MethodOdo migrates data using network of small data conversion functions between
type pairs. That network is below:Each node is a container type (likepandas.DataFrameorsqlalchemy.Table) and each directed edge is a function that transforms or
appends one container into or onto another.  We annotate these functions/edges
with relative costs.This network approach allowsodoto select the shortest path between any
two types (thank younetworkx).  For performance reasons these functions often
leverage non-Pythonic systems like NumPy arrays or nativeCSV->SQLloading
functions.  Odo is not dependent on only Python iterators.This network approach is also robust.  When libraries go missing or runtime
errors occurodocan work around these holes and find new paths.This network approach is extensible.  It is easy to write small functions and
register them to the overall graph.  In the following example showing how we
convert frompandas.DataFrameto anumpy.ndarray.fromodoimportconvert@convert.register(np.ndarray,pd.DataFrame,cost=1.0)defdataframe_to_numpy(df,**kwargs):returndf.to_records(index=False)We decorateconvertfunctions with the target and source types as well as a
relative cost.  This decoration establishes a contract that the underlying
function must fulfill, in this case with the fastDataFrame.to_recordsmethod.  Similar functions exist forappend, to add to existing data, andresourcefor URI resolution.convert: Transform dataset into new containerappend: Add dataset onto existing containerresource: Given a URI find the appropriate data resourceodo: Call one of the above based on inputs.
E.g.odo((1,2, 3), list)->convert(list, (1, 2, 3))whileL = [];odo((1,2, 3), L)->append(L, (1, 2, 3))Finally,odois also aware of which containers must reside in memory and
which do not.  In the graph above thered-colorednodes are robust to
larger-than-memory datasets.  Transformations between two out-of-core datasets
operate only on the subgraph of the red nodes.LICENSENew BSD. SeeLicense File.HistoryOdo was factored out from theBlazeproject.
Package: sanic
Sanic | Build fast. Run fast.BuildDocsPackageSupportStatsSanic is aPython 3.8+web server and web framework that’s written to go fast. It allows the usage of theasync/awaitsyntax added in Python 3.5, which makes your code non-blocking and speedy.Sanic is also ASGI compliant, so you can deploy it with analternative ASGI webserver.Source code on GitHub|Help and discussion board|User Guide|Chat on DiscordThe project is maintained by the community, for the community.Contributions are welcome!The goal of the project is to provide a simple way to get up and running a highly performant HTTP server that is easy to build, to expand, and ultimately to scale.SponsorCheck outopen collectiveto learn more about helping to fund Sanic.Installationpip3 install sanicSanic makes use ofuvloopandujsonto help with performance. If you do not want to use those packages, simply add an environmental variableSANIC_NO_UVLOOP=trueorSANIC_NO_UJSON=trueat install time.$exportSANIC_NO_UVLOOP=true$exportSANIC_NO_UJSON=true$pip3install--no-binary:all:sanicNoteIf you are running on a clean install of Fedora 28 or above, please make sure you have theredhat-rpm-configpackage installed in case if you want to
usesanicwithujsondependency.Hello World ExamplefromsanicimportSanicfromsanic.responseimportjsonapp=Sanic("my-hello-world-app")@app.route('/')asyncdeftest(request):returnjson({'hello':'world'})if__name__=='__main__':app.run()Sanic can now be easily run usingsanic hello.app.[2018-12-30 11:37:41 +0200] [13564] [INFO] Goin' Fast @ http://127.0.0.1:8000
[2018-12-30 11:37:41 +0200] [13564] [INFO] Starting worker [13564]And, we can verify it is working:curl localhost:8000-iHTTP/1.1 200 OK
Connection: keep-alive
Keep-Alive: 5
Content-Length: 17
Content-Type: application/json

{"hello":"world"}Now, let’s go build something fast!Minimum Python version is 3.8. If you need Python 3.7 support, please use v22.12LTS.DocumentationUser Guide, Changelog, and API Documentation can be found atsanic.dev.Questions and DiscussionAsk a question or join the conversation.ContributionWe are always happy to have new contributions. We havemarked issues good for anyone looking to get started, and welcomequestions on the forums. Please take a look at ourContribution guidelines.
Package: sanic-aioja
sanic-aiojaaiojatemplate renderer for Sanic.This library has been inspired by so many other projects
(sanic-jinja2,django-jinja).
So thanks all for the inspiration.Installpip install sanic-aiojaFeaturesDebug modeBabel support@jinja2.templatedecoratorShortcut methods:globals,filters,tests,extensionsandpoliciesBuilt-inurlandstaticglobal functionsAbility to precompile templatesExamplefromsanicimportSanicfromsanic.responseimporthtmlfromsanic_aiojaimportJinja2,FileSystemLoaderapp=Sanic("sanic_aioja")jinja2=Jinja2(app,# use DebugUndefineddebug=True,# precompile templates on server start.# See jinja2.Environment.compile_templates()precompile=True,precompile_path=".jinja2.zip",# Jinja2 optionstrim_blocks=True,lstrip_blocks=True,loader=FileSystemLoader("./templates"),)# Lets extend environment with some globalsjinja2.globals({"token":"extensions.token",}).policies({"ext.i18n.trimmed":True,})@app.route('/')@jinja2.template("index.html")asyncdefindex(request):return{"header":"Sanic-aioja","array":["Red","Green","Blue"],}@app.route('/render/')asyncdefindex(request):content=awaitjinja2.render_to_string(request,"index.html",{"header":"Sanic-aioja","array":["Red","Green","Blue"],})returnhtml(content)if__name__=="__main__":app.run()
Package: sanic-aiomysql
sanic-aiomysqlsetupinstallpipinstallgit+https://github.com/tuna2134/sanic-aiomysql.gitUsefromsanicimportSanic,responsefromsanic_mysqlimportExtendMySQLapp=Sanic("app")ExtendMySQL(app,auto=True,user="root",host=127.0.0.1,password="hello",autocommit=True)@app.get("/")asyncdefmain(request):awaitrequest.ctx.cursor.execute("CREATE TABLE data(name TEXT, value BIGINT)")returnresponse.text("create a table")app.run()orfromsanicimportSanic,responsefromsanic_mysqlimportExtendMySQLapp=Sanic("app")ExtendMySQL(app,user="root",host=127.0.0.1,password="hello",autocommit=True)@app.get("/")asyncdefmain(request):asyncwithrequest.ctx.pool.acquire()asconn:asyncwithconn.cursor()ascursor:awaitcursor.execute("CREATE TABLE data(name TEXT, value BIGINT)")returnresponse.text("create a table")app.run()orfromsanicimportSanic,responsefromsanic_mysqlimportExtendMySQL,cursorapp=Sanic("app")ExtendMySQL(app,user="root",host=127.0.0.1,password="hello",autocommit=True)@app.get("/")@cursor()asyncdefmain(request,connection,cursor):awaitcursor.execute("CREATE TABLE data(name TEXT, value BIGINT)")returnresponse.text("create a table")app.run()