Saravanan666/pypi-org huggingface dataset:
Package: disk-smart-tool
Disk S.M.A.R.T. toolread disk S.M.A.R.T. of SATA disks and NVME disksDependency# Debian / Ubuntuapt-getinstall-ysmartmontools# RHEL / CentOS / Fedorayuminstall-ysmartmontoolsUsagefromdisk_smart_tool.smart_toolimportcheck_diskresult=check_disk("/dev/sda")
Package: diskspace-report
Project Diskspace-ReportA platform independent reporting tool for diskspace usage in time. Every time the script runs, it adds an entry of the actual diskspace to a specified csv file.
Over time you can analyse, where your diskspace goes.The report csv-file can be emailed via your email account. The file can be set up as a service as well, so you will get automated reports via email.InstallationVia PyPi.orgpip install diskspace_reportpip show diskspace_reportAfterwords, when no error occurred, diskspace_report binary is in your path and you can use it by invoking:diskspace_report --helpVia Source-Code on GithubDownload and unpack the source-code (whereever you want)Make sure python3 is installed and all relevant paths are in your path environmentInstall the requirements:pip install -r requirements.txtTested PlatformsWindowsMacOSLinuxThe script may run on every platform which supports python3. Some functionality like --editconfig may fail.ConfigurationThere is a config.py file to adjust the settings. You can edit the config withdiskspace_report --editconfigEmail ist turned off by default. Parameters can be shown withdiskspace_report --showconfigYou have to fill all required fields for the email to work and to switch on email reportTesting the functionalityTest the script without email on the command lineWhen everything works, test it with email on the command lineAfterwords you can add it as a service and run it on a automated basisMenu functionalityUsage: diskspace_report [OPTIONS]

  Diskspace_Report: A tool to analyse and print / email the available
  diskspace to a csv file

Options:

--editconfig   Opens the config file for editing
--showinfo     Show the Package Information and some path information
--version      Show the version number of the script
--showconfig   Show all the parameters configured in the configuration file
--run BOOLEAN  Run the script. Defaults to True
--help         Show this message and exit.
Package: disksurf
disksurfWhat is it?disksurfis a package which contains the functions to measure the height of optically thick emission, or photosphere, using the method presented inPinte et al. (2018)(with associatedexample script).How do I install it?Grab the latest version from PyPI:$ pip install disksurfThis has a couple of dependencies, namelyastropyandGoFish, which should be installed automatically if you don't have them. To verify that everything was installed as it should, running through thetutorialsshould work without issue.How do I use it?At its most basic,disksurfis as easy as:fromdisksurfimportobservation# import the modulecube=observations('path/to/cube.fits')# load up the datasurface=cube.get_emission_surface(inc=30.0,PA=45.0)# extract the surfacesurface.plot_surface()# plot the surfaceFollow ourtutorialsfor a quick guide on how to usedisksurfwith DSHARP data and some of the additional functions that will help you extract the best surface possible.CitationIf you use this software, please remember to cite bothPinte et al. (2018)for the method, andTeague et al. (2021)for the software.@article{2018A&A...609A..47P,
  doi = {10.1051/0004-6361/201731377},
  year = {2018},
  volume = {609},
  eid = {A47},
  pages = {A47},
  author = {{Pinte}, C. and {M{\'e}nard}, F. and {Duch{\^e}ne}, G. and {Hill}, T. and {Dent}, W.~R.~F. and {Woitke}, P. and {Maret}, S. and {van der Plas}, G. and {Hales}, A. and {Kamp}, I. and {Thi}, W.~F. and {de Gregorio-Monsalvo}, I. and {Rab}, C. and {Quanz}, S.~P. and {Avenhaus}, H. and {Carmona}, A. and {Casassus}, S.},
  title = "{Direct mapping of the temperature and velocity gradients in discs. Imaging the vertical CO snow line around IM Lupi}",
  journal = {\aap}
}

@article{disksurf,
  doi = {10.21105/joss.03827},
  url = {https://doi.org/10.21105/joss.03827},
  year = {2021},
  publisher = {The Open Journal},
  volume = {6},
  number = {67},
  pages = {3827},
  author = {Richard Teague and Charles J. Law and Jane Huang and Feilong Meng},
  title = {disksurf: Extracting the 3D Structure of Protoplanetary Disks},
  journal = {Journal of Open Source Software}
}
Package: disktools
# disktools
Extensions to basic disk tools like du, df, etc, but written in python.## Installation> pip install disktools## Disk Usage (Cached)ducis a python-based rewrite ofdu. It is relatively fast compared to its naive LLVM (numba optimized version). The main performance gain comes from using cache. Here is an example:The output of`bash duc /foo/bar `is equivalent to the output of`bash du-sb/foo/bar `The difference would be, thatduccreates cache stock called.ducin each folder as it traverses over the file system tree, hosting all previous results for all the subfolders if there are any.The minor caveat of such approach is that creating the.ducentry screws thelast modificationtimestamp of the containing folder. But over time this is not important, since it happens only once. Newly cache updates do not affect the containing folder anymore.The idea of such caching design vs. global filesystem entry is to enable long term monitoring of any chosen sub path of your data. It has been tested to perform on XFS filesystems with volumes over 100TB and over 10 millions of files.Any improvements and issue reports are welcomed.—You might also want to check out [findtools](https://github.com/ewiger/findtools)
Package: disl
disl: super lightweight (only 35 lines) dependency injection (ioc) support for PythonA super simple and risk-free way to do dependency injection (ioc) in Python.
The entire code base is only 35 lines (empty lines included). No need to
use a complex 3rd-party framework or be concerned about the long-term viability
of the library.How to useSuppose you have a module to read some products' info from a DB file, so the
path to the DB file should be injected:from disl import Inject

class ProductDb:
  def __init__(self):
    self.db_path=Inject()  # this variable will be set automatically
  
  def get_products(self):
    print(f"getting products from {self.db_path}")In your main program, you link up the ProductDb object and the db_path:from disl import Disl

di=Disl()  # this is the container
di.add_raw_bean("pdb", ProductDb()) # add the bean under the name "pdb"
di.add_raw_bean("db_path", "c:/Users/kent/test.db") # another bean
pdb=di.get_wired_bean("pdb")  # the db_path field in the pdb bean will be set
pdb.get_products()  # this pdb object is just the plain object you createdIf the path to the DB is named "database_path" but your variable name is
just "db_path", you can do it like this:from disl import Inject

class ProductDb:
  def __init__(self):
    self.db_path=Inject("database_path") # specify the bean name
  
  def get_products(self):
    print(f"getting products from {self.db_path}")

from disl import Disl

di=Disl()
di.add_raw_bean("pdb", ProductDb())
di.add_raw_bean("database_path", "c:/Users/kent/test.db")
pdb=di.get_wired_bean("pdb")
pdb.get_products()
Package: dislevel
DislevelMaking leveling easier for small as well as big botInstallationpip install dislevelCheck ExamplesHereUsageMaking a simple bot with a db connection. First of all we need a database connection. Dislevel supports 2 type of database connection.asyncpg (Pool)databases (Database)If your bot already have a connection you can use that, Or you can create a new one for leveling. In this example I will create a new connection using databases[sqlite]fromdatabasesimportDatabasefromdiscordimportIntentsfromdiscord.extimportcommandsfromdislevelimportinit_dislevelfromdislevel.utilsimportupdate_xpintents=Intents.default()# Nextcord current version uses discord Api v9 where message content intent is not enforced.# If you ware are using discord.py when you will need to enable message_content intent manually explicitly as shown below# intents.message_content = Truebot=commands.Bot(command_prefix="?",intents=intents)@bot.eventasyncdefon_ready():# Using databases to create a sqlite dbdb=Database("sqlite:///leveling.db")awaitdb.connect()# Pass instance of bot, the database connection and specify which driver to use. In this case we are using databases so we passed thatawaitinit_dislevel(bot,db,"databases")print("Ready! Let's go...")@bot.eventasyncdefon_message(message):ifmessage.author.bot:return# You can use this method anywhere to update xp of a member# First pass the bot instance, member_id, guild_id and how much xp to be added.awaitupdate_xp(bot,message.author.id,message.guild.id,amount=10)awaitbot.process_commands(message)# Load the cog. It has 4 cogs. `dislevel.nextcord`, `dislevel.nextcord.slash`, `dislevel.discord`, `dislevel.discord.slash`# If you want to use nextcord.slash you should load it ouside on_ready. Otherwise you can load it inside on_ready# You can also load both slash and normal cog.bot.load_extension("dislevel.nextcord")TOKEN:str="Your bot token here"bot.run(TOKEN)Events# If you want to do something when a user level's up!asyncdefon_dislevel_levelup(guild_id,member_id,level):passCogsdislevel.discord- For discord.py 2.0dislevel.discord.slash- For discord.py 2.0 (Slash Commands)dislevel.nextcord- For nextcord 2.0dislevel.nextcord.slash- For nextcord 2.0 (Slash Commands)Commandsrank [member]-See your/member's rankleaderboard, lb-See leaderboardsetbg <url>-Set your bg urlresetbg-Reset your bg url to defaultJoin DiscordFor any kind of help
Package: dislib
Distributed computing library implemented over PyCOMPSs programming model for HPC.Website•Documentation•Releases•SlackIntroductionThe Distributed Computing Library (dislib) provides distributed algorithms ready to use as a library. So far, dislib is highly focused on machine learning algorithms, and it is greatly inspired byscikit-learn. However, other types of numerical algorithms might be added in the future. The library has been implemented on top ofPyCOMPSs programming model, and it is being developed by theWorkflows and Distributed Computing groupof theBarcelona Supercomputing Center. dislib allows easy local development through docker. Once the code is finished, it can be run directly on any distributed platform without any further changes. This includes clusters, supercomputers, clouds, and containerized platforms.
Package: dislog
dislogPreviouslydiscord-webhook-loggerProvides an interface for using a Discord webhook as a logger.Designed to abstract away webhook-specific details, such as the JSON format, and provide a simple interface for logging messages.InstallSimple as:pipinstalldislog[discordpy]You can use extras to define which implementation ofdiscord.pyyou want to use.discordpy: `discord.pyExampleUsingdislogin your projects is dead simple. It behaves like any otherlogging.Handler.For performance reasons, it even fires off a new thread for each log message, so you don't have to worry about blocking your main thread with costly HTTP requests.fromdislogimportDiscordWebhookHandlerfromloggingimport*basicConfig(level=ERROR,handlers=[StreamHandler(),DiscordWebhookHandler("url",text_send_on_error="<@440468612365680650>")])error("hi")It also works with asynchronous code, simply pass therun_asynckeyword argument. This is optional and makes it use the event loop instead of a thread pool.fromdislogimportDiscordWebhookHandlerfromloggingimport*fromasyncioimportrun,sleep,get_running_loopasyncdefmain():basicConfig(level=ERROR,handlers=[StreamHandler(),DiscordWebhookHandler("url",event_loop=get_running_loop(),text_send_on_error="<@440468612365680650>")])error("hi")awaitsleep(1)# Give it some time to run!run(main())ContributingSetupgitclonehttps://github.com/regulad/dislogcddislog
pipinstall-e.
pre-commitinstallTestingtox
Package: dismagic
.. -*- rst -*-dismagic========disassembling magic command for ipython-------------------.. image:: https://img.shields.io/pypi/v/dismagic.svg:target: https://pypi.python.org/pypi/dismagic:alt: Latest Version.. image:: https://img.shields.io/pypi/dm/dismagic.svg:target: https://pypi.python.org/pypi/dismagic:alt: DownloadsInstallation------------The package may be installed as follows: ::pip install dismagicAfter installation, the extension may be loaded within an IPython sessionwith ::%load_ext dismagicUsage Examples--------------Disassembly a source:%dis x = a + b%dis "x = a + b"src = "x = a + b"%dis srcDisassembly an object:func = lambda x, y: x + y%dis funcAuthor------See the included AUTHORS.txt file for more information.License-------This software is licensed under the`BSD License <http://www.opensource.org/licenses/bsd-license.php>`_.See the included LICENSE.txt file for more information.
Package: dis-magic
This allows you to visualize the bytecode of a cell in IPython upon running it.Installationpip3 install dis-magicTo manually load, run the following in your IPython prompt:%load_ext dis_magicTo automatically load, add the following to yourIPython configuration file:c = get_config()
c.InteractiveShellApp.extensions.append('dis_magic')UsageVerifying Python follows PEMDAS:In [6]: %dis foo = 6 ** 2 + 6
  1           0 LOAD_CONST               0 (42)
              2 STORE_NAME               0 (foo)
              4 LOAD_CONST               1 (None)
              6 RETURN_VALUEYou can use it in a cell too:In [4]: %%dis
   ...:
   ...: def fibonacci(n: int) -> int:
   ...:     if n <= 1: return 1
   ...:     return fibonacci(n - 2) + fibonacci(n - 1)
   ...:
  2           0 LOAD_NAME                0 (int)
              2 LOAD_NAME                0 (int)
              4 LOAD_CONST               0 (('n', 'return'))
              6 BUILD_CONST_KEY_MAP      2
              8 LOAD_CONST               1 (<code object fibonacci at 0x111457b30, file "<dis>", line 2>)
             10 LOAD_CONST               2 ('fibonacci')
             12 MAKE_FUNCTION            4 (annotations)
             14 STORE_NAME               1 (fibonacci)
             16 LOAD_CONST               3 (None)
             18 RETURN_VALUE

Disassembly of <code object fibonacci at 0x111457b30, file "<dis>", line 2>:
  3           0 LOAD_FAST                0 (n)
              2 LOAD_CONST               1 (1)
              4 COMPARE_OP               1 (<=)
              6 POP_JUMP_IF_FALSE       12
              8 LOAD_CONST               1 (1)
             10 RETURN_VALUE

  4     >>   12 LOAD_GLOBAL              0 (fibonacci)
             14 LOAD_FAST                0 (n)
             16 LOAD_CONST               2 (2)
             18 BINARY_SUBTRACT
             20 CALL_FUNCTION            1
             22 LOAD_GLOBAL              0 (fibonacci)
             24 LOAD_FAST                0 (n)
             26 LOAD_CONST               1 (1)
             28 BINARY_SUBTRACT
             30 CALL_FUNCTION            1
             32 BINARY_ADD
             34 RETURN_VALUE
Package: dismantler-python
Dismantler██████╗ ██╗███████╗███╗   ███╗ █████╗ ███╗   ██╗████████╗██╗     ███████╗██████╗ 
██╔══██╗██║██╔════╝████╗ ████║██╔══██╗████╗  ██║╚══██╔══╝██║     ██╔════╝██╔══██╗
██║  ██║██║███████╗██╔████╔██║███████║██╔██╗ ██║   ██║   ██║     █████╗  ██████╔╝
██║  ██║██║╚════██║██║╚██╔╝██║██╔══██║██║╚██╗██║   ██║   ██║     ██╔══╝  ██╔══██╗
██████╔╝██║███████║██║ ╚═╝ ██║██║  ██║██║ ╚████║   ██║   ███████╗███████╗██║  ██║
╚═════╝ ╚═╝╚══════╝╚═╝     ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝   ╚═╝   ╚══════╝╚══════╝╚═╝  ╚═╝This module dismantles python code to parse tree, token, symbols and reproduces it to dictionary and string.What is this?Dismantler takes a Python code as input and creates a parse tree in a short time. It also export the parse tree to a dictionary or json. You can get list of tokens or symbols separately if you want. This project can be used for research purpose, such as teaching the source code to deep learning model as tokenized sequential data or interpreting the Python code on token level and using it for educational programs (like tutoring).Basic Usageimport dismantler

d = dismantler.run_from_string('a + 5').dictionary()
print(d)
{
    "type": "symbol",
    "name": "stmt",
    "value": [
        // Nodes...
    ]
}

d = dismantler.run_from_file('file.py').json(indent=4)
print(d)
"{
    "type": "symbol",
    "name": "stmt",
    "value": [
        // Nodes...
    ]
}"InstallationVia pippip3installdismantler-pythonVia sourcegitclonehttp://github.com/harrydrippin/dismantler-pythonContributionThis project is very small now, so contribution to this project is very welcome. Feel free to submit some issues or PRs to this project.
Package: dismo
DIscrete Spatial MOdelsdismo is a Python package for building and analysing discrete spatial models based on ordinary differential equations.
Its primary purpose is to allow arbitrarily complex internal and transport processes to easily be mapped over multiple different regular grids.
For this it features one, two and three-dimensional layouts, with standard and non-standard (e.g. hexagonal or triangular) grids.InstallationIf you quickly want to test out dismo, or do not require assimulo support, install dismo viapipinstalldismoTo enable assimulo support, the easiest way is to install it via mamba using themambaforgedistributionmambacreate-npy311python=3.11assimulo
mambaactivatepy311
pipinstalldismoLicenseGPL 3DocumentationThe official documentation is hostedhere on gitlab.Issues and supportIf you experience issues using the software please contact us through ourissuespage.Contributing to dismoAll contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome.
See ourcontribution guidefor more information.How to citedismo is currently in the publication process. You will find citing information here as soon as possible.
Package: dismod
dismodThis tool aims to generate a dependency graph of the imports in your python
modules. It automatically search for every file with an extesion of.pyand
quickly generate renderings of that file with all imports (used and unused).UsageTo usedismod, first you need to install it usingpippipinstalldismodAfter installed (can be insid a virtualenv or not), go to the project you want
to generate the graphs and run:dismod<path_of_project>For example, let's usedismodown repository to generate some graphs:gitclonegit@github.com:r0x0d/dismodcddismod
dismoddismod
lsrendersGenerate graphviz visualizationIf you want to generate a graphviz from the dotfiles, you can do so by using the following command:dot-Tpngrenders/<file-you-want>.py.dot-ooutput.pngGraph generated from this project!dismod graph visualization
Package: dismod-mr
This project is the descriptive epidemiological meta-regression tool,
DisMod-MR, which grew out of the Global Burden of Disease (GBD) Study
2010.  DisMod-MR has been developed for the Institute of Health
Metrics and Evaluation at the University of Washington from 2008-2013.ContentsExamplesInstallationInstalling from sourceCoding PracticesExamplesA motivating example: descriptive epidemiological meta-regression of Parkinson’s DiseaseAll examplesInstallationDismod MR requires PyMC2 which does not play nicely with normal Python
installation tools.  Fortunately,condahas solved this issue for us.
So first you’ll need to setup a conda environment
(afterinstalling conda, if necessary)
and installpymcversion2.3.8.  Then you can installdismod_mrusingpip.condacreate--name=dismod_mrpython=3.6pymc==2.3.8condaactivatedismod_mrpipinstalldismod_mrIf you get an error statingERROR:Completeoutputfromcommandpythonsetup.pyegg_info:ERROR:Traceback(mostrecentcalllast):File"<string>",line1,in<module>File"/tmp/pip-install-d9fbq7v3/pymc/setup.py",line8,in<module>fromnumpy.distutils.misc_utilimportConfigurationModuleNotFoundError:Nomodulenamed'numpy'----------------------------------------ERROR:Command"python setup.py egg_info"failedwitherrorcode1in/tmp/pip-install-d9fbq7v3/pymc/or something similar, you do not havepymcproperly installed.Installing from sourceIf you want to installdismod_mrlocally in an editable mode, the
instructions are very similar.  We’ll clone the repository and install it
from a local directory instead of usingpipto grab it from the Python
package index.condacreate--name=dismod_mrpython=3.6pymc==2.3.8condaactivatedismod_mrgitclonegit@github.com:ihmeuw/dismod_mr.gitcddismod_mrpipinstall-e.To test this, you can usepytest, which you must first install.pipinstallpytestpytestIf you have things setup right, this will still generate many
warnings, but there should be no tests that produce failures or
errors.Coding PracticesWrite tests before codeWrite equations before testsTest quantitatively with simulation dataTest qualitatively with real dataAutomate testsUse a package instead of DIYTest the packageOptimize code laterOptimize code for readability before speed.pyfiles should be short, less than 500 linesFunctions should be short, less than 25 lines
Package: dismusic
dismusicMusic cog for discord bots. Supports YouTube, YoutubeMusic, SoundCloud and Spotify.Installationpython3-mpipinstalldismusicor from Github (Might be unstable)python3-mpipinstallgit+https://github.com/shahriyardx/dismusic.gitUsagefromdiscord.extimportcommandsbot=commands.Bot(command_prefix='..')bot.lavalink_nodes=[{"host":"losingtime.dpaste.org","port":2124,"password":"SleepingOnTrains"},# Can have multiple nodes here]# If you want to use spotify searchbot.spotify_credentials={'client_id':'CLIENT_ID_HERE','client_secret':'CLIENT_SECRET_HERE'}bot.load_extension('dismusic')bot.run('TOKEN')Commandsconnect-Connect to vcdisconnect-Disconnect from vcplay-Play a song or playlistpause-Pause playerresume-Resume playerseek-Seek playernowplaying-Now playingqueue-See queuevolume-Set volumeloop-Loop song/playlistFilter commands coming soon.EventsEvents that this library dispatcheson_dismusic_player_connect(player):# When player connects to a voice channelon_dismusic_player_stop(player):# When player gets disconnectedon_dismusic_track_start(player,track):# When a song start playingon_dismusic_track_end(player,track):# When a song finishedon_dismusic_track_exception(player,track):# When song stops due to any exceptionon_dismusic_track_stuck(player,track):# When a song gets stuckon_dismusic_player_pause(player):# When player gets pausedon_dismusic_player_resume(player):# When player gets resumedon_dismusic_player_seek(player,previous_position,current_position):# When player seeksLavalink Configs# No SSL/HTTPS{"host":"losingtime.dpaste.org","port":2124,"password":"SleepingOnTrains"}{"host":"lava.link","port":80,"password":"dismusic"}{"host":"lavalink.islantay.tk","port":8880,"password":"waifufufufu"}# SSL{"host":"lavalink.devz.cloud","port":443,"password":"mathiscool","https":True},{"host":"lavalink2.devz.cloud","port":443,"password":"mathiscool","https":True},{"host":"disbotlistlavalink.ml","port":443,"password":"LAVA","https":True},{"host":"lavalink.scpcl.site","port":443,"password":"lvserver","https":True},{"host":"lavalink.mariliun.ml","port":443,"password":"lavaliun","https":True},{"host":"lavalinkinc.ml","port":443,"password":"incognito","https":True},{"host":"node1.lavalink.trgop.gq","port":443,"password":"onionispro","https":True},{"host":"node3.lavalink.trgop.gq","port":443,"password":"onionop","https":True},{"host":"node5.lavalink.trgop.gq","port":443,"password":"htandsm","https":True},{"host":"www.lavalinknodepublic.ml","port":443,"password":"mrextinctcodes","https":True},{"host":"www.lavalinknodepublic2.ml","port":443,"password":"mrextinctcodes","https":True},{"host":"lavalink.cobaltonline.net","port":443,"password":"cobaltlavanode23@","https":True},Join DiscordFor any kind of help