Saravanan666/pypi-org huggingface dataset:
Package: sailthru-client
sailthru-python-client======================For installation instructions, documentation, and examples please visit:[http://getstarted.sailthru.com/new-for-developers-overview/api-client-library/python](http://getstarted.sailthru.com/new-for-developers-overview/api-client-library/python)A simple client library to remotely access the `Sailthru REST API` as per [http://getstarted.sailthru.com/api](http://getstarted.sailthru.com/developers/api)Python binding for [Sailthru API](http://getstarted.sailthru.com/api) based on [Requests](http://docs.python-requests.org/en/latest/)It will make requests in `JSON` format.Supports Python 2.6, 2.7, 3.3+### Installation (Tested with Python 2.7.x)Installing with [pip](http://www.pip-installer.org/):pip install sailthru-client### Running testsInstall tox and then type:tox### API Rate LimitingHere is an example how to check rate limiting and throttle API calls based on that. For more information about Rate Limiting, see [Sailthru Documentation](https://getstarted.sailthru.com/new-for-developers-overview/api/api-technical-details/#Rate_Limiting)```pythonsailthru_client = SailthruClient(api_key, api_secret)# ... make some api calls ...rate_limit_info = sailthru_client.get_last_rate_limit_info('user', 'POST')# get_last_rate_limit_info returns None if given endpoint/method wasn't triggered previouslyif rate_limit_info is not None:limit = rate_limit_info['limit'];remaining = rate_limit_info['remaining'];reset_timestamp = rate_limit_info['reset'];# throttle api calls based on last rate limit infoif remaining <= 0:seconds_till_reset = reset_timestamp - time.time()# sleep or perform other business logic before next user api calltime.sleep(seconds_till_reset);```
Package: saimll
Simple Inline Markup Language and Logging (saimll)SAIMLThis allows the user to customize strings and prettyprint different information to stdout.Includes:parse -> returns formatted stringsprint -> parse SAIML markup strings and display them to stdoutSyntax:
Brackets[]indicate a macro. Macros can do 1 of three things; Assign a foreground/background color,
create a hyperlink, and call a builtin function. All macros will ignore extra whitespace and focus on the identifiers;@,~, and^.ColorsColors start with a leading identifier@. To indicate foreground or background use the specifierFandBrespectively.
Following the@and the specifier you can then enter the color.This can be a predifined color such as; black, red, green, yellow, blue, magenta, cyan, white.[@F black].It can be a hex code#ead1a8.[@F #ead1a8].It can be a XTerm code 0-256.[@F 9].Lastely, it can be an rgb color where the 3 numbers can be seperated by a,or a;.[@F 114;12,212].Colors can be reset with[@F]or[@B]to reset foreground or background respectively or[@]can be use to reset both.Foreground and background can be specified in the same macro[@F 1 @B 2], but they can not be reset in the same macro[@F @B], use[@]` instead.While the macro will ignore white space and you can do something like[@F#ead1a8@B3]it is preferred to use whitespace for readability[@F #ead1a8 @B 3].HyperlinksHyperlinks start with a leading identifier~.Hyperlinks will surround plain text blocks.[~https://example.com]Example->Example.Links end on the next macro with the simpl~or at the end of the string[~https://example.com]Example[~] Not part of the link→ ``ExampleNot part of the link[~https://example.com]Link1 [~https://example.com]Link2→Link1link2``Builtin functionsBuiltin functions start with the identifier^. The text block following the function will have it's string value passed as a parameter.You can also specify your own function or override the provided ones by calling SAIML.define("Macro Name", Callable)The custom function needs to take a string and return a string. If it does not return a string it will not have an affect.Example:defhello_world(string:str)→str:return"Hello World"SAIML.define("hw",hello_world)SAIML.print("[^hw]Cat goes moo")The above example lets SAIML know about the function hello_world and says it can be called withhwThen all that needs to happen is to call it with[^hw]Example:[^rainbow]Rainbow Textwill return the string with a rainbow foreground color.
SAIML also follows some inspiration from markdown where*means toggle bold and_means to toggle underline.
To reset all attributes, color and formatting, use the empty brackets[].Check out thisexamplefor how SAIML can be used
Package: sain
sainSain is a dependency-free library that implements some of the Rust core standard types.InstallYou'll need Python 3.10 or higher.PyPI$pipinstallsainOverviewMore examples inexamplescfg,cfg_attrand Marking objects.Conditionally include code at runtime and mark objects.fromsainimportcfg,cfg_attr# Calling this on a non-unix system will raise a RuntimeError# and the function will not run.@cfg_attr(target_os="unix")defrun_when_unix()->None:importuvloopuvloop.install()ifcfg(target_arch="arm64"):run_when_unix()# If `cfg` returns True, Function will be in scope.ifcfg(requires_modules="aiohttp"):importaiohttpdefcreate_app()->aiohttp.web.Application:# Calling this will raise a runtime error. its marked as `TODO`.sain.todo("Finish me!")# Assuming aiohttp is not installed.# Calling the function will raise `NameError` since its not in scope.create_app()# Those will only warn at runtime and will not raise anything. They're just markers.@sain.unimplemented(message="User is not fully implemented.")classUser:@property@sain.deprecated(since="1.0.4",use_instead="use `get_id` instead.")defid(self)->int:...Option<T>andSome<T>Implements the standardOptionandSometypes. An object that may beNoneorT.importsainimportosiftyping.TYPE_CHECKING:# Avaliable only during type checking.fromsainimportOption# Stright up replace typing.Optional[str]defget_token(key:str)->Option[str]:# What os.getenv returns may be str or None.returnsain.Some(os.environ.get(key))# Raises RuntimeError("No token found.") if os.getenv return None.token=get_token().expect("No token found.")# The classic way to handle this in Python would be.iftokenisNone:token="..."else:...# Replace this with `unwrap_or`.# Returning DEFAULT_TOKEN if it was None.env_or_default=get_token().unwrap_or("DEFAULT_TOKEN")# Type hint is fine.as_none:Option[str]=sain.Some(None)as_none.uwnrap_or(123)# Error: Must be type `str`!assertas_none.is_none()# TrueDefaultsAn interface that types can implement which have a default value.importsainimportrequestsclassSession(sain.Default[requests.Session]):# One staticmethod must be implemented and must return the same type.@staticmethoddefdefault()->requests.Session:returnrequests.Session()DEFAULT_SESSION=Session.default()IterTurns normal iterables intoItertype.importsainf=sain.Iter([1,2,3])# or f = sain.into_iter([1,2,3])assert1infforiteminf.map(lambdai:str(i)):print(item)NotesSince Rust is a compiled language, Whatever predict incfgandcfg_attrreturns False will not compile.But there's no such thing as this in Python, SoRuntimeErrorwill be raised and whatever was predicated will not run.
Package: sa-insert-helper
# Sqlalchemy bulk insert helperA simple helper for bulk insert data with sqlalchemyusage:Let's assume we have a session and model```pythonfrom sqlalchemy import create_engine, INTEGER, String, Columnfrom sqlalchemy.ext.declarative import declarative_basefrom sqlalchemy.orm import sessionmakerBase = declarative_base()metadata = Base.metadatasess = sessionmaker(bind=create_engine("DB_URL"))()class User(Base):__tablename__ = 'user'id = Column(INTEGER, primary_key=True, autoincrement=True)name = Column(String(100))```create users  for simple which need to be inserted into db```users = [User(name=i) for i in ('Thor', 'Stark', 'Rogers', 'Scarlet Witch', 'Strange')]```And we can insert users with following code:```pythonfrom sa_insert_helper import bulk_insertwith bulk_insert(session=sess, model=User, n=1000) as bi:for u in users:bi.insert(u)```
Package: sainsmart
sainsmartsainsmart contains code for working with sainsmart products.Installpip install sainsmartUsageTo use EthernetRelay in a project:from sainsmart import devices

relay = devices.EthernetRelay()

# Access the state of the relays
# relay.state() is a list of bools
relay_state = relay.state()

# Turn on the relay at index 0.
relay.turn_on(0)

# Turn off the relay at index 0.
relay.turn_off(0)

# Toggle the state of relay 0.
relay.toggle(0)

# Turn on all relays.
relay.all_on()

# Turn off all relays.
relay.all_off()The SainSmart Ethernet Relay defaults ip address: 192.168.1.4/30000.
This can be changed through their web interface.To use EthernetRelay with a different IP address:from sainsmart import devices

relay = devices.EthernetRelay('http://192.168.44.100/30000')ExampleHere is an example with a real device:>>> from sainsmart import devices
>>> relay = devices.EthernetRelay()
>>> relay.state()
[False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
>>> relay.turn_on(0)
>>> relay.state()
[True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
>>> relay.toggle(0)
>>> relay.state()
[False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]
>>> relay.all_on()
>>> relay.state()
[True, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True]
>>> relay.turn_off(0)
>>> relay.state()
[False, True, True, True, True, True, True, True, True, True, True, True, True, True, True, True]
>>> relay.all_off()
>>> relay.state()
[False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False]Free software: MIT licenseDocumentation:https://sainsmart.readthedocs.io.CreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.3.0 (2017-06-14)add python 3.4 support0.2.1 (2017-06-14)add install section to READMEfix coverage badge in README0.2.0 (2017-06-14)python2.7 supportrenamed sainsmart.py to devices.py0.1.1 (2017-06-12)Update usage and docs0.1.0 (2017-06-12)First release on PyPI.
Package: saintBioutils
saintBioutilsRepository containing utility and miscellaneous scripts and functions for use in bioinformatic pipelines, primarily written in Python3.The name is derived from the primary host organisation (University of St Andrews) when the repo was firsted established.Table of contentsInstallationDirectoriesCopyright and LicenseInstallationQuick and EasyThe easiest way to installsaintBioutilsand include the (sub)modules and functions is to install the package viapip, using the following command:pip3installsaintBioutilsThis ensures all dependencies are installedFrom SourceTo install from source, clone the repository:gitclonehttps://github.com/HobnobMancer/saintBioutils.gitThen install the package, which ensures all dependencies are also installed:python3<pathtothesetup.pyfile>Directoriesgenbank- Scripts for downloading and parsing genomic assemblies from NCBI GenBankuniprot- Scripts and functions related to calling to, retrieving from and parsing data from UniProt and its APIutilities- Script and functions for utility functions for script/program utility operationsCopyright and LicenseMIT LicenseCopyright (c) 2020-2021 University of St AndrewsCopyright (c) 2020-2021 University of StrathclydeCopyright (c) 2020-2021 UJames Hutton Institute
Package: saio
SQLAlchemyIO (saio)Module hack for autoloading table definitions.Also provides a helper functionas_pandasto read ansqlalchemy.orm.query.Queryinto a (Geo)Pandas dataframe.UsageAfterimportsaiosaio.register_schema("model_draft",engine)one can import table declarations easily usingfromsaio.model_draftimportlis_charging_poiasLisChargingPoiNote thatipythonand Jupyter Notebook, allow using<TAB>to auto-complete
table names.The helper functionas_pandasreads a query into a GeoDataFrame:saio.register_schema("boundaries",engine)fromsaio.boundariesimportbkg_vg250_2_lanasBkgLandf=saio.as_pandas(session.query(BkgLan))df.plot()InstallationThe package is registered on pypi, so install withpipinstallsaioor get it directly from githubpipinstallgit+https://github.com/coroa/saio.git#egg=saioImplementation detailssaio.register_schemainstantiates a declarative base usingfromsqlalchemy.ext.declarativeimportdeclarative_baseBase=declarative_base(bind=engine)# The Base can be imported using from saio.model_draft import Baseand then whenever one imports any table fromsaio.model_draft, ie. by callingfrom saio.model_draft import lis_charging_poi as LisChargingPoi, saio does
approximatelyclassLisChargingPoi(Base):__tablename__='lis_charging_poi'__table_args__={'schema':'model_draft','autoload':True}
Package: saipravega
Pravega Python client.This project provides a way to interact withPravegausing Python client.Pravega is an open source distributed storage service implementing Streams. It offers Stream as the main primitive for
the foundation of reliable storage systems: a high-performance, durable, elastic, and unlimited append-only byte stream
with strict ordering and consistency.This project supports interaction with Pravega for Python versions 3.8+. For a quick tutorial on the Python bindings
visit thebook.Also check out the Pravega Python clientAPI documents.InstallThe client library can be installed using pip.pipinstallpravegaThe users can also choose to generate the bindings using the commands specified atPythonBinding.ExampleWrite eventsimportpravega_client# assuming Pravega controller is listening at 127.0.0.1:9090stream_manager=pravega_client.StreamManager("tcp://127.0.0.1:9090")scope_result=stream_manager.create_scope("scope_foo")self.assertEqual(True,scope_result,"Scope creation status")stream_result=stream_manager.create_stream("scope_foo","stream_bar",1)# initially stream contains 1 segmentself.assertEqual(True,stream_result,"Stream creation status")writer=stream_manager.create_writer("scope_foo","stream_bar")writer.write_event("hello world")Read eventsimportpravega_client# assuming Pravega controller is listening at 127.0.0.1:9090stream_manager=pravega_client.StreamManager("tcp://127.0.0.1:9090")reader_group=stream_manager.create_reader_group("my_reader_group","scope_foo","stream_bar")reader=reader_group.create_reader("my_reader");# acquire a segment slice to readslice=awaitreader.get_segment_slice_async()foreventinslice:print(event.data())# after calling release segment, data in this segment slice will not be read again by# readers in the same reader group.reader.release_segment(slice)# remember to mark the finished reader as offline.reader.reader_offline()
Package: saipy
SAIPySeismology has witnessed significant advancements in recent years with the application of deep learning methods to address a broad range of problems. These techniques have demonstrated their remarkable ability to effectively extract statistical properties from extensive datasets, surpassing the capabilities of traditional approaches to an extent. In this repository we present SAIPy, an open-source Python package developed for fast seismic waveform data processing by implementing deep learning. SAIPy offers solutions for multiple seismological tasks such as earthquake detection, magnitude estimation, seismic phase picking, and polarity identification. This brings together the capabilities of previously published models such asCREIME,DynapickerandPolarCAPand introduces upgraded versions of previously published models such as CREIME_RT capable of identifying earthquakes with an accuracy above 99.8% and a root mean squared error of 0.38 unit in magnitude estimation. These upgraded models outperform state-of-the-art approaches like the Vision Transformer network. SAIPy provides an API that simplifies the integration of these advanced models with benchmark datasets like STEAD and INSTANCE. The package can be implemented on continuous waveforms and has the potential to be used for real-time earthquake monitoring to enable timely actions to mitigate the impact of seismic events.
Package: saitama
saitamais offering a way to write unittest and migrations in pure postgres.In a nutshellInstallationThe easiest way is to use pip to install saitama.$pipinstall--usersaitamaUsagesaitama, once installed, offers a single command,punch, that controls the migrations and the testing.punchfollows the GNU recommendations for command line interfaces, and offers:-hor--helpto print help, and-Vor--versionto print the versionLinksDocumentationChangelog
Package: sake
An easier way to createStackless Pythonbased applications.Stackless has a lot to offer, but it does so in a low-level and straightforward
manner.  Anyone who wishes to make use of it has to implement a lot of the same
supporting functionality, in order to get to the stage where they can implement
an application on top of it.  And then there is the domain knowledge that needs
to be factored into this supporting code, which may only be identified as
problems arise and are solved.Sake aims to be a high-level framework that developers can take, and
immediately use to get started building an application.  All the standard
supporting logic that gets written, has been written.  Written withinCCP Games, domain knowledge and corner cases learned over ten years of
Stackless usage has been taken into account.
Package: sakepedia
SakepediaSakepediaのAPIをプログラムから利用しやすくするためのPythonSDKSakepediaはみんなでつくる日本酒オープンデータです。
Nuxt.js版が以下で稼働しています。https://sakepedia.code4sake.org/このサイトのAPIにPythonからアクセスするパッケージです。機能酒蔵データの取得銘柄データの取得日本酒データの取得、更新、登録更新および登録には、Sakepediaへのユーザー登録とJWTの発行が必要です。
JWTの有効期限にご注意ください。使用方法日本酒データの登録、既にあれば更新JWT = "JWT issued with your own Sakepedia account"
api = sakepedia.SakepediaAPI(JWT)

sake = sakepedia.SakeData()
sake.brewery = "test brewery"
sake.brand =  "test brand"
sake.url = "https://testbrewery.co.jp/testbrand/sake"
sake.name = "test sake bottle"
sake.description = "test description"

res = api.saveSakeData(sake)パッケージのビルドとアップロード# pip install twine
# pip install wheel# rm -rf dist/*
# python setup.py sdist
# python setup.py bdist_wheel# twine upload --repository testpypi dist/*
# twine upload --repository pypi dist/*
Package: saki
SakiDesciptionSaki is an alternative of the cat and nano command line tools.InstallWindowsGo to cmd or powershell and runpip install windows-cursesthen runpip install sakiMac/Linuxpip install sakiorpip3 install sakiLinksGithub -https://github.com/Luke-Pitstick/sakiPyPi -https://pypi.org/project/saki/
Package: sakib-helpers
django filterRequirmentsUse the package managerpipto install all the requirements.
Just follow the commands below:Upgrade Setuptoos:python-mpipinstall--upgradetwinesetuptoolsInstall Wheel:pipinstallwheelMake a build for your Library/Package:pythonsetup.pysdistbdist_wheelInstall twine:pipinstalltwineUpload Your Library:twineuploaddist/*If the above command fail to upload:python-mtwineuploaddist/*If you want to upload through Git repo,
Add this code after import statementshere=os.path.abspath(os.path.dirname(__file__))withcodecs.open(os.path.join(here,"README.md"),encoding="utf-8")asfh:long_description="\n"+fh.read()After add this code you have to add an Readme.md file and the just follow the commands above.
Package: saklient
# SAKURA Internet API Client Library for PythonThis library gives you an easy interface to control your resources on[SAKURA Cloud](https://secure.sakura.ad.jp/cloud/).## Table of Contents* [Requirements](#requirements)* [How to use this library in your project](#how-to-use-this-library-in-your-project)* [Examples](#examples)* [Copyright and license](#copyright-and-license)## Requirements- Python 2.7 or 3.4## How to use this library in your project```bash# Install the packagepip install saklient# Edit your codecd YOUR/PROJECT/ROOTvim YOUR-CODE.py``````pythonfrom saklient.cloud.api import APIapi = API.authorize(token, secret, zone)# ZONE: "is1a" (Ishikari 1st zone), "is1b" (Ishikari 2nd zone), "tk1v" (Sandbox)# "tk1v" is recommended for tests# ...```## ExamplesCode examples are available [here](http://sakura-internet.github.io/saklient.doc/).## Copyright and licenseCopyright (C) 2014-2015 SAKURA Internet, Inc.This library is freely redistributable under [MIT license](http://www.opensource.org/licenses/mit-license.php).- Special thanks to ABEJA.INC for supporting Python 2
Package: sakshat
距离出上一个瑞士军刀扩展板 SAKS的教程已经过去很久了，在这期间我们在思考一个问题——既然 SAKS 的设计定位于上手快、DIY 可能性多，那么为何不做得彻底一点？之所以觉得之前的教程有某些“不够彻底”，是因为当遇到较复杂的需求时，创客们不得不用代码重复去实现一些数码管动态扫描、开关检测、传感器状态读取等硬件的操作逻辑。终于我们决定开发一套SDK，将以上需要重复造的轮子进行科学封装，从而达到让创客们集中精力专心实现功能，而不用为关注底层的操控逻辑而分心。终于我们完成了这个 SDK 并在此基础上实现了 SAKS 的 SDK ，基于 Python 语言用面向对象的方法实现（由于封装程度高，即便你没有系统学习过面向对象的开发方法也完全不用担心不会使用）。接下来我们会通过既定的一些例程（例如树莓派 SAKS 扩展板实用应用 之 CPU 温度显示和警报，介绍如何基于 SAKS SDK 实现例程中的功能。树莓派瑞士军刀扩展板 SAKS SDK 已经通过 Github 开源（GPL v2.0 许可方式）并提供下载：https://github.com/spoonysonny/SAKS-SDK树莓派瑞士军刀扩展板购买请移步此处：http://link.nxez.com/spoony/cps-products-saks随后我们将陆续完善开发文档并推出更多教程，敬请关注。同时我们非常期待有兴趣的创客、树莓派学习者深度参与进来，基于此 SDK 创造自己的作品、完善 SDK 本身！树莓派实验室 QQ 群号 62335986安装方式gitclonehttps://github.com/spoonysonny/SAKS-SDKcdSAKS-SDKsudopythonsetup.pyinstall或者使用 pip：sudopipinstallsakshat
Package: sakurajima
SakurajimaSakurajima is a Python API wrapper forAniWatch.DisclaimerUsing this tool comes with a high risk of getting banned on AniWatch.InstallationUse the package managerpipto install Sakurajima.pipinstallsakurajimaUsageGet you user details. If you have no idea how to do that feel free to readour guide.fromSakurajimaimportSakurajimaif__name__=="__main__":# Setup our instance of Sakurajima#                    Username      User ID   Auth tokenclient=Sakurajima("Sakurajima","106960","J2ltJtj9yg1bmly4vKVZWcJe7PKlOF05")my_anime=client.search("Somali to Mori no Kamisama")[0]# Search for "Somali to Mori no Kamisama" and get the first Anime object in the listall_episodes=my_anime.get_episodes()# Get all the episodes from our Anime objectepisode=all_episodes.get_episode_by_number(4)# Get the 4th episode from our all_episodes object, you can also use all_episodes[3]episode.download("fullhd","Somali - Ep. 4",True)# Download the episode in 1080p into "Somali - Ep. 4.mp4" using multiple threadsIf you have problems playing downloaded videos in the default windows player you can use ffmpeg to merge the chunks or include the intro chunk.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseMIT