Saravanan666/pypi-org huggingface dataset:
Package: slotted
OverviewEnforces usage of__slots__for Python classes.MotivationBesides the performance benefits, using__slots__also prevents the client code from
setting attributes that were not initially defined for instances of classes, which
usually happens by mistake especially in environments where static type checking is not
being performed.So forcing it upon a class and its subclasses might be a desirable thing to do for
classes that are part of an API, for example.ExamplesWhen defining aSlottedclass with no__slots__declaration, it assumes it has
empty slots, which is equivalent to declaring__slots__ = ().>>>fromslottedimportSlotted>>>classFoo(Slotted):...pass# implicit declaration of __slots__ = ()...>>>foo=Foo()>>>foo.bar=1Traceback(mostrecentcalllast):AttributeError:'Foo'objecthasnoattribute'bar'Slotted classes can be mixed with regular classes as long as they and all of their bases
implement__slots__.>>>fromslottedimportSlotted>>>classBar(object):...__slots__=("bar",)>>>classFoo(Bar,Slotted):...__slots__=("foo",)...>>>foo=Foo()If any non-Slottedclass anywhere in the chain does not implement__slots__, aTypeErrorexception is raised.>>>fromslottedimportSlotted>>>classBar(object):...pass>>>classFoo(Bar,Slotted):...__slots__=("foo",)...Traceback(mostrecentcalllast):TypeError:base'Bar'isnotslottedSlottedbehavior can also be achieved by using theSlottedMetametaclass.>>>fromsiximportwith_metaclass>>>fromslottedimportSlottedMeta>>>classFoo(with_metaclass(SlottedMeta,object)):...pass# implicit declaration of __slots__ = ()...>>>foo=Foo()>>>foo.bar=1Traceback(mostrecentcalllast):AttributeError:'Foo'objecthasnoattribute'bar'abcslottedalso provides generic versions of thecollection.abcclasses.>>>fromtypingimportTypeVar>>>fromslottedimportSlottedMapping,SlottedSequence,SlottedSet>>>KT=TypeVar("KT")>>>VT=TypeVar("VT")>>>classMyMapping(SlottedMapping[KT,VT]):...pass# implicit declaration of __slots__ = ()...>>>classMySequence(SlottedSequence[VT]):...pass# implicit declaration of __slots__ = ()...>>>classMySet(SlottedSet[VT]):...pass# implicit declaration of __slots__ = ()...For Python 2.7,slottedadds aSlottedCollectionclass, even though the originalCollectionis not available.>>>fromtypingimportTypeVar>>>fromslottedimportSlottedCollection>>>T=TypeVar("T")>>>classMyCollection(SlottedCollection[T]):...pass# implicit declaration of __slots__ = ()...
Package: slouch
Slouch is a lightweight Python framework for building cli-inspired Slack bots.Here’s an example bot built with Slouch:fromslouchimportBot,helpclassPingBot(Bot):pass@PingBot.commanddefpingme(opts,bot,event):"""Usage: pingme [--message=<message>]

    Respond with an at-mention to the sender.

    Pass _message_ to include a message in the response.
    """sender_slack_id=event['user']message=opts['<message>']response=""ifmessageisnotNone:response=messagereturn"<@%s>%s"%(sender_slack_id,response)And here’s a test for that bot:fromslouchimporttestingclassTestPingBot(CommandTestCase):bot_class=PingBotdeftest_ping(self):response=self.send_message('pingme',user='123')self.assertEqual(response,'<@123> ')Install withpip install slouch.
Run tests withpy.test tests.For more details, check out the docs athttps://slouch.readthedocs.ioor see afull example bot.
Package: slovar
SlovarSlovar is named dicts on steroids (cheesy!) with extra functionalities (lots of them). Widely used inprf,jobsanddatasets.Some of more prominent features are:flattening/unflatteningrich extractingsubsettingtypecasting/type convertingdot notation accessupdate/mergeSetting up & testingmkvirtualenv slovar_test #or any other way of venv
pip install -r requirements.test
pytest
pytest benchmarks/Examples:In[1]:fromslovarimportslovarIn[2]:d=slovar({'a':1,'b':2,'c.c1':'11'})In[3]:dOut[3]:{'a':1,'b':2,'c.c1':'11'}In[4]:d.unflat()Out[4]:{'a':1,'b':2,'c':{'c1':'11'}}In[5]:d.unflat().extract('c.c1')Out[5]:{'c':{'c1':'11'}}In[9]:d.unflat().extract('c').c.asint('c1')Out[9]:11In[10]:dOut[10]:{'a':1,'b':2,'c.c1':'11'}In[11]:dd=d.unflat()In[12]:dd.c.c1Out[12]:'11'In[14]:dd.flat()==dOut[14]:True
Package: slovene-g2p
# slovene_g2p
A converter that converts Slovene words to their IPA and/or SAMPA transcriptions.## usage` from slovene_g2p.SloveneG2P import SloveneG2P g2p =SloveneG2P("ipa_symbol","cjvt_ipa_detailed_representation", "phoneme_string")g2p.convert_to_phonetic_transcription(word="govoriti",msd_sl="Ggdd-em",morphological_pattern_code="G1.2.d")`phoneme_option can be either “ipa_symbol” or “sampa_symbol” and representation option can be either “cjvt_ipa_detailed_representation”, “cjvt_ipa_robust_representation”, “cjvt_sampa_detailed_representation”, “cjvt_sampa_robust_representation”both msd_sl and morphological_pattern_code are available in sloleks 3.0 and provided by classla python package
Package: slovik
Pypi-uploaderUpload your Python libraries to PyPi with a beautiful interface.Читать на РусскомThis program is written using thePySimpleGUIlibrary.Just runPypi_uploader.pyand follow the instructions on the screen.The program will automatically install the necessary libraries, compile your project into an archive and upload it to Pypi or Test Pypi.After uploading, program can also clean up all generated files.Important! Selected project folder should contain the__init__.pyfile! This is the main file of your library.Folder hierarchy:.../Any_folder_name
     |__Pypi-uploader.py
     |__Your_Project_Folder/
         |__ __init__.py
         |__Other_files...If you are using api key:Username:__token__Password:The token value, including thepypi-prefixPossible mistakes:Login or password is incorrect (or API token if you uploaded through it).You signed up for PyPi, and you are trying to upload a project to Test Pypi (or vice versa).A library with this name already exists. So if this is your library - change the version.
Package: slovnik-seznam
Jednoduchý skript který z výstupu webuhttps://slovnik.seznam.czvrací
jednoduchý textový výstup. Zároveň je přiložen jednoduchý vim skript pro
použití z vimu.Je toho spousta, co by bylo možno přidat (pull requesty jsou vítány!)
… konfigurace pro jiné jazyky (v současné chvíli má skript zadrátováno
cs->en), moduly pro jiné editory (zejména Emacs a Sublime Text by
byly vítány!), etc.
Package: slovo
slovo (wip)Slovo (slo-vo, Ukrainian for "word"). Tiny lib for making words into... well into something.ExamplesCreating Langauge Class InstancefromslovoimportWord,Gender,Term# New usage Class can be created via instantiationclassCastellano(Word):lang="es"print(Castellano("verde"))>>(es)verde# Or Using class methodsEng=Word.constr("Eng","en")print(Eng("Hello"))>(en)HelloCombining Wordswords=Eng("Hello")+Eng("There")print(words,words.)>(en)HelloThereTODO....
Package: slow
SLOW - The SLOSL Overlay WorkbenchWhat is SLOW?SLOW is a visual, integrated, rapid development environment for Internet
overlay networks and Peer-to-Peer systems.  It is strongly focused on the
design of local topology decisions based on SLOSL and concepts from the
database area.  SLOW allows you to visually design and specify topologies and
protocols in a platform and language neutral way.  You can test them against
different scenarios from within the workbench before you bet your money on
their implementation.  At any time, you can save the specification in OverML
and generate a source code implementation from it.What are SLOSL and OverML?SLOW is based on the domain specific languagesOverMLandSLOSL.  The
Overlay Modelling Language OverML is an XML language for the specification of
overlay protocols, topologies and node data.  The SQL-Like Overlay
Specification Language SLOSL is the topology specification language of OverML.
It is based on SQL.  There is also someadditional informationon the web.Current status of SLOW:The workbench is currently in alpha state.  Somescreenshotsfrom the
running system are on the Berlios developer site.The complete workflow for design and testing is implemented, a number of
overlay topologies were implemented (see the file example.xod in the
source distribution).  There is a preliminary Python execution environment
for the specified overlays.  Source code generation is unfinished.  It
obviously requires a generator for the target language.  Current focus is
on the languages Java and Python.Requirements:The workbench is written in Python 2.4.  It requiresPyQt3,lxmlandMathDOM.  Note that PyQt cannot be automatically installed byeasy_install.
If it is not yet available on your platform, you must install it manually
before installing slow.SLOW 0.3.2 and later require lxml 0.9 and MathDOM 0.7. Note that lxml
requireslibxml2andlibxsltto be installed.Running SLOW:To run it, install the egg distribution witheasy_install. This should
generate a runnable script for your platform.  On Linux, this is commonly
/usr/bin/slow or ~/bin/slow or something similar.  On all supported systems,
the installation should generate the right type of script and tell you where
it was put.
Package: slowapi
SlowApiA rate limiting library for Starlette and FastAPI adapted fromflask-limiter.This package is used in various production setups, handling millions of requests per month, and seems to behave as expected.
There might be some API changes when changing the code to be fullyasync, but we will notify users via appropriatesemverversion changes.The documentation is onread the docs.Quick startInstallationslowapiis available frompypiso you can install it as usual:$ pip install slowapiFeaturesMost feature are coming from FlaskLimiter and the underlyinglimits.Supported now:Single and multiplelimitdecorator on endpoint functions to apply limitsredis, memcached and memory backends to track your limits (memory as a fallback)support for sync and async HTTP endpointsSupport for shared limits across a set of routesLimitations and known issuesTherequestargument must be explicitly passed to your endpoint, orslowapiwon't be able to hook into it. In other words, write:@limiter.limit("5/minute")asyncdefmyendpoint(request:Request)passand not:@limiter.limit("5/minute")asyncdefmyendpoint()passwebsocketendpoints are not supported yet.Developing and contributingPRs are more than welcome! Please include tests for your changes :)The package usespoetryto manage dependencies. To setup your dev env:$poetryinstallTo run the tests:$pytestCreditsCredits go toflask-limiterof which SlowApi is a (still partial) adaptation to Starlette and FastAPI.
It's also important to mention that the actual rate limiting work is done bylimits,slowapiis just a wrapper around it.
Package: slowblood
Slowblood Python ModuleThis python package will have a collection of structures, functions and tools for interacting with LLMs and Datasets.Project and PyPI Packagehttps://pypi.org/project/slowblood/https://github.com/kyledinh/slowbloodhttps://huggingface.co/SlowbloodUsage ExamplesGet RunPod Available GPUs with priceimportslowbloodslowblood.lib_runpod.runpod_info(RUNPOD_API_KEY)# or if you have the RUNPOD_API_KEY set in .env fileslowblood.runpod_get_available_gpus()output:GPUs: 
{'maxGpuCount': 8, 'id': 'NVIDIA A100 80GB PCIe', 'displayName': 'A100 80GB', 'manufacturer': 'Nvidia', 'memoryInGb': 80, 'cudaCores': 0, 'secureCloud': True, 'communityCloud': True, 'securePrice': 1.89, 'communityPrice': 1.59, 'oneMonthPrice': None, 'threeMonthPrice': None, 'oneWeekPrice': None, 'communitySpotPrice': 0.89, 'secureSpotPrice': None, 'lowestPrice': {'minimumBidPrice': 0.89, 'uninterruptablePrice': 1.59}} ...Copy Save HuggingFace ModelCopy a Hugging Face model to a new Hugging Face OrgRequired Dependenciespip install -qU git+https://github.com/huggingface/transformers.git
pip install -qU git+https://github.com/huggingface/peft.git
pip install -qU git+https://github.com/huggingface/accelerate.gitPackage Structs, Methods and ConstsDatasetsTextDatasetprepare_dataset_llama2()generate_from_dataset_llama2()ModelBITS_AND_BYTES_CONFIG_4BITload_peft_model_with_adapters()print_trainable_parameters()PDF Manipulationconvert_pdf_to_images()extract_text_from_pdf()extract_text_from_imgs()SettingsBasicInferenceRequestArtifactNamesFineTuningSettingsTokenizerget_tokenizer_for_model()update_model_with_tokenizer()
Package: slowclap
A clapper based around the PyAudio frontend for PortAudio.Status:workingInstallingYou need portaudio installed, then you can install the latest version pip:sudo pip install slowclapIt will pull in pyaudio and numpy depenencies.UsageCommand-lineWith default settings, run a shell command of your choosing each time a clap is detected:slowclap --exec='echo Clap'You might need to tune the threshold to your mic with the-toption.Python APISet up a simple detection loop:import slowclap as sc
feed = sc.MicrophoneFeed()
detector = sc.AmplitudeDetector(feed, threshold=17000000)
for clap in detector:
    # do something
    print(clap.time)Changelogv0.1.0Working amplitude clapperSupports command-execution and rate-limiting
Package: slow-django
Slow DjangoDjango, but slowerEver thought that your project was too fast?Installpip install slow_django# settings.pyimportslow_djangoSLOW_MIN=2# Minimum page load in secondsSLOW_MAX=10# Maximum-ish page load in secondsMIDDLEWARE=['django.middleware.security.SecurityMiddleware','django.contrib.sessions.middleware.SessionMiddleware','django.middleware.common.CommonMiddleware','django.middleware.csrf.CsrfViewMiddleware','django.contrib.auth.middleware.AuthenticationMiddleware','django.contrib.messages.middleware.MessageMiddleware','django.middleware.clickjacking.XFrameOptionsMiddleware','slow_django.middleware.slowdown']
Package: slowgrad
slowgradA small neural network library optimized for learning.Inspired by PyTorch, micrograd, and tinygrad.Build an MNIST Convnetfromslowgrad.layersimportLinear,Conv2dclassTinyConvNetLayer:def__init__(self):self.c1=Conv2d(1,8,kernel_size=(3,3))self.c2=Conv2d(8,16,kernel_size=(3,3))self.l1=Linear(16*5*5,10)defparameters(self):return[*self.l1.get_parameters(),*self.c1.get_parameters(),*self.c2.get_parameters()]defforward(self,x):x=x.reshape(shape=(-1,1,28,28))x=self.c1(x).relu().max_pool2d()x=self.c2(x).relu().max_pool2d()x=x.reshape(shape=[x.shape[0],-1])returnself.l1(x).logsoftmax()
Package: slowjam
Slowjam is an easy to use application tracer for python.Listen to this:>>>importrequests>>>fromslowjam.traceimportspan>>>fromslowjam.contextimportslowjam_context>>>slowjam_context.start('my_application',extras={'http':True})>>>withspan('listen',extras={'deylay':3}):>>>resp=requests.get('https://httpbin.org/delay/3')>>>withspan('request.origin'):>>>origin=resp.json().get('origin')>>>origin.split('.')>>>profile=slowjam_context.stop()>>>ifprofile:>>>print''>>>printunicode(profile)>>>print''timeexectimeevent----------------------------------------------------0ms+my_application[http=True]0ms|+listen[deylay=3]8039ms(+0ms)||=request.decode(+8039ms)|+(+8039ms)+Slowjam makes it easy to start getting feedback quick, but with some extra
effort it seamlessly integrates with other monitoring tools such as statsd,
graphite, and logstash.Feature SupportApplication TracingFunction timingUsable outputGraphite IntegrationCould HappenOpenTracing. PR’s welcomeInstallationTo install Slowjam, simply:$pipinstallslowjam✨🍰✨HistoryThis was originially open-sourced by App.net in their open source version ofAlpha.
Package: slow-learner
slow-learner — python type inference toolSee also:postA library and CLI to consume a stream of values (for CLI — JSON documents) and
generate Python types describing it. Features:recursion into mappings and collections with generic types generation"structured dicts" are turned intoTypedDicts by defaultvalues with a small set of observed values are turned intoLiteralsInstallationpipinstallslow-learnerUsageAs CLI:slow-learnerlearn1.json2.json3.json# to learn the type of list itemslow-learnerlearn--spreadlist.jsonIn Python:fromslow_learnerimportTypeLearnertl=TypeLearner(max_literal_type_size=5,learn_typed_dicts=True,max_typed_dict_size=50,max_recursive_type_depth=5,no_literal_patterns=[r"\.password",r".*secret"],)forvalueinmy_values:tl.observe(value)tl.save_type_definition("result.py","MyType")
Package: slow-learner-convert
slow-learner-convertA library to convertslow-learneroutput to different data model frameworks.UsageFollowing the example provided in theslow-learnerannouncing postand assumingRelease.pyis in the current directory, one would generatemsgspecstructs equivalent to thetyping.TypedDictobjects inRelease.pyby executing:slow-learner-convert--input-fileRelease.py--output-fileRelease_msgspec.py--frameworkmsgspecMore specifically, ifexample.pycontainsfromtypingimportTypedDictclassFoo(TypedDict):bar:strBaz=TypedDict("Baz",{"qux":int})then the command line programslow-learner-convert--input-fileexample.py--frameworkattrswill generateexample_attrs.py, containing the following code.importattrsfromtypingimportTypedDict@attrs.defineclassFoo:bar:str@attrs.defineclassBaz:qux:intCurrently four frameworks are supported:dataclassesattrsmsgspecpydanticInstallationpython3-mvenv.venv
..venv/bin/activate
python3-mpipinstall-Upip
python3-mpipinstallslow-learner-convertDevelopmentI usedrye(withuvbackend) while developing this:gitclonegit@github.com:gorkaerana/slow-learner-convert.gitcdslow-learner-convert
ryesync
Package: slownie
slowniePolish spelled-out numbers and amounts.Overviewslownie(value):slownie_zl(amount):slownie_zl100gr(amount):Provides routines to spell out numbers and amounts in Polish.PyPI record.Documentation.Usage>>>fromslownieimport*>>>slownie(12892)dwanaścietysięcyosiemsetdziewięćdziesiątdwa>>>slownie_zl(123.34)stodwadzieściatrzyzłotetrzydzieściczterygrosze>>>slownie_zl100gr(123.34)stodwadzieściatrzyzłote34/100InstallationPrerequisites:Python 3.8 or higherhttps://www.python.org/pip and setuptoolshttps://pypi.org/project/pip/https://pypi.org/project/setuptools/To install run:python -m pip install --upgrade slownieDevelopmentPrerequisites:Development is strictly based ontox. To install it run:python -m pip install --upgrade toxVisitDevelopment page.Installation from sources:clone the sources:git clonehttps://github.com/karpierz/slownie.gitslownieand run:python -m pip install ./slownieor on development mode:python -m pip install --editable ./slownieLicenseCopyright (c) 2016-2024 Adam KarpierzLicensed under the zlib/libpng Licensehttps://opensource.org/license/zlibPlease refer to the accompanying LICENSE file.AuthorsAdam Karpierz <adam@karpierz.net>Changelog1.2.3 (2024-01-26)Setup update (now based on tox >= 4.0).Cleanup.1.2.0 (2023-12-15)Added ‘conjunction’ parameter for the slownie_zl() function.Thanks to Tomasz Pichlinski (@tomaszpichlinskiapz).The supported parts of the amount have been extended up to‘duodecyliard’.Add support for Python 3.12Drop support for Python 3.7Add support for PyPy 3.9 and 3.10Copyright year update.Tox configuration has been moved to pyproject.toml1.1.3 (2022-09-02)Add support for Python 3.10 and 3.11Drop support for Python 3.6Copyright year update.Setup update (currently based mainly on pyproject.toml).1.1.2 (2020-10-17)Add support for Python 3.8 and 3.9Drop support for Python 3.5Drop support for Python 2Fix a bug in slownie_zl().Add unittests.General update and cleanup.Fixed docs setup.1.0.0rc1 (2018-11-21)Fix a bug in slownie_zl() and slownie_zl100gr()Code improvement according to the suggestion and the patchfrom Michal Borkowski (https://github.com/wielkiborsuk).Thank you very much, Michal!1.0.0b5 (2018-11-08)Drop support for Python 2.6 and 3.0-3.3Update required setuptools version.1.0.0b4 (2018-05-08)Update required setuptools version.Improve and simplify setup and packaging.1.0.0b3 (2018-02-26)Improve and simplify setup and packaging.1.0.0b2 (2018-01-28)Fix a bug and inconsistencies in tox.iniUpdate of README.rst.0.9.7b2 (2018-01-24)Little update of README.rst0.9.7b1 (2018-01-24)Update required Sphinx version.Update doc Sphinx configuration files.0.9.5b1 (2017-11-18)Add slownie_zl and slownie_zl100gr.Setup improvements.Other minor improvements.0.9.0b0 (2017-04-03)First useful release.0.1.0 (2016-09-23)Initial release.
Package: slowPaste
slowPasteSimulate human-like typing using Python with the added feature of adjustable speed.Features:Simulates slow typing to mimic human input.Adjustable typing speed in Words Per Minute (WPM).Cancel typing mid-way with theesckey.PyAutoGUI fail-safe: Move your cursor to the top-left corner to halt the script immediately.Types out content from your clipboard.Installation:You can install slowPaste directly from GitHub using pip:pipinstallslowPasteUsage:Install the Package: Install the slowPaste package using pip.Copy Text: Copy the text you want to be typed out to the clipboard.Run the Script with Desired Speed: Run the script using a Python interpreter and specify the desired typing speed in WPM.fromslowPasteimportslow_pasteslow_paste.main(100)# Replace 100 with your desired speed in WPMFocus on Input Field: After running the script, focus on the input field (e.g., text editor, browser) where you want the text to be typed.Start Typing: The script will begin typing out the content from the clipboard after a delay of 2 seconds.Adjusting Speed & Text Input:The main function accepts a speed parameter representing the typing speed in Words Per Minute (WPM). The default value is 100 WPM. It also accepts an optional text parameter for manual input, with the default being the content currently copied to the clipboard.You can adjust it by passing the desired speed value and text string when calling the main function.slow_paste.main(150,text="Hello, world!")# Types the provided text at 150 WPM. If text is not provided, it types the clipboard content.Script Breakdown:slow_paste(): The main function that slowly types out the text. It accepts a speed parameter to adjust the typing speed.main(): Reads the clipboard content and initiates the typing, it also accepts a speed parameter.Safety:Move the cursor to the top-left corner of the screen to trigger PyAutoGUI's fail-safe and halt the script.Contributing:Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.License:MIT
Package: slowroll
slowrollLet's say you want to roll out a feature flag, or something that selects a
canary version.  Put a json config up somewhere, decide how you're hashing your
users, and useSlowrollConfig:fromslowrollimportSlowrollConfigsc=SlowrollConfig("https://example.com/config.json","app_features")ifsc.get_value("features","install_to_opt_foo",socket.gethostname()):...The config for this would look like{"features":{"install_to_opt_foo":{"end_time":"2025-01-01 00:00Z","duration":"14d","stable":false,"new":true,"early_adopters":["canary-host"],}}}Note that the values for "stable" and "new" can be any valid json.  Here they
are bools, but could just as easily be strings that represent versions of a
Python project.start_timeis not explicitly specified, but calculated from
the duration.There are few restrictions on the http server, namely that itmustprovide
etags using the default implementation, but you can provide your own that takes
an opaque url and an opaque value that you can use to store any etag-esque
metadata.As in semver, expect no compatibility guarantees until this reaches 1.0.  Both
the API and config format are expected to change.ExtensibilityWhat if I want to store the config in zookeeper?  Sure, provide a custom
callback that returns the latest version you know of.Future WorkAbility to locally lock a value (either old or new)Example using a requests sessionRetries/fallbackMore testing on_pctvaluesConfig validatorInterpolation of numeric valuesRegexearly_adoptersRollbacks that count downLicenseslowroll is copyrightTim Hatch, and licensed under
the MIT license.  I am providing code in this repository to you under an open
source license.  This is my personal repository; the license you receive to
my code is from me and not from my employer. See theLICENSEfile for details.