Saravanan666/pypi-org huggingface dataset:
Package: simple-upload
simple-uploadA script to re-build and upload your package without having to remember the exact commandsGetting StartedPrerequisitesNo dependencies. Yay!Installingpip install simple-uploadRunningpip-uploadVersioningWe useSemVerfor versioning. For the versions available, see thetags on this repository.LicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details
Package: simpleurllib3
simpleurllib3Easy to use urllib3 simplifier.
Usage:>>> client = simpleurllib3.Client()
>>> resp = client.get('http://httpbin.org/ip')
>>> resp.status
200
>>> resp.data
"{'origin': '127.0.0.1'}"classClient()PoolManager client.classSSLClient()Secure SSL PoolManager client.Any Client || Requestclient.[method](url, args)Returnsurllib3.response.HTTPResponse,
refer to urllib3 docs for more info.
Package: simple-user
Simple reusable user storing only uuid and manage JWT Token auth_uuidentication in remoteDocumentationThe full documentation is athttps://simple_user.readthedocs.io.QuickstartInstall django-simple-user:pip install simple_userAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'auth_uuid.apps.AuthConfig',...)Add django-simple-user’s URL patterns:fromauth_uuidimporturlsasauth_uuid_urlsurlpatterns=[...url(r'^',include(auth_uuid_urls)),...]FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2018-10-04)First release on PyPI.
Package: simple-validator
A simple way to validate dictionary values by using functions.Installationpip3 installsimple-validatorUsageThere are 2 main classes to create custom validation classes(Field,Validator).fromvalidatorimportField,Validatordefis_valid_email(val:str):""" A horrible way to check if a string is a valid email. """passed=Falseerr_msg="{}isn't a valid email.".format(val)if'@'inval:passed=Truereturnpassed,err_msgclassUserValidator(Validator):""" Validates a user dictionary. """email=Field(data_type=str,validators=[is_valid_email])ValidationThe Validator provides the same api as Django forms for checking if all the fields
are valid.data={'email':'Sean@parsons.com'}user=UserValidator(data)ifuser.is_valid():# Do things in here...email=user.email# Optionally you can do user.data['email']else:print(user.errors)Required FieldsTo make aFieldrequired, all that needs to be done is addrequired=Trueas a kwarg
to the definitionIf the field isn’t present it will be added to`Validator.errorsunder the key for the declared Field
that is set to required.classUserValidator(Validator):""" Validates a user dictionary. """email=Field(data_type=str,validators=[is_valid_email],required=True)ErrorsTheValidator.errorsattribute is adefaultdict(list).When validators don’t pass, the declared field(Ex: ‘email’, ‘password’ etc..) errors
gets populated with the return error string from the validator or required errors if the data is missing.data={'email':'sean'}user=UserValidator(data)ifuser.is_valid():# Do things in here...else:print(user.errors['email'])# "sean isn't a valid email."Validating Field TypesTheFieldclass has adata_typeparameter which should be used to validate a field value
before passing it into validators.This prevents from havingtry, except, elseblocks inside of validator functions because your guaranteed
it won’t be passed into validators until it’s the correct type.If the field value is the wrong type, it will ony return an error like the one belowdata={'email':1}user=UserValidator(data)ifuser.is_valid():# Do things in here...else:print(user.errors['email'])# "'1' is expected to be a 'String'"
Package: simple-value-object
Based on Ruby Gem by NoFlopSquad (https://github.com/noflopsquad/value-object)Avalue objectis a small object that represents a simple entity whose equality isn’t based on identity:
i.e. two value objects are equal when they have the same value, not necessarily being the same object.Wikipedia.Installation>pipinstallsimple-value-objectUsageConstructor and field readersfromsimple_value_objectimportValueObjectclassPoint(ValueObject):def__init__(self,x,y):passpoint=Point(1,2)point.x# 1point.y# 2point.x=5# CannotBeChanged: You cannot change values from a Value Object, create a new oneclassDate(ValueObject):def__init__(self,day,month,year):passdate=Date(1,10,2015)date.day# 1date.month# 10date.year# 2015date.month=5# CannotBeChanged: You cannot change values from a Value Object, create a new oneEquality based on field valuesfromsimple_value_objectimportValueObjectclassPoint(ValueObject):def__init__(self,x,y):passa_point=Point(5,3)same_point=Point(5,3)a_point==same_point# Truea_different_point=Point(6,3)a_point==a_different_point# FalseHash code based on field valuesfromsimple_value_objectimportValueObjectclassPoint(ValueObject):def__init__(self,x,y):passa_point=Point(5,3)same_point=Point(5,3)a_point.hash==same_point.hash# Truea_different_point=Point.new(6,3)a_point.hash==a_different_point.hash# FalseInvariantsInvariantsmustreturn a boolean value.fromsimple_value_objectimportValueObject,invariantclassPoint(ValueObject):def__init__(self,x,y):pass@invariantdefinside_first_quadrant(self):returnself.x>0andself.y>0@invariantdefx_less_than_y(self):returnself.x<self.yPoint(-5,3)#InvariantViolation: inside_first_cuadrantPoint(6,3)#InvariantViolation: x_less_than_yPoint(1,3)#<__main__.Point at 0x7f2bd043c780>ValueObject within ValueObjectfromsimple_value_objectimportValueObject,invariantclassMoney(ValueObject):def__init__(self,amount,currency):passclassCurrency(ValueObject):def__init__(self,symbol):passMoney(amount=100,currency=Currency(symbol="€"))Test>$docker/test
Package: simple-vault-client
Vault ClientVault Client is designed to be a dead simple client library for Vault consumer
applications. The purpose is to implement a robust Vault client that makes it
easy for developers to instrument HashiCorp Vault into applications.All implementations of Vault Client will use a common API. After configuring
Vault authentication, the developer simply needs to replace the location of a
needed secret in their code with the appropriatereadmethod. The Vault
Client object will handle authentication renewal and secret / lease renewal.Quick Start ExampleJavaStringdbUser;StringdbPass;VaultClientvault=newVaultClient();vault.setAuthMethod("gcp");vault.setAuthRole("app_name");vault.setVaultAddr("https://myvault.company.org");dbUser=vault.read("database/creds/my-role","username");dbPass=vault.read("database/creds/my-role","password");Pythonvault=VaultClient(vault_addr="https://myvault.company.org",auth_method="gcp",auth_role="app_name",)db_user=vault.read("database/creds/my-role","username")db_pass=vault.read("database/creds/my-role","password")Feature MatrixJavaPythonC#/.NETLanguage Support⚠️⚠️❌Auth Renewal (Async)🚧🚧❌Generic Read✅✅❌KV Read✅✅❌Lease Renewal (Async)✅✅❌JWT Auth✅✅❌GCP Auth (GCE)✅✅❌Azure Auth🚧❌❌AppRole Auth❌❌❌TLS Auth❌❌❌✅ - Implemented❌ - Not implemented⚠️ - Partially implemented🚧 - Under construction
Package: simplevcf
simplevcfSimple VCF parser/writer with pure pythonDocumentationExamplesRead VCFwithsimplevcf.vcfopen('some.vcf.gz')asreader:forrecordinreader:# process a recordRead, manipulate and writewithsimplevcf.vcfopen('some.vcf.gz')asreader,withopen('output.vcf) as f:writer=simplevcf.Writer(f,reader.headers,reader.samples)forrecordinreader:# manipulate a recordwriter.write_record(one)Access to INFO and CALLwithsimplevcf.vcfopen(test_file)asreader:foroneinreader:print(one.INFO['AC'],one.CALL['ERP107576_NovaSeq_SAMEA104707359']['GT'][0])
Package: simple-venn
Simple two-way, three-way, and four-way Venn diagrams in matplotlib.The function calls are mostly interchangeable with those frommatplotlib_venn.
Thevenn2andvenn3functions lack thenormalize_toparameter, and all functions return anAxesSubplotobject instead of
aVennDiagram.simple-vennmakes label customization slightly easier by permitting
string subset labels and including parameters for set and subset label
font sizes. The default font sizes are appropriate for an 8 inch by 8
inch axes.Example code can be found in the demoiPython notebook.
Package: simple-version-manager
[![Build Status](https://travis-ci.org/simontorres/simple-version-manager.svg?branch=master)](https://travis-ci.org/simontorres/simple-version-manager)
[![Coverage Status](https://coveralls.io/repos/github/simontorres/simple-version-manager/badge.svg?branch=master)](https://coveralls.io/github/simontorres/simple-version-manager?branch=master)
# Simplify version managementThe idea behind the development of this small tool is to simplify the process
of increasing your version number. It is designed to work with a specific format
explained below.## Version format supportedThere are countless ways of handling your versions and there is no _right_ or
_wrong_ way. The format I choose is  the following:` major.minor.patch.devN `Some examples in no particular order` 0.0.1 1.1.1.dev1 30.1.1.dev5 `## Usage
Please note that this will depend on the size of your team and complexity of the
project. Either way if the team is large there will be a manager that should
control when the version is updated so in principle is the same for a large or
even a one-person team. Here are some examples:You should use this program with–devargument right after you pulled the
latest changes from upstreamYou can use–patch,–minoror–majorin combination with–releasewhen you want to create a new release.Also you have the freedom of updating any of the fields independently## Options
The argument options are better explained with examples. Let’s say we currently are
working on version1.2.3.dev4--devwill increase the development version by one leaving you with1.2.3.dev5--patchwill give you1.2.4.dev1notice that the development version
is dropped back to one--minorwill change the version to1.3.0.dev1notice now that not only
_dev_ is dropped to one but also the patch count drops to zero.--majorwill change version to2.0.0.dev1which is the same as–minorplus dropping _minor_ to zero.--releasewill remove thedevNpart leaving you with1.2.3.–releasecan be used in combination of other options.--setLet you set the version to any value.If you start from a _stable_ version like2.0.0you should use the–devargument that will increase the patch number and add the _dev1_ string.2.0.1.dev1# References[distutils.version.LooseVersion](http://epydoc.sourceforge.net/stdlib/distutils.version.LooseVersion-class.html)[Semantic Version](https://semver.org/) (Not used here but a good reference on version numbering)
Package: simple-wait
simple-waitSimple waitExamplefromdatetimeimportdatetimefromsimple_waitimportwaitprint("Start wait")wait(seconds=5)print("Finish wait")whileTrue:print()print("Current datetime:",datetime.now())print()wait(minutes=1,seconds=30)importtracebackfromsimple_waitimportwaitwhileTrue:try:# Process...wait(hours=8)except:print(traceback.format_exc())wait(minutes=15)InstallationYou can install with:pip install simple-waitInstall or upgrade:pip install --upgrade simple-waitInstall or update from github:pip install git+https://github.com/gil9red/simple-waitDescriptionParameterswaitfunction:NameTypeDefaultdaysint0secondsint0microsecondsint0millisecondsint0minutesint0hoursint0weeksint0progress_barIterable[str]("&#124;", "/", "-", "\\")delay_secondsfloat1log_pattern_progressstr"[{progress_bar}] Time left to wait: {left}"log_pattern_cancelstr"\nWaiting canceled\n"log_pattern_clear_linestr"\r" + " " * 100 + "\r"logTextIOWrappersys.stdoutis_need_stopCallable[[], bool]lambda: False
Package: simple-watchdog-timer
RequirementsPython – one of the following:CPython: >= 3.3PyPy: Latest versionInstallationPackage is uploaded onPyPI.You can install it with pip:$ python3 -m pip install simple_watchdog_timerBackwards compatibilityBackwards compatibility is only guaranteed between minor versions above the stable version (1.0)
Therefore it’s advised to to pin the module on a version ether the specific version like:
simple_watchdog_timer==X.X.Xor get the latest minor version:
simple_watchdog_timer~=X.X.XSee more examples of how to pin version inPEP-440.DocumentationFor support, please refer toStackOverflow.ExampleThe following example showcases the usageimportsimple_watchdog_timerasswtfromrandomimportuniformfromtimeimportsleepdefcb(dog):# When the callback gets triggered, it's good practice to pause the WDT to prevent it firing again, while you are handling the action required when it triggersdog.pause()# Do something when the WDT triggers...print('WDT Triggered')# Update / reset the internal WDT timer (dog.reset() does the same), this is important to avoid the time spent in the callback to influence the next triggeringdog.update()# Resume the WDTdog.resume()# ...or:# If you would like to completely stop the WDT# dog.stop()# But you regret and want to start it again# dog.start()# Tip: stop() and start() can also be used instead of the more manual pause, update and resume if that is preferred (more simple, but less in-line expressive)defmain():wdt=swt.WDT(check_interval_sec=0.01,trigger_delta_sec=0.50,callback=cb)whileTrue:zzz_sec=uniform(0,0.60)print('Sleep for{}'.format(zzz_sec))sleep(zzz_sec)wdt.update()if__name__=='__main__':main()This example will print:Rawdata:Sleepfor0.1492276414753453Sleepfor0.5913061085397784WDTTriggeredSleepfor0.17619615161373772Sleepfor0.5853218597734956WDTTriggeredSleepfor0.38154937243934783Sleepfor0.5000195244886919WDTTriggeredSleepfor0.08607711764377268Sleepfor0.31192761174090605Sleepfor0.02722456895623042LicenseTimedDict is released under the MIT License. See LICENSE for more information.
Package: simplewave
simplewaveはじめに本モジュールはWaveファイルを簡単な手続きで読み書きできるようにするためのモジュールです。インストール方法pip install simplewaveコマンド実行インストールするとfetchwaveコマンドを使えるようになります。fetchwaveコマンドは第一引数に Wave ファイルへのパスをとり、
指定された Wave ファイルのヘッダ情報を読み込んで表示します。ライブラリとしての使い方Wave ファイル読み込みimportsimplewavepcms,Fs,nch=simplewave.load('test.wav')Wave ファイル書き込みimportsimplewavesimplewave.save('output.wav',pcms,Fs)備考互換性本モジュールは開発版のため、バージョン更新により仕様が変わる可能性があります。以上
Package: simple_wbd
Simple World Band Data api interfaceThis is a simple python interface for World Bank Data APIs. The goal of this project is to provide a user with the most basic interface, focused on the ease of use. For a more feature complete API helpers take a look atwbpyandwbdata.InstallationFor basic usage:pipinstalgit+git://github.com/zidarsk8/simple_wbd.gitUsageimportsimple_wbdapi=simple_wbd.ClimateAPI()climate=api.get_instrumental("Italy")climates=api.get_instrumental(["Italy","Slovenia","US"])For developmentInstallvirtualenv--python=python3venv3venv3/bin/activategitclonegit://github.com/zidarsk8/simple_wbd.gitcdsimple_wbdpipinstall-e.[dev,test]Run testspythonsetup.pytest
Package: simpleweb
simpleweb is a result of working closely with web.py, TurboGears, Django,and a very hefty dose of opinionation(tm) :)Like TurboGears, it builds on existing python and wsgi components,
to keep things simple, and just connects these components in a very
easy transparent way.Like web.py its dispatching mechanism is matched strictly to HTTP methods.Like Django, its built for building deadline(s)-oriented(tm) applications.
As such, working with simpleweb will have a certain sense of deja-vu if you’ve
worked much Django, there are differences ofcourse, but the general feel is
the same.
Package: simple-webbrowser
simple_webbrowsersimple_webbrowseris a module that makeswebbrowsermodule way more simple to work with.This module has been recently reestructurated with a new__init__.pyfile so you don't have to importsimple_webbrowserfromsimple_webbrowser, which is pointless and deprecated after version 0.1.4.Apps that used that are still compatible though!LicenseThis module is licensed under the MIT License.InstallingUse the following command on the commandline:pipinstallsimple_webbrowserOr, for Windows (if Python is onPATH, butpipisn't):python-mpipinstallsimple_webbrowserUsageImport it like this:importsimple_webbrowserasswb# Afterwards, you can use it :)A program that searches on Google# Just an example of what you can do with this module# Not a great example thoughimportsimple_webbrowserasswbtry:x=input()swb.Google(query=x)except:swb.Google("empty :(")Projects where this module is used... (GitHub)Search query:simple_webbrowser language:PythonFilters:code
Package: simplewebdavclient
Written By: Benjamin P. TrachtenbergIf you have any questions e-mail meContact Information:e_ben_75-python@yahoo.comLinkedIn:Ben TrachtenbergDocker Hub:Docker HubAnsible Galaxy:Ansible GalaxyPyPi Page forsimplewebdavclientRequirementsNothing Specific besides Python 3InstallationFrom source “setup.py install”From pip “pip install simplewebdavclient”LanguagesPythonAboutThis is a simple WebDav client. It is a simple API to manipulate WebDav
storage.
Package: simple-websocket-server
A simple WebSocket serverBased onsimple-websocket-server.RFC 6455 (All latest browsers)TLS/SSL out of the boxPasses Autobahns Websocket TestsuiteSupport for Python 2 and 3Installationpip install simple-websocket-serverEcho Server Examplefromsimple_websocket_serverimportWebSocketServer,WebSocketclassSimpleEcho(WebSocket):defhandle(self):# echo message back to clientself.send_message(self.data)defconnected(self):print(self.address,'connected')defhandle_close(self):print(self.address,'closed')server=WebSocketServer('',8000,SimpleEcho)server.serve_forever()Opentests/websocket.htmland connect to the server.Chat Server Examplefromsimple_websocket_serverimportWebSocketServer,WebSocketclassSimpleChat(WebSocket):defhandle(self):forclientinclients:ifclient!=self:client.send_message(self.address[0]+u' - '+self.data)defconnected(self):print(self.address,'connected')forclientinclients:client.send_message(self.address[0]+u' - connected')clients.append(self)defhandle_close(self):clients.remove(self)print(self.address,'closed')forclientinclients:client.send_message(self.address[0]+u' - disconnected')clients=[]server=WebSocketServer('',8000,SimpleChat)server.serve_forever()Open multipletests/websocket.htmland connect to the server.Want to get up and running faster?There is an example which provides a simple echo and chat serverEcho Serverpython tests/example_server.py --example echoChat Server (open up multipletests/websocket.htmlfiles)python tests/example_server.py --example chatTLS/SSL ExampleGenerate a certificate with keyopenssl req -new -x509 -days 365 -nodes -out cert.pem -keyout key.pemRun the secure TLS/SSL server (in this case the cert.pem file is in the same directory)python tests/example_server.py --example chat --ssl 1Offer the certificate to the browser by servingtests/websocket.htmlthrough https.
The HTTPS server will look for cert.pem in the local directory.
Ensure thetests/websocket.htmlis also in the same directory to where the server is run.python tests/simple_https_server.pyOpen a web browser to:https://localhost:443/tests/websocket.htmlChangews://localhost:8000/towss://localhost:8000and click connect.Note: if you are having problems connecting, ensure that the certificate is added in your browser against the exceptionhttps://localhost:8000or whatever host:port pair you want to connect to.For the Programmersconnected: called when handshake is completeself.address: TCP address port tuple of the endpointhandle_close: called when the endpoint is closed or there is an errorself.address: TCP address port tuple of the endpointhandle: gets called when there is an incoming message from the client endpointself.address: TCP address port tuple of the endpointself.opcode: the WebSocket frame type (STREAM, TEXT, BINARY)self.data: bytearray (BINARY frame) or unicode string payload (TEXT frame)self.request: HTTP details from the WebSocket handshake (refer to BaseHTTPRequestHandler)send_message: send some text or binary data to the client endpointsending data as a unicode object will send a TEXT framesending data as a bytearray object will send a BINARY frameclose: send close frame to endpointLicensingMIT
Package: simple-wer
simple-werA simple command line tool to calculate WER for ASR.Installationpip install simple-werUsage$ simple-wer --help
Usage: simple-wer [OPTIONS] REFS HYPS

  The shell entry point to simple-wer, a simple tool to calculate WERs for
  ASR.

  The ``refs`` and ``hyps`` are the paths for references and hypothesis, their
  format should be ``utt_id \t refenence/hypothesis``.

Options:
  --test-name TEXT  The name for current test, it is used to distinguish the
                    file names for different tests.
  --logdir TEXT     The directory to write the WER results.
  --help            Show this message and exit.For example:Therefs.txtcontains:1       I LOVE YOU
2       I HATE YOUThehyps.txtcontains:1       i LOVE YOU
2       I hate YOURun the following command:simple-wer --test-name example refs.txt hyps.txtThe logs look like:2023-05-16 11:16:05,253 INFO [simple_wer.py:21] The transcripts are stored in logs/recogs-example.txt
2023-05-16 11:16:05,255 INFO [simple_wer.py:123] [example] %WER 33.33% [2 / 6, 0 ins, 0 del, 2 sub ]
2023-05-16 11:16:05,257 INFO [simple_wer.py:29] Wrote detailed error stats to logs/errs-example.txtThere will be two files (recogs-example.txtanderrs-example.txt) in logs,recogs-example.txtlooks like:1:      ref=['I', 'LOVE', 'YOU']
1:      hyp=['i', 'LOVE', 'YOU']

2:      ref=['I', 'HATE', 'YOU']
2:      hyp=['I', 'hate', 'YOU']errs-example.txtlooks like:%WER = 33.33
Errors: 0 insertions, 0 deletions, 2 substitutions, over 6 reference words (4 correct)
Search below for sections starting with PER-UTT DETAILS:, SUBSTITUTIONS:, DELETIONS:, INSERTIONS:, PER-WORD STATS:

PER-UTT DETAILS: corr or (ref->hyp)  
1:      (I->i) LOVE YOU
2:      I (HATE->hate) YOU

SUBSTITUTIONS: count ref -> hyp
1   I -> i
1   HATE -> hate

DELETIONS: count ref

INSERTIONS: count hyp

PER-WORD STATS: word  corr tot_errs count_in_ref count_in_hyp
i   0 1 0 1
hate   0 1 0 1
I   1 1 2 1
HATE   0 1 1 0
YOU   2 0 2 2
LOVE   1 0 1 1
Package: simple-wifi-qrcode
simple-wifi-qrcodeGenerates QR Code to join wifi networksInstallationpython -m pip install simple-wifi-qrcodeRequires Python 3.9 or laterUsagesimple-wifi-qrcode[-h]--outputOUTPUT--ssidSSID--passwordPASSWORD--alg{WEP,WPA,nopass}[--random-password][--verbose]options:-h,--helpshowthishelpmessageandexit--outputOUTPUTThePNGfilethatwillstoretheQRCode--ssidSSIDTheSSIDofthenetwork--passwordPASSWORDThepasswordofthenetwork--alg{WEP,WPA,nopass}Theauthenticationalgorithm--random-passwordGeneratearandompasswordforthenetwork--verbosePrintverboseinformationDocker# sample creating a PNG QR Code file using Dockerdockerrun--rm-vqrcodes:/app/src/qrcodesjplobianco/simple-wifi-qrcode--outputqrcodes/output.png--ssidnet1--passwordpass1--algWPA--verbose
Package: simplewiki
simple wiki WIPa simple warper for the wikipedia apihow to useinstallpip install simplewikiquick startstart by setting upimport simplewiki

wiki = simplewiki.wikipedia()then you can get some search resultswiki.search("cats",5)this will return a list of results and page ids:[('Bengal cat', '63064'), ('Cat', '6678'), ('Cats, Cats, Cats!', '68799268'), ('Cats (musical)', '215013'), ('Tabby cat', '6412655')]you can take one of the page ids a summarize itwiki.summary(6678)this will return a tuple with the title and summary('Cat', 'The cat (Felis catus) is a domestic species of small carnivorous mammal. It is the only domesticated species in the-')but what if we just want to get the page?wiki.html(6678)this will return the raw html as a string:...link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r1038841319"/><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r10...congrats you now have the wikipedia api at you fingertipscommandswiki.search(keyword:str,limit:int) > results:list[tuple]wiki.summarize(page_id:int) > summary:strwiki.html(page_id:int) > html:strwiki.get_url(page_id:int) > url:str