Saravanan666/pypi-org huggingface dataset:
Package: safety-indorm
Safety_in_Dorm_SystemSafety in Dorm System is the project for increase security in the dormitory using OpenCV and Webcam.This Project use the Python language and OpenCV library to make the Face Recognition using LBPHFace recognizer.I use Python 2.7.16 , CV2 4.2.0 , numpy 1.16.6So, If you want to use it in real life you should install and run it on Raspberry Pi or other Single board computer whatever you want.When you Clone or download this code these necessary step you must do.Install the Python language.Install CV2 and numpy.Delete my Dataset in "datasets" Directory.Run "create_dataset.py" After that, you will see the New directory named "New Person".Rename "New Person" to your name.Run "face_rec_offine.py" to check, if everything no wrong it will make a popup in new window named "Safety in Dorm System".If you want to send the message to Line via Line Notify FOLLOW these step.Open "face_rec_line.py" with IDLE.Go to line 14, Change the TOKEN to your, you can generate the TOKEN in this websitehttps://notify-bot.line.me/Save and Run "face_rec_line.py".HAVE FUN, I hope everyone happy with my project, SEE YA!!!
Package: safetypes
safetypes packagePython is a non typed language, and runs under the paradigm offirst try and then it success or fails.
This package allows you to have the capability of applytypingfeatures in last versions of Python,
allowing to the developer to have a transparent mechanism to grant that typing annotations are
satisfied in the execution time of their programs.To use this package you only need to add an annotation before a function or method definition:@safe_typesdefmy_func(test:str)->int:...With this simple line when you run your program the annotation checks:Thetestargument satisfies the condition to be astr.Thereturn valuesatisfies the condition to be anint.Also, you can use theTyping packageto have multiple types for the same argument or to extend
the detail of typing your code::fromtypingimportUnion@safe_typesdefmy_func(test:Union[int,float])->Union[int,float]:...With this definition, the annotation checks iftestargument andreturn valueare one of two possible types:intandfloat. Note that not necessarily needs to be the
same type in both cases, due to the annotation could not correlate a direct causality
between arguments and return types.If you have optional arguments, like this one:@safe_typesdefmy_func(test:str='empty')->None:...my_func()Then thetestargument is ignored if it is not used when you call the function.If you want to accept unknown arguments using *argsor **kwargsthen you can use the non-strict
validation as follows:@safe_types(strict=False)defmy_func(test:str,*args,**kwargs)->None:...my_func('yeah!','more... yeah!!',yeah='Not enough!!!')In this case, the argumenttestwill be checked but other parameters passed as additional and unknown
arguments will be ignored and not checked.
Package: safety-road-mapping
General InstructionsGenerating API tokenThis project usesopenrouteservice APIto plot maps and routes.
So the following steps are necessary at first:Sign up onopenrouteservice.orgto generate an API token;Create a.envfile with the following content:TOKEN=XXXXXXXXXXXXXXX, whereXXXXXXXXXXXXXXXis the token generated in the step before;Install the lib:pip install safety-road-mappingGet the road accidents according the instructions bellow:Getting accident road dataSee the documentation on:safety documentationSee the examples on how to use the lib on:how-to-use.ipynbGetting accident road dataThe accidents data used were extracted from thePolícia Rodoviária Federal website.The notebookget_data.ipynbis responsible to download and extract the data used.If you want to directly download the files you canclick here.To consolidate all the accidents by year on an unique.csvfile use the notebookconsolidate_data.ipynb.For a simple explore data analysis from the data look ateda_accidents.ipynbAdding São Paulo dataAccess theinfosiga websiteDownload the xlsx file with fatal accidents:Fatal accidentsDownload the csv file with non fatal accidents:Non-fatal accidentsUse the notebooktreat_data_from_SP.ipynbto transform and concatenate the data generating a final file that will be used as input for the safety map code.Other possible steps on the projectThe accidents data used comes just from road federal police source, so there are some routes that don't receive score because they are state highways.Create some unit tests.UseRenaestdata (currently onlySP has geolocation data).Include other variables in the score calculation.Include driver behaviors data.Implement an algorithm to predict accidents.The routes subsections are not connected, once they are plotted individually in the map. Visually it can be interesting to connect them. (Is it possible or necessary?).
Package: safeurl
Simple and clever analyzer, decoder, encoder … urls on python, using requestsInstallation$pipinstallsafeurlUsageEasy way to get real url:fromsafeurl.coreimportgetRealURLgetRealURL('http://bit.ly/1gaiW96')# https://www.yandex.ru/fromsafeurl.coreimportgetRealURLgetRealURL(['http://bit.ly/1gaiW96','http://bit.ly/1gaiW96'])# ['https://www.yandex.ru/', 'https://www.yandex.ru/']Аlso you can find broken urls:fromsafeurl.coreimportgetRealURLgetRealURL('http://bit.ly.wrong/wrong')# 'Failed'fromsafeurl.coreimportgetRealURLgetRealURL(['http://bit.ly.wrong/wrong','http://bit.ly/1gaiW96'])# ['Failed', 'https://www.yandex.ru/']
Package: safewise
python-safewisePython library and commandline client for communicating with SafeWISE
Hardware WalletSeehttps://safewise.iofor more informationInstallPython-safewise requires Python 3.3 or higher, and libusb 1.0. The easiest
way to install it is withpip. The rest of this guide assumes you have
a workingpip; if not, you can refer tothis
guide.In addition to the above, you need to install development headers for
HIDAPI.Debian / UbuntuOn a Debian or Ubuntu based system, you can install these:sudoapt-getinstallpython3-devpython3-pipcython3libusb-1.0-0-devlibudev-devWindowsOn a Windows based system, you can install these (for more info on choco, refer tothis):chocoinstallvcbuildtoolspython3protoc
refreshenv
pip3installprotobufWhen installing the safewise library, you need to specify that you wanthidapi:pip3install--upgradesetuptools
pip3installsafewise[hidapi]Ethereum supportEthereum requires additional python packages. Instead ofpip3 install safewise, specifypip3 install safewise[ethereum].You can combine it with the above, to get both HIDAPI and Ethereum
support:pip3installsafewise[ethereum,hidapi]FreeBSDOn FreeBSD you can install the packages:pkginstallsecurity/py-safewiseor build via ports:cd/usr/ports/security/py-safewise
makeinstallcleanCommand line client (safewisectl)The includedsafewisectlpython script can perform various tasks such as
changing setting in the SafeWISE, signing transactions, retrieving account
info and addresses. See thedocs/sub folder for detailed
examples and options.Python LibraryYou can use this python library to interact with a SafeWISE and
use its capabilities in your application. See examples here in thetools/sub folder.PIN EnteringWhen you are asked for PIN, you have to enter scrambled PIN. Follow the
numbers shown on SafeWISE display and enter the their positions using the
numeric keyboard mapping:789456123Example: your PIN is1234and SafeWISE is displaying the following:283546791You have to enter:3795
Package: safeword
Safeword : a generator of words, characters, and slugsPredictable and fun slug generation//WIPReturns mutable objects as requestedTODO:Words,nouns,adjectives,verbs, animals, namescamelCase, medial capitals, camel capssnake_case, machine safeHashes, input based md5+,UUID/ CUIDappend and prepend (useful for hash + file extension)return inteven/odd numbersmachine safereturn backwards/forwardsintegrate with princetonparser when it makes sense to generate/update lists on the flyimportable word lists?[FEATURE] Emoji returns[FEATURE] return url combosoptimize list creation and availability. currently created during class initshould be tested to see if JSON or CSV is faster to generate lists[IMPORTANT] refactor request and response flow
Package: safex
safexSafe and simple python expression evaluator.Installationpip install safexUsagefrom safex import eval_expression

# Binary operators
assert eval_expression("1 + 2 * 12 / 3") == 9
assert eval_expression("a + b", {"a": 1, "b": 2}) == 3

# Unary operators
assert eval_expression("not True") == False
assert eval_expression("not False") == True

# Comparisons
assert eval_expression("1 < 2 < 3") == True

# Name lookups
assert eval_expression("a", {"a": 1}) == 1
assert eval_expression("inc(x)", {"inc": lambda x: x + 1, "x": 1}) == 2


# Lists and dicts
assert eval_expression("[0, 1, 2, 3, 4, 5][0]") == 0
assert eval_expression("{'a': 1, 'b': 2}['a']") == 1

# Lambdas, map, filter
assert (
    eval_expression(
        "list(filter(lambda x: x % 2 == 1, map(lambda x: x * 3, a)))",
        {"a": [0, 1, 2, 3, 4, 5]},
    )
    == [3, 9, 15]
)
assert eval_expression("list(filter(lambda x: x % 2 == 1, range(6)))") == [1, 3, 5]
assert eval_expression("list(filter(lambda x: x % 2 == 1, range(6)))") == [1, 3, 5]
assert eval_expression("list(sorted(range(5), reverse=True))") == [4, 3, 2, 1, 0]
assert eval_expression("(lambda *args: sum(args))(1, 2, 3)") == 6

# Attributes
assert eval_expression("person.name", {"person": person}) == "test"
assert eval_expression("person.address.city", {"person": person}) == "city"

event = {
    'type': 'user_added',
    'payload': {
        'name': 'test',
        'age': 17,
        'emails': [
            {'type': 'primary', 'email': 'test@test.com'},
            {'type': 'secondary', 'email': 'test2@test.com'}
        ]
    }
}
assert eval_expression(
    "event['type'] == 'user_added' and event['payload']['age'] < 18", {"event": event}) == True
assert eval_expression(
    "event['payload']['emails'][0]['email']", {"event": event}) == 'test@test.com'
Package: saffire
SaffireFeaturesTODORequirementsTODOInstallationYou can installSaffireviapipfromPyPI:$pipinstallsaffireUsagePlease see theCommand-line Referencefor details.ContributingContributions are very welcome.
To learn more, see theContributor Guide.LicenseDistributed under the terms of theMIT license,Saffireis free and open source software.IssuesIf you encounter any problems,
pleasefile an issuealong with a detailed description.CreditsThis project was generated from@cjolowicz'sHypermodern Python Cookiecuttertemplate.
Package: safir
SafirSafir is Rubin Observatory's library for buildingFastAPIservices for theRubin Science Platform (Phalanx)andRoundtableKubernetes clusters.
Safir is developed, maintained, and field tested by the SQuaRE team.Safir is available fromPyPI:pipinstallsafirThe best way to create a new FastAPI/Safir service is with thefastapi_safir_apptemplate.Read more about Safir athttps://safir.lsst.io.FeaturesSet up anhttpx.AsyncClientas part of the application start-up and shutdown lifecycle.Set up structlog-based logging.Middleware for attaching request context to the logger to include a request UUID, method, and route in all log messages.ProcessX-Forwarded-*headers to determine the source IP and related information of the request.Gather and structure standard metadata about your application.Operate a distributed Redis job queue witharqusing convenient clients, testing mocks, and a FastAPI dependency.Developing SafirThe best way to start contributing to Safir is by cloning this repository creating a virtual environment, and running the init command:gitclonehttps://github.com/lsst-sqre/safir.gitcdsafir
makeinitFor details, seehttps://safir.lsst.io/dev/development.html.
Package: safitty
Safittyis a wrapper onJSON/YAMLconfigs for Python.
Designed with a focus on safe data reading and writing for deep-nested dictionaries and lists.Installationpipinstall-UsafittyFeaturesSafegetfor dictionaries and listsSafesetfor dictionaries and listsMultiple keys at oneget/setcall.Several strategies, includes: Get the most deep non-null value by your keys, Get the last non-null container and moreValue transformations to classesQuickstartimportsafitty# Loads config YAML or JSONconfig=safitty.load("/path/to/config.yml")# Getting value from the configsafitty.get(config,"very","deep","call",default="This is the default value")# Setting value intosafitty.set(config,"clients",0,"address",value="localhost:8888")More examples in thegetting-started notebook.
Package: safpis
safpis is a Python library to access the South Australia Fuel Pricing
Information Scheme (SAFPIS) REST API.To use this library you will first need to register to become an SAFPIS Data
Publisher and receive a Subscriber Token. Visithttps://www.safuelpricinginformation.com.au/for more information and details about registering to become a Data Publisher.The SAFPIS is a mechanism through which Fuel Retailers are required, by law, to
report their fuel prices and Data Publishers can access the data via a REST
API.Free software: MIT licenseDocumentation:https://safpis.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.
Package: safrs
Please check theGitHub Readmefor documentation.OverviewSAFRS is an acronym forSqlAlchemyFlask-RestfulSwagger. The purpose of this framework is to help python developers create a self-documenting JSON API for sqlalchemy database objects and relationships. These objects can be serialized to JSON and can be created, retrieved, updated and deleted through the JSON API.
Optionally, custom resource object methods can be exposed and invoked using JSON.
Class and method descriptions and examples can be provided in yaml syntax in the code comments. The description is parsed and shown in the swagger web interface.The result is an easy-to-useswagger/OpenAPIandJSON:APIcompliant API specification.InstallationSAFRS can be installed as apip packageor by downloading the latest version from github, for example:gitclonehttps://github.com/thomaxxl/safrscdsafrspip3install-rrequirements.txt--userpython3setup.pyinstall--userThe examples can then be started withpython3 examples/demo_relationship.py "your-interface-ip"
Package: saft
SAFT: Self-Attention Factor-TuningA highly efficient fine-tuning technique for large-scale neural networks.Table of ContentsQuickstartVTAB-1k TestPretrained ModelResultsQuickstartEasily install SAFT using pip and get started with a simple example.InstallationpipinstallsaftExample Usagefromsaft.saftimportsaftif__name__=="__main__":saft_instance=saft(model='vit_base_patch16_224',num_classes=get_classes_num('oxford_flowers102'),validation_interval=1,rank=3,scale=10)# Replace with your PyTorch DataLoader objects# train_dl, test_dl = [your data in a pytorch dataloader]# saft_instance.upload_data(train_dl, test_dl)saft_instance.train(10)trained_model=saft_instance.modelVTAB-1k TestTo run tests on the VTAB-1K dataset, follow these steps:Visit theSSF Data Preparationpage to download the VTAB-1K dataset.Place the downloaded dataset folders in<YOUR PATH>/SAFT/data/.Pretrained ModelFor a quick start, download the pretrained ViT-B/16 model:Download ViT-B/16Place the downloaded model in<YOUR PATH>/SAFT/ViT-B_16.npz.ResultsAchieve remarkable performance with only 0.055 million trainable backbone parameters using ViT-B/16.
Package: sagace-sdk
SAGACE - Ampere Consultoria EmpresarialContem métodos e procedimento para acessar os produtos e serviços oferecidos pela Ampere Consultoria.Acesso sem o pacoteA documentação para acesso direto á API pode ser encontrada em:API SAGACE PostmanInstalação do pacoteO código fonte está disponível para download em:Gitlab SAGACE Ampere Consultoria.
O pacote pode ser instalado usando o gerenciadorpipdo Pythonpip install sagace-sdkDescriçãoEste pacote fornece acesso de forma simplicada à API de produtos da Ampere Consultoria.IndicePara uma melhor vizualização da documentação, acesse o repositório git emGitlab SAGACE Ampere Consultoria.Installation and Configuration
Package: sagaconfig
This module replicates some features from the node.jsconfig
module.Currently supports *.py config files in a config folder in the current
working directory. Other features will be added as they become
necessary.testingdocker-composeupwill automatically test the project and watch for
changes.To generate html coverage reports run:docker-composerun py tox-ehtmlTo run only the syntax linter run:docker-composerun py tox-elintFor more advanced testing see the tox.ini file.
Package: sagah
sagahOrchestrated, async sagas in PythonTable of Contents:InstallationGuideDevelopmentInstallationsagah requires Python 3.6 or above.pipinstallsagahGuideExample usage:fromsagahimportSagastate={"counter":0}defincr():state["counter"]+=1defdecr():state["counter"]-=1withSaga()assaga:awaitsaga.action(incr,decr)awaitsaga.action(incr,decr)assertstate["counter"]==2If some action fails, the compensating functions from previous transactions will be called to restore the state:fromsagahimportSagastate={"counter":0}defincr():state["counter"]+=1defdecr():state["counter"]-=1deffail():raiseValueError("oops")try:withSaga()assaga:awaitsaga.action(incr,decr)awaitsaga.action(incr,decr)awaitsaga.action(fail,noop)exceptException:assertstate["counter"]==0DevelopmentTo develop sagah, install dependencies and enable the pre-commit hook:pipinstallpre-commitpoetry
poetryinstall
pre-commitinstallTo run tests:poetryrunpytest
Package: sagan
SAGANThis is the system board software to be used with a Sagan board for the DreamCoder project -https://dreamcoder.dreamup.orgDeploying to PyPi.orgGeneral instructions are here -https://packaging.python.org/en/latest/tutorials/packaging-projects/Update the version number insetup.py.Runpython3 -m build. This will create 2 files in thedistfolder.Since all the previous package outputs are still in thedistfolder, runningtwine upload dist/*would upload all the previous versions as well. If the current version is 1.2.3, runtwine upload dist/sagan-1.2.3*. (You will need the PyPi.org credentials.)
Package: saganvm
SAGANThis is the simulation parallel of the system board software used with a Sagan board for the DreamCoder project -https://dreamcoder.dreamup.org. This version is used in the virtual execution environment.Deploying to PyPi.orgGeneral instructions are here -https://packaging.python.org/en/latest/tutorials/packaging-projects/Update the version number insetup.py.Runpython3 -m build. This will create 2 files in thedistfolder.Since all the previous package outputs are still in thedistfolder, runningtwine upload dist/*would upload all the previous versions as well. If the current version is 1.2.3, runtwine upload dist/sagan-1.2.3*. (You will need the PyPi.org credentials.)
Package: saga_py
Create a series of dependent actions and roll everything back when one of them fails.Install$pipinstallsaga_pyUsageSimple examplefromsagaimportSagaBuildercounter1=0counter2=0defincr_counter1(amount):globalcounter1counter1+=amountdefincr_counter2(amount):globalcounter2counter2+=amountdefdecr_counter1(amount):globalcounter1counter1-=amountdefdecr_counter2(amount):globalcounter2counter2-=amountSagaBuilder\.create()\.action(lambda:incr_counter1(15),lambda:decr_counter1(15))\.action(lambda:incr_counter2(1),lambda:decr_counter2(1))\.action()\.build()\.execute()# if every action succeeds, the effects of all actions are appliedprint(counter1)# 15print(counter2)# 1An action fails exampleIf one action fails, the compensations for all already executed actions are run and a SagaError is raised that wraps
all Exceptions encountered during the run.fromsagaimportSagaBuilder,SagaErrorcounter1=0counter2=0defincr_counter1(amount):globalcounter1counter1+=amountdefincr_counter2(amount):globalcounter2counter2+=amountraiseBaseException('some error happened')defdecr_counter1(amount):globalcounter1counter1-=amountdefdecr_counter2(amount):globalcounter2counter2-=amounttry:SagaBuilder\.create()\.action(lambda:incr_counter1(15),lambda:decr_counter1(15))\.action(lambda:incr_counter2(1),lambda:decr_counter2(1))\.action()\.build()\.execute()exceptSagaErrorase:print(e)# wraps the BaseException('some error happened')print(counter1)# 0print(counter2)# 0An action and a compensation fail exampleSince the compensation for action2 fails, the compensation effect is undefined from the framework’s perspective,
all other compensations are run regardless.fromsagaimportSagaBuilder,SagaErrorcounter1=0counter2=0defincr_counter1(amount):globalcounter1counter1+=amountdefincr_counter2(amount):globalcounter2counter2+=amountraiseBaseException('some error happened')defdecr_counter1(amount):globalcounter1counter1-=amountdefdecr_counter2(amount):globalcounter2raiseBaseException('compensation also fails')try:SagaBuilder\.create()\.action(lambda:incr_counter1(15),lambda:decr_counter1(15))\.action(lambda:incr_counter2(1),lambda:decr_counter2(1))\.action()\.build()\.execute()exceptSagaErrorase:print(e)#print(counter1)# 0print(counter2)# 1Passing values from one action to the nextAn action can return a dict of return values.
The dict is then passed as keyword arguments to the next action and it’s corresponding compensation.
No values can be passed between compensations.fromsagaimportSagaBuilder,SagaErrorcounter1=0counter2=0defincr_counter1(amount):globalcounter1counter1+=amountreturn{'counter1_value':counter1}defincr_counter2(counter1_value):globalcounter2counter2+=amountdefdecr_counter1(amount):globalcounter1counter1-=amountdefdecr_counter2(counter1_value):globalcounter2counter2-=amountSagaBuilder\.create()\.action(lambda:incr_counter1(15),lambda:decr_counter1(15))\.action(incr_counter2,decr_counter2)\.action()\.build()\.execute()print(counter1)# 15print(counter2)# 15
Package: saga-vcs
sagaSaga is a version control CLI like inspired by Git. Unlike Git, it is designed to work for file formats other than text. TL;DR: imagine if you could merge your Excel files too.If you want to use Saga to manage your creative projects (code, design, excel, etc), you can install the tool with:pip3 install saga-vcsIf you want to add version control to a file format saga does not currently support, you can see examples of doing sohereandhere. Documentation coming soon!Installation InstructionsTo install thesagacommand line tool, run:pip3 install saga-vcsCurrently, Saga only works on macOS and maybe Linux. Windows support coming eventually!Using sagaCurrently, thesagacommand line tool has a very similar interface to Git. The following commands are currently supported:saga init
saga add 
saga commit
saga log
saga status
saga branch
saga checkout
saga merge
saga push
saga pullSome commands don't perform exactly as Git does, so watch out!WarningSaga is pre-alpha software. Do not use saga to manage any files that you don't totally trust (we are sure there are security vulnerabilities hanging about).Downloading Saga SourceIf you want to check out saga's source code (or contribute <3):git clone https://github.com/saga-vcs/saga.git;
cd saga;
python3 -m venv env;
source env/bin/activate;
pip3 install -r requirements.txt;
python3 -m saga.main {saga_cmd}Running TestsWhen inside of the python virtual enviorment:pytestProfiling a Testpython3 -m cProfile -m pytest tests/test_excel.py