Saravanan666/pypi-org huggingface dataset:
Package: simple_openid_connect
Simple OpenIDSimple and opinionated OpenID-Connect relying party and resource server implementationQuick LinksPyPi PageDocumentationGitHub RepositoryDevelopment philosophyKeep the API as simple as possibleNo**kwargsparameters, no function arguments calledrequest_args,http_argsorsomething_else_argsFully typed APIPython has type hints now, let's use them.Support commonly used OpenID features and flowsCommonly used flows will be supported but obscure and legacy or experimental mechanisms not so much.Bejustan OpenID libraryTell the user about function requirements clearly but don't try any fancy internal persistence or caching mechanisms that will only fail in different usage scenarios.
Instead, abstract the underlying OpenID protocol into usable, clear functions but nothing more.Framework IntegrationsNamePackage FeatureIntegration DocsSupported VersionsDjangodjangoIntegration Docsv3.2,v4.2,v5.0Django-Rest-FrameworkdjangorestframeworkIntegration Docsv3.13,v3.14Supported OpenID SpecsThe list ofOpenID specificationscan be found on the official website.(✔️) PartialOpenID Connect Core 1.0Only the following flows and features are implemented:✔️ Authorization Code Flow✔️ Direct Access Grant (orResource Owner Password Credentials Grant)✔️client_secret_basicclient authentication✔️noneclient authentication✔️ Query String serialization and parsing✔️ ID Token handling (parsing + validation)✔️ Using refresh tokens✔️ Retrieving userinfo❌ Implicit Flow❌ Hybrid Flow❌ Handling third party initiated login❌ Passing requests as JWTs (neither by value nor by reference)❌ Self-Issued OpenID Provider❌client_secret_postclient authentication❌client_secret_jwtclient authentication❌private_key_jwtclient authentication(✔️) PartialOpenID Connect Discovery 1.0.Provider Configuration Discoveryis implemented,Provider Issuer Discoveryis not.This means that a known issuer can be introspected for its supported algorithms, endpoint locations and so forth but discovering that issuer in the first hand is not possible.✔️ FullOAuth 2.0 Multiple Response Type Encoding PracticesOnly the following features are implemented and supported:✔️  Response modes (fragment based response parsing)✔️  Multiple-Valued Response TypesNo explicit support, but it is possible to supply one of the multivaluedresponse_typevalues to an authentication request and then parse multiple responses from the resulting response.✔️ FullOpenID Connect RP-Initiated Logout 1.0✔️ FullOpenID Connect Front-Channel Logout 1.0✔️ FullOpenID Connect Back-Channel Logout 1.0✔️ FullOAuth 2.0 Token Introspection
Package: simpleor
simpleorsimpleoris a package that shows how Operations Research problems
can be solved with Python. This project primarily serves as a learning
experiment, although the package’s functionality can be used in real-life.Currently,simpleorsupports:a scheduler, which assigns tasks to agentsa matcher, which finds a maximum matching in fully connected graphYou can use this functionality directly, or use the package as a starting point to create
your own Operations Research solvers.Documentation:https://simple-or.readthedocs.io/Free software: GNU General Public License v3History0.0.4 (2020-12-12)First release on PyPI.0.0.5 (2020-12-19)Added match maker moduleUpdated docsSimplified GitHub workflow0.0.13 (2020-12-23)added task reward option to schedulerUpdated docs
Package: simple-orm
python-sqlite-ormA Python object relational mapper for SQLite.Installpipinstallsimple-ormUsageFollowing a basic tutorial to demonstrate how to use the ORM.Define aPostmodel in apost.pyfile.# post.pyfromormimportModelclassPost(Model):text=str# other datatypes: int, floatdef__init__(self,text):self.text=textImportDatabaseto create a data access object.>>>fromormimportDatabase>>>db=Database('db.sqlite')# indicating a database file.Import thePostmodel and link it to the database.>>>frompostimportPost>>>Post.db=db# see another approach in tests.pyCreate a post and save it in the staging area (without commit) of database.>>>post=Post('Hello World').save()>>>print(post.id)# auto generated id1Change the hello world post and update it in the database.>>>post=Post.manager().get(id=1)>>>post.text='Hello Mundo'>>>post.update()>>>post.textHelloMundoCommit all staged operations (saveandupdate) to the database.>>>db.commit()Delete the object and commit.>>>post.delete()>>>db.commit()Create a manager that can perform CRUD operations in the database.>>>objects=Post.manager(db)Save and get a post.>>>objects.save(Post('Hello','World'))>>>objects.get(2)# get by id from the staging area{'text':'World','id':2,'title':'Hello'}Close the database without commit the changes>>>db.close()Get all posts from database.>>>list(objects.all())# return a "empty" generator[]LinterCheck code lint:pipinstallpylint
pylintorm.pyContributingSeeCONTRIBUTING.LicenseThe MIT License.
Package: simple-othello
simple_othelloUdemyの教材で利用するためのオセロゲームプラットフォームです。AlphaZeroの意外な構造　またはAlphaGoは如何にして棋譜データの利用を止めて自分の経験に頼るようになったかhttps://www.udemy.com/course/alphazero/
Package: simple-otp
simple-otpA simple OTP Generation and Verification Library which works without a Database or Cache.FeaturesDoes not require database or cacheEasy to implementHas OTP expiry functionHow to use this?Usage explained in diagram belowInstallationpip install -U simple-otpUsage ExampleimportosfromtimeimportsleepfromsimpleotpimportOTPSECRET_KEY=os.getenv('SECRET')otp_handler=OTP(SECRET_KEY,length=6,expires_after=2,user_identifier='kshitij.nagvekar@workindia.in')# generate OTP - returns OTP and hashotp,sig=otp_handler.generate()print(otp,sig)# verify OTP - correct OTP and hash passed to verify methodis_verified=otp_handler.verify(otp,sig)print(is_verified)# returns True# verify OTP - incorrect hardcoded OTP passed to verify methodis_verified=otp_handler.verify('123',sig)print(is_verified)# returns False# Sleep added to simulate Expiry of OTPsleep(2*61)# Correct OTP and hash passed to verify method# But after expiry time has passedis_verified=otp_handler.verify(otp,sig)print(is_verified)# returns FalseThe library also includes helper method to generate a random secret keyfromsimpleotpimportgenerate_secretSECRET_KEY=generate_secret()print(SECRET_KEY)# 'Q0CZYBRDECESA72M'Build RequirementsMakePythonTwineInitialise Build EnvironmentOne time initialisationmake initMake a release buildEnsure that working directory is clean and all files are commited.Bump the version. Please readSemantic Version 2.0.0before bumping versions.make release PART=[major/minor/patch]Update the CHANGELOG.md.Push release tags.git push origin --tagsMake a release build.make distPublish your changesmake deployChangelogPlease find the changelog here:CHANGELOG.mdAuthorssimple-otp was written byKshitij Nagvekar.
Package: simplepac
simplepacGenerate a simple pac for proxy and ad-block(use the code fromeasylist-pac-privoxy).usage: simplepac [-h] -p PROXY -o OUTPUT [--proxy-rule PROXY_RULE]
                 [--user-rule USER_RULE] [--ad-block]
                 [--black-hole BLACK_HOLE]

Generate a simple pac

optional arguments:
  -h, --help            show this help message and exit
  -p PROXY, --proxy PROXY
                        pac proxy like "PROXY 127.0.0.1:8888","SOCKS
                        127.0.0.1:1080"
  -o OUTPUT, --output OUTPUT
                        output pac file
  --proxy-rule PROXY_RULE
                        [optional]proxy rule, Base64 or text, default use
                        gfwlist
  --user-rule USER_RULE
                        [optional]user rule like proxy rule, support cidr like
                        "IP-CIDR,91.108.4.0/22"
  --ad-block            [optional]enable ad block, use easylist.
  --black-hole BLACK_HOLE
                        [optional]ad proxy, usually use a unreachable proxy,
                        IOS may need to set nginx server,default:"PROXY
                        127.0.0.1:12306"
Package: simplepam
An interface to the Pluggable Authentication Modules (PAM) library on
linux, written in pure python (using ctypes)OverviewThis module provides anauthenticatefunction that allows the caller
to authenticate a given username / password against the PAM system on
Linux.UsageRunpython3 setup.py installas root to install the module, then
import theauthenticatefunction, and use it as follows:fromsimplepamimportauthenticateauthenticate(username,password,service)The full function signature is as follows:authenticate(username,password,service='login',encoding='utf-8',resetcred=True)Theserviceargument specifies the PAM service to authenticate
against. Defaults tologin.username,passwordandservicecan be given as strings or
bytes. If they are strings, they will be encoded using the encoding
given by theencodingparameter, or, if omitted, as UTF-8.The function returnsTrueif the authentication succeeds and returnsFalseif authentication fails (or if PAM returns an error (FIXME)).Python versionsThis module works with both Python 2 and Python 3.LicenseTheoriginal python-pam modulewas written by Chris AtLee, see the
original copyright notice:Copyright (C) 2007-2009 Chris AtLee <chris@atlee.ca>.
Licensed under the MIT license.Modifications 2013-2014 by Leon Weberleon@leonweber.de:Ported to Python3Add call topam_end()Usectypes.byref()instead ofctypes.pointer()to pass arguments by referenceProperly handle encoding of password, username and service (Patch by Sebastian Riese)Add call topam_reset()(Patch by Lertsenem)Re-add Python2 support (Patch by Victor Stinner of eNovance)This module is licensed under theMIT license.
Package: simpleparam
SimpleParamAboutSimpleParamwas inspired by theparamlibrary which offers lots of neat features in a
small package, howeverparamhas a tricky codebase. InSimpleParamyou can either createParameterorParameterStoreusing simple synthax.SimpleParamis certainly not complete and is missing a lot of awesome features ofparamand of course, has not been battle-tested yet. Missing features (such asArray,List, etc) will be added as my other projects that useSimpleParamwill require them.UsageYou can intilizeParameterlike this:importsimpleparamasparamnumber=param.Number(42)number>>>Parameter(name=param,value=42,doc=')However, it is probably better to use parameters inside of aParameterStore, where you can store multiple parameters together and take advantage of additional functionality (e.g. locking of parameters withconstantor exporting parameters as JSON object usingexport_as_dict):importsimpleparamasparamclassConfig(param.ParameterStore):def__init__(self):param.ParameterStore.__init__(self)# # you can add parameter docstrings by setting `doc`self.integer=param.Integer(42,doc="A not very important value")# `auto_bound` forces hard bounds on values that are outside the specificationself.number=param.Number(42.,softbounds=[0,100],hardbounds=[1,100],auto_bound=True)# setting `allow_any` to False, will force values to be of `str` instanceself.string=param.String("string",allow_any=False)# you can set internal parameter name by setting the value of `name`self.choice=param.Choice("foo",name="foo_bar_choice",choices=["foo","bar"],)# parameters can be prevented from being changed by setting value of `constantself.color=param.Color("#FFFFFF",constant=True)self.bool=param.Boolean(True)self.range=param.Range(value=[0,100],hardbounds=[0,100])config=Config()config>>>ParameterStore(count=7)For complete documentation, please visit thedocswebsite.InstalationInstall from PyPIpipinstallsimpleparamor directly from GitHubpipinstallgit+https://github.com/lukasz-migas/SimpleParam.gitor in development modegitclonegit+https://github.com/lukasz-migas/SimpleParam.gitcdSimpleParampythonsetup.pydevelopRequirementsSimpleParam has no external requirements and works in py2 and py3.Planned featuresadd 'List', 'Dict' classesrename 'Color' to 'ColorHEX' or add 'modes': RGB or HEXadd Array class
Package: simpleparser
SimpleParserSimple expressions parser.InstallingInstalling via pip:$pipinstallsimpleparserUsageParserTo simply parse something, useParser.parsemethod. WithParseryou can describe different parsers.
There is ready-madeDefaults.parser.fromsimpleparserimportDefaultsexpr="a + b / 2"parsed=Defaults.parser.parse(expr)parsed(a=2,b=4)# returns 4.0Parser.parsereturns callableParsedExpressionobject.Custom parsersParsercan be easily configured. It is described by a set of operators and constants types (such as numbers or booleans).
See theOperatorandConstantTypedocumentation below.fromsimpleparserimportParser,Defaultsmy_parser=Parser(operators=[Defaults.plus,Defaults.minus,Defaults.mul,Defaults.div],# using some operators from `Defaults` hereconstants=[Defaults.integers_decimal,Defaults.float_point])Heremy_parserparses simple math expressions with 4 basic operators and decimal numbers, for example1 + 2.0 * a.OperatorCreating a custom operator:fromsimpleparserimportOperator,Parserin_op=Operator(name="in",operator_type=2,func=lambdael,container:elincontainer,signs=("\u2208",),priority=3,)# creating new parser which uses this operatornew_parser=Parser([in_op],[])el_in_set_checker=new_parser.parse("a in A")el_in_set_checker(a=1,A={1,2,3})# Trueel_in_set_checker(a=0,A={1,2,3})# FalseConstantTypeDescribes a type of constants which can be used in expression. Here is the definition ofDefaults.boolean:fromsimpleparserimportConstantTypeboolean=ConstantType(r"(True|False|true|false)$",lambdas:Trueifsin{"True","true"}elseFalse)Parser with this constant type replaces words which are matched by theboolean's regular expression toTrueorFalse.parser=Parser([],[boolean])parser.parse("True")()# Trueparser.parse("false")()# False
Package: simple-pass
simple-password-generationGenerate and check secure passwords in Python.This is intended for use as a password strength checking and suggestion library for APIs, though it could also be integrated into a password database application.Usage>>> from simple_pass import create_password, check_havebeenpwned, scoring
>>> password = create_password()
>>> print(password)
unfurcate necessitate nonfact retrogradation swathband orthitic

>>> check_havebeenpwned(password)
True
>>> scoring(password)
(True, 75)HaveIBeenPwnedGenerated passwords are automatically securely checked against theHaveIBeenPwneddatabase.
Partial hashes are sent using the HaveIBeenPwned API. This can not be reconstructed to determine the checked password.User generated passwords can be checked by callingcheck_havebeenpwned(password).Scoring OptionsPasswords can be checked with a scoring based system using the following options.def scoring(
    password,
    *,
    minimum_length=8,
    minimum_score=20,
    points_for_lower=2,
    points_for_upper=2,
    points_for_numbers=2,
    points_per_special=2,
    special_characters=" !@#$%^&*()-=_+.,<>[]{}/?\\|",
    points_per_character=1,
):I believe this scoring system encourages long and difficult to guess passwords by rewarding lengthy passwords and special characters, but without requiring a specific password format or frustrating rules.XKCD, Comics, Horses, and batteriesFor wisdom on what makes a good password see the famousxkcd correct horse battery staple comic. Thecorrect horse battery stapleexample passes with a score of 36 using the default parameters. It does not pass the HaveIBeenPwned check, however, as it is a well known password that has probably been found in many breaches.
Package: simple-passgen
# Simple-Passgen
:A very simple script to generate cryptographically random passwordsSimple-Passgen is a script that usesos.urandom()to generate crypotographically suitable
random characters from the set of characters typable on a standard keyboard (a-z, A-Z, 0-9, and
punctuation).  For a complete listing refer to an ASCII or Unicode table, as this implementation
uses precisely ASCII codes 33-126. This generates passwords with 6.554 bits of entropy per
character.  Some basic statistics are given about the password on each generation depending on
the length settings chosen.
## Usage` shell passgen [phrase length] `
Package: simple-pastebin-parser
Simple-Pastebin-Parserthis is a simpler parser for the pastebin.com website.it will iterate posts and parse their elements using lxmlinstallation:pip install simple-pastebin-parserexample usageimportsimple_pastebin_parserforpasteinsimple_pastebin_parser.get_pastes():print("Title: ",paste.Title)print("Author: ",paste.Author)print("date: ",paste.Date)print("Content: ")print(paste.Content)print("*"*20)Release notes:v0.1.0 - P.O.Cinitial proof of concept. nothing special, just doing the dirty work of parsing the posts.how to execute:
1. create a virtual env of python 3.6
2. install requirements
3. run python poc.pyv0.2.5 (2020-03-07)integration with travis.civ0.2.6 (2020-03-07)changing the POC code to work with installed pypi packagev0.3.0 (2020-03-07)created the Paste() object for pastebin postsability to stream datav0.3.3 (2020-03-07)small fixesv0.3.5 (2020-03-07)update READMEv0.4.0 (2020-03-08)added documentationcleaned most pep8 issuessome testsv0.5.0 (2020-03-08)parse date in UTCadd some logsadd id to Paste()v0.5.2 (2020-03-09)cleanups
Package: simplepcap
Simple PCAP file parserBased onthisandthisPCAP Capture File Format description.AboutSimple PCAP was created to allow the user to focus as much as possible on processing packets stored in
a pcap file without studying its structure. This is a very simple tool, it does not provide additional
tools for analyzing packages. The library tries to provide the safest possible manipulation of pcap files.InstallationFrom PyPIpipinstallsimplepcapFrom GitHubpipinstallgit+https://github.com/ic-it/simplepcap.gitUsage exampleSimple usagefrompprintimportpprintfromsimplepcap.parsersimportDefaultParserwithDefaultParser(file_path="./pcaps/eth-1.pcap")asparser:pprint(parser.file_header)forpacketinparser:pprint(packet)Get all packetsfrompprintimportpprintfromsimplepcap.parsersimportDefaultParserwithDefaultParser(file_path="./pcaps/eth-1.pcap")asparser:packets=list(parser)# or packets = parser.get_all_packets()pprint(packets)Look at theexamplesfolder for more examples.DocumentationLook at thedocs.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Package: simplepeg
To use, simply do:>>> from simplepeg import SPEG
>>> parser = SPEG()
>>> parser.parse_grammar('GRAMMAR test b -> "a";')
>>> ast = parser.parse_text('a')
>>> print ast.to_json()or:>>> from simplepeg import SPEG
>>> parser = SPEG()
>>> ast = parser.parse('GRAMMAR test b -> "a";', 'a')
>>> print ast.to_json()
Package: simplepg
SimplePGSimple PostgreSQL connections: a wrapper around psycopg2.Features:Thread-safe connection poolingAuto-reconnect on connection lossUnified interface for execute, executemany, and execute_valuesInstallationpipinstallsimplepgExamplefromsimplepgimportDbConnectiondb=DbConnection(user="postgres",password="postgres",host="localhost",port=5432,database="postgres",connect_kwargs={},pool_min_connections=1,pool_max_connections=1,)db.execute("CREATE TABLE test_table (id SERIAL PRIMARY KEY, name VARCHAR)")db.execute_values("INSERT INTO test_table (name) VALUES%s",[("test1",),("test2",)])records,columns=db.execute("SELECT * FROM test_table")db.execute("DROP TABLE test_table")
Package: simplepgsql
Simple PostgreSQL Interaction in PythonThis project contains a Python script (simplepgsql.py) that provides a simple interface for interacting with a PostgreSQL database using psycopg2 library.Getting StartedInstall via PIPDependent LibrariesPython 3.6+PostgreSQLpsycopg2 Python libraryPandasUsagefromsimplepgsqlImportDBConnectconn_params={"host":config['DB']['DB_HOST'],"database":config['DB']['DB_NAME'],"user":config['DB']['DB_USER'].strip(),"password":config['DB']['DB_PASSWORD'].strip(),"port":config['DB']['DB_PORT'],}_query_params={"schema":"public","table_name":"film_list","columns":["category","price"],"aggregate":{"price":"SUM"},"conditions":{"length":(60,">")},"order_by":("price","DESC"),"group_by":["category","price"],"limit":10,}withDBConnect(conn_params,return_type=pd.DataFrame)ascursor:results=cursor.read(**_query_params)print(results)Outputcategory sum: price
0          New     109.78
1       Travel     109.78
2       Family      74.85
3        Games     129.74
4  Documentary      69.86
5    Animation      74.85
6       Sports     119.76
7       Comedy      94.81
8       Horror      89.82
9      Foreign      99.80LicenseThis project is licensed under theGNU GPL v3 License.
Package: simple-photo-gallery-bulkcreation
simple-photo-gallery-bulkcreationPlugin for theSimple Photo Gallerywhich provides a config based bulk creation of multiple galleries from multiple folders of photos.DescriptionThis plugin comes with a further command for theSimple Photo Gallery:gallery-bulkcreationInstallationpip install simple-photo-gallery-bulkcreationConfiguration fileThe configuration file is in a simple ini format.
At first there has to be a general DEFAULT section with some general settings.
Then there is one section per gallery.[DEFAULT]
gallery_root = example/gallery
title = My vacations
description = The best days of the year
title_photo = example/pictures/mexico2017/2017-11-01_15-20-23.jpg
title_photo_offset = 20

[Oman 2020]
description = Some days in the orient
image_source = example/pictures/oman2020
background_photo = 2020-02-02_18-40-33.jpg

[Greece 2019]
description = Island hoping in Greece
image_source = example/pictures/greece2019
background_photo = 2019-08-29_10-19-43.jpg
background_photo_offset = 40UsageAfter the creation of aconfig.ini, the creation is pretty easy via running following command:gallery-bulkcreation config-example.iniIf everything works correctly you can preview the result, e.g. via running a simple Python server:python3 -m http.server --directory GALLERY_ROOT/publicand then checking it in your browser underhttp://localhost:8000.If you add photos to already existing galleries or add new galleries in theconfig.iniyou can simple update the gallery by running the command again.ExampleCheck out theexample.
Package: simple-pid
simple-pidA simple and easy to use PID controller in Python. If you want a PID controller without external dependencies that just works, this is for you! The PID was designed to be robust with help fromBrett Beauregards guide.Usage is very simple:fromsimple_pidimportPIDpid=PID(1,0.1,0.05,setpoint=1)# Assume we have a system we want to control in controlled_systemv=controlled_system.update(0)whileTrue:# Compute new output from the PID according to the systems current valuecontrol=pid(v)# Feed the PID output to the system and get its current valuev=controlled_system.update(control)InstallationTo install, run:python -m pip install simple-pidDocumentationDocumentation, including a user guide and complete API reference, can be foundhere.TestsThis project has a test suite usingpytest. To run the tests, installpytestand run:pytest -vLicenseLicensed under theMIT License.
Package: simple-ping
python-pingPython ping packageREADME MapTo run locally, go toRun from command line.To use the main class, skip toThe main class.Instructions on advanced/technical documentation, go toDocumentation.Run from command lineFrom the project's root directory, please run the following command and follow instructions:$ python -m pingThe main classWith the python console and thePing class, we can get things running:$ python
>>> from ping import Ping
>>> ping = Ping('localhost')
>>> print(f'Ping avg return: {ping.avg} ms')
>>> print(f'Ping errors return: {ping.returncode} {ping.stderr}')DocumentationPlease try from python console:$ python
>>> import ping
>>> help(ping)Or try from command line:$ python -c "import ping; print(ping.__doc__)"All documentation can be found indocs.
Package: simple-pinq
# pinq
A [LINQ](https://msdn.microsoft.com/en-us/library/bb308959.aspx) style API for Python iterables. Inspired by [JINQ](https://github.com/VivekRagunathan/JINQ).## Installation` pip installsimple-pinq`## Docs
These are a work in progress. For now, check out the [unit tests](./tests).## Tests
[![Build Status](https://travis-ci.org/tizz98/pinq.svg?branch=master)](https://travis-ci.org/tizz98/pinq)
When contributing, make sure the test code coverage is not below 100%. To run tests:` pip install-e. pytest tests--cov=pinqflake8 pinq tests `