Saravanan666/pypi-org huggingface dataset:
Package: dogehouse
dogehouse.pyPython wrapper for the dogehouse API.DocumentationYou can find the documentation atThe DogeGarden WikiInstallationpip install dogehouseExamplefromdogehouseimportDogeClientfromdogehouse.eventsimportReadyEvent,UserJoinEvent,MessageEventdoge=DogeClient("token","refresh_token")@doge.on_readyasyncdefmake_my_room(event:ReadyEvent)->None:print(f"Successfully connected as @{event.user.username}!")awaitdoge.create_room("Hello dogehouse.py!")@doge.on_user_joinasyncdefgreet_user(event:UserJoinEvent)->None:awaitdoge.send_message(f"Hello @{event.user.username}")@doge.commandasyncdefecho(event:MessageEvent)->None:msg=event.messageawaitdoge.send_message(f'@{msg.author.username}said{msg.content}')doge.run()Checkexamplesfor more feature usage.TokensGo todogehouse.tvOpen Developer options (F12orCtrl+Shift+I)Go to Application > Local Storage > dogehouse.tvThere lies yourTOKENandREFRESH_TOKEN
Package: dogen
This is a simple tool to generateDockerfilefiles from YAML templates.UsageThis tool is shipped as a Docker image registered asjboss/dogen.
You can see theDockerfilefor this image in the main directory
of the source distribution. This Docker image uses some conventions:Theimage templatethat should be converted intoDockerfileis expected to be
available at/input/image.yaml.The output directory will be/output.The directory with (optional) scripts should be available at/scripts.Considering above you need to remember to mount appropriate volumes at the container
start. You are free to change the paths, but please remember to provide new locations
as part of the container’sruncommand instruction.ExamplesAssuming your current working directory contains yourimage.yamlfile, any scripts
yourimage.yamlreferences are in an adjacent subdirectory calledscriptsand you
want the output written to an adjacent sub-directory namedout:docker run -it –rm -v $(pwd):/tmp:z dogen:latest –verbose /tmp/image.yaml /tmp/out
Package: dogerpc
# Doge[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/zhu327/doge/blob/master/LICENSE)[![Build Status](https://travis-ci.org/zhu327/doge.svg?branch=master)](https://travis-ci.org/zhu327/doge)[![codecov](https://codecov.io/gh/zhu327/doge/branch/master/graph/badge.svg)](https://codecov.io/gh/zhu327/doge)Doge is a Python RPC framework like [Alibaba Dubbo](http://dubbo.io/) and [Weibo Motan](https://github.com/weibocom/motan).## Features![doge](https://camo.githubusercontent.com/51ff9a1d5530f269f3074e9172483acf14c73eb8/687474703a2f2f6e2e73696e61696d672e636e2f746563682f7472616e73666f726d2f32303136303531302f4a7458792d66787279686875323338323938372e6a7067)- 服务治理, 服务注册, 服务发现- 高可用策略, failover, backupRequestHA- 负载均衡策略, RandomLB, RoundrobinLB- 限流策略, gevent Pool## Quick Start### Installation```shpip install dogerpc```你可以在[examples](https://github.com/zhu327/doge/tree/master/examples)找到以下实例### Doge server1. 新建server端配置文件```javascript{"registry": { // 注册中心"protocol": "etcd", // 注册协议, 支持 etcd 与 direct, 默认 etcd"host": "127.0.0.1", // 注册中心 host"port": 2379, // 注册中心 port// "address": "127.0.0.1:2379,127.0.0.1:4001", // 注册中心地址, 如果有etcd集群, 可配置多个node"ttl": 10 // etcd注册ttl, 用于server的心跳检查, 默认10s},"service": {"name": "test", // 服务名称"node": "n1",　// 节点名称"host": "127.0.0.1", // 服务暴露ip"port": 4399, // 服务暴露port"limitConn": 100 // 服务最大连接数, 可选, 默认不限制}}```2. 定义RPC methods类, 启动服务```python# coding: utf-8from gevent import monkeymonkey.patch_socket() # 依赖geventimport logginglogging.basicConfig(level=logging.DEBUG)from doge.rpc.server import new_server# 定义rpc方法类class Sum(object):def sum(self, x, y):return x + yif __name__ == '__main__':server = new_server('server.json')  # 基于配置文件实例化server对象server.load(Sum)  # 加载暴露rpc方法类server.run()  # 启动服务并注册节点信息到注册中心```### Doge client1. 新建client端配置文件```javascript{"registry": { // 注册中心"protocol": "etcd", // 注册协议, 支持 etcd 与 direct, 默认 etcd"host": "127.0.0.1", // 注册中心 host"port": 2379, // 注册中心 port// "address": "127.0.0.1:2379,127.0.0.1:4001", // 注册中心地址, 如果有etcd集群, 可配置多个node"ttl": 10 // etcd注册ttl, 用于server的心跳检查, 默认10s},"refer": {"haStrategy": "failover", // 高可用策略, 支持 failover backupRequestHA, 默认failover"loadbalance": "RoundrobinLB", // 负载均衡策略, 支持 RandomLB RoundrobinLB, 默认RoundrobinLB}}```2. 创建client并call远程方法```python# coding: utf-8from __future__ import print_functionfrom gevent import monkeymonkey.patch_socket()import logginglogging.basicConfig(level=logging.DEBUG)from doge.rpc.client import Clusterif __name__ == '__main__':cluster = Cluster('client.json')  # 基于配置文件实例化Cluster对象client = cluster.get_client("test")  # 获取服务名对应的Client对象print(client.call('sum', 1, 2))  # 远程调用服务Sum类下的sum方法```## doge json gateway基于Bottle实现的json rpc gateway<https://gist.github.com/zhu327/24c8262dc40c5de7eeaddbfc572f4215>## Requirements- [gevent](https://github.com/gevent/gevent)- [mprpc](https://github.com/studio-ousia/mprpc)- [python-etcd](https://github.com/jplana/python-etcd)- [pyformance](https://github.com/omergertel/pyformance)## LicenseApache License, Version 2.0
Package: dogfood-logger
python-package-exampleThis is a minimal python package, for use alongside the lesson:https://github.com/BillMills/pythonPackageLessonContributing:Please do! Guidelines:This lesson is for beginners. Yes there are plenty of super fancy things we don't cover here; someday, we'll make a different, super fancy lesson to teach those things.Max 100 lines per PR please.Open an issue or empty PR first to talk about controversial changes.
Package: dogfood-logger-package
python-package-exampleThis is a minimal python package, for use alongside the lesson:https://github.com/BillMills/pythonPackageLessonContributing:Please do! Guidelines:This lesson is for beginners. Yes there are plenty of super fancy things we don't cover here; someday, we'll make a different, super fancy lesson to teach those things.Max 100 lines per PR please.Open an issue or empty PR first to talk about controversial changes.
Package: dogma
dogmaCollection of object-oriented entities related by the central dogma of
biology.Installationusing Pipenv>> pipenv install dogmaor using pip>> pip install dogmaor Github>> git clone https://github.com/griffinclausen/dogma.git
>> cd dogma
>> pipenv install .Basic Usage>> from dogma import GeneticCode, Oligonucleotide
>> supE = GeneticCode(1, {'TAG': 'Q'})
>> oligo = Oligonucleotide('NNK', supE)
>> samples = oligo.samples(100)
>> print(samples)Contact Informationdogma.maintainer@gmail.com
Package: dogma.py
Dogma for Pythonhttps://dogma.devPrerequisitesPython3.6+Installation$pip3installdogma.pyExamplesImporting the libraryimportdogmaChecking the library versionReferenceClassesdogma.Angledogma.Latitudedogma.LongitudeSee AlsoDogma forC,C++,Dart,Protobuf,Ruby, andZig.
Package: dognames
Dog Name GeneratorGet Awesome Random dog names!ScreenshotInspired bySindresorhus's dog-namesInstall$ pip install dognamesUsageimportdognamesasnamesprint(names.male())#=> Chicoprint(names.malearr(3))#=> ['Bandit', 'Sammy', 'Chase']print(names.female())#=> Ellaprint(names.femalearr(3))#=> ['Hannah', 'Dakota', 'Hannah']Get HelpThere are few ways to get help:Pleasepost questions on Stack Overflow. You can open issues with questions, as long you add a link to your Stack Overflow question.For bug reports and feature requests, open issues.For direct and quick help, you canemail me.How to contributeHave an idea? Found a bug? Seehow to contribute.Thanks!LicenseMIT
Package: dogoban
Your trusty sheepdog is hungry. Help them corral the animals needed to produce their balanced food.Installpython3-mpipinstalldogobandogobanlevel001.txtYour dog responds to commands for the compass cardinal points: WASD.
They can only herd animals away from them; so be careful not to get stuck in a corner.Screenshot⬛⬛⬛⬛⬛
　⬛　　　　　⬛
⬛　　　🐕　　　⬛
⬛　　　　　　　⬛
⬛　　　🎯　　　⬛
⬛　　　　　　　⬛
⬛　　　🐓　　　⬛
　⬛　　　　　⬛
　　⬛⬛⬛⬛⬛
Package: dogpile_cache_autoselect
This consists of one function that tries to detect dogpile.cache backends and chooses the best one.The function:auto_select_backend(region_kwargs=None, between_runs=True, require_server=False, verbose=False)Use like this:region_kwargs: Parameters passed on to the region (dictionary).between_runs: If True, only selects backends that persist between runs.require_server: If True, raises an exception if no working server-backend is found (redis, memcached).verbose: If True, prints choices that are being made.Typically:backend = auto_select_backend()
# doneIt can only detect backends that don’t need special parameters to connect to (so it has to run locally). It’s mostly for software distributed to people who’ll run it locally (if you’ve set up a big caching cluster, you can probably spare 1 more minute to configure dogpile).
Package: dogpile_cache_native_redis
InstallUse pip:pip install dogpile_cache_native_redisUsageSee the example.Code:from dogpile.cache import make_region

region = make_region().configure(
    'native_redis',
    # arguments are same as redis backend.
    arguments = {
        'host': "127.0.0.1",
    }
)

region.set("test", b"value")
region.set_multi({"key1": b"value1", "key2": 100})
print(region.get("test"))
print(region.get_multi(["key1", "key2"]))Result:$ python main.py
b'value'
[b'value1', b'100']See with redis-cli:$ redis-cli
127.0.0.1:6379> get test
"value"
127.0.0.1:6379> mget key1 key2
1) "value1"
2) "100"
Package: dogpile.core
A “dogpile” lock, one which allows a single thread to generate
an expensive resource while other threads use the “old” value, until the
“new” value is ready.Dogpile is basically the locking code extracted from the
Beaker package, for simple and generic usage.UsageA simple example:from dogpile.core import Dogpile

# store a reference to a "resource", some
# object that is expensive to create.
the_resource = [None]

def some_creation_function():
    # create the resource here
    the_resource[0] = create_some_resource()

def use_the_resource():
    # some function that uses
    # the resource.  Won't reach
    # here until some_creation_function()
    # has completed at least once.
    the_resource[0].do_something()

# create Dogpile with 3600 second
# expiry time
dogpile = Dogpile(3600)

with dogpile.acquire(some_creation_function):
    use_the_resource()Above,some_creation_function()will be called
whenDogpile.acquire()is first called.  The
remainder of thewithblock then proceeds.   Concurrent threads which
callDogpile.acquire()during this initial period
will be blocked untilsome_creation_function()completes.Once the creation function has completed successfully the first time,
new calls toDogpile.acquire()will callsome_creation_function()each time the “expiretime” has been reached, allowing only a single
thread to call the function.  Concurrent threads
which callDogpile.acquire()during this period will
fall through, and not be blocked.  It is expected that
the “stale” version of the resource remain available at this
time while the new one is generated.dogpile.core is at the core of thedogpile.cachepackage
which provides for a basic cache API and sample backends based on the dogpile concept.Development Statusdogpile.core has been in use in a small number of production environments for a period of
months, and as of 0.3.2 has entered beta status.  No issues have been reported yet with its
core synchronization model, and overall the project hasn’t seen many changes.
Most development continues within dogpile.cache.
Package: dogpile-elasticache
Dogpile backend for AWS Elasticache Memcache service. Usespymemcacheto connect to
nodes of the Elasticache cluster withauto-discovery.PyPI:https://pypi.python.org/pypi/dogpile_elasticacheGithub:https://github.com/ludia/dogpile_elasticacheUsageInstall with pip:$ pip install dogpile_elasticacheConfigure a region to use dogpile_elasticache:from dogpile.cache import make_region

region = make_region().configure(
    'elasticache_pymemcache',
    arguments = {
        'configuration.host': 'XX.XX.cfg.use1.cache.amazonaws.com',
        'configuration.port': '11211',
    }
)DevelopmentInstall environment:$ pip install -e .[test]Run tests (with Nose):$ nosetestsRelease (with zest.releaser):$ fullreleaseThanksThanks tohttps://github.com/gusdan/django-elasticachefor the cluster
discovery code.Changelog0.1 (2016-04-11)Released on Github
Package: dogpile-filesystem
File System Backends for Dogpile CacheFilesystem-based backends for dogpile cache.The generic variant of the backend,paylogic.filesystem, will accept any picklable value and it will store it in the file system.The raw variantpaylogic.raw_filesystemwill only work with file-like values and it will avoid the pickling phase. This is useful when you are generating a big file and you don't want to keep in memory the contents of this file.Both variants usefcntl.lockfoperations, therefore it is compatible with  UNIX-like systems only.
The lockf system call allows to allocate an arbitrary number of locks using the same file, avoiding problems that arise when deleting lock files.InstallationInstall with pip:$ pip install dogpile_filesystemUsageGeneric variantConfigure a region to usepaylogic.filesystem:fromdogpile.cacheimportmake_regionimportdatetimeregion=make_region().configure('paylogic.filesystem',arguments={"base_dir":"/path/to/cachedir",# Make sure this directory is only for this region# Optional parameters"cache_size":1024**3,# Defaults to 1 Gb"expiration_time":datetime.timedelta(seconds=30),# Defaults to no expiration"distributed_lock":True,# Defaults to true})@region.cache_on_arguments()defmy_function(args):return42Raw variantConfigure a region to use dogpile_filesystem:fromdogpile.cacheimportmake_regionimportdatetimeimporttempfileregion=make_region().configure('paylogic.raw_filesystem',arguments={"base_dir":"/path/to/cachedir",# Make sure this directory is only for this region# Optional parameters"cache_size":1024**3,# Defaults to 1 Gb"file_movable":True,# Whether the backend can freely move the file.# When True, the backend will move the file to the cache# directory directly using os.rename(file.name).# When False (default), the content of the file will be copied to# the cache directory."expiration_time":datetime.timedelta(seconds=30),# Defaults to no expiration"distributed_lock":True,# Defaults to true})@region.cache_on_arguments()defbig_file_operation(args):# When using `file_movable=True`, we must make sure that NamedTemporaryFile does not delete the file on close,# otherwise it will complain that it cannot find the file.f=tempfile.NamedTemporaryFile(delete=False)# fill the filef.flush()f.seek(0)returnfDevelopmentInstall the dev requirements and the project in development mode:$ pip install -r requirements_dev.txt -e .Run tests:$ pytest testsOptionally run tests for all supported configurations:$ toxChangelogAll notable changes to this project will be documented in this file.This project adheres toSemantic Versioning.Unreleased0.2.0Removed logic that falls back to copying a file whenfile_movable=Truebut the file does not appear to be movable. Do not try to be smart.0.1.1Let PyPI know that we use markdown0.1.0Initial release
Package: dogpile-mongo
InstallUse pip:pip install dogpile_mongoUsageSee the example.Code:from dogpile.cache import make_region

db = MongoClient()['test']
region = make_region().configure(
     'mongo',
     # arguments are same as mongo backend.
     arguments={
         'db': db,
     }
)

region.set("test", b"value")
region.set_multi({"key1": b"value1", "key2": 100})
print(region.get("test"))
print(region.get_multi(["key1", "key2"]))Result:$ python main.py
b'value'
[b'value1', b'100']
Package: dogpt
doGPT 🐶Advanced AI, but for dogs.Animal welfare statementNo animals were harmed during the development of this advanced AI.InstallationEnsure you have Python installed, then:$ pip install dogptUsageSimply call thedogptcommand from the terminal with some prompt text:$ dogpt in your considered opinion, what is the meaning of life?The output will display, with pauses (this is advanced AI that requires
significant computational resources), to the terminal:woof play woof arf woof tummy rub sniff grrrAPI usageFrom within your code:fromdogptimporttextprompt=input("What do you want to say to the dog? ")text(prompt)This fragment will pipe out the response toSTDOUT.ContributingWe welcome contributions from advanced AI researchers, funding in the order of
millions of dollars from billionaires, and canine related training skills via
ourGitHub page.Change log1.0.0Initial release.
Package: dogratian-usb-sensors
DogRatIan USB-TnH, USB-PA and USB-VOC python libThis library makes usage ofhttps://www.dogratian.comsensors easySetup:pip install dogratian_usb_sensorsQuick Usage:fromdogratian_usb_sensorsimportUSBSensor# Returns serial port names for every connected DogRatIan devicesensor_ports=USBSensor.find_sensors()# Read data for every sensor on systemforsensor_portinsensor_ports:sensor=USBSensor(sensor_port)print(sensor.model)print(sensor.version)print(sensor.temperature)# Only on USB-PA and USB-TnH sensorsprint(sensor.humidity)# Only on USB-PA and USB-TnH sensorsprint(sensor.name)print(sensor.pressure)# Only on USB-PA sensorprint(sensor.voc)# Only on USB-VOC sensorprint(sensor.co2eq)# Only on USB-VOC sensorprint(sensor.identification)Reading all possible measurement values from a sensorforsensor_portinUSBSensor.find_sensors():sensor=USBSensor(sensor_port)print(sensor.all)Sensor differencesDogRatIan uses USB-TnH (temperature and humidity), USB-PA (temperature, humidity and atmospheric pressure) as well as USB-VOC (volatile organic compounds) sensors.
All three sensors are returned byUSBSensor.find_sensors().Depending on the sensor you have, not all commands will run.
You can identify a sensor by usingsensor.modelproperty.Basic usagefromtimeimportsleepfromdogratian_usb_sensorsimportUSBSensorsensor_ports=USBSensor.find_sensors()forsensor_portinsensor_ports:print("Found sensor at port{}".format(sensor_port))sensor=USBSensor(sensor_port,state_led=True)print("Sensor model is{}".format(sensor.model))count=0whilecount<10:print("Current temperature:{}".format(sensor.temperature))print("Current humidity:{}".format(sensor.humidity))sleep(.1)count+=1Writing data to the sensorAs DogRatIan suggests, you can set Name sensor to a max 8 char string, and turn on/off led.
The light will always flash when data is read on the sensor, regarless if it has been turned off.
USBSensor class has write methods implemented as setter properties, eg:fromdogratian_usb_sensorsimportUSBSensorsensor=USBSensor('/dev/ttyUSB2')sensor.name='MYSENSOR'sensor.led=True# Some codesensor.led=FalseState ledBy default, DogRatIan sensors will turn on their standby light when plugged in.
USBSensor will disable the standby light by default, unless initialized with
Optionally, we can automatically enable the led indicator while reading withstate_led=True.fromdogratian_usb_sensorsimportUSBSensorsensor=USBSensor('COM4',state_led=True)print(sensor.name)# Light flashes while reading valueError handlingUSBSensor class will raise two types of exceptions:ValueError when invalid opcode is given to sensorOSError when serial communication fails (most time you need to be root/administrator to have permissions over serial ports, and ports must not already been open by another application)
Package: dogsbody
========Dogsbody========A tool to create and execute a "special setup"/"data file".Install-------::pip install dogsbodyHow to use----------The "special setup" is a directory with at least one file. The main.sh file isexecuted and run your custom commands. To pass the directory, it is compressedinto a file. You can also add other stuff to the source directory.Encryption----------To use the encryption (the -p option) you have to install "cryptography".::pip install cryptographyCommands--------Some information::dogsbody --helpCreate the "data file"/"special setup"::dogsbody create source filenameExecuted the "special setup"::dogsbody run sourceAnd now both with activated encryption::dogsbody -p "1234" create source filenamedogsbody -p "1234" run sourceWhy?----I need to setup a project on a raspberry pi. It should be a single fileincluding everything.Development-----------Some information for crazy developers. Virtual environment windows::python -m venv venvvenv\Scripts\activateVirtual environment linux::python3 -m venv venvsource venv/bin/activateSetup project::python -m pip install --upgrade pip wheel setuptools twine tox flake8 pylint pylamapip install -e .Run some test::pylint --rcfile=setup.cfg dogsbodytoxCreate package::python setup.py sdist bdist_wheelUpload package::twine upload dist/*Run it on Termux::pkg install clang # for cryptography./dev.sh
Package: dogsled
dogsledis an open-source Python package that does only one thing: Macenko [1] stain normalisation of large medical slides (OpenSlide formats). It generates either JPEG or TIFF normalised image.It is crucial to have a dataset of high quality when, for example, training deep learning models. When working with medical slides, the colour might differ from slide to slide, making it harder to work with them as it causes heterogenicity in the data set. Stain normalisation is one of the techniques used to mitigate this hurdle and homogenise the slide colour. However, the size of the medical slides, which can go beyond gigapixel, makes it challenging to perform such a task. No worries,dogsledis there to help you.Whydogsled? Well, first of all, because of the dogs. Second, because together many dogs can push a cargo too heavy for one dog to handle. Similarily, dogsled divides heavy computations into smaller ones. As with many algorithms and life situations, divide and conquer, right?dogsledis in late alpha phaseif you spot a bug or have a suggestion feel free to open an issueif wish to testdogsledand need the data, feel free to drop me an email at:dmitri.stepanov1@gmail.comQuirks and featuresCurrently,dogsledcan:normalise all slides located in a specified foldernormalise slides specified by namenormalise slides defined in a QuPath library (either all or the ones specified by name and/or index)generate JPEG equivalents of the normalised slidesgenerate TIFF equivalents of the normalised slides (also for large slides not fitting in RAM)create hematoxylin/eosin decoupled normalised imagescreate thumbnails of all slides (pre-normalised and normalised)Documentationdogsledabout page, quickstart, installation and API can be found atdogsled.readthedocs.io[1] M. Macenko, M. Niethammer, J. S. Marron, D. Borland, J. T. Woosley, Guan Xiaojun, C. Schmitt, and N. E. Thomas. A method for normalizing histology slides for quantitative analysis. In 2009 IEEE International Symposium on Biomedical Imaging: From Nano to Macro, 1107–1110. 2009. doi:10.1109/ISBI.2009.5193250.
Package: dogsvscats
Dogs vs. Cats Kaggle's competition project (inference)This project brings an usable simple solution for the Kaggle's competition dogs-vs-cats (https://www.kaggle.com/c/dogs-vs-cats). Training project can be found athttps://github.com/albertoburgosplaza/dogs-vs-cats.Quick startfromdogsvscats.predictimportpredictpredict(<image_path>)Check the Colab notebook:
Package: dogtag-pki
This package contains the REST client for Dogtag PKI.The Dogtag Certificate System is an enterprise-class open source
Certificate Authority (CA). It is a full-featured system, and has been
hardened by real-world deployments. It supports all aspects of certificate
lifecycle management, including key archival, OCSP and smartcard management,
and much more. The Dogtag Certificate System can be downloaded for free
and set up in less than an hour.
Package: dogui
doguiA lightweight wrapper around Tkinter library enabling easy GUI creation for general applications in just few lines of code.InstallationUse the package managerpipto install dogui.pip install doguiUsageIt is very simple, just remember all GUI widgets need to be declared between GUI initialization and build_gui() method.import dogui.dogui_core as dg

def click_button():
    print("Your name is:",entry1.text.get())

gui1=dg.GUI()

label1=dg.Label(gui1.window,"What is your name?",1,1)
entry1=dg.Entry(gui1.window,1,2)
button1=dg.Button(gui1.window,"Submit",click_button,2,1)


gui1.build_gui()Widgets:
Label
Entry
Button
Combobox
Picturebox
For more information about their parameters, please look into the dogui_core.py file.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseMIT