Saravanan666/pypi-org huggingface dataset:
Package: ddexreader
This project allows you to read DDEX files into friendly Python data types. XML files are decoded using the PyXB
library.Keep in mind that this is a fairly low level library that only aims at making DDEX files easier to read using Python. Some DDEX data structures expose lists containing only one element, and some value like UpdateIndicator are not cast as booleans.Free software: MIT licenseDocumentation:https://ddexreader.readthedocs.org.Repository:https://github.com/Trax-air/ddexreaderFeaturesOpen an XML file into a DDEX data structure generated by pyxb corresponding to the DDEX version.Parse this DDEX data structure into a Python dict.Supported DDEX versions3.1.23.2 (untested)3.33.43.4.13.53.5.13.6Version 3.7 is causing issues with PyXB.Quickstartfrom ddexreader import open_ddex, ddex_to_dict

xml_path = '/path/to/my/ddex_file.xml'
ddex = open_ddex(xml_path)
ddex_dict = ddex_to_dict(ddex)How to add more DDEX definitionsAfter installing pyxb on your (unix) system, enter:pyxbgen -u [the url to the definition file]History0.1.1 (2015-09-14)Added support for ERN 3.1.20.1.0 (2015-01-11)First release on PyPI.
Package: ddf
This app provides features a form class dynamic, both on the client and server
side. For example if you want a field to be remove if another field has a
particular value or to filter choices based on a set conditions. Thedemois automatically updated when a commit istestedon master.Pypy, Python 2.7, 3.4, Django 1.8+ are supported.ExampleFor example, if your form should allow support only if linux is
selected:fromddfimportshortcutsasddfclassTestForm(ddf.FormMixin,forms.Form):platform=forms.ChoiceField(choices=(('Linux','Linux'),('Windows','Windows'),))service=forms.ChoiceField(choices=(('Format','Format'),('Support','Support')))# Remove the 'Support' choice from the 'service' field if 'platform'# value is 'Windows':_ddf=dict(service=[ddf.RemoveChoices(['Support'],ddf.ValueIs('platform','Windows'),)])In this example, we create a configuration field and add the RemoveChoices
action to the service field, with the condition that the platform field value
is Windows.The configuration field is able to render the configuration as a JSON dict,
with the form prefix it’s being rendered with. Then, the equivalent of each
Action and Condition objects are instanciated in JavaScript, allowing dynamic
user experience.A configuration is structured as such: for each field, you may add a list of
actions, for each action a list of conditions. When the user changes a field,
each action’s conditions are evaluated and if they all pass then the action is
applied, otherwise it is unapplied. Possibilities are huge here.Dual-licenseIt is released with the Creative Commons Attribution-NonCommercial 3.0 Unported
License, but a commercial license is available, please get in touch my username
@ yourlabs.org if you are interrested.Note that the money goes to YourLabs, a non-profit foundation to promote the
role of hackers in the process of making our society more fair and free, while
using their skills to develop local economy and give internet back to the
people.StatusThe project is pretty young, but the basic building blocks are there. We should
be able to add actions and conditions easily.WhyWe’ve been inventing this over and over again for years. Thefirst time I
invented this was in 2009and
honnestly my python, django and javascript skills were pretty weak back then.
Since then, I’ve seen users asking this, paying me as a consultant for this,
makingpull requests to have this in a per-app basis. It’s about
time we have a generic solution that works for all kinds of fields, and not
just the ones of the apps we maintain.
Package: ddfasdf4325-myproject
Make sure you have upgraded version of pipWindowspy -m pip install --upgrade pipLinux/MAC OSpython3 -m pip install --upgrade pipCreate a project with the following structurepackaging_tutorial/
├── LICENSE
├── pyproject.toml
├── README.md
├── setup.cfg
├── src/
│   └── example_package/
│       ├── __init__.py
│       └── example.py
└── tests/
touch LICENSE
touch pyproject.toml
touch setup.cfg
mkdir src/mypackage
touch src/mypackage/__init__.py
touch src/mypackage/main.py
mkdir testspyproject.tomlThis file tells tools like pip and build how to create your project[build-system]
requires = [
    "setuptools>=42",
    "wheel"
]
build-backend = "setuptools.build_meta"build-system.requires gives a list of packages that are needed to build your package. Listing something here will only make it available during the build, not after it is installed.build-system.build-backend is the name of Python object that will be used to perform the build. If you were to use a different build system, such as flit or poetry, those would go here, and the configuration details would be completely different than the setuptools configuration described below.Setup.cfg setupUsing setup.cfg is a best practice, but you could have a dynamic setup file using setup.py[metadata]
name = example-pkg-YOUR-USERNAME-HERE
version = 0.0.1
author = Example Author
author_email = author@example.com
description = A small example package
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/pypa/sampleproject
project_urls =
    Bug Tracker = https://github.com/pypa/sampleproject/issues
classifiers =
    Programming Language :: Python :: 3
    License :: OSI Approved :: MIT License
    Operating System :: OS Independent

[options]
package_dir =
    = src
packages = find:
python_requires = >=3.6

[options.packages.find]
where = srcRunning the buildMake sure your build tool is up to dateWindowspy -m pip install --upgrade buildLinux/MAC OSpython3 -m pip install --upgrade buildCreate the buildpy -m buildReferenceshttps://packaging.python.org/tutorials/packaging-projects/
Package: ddfirmware
ddfirmwareWhat is ddfirmware?ddfirmware is a simple script for terminal use.  It queries dd-wrt.com for router firmware based on user input and writes it to the present working directory.System Requirementspython3python requests package (pip install requests)Installationpip install ddfirmwareUsageTo use ddfirmware:Basic / Current Dayddfirmware [router]Example: ddfirmware r7000; uses fuzzy regex match* Lists all routers that match [router] and prompts user to choose
* Prints contents of present working directory
* Prompts user to confirm they wish to download available binary
Package: ddfr
DDFR - Dangling Domains FinderA lightweight Python utility to detect dns records that are suspected as dangling.DescriptionDo you have a large cloud environment with many services and VMs?
Then probably some of your domain names are pointing to unclaimed IP addresses due to improper deprecation of services/VMs.DDFR to the rescue!Basically, the tool gets a list of your DNS records and checks if the pointed IPs belongs to your cloud accounts.Behind the scenesYou provide DDFR with a list of your DNS records(see Usage section).You provide DDFR with a list of all your registered cloud IPs in one of the following ways:Allow DDFR toautomatically collectall of your registered IPs from Palo Alto's Prisma Cloud product.Manually providea file with your registered cloud IPs.DDFR compares the lists to see if there are domains pointing to IPs not owned by you and thereforesuspected as dangling.NOTE:DDFR also provides you with a mechanism to reduce false positives, read more about it below.DDFR generates a report of the suspected DNS records.InstallationPrerequisites[Optional] To pull records from Prisma Cloud, fill in the required environment variables:exportPRISMA_API_KEYID=your-value-hereexportPRISMA_API_SECRET=your-value-hereexportPRISMA_URL=your-value-herePIP (recommended)pipinstallddfrManualgitclonehttps://github.com/playtika/DDFR.gitcdDDFR
pipinstall.Recommended Python VersionDDFR was developed and tested only withPython3.UsageShort FormLong FormDescription-d--domainsFull path to a file contains your DNS records-i--ipsFull path to a file contains your owned ips (if non-existent will pull from prisma)-cn--ssl-common-namesFull path to a file contains key words that should appear in your CNs (for reducing false positives)-r--rangesFull path to a file contains AWS ip ranges-o--outputFull path to output directoryDomains file needs to be in the following format (JSON):[{"name":"domain name","record_type":"DNS type (CNAME,A)","record_value":"value (ip,ec2 domain name)"}]Usage ExamplesPull ips form prismaddfr -d "domains.json" -r "aws-ranges.txt" -cn "common-names.txt"Receive ips from a fileddfr -d "domains.json" -r "aws-ranges.txt" -cn "common-names.txt" -i "my-ips.txt"The Motivation for Creating DDFRSubdomains takeovers have become a popular technique used by attackers and bug bounty hunters.DNS records that points to unclaimed IP addresses is a specific use case of this attack that is pretty hard to catch
(for both blue and red teams).As a red-teamer, this kind of takeovers are hard to find as they require many resources to perform a successful attack
(bruteforcing VMs IP addresses attached by the cloud providers) and reverse DNS lookup.As a blue-teamer, companies nowadays have thousands of DNS records which makes it extremely hard to find manually.By being able to pull your company's DNS records from your DNS management system be it AWS Route53 or any other,
you can proactively look for those dangling records with this tool and mitigate these takeovers.RoadmapAutomate AWS ranges fetchingSupport for more cloud providersContributingFeel free to fork the repository and submit pull-requests.License
Package: ddg
Duck Duck Gozero-click api for your command-lineInstall$ pip install ddgor from the source:$ python setup.py installUsageddg [-h] [-b] [-d] [-j] [-l] [-s] [-u] [query [query ...]]www.duckduckgo.com zero-click api for your command-linepositional arguments:query         the search queryoptional arguments:-h,--helpshow this help message and exit-b,--bangopen the !bang redirect url in a new browser tab-d,--definereturn the definition result-j,--jsonreturn the zero-click info api json response-l,--luckyopen the result url in a new browser tab-s,--searchlaunch a DuckDuckGo search in a new browser tab-u,--urlreturn the result urlExamplesCall ddg from your command line to access theDuck Duck Go Zero-Click Info API$ddg red-black tree
A red–black tree is a type of self-balancing binary search tree, a data structure
used in computer science, typically used to implement associative arrays.Get the url of the answer source$ ddg red-black tree -u
https://en.wikipedia.org/wiki/Red-black_treeCombinining flags behaves as expected$ ddg schnauzer -d -u
http://www.merriam-webster.com/dictionary/schnauzerLaunch a!Bang redirectin your web browser with the-bflagLaunch a query onWolfram Alpha$ ddg wa integral of sin x / x from negative inf to inf -bLaunch a search onStack Overflow$ ddg so [c++11] lambda return values -bLaunch asearch on Duck Duck Gowith-s$ ddg Lord of the Rings -sLaunch theresult urldirectly with-l$ ddg python webbrowser -lddg plays nice with other utilities in your shell$ echo "shark" | ddg -dl$ ddg welsh corgi -u | pbcopy$ ls | ddg -duUse-jto output thejson responsefrom the API$ ddg simpsons characters -j >> file.txtThanksThe duckduckgo module is a modification fromhttp://github.com/crazedpsyc/python-duckduckgo.Original duckduckgo module source fromhttp://github.com/mikejs/python-duckduckgo(outdated)Release history0.2.2 (2012-12-20)Fixed the error handling for printing results with special characters0.2.1 (2012-12-18)When an exception is raised in the duckduckgo module, report the error
and then return None. This allows ddg.py to continue to the next query
rather than performing a sys.exit(1).Updated READMEFixed formatting in LICENSE fileChanged CHANGES to an rst fileUpdated the setup.py fileUpdated the help for all the input arguments0.2.0 (2012-12-17)Changed the behavior of the -d flag. Rather than prefixing the query withdefine, now just prioritize the definition result when searching for an
answer to the query.Updated README with more examples.0.1.7 (2012-12-16)Added a new trove classifier and made code more PEP8 compliant0.1.6 (2012-12-16)Fixed an issue with the -b prefix, please upgrade to the latest version
with pip install –upgrade ddg0.1.5 (2012-12-15)Updated license to MIT0.1.4 (2012-12-15)Using webbrowser rather than os dependent Popen commands0.1.1 (2012-12-15)First working version, initial release
Package: ddg3
ddg3A Python library for querying the Duck Duck Go API.Copyright Michael Stephensme@mikej.st, released under a BSD-style
license.Updated for Python3 by Jacobi Petruccianijacobi@mimirhq.comSource:https://github.com/jpetrucciani/python-duckduckgoInstallationTo install runpip install ddg3orpython setup.py installUsageimportddg3r=ddg3.query('Duck Duck Go')r.type# 'answer'r.results[0].text# 'Official site'r.results[0].url# '<http://duckduckgo.com/>'r.abstract.url# '<http://en.wikipedia.org/wiki/Duck_Duck_Go>'r.abstract.source# 'Wikipedia'r=ddg3.query('Python')r.type# 'disambiguation'r.related[6].text# 'Python (programming language), a computer programming language'r.related[6].url# '<http://duckduckgo.com/Python_(programming_language)>'r=ddg3.query('1 + 1')r.type# 'nothing'r.answer.text# '1 + 1 = 2'r.answer.type# 'calc'
Package: ddge
DuckDuckGo Email Protection CLIinstall via pip by doingpip install ddgeusage: ddge [-h] [-c CONFIG] {login,logout,generate,aliases,remove} ...

DuckDuckGo Email CLI

options:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        Custom config path.

actions:
  {login,logout,generate,aliases,remove}
    login               Allows you to login using the OTP code and saves the credentials.
    logout              Deletes the locally saved credentials.
    generate            The default action. Generates an alias
    aliases             Lists the created aliases.
    remove              Delete the alias from the local storage.so after logging in you can just run the program to generate a new alias.$ ddge
r5kog234s@duck.com
Package: ddgen
ddgenLibrary of Python utilities that I needed so many times in the pastSelect RefSeq transcript with the highest priorityRefSeq transcripts have following categories:NM_,XM_,NR_,XR_If we have transcripts from multiple sources, we want to select the one coming from the source with highest priority.E.g.NM_has higher priority thanXM_.If we have multiple transcripts from a single source, we want to select the one with smaller integer.E.g.NM_123.4has higher priority thanNM_124.4.fromddgen.utilsimportprioritize_refseq_transcripts# tx will be `NM_123.4`tx=prioritize_refseq_transcripts(['NM_123.4','NM_124.4','XM_100.1'])Get priority forJannovarvariant effectsJannovar assigns one or more effects to a variant. The effects look likeMISSENSE_VARIANT,STOP_GAINED,SPLICE_DONOR_VARIANT,CODING_TRANSCRIPT_VARIANT, etc.The effects are sorted in order of decreasing putative pathogenicity (i.e.CODING_TRANSCRIPT_VARIANTis likely to be less deleterious thanSTOP_GAINEDin general).If the variant affects multiple transcripts, it can have different effects on each of them. In some situations, it might be useful to select and evaluate only the most serious effect.In order to make the selection, we work with concept of variant effectpriority. The lower the number representing the priority, the higher the priority.We can do it by comparing effect priorities:fromddgen.utilsimportget_variant_effect_priority,VARIANT_EFFECT_PRIORITIES# `p` is 21p=get_variant_effect_priority('MISSENSE_VARIANT')# `u` is -1u=get_variant_effect_priority('GIBBERISH')# `p` is 21 againp=VARIANT_EFFECT_PRIORITIES['MISSENSE_VARIANT']Connect to H2 databaseThe H2 database is a pure Java SQL database, hence it is primarily meant to be used with Java.
We can connect to the database from Python, if:Java is installed on the local machinethe local machine runs UNIX-like OS (sorry, Windows users)In that case:fromddgen.dbimportH2DbManagerwithH2DbManager("path/to/database.mv.db",user="sa",password="sa")ash2:withh2.get_connection()asconn:withconn.cursor()ascur:# do whatever you want with the connection/cursorcur.execute('SELECT * FROM DB.TABLE;')fori,xinzip(range(5),cur.fetchall()):# print first 5 linesprint(x)Setup loggingQuick setup of Python built-inlogginglibrary:fromddgen.utilsimportsetup_loggingsetup_logging()
Package: ddg-scraper
Asynchronous and Synchronous DuckDuckGo Search Engine ScraperScrapes theduckduckgosearch engine.Asynchronous Examplefromddg_scraperimportDuckScraperimporttrioduck_scraper=DuckScraper()asyncdefmain():asyncwithduck_scraper.search("python")asresults:asyncforresultinresults:...trio.run(main)Synchronous Examplefromddg_scraperimportDuckScraperduck_scraper=DuckScraper()withduck_scraper.search("python")asresults:forresultinresults:...In both examples,resultisddg_scraper.SearchResultAttributes and Methods ofddg_scraper.SearchResultAttributestitleurlfaviconsnippetHow To InstallUsing pip:pip install ddg-scraperManual:Clone the folder somewhereCD to the locationInstall the packages listed inrequirements.txt(pip install -r requirements.txt)Copy the folder,ddg_scraperwhere you want to use it.
Package: ddh_django_utils
Provides a number of useful utilities for Django projects,
particularly within the context of DDH projects.Paginationddh_utils.utilsprovides thecreate_paginationfunction to
generate Paginator and Page objects from the supplied parameters,
handling any problems with the supplied page number. This just avoids
repeating the example view code from the Django documentation.Theddh_utils_tagstemplate tag library provides thedisplay_paginationinclusion tag, which outputs the navigation for
a set of results, based on the supplied page:{% load ddh_utils_tags %}
{% display_pagination querydict page %}This includes the templateincludes/pagination.html.Haystackddh_utils.viewsprovidesSearchViewandFacetedSearchViewclasses that have better pagination than those in Haystack’s own views
(making use of thecreate_paginationfunction), and also add the
request’s GET parameters to the context (under the variable namequerydict) for use in pagination and facetting.ddh_util_tagsprovides simple tags for creating URLs by adding and
removing facets:{% load ddh_utils_tags %}
<a href="{% add_facet_link querydict name value %}">Add</a>

<a href="{% remove_facet_link querydict "name:value" %}">Remove</a>
Package: ddhi-aggregator
A command-line tool for aggregating various bits of data from
DDHI-encoded Interviews into a set of files that can be ingested by
the DDHI’s Drupal application.DescriptionThere is a single command,ddhi_aggregate, which takes two arguments: a directory of TEI-encoded interviews to be processed, and a directory for the output:ddhi_aggregate -i interviews/ -o aggregated_data/NoteThis project has been set up using PyScaffold 3.2.3. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.
Package: ddhi-encoder
A collection of command-line utilities to assist in the creation of
TEI-encoded oral history interviews for the Dartmouth Digital
History Initiative.InstallationUse pip to install this package:pipinstallddhi-encoderTo peform named-entity tagging withddhi_tag, you will need a Spacy
model. Before runningddhi_tag, install Spacy’s small English model:python-mspacydownloaden_core_web_smSeethe Spacy documentationfor more
information.UseUseddhi_convertto transform a DOCX-encoded transcription into a
simply structured TEI document.ddhi_convert~/Desktop/transcripts/zien_jimmy_transcript_final.docx-otmp.tei.xmlUseddhi_tagto add named-entity tags to a TEI-encoded
transcription:ddhi_tag-ozien.tei.xmltmp.tei.xmlEncoders are then expected to edit the text of the interview,
correcting automatically generated named-entity tags and adding new
ones.Useddhi_generate_standoffto  create a<standOff>element in the
interview and link the entities to names in the text.Useddhi_mentioned_placesto extract the places in a TEI file’s
standoff markup and print it as tab-separated values:ddhi_mentioned_placeslovely.tei.xml>lovely.tsvThen use OpenRefine or another tool to refine this list with
identifiers and other metadata.Useddhi_update_placesto update the places in a TEI file’s
standoff markup with identifiers and geo-coordinates obtained via
OpenRefine or other procedure:ddhi_update_placeslovely.tei.xmllovely_updates.tsv>updated_lovely.tei.xmlSimilarly, useddhi_mentioned_eventsandddhi_update_eventsto
perform the same operations for events.
Package: ddht
Discovery V5 DHTImplementation of the P2P Discoveryv5 ProtocolRead more in thedocumentation on ReadTheDocs.View the change log.QuickstartpipinstallddhtTo run it:ddht--helpwill tell you about the argumentsddhtaccepts. The LOGLEVEL environment
variable can be used to control which log messages are emitted. For example, to suppress
unimportant messages from the Packer you can run:LOGLEVEL=WARNING:ddht.v5.packer.PackerddhtDeveloper SetupIf you would like to hack on ddht, please check out theSnake Charmers
Tactical Manualfor information on how we do:TestingPull RequestsCode StyleDocumentationDevelopment Environment SetupYou can set up your dev environment with:gitclonegit@github.com:ethereum/ddht.gitcdddht
virtualenv-ppython3venv
.venv/bin/activate
pipinstall-e.[dev]Testing SetupDuring development, you might like to have tests run on every file save.Show flake8 errors on file change:# Test flake8when-changed-v-s-r-1ddht/tests/-c"clear; flake8 ddht tests && echo 'flake8 success' || echo 'error'"Run multi-process tests in one command, but without color:# in the project root:pytest--numprocesses=4--looponfail--maxfail=1# the same thing, succinctly:pytest-n4-f--maxfail=1Run in one thread, with color and desktop notifications:cdvenv
ptw--onfail"notify-send -t 5000 'Test failure ⚠⚠⚠⚠⚠' 'python 3 test on ddht failed'"../tests../ddhtRelease setupFor Debian-like systems:apt install pandocTo release a new version:makereleasebump=$$VERSION_PART_TO_BUMP$$How to bumpversionThe version format for this repo is{major}.{minor}.{patch}for stable, and{major}.{minor}.{patch}-{stage}.{devnum}for unstable (stagecan be alpha or beta).To issue the next version in line, specify which part to bump,
likemake release bump=minorormake release bump=devnum. This is typically done from the
master branch, except when releasing a beta (in which case the beta is released from master,
and the previous stable branch is released from said branch).If you are in a beta version,make release bump=stagewill switch to a stable.To issue an unstable version when the current version is stable, specify the
new version explicitly, likemake release bump="--new-version 4.0.0-alpha.1 devnum"
Package: ddict
DotAccessDictDotAccessDict class can handle nested dictionaries with arbitray number
of dicts and lists, nested inside each other.Usage:>>>fromddictimportDotAccessDict>>>d=DotAccessDict()>>>d{}>>>d.person{}>>>d.person.name='Jack'>>>d{'person':{'name':'Jack'}}>>>d['person']['name']'Jack'>>>d['person'].name'Jack'>>>d.person['name']'Jack'>>>joe=dict(name='Joe',age=18)>>>d.person.brothers=[joe,'John','Pat']>>>d.person.brothers[0].age18>>>d.get('person.brothers[1]')'John'>>>d.set('person.brothers[2]','James')>>>d.person.brothers[2]'James'>>>d.flatten(){'person.brothers[0].age':18,'person.brothers[0].name':'Joe','person.brothers[1]':'John','person.brothers[2]':'James','person.name':'Jack'}Similar works:https://github.com/mewwts/addicthttps://github.com/makinacorpus/easydicthttps://github.com/drgrib/dotmap