Saravanan666/pypi-org huggingface dataset:
Package: dist-truncate
dist-truncateA small python package for truncating (continuous) scipy distributions.InstallationFrom pypiTo install this package from pypi simply runpip install dist-truncateFrom sourceTo install from source clone this repository and install via pip:git clone https://github.com/schoennenbeck/dist-truncate.git
cd dist-truncate
pip install .UsageIntroductionAfter installation simply import the packageimport dist_truncateThis adds a propertytruncatedto all distributions of typescipy.stats.rv_continuous. The property
is itself of typescipy.stats.rv_continuousand works the same way as the distribution that was
started with but with two additional shape-argumentstrunc_minandtrunc_maxthat can be used
to truncated the support of the distribution to the intervaltrunc_min <= x <= trunc_max.Note that some distributions (e.g. the normal distribution) already have an explicit truncated version
implemented. In this case the explicit version should be used since it is most likely numerically more
stable than this generic implementation.ExampleLet us truncate the standard normal distribution to the interval-0.5 <= x <= 2.0. As noted above
the truncated normal is already implemented so we can compare the results and make sure that this
generic version actually computes the right outputs.import dist_truncate
from scipy import stats
import numpy as npComparing the cummulative density functions at multiple points:stats.truncnorm.cdf(np.arange(-3, 3, 0.5), -0.5, 2.0)
# Output: array([0.        , 0.        , 0.        , 0.        , 0.        ,
       0.        , 0.28631514, 0.57263027, 0.79676594, 0.93411656,
       1.        , 1.        ])
stats.norm.truncated.cdf(np.arange(-3, 3, 0.5), -0.5, 2.0)
# Output: array([0.        , 0.        , 0.        , 0.        , 0.        ,
       0.        , 0.28631514, 0.57263027, 0.79676594, 0.93411656,
       1.        , 1.        ])Comparing the inverse of the cdf:stats.truncnorm.ppf(np.arange(0, 1, 0.2), -0.5, 2.0)
# Output: array([-0.5       , -0.14519108,  0.19172827,  0.55269814,  1.00897798])
stats.norm.truncated.ppf(np.arange(0, 1, 0.2), -0.5, 2.0)
# Output: array([-0.5       , -0.14519108,  0.19172827,  0.55269814,  1.00897798])The minimum and maximum for the truncation can also be called as keyword-arguments:stats.loguniform.truncated.support(1, 100, trunc_max=80, trunc_min=20)
# Output: (20, 80)Broadcasting of shapes works the same as for all other arguments:stats.loguniform.truncated.support(
    [1, 50],
    [50, 100],
    trunc_min=20,
    trunc_max=[[30, 40], [60, 100]]
)
# Output: (array([[20, 50], [20, 50]]), array([[ 30,  40], [ 50, 100]]))
Package: disttune
For all of this, you’ll need authentication details for a PostgreSQL server,
in a bunch of environment variables. Perhaps you might set those like this:export TUNE_DBHOST=tuning-database.example.com
export TUNE_DBNAME=disttune
export TUNE_DBUSER=sampleuse
export TUNE_DBPASSWORD=Yeizah2uCreate jobs for an autotuning run:python -m disttune enum exampletune.RunThe dotted nameexampletune.Runis actually the name of the
class that’s driving the run.Actually run jobs:python -m disttune run --stop -v --filter run_class=exampletune.Run "it_type~list"The filter expression can be used to limit what jobs are run.Run interactive Python shell with database connection:python -m disttune console
>>> .q select * from run;
Package: distutils_build_without_typehints
This package provides a setup.py build command that strips typehints from the code during the build.
This is necessary for code bases that use the typehint features of python 3.6 which sometimes do not work in python 3.5 and
are not available before 3.5.This package is a quick hack to get packages that do not work with older python version because of type hints to work again. However, it only strips things from the typing module in a very primitive manner.UsageAdd the package to your setup requirements:setup(
    ...
    setup_requires=[
        ...
        'distutils_build_without_typehints',
        ...
    ],
    ...
)And put an alias in the setup.cfg:[aliases]
build=build_without_typehints
Package: distutilscross
Really it lets you cross build binary extensions.You need to export PYTHONXCPREFIX and LDFLAGS, something like::$ export PYTHONXCPREFIX=/opt/eldk/ppc_4xxFP/usr$ export LDFLAGS="-L/opt/eldk/ppc_4xxFP/lib -L/opt/eldk/ppc_4xxFP/usr/lib"It should pick up the correct include paths from the PYTHONXCPREFIX. To builduse::$ python setup.py build -xTo make a cross compiled egg::$ python setup.py build -x bdist_egg --plat-name linux-ppc --exclude-source-files
Package: distutils-extra-python
distutils-extracan be used with python’s distutils or the enhanced setuptools.1. DISTUTILSTo make use of the distutils extenstions, you have to import the corresponding methods at the beginning of your setup.py:fromDistUtilsExtra.commandimport*Furthermore you have to map the methods to the extended ones:cmdclass={"build":build_extra.build_extra,"build_i18n":build_i18n.build_i18n}If you have replaced the default build command by build_extra and defined the other commands e.g. build_i18n, the sub commands e.g. will be called automatically. There is no need to enable them in the setup.cfg anymore (This was require in a previous version). Disabling imported commands in the setup.cfg is still possible:[build]i18n=FalseSee the setup.cfg.example for a more complex layout.Currently there are the following extensions available:build_extra:initiatestheextensionsbuild_i18n:providesgettextintegrationbuild_icons:installsiconsbuild_help:installsadocbookbaseddocumentation2. SETUPTOOLSJust enable the corresponding build target in the setup.cfg:[build]i18n=Truehelp=Trueicons=TrueNo further imports or modifications are required.I hope that this code could help you to make your live easier,3. DistUtilsExtra.autoThis module provides a setup() method for distutils and DistUtilsExtra which
infers as many setup() arguments as possible. The idea is that your setup.py
only needs to have the metadata and some tweaks for unusual files/paths, in a
“convention over configuration” paradigm.This currently supports:-Pythonmodules(./*.py,onlyinrootdirectory)-Pythonpackages(alldirectorieswith__init__.py)-GtkBuilder(*.ui)-Qt4userinterfaces(*.ui)-D-Bus(*.confand*.service)-PolicyKit(*.policy.in)-Desktopfiles(*.desktop.in)-KDE4notifications(*.notifyrc.in)-scripts(allinbin/,and./<projectname>-Auxiliarydatafiles(indata/*)-automaticpo/POTFILES.in(withallsourcefileswhichcontain_())-automaticMANIFEST(everythingexceptswapandbackupfiles,*.pyc,andrevisioncontrol)-manpages(*.[0-9])-fileswhichshouldgointo/etc(./etc/*,copiedverbatim)-determining"requires"fromimportstatementsinsourcecode-determining"provides"fromshippedpackagesandmodulesIf you follow above conventions, then you don’t need any po/POTFILES.in, ./setup.cfg or ./MANIFEST.in, and just need the project metadata (name, author, license, etc.) in ./setup.py.Author: Henry Fuheng Wu, Sebastian Heinlein, Martin Pitt
Package: distutils-licenses
A command for setup.py to print the licenses of installed packages.To use, adddistutils-licensesto thesetup_requireskeyword arg to thesetupcall in yoursetup.py:setup(
    # ...
    setup_requires=['distutils-licenses'],
    # ...
)After modifying yoursetup.py, you will have alicensescommand available to you:python setup.py licenses
Package: distutils-pytest
distutils-pytest - Call pytest from a setup.py scriptThis Python module implements atestcommand for asetup.pyscript.  The command will callpytestto run your package’s test
suite.DownloadThe latest release version can be found in thePython Package Index (PyPI).System requirementsPython3.4 and newer.Required library packagessetuptoolspytestOptional library packagesThese packages are only needed in certain cases:setuptools_scmThe version number is managed using this package.  All source
distributions add a static file with the version number and fall
back using that ifsetuptools_scmis not available.  So this
package is only needed to build out of the plain development source
tree as cloned from GitHub.InstallationYou can install python-icat from PyPI using pip:$ pip install distutils-pytestCopyright and LicenseCopyright 2013-2015
Helmholtz-Zentrum Berlin für Materialien und Energie GmbHCopyright 2015-2023 Rolf KrahlLicensed under theApache License, Version 2.0 (the “License”); you
may not use this package except in compliance with the License.Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.  See the License for the specific language governing
permissions and limitations under the License.
Package: distxml
distxmlConvert labeled data to xml at scale.InstallationRun the following command:pipinstalldistxmlUsageImport the the package and create an instance ofXMLConverterwith
your desired outer xml tag.from distxml.xml_converter import XMLConverter

xml_con = XMLConverter("Hello")You now have anXMLConverterobject, and if you print it
would write<Hello />to console. Now add data you want
within theHellotags.data = [
    {'start':'Good morning', 'finish':' Good night'},
    {'finish':' Good evening', 'start':'Good morning again'}
]

xml_con.queue(data)Now this data is queued in the XMLConverter object, but if you printxml_con, it will still write<Hello />to console.
To solve this, you must compile the data.xml_con.compile("Greetings")Now if you print, the console will read<Hello><Greetings><start>Good morning</start><finish> Good night</finish></Greetings><Greetings><finish> Good evening</finish><start>Good morning again</start></Greetings></Hello>Finally, to write to a file, just usexml_con.write_to_file("filepath/file.xml")And there you go, a new xml file!
Package: distython
distythonImplementation of state-of-the-art distance metrics from research papers which can handle mixed-type data and missing values.
At the moment, HEOM, HVDM and VDM are tested and working. VDM and HVDM has been released recently so please report bugs, if there are any.
Please feel free to help and contribute to the project as there is a lack of existing implementations of hetergeneous distance metrics.InstallationClone the repository withgit clone.
Install the necessary packages withpipenv installExample - HEOM# Example code of how the HEOM metric can be used together with Scikit-Learnimportnumpyasnpfromsklearn.neighborsimportNearestNeighborsfromsklearn.datasetsimportload_boston# Importing a custom metric classfromHEOMimportHEOM# Load the dataset from sklearnboston=load_boston()boston_data=boston["data"]# Categorical variables in the datacategorical_ix=[3,8]# The problem here is that NearestNeighbors can't handle np.nan# So we have to set up the NaN equivalentnan_eqv=12345# Introduce some missingness to the data for the purpose of the examplerow_cnt,col_cnt=boston_data.shapeforiinrange(row_cnt):forjinrange(col_cnt):rand_val=np.random.randint(20,size=1)ifrand_val==10:boston_data[i,j]=nan_eqv# Declare the HEOM with a correct NaN equivalent valueheom_metric=HEOM(boston_data,categorical_ix,nan_equivalents=[nan_eqv])# Declare NearestNeighbor and link the metricneighbor=NearestNeighbors(metric=heom_metric.heom)# Fit the model which uses the custom distance metricneighbor.fit(boston_data)# Return 5-Nearest Neighbors to the 1st instance (row 1)result=neighbor.kneighbors(boston_data[0].reshape(1,-1),n_neighbors=5)print(result)Research PapersThe code have implemented based on the following literature:
HEOM, VDM and HVDM:https://arxiv.org/pdf/cs/9701101.pdf
Package: dis-uniter
This creates a simple website to go with your discord.py bot onhttps://replit.comso it can be kept alive.UsageRun in shell:poetryadddis-uniterStore your bot token in a secret calledDISCORD_TOKEN. Secrets are accessed through the lock icon on the left on desktop, and commands tab at the bottom > secrets on mobile.fromdiscord.extimportcommandsfromdisuniterimportkeepAlivebot=commands.Bot()# normal bot code here...keepAlive(bot)Wait, where's thebot.run?? ThekeepAlivefunction does that for youTo enforce using a secret to store your token so you don't expose it (NEVER expose it even if you are to remove it instantly, because people can check your repl's history)To restart your bot automatically when there's a rate limit. Rate limits are caused by too many requests from the same IP that is shared across multiple repls, and are responsible for downtimes on replit-hosted bots.Why this?No dependencies, unlike the typical Flask keep-aliveNo spammy output, unlike Flask and the keep-alive I usually recommended on the replit discordRestart your repl when there's a rate limitIt shows stats about your bot. You can update bot/user info shown by hitting enter. Seehttps://discord-maths-bot.umarismyname.repl.co/It automatically adds your repl tohttps://up.repl.link, a pinger, if it isn't already thereIt usesSolarized, which is objectively the best colour palette ever.Why is it called dis-uniter?I am keeping Discord bots alive. Discord = disagreement. I am dis-uniting by keeping disagreements alive.
Package: disunity
disunityPython framework for Discord interactions using a web serverInstallationpip install disunityIntroduction to Disunityimportdisunityserver=disunity.DisunityServer()if__name__=='__main__':server.run()Using packagesimportdisunityimportpathlibserver=disunity.DisunityServer()@server.before_servingdefload_packages():forpackagein[f"{f.parent}.{f.stem}"forfinpathlib.Path("packages").glob("*.py")]:server.load_package(package)if__name__=='__main__':server.run()Setting up a packagefromdisunityimportpackage,utilsclassFirstPackage(package.Package):def__init__(self,app):self.app=app@package.Package.command('ping')asyncdefping(self,ctx):returnawaitctx.callback("Pong!")defsetup(app):app.register_package(FirstPackage(app))DisclaimerThis will require that you already have hosting service for the server to run on as well as a domain to host the server on. If you have neither of these, an alternative would be to host on Heroku using a web application with Gunicorn.Side noteThe server will receive interactions to the/interactionsendpoint of your server. It will look like this:https://example.com/interactions. Once you run the server, put the url with the added interactions endpoint into theinteractionsURL on your app located in the Discord developer portal.
Package: disutils
disutilsA very useful library made to be used withdiscord.py.Note:This library DOES NOT support forks of discord.py.This is a fixed and enhanced fork oftoxicracker's DiscordUtilsInstallationBasic install: (InviteTracker, Paginator)$pipinstalldisutilsMusic install:$pipinstalldisutils[voice]Requires discord.py[voice]LinksDocumentationExamplesSupportPlease make sure that you are on the latest version ofdisutilsandyoutube_dlbefore contacting for support!DMGFIZ Auxea#8304on Discord for support.
Package: disvoice-glottal
Glottal source featuresglottal.pyCompute phonation features derived from the glottal source reconstruction from sustained vowels.Nine descriptors are computed:Variability of time between consecutive glottal closure instants (GCI)Average opening quotient (OQ) for consecutive glottal cycles-> rate of opening phase duration / duration of glottal cycleVariability of opening quotient (OQ) for consecutive glottal cycles-> rate of opening phase duration /duration of glottal cycleAverage normalized amplitude quotient (NAQ) for consecutive glottal cycles-> ratio of the amplitude quotient and the duration of the glottal cycleVariability of normalized amplitude quotient (NAQ) for consecutive glottal cycles-> ratio of the amplitude quotient and the duration of the glottal cycleAverage H1H2: Difference between the first two harmonics of the glottal flow signalVariability H1H2: Difference between the first two harmonics of the glottal flow signalAverage of Harmonic richness factor (HRF): ratio of the sum of the harmonics amplitude and the amplitude of the fundamental frequencyVariability of HRFStatic or dynamic matrices can be computed:Static matrix is formed with 36 features formed with (9 descriptors) x (4 functionals: mean, std, skewness, kurtosis)Dynamic matrix is formed with the 9 descriptors computed for frames of 200 ms length.Notes:The fundamental frequency is computed using the RAPT algorithm.Script is called as followspythonglottal.py<file_or_folder_audio><file_features.txt>[dynamic_or_static(defaultstatic)][plots(trueorfalse)(defaultfalse)][kaldioutput(trueorfalse)(defaultfalse)]Examples:pythonglottal.py"../audios/001_a1_PCGITA.wav""glottalfeaturesAst.txt""true""true""txt"pythonglottal.py"../audios/098_u1_PCGITA.wav""glottalfeaturesUst.csv""true""true""csv"pythonglottal.py"../audios/098_u1_PCGITA.wav""glottalfeaturesUdyn.pt""false""true""torch"pythonglottal.py"../audios/""glottalfeaturesst.txt""true""false""txt"pythonglottal.py"../audios/""glottalfeaturesst.csv""true""false""csv"pythonglottal.py"../audios/""glottalfeaturesdyn.pt""false""false""torch"KALDI_ROOT=/home/camilo/Camilo/codes/kaldi-master2exportPATH=$PATH:$KALDI_ROOT/src/featbin/
pythonglottal.py"../audios/098_u1_PCGITA.wav""glottalfeaturesUdyn""false""false""kaldi"pythonglottal.py"../audios/""glottalfeaturesdyn""false""false""kaldi"Jupyter notebookResults:Glottal analysis from a sustained vowel
!References[1]Belalcázar-Bolaños, E. A., Orozco-Arroyave, J. R., Vargas-Bonilla, J. F., Haderlein, T., & Nöth, E. (2016, September). Glottal Flow Patterns Analyses for Parkinson’s Disease Detection: Acoustic and Nonlinear Approaches. In International Conference on Text, Speech, and Dialogue (pp. 400-407). Springer.
Package: disvoice-glottalLP
Glottal source featuresglottal.pyCompute phonation features derived from the glottal source reconstruction from sustained vowels.Nine descriptors are computed:Variability of time between consecutive glottal closure instants (GCI)Average opening quotient (OQ) for consecutive glottal cycles-> rate of opening phase duration / duration of glottal cycleVariability of opening quotient (OQ) for consecutive glottal cycles-> rate of opening phase duration /duration of glottal cycleAverage normalized amplitude quotient (NAQ) for consecutive glottal cycles-> ratio of the amplitude quotient and the duration of the glottal cycleVariability of normalized amplitude quotient (NAQ) for consecutive glottal cycles-> ratio of the amplitude quotient and the duration of the glottal cycleAverage H1H2: Difference between the first two harmonics of the glottal flow signalVariability H1H2: Difference between the first two harmonics of the glottal flow signalAverage of Harmonic richness factor (HRF): ratio of the sum of the harmonics amplitude and the amplitude of the fundamental frequencyVariability of HRFStatic or dynamic matrices can be computed:Static matrix is formed with 36 features formed with (9 descriptors) x (4 functionals: mean, std, skewness, kurtosis)Dynamic matrix is formed with the 9 descriptors computed for frames of 200 ms length.Notes:The fundamental frequency is computed using the RAPT algorithm.Script is called as followspythonglottal.py<file_or_folder_audio><file_features.txt>[dynamic_or_static(defaultstatic)][plots(trueorfalse)(defaultfalse)][kaldioutput(trueorfalse)(defaultfalse)]Examples:pythonglottal.py"../audios/001_a1_PCGITA.wav""glottalfeaturesAst.txt""true""true""txt"pythonglottal.py"../audios/098_u1_PCGITA.wav""glottalfeaturesUst.csv""true""true""csv"pythonglottal.py"../audios/098_u1_PCGITA.wav""glottalfeaturesUdyn.pt""false""true""torch"pythonglottal.py"../audios/""glottalfeaturesst.txt""true""false""txt"pythonglottal.py"../audios/""glottalfeaturesst.csv""true""false""csv"pythonglottal.py"../audios/""glottalfeaturesdyn.pt""false""false""torch"KALDI_ROOT=/home/camilo/Camilo/codes/kaldi-master2exportPATH=$PATH:$KALDI_ROOT/src/featbin/
pythonglottal.py"../audios/098_u1_PCGITA.wav""glottalfeaturesUdyn""false""false""kaldi"pythonglottal.py"../audios/""glottalfeaturesdyn""false""false""kaldi"Jupyter notebookResults:Glottal analysis from a sustained vowel
!References[1]Belalcázar-Bolaños, E. A., Orozco-Arroyave, J. R., Vargas-Bonilla, J. F., Haderlein, T., & Nöth, E. (2016, September). Glottal Flow Patterns Analyses for Parkinson’s Disease Detection: Acoustic and Nonlinear Approaches. In International Conference on Text, Speech, and Dialogue (pp. 400-407). Springer.
Package: disvoice-lurein
DisVoice!DisVoice is a python framework designed to compute features from speech files. Disvoice computes glottal, phonation, articulation, prosody, and phonological-based features both from sustained vowels and continuous speech utterances with the aim to recognize praliguistic aspects from speech.
The features can be used in classifiers to recognize emotions, or communication capabilities of patients with different speech disorders including diseases with functional origin such as larinx cancer or nodules; craneo-facial based disorders such as hipernasality developed by cleft-lip and palate; or neurodegenerative disorders such as Parkinson's or Hungtinton's diseases.For additional information please seeglottal,phonation,articulaton,prosody, andphonologicaldirectories.InstallTo install the requeriments, please runinstall.shFor Kaldi output Kaldi must be installed beforehandReferenceIf you use Disvoice for research purposes, please cite the following papers, depending on the features you use:glottal features[1] Belalcázar-Bolaños, E. A., Orozco-Arroyave, J. R., Vargas-Bonilla, J. F., Haderlein, T., & Nöth, E. (2016, September). Glottal Flow Patterns Analyses for Parkinson’s Disease Detection: Acoustic and Nonlinear Approaches. In International Conference on Text, Speech, and Dialogue (pp. 400-407). Springer.phonation features[1] T. Arias-Vergara, J. C. Vásquez-Correa, J. R. Orozco-Arroyave, Parkinson's Disease and Aging: Analysis of Their Effect in Phonation and Articulation of Speech, Cognitive computation, (2017).[2] Vásquez-Correa, J. C., et al. "Towards an automatic evaluation of the dysarthria level of patients with Parkinson's disease." Journal of communication disorders 76 (2018): 21-36.articulation features[1] Vásquez-Correa, J. C., et al. "Towards an automatic evaluation of the dysarthria level of patients with Parkinson's disease." Journal of communication disorders 76 (2018): 21-36.[2]. J. R. Orozco-Arroyave, J. C. Vásquez-Correa et al. "NeuroSpeech: An open-source software for Parkinson's speech analysis." Digital Signal Processing (2017).prosody features[1]. N., Dehak, P. Dumouchel, and P. Kenny. "Modeling prosodic features with joint factor analysis for speaker verification." IEEE Transactions on Audio, Speech, and Language Processing 15.7 (2007): 2095-2103.[2] Vásquez-Correa, J. C., et al. "Towards an automatic evaluation of the dysarthria level of patients with Parkinson's disease." Journal of communication disorders 76 (2018): 21-36.phonological features[1] Vásquez-Correa, J. C., Klumpp, P., Orozco-Arroyave, J. R., & Nöth, E. (2019). Phonet: a Tool Based on Gated Recurrent Neural Networks to Extract Phonological Posteriors from Speech. Proc. Interspeech 2019, 549-553.LicenseMIT