Saravanan666/pypi-org huggingface dataset:
Package: pydnsbl
PydnsblAsyncdnsbllists checker based
on asyncio/aiodns. Checks if ip is listed in anti-spam dns blacklists.
Multiple dns blacklists supported. Use aiodns for async dns requests.
Usually ip check run for 50+ lists takes less than one second. Also allow to check domains.Installationpip install pydnsblRequirementspython >= 3.5aiodnsUsageCheck ip>>> import pydnsbl
>>> ip_checker = pydnsbl.DNSBLIpChecker()
>>> ip_checker.check('8.8.8.8')
<DNSBLResult: 8.8.8.8  (0/52)>
>>> ip_checker.check('68.128.212.240')
<DNSBLResult: 68.128.212.240 [BLACKLISTED] (6/52)>Check domain>>> import pydnsbl
>>> domain_checker = pydnsbl.DNSBLDomainChecker()
>>> domain_checker.check('google.com')
<DNSBLResult: google.com  (0/4)>
>>> domain_checker.check('belonging708-info.xyz')
<DNSBLResult: belonging708-info.xyz [BLACKLISTED] (2/4)>DNSBLResult propertiesDNSBLResult.addr- ip address or domain that was checkedDNSBLResult.blacklisted- boolean, True if ip/domain detected by at least one providerDNSBLResult.detected_by- dictionary containing providers hosts detected this ip/domain as keys and
their category verdictsDNSBLResult.categories- combined categories from all providers for this ip/domainDNSBLResult.providers- list of providers that was performing the checkDNSBLResult.failed_providers- list of providers that was unable to check this ip properly (possibly provider was down)>>> result = domain_checker.check('belonging708-info.xyz')
>>> result.addr
'belonging708-info.xyz'
>>> result.blacklisted
True
>>> result.detected_by
{'multi.surbl.org': ['unknown'], 'dbl.spamhaus.org': ['spam']}
>>> result.categories
{'unknown', 'spam'}
>>> result.providers
[<Provider: uribl.spameatingmonkey.net>, <Provider: multi.surbl.org>, <Provider: rhsbl.sorbs.net >, <Provider: dbl.spamhaus.org>]
>>> result.failed_providers
[]Extending/overriding providersBasicfrompydnsblimportDNSBLIpChecker,providersfrompydnsbl.providersimportBASE_PROVIDERS,Providerproviders=BASE_PROVIDERS+[Provider('yourprovider1.com'),...]checker=DNSBLIpChecker(providers=providers)AdvancedTake a look into providers.py file.UseProviderclass to create your custom providers.Overrideprocess_responsemethod ofProviderclass to map
providers response codes (127.0.0.x) to DNSBL categories.ContactFeel free to contact me: ippolitov87 at gmail.com
Package: pydnserver
Provides a very simple DNS server.  It provides the following functionality:
* Resolves hostnames to IP addresses.  (A record lookups)
* Resolves hostnames to hostnames. (CNAME lookups)To start up a DNS server:from pydnserver import DNSServer

ip = u'192.168.0.10  # Set this to the IP address of your network interface.

dns = DNSServer(interface=ip, port=53)
dns.start()

try:
    while True:
        pass

except KeyboardInterrupt:
    dns.stop()This starts a bare bones DNS server that will forward all requests to the google DNS servers (8.8.8.8, 8.8.4.4).Configuration can currently be managed using the configurationutil.Configuration interface.The configuration is dynamic. If it is changed, it will be reflected in the next request.
Package: pydnspod
# pydnspod#关于pydnspod是一个DNSPod国内版API的Python SDK.#特性支持自定义User-Agent支持D令牌发送请求前检查是否遗漏参数，避免无效请求使用命名参数，可以单独指定特定api的返回结果的format、lang#使用方法from pydnspod import pydnspodif __name__ == “__main__”:login_email = ‘’
login_password = ‘’
api = pydnspod.Api(login_email, login_password)
print api.version()user_manager=pydnspod.User(login_email, login_password)
print user_manager.detail()domain_manager = pydnspod.Domain(login_email, login_password)
print domain_manager.create(domain=”domain.name”)
print domain_manager.info(domain=”domain.name”)
Package: pydnspod2
pydnspodpydnspod 是一个 DNSPod 国内版 API 的 Python SDK.DNSPod API DocsInstallationpip install pydnspod2特性支持自定义User-Agent支持D令牌发送请求前检查是否遗漏参数，避免无效请求使用命名参数，可以单独指定特定api的返回结果的format、lang使用方法frompydnspodimportpydnspodif__name__=="__main__":login_email=''login_password=''api=pydnspod.Api(login_email,login_password)printapi.version()user_manager=pydnspod.User(login_email,login_password)printuser_manager.detail()domain_manager=pydnspod.Domain(login_email,login_password)printdomain_manager.create(domain="domain.name")printdomain_manager.info(domain="domain.name")
Package: pydnspodint
# pydnspodint#Aboutpydnspodint is a python sdk of dnspod international version(https://www.dnspod.com/ncr).#Usagefrom pydnspodint import pydnspodint### user info ###
email = ‘’
password = ‘’### cookie ###
api = pydnspodint.Api(email, password)
cookie = api.get_cookie()### domain ###
domain = pydnspodint.Domain(email, password, cookie=cookie)
print domain.list()
Package: pydnst
pydnstDNS Tunneling client and server in PythonINSTALLATIONpip3 install pydnstFor convenience the client, server, and c2 are in the same package, however the "rich" dependency is only used by the c2 module.FEATURESpydnst is a DNS tunneling implementation in Python, supporting Linux only (the client might require a few paths tweaks to run on Windows).A simple rich interface on the server side enables to send commands to specific clients, and watch the responses in real-time.The client sends keep-alive requests every 30 seconds. If the server has a command to send to a specific client, it sends it in response to a keep-alive. Then the client sends other queries containing the command response.The server can manage up to 250 clients, communication is encrypted with a unique Fernet key per client, generated on the fly and shared using RSA encryption.The client being implemented in Python is not stealth, and intentionally exposes its hostname in clear text (you can tweak that).SET UPFirst acquire access to a machine with a public IP, this is where the pydnst server will run.Then acquire a DNS name, as short as possible, and configure its nameservers with glue records pointing to your public IP.You can then configure your pydnst.toml field DNST_SERVER_NAME, and run pydnst server on your public machine, and pydnst client on your victim machine.Of course you can also experiment with it in a local environment similarly configured.USAGEInstall the pydnst package on client and serverpip3 install pydnst
python3 -m pydnst --helpGenerate certificates (recommended), to encrypt the shared key transfer between client and serverThis creates server_private.pem (copy to server) and server_public.pem (copy to client).
After copying server_private.pem to server, don't forget to chmod 600.python3 -m pydnst create_certificatesGenerate configurationThis creates pydnst.toml : edit if needed and then copy to client and server.On client, edit the MAIN_INTERFACE to use the DNS server of this interface, or DNS_SERVER_ADDRESS to circumvent it.On server, edit the LISTENING_INTERFACE.On both, specify the DNST_SERVER_NAME (the DNS name purchased).python3 -m pydnst configOn serverIn one terminal, run the server (pydnst.toml must be in the current directory) :Logs are under pydnst.logpython3 -m pydnst server runIn another terminal, run the c2 commander (pydnst.toml must be in the current directory), which enables to send commands and watch responses in real-time.python3 -m pydnst server c2On clientIn one terminal, run the client (pydnst.toml must be in the current directory) :Logs are under pydnst.logpython3 -m pydnst client run
Package: py-do
Pydopydois a free software command line task manager built inPython.Why another CLI Task Manager?Taskwarriorhas been the gold standard for CLI task
managers so far. However, It has the following inconveniences:It uses a plaintext file as data storage.It stores the data in a non standard way in different files.It's written in C, which I don't speak.It's development has come tocode maintenance
only.There are many issues with how it handlesrecurrence.It doesn't havefriendly task
identifiers.There is no way of accessing the task time tracking from the python library.And lacks the following features:Native Kanban or Scrum support.Task estimations.Easy report creation.Easy way to manage the split of a task in subtasks.Freezing of recurrent tasks.Most of the above points can be addressed through theTaskwarrior plugin
systemorudas, but sometimes it's difficult to
access the data or as the database grows, the performance drops so quick that it
makes them unusable.taskliteis a promising project that tackles most of the
points above. But as it's written inHaskel,
I won't be able to add support for the features I need.A quick demonstrationLet's seepydoin action. We'll first add three tasks to our list.$:pydoaddBuymilk[+]Addedtask0:Buymilk
$:pydoaddBuyeggs[+]Addedtask1:Buyeggs
$:pydoaddBakecake[+]Addedtask2:BakecakeNow let's see the list.$:pydolist╷ID│Description
╺━━━━┿━━━━━━━━━━━━━╸0│Buymilk1│Buyeggs2│Bakecake╵Suppose we bought our ingredients and wish to mark the first two tasks as done.$:pydodo01[+]Closedtask0:Buymilkwithstatedone[+]Closedtask1:Buyeggswithstatedone$:pydolist╷ID│Description
╺━━━━┿━━━━━━━━━━━━━╸2│Bakecake╵Those are the first three features, theadd,listanddonecommands, but
they represent all you need to know, to get started withpydo.But there are hundreds of other features, so if you learn more, you can do more.
It's entirely up to you to choose how you usepydo. Stick to the
three commands above, or learn about sophisticated agile support, custom reports,
user defined metadata and more.InstallTo install pydo, run:pipinstallpy-doThe installation method will create a new pydo database at~/.local/share/pydo/database.tinydb.pydoreads it's configuration from the yaml file located at~/.local/share/pydo/config.yaml. Thedefault
templateis
provided at installation time.What's next?Probably the most important next step is to start usingpydo.
Capture your tasks, don't try to remember them. Review your task list to keep it
current. Consult your task list to guide your actions. Develop the habit.It doesn't take long until you realize that you might want to change your
workflow. Perhaps you are missing due dates, and need more defined deadlines.
Perhaps you need to make greater use of tags to help you filter tasks
differently. You'll know if your workflow is not helping you as much as it
could.This is when you might look closer at thedocsand the recommended Best Practices.If you want to contribute to the project followthis
guidelines.Welcome topydo.
Package: pydoa
PyDoAA Python Package for Processing and Visualizing DoA (Direction of Arrival) data from Group DiscussionPyDoA is a python package aiming at simplifying processing the DoA (Direction of Arrival) data captured from microphone arrays. DoA data contains direction of sound arrival which in the case of circular array varies from 0 to 360 degrees.InstallationYou can install PyDoA using pip::pip install pydoaTo install the latest developer version of PyDoA you can type::git clone https://github.com/pankajchejara23/pydoa.git
    cd pydoa
    python setup.py installYou may need to add the--useroption to the last lineif you do not have root access <https://docs.python.org/2/install/#alternate-installation-the-user-scheme>_.
You can also install the latest developer version in a single line with pip::pip install git+https://github.com/pankajchejara23/pydoa.gitDependenciesrequestspandasnetworkxscipydashnumpymatplotlibdash-bootstrap-componentsdash-cytoscapeFull Documentationhttps://pydoa.readthedocs.ioLicenseMIT LicenseCopyright (c) 2020 Pankaj ChejaraPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: pydoas
pydoas is a Python library for reading, postprocessing and plotting of DOAS (Differential Optical Absorption Spectroscopy) fit results.
It supports default import of the result file format ofDOASIS. Further import formats for fast data access can easily be defined by the user.News18 Feb 2018: now also supports Python3CopyrightCopyright (C) 2017 Jonas Gliss (jonasgliss@gmail.com)This program is free software: you can redistribute it and/or modify it under the terms of the BSD 3-Clause LicenseThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See BSD 3-Clause License for more details (https://opensource.org/licenses/BSD-3-Clause)RequirementsnumpymatplotlibpandasInstallationFirst, make sure to have all requirements installed (prev. section). Then, pydoas can be installed fromPyPiusing:pip install pydoasor from source (hosted on GitHub) bydownloading and extracting the latest releaseor downloading / cloning the repo. If you download manually, call:python setup.py installafter download and extraction of the source directory.Instructions and code documentationThe code documentation of pydoas is hostedhereGetting startedAfter installation try running theexample scriptsin order to test the installation. The scripts are also meant to provide an easy start into the main features of pydoas.
Package: pydoautomator
pydoautomatorThe Digital Ocean python automation libInstallpip install pydoautomatorSimple as thatfrompydoautomatorimportAutomator,Dropletdigital_ocean_token='my-digital-ocean-api-token'aut=Automator(digital_ocean_token)droplet_data={"name":"t1.techno24x7.com","region":"nyc1","size":"s-8vcpu-16gb","image":68259296,# snapshot id"ssh_keys":[27410347,27608055,27590881],"private_networking":True,"vpc_uuid":"47e5c00a-2b23-4dac-bed4-0e44659941f3","monitoring":True"tags":["tests"]}droplet=Droplet(**droplet_data)aut.create_droplet_from_snapshot(droplet)Assign floating ip to dropletdroplet_id=152412424floating_ip='164.90.252.72'action_status=aut.assign_floating_ip_to_droplet(floating_ip,droplet_id)ifaction_status=='completed':print('floating_ip assigned to droplet!')Create droplet and assign floating ip as soon as droplet createddigital_ocean_token='my-super-cool-digital-ocean-api-token'aut=Automator(digital_ocean_token)droplet_data={"name":"t1.techno24x7.com","region":"nyc1","size":"s-8vcpu-16gb","image":70649304,# snapshot id"ssh_keys":[27410347,27608055,27590881],"private_networking":True,"vpc_uuid":"47e5c00a-2b23-4dac-bed4-0e44659941f3","monitoring":True}droplet=Droplet(**droplet_data)droplet_id=aut.create_droplet_from_snapshot(droplet)floating_ip='164.90.252.72'action_status=aut.assign_floating_ip_to_droplet(floating_ip,droplet_id)ifaction_status=='completed':print('floating_ip assigned to droplet!')Shutdown / turnoff dropletdroplet_id=123456aut.turnoff_droplet(droplet_id)Destroy droplet by iddroplet_id=123456aut.destroy_droplet(droplet_id)Get all dropletsdroplets_list=aut.get_all_droplets(droplet_id)
Package: pydob
PyJsonDBHow to use it?importpydobasdbCreate a tabletable=db.PyDOB("table_name")# set the different fieldstable.set_fields(["name","age","etc"])adding itemtable.add(["pyjsondb",13,"python"])Remove itemtable.remove_by_id(1)# filteringdelete_item=table.filter_by({"age":13})table.delete(delete_item)
Package: pydobiss
pydobiss Module Repositorypydobissdobissapi is a python library that allows you to usedobiss's api.InstallpipinstallpydobissExampleimportasyncioimportaiohttpimportloggingfromtimeimportsleepimportdobissapi#dobissapi.logger.setLevel(logging.DEBUG)secret='secret'host='my_host'secure=Falsedobiss=dobissapi.DobissAPI(secret,host,secure)asyncdefmain():ifnotawaitdobiss.auth_check():print("Error authenticating dobiss")returnprint("authenticated dobiss")asyncio.get_event_loop().create_task(dobiss.dobiss_monitor())entities=awaitdobiss.discovery()awaitdobiss.update_all()# check if caching worksentities=awaitdobiss.discovery()# list scenariosscenarios=dobiss.get_devices_by_type(dobissapi.DobissScenario)foreinscenarios:print("{}:{}".format(e.object_id,e.json))# see if there are any buddiesdeftest_covers(entities):foreinentities:ife.buddy:print(f"buddies found:{e.name}--> buddy{e.buddy.name}")test_covers(entities)defget_entity(entities,name):foreinentities:ife.name==name:returne# test updating and changing entitiesawaitget_entity(entities,"Mancave").update()awaitget_entity(entities,"Mancave").toggle()awaitasyncio.sleep(2)awaitget_entity(entities,"Mancave").toggle()# test callbacksdefmy_callback():print("callback happened")get_entity(entities,"Mancave").register_callback(my_callback)awaitasyncio.sleep(2)awaitget_entity(entities,"Mancave").turn_on()awaitasyncio.sleep(2)awaitget_entity(entities,"Mancave").turn_off()# check if new discovery works fine with old callbackawaitasyncio.sleep(60)entities=awaitdobiss.discovery()awaitasyncio.sleep(2)awaitget_entity(entities,"Mancave").turn_on()awaitasyncio.sleep(2)awaitget_entity(entities,"Mancave").turn_off()try:loop=asyncio.get_event_loop()loop.create_task(main())loop.run_forever()exceptKeyboardInterrupt:print("Exiting")AuthorKester (kesteraernoudt@yahoo.com)
Package: pydobot
Python library for Dobot MagicianBased on Communication Protocol V1.1.4 (latest versionhere)InstallationInstall driver fromhttps://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers.pip install pydobotExamplefromserial.toolsimportlist_portsimportpydobotavailable_ports=list_ports.comports()print(f'available ports:{[x.deviceforxinavailable_ports]}')port=available_ports[0].devicedevice=pydobot.Dobot(port=port,verbose=True)(x,y,z,r,j1,j2,j3,j4)=device.pose()print(f'x:{x}y:{y}z:{z}j1:{j1}j2:{j2}j3:{j3}j4:{j4}')device.move_to(x+20,y,z,r,wait=False)device.move_to(x,y,z,r,wait=True)# we wait until this movement is done before continuingdevice.close()MethodsDobot(port, verbose=False)Creates an instance of dobot connected to given serial port.port:stringwith name of serial port to connectverbose:boolwill print to console all serial comms.pose()Returns the current pose of dobot, as a tuple (x, y, z, r, j1, j2, j3, j4)x:floatcurrent x cartesian coordinatey:floatcurrent y cartesian coordinatez:floatcurrent z cartesian coordinater:floatcurrent effector rotationj1:floatcurrent joint 1 anglej2:floatcurrent joint 2 anglej3:floatcurrent joint 3 anglej4:floatcurrent joint 4 angle.move_to(x, y, z, r, wait=False)queues a translation in dobot to given coordinatesx:floatx cartesian coordinate to movey:floaty cartesian coordinate to movez:floatz cartesian coordinate to mover:floatr effector rotationwait:boolwaits until command has been executed to return to process.speed(velocity, acceleration)changes velocity and acceleration at which the dobot moves to future coordinatesvelocity:floatdesired translation velocityacceleration:floatdesired translation acceleration.suck(enable)enable:boolenables/disables suction.grip(enable)enable:boolenables/disables gripper.wait(ms)adds a waiting period to the internal queue of messagesms:intnumber of milliseconds to wait
Package: pydobot2
Python library for Dobot MagicianBased on Communication Protocol V1.1.4 (latest versionhere)InstallationInstall driver fromhttps://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers.pip install pydobotExamplefromserial.toolsimportlist_portsfrompydobotimportDobotport=list_ports.comports()[0].devicedevice=Dobot(port=port)pose=device.get_pose()print(pose)position=pose.positiondevice.move_to(position.x+20,position.y,position.z,position.r,wait=False)device.move_to(position.x,position.y,position.z,position.r,wait=True)# we wait until this movement is done before continuingdevice.close()MethodsDobot(port, verbose=False)Creates an instance of dobot connected to given serial port.port:stringwith name of serial port to connectverbose:boolwill print to console all serial comms.pose()Returns the current pose of dobot, as a tuple (x, y, z, r, j1, j2, j3, j4)x:floatcurrent x cartesian coordinatey:floatcurrent y cartesian coordinatez:floatcurrent z cartesian coordinater:floatcurrent effector rotationj1:floatcurrent joint 1 anglej2:floatcurrent joint 2 anglej3:floatcurrent joint 3 anglej4:floatcurrent joint 4 angle.move_to(x, y, z, r, wait=False)queues a translation in dobot to given coordinatesx:floatx cartesian coordinate to movey:floaty cartesian coordinate to movez:floatz cartesian coordinate to mover:floatr effector rotationwait:boolwaits until command has been executed to return to process.speed(velocity, acceleration)changes velocity and acceleration at which the dobot moves to future coordinatesvelocity:floatdesired translation velocityacceleration:floatdesired translation acceleration.suck(enable)enable:boolenables/disables suction.grip(enable)enable:boolenables/disables gripper
Package: py-doc
PyDocA library for interacting with pdf documents.Installationpip install py-docGet StartedHow to use the library:frompy_docimportImage# Instantiate a Document objectimage=Image('path/to/image.jpg')# Use draw_classifications to find document classificationsimage.draw_classifications("outupt.jpg")# Additionally, if you just want the bounding boxes use get_bounding_box()image.get_bboxes()To do optical character recognition (OCR), you will need to installTesseracton your machine and make sure it is added to your PATH. If you don't need OCR, you can skip this step.frompy_docimportImageimage=Image('path/to/image.jpg')# Use get_text() to get all the text from the imageprint(image.get_text())# Use get_text_from_bbox() to get text from a specific bounding boxbbox=image.get_bboxes()[0]print(image.get_text_from_bbox(bbox))DocumentationThe documentation for this library can be foundhere.ExamplesThis image is a sample of the output of the draw_classifications() method. The bounding boxes are drawn around the document classifications.ContributingRun the following instructions after pushing to the repo:make html (update documentation - need to be in docs directory)update version in setup.pypython setup.py sdist bdist_wheel (builds the package)delete previous versions in dist foldertwine check dist/* (checks the package)twine upload dist/* (uploads the package to PyPi)
Package: pydoc2md
pydoc2mdinspired byhttps://github.com/gbowerman/py2mdpydoc2mdis lightweight python application that generates markdown (.md) files from a repository of.py. The idea is to easily generate bare bones documentation for a python project by providing a list of all classes and functions, each with their docstring.A.mdfile is generated for each.pyin the input didirectoryrection or in its subfolders.
This.mdfile includes all class/functions defined in the.pywith a brief description. The result is something that looks like this:RoadmapThis package is currently under development, bugs and breaking changes are almost garuanteed.
Features that will be added soon:output folder structure: option to save the outputmdin a folder structure mirroring that of the input packageoverall table of content: table of content with an overview of all.mdfiles and how they're organised> suggest new features you'd like to see added?Usageusing pydoc2mdis very simple. From the command line:pydoc2md project/path output/pathFor instance, the.mdfiles inDocswhere generated withpydoc2md Github/pydoc2md/pydoc2md Github/pydoc2md/DocsInstallationCurrently you can isntall  with:pip install git+https://github.com/FedeClaudi/pydoc2md.gitthough a pip installable version will be released when the project is more mature.