Saravanan666/pypi-org huggingface dataset:
Package: dompap
The dompap simulation packageThedompappackage focuses on simulations of point-like particles in any dimension with any pair potential.
The package uses NumPy and Numba for efficient calculations and SymPy to implement any pair potentials.
The user is not expected to be familiar with these packages but only basic Python syntax.InstallationUse the Python package index (PyPI)The package can be installed from the Python package index (PyPI) using pip.pipinstalldompapDownload source from GitHubClone the repository from github athttps://github.com/urpedersen/dompap.git(into a working directory of your choice), and add the package to your python path.# Clone repository into some directory (replace [dir])cd[dir]gitclonehttps://github.com/urpedersen/dompap.git# Add to python pathexportPYTHONPATH=$PYTHONPATH:$PWD/dompap# Install requirementspipinstall-r./dompap/requirements.txtUsage examplePython scriptBelow is an example of a 3D system of harmonic repulsive particles with the pair potential
$$v(r) = (1 - r)^2$$
for $r<1$ and zero otherwise. The initial positions are set to a face-centered cubic (fcc) lattice,
with five unit cells in each direction.
The simulation is run for 100 steps (constant $NVT$ with Langevin thermostat), and the potential energy is printed every 10 steps.fromdompapimportSimulation# Initialize simulation objectsim=Simulation()# Setup simulationfcc_unit_cell=([0.0,0.0,0.0],[0.5,0.5,0.0],[0.5,0.0,0.5],[0.0,0.5,0.5])sim.set_positions(unit_cell_coordinates=fcc_unit_cell,cells=(5,5,5),lattice_constants=(1.0,1.0,1.0))sim.set_density(density=1.0)sim.set_masses(masses=1.0)sim.set_random_velocities(temperature=1.0)sim.set_pair_potential(pair_potential_str='(1-r)**2',r_cut=1.0,force_method='neighbor list',energy_method='neighbor list')sim.set_pair_potential_parameters(sigma=1.0,epsilon=1.0)sim.set_neighbor_list(skin=0.7,max_number_of_neighbors=128,method_str='double loop')sim.set_integrator(time_step=0.01,target_temperature=1.0,temperature_damping_time=0.1)# Run simulationsteps=100forstepinrange(steps):sim.step()ifstep%10==0:print(f'Energy after{step}steps:{sim.get_potential_energy()}')This simulation produces the outputEnergy after 0 steps: 0.0
Energy after 10 steps: 3.1573922419447613
Energy after 20 steps: 16.330136084973663
Energy after 30 steps: 31.47341041787513
Energy after 40 steps: 43.913179017390576
Energy after 50 steps: 52.04197939534787
Energy after 60 steps: 57.968309542867964
Energy after 70 steps: 61.752276744879524
Energy after 80 steps: 67.33278804505039
Energy after 90 steps: 72.00507120397305Seeexamplesfor more examples of the capabilities of thedompappackage.Use dompap from the command lineThedompappackage can also be used from the command line limited functionality.
Typedompap --helpfor more information and to see the available options:python3-mdompap--help
Package: do-mpc
Model predictive control python toolboxdo-mpcis a comprehensive open-source toolbox for robustmodel predictive control (MPC)andmoving horizon estimation (MHE).do-mpcenables the efficient formulation and solution of control and estimation problems for nonlinear systems,
including tools to deal with uncertainty and time discretization.
The modular structure ofdo-mpccontains simulation, estimation and control components
that can be easily extended and combined to fit many different applications.In summary,do-mpcoffers the following features:nonlinear and economic model predictive controlsupport for differential algebraic equations (DAE)time discretization with orthogonal collocation on finite elementsrobust multi-stage model predictive controlmoving horizon state and parameter estimationmodular design that can be easily extendedThedo-mpcsoftware is Python based and works therefore on any OS with a Python 3.x distribution.do-mpchas been developed by Sergio Lucia and Alexandru Tatulea at the DYN chair of the TU Dortmund lead by Sebastian Engell. The development is continued at theLaboratory of Process Automation Systems(PAS) of the TU Dortmund by Felix Fiedler and Sergio Lucia.Installation instructionsInstallation instructions are givenhere.DocumentationPlease visit our extensivedocumentation, kindly hosted on readthedocs.Citingdo-mpcIf you usedo-mpcfor published work please cite it as:F. Fiedler, B. Karg, L. Lüken, D. Brandner, M. Heinlein, F. Brabender and S. Lucia. do-mpc: Towards FAIR nonlinear and robust model predictive control. Control Engineering Practice, 140:105676, 2023Please remember to properly cite other software that you might be using too if you usedo-mpc(e.g. CasADi, IPOPT, ...)
Package: dompy-parser
<p align=’center’><img src=”https://raw.githubusercontent.com/Anikeshpatel/dompy/master/docs/assets/logos/Group%205.png” /></p>
<!– # Dompy –>
JavaScript Dom Api for Python, Html Parser and a Web scraping tool in python##### Installation`bash pip installdompy-parser`##### Basic API`python >>> from dompy import Document >>> document =Document.fromURL('https://www.lipsum.com')>>> document.title 'Lorem Ipsum - All the facts - Lipsum generator' >>> elements =document.getElementsByTag('h3')>>> len(elements) 5 >>>elements[0].innerHTML'The standard Lorem Ipsum passage, used since the 1500s' `<!–<center> or </center>–><p align=’center’>or<p>`python >>> from dompy import DompyParser >>> document =DompyParser.parse('<div><h3color="blue"align="center">Abc</h3><h3>Xyz</h3></div>')>>> elements =document.getElementsByTag('h3')>>> len(elements) 2 >>>elements[0].innerHTML'Abc' >>>elements[0].attributes{'color': 'blue', 'align': 'center'} `___#### License
Dompy is GNU GPL v3.0 licensed, as found in the LICENSE file.
Package: dom-query
CSS selector syntax for python minidom and DOM implementations.Short exampleProvided an HTML filesample.htmlthe following code will query
some elements and return them asminidomElements.
In case of multiple elements (select_all) a simple pythonlistis returned (instead of a minidomNodeList).fromxml.dom.minidomimportparsefromdom_queryimportselect,select_alltree=parse("test/html/sample.html")# Title elementtitle=select(tree,"title")# Every P elementparagraphs=select_all(tree,"p")# Element with type P and ID equal to "summary"summary=select(tree,"p#summary")# Every element with class "wide"wide_elements=select_all(tree,".wide")Supported CSS syntaxOnly a subset of CSS syntax is supported:Compound selectors (comma separator),element type and id,classes presence,attributes match (presence and all the other operators),combinators (descendant, sibling, subsequent, child).Some supported selectors:p#abstract[lang|=en]p[data-user="john"]div>p+p,article>p+pscript[type="text/data"]header>liul,footer>liulsectionh1~p,articleh2~pInternals and implementationEvery query is compiled and cached for subsequent use.LexerThe first stage is tokenization (lexer.py lexer) which is loosely
based on theW3C selector lexer.
The differences are mainly to make the tokenizer compatible with
regular expressions and to strip every unnecessary features.ParserThen follows the parsing stage (parser.py parse) which produce a
simple AST from the tokens. The parser is, just like the tokenizer, a
simplified version of the standard one. It is a single function which
implements a descent parser. The AST is a tuple of tuples and maps in
a relatively close way the given query.CompilerThe last stage is the compiler (compiler.py compile). It translates
the AST into a sequence of simple actions to be performed in order to
select the matching elements.
Once compiled it is saved in cache and will be reused whenever the same
query is seen again.Virtual machineThe opcodes are executed by (vm.py execute). This function takes a
starting element, a sequence of opcodes, and anapi.
The api is dict-like object. Every key corresponds to a function which
implements an opcode. The default api isminidom_api.py api.DOM APIEvery function in the api is either a filter (actual filtering of nodes)
or a generator (combinators expansion). The only two opcodes which don’t
follows this rule areYIELD(return elements found so far) andRESET(reload the original element node after a CSS comma).In case of otherdomimplementations itshouldbe sufficient to
write a new api and pass it toexecute(orselect*) upon querying.Code quality and stabilityThe code is far from complete.
It is tested but there are minor issues (attribute match doesn’t follow
the specs verbatim).Feel free to contribute.
Package: domsniff
domsniffis a simple tool to record all positive DNS query results that
follow a regular expression. It can be used, for instance, to collect list of
registered domain names under a TLD that does not publish domain list.Packet capturing generally requires root privileges. You can avoid it by
grantingcap_net_rawcapability to the Python interpreter binary:# setcap cap_net_raw=eip /path/to/python3.5
Package: dom-toml
Dom’s tools for Tom’s Obvious, Minimal Language.DocsTestsPyPIAnacondaActivityQAOtherInstallationdom_tomlcan be installed from PyPI or Anaconda.To install withpip:$python-mpipinstalldom_tomlTo install withconda:First add the required channels$condaconfig--addchannelshttps://conda.anaconda.org/conda-forge$condaconfig--addchannelshttps://conda.anaconda.org/domdfcodingThen install$condainstalldom_toml
Package: domtree
DOM TreeSimple API to create DOM trees in Python.
A bit like JSX, but with native Python syntax.Aims to include useful autocompletion. Currently this works for SVGs.Basic examplefromdomtree.svgimport*print(svg(viewBox="0 0 100 100",xmlns="http://www.w3.org/2000/svg")(circle(cx=50,cy=50,r=50),))# <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">#   <circle cx="50" cy="50" r="50" /># </svg>Generated contentfromdomtree.svgimport*print(svg(circle(x=0,y=i*10,r=2)foriinrange(5)))# <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">#   <circle x="0" y="0" r="2" />#   <circle x="0" y="10" r="2" />#   <circle x="0" y="20" r="2" />#   <circle x="0" y="30" r="2" />#   <circle x="0" y="40" r="2" /># </svg>Custom nodesfromdomtreeimportNodeul=Node("ul")li=Node("li")print(ul(li("First item"),li(className="second")("Second item")))# <ul>#   <li>#     First item#   </li>#   <li class="second">#     Second item#   </li># </ul>Autocomplete
Package: domus
IntroductionMiniscule is a library for flexible YAML-based configuration files, inspired by
Clojure’sAero.ExampleCreate a fileconfig.yamlwith the following contents:server:host:!or[!envHOST,localhost]port:!or[!envPORT,8000]debug:!envDEBUGdatabase:name:my_databaseuser:my_userpassword:!envDB_PASSWORDsecret:!aws/smsecretThen, in Python:fromminisculeimportread_configconfig=read_config('config.yaml')Now,configholds a dictionary with the structure of theconfig.yamlfile, in which the tagged fields have been replaced.
Package: donald
Donald – A fast and simple tasks manager for Asyncio.Donald supports synchronous and asynchronous paradigms. The package is running
coroutines and functions in multi loops. Donald could run periodic tasks and
listen AMQP queues.ContentsRequirementsInstallationQuick StartSchedule tasksRun in productionBug trackerContributingLicenseRequirementspython 3.8+InstallationDonaldshould be installed using pip:pip install donaldWith redis support:pip install donald[redis]Quick StartInit the tasks manager:# Init Donaldmanager=Donald(# Params (default values)# -----------------------# Setup logginglog_level=logging.INFO,log_config=None,# Choose a backend (memory|redis|amqp)# memory - is only recommended for testing/local developmentbackend='memory',# Backend connection params# redis: {'url': 'redis://localhost:6379/0', 'channel': 'donald'}# amqp: {'url': 'amqp://guest:guest@localhost:5672/', 'queue': 'donald', 'exchange': 'donald'}backend_params={},# Tasks worker paramsworker_params={# Max tasks in work'max_tasks':0,# Tasks default params (delay, timeout)'task_defaults':{},# A awaitable function to run on worker start'on_start':None# A awaitable function to run on worker stop'on_stop':None# A awaitable function to run on worker error'on_error':None},)# Wrap a function to task@manager.taskasyncdefmyfunc(*args,**kwargs):# Do some job here# Start the manager somewhere (on app start for example)awaitmanager.start()# you may run a worker in the same process# not recommended for productionworker=manager.create_worker()worker.start()# ...# Submit the task to workersmyfunc.submit(*args,**kwargs)# ...# Stop the manager when you needawaitworker.stop()awaitmanager.stop()Schedule tasks@tasks.schedule('*/5 * * * *')# Supports cron expressions, number of seconds, timedelta@tasks.taskasyncdefmyfunc(*args,**kwargs):"""Run every 5 minutes"""# Do some job here# you may run a scheduler in the same process# not recommended for productionmanager.scheduler.start()# ...# Stop the scheduler before stop the tasks managermanager.scheduler.stop()Run in productionCreate a tasks manager somewhere in your apptasks.py:manager=Donald(backend='amqp')# Setup your tasks and schedules.# See the Quick Start section for details.Run a worker in a separate process:$donald-Mtasks.managerworkerRun a scheduler (if you need) in a separate process:$donald-Mtasks.managerschedulerBug trackerIf you have any suggestions, bug reports or
annoyances please report them to the issue tracker
athttps://github.com/klen/donald/issuesContributingDevelopment of starter happens at github:https://github.com/klen/donaldLicenseLicensed under aMIT license.
Package: donatello
Donatello.py🐍 Unofficial Python wrapper for working with the API of the Ukrainian service for donationsDonatelloGitHub|PyPI|Discord serverQuickstartBefore you start, you need to take a couple of stepsFirst you need to create a Donatello token and enable the API functionality, all this can be done in your account on the API pageYou need to install the library viapip install donatelloGet me as UserIf you need to get information about the user with which you authenticated through a token, then this can be done through the convenientget_me()methodfromdonatelloimportDonatellotoken="<YOUR TOKEN HERE>"client=Donatello(token)me=client.get_me()# Print your account nicknameprint(me.nickname)Get donationsYou may need to get a list of your donations, and there is aget_donates()method specifically for this, which will return you a convenient list of themfromdonatelloimportDonatellotoken="<YOUR TOKEN HERE>"client=Donatello(token)donates=client.get_donates(size=5)# "size = 5" - Get 5 last donatesfordonateindonates:print(f"{donate.client_name}:{donate.message}")Get top donatorsYou can get top donators using theget_clients()methodfromdonatelloimportDonatellotoken="<YOUR TOKEN HERE>"client=Donatello(token)donators=client.get_clients()fordonatorindonators:print(f"{donator.client_name}:{donator.total_amount}")In futureAdd async API driverAdd docsLongpolling / Events
Package: donatello-py
🐍 Python wrapper for the Donatello API.✨ FeaturesFull type hintsClient infoGet donatesGet clientsLong pollingAsync support🔗 Installationpipinstalldonatello-pyFor speedup:pipinstalldonatello-py[speed]🧑‍🏭 Basic UsageGet and activate your API keyhere.⛓️ SyncfromdonatelloimportDonatelloclient=Donatello("YOUR_API_KEY")# Get client infoprint(client.get_me())# Get donatesprint(client.get_donates(page=0,per_page=00))# Get clientsprint(client.get_clients())⛓️ AsyncfromdonatelloimportAsyncDonatelloclient=AsyncDonatello("YOUR_API_KEY")asyncdefmain():print(awaitclient.get_me())print(awaitclient.get_donates(page=0,per_page=00))print(awaitclient.get_clients())asyncio.run(main())🥏 Long pollingFor use long polling you need to create widgethereand get widget id from url.Example url:https://donatello.to/widget/<WIDGET_ID>/token/<YOUR_API_KEY>Code example⛓️ SyncfromdonatelloimportDonatellofromdonatello.modelsimportDonate,Userclient=Donatello("YOUR_API_KEY","WIDGET_ID")@client.on_readydefstart(user:User):print(f"Started with user{user.nickname}")print(f"Donates Amount:{user.donates.total_amount}")print(f"Donates count:{user.donates.total_count}")@client.on_donatedefdonate(donate:Donate):print(donate)client.start()⛓️ AsyncfromdonatelloimportAsyncDonatellofromdonatello.modelsimportDonate,Userclient=AsyncDonatello("YOUR_API_KEY","WIDGET_ID")@client.on_donateasyncdefdonate(donate):print(f"Donator:{donate.nickname}")print(f"Amount:{donate.amount}{donate.currency}/{donate.goal_amount}{donate.goal_currency}")print(f"Message:{donate.message}")@client.on_readyasyncdefready(user):print(user)client.start()📚 DocsYou can find docshere.📝 ExamplesYou can find more exampleshere.📄 LicenseMIT📋 TODOAdd more examplesAdd docsAdd testsWebsocket based long pollingGoal, Top, interactive widgets?Never🤝 ContributingPull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
Package: donationalerts
Get tokenGet client_id and client_secret -hereimportdonationalertsauth=donationalerts.Authorization("CLIENT_ID","CLIENT_SECRET")auth.start_authorization()Test applicationDonation notiferimportdonationalertsimportwin10toasttoken="YOUR_TOKEN_HERE"donation=donationalerts.DonationAlerts(token)notify=win10toast.ToastNotifier()@donation.handlerdefon_donate(donation_data):notify.show_toast(title=f"{donation_data['username']}donated{donation_data['amount']}{donation_data['currency']}!",msg=donation_data["message"],duration=10)if__name__=="__main__":donation.polling()by @cxldxice with в™Ґ
Package: donbeer
Don-BeerThe user can click on a beer until a donut appears after a random time interval. If the donut gets clicked the game is over.Getting Startedgitclonehttps://github.com/dellumdeus/donbeer.gitcddonbeer
bin/setupPrerequisitesMake sure you got the latest python version installed:https://www.python.org/downloads/Versioning1.0.7
Package: donb-gallery
TODO : write an example of usage (MyGalery(options...))The object can have:- thumbnail_path function, returning a path to the thumbnail to
be displayed on the cell's background (used by cell_widget).

- actions : tuple (libelle, function) used to create a context menu when clicked on
the cell. A line will be created in the menu, with the text libelle, and function
will be called when the line is clicked (used by cell_widget).
Package: dondacalculator
—Name: dondacalculatorVersion: 0.0.1Description: dondacalculator is a Python package made for performing essential math calculations for everyday use.Supported Actions:AdditionMultiplicationSubtractionDivisionnth root calculationMemory resetPrint out memory—
How to install this package:
1. installing via terminal -pip install dondacalculatorinstalling via IDE -%pip install dondacalculator—
How it works:from calculator import Calculator as calcnew_obj = calc.Calculator()  # New object is created.new_obj.add(15) # Returns 15.0new_obj.subtract(5) # Returns 10.0new_obj.multiply(20) # Returns 200.0new_obj.divide(2) # Returns 100.0new_obj.n_root(2) # Returns 10.0new_obj.return_memory # Returns 10.0new_obj.memory_reset # Resets memory to 0.0—Keywords: calculator, addition, multiplication, subtraction, division, nth rootThis project is licensed under the terms of the MIT license.
Package: donecal
(c) Peter Bengtsson,mail@peterbe.com, 2010
License: BSDAboutThis package makes it easy to use the restful HTTP API onhttp://donecal.com/All you need is yourguidwhich you can pick up onhttp://donecal.com/help/APIonce you have created an account.LimitationsAt the moment there are rate limitations but there might be some time
in the future to ensure fair access for everyone.
Package: donemail
What is it?Donemail sends you an email when some process/command/function/code completes.InstallpipinstalldonemailUsageYou need a SMTP server running on port 25.In the command line:# run command 'sleep 10' and send an email after it exitsdonemailrunbob@example.comsleep10or:# send an email when process with pid 123 exitsdonemailwaitbob@example.com123As a decorator:fromdonemailimportdonemail# send an email after each long_running_function() call@donemail('bob@example.com')deflong_running_function():sleep(10)As a context manager:fromdonemailimportdonemail# send an email after sleep(10) completeswithdonemail('bob@example.com'):sleep(10)
Package: donerkebab
🥙 donerkebab 🥙> A super easy to use, beginner friendly [selenium](https://pypi.org/project/selenium/) wrapper$pipinstalldonerkebabUsage1. Download the driver for your browserChromeEdgeFirefoxSafari2. Place it in a PATH directoryThis might be /usr/bin or the directory as your python script# Also available for Firefox, Edge, Safari and OperafromdonerkebabimportChromeDriver# Get an instance of the browser window# You can easily start it in headless mode toodriver=ChromeDriver(headless=False)driver.open('https://duckduckgo.com/')# Browser will wait at max 10 seconds until element is founddriver.set_timeout(10)# You can find elements by their CSS selectorsinput_box=driver.get_element('input#search_form_input_homepage')# Uses classic selenium element functionsinput_box.send_keys('Do pigs fly?')driver.sleep(2)submit_button=driver.get_element('input#search_button_homepage')# Perform the searchsubmit_button.click()# Get the container of all the result linksresults_container=driver.get_element('div.results--main')# Get all the links inside the container with a class of 'results__a'results=driver.get_elements_in_parent(results_container,'a.result__a')# Print all the linksprint("🔎 Results for 'Do pigs fly?' 🔎")forresultinresults:# get title and href attribute (the link adress) for every resultprint(result.text+' -> '+result.get_attribute('href'))driver.quit()APIDriver init optionsdriver=FirefoxDriver(log=True,executable_path=None,headless=False,page_load_strategy='normal'):headless -> Hides the window and runs the browser in the background. Really usefull
log -> Enable or disable logging
executable_path -> The full path to executable driver. If left null the it will look at the PATH variable to find the driver.
page_load_strategy -> Take a look at the [official docs](https://www.selenium.dev/documentation/webdriver/capabilities/shared/#pageloadstrategy)Locating elementsCss selectorsdonerkebab always uses css selectors for locating elements. Some examples:inputelement with type inputdiv > inputelement that is the direct child of inputinput.searchelement with a class of 'search'input#main_buttonelement with an id of 'main_button'a[href='https://google.com']link element with a href attributeDefinately check out moreadvanced css selectors. They come in really handyLocator methodsdriver.get_element(css_selector)driver.get_elements(css_selector)driver.get_element_in_parent(parent_element,css_selector)driver.get_elements_in_parent(parent_element,css_selector)driver.get_element_by_xpath(xpath)driver.is_element_present(css_selector)# Searches for element without any timeout# Tries the first selector, if none element is found, tries the alternate selector# Great for having backup selectors for elements that might changedriver.get_element_multiple_attempts(selector1,selector2,selector3...)# Returns the active elementdriver.active_element# Scrolls that element into viewdriver.scroll_to_element(element)# Waits until an alert is present, and returns that alertdriver.get_alert()Driver methodsopen(url)Opens the url and waits until the page loads. Url must start with https:// or http://