Saravanan666/pypi-org huggingface dataset:
Package: pydiscovergy
pydiscovergyAsynchronous Python client for Discovergy smart meter using their API.AboutThis package allows you to fetch data from api.discovergy.com.InstallationpipinstallpydiscovergyUsageimportasynciofrompydiscovergyimportDiscovergyasyncdefmain():discovergy=Discovergy(email="demo@example.com",password="demo")meters=awaitdiscovergy.meters()formeterinmeters:ifmeter.meter_id=="abc123":reading=awaitdiscovergy.meter_last_reading(meter.meter_id)print(f"Last reading:{reading.values['energy']}kWh")if__name__=="__main__":asyncio.run(main())Changelog & ReleasesThis repository keeps a change log usingGitHub's releasesfunctionality. The format of the log is based onKeep a Changelog.Releases are based onSemantic Versioning, and use the format
ofMAJOR.MINOR.PATCH. In a nutshell, the version will be incremented
based on the following:MAJOR: Incompatible or major changes.MINOR: Backwards-compatible new features and enhancements.PATCH: Backwards-compatible bugfixes and package updates.ContributingThis is an active open-source project. I am always open to people who want to
use the code or contribute to it.Thank you for being involved! :heart_eyes:Setting up development environmentThis Python project is fully managed using thePoetrydependency manager. But also relies on the use of NodeJS for certain checks during development.You need at least:Python 3.11+PoetryNodeJS 20+ (including NPM)To install all packages, including all development requirements:npminstall
poetryinstallAs this repository uses thepre-commitframework, all changes
are linted and tested with each commit. You can run all checks and tests
manually, using the following command:poetryrunpre-commitrun--all-filesTo run just the Python tests:poetryrunpytestAuthors & contributorsThe content is byJan-Philipp Benecke.For a full list of all authors and contributors,
checkthe contributor's page.LicenseMIT LicenseCopyright (c) 2023 Jan-Philipp BeneckePermission 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: pydis-discord
Pydis===========================================
Make your Discord Bot quickly and easily on Python!FeaturesModern code! (async await)Don't worrie by Intents! (Intents are not needed here)Easy to use!Easy to extend!Easy to understand!Easy to maintain!Lightweight!Fast!Open source!Python 3.6+Discord.py library forkInstallationpipinstallpydis-discord=1.0.0UsageAlert: There is a wiki on GithubMaking a Ping Pong bot!frompydisimportGatewayDiscordAppbot=GatewayDiscordApp()@bot.eventasyncdefon_ready():print('Ready!')@bot.eventasyncdefon_message(message):ifmessage.content=='ping':awaitmessage.channel.send('Pong! :ping_pong:')bot.run()LicenseMIT LicenseTODOCreate slash commands easier!More wikiExamples
Package: pydise
pydiseThis script is designed to detect Python scripts that generate side effects when imported into another code.Side effects refer to unintended changes to the global state of the system, such as writing files, or displaying undesired outputs when a script is imported without being directly executed.Example of side effects:# my_lib.pyprint("42")classMyLib(object):pass# my_script.py>>>importmy_lib42That's what we want to avoid.How it worksThe script analyzes the content of Python files specified in the source directory to identify elements which may indicate side effects, eg :* print("hello")
* open("myfile", "rw")
* exit()
* if True:
     exit()
...We used AST, so no code are executed.The script then provides a report of the files that potentially contain side effects so that you can identify and correct them if necessary.Usage$ pip install pydise
$ pydiseExample :# my_lib.pyprint("42")classMyLib(object):pass$pydiseERROR:root:.\my_lib.py:1->Sideeffectsdetected:printArgumentsPositional arguments:filename:file to check (wildcard)Example:$ pydise mylib.py
$ pydise *.py
$ pydise .Options:--list-only:list the detected files without checking errors.Example:$ pydise --list-only
Detected files : 
* .\my_lib.py
* .\my_lib2.py--pattern-ignored:ignore line containing the pattern, multiple patterns can be setted, the pattern is added to the default patterns.default patterns:# no-pydiseor# no_pydise# my_lib.pyprint("42")# ignoredthislineclassMyLib(object):pass$pydise--pattern-ignoredignoredthisline--pattern-ignoredanotherpatternContributionsI am a self-taught developer, it's highly possible that my code could be buggy / optimizable, so any contributions to improving this script are welcome!
If you find issues or want to add new features, feel free to create a pull request.DisclaimerMake sure you understand the implications of using this script as it may generate false positives or fail to detect certain side effects, depending on the complexity of the analyzed code. It is recommended to manually review the report results before making critical decisions regarding your code.LicenseThis project is licensed under the MIT License - you can use, modify, and distribute it freely while retaining the original license notice.
Package: py-disk-imager
PYsfdiskA Python API for linux sfdisk utilityNote: Module will work only on Linux OS’es, required executables used in
this module: * sudo * lsblk * sfdisk * pxz * tar * partclonePlease ensure that you have installed aboveInstallgit clone https://github.com/beskidinstruments/python-sfdisk
sudo pip install ./ExampleimportpysfdiskCreate block device object for the diskdisk=pysfdisk.BlockDevice(path='/dev/nvme0n1')Optionally, if not using root and sudo is available, use thisdisk=pysfdisk.BlockDevice(path='/dev/nvme0n1',use_sudo=True)Partitions information is automatically loadeddisk.get_partitions()['0'].uuid403ACCB2-0B00-465F-B190-B59C45CFD860Read partitions table.disk.read_partition_table()Create compressed archive from all partitions.disk.run(mbr_filename="mbr_file",target_dir="/home/user/Desktop")For more examples please use files in the example directoryLicensepysfdisk is licensed under GPL v2.Authorspre-alpha 0.0.1 2016 - Matt CombenGA 1.0.0 2020 - Tomasz Szuster
Package: pyDismail
pyDismailan API wrapper for temporary/disposable mail providers powered bysynox/disposable-mailboxInstallationpip install pyDismailUsagefrompyDismailimportBlubbermailDismail,BmOn2Dismail,YadimDismaildisposable_mail=BlubbermailDismail(mail="example")# or BmOn2Dismail(mail="example")print(disposable_mail.mail)# example@yadim.dismail.demails=disposable_mail.fetch_all_mails()last_received_mail=mails[-1]print(last_received_mail)# (Mail: sender=SENDER, time=DATETIME, subject=SUBJECT, id=ID, body=BODY)print(last_received_mail.parsed_eml)# parsed eml of the emailprint(last_received_mail.body)# plain body of the email# This is an email. Hellodisposable_mail.delete_mail(last_received_mail)# deletes the mail from the serveramount_of_new_mail=disposable_mail.check_for_new()print(amount_of_new_mail)# returns the amount of the new mails after the last fetch_all_mails was calledraw_eml=disposable_mail.get_eml(last_received_mail)# returns the raw eml content of the email
Package: pydisort
Empower Discrete Ordinates Radiative Transfer (DISORT) with Python 🚀About PydisortDISORT (Discrete Ordinate Radiative Transfer) is a widely-used algorithm that calculates the scattering and absorption of radiation in a medium. The original DISORT algorithm was developed by Stamnes et al. in 1988 and was implemented inFORTRAN.pydisortis a Python wrapper for the DISORT algorithm inC. The wrapper is designed to be simple and easy to use. It is also designed to be flexible and extensible.For a detailed documentation, please visithttps://pydisort.readthedocs.io/.❗ We only support Python 3.6+ on Linux and Python 3.8+ on MacOS. Anaconda is not fully supported at the moment; it only works if the Python path andcondaenvironment are set correctly. For the current stage, we strongly recommend usingpython3.11 -m venv env(you Python version might differ) to create a virtual environment and installpydisortin this clean environment.
Package: pydisque
pydisqueClient for Disque, an in-memory, distributed job queue.DocumentationRead The DocsUsageCreate a new Disque client by passing a list of nodes:frompydisque.clientimportClientclient=Client(["127.0.0.1:7711","127.0.0.1:7712","127.0.0.1:7713"])client.connect()If it can't connect to first node, it will try to connect to second, etc.., if it can't connect to any node, it will raise a redis.exceptions.ConnectionError as you can imagine.Now you can add jobs:client.add_job("test_queue",json.dumps(["print","hello","world",time.time()]),timeout=100)It will push the job "print" to the queue "test_queue" with a timeout of 100
ms, and return the id of the job if it was received and replicated
in time. If it can't reach the node - maybe it was shutdown etc. - it will retry to connect to another node in given node list, and then send the job. If there is no avail nodes in your node list, it will obviously raise a ConnectionErrorThen, your workers will do something like this:whileTrue:jobs=client.get_job(['test_queue'])forqueue_name,job_id,jobinjobs:job=json.loads(job)print">>> received job:",jobclient.ack_job(job_id)also check examples directory.While waiting jobs your connected node may go down, pydisque will try to connect to next node, so you can restart your nodes without taking down your clients.DocumentationFor now please check docstrings in disque/client.py, implemented commands areinfoadd_jobget_joback_jobnack_jobfast_ackworkingqlenqstatqpeekqscanjscanenqueuedequeuedel_jobshowpausehelloInstallationYou can install it using pip.$ pip install pydisqueLicenseThis project is licensed under the terms of the MIT licenseCreditsybrslovellecanardleteershuge
Package: pydisseqt
Python wrapper arounddisseqtbuilt usinghttps://github.com/PyO3/maturinChangelog:0.1.4Updated disseqt: allow backwards integration in integrate and integrate_one (t_start >= t_end)0.1.3Updated disseqt, fixed trap integration bug0.1.2Updated pulseq-rs: allow empty .seq file sections0.1.1Updated disseqt, use double precision floats0.1.0Baseline
Package: pydist2
pydist2pydist2 is a python library that provides a set of methods for calculating distances between observations.
There are two main classes:pdist1which calculates the pairwise distances between observations in one matrix and returns a distance matrix.pdist2computes the distances between observations in two matrices and also returns a distance matrix.Usagepdist1(P, metric = "euclidean", matrix=False)
pdist2(P, Q, metric = "minkowski", exp = 3)Arguments:two matrices P and Q.metric: The distance function to use.exp: The exponent of the Minkowski distance.InstallationThe pydist2 library is available onPypi. Thus, you can install the latest available version usingpip:$pip install pydist2Supported Python versionspydist2 has been tested with Python 3.7 and 3.8.For more information, please checkout the documentation which is available atreadthedocs.This program and the accompanying materials are made available under the terms of theMIT License.Progress & Features[X] Commit the first code’s version.[X] Support the followinglist of distances.[X] Display the distance in a matrix form(a combination for each pair of points):>>> X = np.array([[100, 100],[0, 100],[100, 0], [500, 400], [300, 600]])
>>> pdist1(X,matrix=True) # by default, metric = 'euclidean'
array([[100.    , 100.    , 100.    ,   0.    , 100.    ],
       [100.    , 100.    , 100.    , 100.    ,   0.    ],
       [500.    , 100.    , 100.    , 500.    , 400.    ],
       [538.5165, 100.    , 100.    , 300.    , 600.    ],
       [141.4214,   0.    , 100.    , 100.    ,   0.    ],
       [583.0952,   0.    , 100.    , 500.    , 400.    ],
       [583.0952,   0.    , 100.    , 300.    , 600.    ],
       [565.6854, 100.    ,   0.    , 500.    , 400.    ],
       [632.4555, 100.    ,   0.    , 300.    , 600.    ],
       [282.8427, 500.    , 400.    , 300.    , 600.    ]])where the first column represents the distance between each pair of observations. for instance, the euclidean distance between (100. , 100.) and ( 0. , 100.) is 100.[X] Support numpy arrays of the same size only.Todo list[ ] Re-validate the correctness of the distances equations.[ ] Performance tests & vectorization.[ ] Adding new distances.[ ] Adding a squared form of the distance.[ ] Support tuples and list.[ ] Write more test cases.[ ] Handling Exceptions.[ ] Restructure the docs.History0.0.1 (2021-03-04)First release on PyPI.0.0.5 (2021-03-21)Adding sqeuclidean metric.
Package: pydistance
PydistanceA library for visualizing the closest point to a set of points.Getting startedInstall the Python3 packagepip3installpydistanceUsage$ pyd --help
Usage: pyd [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  distance  Dumb command to test the distance_matrix api
  enrich    Enrich the locations with lat, lng information
  plot      Plot all employee addresses and the best determined office...To use, create a text file and run the plot command.cat<<EOFToronto, Ontario, CanadaPalo Alto, California, USAMt. Everest, NepalBerlin, GermanyEOF>addrs.txt
pydplot--adrs-file=addrs.txtLicenseMIT
Package: pydist-cli
pydist-cliA command-line interface forPyDist.ConfigurationThe only thing youneedto configure is your PyDist API key, via:thePYDIST_API_KEYenvironment variable, orthe--api-keycommand-line flag, ora.pydist.jsonfile in your home directory or the directory you are runningpydistfrom.UsageInstallation:pydist install <package>will install a package from your PyDist account. If
the package is not available on PyDist or you cannot connect to PyDist for some reason, it will
fall back to PyPI.Publish:pydist publishin the root directory of your package will build, check,
and upload your packages to PyDist, in both source and binary wheel form.
Package: pydistinct
This package provides statistical estimators to predict a population’s total number of distinct values from a sample sequence - given a sample sequence of n values with only d distinct values, predict the total number of distinct values D that exists in the population N.Sample use cases :estimating the number of unique insects in a population from a field sample
estimating the number of unique words in a document given a sentence or a paragraph
estimating the number of unique items in a database from a few sample rows
Please send all bugs reports/issues/queries tochanedwin91@gmail.comfor fastest response!Seehttps://github.com/chanedwin/pydistinctfor more information
Package: pydistman
Info:This is the README file for Python Dist Manager.Author:Shlomi Fish <shlomif@cpan.org>Copyright:© 2020, Shlomi Fish.Date:2023-12-31Version:0.0.10PURPOSEA work-in-progress manager for PyPI-like python distributions which aims to
be a “maximum overkill” don’t-repeat yourself manager with a user
experience similar to Dist Zilla (http://dzil.org/).Currently it is functional, but a far cry from our vision.INSTALLATIONpip3 install pydistmanUSAGEFor some examples see:https://github.com/shlomif/black-hole-solitaire/tree/master/black-hole-solitaire/python-bindings/cffihttps://github.com/shlomif/modint/tree/master/modinthttps://github.com/shlomif/pydistmanhttps://github.com/shlomif/pysol_cardshttps://github.com/shlomif/rebookmaker/tree/master/epub_makerhttps://github.com/shlomif/sum_walkerhttps://github.com/shlomif/python-vnu_validatorhttps://github.com/shlomif/zenfilterpython3 python_pypi_dist_manager.py testpython3 python_pypi_dist_manager.py releaseNOTESCOPYRIGHTCopyright © 2020, Shlomi Fish.
All rights reserved.Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:Redistributions of source code must retain the above copyright
notice, this list of conditions, and the following disclaimer.Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in the
documentation and/or other materials provided with the distribution.Neither the name of the author of this software nor the names of
contributors to this software may be used to endorse or promote
products derived from this software without specific prior written
consent.THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
“AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Package: pydistort
PyDistortTable of ContentsInstallationLicenseUsageInstallationpip install pydistortDev build# without optional dependencies:pipinstall-Ugit+https://github.com/barsikus007/pydistort# with optional dependencies:pipinstall-U"pydistort[all]@ git+https://github.com/barsikus007/pydistort"For distortion, you need to install imagemagickLinux (Ubuntu)sudoaptinstallimagemagickWindowsYou can do this via scoop.shscoopinstallimagemagickFor video, gif and apng procession, you need to install ffmpegLinux (Ubuntu)sudoaptinstallffmpegWindowsYou can do this via scoop.shscoopinstallffmpegFor lottie->gif procession you need to install gtkLinux (Ubuntu)sudoaptinstalllibgtk-3-0WindowsYou can do this via scoop.shscoopinstallmsys2msys2# then exit in msys shellmsys2-c"pacman -S mingw-w64-x86_64-gtk3 --noconfirm"Licensepydistortis distributed under the terms of theMITlicense.Usagefrompydistort.image.seam_carvingimportdistortawaitdistort('image.png',60)TODO for 0.1.0 releaseWrite readmeRewrite seam carvingRewrite seam carving pyMaybe rewrite to GlaxnimateAdd ffmpeg commandslottie -p parameterhttps://github.com/bodqhrohro/giftolottiehttps://github.com/bunkahle/gif2numpyos.remove to unlink
Package: pydist-prob
# pydist_prob: Gaussian and Binomial Distributions
Functions for calculating and plotting normal and binomial distributions.
This project is a part of the AWS Machine Learning Course on Udacity.
## Usage`python from Gaussiandistribution import Gaussian foo = Gaussian(25, 2) round(foo.pdf(25), 5) #returns 0.19947 foo.plot_histogram_pdf() #plots a histogram of the probability density function `## License
[MIT](https://choosealicense.com/licenses/mit/)
Package: pydita-ast
A Python wrapper to convert XML documentation into RST files and the Sphinx documentation.OverviewThe PyDita-AST project aims to automatically generate a Python library and a related
Sphinx documentation from an XML documentation.Documentation and issuesOn thePyDita-AST Issuesfor this repository,
you can create issues to submit questions, report bugs, and request new features.
To reach the PyAnsys support team, emailpyansys.core@ansys.com.Getting startedInstall thepydita-astpackage with:python-mpipinstallpydita-astIt is recommended to organize the XML documentation as follow:Converting an XML-directoryOnce theXML_directoryis correctly organized, the converter can be run.pythonxml2rst.py-pXML_directory_pathIf some functions need to be customized, the path containing the python
files can be specified.pythonxml2rst.py-pXML_directory_path-fcustomized_function_directory_pathA new package is then automatically generated. Its default name ispackage.
It is organized as follow:Then, the Sphinx documentation can be generated from this package.
The following code is to render the documentation as an HTML one from Windows:cdpackagepipinstall-e.[doc,tests]# Using a virtual environment is recommended..\doc\make.bathtml
Package: pydiv
# I am pydiv!----## Available functions?Integer Return:--------->intconvert(decimalnumber,numeratorlimit,denominatorlimit)Returns two arrays, first one with list of possible numerators and the second one with list of possible denominators. Matching indices of the two lists represent the numerator and denominator of a number.**EXAMPLES:-**1.----import pydiva=3.14x=100y=100m=pydiv.intconvert(a,x,y)print(m)**WOULD PRINT**:>([22, 44, 66, 85, 88], [7, 14, 21, 27, 28])i.e., a tuple containing the numerator list and the denominator list.2.----import pydiva=3.14x=100y=100m,n=pydiv.intconvert(a,x,y)print(m)print(n)**WOULD PRINT:**>[22, 44, 66, 85, 88]>[7, 14, 21, 27, 28]i.e., two separate lists, one stored in m (storing numerator list) and the other in n (storing denominator list).String Return:--------->convert(decimalnumber,numeratorlimit,denominatorlimit)Returns a string array with possible division forms of a decimal number.**EXAMPLE:-**import pydiva=3.14x=100y=100m=pydiv.convert(a,x,y)print(m)**WOULD PRINT:**>['22/7', '44/14', '66/21', '85/27', '88/28']i.e., a list of the possible division forms of a decimal number.Made by Ankan Das, UEM-K----
Package: pydiva
pydivaSome python (3.8+) stuff for handling files from Project DIVA games.pyfarcReads and writes farc archives (FArc/FArC/FARC fully supported).Seedocs/pyfarc.mdfor usage.pyfmh3Reads and writes fontmaps for F2nd (BE only), FT and X series games.
Seedocs/pyfmh3.mdfor usage.Development InfoLicense is MIT so do whatever you want, but I'd personally prefer if we avoid forks for now.Format-specific info is in the relevant docs.TestsRunpython -m unittestfrom the root directory.