Saravanan666/pypi-org huggingface dataset:
Package: designer-news
Python client library for theDesigner News API. Inspired by the
officialNodeJS client libraryby LayerVault.InstallUsing Github:git clone git@github.com:getblimp/blimp-python.gitUsing pip:pip install blimpUsing easy_install:easy_install blimpUsageYou can make authenticated requests in two ways.Username and Passwordfrom designer_news import DesignerNews


designer_news = DesignerNews(client_id, client_secret)
designer_news.authenticate(username, password)
designer_news.me()Access TokenThe suggested way for authenticating users in your web applications is
to use OAuth2. This library does not include an oAuth2 client.Read
more.from designer_news import DesignerNews


designer_news = DesignerNews(client_id, client_secret, access_token)
designer_news.me()Available methodsUserdesigner_news.me()Storiesdesigner_news.stories.get(story_id)
designer_news.stories.front_page({'page': 1})
designer_news.stories.recent({'page': 1})
designer_news.stories.search(search_term')
designer_news.stories.upvote(story_id)
designer_news.stories.reply(story_id, comment_message)Commentsdesigner_news.comments.get(comment_id)
designer_news.comments.upvote(comment_id)
designer_news.comments.reply(comment_id, comment_message)MOTDdesigner_news.motd()
designer_news.motd.upvote()
designer_news.motd.downvote()LicenseThe MIT License (MIT)Copyright (c) 2014 José PadillaPermission 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: design-explorer
# design-explorer<div align="center"><!-- Build Status --><a href="https://travis-ci.org/jeremiah-c-leary/design-explorer"><img src="https://img.shields.io/travis/jeremiah-c-leary/design-explorer/master.svg?style=flat-square"alt="Build Status" /></a><!-- Test Coverage --><a href="https://codecov.io/github/jeremiah-c-leary/design-explorer"><img src="https://img.shields.io/codecov/c/github/jeremiah-c-leary/design-explorer/master.svg?style=flat-square"alt="Test Coverage" /></a><!-- Codacy --><a class="badge-align" href="https://www.codacy.com/app/jeremiah-c-leary/design-explorer?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=jeremiah-c-leary/design-explorer&amp;utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/42744dca97544824b93cfc99e8030063"alt="Codacy" /></a><!-- Code Climate --><a href="https://codeclimate.com/github/jeremiah-c-leary/design-explorer/maintainability"><img src="https://api.codeclimate.com/v1/badges/2815689ec945a2f70a24/maintainability"ialt="Code Climate" /></a></div>
Package: designofexperiment
design-of-experimentsA Python Package for Design of ExperimentsMotivationI worked with a research team investigating how Design of Experiments could be applied to Synthetic Biology over the summer of 2020, as part of this I made a general software review and was a little dissapointed at the sparsity of python packages for designing experiments, and what packages were available I found to be considerably inferior to the comercial DOE software like JMP, MODDE, or Minitab. So, I have created this python package to offer an open-source package for the Design of Experiments!Example>>>importdesign>>>Factors={'Height':[1.6,2],'Width':[0.2,0.4],'Depth':[0.2,0.3],'Temp':[10,20],'Pressure':[100,200]}>>>design.Factorial.frac_fact_2level(Factors,10)HeightWidthDepthTempPressure01.60.20.22020011.60.20.32010021.60.40.21020031.60.40.31010042.00.20.21010052.00.20.31020062.00.40.22010072.00.40.320200Installationpip install designofexperiment
Package: design-patterns-WS
Introduction:This is a small python module to design a singleton class python (will add more later on).I have been using python for 2 years and fell in love with it and I would really love to give something (even as small as this module) to the community. If you like it give it a start,hate it tell me why I will try to fix it and you could help too.Design Patterns SupportedSingletonExamplefromdesign_patternsimportsingleton@singletonclassHelloWorld:def__init__(self):self.name="one instance"h=HelloWorld()r=HelloWorld()if__name__=="__main__":print(r==h)
Package: desionterminal
Desiderata on TerminalDesiderata on Terminalis a simple program to print the Desidarata to your terminal to inspire you.Usagefrom desionterminal import desi.desideratadesi = desi.desiderata()print(desi)MIT LicenseCopyright (c) 2022 John GitahiPermission 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: desired-state
# Desired State ConfigurationDesired state configuration allows users to focus on what they
want instead of how to make it so.  This simplifies automation
for domain experts and allows automation experts to make generic
operations that will work for many configurations.# Getting StartedThis repository uses [pipenv](https://pypi.org/project/pipenv/) to manage the dependencies. To install
the dependencies for a development environment run the following commands:pipenv install –devTo load the shell for this environment run these commands:pipenv shellTo install an example collection use this command:ansible-galaxy collection install benthomasson.expectTo run the tests use this command after opening the shell:pytest -v# Code OrganizationThis project uses event driven programming using finite state machines
to provide deterministic and correct behavior.  This allows the project
to react to external events easily.The entry point for the CLI commands is located the [cli.py](desired_state/cli.py) file.Message types between finite state machines are defined in [messages.py](desired_state/messages.py).The reconciliation loop is defined as a finite state machine in
[reconciliation_fsm.py](desired_state/reconciliation_fsm.py)The main monitor process which contains the reconciliation loop is defined
in [monitor.py](desired_state/monitor.py)The generation of playbooks based on the differences between states is defined in [diff.py](desired_state/diff.py).Selection of appropriate change rules based on state diff is defined in [rule.py](desired_state/rule.py)A client/server implementation for injecting desired state into the monitor process is defined
in the [client.py](desired_state/client.py) and [server.py](desired_state/server.py) files.Collection support is defined in [collection.py](desired_state/collection.py).Streaming telemetry is defined in [stream.py](desired_state/stream.py).State schema validation is provided in [validate.py](desired_state/validate.py).History0.1.0 (2020-09-02)First release on PyPI.
Package: desk
Dusty-Evolved-Star-KitThe DESK is an SED-fitting python package for fitting data from evolved stars
(photometry or spectra) with radiative transfer model grids. The package
is currently in development and all contributions are welcomed. For current
progress, see the ‘Issues’ tab on theGithubpage. The package is ideal for
fitting small samples of dusty evolved stars. It will soon utilize a
bayesian-fitting strategy with mass-loss rate and luminosity distributions as
inputs (priors), and will provide a better fit to these broader sample
properties.Input: A csv file with the first column as wavelength in um and second column
as flux in Jy. To fit multiple csv files, put them in a directory, and use the
directory name as the input.Output: A csv file including the best fit model and corresponding
stellar parameters, as well as an optional figure of the fit SED.Available model grids: Several grids are already available upon installation. A range of
other model grids, including state-of-the-art dust-growth models byNanni et al. (2019), are downloaded automatically and used when selected. Descriptions of the model
grids can be found in theDocumentation. A module for creating your ownDUSTYgrid
is under development, but for now, please email me (Dr. Steven Goldman) directly
for potential grid requests or for help with the package.Free software: BSD licenseDocumentation:https://dusty-evolved-star-kit.readthedocs.io.TODOCredits: This package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History1.7.2 (2020-08-05)Updates plots with now 17 source maximum for single SED figure. The sed and
sed_indivscripts now use a common set of functions to minimize duplicated code,
and ensure consistency.1.7.1 (2020-08-05)Minor bug fixes to the data retrieval script.1.7.0 (2020-07-24)First major release of least-squares fitting DESK. The package is stable with
pytest testing through Github-actions (Ubuntu and OSX: Python 3.6, 3.7, 3.8),
documentation with Sphinx on readthedocs, coverage with codecov,
code quality checks with codacy, installation with pip, and hosted on Github.
Model grids are downloaded using direct-download links on Box.1.3.1 (2019-04-29)First release on PyPI.
Package: deskapi
deskapi is a Python wrapper around theDesk.com REST API. It
provides Python wrappers for articles, topics, and translations.
deskapi is compatible with Python 2.6, 2.7, and 3.3.Installationdeskapi is installable fromPyPIwitheasy_installorpip.$ pip install deskapiThis will download the latest release, along withrequests, which it
depends on.Getting StartedAccess to the Desk API is managed through aDeskSessionobject.
To instantiate a session, you’ll need a sitename and authentication
information. If your Desk.com site ishttp://example.desk.com, your
site name will beexample. Authentication information is anyvalid
Requests auth object. The simplest thing to provide is a username
and password. For example:>>> from deskapi.models import DeskSession

>>> session = DeskSession(
...     sitename='example',
...     auth=('nathan@example.com', '53kr17')
... )Once you have a session ID, you can retrieve a list ofArticles:>>> articles = session.articles()Article fieldsmap to Python properties:>>> article = articles[0]
>>> article.subject
'Help Topic'
>>> article.in_support_center
TrueCollections and Objectsdeskapi models the information available from Desk API as a set of
“collections” and “objects”. Thearticles()method onDeskSesssionreturns acollection. Collections can be iterated
over, and support indexed access. A collection can create new members
in itself.Each member of a collection is a Desk Object. Desk Objects support
property access to their fields, as well as updating those fields.CollectionsCreating MembersYou can create new members of a collection by calling thecreatemethod on it, passing in fields as keyword arguments.>>> new_article = articles.create(
...     title='New Article',
...     body='Some content.',
... )ArticlesArticlesare accessible via thearticles()method on theDeskSession.>>> articles = session.articles()TopicsTopicsare accessible via thetopics()method on theDeskSession.TranslationsTranslationsare accessible via thetranslationsproperty of
Article objects. The translations collection is slightly different
than other collections. Instead of allowing indexed access, it acts
like adict, keyed by locale:>>> translations = article.translations
>>> len(translations)
2
>>> translations['es'].subject
'Tema de Ayuda'ObjectsUpdating ObjectsYou can make changes to an object and save those back to desk.>>> article.body = 'Test Content'
>>> article.save()Alternately you can use theupdatemethod to update the
information in Deskwithoutupdating the local Python object. The
following is equivalent to thesaveexample:>>> article = article.update(body='Test Content')Bothsaveandupdatereturn the updated object.LicenseMade available under a BSD license; see LICENSE for details.News0.1Release date: 5 September 2013Initial releaseSupport for Articles, Topics, Translations
Package: deskew
DeskewNote: Skew is measured in degrees. Deskewing is a process whereby skew is removed by rotating an image by the same amount as its skew but in the opposite direction. This results in a horizontally and vertically aligned image where the text runs across the page rather than at an angle.The return angle is between -45 and 45 degrees to don't arbitrary change the image orientation.By using the library you can set the argumentangle_pm_90toTrueto have an angle between -90 and 90 degrees.Skew detection and correction in images containing textImage with skewImage after deskewInstallationYou can install deskew directly from pypi directly using the following commentpython3-mpipinstalldeskewOr to upgrade to newer versionpython3-mpipinstall-UdeskewCli usageGet the skew angle:deskewinput.pngDeskew an image:deskew--outputoutput.pnginput.pngLib usageWith scikit-image:importnumpyasnpfromskimageimportiofromskimage.colorimportrgb2grayfromskimage.transformimportrotatefromdeskewimportdetermine_skewimage=io.imread('input.png')grayscale=rgb2gray(image)angle=determine_skew(grayscale)rotated=rotate(image,angle,resize=True)*255io.imsave('output.png',rotated.astype(np.uint8))With OpenCV:importmathfromtypingimportTuple,Unionimportcv2importnumpyasnpfromdeskewimportdetermine_skewdefrotate(image:np.ndarray,angle:float,background:Union[int,Tuple[int,int,int]])->np.ndarray:old_width,old_height=image.shape[:2]angle_radian=math.radians(angle)width=abs(np.sin(angle_radian)*old_height)+abs(np.cos(angle_radian)*old_width)height=abs(np.sin(angle_radian)*old_width)+abs(np.cos(angle_radian)*old_height)image_center=tuple(np.array(image.shape[1::-1])/2)rot_mat=cv2.getRotationMatrix2D(image_center,angle,1.0)rot_mat[1,2]+=(width-old_width)/2rot_mat[0,2]+=(height-old_height)/2returncv2.warpAffine(image,rot_mat,(int(round(height)),int(round(width))),borderValue=background)image=cv2.imread('input.png')grayscale=cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)angle=determine_skew(grayscale)rotated=rotate(image,angle,(0,0,0))cv2.imwrite('output.png',rotated)Debug imagesIf you get wrong skew angle you can generate debug images, that can help you to tune the skewing detection.If you install deskew withpip install deskew[debug_images]you can get some debug images used for
the skew detection with the functiondetermine_skew_debug_images.To start the investigation you should first increase thenum_peaks(default20) and use
thedetermine_skew_debug_imagesfunction.Then you can try to tune the following argumentsnum_peaks,angle_pm_90,min_angle,max_angle,min_deviationand eventuallysigma.Inspired by Alyn:https://github.com/kakul/AlynContributingInstall the pre-commit hooks:pipinstallpre-commit
pre-commitinstall--allow-missing-config
Package: desko-identy-chrom-card-reader
id_card_readerPython driver for DESKO IDenty chromlinkhttps://www.desko.com/site/assets/files/2782/desko_identy-chrom.pdfScript was develop for  REST API to help load customer dataScript extract user data from passport or IDUSAGEIn your virtual environment install external librariespip install -r requirement.txtrun scriptpython example.pyOr in your code import idcardreader.pyfrom idcardreader import get_user_datacustomer_data, error_code = get_user_data()If reader get error (you move quick with ID or data are not readable, ...) script return error_code different than 0error_code == 1 its parsing error, when regex canot parse dataerror_code == 2 its card reader sys error (like reader is not connected, reading error,...)In success customer_data will be filled with a dictionary in format:PASSPORT{
"issuing_country": ....,"last_name": ....,"first_name": ....,"document_id": ....,"date_birth": ....,"sex": ....,"date_expiration": ....,"country": ....,"personal_id": ....,}ID{
"issuing_country": ....,"document_id": ....,"personal_id": ....,"date_birth": ....,"sex": ....,"date_expiration": ....,"country": ....,"last_name": ....,"first_name": ....,}
Package: desktop-app
desktop-appdesktop-appsimplifies making a Python GUI application install, launch, and behave in
a standard way with respect to the application menus and the taskbar in Windows and
Linux (Macos support planned).If your application is a Python module runnable from the command line aspython -m mymodule, then with minimal configurationdesktop-appcan:Create a launcher script (or.exeon windows) that runs your applicationafter activating acondaenv or virtual environment, if anywith a hidden console if on WindowsInstall a start menu shortcut (Windows) or.desktopfile (Linux) to launch your
application from your desktop applications menuEnsure your application appears in the taskbar with the correct name and icon,
and can be pinned correctly.Basic UsageHere we'll follow the example in this repository for a module calledoink, developed
by Old MacDonald's Farm. Before Old MacDonald had heard ofdesktop-app, he had a
package that looked like this:.
├── oink
│   ├── __init__.py
│   └── __main__.py
└── setup.pyWheresetup.pyis:fromsetuptoolsimportsetupsetup(name='oink',version='1.0',author='Old MacDonald',author_email="macdonald@eie.io",url='http://eie.io',packages=["oink"],setup_requires=['setuptools'],)__main__.pyis:importtkinterroot=tkinter.Tk()root.geometry("300x300")w=tkinter.Label(root,text="Oink!")w.place(relx=0.5,rely=0.5,anchor=tkinter.CENTER)root.mainloop()And__init__.pyis empty.After installing this package somewhere, MacDonald can run it from a terminal withpython -m oink, and it shows a little window[README still in progress!]ReasonsWhy a hidden console on Windows?The usual recommendation to run Python GUI applications is withPythonw.exe, which
does not create a console window. However, when running underPythonw.exe, a simpleprint()call will raise an exception, andcertain low-level output
redirectionof subprocesses does not work due to thestdoutandstderrfilehandles not existing.
Furthermore, some tools may create subprocesses that callcmd.exe, orPython.exe,
briefly popping up console windows of their own since one doesn't already exist.In order to be able to ignore these problems and code the same as you would with a
console, in Windows the launcher script runs your application in a subprocess usingPython.exe, but with theCREATE_NO_WINDOWflag so that the console exists, but is
not visible.Why activate environments?Activating environments is not strictly necessary except when using conda on Windows, in
which case some compiled extensions (notably, Qt libraries) cannot be imported unless
the environment is active.However, even on other platforms activating the environment simplifies running other
programs that might be installed to thebin/Scriptsdirectory of the virtual
environment - calling code would otherwise have to manually find this directory and
provide the full path to the programs it wants to run.
Package: desktop-entry-creator
Desktop entry creatorA user-friendly GUI for creating desktop entries for installed applications on Linux.InstallationInstall the required system packages:Fedora and RHEL based distros:sudodnfinstallpython3-develcairocairo-develpython3-cairogobject-introspectiongobject-introspection-develcairo-gobjectcairo-gobject-develUbuntu and Debian based distros:sudoaptinstallpython3-devlibcairo2libcairo-devpython3-cairolibgirepository-1.0-1libgirepository1.0-devlibcairo-gobject2Install using pip:pipinstalldesktop-entry-creatorDevelopmentInstall the required system packages mentioned in the installation section.Setup Python 3 virtual environment using Pipenv:pipenv--threeActivate the virtual enviroment and install the dependencies:pipenvshell
pipenvinstall--devRunapp.pylocated under thedesktop_entry_creatordirectory to launch the GUI:./desktop_entry_creator/app.pyLicenseThis project is licensed under the terms of theGPL v3 license.
Package: desktop-entry-lib
desktop-entry-libdesktop-entry-lib allows reading and writing .desktop files according to theDesktop Entry Specificationimportdesktop_entry_libdefwrite()->None:entry=desktop_entry_lib.DesktopEntry()entry.Name.default_text="My App"entry.Comment.default_text="A short description"entry.Comment.translations["de"]="A short german description"entry.Type="Application"entry.Exec="my-app"entry.write_file("my_app.desktop")defread()->None:entry=desktop_entry_lib.DesktopEntry.from_file("my_app.desktop")print("Name: "+entry.Name.default_text)print("Comment: "+entry.Comment.default_text)print("German translation for Comment: "+entry.Comment.translations.get("de","None"))print("Type: "+entry.Type)print("Exec: "+entry.Exec)if__name__=="__main__":write()read()Features:Fully static typedNo external dependenciesFull Documentation and Examples availableSupport running inside aFlatpakThe whole lib is a single fileSupportsPyPyRead the documentation