Saravanan666/pypi-org huggingface dataset:
Package: python-DrowsyDetection
This library uses deep learning to detect drowsiness of a personBefore using this library make sure you have installed following libraries which are neededTensorflowpip install tensorflowkeraspip install keraspyaudioFor windows usersFirst install pipwinpip install pipwinthen install pyaudio withpipwin install pyaudioFor linux userssudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0
   sudo apt-get install ffmpeg libav-tools
   sudo -s
   pip install pyaudiopyttsx3pip install pyttsx3To use this library just follow the stepsThis library creates a new process by forking to perform predictions , but in windows process creation takes place differently by importing the script and executing it again so to avoid infinite loop initialize detector inside  main condition as shown belowif __name__ == "__main__":
        initialize the detector here
        ......
        ....import it in your projectfrom DrowsinessDetection.DrowsinessDetector import  getDetectorinitializing the detectordetector = getDetector()(Audio="path to audio file, completely optional",UseAssistant=True)starting the detector in separate threaddetector.start()Do any task and wait for  detector to finish using join method ,  this is ablockingcalldetector.join()if you want to listen for  changing state of person then set a callback function
which will take boolean as argument and this function will get fired every time person drowsy state changes
, it will trigger true for sleeping and false for awakedef My_Callback(sleep):
        print("recieved status sleeping --> "+str(sleep))

d = getDetector()(UseAssistant=True)
d.setCallbackForStateChange(My_Callback)If you want to control the behaviour programmatically then there are few methods on detector objectfor setting sensitivitydetector.setSensitivity(any integer)for closing the detectordetector.quit()for observing state changesdetector.setCallbackForStateChange(My_Callback)Use Voice Assistant  to control the sensitivity of detector and for quitingvoice commands aresensitivity lowsensitivity mediumsensitivity highquitone sample scriptfrom DrowsinessDetection.DrowsinessDetector import   getDetector

if __name__ == "__main__":

    def My_Callback(sleep):
        print("recieved "+str(sleep))

    d = getDetector()(audio="audio-file-path",UseAssistant=True)
    d.setCallbackForStateChange(My_Callback)
    d.start()
    d.join()


# press q to quit the script
Package: pythonds
This book, available from Franklin Beedle, and online athttp://interactivepython.orgdefines and then uses several
common data structures.This python package contains all of the common data structures and implementations of some algorithms as presented in the book.  These includeStackQueueDequeueListPriority QueueTree
* binary tree
* binary heap
* balanced binary tree
* binary search treeGraphs
* adjacency list representation
Package: python-ds
Python Data Structures and AlgorithmsNo non-sense solutions to common Data Structure and Algorithm interview questions in Python.ObjectiveThere are a plenty of resources when it comes to interview preparations on the internet. What prompted me to create this project was the dissimilarity across different approaches and the infused complexity of the code.Feel free to contribute but please follow the Contributing Guidelines as I want to maintain the uniformity of the implementation of data structures and algorithms. Last time around, people bombarded with me with Pull Requests, Issues and Emails insisting me to merge their changesThe open source community has helped me a lot during my interview preparations and studies while I was in my undergrad. I always wanted to give something back to the community. In my endeavour to contribute something back, I will be uploading data structures and algorithms questions in Python in this repo. Feel free to contribute and get in touch!Structure of the repositoryAs of now, the repository contains 3 main directories:Bookmarks,Data StructuresandAlgorithms.Data StructuresContains all data structure questions categorised into sub-directories like stack, queue, etc according to their type.ArrayDictionaryBinary Search TreeLinked ListStackGraphsCircular Linked ListDoubly Linked ListAlgorithmsThis directory contains various types of algorithm questions like Dynamic Programming, Sorting, Greedy, etc. The current structure of this directory is like -Dynamic ProgrammingGraphsGreedyMathMiscSortingBit ManipulationBookmarksYou can find useful links in this repository in the different markdown files. Below is a table of contents.CategoryLinkArticlesClick HereBooksClick HereTopicsClick HereTutorialsClick HereVideosClick HereMisc.Click HereThings need to be doneAs you can see, the repo is still in its infancy. Here are some key things in the to-do.Queue questionsAlgorithmsMore questions in data structures, especially for graph, circular linked list, trees, heaps and hash.ContributingContributions are always welcomed.
Feel free to raise new issues, file new PRs. Consider giving it a star and fork this repo!To follow the guidelines, refer toContributing.mdLicenseMIT
Package: pythonds3
pythonds3Data Structures package forProblem Solving with Algorithms and Data Structures using Pythonby Brad Miller and David Ranum.The package is a supplement toProblem Solving with Algorithms and Data Structures using Python. It contains implementations of basic data structures, searching and sorting algorithms, trees, and graphs. Some implementation details are intentionally left out and readers are encouraged to complete them on their own.Object-oriented programmingTypical class implementationUse of getters, setters, and propertiesOverridingmagicmethods (len, str, contains etc)Basic data structuresStackQueueDequeOrdered linked listUnordered linked listSearchingHashMapSortingBubble sortSelection sortInsertion sortShell sortMergesortQuicksortHeapsortTreesBinary treeBinary search treeAVL treeBinary heapPriority queueGraphsBreadth first searchDepth first searchDijkstra's shortest path algorithmBellman-Ford shortest path algorithmPrim's spanning tree algorithm
Package: python.dsc
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.Key FeaturesModern Pythonic API usingasyncandawait.Proper rate limit handling.Optimised in both speed and memory.InstallingI have not made any edits to this fork yet. I am gathering some people to come and help out on the project.Python 3.8 or higher is requiredTo install the library without full voice support, you can just run the following command:# Linux/macOSpython3-mpipinstall-Upython.dsc# Windowspy-3-mpipinstall-Upython.dscOtherwise to get voice support you should run the following command:# Linux/macOSpython3-mpipinstall-U"python.dsc[voice]"# Windowspy-3-mpipinstall-Upython.dsc[voice]To install the development version, do the following:$gitclonehttps://github.com/ilikefivem/python.dsc$cdpython.dsc$python3-mpipinstall-U.[voice]Optional PackagesPyNaCl(for voice support)Please note that on Linux installing voice you must install the following packages via your favourite package manager (e.g.apt,dnf, etc) before running the above commands:libffi-dev (orlibffi-develon some systems)python-dev (e.g.python3.6-devfor Python 3.6)Quick ExampleimportdiscordclassMyClient(discord.Client):asyncdefon_ready(self):print('Logged on as',self.user)asyncdefon_message(self,message):# don't respond to ourselvesifmessage.author==self.user:returnifmessage.content=='ping':awaitmessage.channel.send('pong')client=MyClient()client.run('token')Bot Exampleimportdiscordfromdiscord.extimportcommandsbot=commands.Bot(command_prefix='>')@bot.command()asyncdefping(ctx):awaitctx.send('pong')bot.run('token')You can find more examples in the examples directory.This is a fork of discord.py that will be maintained!
Package: python-dsl-tools
Helpers for creating Domain Specific Languages (a.k.a. pretty APIs) embedded in Pythoncurrently contains:a function to create DeclarativeMetaClassesa base class/mixin to save kwargs passed to init on the objecta classinstancemethod decorator, which allows an instancemethod
to be called on an uninstantiated class by automatically creating
an instance.TODOAt the moment, classinstancemethod just instantiates the class with no
parameters, but ideally it should be possible to pass it args and kwargs
with which to instantiate.
Package: python-dsv-sdk
The Delinea DevOps Secrets Vault Python SDKTheDelineaDevOps Secrets Vault(DSV) Python SDK contains classes that interact with the DSV REST API.Installpython-mpipinstallpython-dsv-sdkUsageThere are two ways in which you can authorize theSecretsVaultclass to fetch secrets.Password Authorization (withPasswordGrantAuthorizer)Access Token Authorization (withAccessTokenAuthorizer)AuthorizersPassword AuthorizationIf using a traditionalclient_idand aclient_secretto authenticate in to your DevOps Secrets Vault, you can pass thePasswordGrantAuthorizerinto theSecretsVaultclass at instantiation. ThePasswordGrantAuthorizerrequires abase_url,username, andpassword. Itoptionallytakes atoken_path_uri, but defaults to/v1/token.fromdelinea.secrets.vaultimportPasswordGrantAuthorizerauthorizer=PasswordGrantAuthorizer("https://mytenant.secretsvaultcloud.com/","my_client_id","my_client_secret")Access Token AuthorizationIf you already have a validaccess_token, you can pass directly via theAccessTokenAuthorizer.fromdelinea.secrets.vaultimportAccessTokenAuthorizerauthorizer=AccessTokenAuthorizer("YgJ1slfZs8ng9bKsRsB-tic0Kh8I...")Secrets VaultInstantiateSecretsVaultby passing yourbase_urlandAuthorizeras arguments:fromdelinea.secrets.vaultimportSecretsVaultvault=SecretsVault("https://mytenant.secretsvaultcloud.com/",authorizer)Secrets can be fetched using theget_secretmethod, which takes thesecret_pathof the secret and returns ajsonobject. Alternatively, you can use pass the json toVaultSecretwhich returns adataclassobject representation of the secret:fromdelinea.secrets.vaultimportVaultSecretsecret=VaultSecret(**vault.get_secret("/test/secret"))print(f"username:{secret.data['username']}\npassword:{secret.data['password']}")Using Self-Signed CertificatesWhen using a self-signed certificate for SSL, theREQUESTS_CA_BUNDLEenvironment variable should be set to the path of the certificate (in.pemformat). This will negate the need to ignore SSL certificate verification, which makes your application vunerable. Please reference therequestsdocumentationfor further details on theREQUESTS_CA_BUNDLEenvironment variable, should you require it.Create a Build Environment (optional)The SDK requiresPython 3.7or higher.Assuming that you have a supported version of Python installed, you can clone
this repository and set up your environment with:# Clone the repogitclonehttps://github.com/DelineaXPM/python-dsv-sdkcdpython-dsv-sdk# Create a virtual environmentpython-mvenvvenv
.venv/bin/activate# Install dependenciespython-mpipinstall--upgradepip
pipinstall-rrequirements.txtValid credentials are required to run the unit tests. The credentials should be stored in environment variables or in a.envfile:exportDSV_CLIENT_ID=""exportDSV_CLIENT_SECRET=""exportDSV_BASE_URL="https://my.secretsvaultcloud.com/"The tests assume that the client associated with the specifiedCLIENT_IDcan read the secret with the path/test/sdk/simple.Note: The secret path can be changed manually intest_server.pyto a secret path that the client can access.To run the tests withtox:toxTo build the package, useFlit:flitbuild
Package: python-dta
Generator library for Swiss DTA (“Datenträgeraustauschverfahren”) electronic
payment records.FeaturesSupport for transaction types 826, 827, 836 and 890Implements various integrity checks according to record description manualSupports decimal and date input valuesGetting startedGenerate a DTA file containing one transaction of type 826:from datetime import date
from decimal import Decimal

from dta import DTA
from dta.records import DTAHeader, DTARecord826, DTARecord890

dta = DTA()

header = DTAHeader()
header.sequence_nr = 1
header.sender_id = 'ABCDE'
header.client_clearing_nr = '248'
header.creation_date = date(2013, 4, 23)
header.processing_date = date(2013, 5, 10)

record = DTARecord826(header)
record.reference = '002013-0058'
record.liability_account = '248 110079.01Z'
record.currency = 'CHF'
record.amount = Decimal('114.35')
record.client_address1 = 'LEUCHTER OPEN SOURCE SOLUTIONS'
record.client_address3 = 'WINKELRIEDSTRASSE 45'
record.client_address4 = '6003 LUZERN'
record.recipient_account = '010723327'
record.recipient_address1 = 'TESTLIEFERANT'
record.recipient_address3 = 'TESTSTRASSE 10'
record.recipient_address4 = '6005 LUZERN'
record.esr_reference = '182171015574297'
dta.records.append(record)

header = DTAHeader()
header.sequence_nr = 2
header.sender_id = 'ABCDE'
header.client_clearing_nr = '248'
header.creation_date = date(2013, 4, 23)

record = DTARecord890(header)
record.amount = Decimal('114.35')
dta.records.append(record)

with open('demo.leu', 'w') as f:
    f.write(dta.generate())
Package: python-dto
PyDto　JAVA DTO概念的实现工具描述实现DTO层的返回数据结构转换使用方法fromPyDto.pydtoimportPyDtoBaseclassUser(PyDtoBase):userName:strpassword:strmsg:strclasstestUser():userName='userName'password='password'msg="here is message"age=12if__name__=="__main__":z:User=User(testUser())print(z.ResultSchema)#{userName: userName,password:password,msg:here is message}使用原则继承DTO筛选层父类，返回层的结构体实例化传递需要转化的对象或者字典，使用定义好的DTO结构体接受对象
调用ResultSchema方法获取结果sqlalchemy支持版本支持sqlalchemy查询结果结构DTO处理，需要进行类的自我拼装classQuestionDto(PyDtoBase):id:intquestionText:strlevel:intclassAnswerDto(PyDtoBase):id:intoptionName:stroptionText:stroption:QuestionDtoclassTest(PyDtoBase):id:intrealPhoneNumber:strphoneNumber:str# TSRId:str# businessId :str# videoSourceId :stranswer:AnswerDtoisSuccess:bool# created_at :datetime# updated_at :datetime兼容查询结构是List或者单个对象，只需要在结构中定义好List或者单个对象的对象结构即可
其他使用方法同上包安装使用安装方法:pip install python-dto类继承模式:classQuestionDto(PyDtoBase):id:intquestionText:strlevel:intclassAnswerDto(PyDtoBase):id:intoptionName:stroptionText:stroption:QuestionDtoclassTest(PyDtoBase):id:intrealPhoneNumber:strphoneNumber:str# businessId :str# videoSourceId :stranswer:AnswerDtoisSuccess:bool# created_at :datetime# updated_at :datetime多层级结构嵌套可用，如果类属性为list<Class>的形式，即固定结构数组参数keydescriptiondata_modesqlalchemy，默认为None，sqlalchemy模式下启动解析schema结构obj传递需要进行数据结构筛选的对象deep_keep_alive计算深度调用方法z:User=User(testUser())print(z.ResultSchema)sqlalchemy建议使用形式data=[UserDto(sys_user,data_mode="sqlalchemy",deep_keep_alive=1).ResultSchemaforsys_userinsys_user_list]
Package: python-dtoc
About this project:This project created to convert any dict into class in python :) checkgithubInstall:pip install python-dtocSimple example:Print the object :frompydtocimportdtcfoo=dtc({'str':'string','int':1,'list':[1,2,3,4,{'hi':True}]})print(foo)Output :{"str":"string","int":1,"list":[1,2,3,4,{"hi":true}]}Print key of value :frompydtocimportdtcfoo=dtc({'str':'string','int':1,'list':[1,2,3,4,{'hi':True}]})print(foo.list[-1].hi)print(foo.str)Output :True

string
Package: python-dtp
Python分布式事务实现:TX specificationXA specification运行环境：python2.7，所支持的db为：mysql(>=5.7) + MySQLdb(>=1.2.3)mysql(>=5.7) + mysql-connector(>=2.1.0)postgresql(>=8.4) + psycopg2安装:
获取源码，并进入源码目录# python setup.py install用法：（暂不支持用unix_socket连接mysql）importMySQLdbfrompython_dtpimportlocal_db,MySQLResourceManager,PostgreSQLResourceManager,TransactionManagerdeftest():conn1,conn2=MySQLdb.connect(**db1_conf),MySQLdb.connect(**db2_conf)# conn1, conn2也可以是mysql.connector.connection对象，或psycopg2.connection对象rm1,rm2=MySQLResourceManager(conn1),MySQLResourceManager(conn2)cursor1,cursor2=conn1.cursor(),conn2.cursor()local_db.path='/path/to/dtp.sqlite3'# 很重要，记录执行失败的事务信息，crash恢复tm=TransactionManager(rm1,rm2)tm.tx_begin()cursor1.execute('insert into test1 values(1, "bbb")',())cursor2.execute('insert into test2 values(NULL, "aaa")',())tm.tx_commit()在同一台机器上，跑如下脚本，用来crash恢复：frompython_dtpimportmonitor,local_dblocal_db.path='/path/to/dtp.sqlite3'# 和上面的local_db.path一致# 定义db的连接参数db1_conf={'host':'xxx','port':3306,'user':'xxx','passwd':'xxx','db':'xxx'}# for mysql, 必须是MySQLdb能识别的参数db2_conf={'host':'xxx','port':3306,'user':'xxx','password':'xxx','dbname':'xxx'}# for postgresql# 告诉monitor，如何去连接db，其中key的值为形如(host, port)的tuplemonitor.db_config={('127.0.0.1',60000):db1_conf,('localhost',3307):db2_conf,('123.38.76.10',3306):db3_conf,('test_db.nease.net',3306):db4_conf,}monitor.run()# 启动monitor，一直运行
Package: python-dummy
Dummy repository for PyPI registration$ dummy --help
usage: dummy [-h] [-o OUTPUT] [-f] [-r] [-v] [-j JSON] [-y YAML] [-i INI]
             [-n NAME] [-m MODULE] [-M MODULE_NAME] [-V VERSION] [-a AUTHOR]
             [-A AUTHOR_EMAIL] [-t MAINTAINER] [-T MAINTAINER_EMAIL] [-u URL]

dummy package generator

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        output folder
  -f, --force           force generation even if package exists
  -r, --raise           raise error at runtime instead of reinstall
  -v, --verbose         give more output; option is additive

File configuration:
  use configuration file to setup dummy package

  -j JSON, --json JSON  path to JSON format configuration file
  -y YAML, --yaml YAML  path to YAML format configuration file
  -i INI, --ini INI     path to INI format configuration file

Command configuration:
  use command line options to setup dummy package

  -n NAME, --name NAME  dummy package name
  -m MODULE, --module MODULE
                        package module name
  -M MODULE_NAME, --module-name MODULE_NAME
                        expected module name
  -V VERSION, --version VERSION
                        package version string
  -a AUTHOR, --author AUTHOR
                        author name
  -A AUTHOR_EMAIL, --author-email AUTHOR_EMAIL
                        author email
  -t MAINTAINER, --maintainer MAINTAINER
                        maintainer name
  -T MAINTAINER_EMAIL, --maintainer-email MAINTAINER_EMAIL
                        maintainer email
  -u URL, --url URL     project URL
Package: python-dupamb
InstallationThe module, Dupamb requires pandas module to function
This module is used to remove the tuples having duplicate and ambiguous tuples in a dataset. The first column of the csv file should be that of the target class or feature while the others be independent features affecting target feature.Usages: python-dupamb$pipinstallpython-dupamb
$python-dupambmyData.csvLicenseMITAuthorSahil Ahuja
Package: python-dupan
百度网盘 Web API 的 Python 封装安装通过pypipip install -U python-dupan入门介绍1. 导入模块和创建实例导入模块fromdupanimportDuPanClient,DuPanFileSystem创建客户端对象，需要传入cookie，如果不传或者cookie失效，则需要扫码登录cookie="BDUSS=...;STOKEN=..."client=DuPanClient(cookie)创建文件系统对象fs=DuPanFileSystem(client)或者直接在client上就可获取文件系统对象fs=client.fs或者直接用DuPanFileSystem登录fs=DuPanFileSystem.login(cookie)2. 操作网盘使用 Python 式的文件系统方法文件系统对象的方法，设计和行为参考了os、posixpath、pathlib.Path和shutil等模块。dupan.DuPanFileSystem实现了读写的文件系统方法。方法说明参考__contains__()path in fs判断路径是否存在exists()__delitem__()del fs[path]删除文件或目录rmtree()__getitem__()fs[path]获取路径对应的dupan.DuPanPath对象as_path()__iter__()iter(fs)遍历目录，获取dupan.DuPanPath对象的迭代器iter(max_depth=-1)__itruediv__()fs /= path切换当前工作目录chdir()__len__()len(fs)获取当前目录的直属文件和目录数__repr__()repr(fs)获取对象的字符串表示__setitem__()fs[path] = data替换文件或上传目录等touch()upload()upload_tree()write_bytes()write_text()abspath()获取绝对路径posixpath.abspathas_path()获取路径对应的dupan.DuPanPath对象attr()获取文件或目录的属性chdir()cd()切换当前工作目录os.chdircopy()cp()复制文件shutil.copycopytree()复制文件或目录shutil.copytreedownload()下载文件暂不可用download_tree()下载文件或目录暂不可用exists()判断文件或目录是否存在posixpath.existsgetcwd()pwd()获取当前工作目录的路径os.getcwdget_url()获取文件的下载链接glob()遍历目录并用通配符模式筛选glob.iglobpathlib.Path.globisdir()判断是否存在且是目录posixpath.isdirisfile()判断是否存在且是文件posixpath.isfileis_empty()判断是否不存在、空文件或空目录iter()遍历目录，获取dupan.DuPanPath对象的迭代器iterdir()迭代目录，获取dupan.DuPanPath对象的迭代器pathlib.Path.iterdirlistdir()ls()罗列目录，获取文件名列表os.listdirlistdir_attr()la()罗列目录，获取文件属性dict列表listdir_path()ll()罗列目录，获取dupan.DuPanPath对象列表makedirs()创建多级的空目录os.makedirsmkdir()创建空目录os.mkdirmove()mv()对文件或目录进行改名或移动，如果目标路径存在且是目录，则把文件移动到其中（但是目录中有同名的文件或目录，还是会报错）shutil.moveopen()打开文件（只支持读，如果要写，请用write_bytes或upload替代）openio.open暂不可用read_bytes()读取文件为二进制pathlib.Path.read_bytes暂不可用read_bytes_range()读取文件为二进制暂不可用read_block()读取文件为二进制暂不可用read_text()读取文件为文本pathlib.Path.read_text暂不可用remove()rm()删除文件os.removeremovedirs()（自底向上地）删除多级的空目录os.removedirsrename()对文件或目录进行改名或移动os.renamerenames()对文件或目录进行改名或移动，然后对原来所在目录执行removedirsos.renamesreplace()对文件或目录进行改名或移动，并且如果原来路径上是文件，目标路径上也存在同名文件，则会先把后者删除os.replacerglob()遍历目录并用通配符模式筛选pathlib.Path.rglobrmdir()删除空目录os.rmdirrmtree()删除文件或目录shutil.rmtreescandir()迭代目录，获取dupan.DuPanPath对象的迭代器os.scandirstat()获取文件状态os.stat_result信息os.stattouch()访问路径，如果不存在则新建空文件pathlib.Path.touch暂不可用upload()上传文件暂不可用upload_tree()上传目录暂不可用unlink()删除文件os.unlinkwalk()遍历目录，获取文件名列表os.walkwalk_attr()遍历目录，获取文件属性dict列表walk_path()遍历目录，获取dupan.DuPanPath对象列表write_bytes()向文件写入二进制pathlib.Path.write_bytes暂不可用write_text()向文件写入文本pathlib.Path.write_text暂不可用dupan.DuPanPath实现了二次封装，从路径的角度来进行操作。3. 遍历文件系统和查找文件1. 获取当前目录下所有 .mkv 文件的 url第 1 种方法，使用iter，返回dupan.DuPanPath对象的迭代器forpathinfs.iter(max_depth=-1):ifpath.name.endswith(".mkv"):print(path.url)第 2 种方法，使用glob，参考pathlib.Path.glob和glob.iglob，使用通配符查找forpathinfs.glob("**/*.mkv"):print(path.url)第 3 种方法，使用rglob，参考pathlib.Path.rglobforpathinfs.rglob("*.mkv"):print(path.url)文档正在编写中
Package: python-duplicate
The python-duplicate library intend to find and deal with duplicate.
Depending on what you need, it can:Find and return the unique or duplicate items* of a listCreate a new list of unique items* from a listFind and return the indexes of said items* (act as a feedback)Find the rows (or just PK) of unique or duplicate column for MySQL 8 and PosgreSQL 10*items can be a list, tuple, dict, number or stringUpcoming improvementsIn the future I intend to add support for:JSONOther type of item for list (Object class for example)Handle suppression of duplicate for MySQL and PostgreSQLHandle research of unique / duplicate on more than one table / column / pkSupport more version of MySQL and PostgresSupport more database type
Package: python-dw
Data Wrangler (dw)dwis a data wrangling tool for command-line interface user.Example$catabc.csv|dwcsvto_markdown|a|b|c||----|----|----||1|1|1||1|2|2||2|1|3||2|2|4|$catabc.csv|dwcsvpivot--fielda--formula"sumc_c=sum(c)"|a|sum_c||----|-----||1|3||2|7|Setuppipinstallgit+https://github.com/MountainField/dwAuthorTakahide Nogayama-NogayamaLicenseThis project is licensed under the MIT License - see theLICENSEfile for detailsContributingPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests to us.
Package: python-dycasbin
DynamoDB adopter for casbinInstallationRunpip install python-dycasbinUsageimportcasbinfrompython_dycasbinimportadapteradapter=adapter.Adapter(table_name='casbin_rule',endpoint_url='http://localhost:8000')e=casbin.Enforcer("model.conf",adapter,True)sub="eve4"# the user that wants to access a resource.obj="data3"# the resource that is going to be accessed.act="read"# the operation that the user performs on the resource.ife.enforce(sub,obj,act):print("Allow")else:print("Deny")Running testsInstallpytestandpytest-mockRunpytestfrom project root
Package: python-dymo-scale
Reading information from Dymo USB scale.=======Install=======.. code-block:: bashsudo apt-get install python libusb-1.0-0# Create text file /etc/udev/rules.d/99-garmin.rules with contents:# SUBSYSTEM=="usb", ATTR{idVendor}=="0922", ATTR{idProduct}=="8003", MODE="666".. code-block:: bashpip install python-dymo-scale=======Example=======.. code-block:: pythonfrom dymo import scaleusb = scale.USB()print usb.get_weight_grams()=======Donation=======.. image:: https://img.shields.io/badge/Donate-PayPal-green.svg:target: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YYZQ6ZRZ3EW5C