Saravanan666/pypi-org huggingface dataset:
Package: distons
DisTonsAn unofficial third party library of discord.py for discord components.Welcome!Discord components are cool, but distons will support it more. It
is hard to wait, so we made a third-party library for using components such as
buttons or selects!This project is open source ⭐.Also, there is anofficial discord server, so
if you have any questions, feel free to ask it on this server.FeaturesMake Easy ButtonsInteractionsExamplesThird-party of discord.py.DocsComing SoonInstallpip install distonsExampleYou can see many exampleshere.LicenseThis project is under the MIT License.
Package: distool
Классификатор заболеванийPatient-intake- модуль, обеспечивающий дистанционное взаимодействие пациента и медицинского учреждения с помощью диалоговых агентов. Реализован на языке Python.Модуль позволяет предсказывать возможное заболевание пациента на основе введенной им информации, присваивать диагнозу степень срочности приема, а также выводить интерпретацию результатов работы модели. Для обучения модели создан датасет, содержащий информацию о болезнях и их симптомах.Модуль поддерживает анализ текстов на русском языке.ПрименениеМодуль является инструментом для разработки медицинских чат-ботов. Может быть использован для управления потоками пациентов в медицинских учреждениях, а также будет полезен для реализации концепции второго мнения при взаимодействии с пациентом.Установка модуляpip install distoolПример использованияfromdistool.feature_extractionimportSmartSymptomExtractorfromdistool.interpretation.explainerimportSymptomBasedExplainerfromdistool.estimatorsimportDiseaseClassifiertexts=["У меня болит живот, но нет температуры","У меня температура, но нет недомогания","Я завтра иду домой",]diseases=["гастрит","отит","-1"]symptom_vectorizer=SmartSymptomExtractor()features=symptom_vectorizer.transform(texts)classifier=DiseaseClassifier()classifier.fit(features,diseases)predicted_diseases=classifier.predict(features)print("Predicted diseases:",predicted_diseases)# Predicted diseases: ['гастрит' 'отит' '-1']explainer=SymptomBasedExplainer(symptom_vectorizer,classifier)print(explainer.explain(features[1]))# Наблюдается отит с вероятностью 59%.# Это потому что у вас наблюдаются следующие симптомы: температура# И отрицаются следующие: недомоганиеРазработкаНужно установить зависимости и подключить pre-commit.gpip install -r requirements.py
pre-commit install
bash init.shКонтрибьютингКаждый новый функционал должен покрываться документацией и тестом.ТестированиеЧтобы запустить тесты нужно ввести:pytestPull requestКаждый PR должен быть отревьювен.История проектаРабота надPatient-intakeпроводится в рамках НИР Университета ИТМО №622275 "Разработка модуля для предварительного диагноза: поддержание логистики потоков пациентов и концепции второго мнения при взаимодействии с пациентом через диалоговые системы" (2022-2023)Участники проектаАнна Чижикруководитель проектаМичил ЕгоровтимлидДмитрий погребнойразработчикАйталина КривошапкинаразработчикМария ЯкубовааналитикОбратная связьЕсли у Вас есть какие-то вопросы, можете обращаться к нам по адресу:patientintake@yandex.ru
Package: distopia
distopiaFaster distance calculations for the year 2022 🚀 🚀 🚀 using x86 SIMD intrinsicsGet it on PyPi withpipinstalldistopiaor get it from conda-forge withconda install -c conda-forge distopiaDocumentation can be found athttps://www.mdanalysis.org/distopia/Follow the instructions in the documentation for building from source!A very simple build might look like the followingpythonsetup.pyinstallYou can then use the fast distance functions provided bydistopia!NOTEDistopia is currently only for x86 processors
Package: distortiongenerator
DistortionGeneration ToolboxUsageDetailed description of usage will be released soon.Requirementpython >= 3.6opencv-pythonpillownumpyAcknowledgementThis DistortionGeneration toolbox is developed atMMSPGEPFL in the framework ofXAIfaceChist-Era Project.CitationPlease consider citing our paper in your publications if the project helps your research. BibTeX reference is as follows.
Package: dis-tp
DIS_TPThis is the python version of the code I used for my master's thesis. It computes the F2 and FL structure functions for DIS with heavy-quark production at NLO, NNLO and N3LO. It is also able to construct the scale varied result (at the moment only threshold scale variation
is available) and obtain uncertainty bands based on that and on coefficient function uncertainties (at N3LO).
Package: distprob
# distprobdistprob is a Python library for dealing with distribution calculation and visualization.Gaussian distribution class - calculating and visualizing a Gaussian distribution.
Binomial distribution class - calculating and visualizing a Binomial distribution.
Generic distribution class - calculating and visualizing a probability distribution.## InstallationUse the package manager pip to install distprob.`bash pip install distprob `## Usage`python from distprob import Gaussian gaussian_one = Gaussian(25, 2) gaussian_one.mean gaussian_one + gaussian_one from distprob import Binomial binomial_one = Binomial(, 2) binomial_one.mean binomial_one + binomial_one `## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.## License
[MIT](https://choosealicense.com/licenses/mit/)
Package: dist-py-module
Generate setup.pydist_py_moduleis toolset for generation of setup.py.Developed inpythoncode.The README is used to introduce the modules and provide instructions on
how to install the modules, any machine dependencies it may have and any
other information that should be provided before the modules are installed.Table of ContentsInstallationInstall using pipInstall using buildInstall using py setupInstall using dockerDependenciesTool structureDocsContributingCopyright and licenceInstallationUsed next development environmentCurrently there are four ways to install frameworkInstall process based on using pip mechanismInstall process based on build mechanismInstall process based on setup.py mechanismInstall process based on docker mechanismInstall using pipPython is located atpypi.org.You can install by using pip# python3pip3installdist-py-moduleInstall using buildNavigate torelease pagedownload and extract release archive.To installdist-py-moduleruntarxvzfdist-py-module-x.y.z.tar.gzcddist-py-module-x.y.z# python3wgethttps://bootstrap.pypa.io/get-pip.py
python3get-pip.pypython3-mpipinstall--upgradesetuptools
python3-mpipinstall--upgradepip
python3-mpipinstall--upgradebuild
pip3install-rrequirements.txt
python3-mbuild-s--no-isolation--wheel
pip3installdist/dist-py-module-x.y.z-py3-none-any.whl
rm-fget-pip.pyInstall using py setupNavigate to releasepagedownload and extract release archive.To installdist_py_moduletype the followingtarxvzfdist_py_module-x.y.z.tar.gzcddist_py_module-x.y.z/# python3pip3install-rrequirements.txt
python3setup.pyinstall_lib
python3setup.pyinstall_data
python3setup.pyinstall_egg_infoInstall using dockerYou can use Dockerfile to create image/container.Dependenciesdist_py_modulerequires next modules and librariesdist-py-module - Python App/Tool/Script UtilitiesTool structuredist_py_moduleis based on OOP.Generator structuredist_py_module/├──conf/│├──dist_py_module.cfg│├──dist_py_module.logo│├──dist_py_module_util.cfg│├──project.yaml│└──template/│├──MANIFEST.template│├──pyproject.template│├──setup_package.template│├──setup.template│└──setup_tool.template├──__init__.py├──log/│└──dist_py_module.log├──pro/│├──__init__.py│├──read_template.py│└──write_template.py└──run/└──dist_py_module_run.py5directories,15filesDocsMore documentation and info atdist_py_module.readthedocs.iowww.python.orgContributingContributing to codecipherCopyright and licenceCopyright (C) 2017 - 2024 byvroncevic.github.io/dist_py_moduledist_py_moduleis free software; you can redistribute it and/or modify
it under the same terms as Python itself, either Python version 3.x or,
at your option, any later version of Python 3 you may have available.Lets help and support PSF.
Package: distquant
Distributional QuantizationDistributional quantization provides an information theoretically optimal and efficient quantization of data following a distributional prior.This repository includes apre-print of an excerpt of the distributional quantization paper.Simulation plots can be foundhere.Thedistquantpackage requires PyTorch and can be installed viapipinstalldistquant💻 UsageThedistquantpackage can be used to efficiently and effectively quantize tensors (e.g., embeddings to be stored or weights of a neural network) using distributional quantization.
In particular, the API of the package provides two core functions:distquant.quantize(data, k=k)for quantizing a Tensordataof floating point values.distquant.dequantize(quantized_data, **info)for dequantizingquantized_data.In detail, the API is specified asimporttorchfromdistquantimportquantize,dequantizedata=torch.randn(10_000)q_data,info=quantize(data,k=4,# number of bits to quantize to; alternatively specify `n`.# n=15,           # number of quantization points; mutually exclusive to `k`.dist='gaussian',# distributional assumptionpackbits=True,# Packs the results into int64, e.g., for `k=4`, there will be 16 values in each element# for storing. If set to `False`, the indices are returned in raw format.beta=1.0,# Factor hyperparameter for adjusting the range of values (esp. important for small `k`).zero=None# Can enforce a particular zero (by setting it to a resp. float, e.g., `0.`))deq_data=dequantize(data,**info)Bitpacking (packbits=True) allows storing the data efficiently, e.g., 21 3-bit values can be stored in a single int64.betamay be setNone(default), which will cause an automatic search for the optimal choice. This can be more expensive but is valuable for smallerk/n.Settingdist=Nonesearches for the best distribution to quantize the provided data.Supported options fordist:['gaussian''gaussian_cdf','logistic','logistic_cdf','gumbel','gumbel_cdf','exponential','exponential_cdf','cauchy_cdf']📖 Citing@article{petersen2023distributional,title={{Distributional Quantization}},author={Petersen, Felix and Sutter, Tobias},year={2021--2023}}📜 Licensedistquantis released under the MIT license. SeeLICENSEfor additional details about it.
Package: distracting-control
This is a packaged version of thedistracting_controlsuite fromStone et al. We provide OpenAI gym bindings, to make the original code-block
base easier to use.Getting Startedpipinstalldistracting_controlThen in your python script:importgymenv=gyn.make('gdc:Hopper-hop-easy-v1',from_pixel=True)obs=env.reset()doc.figure(obs,"figures/hopper_readme.png?raw=true")Detailed APITake a look at the test file in thehttps://github.com/geyang/distracting_control/blob/master/specsfolder, and
the source code-block. DeepMind control has a lot of low level binding burried
in the source code-block.deftest_max_episode_steps():env=gym.make('distracting_control:Walker-walk-easy-v1')assertenv._max_episode_steps==250deftest_flat_obs():env=gym.make('distracting_control:Walker-walk-easy-v1',frame_skip=4)env.env.env.env.observation_spec()assertenv.reset().shape==(24,)deftest_frame_skip():env=gym.make('distracting_control:Walker-walk-easy-v1',from_pixels=True,frame_skip=8)assertenv._max_episode_steps==125deftest_channel_first():env=gym.make('distracting_control:Walker-walk-easy-v1',from_pixels=True,channels_first=True)assertenv.reset().shape==(3,84,84)deftest_channel_last():env=gym.make('distracting_control:Walker-walk-easy-v1',from_pixels=True,frame_skip=8,channels_first=False)assertenv._max_episode_steps==125assertenv.reset().shape==(84,84,3)Important Changes fromStone et al[planned] remove tensorflow dependency[planned] increase ground floor transparency inHopperOriginal READMEdistracting_controlextendsdm_controlwith static or dynamic
visual distractions in the form of changing colors, backgrounds, and
camera poses. Details and experimental results can be found in ourpaper.Requirements and InstallationClone this repositorysh run.shFollow the instructions and installdm_control.
Make sure you setup your MuJoCo keys correctly.Download theDAVIS 2017
dataset. Make
sure to select the 2017 TrainVal - Images and Annotations (480p). The
training images will be used as distracting backgrounds.InstructionsYou can run thedistracting_control_demoto generate sample
images of the different tasks at different difficulties:python distracting_control_demo --davis_path=$HOME/DAVIS/JPEGImages/480p/
--output_dir=/tmp/distrtacting_control_demoAs seen from the demo to generate an instance of the environment you
simply need to import the suite and usesuite.loadwhile
specifying thedm_controldomain and task, then choosing a
difficulty and providing the dataset_path.Note the environment follows the dm_control environment APIs.PaperIf you use this code-block, please cite the accompanyingpaperas:@article{stone2021distracting,
      title={The Distracting Control Suite -- A Challenging Benchmark for Reinforcement Learning from Pixels},
      author={Austin Stone and Oscar Ramirez and Kurt Konolige and Rico Jonschkowski},
      year={2021},
      journal={arXiv preprint arXiv:2101.02722},
}DisclaimerThis is not an official Google product.
Package: distrans
distransA simple package to translate your discord bot to different
languagesKey FeaturesFast work and async support.The only requirement isdisnake.next-translate-like file
structure and syntax.InstallingPython 3.8 or higher is required.# Linux/macOSpython3-mpipinstall-Udistrans# Windowspy-3-mpipinstall-UdistransQuick ExampleInline translation examplefromdistransimportTranslationInteractionBotbot=TranslationInteractionBot(directory="locales",languages=["en","fr","es","uk"])@bot.slash_command()asyncdefping(inter,language:str):awaitinter.send(bot.get("common:greeting",code=language,values={"name":inter.user.name}))defmain():bot.run("TOKEN")if__name__=="__main__":main()Using async/awaittranslated=awaitbot.t("common:greeting",code=language,values={"name":inter.user.name})Advanced usagefromdistransimportTranslationInteractionBotclassMyTranslationInteractionBot(TranslationInteractionBot):defget_language(**kwargs):# kwargs - it's the same kwargs that you're passing to the# get() or t() method# like:# await bot.t("common:greeting", values={"name": "John"},#inter=inter)# you will get an inter object in kwargs# Your code herereturn"en"# you can return language code based on current context# (guild, user, etc.)locales/en/common.json{"greeting":"Hello, $name!"}locales/fr/common.json{"greeting":"Bonjour, $name!"}locales/es/common.json{"greeting":"Hola, $name!"}locales/uk/common.json{"greeting":"ÐŸÑ€Ð¸Ð²Ñ–Ñ‚, $name!"}
Package: distribeauty
DistribeautySimple python package, capable of calculating and plotting the probability distribution functions for both Gaussian and Binomial distributions. For a mathematical background you can refer toGaussianandBinomiallinks accordinglyDependenciesmatplotlib(can be installed viapip install matplotlib, if you are using different package manager, refer to the instruction)unittestfor testingList of methods and brief descriptioncalculate_mean()andcalculate_stdev()simply calculates both mean and standard deviation of your data accordinglyplot_histogram()andplot_histogram_pdf(n_spaces)are method to output a histogram of the instance variable data usingmatplotlib.pyplotlibrary and method to plot the normalized histogram of the data and a plot of the probability density function along the same range accordingly (n_spacesrefer to a number of data points, forBinomialuseplot_bar()andplot_bar_pdf()pdf(x)probability density function calculatorread_data_file(file_name)inherits fromGeneralDistributionclass to read the datareplace_stats_with_data()Binomialexclusive function to to calculate probability of the positive outcome and number of trials from the data setTestsUtilize the test.py script included in the package in order to test the functions functionality.
Package: distribute-config
Distribute ConfigA package to handle multi-source distributed configurationThis package handle the problem of multi-source configuration in python. For a python program containing a set of configuration variables,
this package will populate the values of these configuration variables by looking for a yaml configuration file, then will overwrite the values of the
variables by looking for matching environment variables and then, if the program was started with some arguments, will once again overwrite the values of the configuration by loading these variablesMoreover, this package allow you to define configuration variables in multiple python files, using a namespace system so you can't accidentally break other parts of the configuration, so the configuration stay near the code that needs it and you can update your configuration by just importing new python files.ExampleLet the following python program app.py:fromdistribute_configimportConfigConfig.define_int("nb",1,"some number")Config.define_str_list("list",["a","b","c"],"some list")Config.define_enum("logger","debug",["info","debug","warn"],"the logger level")Config.load_conf()print(Config.get_dict())by running it withpython app.pyit will create a file config.yml :list:
- a
- b
- c
nb: 1
logger: debugand display :{'nb': 1, 'list': ['a', 'b', 'c'], 'logger' : 'debug'}Now if we update config.yml:list:
- a
- b
nb: 2python app.pywill print{'nb': 2, 'list': ['a', 'b']}NB=3 python app.pywill print{'nb': 3, 'list': ['a', 'b']}NB=3 python app.py --nb 4will print{'nb': 4, 'list': ['a', 'b']}Moreover,python app.py --helpwith display all the possible variables and useful commentsExample 2: namespaceLet change app.py to be:fromdistribute_configimportConfigConfig.define_int("nb",1,"some number")withConfig.namespace("set1"):Config.define_int("nb",2,"some other number")withConfig.namespace("set2"):Config.define_int("nb",3,"and again")Config.define_int("other.nb",4,"last")Config.load_conf()print(Config.get_dict())Runningpython app.pywill display{'nb': 1, 'set1': {'nb': 2, 'set2': {'nb': 3}}, 'other': {'nb': 4}}and the created config.yml is:nb: 1
other:
  nb: 4
set1:
  nb: 2
  set2:
    nb: 3python app.pywill print{'nb': 1, 'set1': {'nb': 2, 'set2': {'nb': 3}}, 'other': {'nb': 4}}SET1__SET2__NB=30 python app.pywill print{'nb': 1, 'set1': {'nb': 2, 'set2': {'nb': 30}}, 'other': {'nb': 4}}SET1__SET2__NB=30 python app.py --set1.set2.nb=40will print{'nb': 1, 'set1': {'nb': 2, 'set2': {'nb': 40}}, 'other': {'nb': 4}}FeaturesThe config support single variables (int, float, str, bool) but also list (int, float, str) and enumWhen loading configuration using Config.load_conf(), you can specify the name of the config file you want to create or load, and you can also specify if you don't want a config file to be create or if you want to update the content of the current config file (usefull when adding new features)Testsnosetests -v
Package: distributed-asgi
Distributed ASGIUses Redis to distribute ASGI messages between worker ASGI apps based on routes.  Workers can be on different machines, they just must be able to connect to the central Redis server.UsageRoutes are made of two parts: a regular expression that matches a path, and a key template string that is used to form the key that ASGI events are pushed to.Key templates can also use numbered regex backslash replacements.  For example, the route{"/api/([a-z-]+)":r"API-\1"}will match and produce the following keys:PATH                KEY
/api/test           API-test
/api/test/38        API-test
/api/banana         API-banana
/test/api/test2     API-test2Here's an example:# distributor.pyfromdistributed_asgiimportcreate_path_distributorapp=create_path_distributor(host="mywebsite.com",# point to redis serverport=6379,db=0,password="abc123",routes={"/api/([a-z-]+)":r"ASGI-\1","/worker/([0-9]+)":r"worker-queue-\1","/":"ALL-WEBSITE-TRAFFIC"})To actually make use of this, we need to make a worker that listens on one or more of the keys# worker.pyfromdistributed_asgiimportNodeclassASGIApp:def__init__(self,scope):self.scope=scopeasyncdef__call__(self,receive,send):awaitsend({"type":"http.response.start","status":200})awaitsend({"type":"http.response.body","body":b"Hello World!"})node=Node(host="mywebsite.com",port="6379",password="abc123",cls=ASGIApp,key='ASGI-testing')print(f"Starting worker")node.run()Once you haveworker.pyandserver.py, use some interface server to rundistributor.py.$ uvicorn server:Appand runworker.pyas a normal python script:$ python worker.pyThe worker will only respond to http requests with a path that contains/api/testingbecause that is the only key we told it to listen to.What happens if there are no workers?If there is no Node instance listening on a key that the Distributor pushes events to, the Distributor will timeout after 5 seconds, close the connection, and return a 405 error.  Workers do not need to respond within 5 seconds, the Node class will automatically let the Distributor know there is a worker at least listening.
Package: distributedchat
This program will implement distributed chat on virtual ring topology
network. Furthermore this program will implement Chang-Roberts algorithm
to achieve full ordering of messages.Features:Nodes can freely join into existing ring, based on information about one node (IP:port). First node will join with itself into ring.Ring will recover from unexpected disconnect of one node at the time.One node will be elected as central authority (leader), all messages will be then passed through leader.Leader will be elected using Chang-Roberts algorithm.GUI in Qt, it will also have CLI.Encryption of messages.How to build documentationCreate virtual environment using:python3.5-mvenv envActivate virtual environment:. env/bin/activateInstall dependencies:python-mpip install-rrequirements.txtChange directory into docs:cd docsBuild documentation:make htmlOpen filedocs/_build/html/index.htmlto view documentation.How to run testsRun (in installed and activated virtual environment):python setup.py testorpytest-vtests/test_chat.py
Package: distributed-compy
Distributed_compy is a distributed computing library that offers multi-threading, heterogeneous (CPU + mult-GPU), and
multi-node (hybrid cluster -- more than one machine with CPU+GPUs) paradigms to leverage the processing power of a
cluster. Cython is used to generate glue code for the core C/C++ functions and provide wrappers to call from Python.
Requires numpy, CUDA toolkit>=2.0, OpenMP, and OpenMPI. Note: this library does not use the popular mpi4py library.Features:Get/set/configure bandwidths of local node or entire cluster whether by supplied numpy array or from binary data filesCode generator to write temporary binary data files or python files that are to be executed on each nodeExecute mpirun command from master node with default env var or configurable hostfileReduction sum with functionality scaling such as python naive sum, multi-thread reduction sum,
multi-gpu reduction sum, heterogeneous reduction sum, and hybrid heterogeneous reduction sum.Additional features such as other reduction operations, dot product, matrix multiplication, image processing kernels,
neural networks, and finite element method functions are under consideration for future releases.
Package: distributed-control-fenics
Distributed Control for FEniCSA module of helper functions that assembles (distributed) control and observation
operators using FEniCS.Some theory can be found in our preprintBehr, Benner, Heiland (2017):Example Setups of Navier- Stokes Equations with
Control and Observation: Spatial Discretization and Representation via
Linear-quadratic Matrix Coefficientsarxiv:1707.08711