Saravanan666/pypi-org huggingface dataset:
Package: piston-rspy
piston_rspyPython bindings forpiston_rs.What is piston_rspy?piston_rspy provides Python users the ability to interact with thePistoncode execution engine,
but behind the scenes it is powered bypiston_rs,
a Rust library designed for the same purpose.Getting startedpiston_rspy officially supports Python versions 3.8, 3.9, 3.10, 3.11, and 3.12.For an in depth look at the API, check out thedocumentation!Installationpipinstallpiston_rspyUsageFetching the available runtimes from Piston.importasyncioimportpiston_rspyasyncdefmain()->None:client=piston_rspy.Client()runtimes=awaitclient.fetch_runtimes()print(runtimes)if__name__=="__main__":asyncio.run(main())Executing python code via Piston.importasyncioimportpiston_rspyasyncdefmain()->None:file=piston_rspy.File(name="main.py",content="for i in range(10): print(i)",)executor=piston_rspy.Executor(language="python",version="3.10",files=[file],)client=piston_rspy.Client()response=awaitclient.execute(executor)print(f"Language:{response.language}v{response.version}")ifresponse.compile:print(f"Compilation:\n{response.compile.output}")print(f"Output:\n{response.run.output}")if__name__=="__main__":asyncio.run(main())The builder flow that is used inpiston_rsis available inpiston_rspyas well.importasyncioimportpiston_rspyasyncdefmain()->None:client=piston_rspy.Client()response=awaitclient.execute(piston_rspy.Executor().set_language("python").set_version("3.10").add_file(piston_rspy.File(name="main.py",content="for i in range(10): print(i)",)))print(f"Language:{response.language}v{response.version}")ifresponse.compile:print(f"Compilation:\n{response.compile.output}")print(f"Output:\n{response.run.output}")if__name__=="__main__":asyncio.run(main())Licensepiston_rspy is licensed under theMIT License.
Package: pisurvl
Surveillance system based on Raspberry Pi.Pisurvl is a surveillance solution with motion detection and alert notifications. This repository contains the server
part of the solution. It is implemented in Python and it usesOpenCVto access the camera of the Raspberry Pi. Despite
being implemented on top of a Raspberry Pi, the solution should work on any system having a camera that is supported
by OpenCV.InstallationInstalling OpenCVCurrently there is no easy way to install OpenCV 3 on Linux. The following commands install all the necessary
dependencies to build OpenCV 3:sudoaptinstallbuild-essentialcmakegitpkg-configsudoaptinstalllibgtk2.0-devlibavcodec-devlibavformat-devlibswscale-devlibv4l-devsudoaptinstalllibjpeg-devlibpng-devlibtiff-devlibjasper-devlibdc1394-22-devsudoaptinstalllibatlas-base-devgfortranliblapacke-devsudoaptinstallpython3python3-devpython3-setuptoolssudoeasy_install3pipThe following command installs the latest version of Numpy. The installation may take a while to complete.sudopip3installnumpyThe following commands download and compile OpenCV 3:mkdirbuild-opencv&&cdbuild-opencvgitclonehttps://github.com/opencv/opencv.gitgitclonehttps://github.com/opencv/opencv_contrib.gitcdopencv_contrib&&gitcheckout3.2.0&&cd..cdopencv&&gitcheckout3.2.0mkdirbuild&&cdbuildcmake-DCMAKE_BUILD_TYPE=Release\-DCMAKE_INSTALL_PREFIX=/usr/local\-DOPENCV_EXTRA_MODULES_PATH=`pwd`/../../opencv_contrib/modules\..make-j4Then install OpenCV:sudomakeinstallInstalling PiSurvlsudopip3install--upgradepisurvlgitclonehttps://github.com/betabandido/pisurvl.gitsudocppisurvl/init/pisurvl.service/etc/systemd/systemsudosystemctlenablepisurvl.serviceConfiguring PiSurvlCreate a settings file based on the provided template:mkdir-p~/.pisurvlcppisurvl/template-settings.yaml~/.pisurvl/settings.yamlFill in the fieldsfromandtoin thenotificationssection.UseGoogle API Managerto generate some client credentials and download theclient_secrets.jsonfile. Then move
the file into the PiSurvl configuration folder:mvclient_secrets.json~/.pisurvlExecutepisurvl-serverto authorize PiSurvl to access Google Drive.Running PiSurvlUsesystemctlto start the service:sudosystemctlstartpisurvl.serviceDevelopmentTo upload a new release to PyPI follow the next steps:Bump version insetup.pyRunpython3 setup.py sdist upload
Package: pisync
pisyncis a simple library to aid in writing incremental backup scripts to
local or remote machines. The only dependencies arersync,python>= v3.6,fabric, and ssh keys copied over to a unix
machine if doing a remote backup.Note:no dependencies are required on the
remote machine.Installationpip install pisyncExample UsagefrompisyncimportLocalConfig,RemoteConfig,backuplocal_docs=LocalConfig(source_dir="/home/ethan/Documents",# local machinedestination_dir="/tmp/backup_test",# local machineexclude_file_patterns=["**/node_modules","junk/",],log_file="/tmp/backup-logs/backups.log"# local machine)remote_docs=RemoteConfig(user_at_hostname="ethan@hydrogen.local",# remote machinesource_dir="/home/ethan/Documents",# local machinedestination_dir="/tmp/backup_test",# remote machineexclude_file_patterns=["**/node_modules","junk/",],log_file="/tmp/backup-logs/backups.log"# local machine)backup(local_docs)backup(remote_docs)Also seean example configfor how I backup my home server
both locally and to an offsiteraspberry pi.NotesSafetyCreating aLocalConfigorRemoteConfigobject will fail ifsource_dirordestination_dirdo not exist or are not directories.Ifdestination_diris not empty, it is assumed that a previous backup
exists.The backup will not run ifdestination_diris not empty and there is not
a symlinkdestination_dir/latestpointing to the latest backup.The contents ofsource_dirare compared todestination_dir/latestduring the incremental backup and the changes are written todestination_dir/<current date/time>.Therefore, you need to ensure thatdestination_diris empty which will
start a fresh complete backup, or you can manually create thedestination_dir/latestsymlink to continue incrementally.LoggingBy default, a default log file will be created (if it does not exists) and
appended to at~/.local/share/backup/rsync-backups.log.NOTE: If you run your script assudo, the home directory of the root
user is probably/rootrather than your~/directory.If you want the log file to still go the your home directory when you run as
root, use thissudo -E python3 ./run_backups.pyYou can also specify the log file location in your config.Hard coding the log file path solves some of the quirks that you can run
into when using a cron job.Running testsThe unit/integration tests require password-less login to localhost as the
"remote" machine.ssh-copy-id $USER@localhost
git clone https://github.com/erietz/pisync
cd pisync
pip install -e .
make test
Package: pitble
ContentsPitbleInformationInstallationReleases0.0.2 (2014-04-30)0.0.1 (2014-04-29)PitbleInformationPitble is a python microblogInstallationIn your settings:INSTALLED_APPS = (
    ...
    'pitble',
    'bootstrap3',
)


TEMPLATE_CONTEXT_PROCESSORS = (
    ...
    'pitble.context_processors.i18n',

)


MIDDLEWARE_CLASSES = (
    ...
    'django.middleware.locale.LocaleMiddleware',
    'pitble.middleware.LocaleMiddleware',
)

AUTH_USER_MODEL = 'pitble.User'

LOGIN_URL = '/sign-in/'In your urls:urlpatterns = patterns('',
    ...
    url(r'^', include('pitble.urls')),
)Releases0.0.2 (2014-04-30)Add tests0.0.1 (2014-04-29)Initial version
Package: pitchcontext
component-id: pitchcontext
name: pitchcontext
description: Python module for melody analysis based on pitch context vectors.
type: SoftwareLibrary
release-date: 2023-06-02
release-number: 0.1.9
work-package:WP3
pilot:TUNES
keywords:melodypitch analysis
changelog:
licence:
release link:pitchcontextPython module for melody analysis based on pitch context vectors.Prerequisites:lilypond installed and in command line path.convert (ImageMagick) installed and in command line path.kernfiles and corresponding .json files with melodic features.The .json files need to be formatted according to the standard ofMTCFeatures.InstallationThe latest release of the pitchcontext module can be installed from pypi:$ pip install pitchcontextThe development version can be installed by cloning the repository and by using the provided pyproject.toml and poetry. In root of the rep do:$ poetry installThis creates a virtual environment with pitchcontext installed.ExamplesRequires a Python3 environment with both pitchcontext and streamlit installed.
Four examples are provided:apps/st_dissonance.pyapps/st_novelty.pyapps/st_unharmonicity.pyapps/st_impliedchords.pyTo run:$ streamlit run st_dissonance.py -- -krnpath <path_to_kern_files> -jsonpath <path_to_json_files>The -- is needed to pass the following arguments to the python script.
Package: pitcherflask
pitcherflaskpitcherflask is a tool that helps you set up a basic Flask project structure quickly and easily. Inspired by Rust's Cargo, pitcherflask aims to streamline the process of creating Flask web applications by providing a simple command-line interface (CLI).FeaturesProject Creation: Create a new Flask project with the required directory structure (templates, static, static/img).Getting StartedTo get started with pitcherflask, follow these steps:Install pitcherflask using pip:pipinstallpitcherflaskCreate a new pitcherflask project:pitcherflaskcreate<your_project_name>Change into the project directory:cd<your_project_name>Usagepitcherflask provides the following commands:create <your_project_name>: Create a new pitcherflask project.Feel free to open issues in-case of bugs or suggestionsLicenseThis project is licensed under the MIT License - see the LICENSE file for details.RoadmapMake it more robustPerhaps add generative AI capabilities to deploy apps fasterSolve bugs if any
Package: pitchfork
An unofficial python API forpitchfork.comreviews.Build StatusVersionDownloads (30 days)InstallationYou can get it frompython package
index:pipinstallpitchforkYou can also clone the repository, but note thatpitchforkdepends
onbeautifulsoup4for HTML parsing so you first have to installbeautifulsoup4yourself !!!gitclonehttps://github.com/michalczaplinski/pitchfork.gitUsage>>importpitchfork>>p=pitchfork.search('kanye west','my beautiful')# the title is autocompleted>>p.album()# the full album titleu'My Beautiful Dark Twisted Fantasy'>>p.label()u'Def Jam / Roc-A-Fella'>>p.editorial()[:100]# get the first 100 characters of the review.u"Kanye West's 35-minute super-video,\xa0Runaway, peaks with a parade. Fireworks flash while red hoods ma"# the link to the album cover image>>p.cover()'http://cdn4.pitchfork.com/albums/15935/homepage_large.831179e9.jpg'>>p.score()10.0# pretty overrated IMHO!TestsYou can run the basic tests located in thetestsdirectory with:$cdpitchfork$python3-munittestdiscoverLicenseMITContributionsIf you want to add some new feature, suggest improvement or whatnot
you’re welcome to message me or send a pull request!
Package: pitchfork-api
An unofficial python API forpitchfork.comreviews.Build StatusVersionPython VersionsApologies for the confusing naming - pypi doesn’t allow the use of underscores in package names, while python doesn’t allow dashes in module names. As a result, the package name ispitchfork-api, but it ispitchfork_apieverywhere else.InstallationYou can get it frompython package
index:pipinstallpitchfork-apiYou can also clone the repository, but note thatpitchforkdepends
onbeautifulsoup4for HTML parsing so you first have to installbeautifulsoup4yourself !!!gitclonehttps://github.com/tejassharma96/pitchfork_apiUsage>>importpitchfork>>p=pitchfork.search('kanye west','my beautiful')# the title is autocompleted>>p.album()# the full album titleu'My Beautiful Dark Twisted Fantasy'>>p.label()u'Def Jam / Roc-A-Fella'>>p.editorial()[:100]# get the first 100 characters of the review.u"Kanye West's 35-minute super-video,\xa0Runaway, peaks with a parade. Fireworks flash while red hoods ma"# the link to the album cover image>>p.cover()'http://cdn4.pitchfork.com/albums/15935/homepage_large.831179e9.jpg'>>p.score()10.0# to check what methods are available, you can use 'methods()'>>p.methods()score()abstract()editorial()full_text()cover()artist()album()label()year()TestsYou can run the basic tests located in thetestsdirectory with:$cdpitchfork$python3-munittestdiscoverLicenseMITContributionsIf you want to add some new feature, suggest improvement or whatnot
you’re welcome to message me or send a pull request!
Package: pitchly
A python package that is a wrapper for Plotly to generate football tracking and event data plotsFree software: MIT licenseInstallationpip install pitchlyYou can also install the in-development version with:pip install https://github.com/opunsoars/pitchly/archive/master.zippitchlycurrently supports Metrica data formats. Other formats coming soon.Documentationhttps://pitchly.readthedocs.io/DevelopmentTo run all the tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxContactGet in touch! For help or to contribute with ideas and to discuss football analytics.
Mail me atvinay.warrier@gmail.comor connect onTwitter|LinkedInThe story behind putting this small package together came from theshort projectin the Friends of Tracking initiative last year (2020).AcknowledgementsDavid Sumpter- for the amazing Friends of Tracking initiativeLaurie Shawfor pitch control implementation and starter code for data processingBruno Dagnino&Metrica Sports- for the open data (especially tracking)Koen Vossen- for kloppy library and inspiring work in open source football analyticsChangelog0.2.0 (2021-04-22)Initial release (Metrica Tracking/Event)Pitch Control0.1.0 (2021-04-19)Pre release (Metrica Tracking/Event)0.0.0 (2021-04-15)First release on TestPyPI.
Package: pitchmark
pitchmarkExploring golf shot strategy.Installation$pipinstallpitchmarkUsageTODOContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensepitchmarkwas created by Istvan Kleijn. It is licensed under the terms of the MIT license.CreditsThe test suite includes raw map data fromOpenStreetMap.pitchmarkwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: pitchplots
pitchplotslibrary plotting charts for different tonal representationsGetting StartedThe program consist in the following files: functions.py, reader.py, modified_musicxml_parser.py, parser.py and static.pyPrerequisitesWhat things you need to install the software and how to install themYou will need python on your computer and the following libaries: matplotlib, pandas and numpynote that if you are using anaconda, these libraries are already installedInstallingYou can download the pitchplots package on pypi with pip using the following command in the prompt:python3 -m pip install pitchplotsor if you're using anaconda promptpip install pitchplotsRunning the testsyou can first try to parse xml/musicScore xml files to csv or DataFrame, that is the GymnopÃ©die from Sati with:importpitchplots.parserasppp# If no filepath is specified, will automatically charge data_example.mxldf_data_example=ppp.xml_to_csv(save_csv=True)then you can try the static module by passing csv files or Dataframe:import pitchplots.static as pps

pps.tonnetz(df_data_example)orimport pitchplots.static as pps

pps.circle('csv/data_example.csv')to try the dynamic videos:import pitchplots.dynamic as ppd

ppd.tonnetz_animation(df_data_example)AuthorsTimothy Loayza,Fabian MossUse of magenta's codeThemodified_musicxml_parser.pyfile is taken from themagentaproject and has been modified. Therefore the modifications are listed in themagenta_musicxml_code_modifications.mdfile and there is themagenta_LICENSE.md.LicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for details
Package: pitchpx
Tools for Acquiring MLBAM Gameday datasetRequirementpython 3.5+(don’t know about version < 3.5, sorry)Install$ pip install pitchpxUsagedownload(MLBAM dataset)$ pitchpx [-s, –start <from 8-digit-datetime(YYYYMMDD)>] [-e, –end <to 8-digit-datetime(YYYYMMDD)>] [-o, –output <download file path>]-s,--start: Start Day(YYYYMMDD)-e,--end: End Day(YYYYMMDD)-o,--output: Output directory(default:”.”)-help: pitchpx command helpLicenseMIT Licensehttp://opensource.org/licenses/MITDatasetMLBAM Gamedayhttp://gd2.mlb.com/components/copyrighthttp://gd2.mlb.com/components/copyright.txt
Package: pitchscapes
Pitch ScapesPython library to compute pitch scapes for music analysis. The implemented methods are described in (please cite when using this library for publications, BibTeX below): Lieck R, Rohrmeier M (2020)Modelling Hierarchical Key Structure with Pitch Scapes. In:Proceedings of the 21st International Society for Music Information Retrieval Conference. Montréal, Canada@inproceedings{lieckModellingHierarchicalKey2020,
  title = {Modelling Hierarchical Key Structure with Pitch Scapes},
  booktitle = {Proceedings of the 21st International Society for Music Information Retrieval Conference},
  author = {Lieck, Robert and Rohrmeier, Martin},
  year = {2020},
  location = {Montréal, Canada},
  doi = {10.5281/zenodo.4245558},
  eventtitle = {21st International Society for Music Information Retrieval Conference}
}Getting StartedPlease have a look at theTutorial, which guides you through all the basic functionality of reading data, plotting pitch scapes and training the unsupervised clustering model.Note:I tried to make the code accessible and provide some convenience functions for getting started smoothly. But there is still lots of room for better documentation and testing. Please contact me if you have any questions, are missing anything or encounter bugs!
Package: pitchsqueezer
PitchSqueezerA pitch tracker for speech, using synchro-squeezed stft and frequency domain autocorrelation, designed to analyze imperfect recordings of spontaneous speech.
Relies heavily on the nicessqueezepypackage.Features:(mostly) better quality than popular Python trackers (pyin, pyaapt)robust to creaky voices and bad recordingsdoes not need finetuning for min and max f0, works fine with both low and high pitched voicesacceptable speed (~ 10x faster than librosa.pyin)(alternatively) a continuous pitch track, filling unvoiced gaps relatively naturallya wavelet decomposition of the pitch track (reversible, except for mean value)compatible with librosa's pyin and pytorch_audio spectrograms, regarding number of framesa command line tool for parallel batch processing of directories (as well as API)Installation:soon: pip install pitchsqueezerMeanwhile, download the repository, and in the directory where pyproject.toml resides, dopip install .Examples of basic usage:;; Command line, extract f0 for all wavs in a directory using 10 ms frame shift, save as numpy files
$ pitch_squeezer path/to/wavs/ -r 100 -f npy

;; API
import pitch_squeezer as ps
f0, if0 = ps.track_pitch(input_file, min_hz=50, max_hz=500)
f0_cwt = ps.f0_cwt(if0)docs:https://asuni.github.io/PitchSqueezer/Visualization of the method:comparison with librosa.pyin on creaky female voice:
Package: pitchtools
pitchtoolsprovides a set of functions to work with musical pitches.Featuresconvert between frequencies, midinotes and notenamesmicrotones are fully supportedsplit a pitch into its multiple components (pitch class, octave, microtonal deviation, etc.)transpose a pitch taking its spelling into considerationcreate custom pitch converters to work with custom reference frequencies, or modify the
reference frequency globallyDocumentationhttps://pitchtools.readthedocs.io/en/latest/ExamplesConvert some note names to frequencies>>>frompitchtoolsimport*>>>eflat_scale="4Eb 4F 4G 4Ab 4Bb 5C 5D".split()>>>fornoteineflat_scale:...# convert notename to frequency using the default reference frequency (442 Hz)...freq=n2f(note)...# convert frequency to midi...midinote=f2m(freq)...print(f"{note}={freq:.1f}Hz (midi ={midinote})")4Eb=312.5Hz(midi=63.0)4F=350.8Hz(midi=65.0)4G=393.7Hz(midi=67.0)4Ab=417.2Hz(midi=68.0)4Bb=468.3Hz(midi=70.0)5C=525.6Hz(midi=72.0)5D=590.0Hz(midi=74.0)The same but with a different reference frequencyfrompitchtoolsimport*ebscale="4Eb 4F 4G 4Ab 4Bb 5C 5D".split()cnv=PitchConverter(a4=435)fornoteinebscale:# Convert to frequency with default a4=442 Hzfreq=cnv.n2f(note)midinote=cnv.[Of2m(freq)print(f"{note}={freq}Hz (midinote ={midinote})")MicrotonesMicrotones are fully supported, either as fractional midinotes or as notenames.>>>frompitchtoolsimport*>>>n2m("4C+")60.5>>>n2m("4Db-10")60.9>>>m2n(61.2)4C#+20Microtonal notationMidinoteNotename60.254C+25 /
4C>60.454C+4560.54C60.754Db-2561.54D-61.804D-20634D#63.54D#+63.74E-30Installationpip install pitchtools
Package: pitchtypes
pitchtypesA library for handling musical pitches and intervals in a systematic way.
For other (and mostly compatible) implementations see:Pitches.jl(Julia)musicology-pitch(Haskell)purescript-pitches(Purescript)pitches.rs(Rust)The main goals of this library are:providing types and operations (such as arithmetics, printing and parsing) for common types of pitches and intervals,
(in particular spelled pitches and intervals, which are often difficult to handle),providing a generic interface for writing code that is agnostic to the specific pitch or interval types.Installationpip install pitchtypesMinimal Exampleimportpitchtypesaspt# write a generic functiondeftransposeby(pitches,interval):return[pitch+intervalforpitchinpitches]# use it with different pitch types# spelled pitches correspond to written notes in Western notationspelled_pitches=[pt.SpelledPitch(p)forpin["C4","Eb4","G#4"]]print(transposeby(spelled_pitches,pt.SpelledInterval("m3:0"))# spelled pitch classes work the same but they ignore octavesspelled_pitch_classes=[pt.SpelledPitchClass(p)forpin["C","Eb","G#"]]print(transposeby(spelled_pitches,pt.SpelledIntervalClass("m3"))# enharmonic pitches correspond to keys on the pianoenharmonic_pitches=[pt.EnharmonicPitch(p)forpin[60,63,68]]print(transposeby(spelled_pitches,pt.EnharmonicInterval(3))Output:[Eb4, Gb4, B4]
[Eb, Gb, B]
[D#4, F#4, B4]Old Example (delete/adapt?)For instance, spelled pitch is handled correctly:>>>frompitchtypesimportSpelledPitchClass>>>p1=SpelledPitchClass("C#")>>>p2=SpelledPitchClass("Gb")>>>i=p1-p2>>>type(i)<class'pitchtypes.datatypes.SpelledIntervalClass'>>>>i+AA4Of course, you can also convert spelled pitches to their enharmonic equivalents:>>>frompitchtypesimportSpelledPitch,EnharmonicPitch>>>spelled=SpelledPitch("C#4")>>>enharmonic=spelled.convert_to(EnharmonicPitch)>>>type(enharmonic)<class'pitchtypes.datatypes.EnharmonicPitch'>>>>enharmonic.midi61>>>enharmonic.name('sharp')C#4>>>enharmonic.name('flat')Db4And used continuous log-frequency space (assuming twelve-tone equal temperament for enharmonic pitch):>>>frompitchtypesimportEnharmonicPitch,LogFreqPitch>>>enharmonic=EnharmonicPitch("A4")>>>logfreq=enharmonic.convert_to(LogFreqPitch)>>>logfreq440.HzFor more examples, have a look at theTutorial.ipynb!