Saravanan666/pypi-org huggingface dataset:
Package: mido
Mido is a library for working with MIDI messages and ports:>>>importmido>>>msg=mido.Message('note_on',note=60)>>>msg.type'note_on'>>>msg.note60>>>msg.bytes()[144,60,64]>>>msg.copy(channel=2)Message('note_on',channel=2,note=60,velocity=64,time=0)port=mido.open_output('Port Name')port.send(msg)withmido.open_input()asinport:formsgininport:print(msg)mid=mido.MidiFile('song.mid')formsginmid.play():port.send(msg)Full documentation athttps://mido.readthedocs.io/Main Featuresconvenient message objects.supports RtMidi, PortMidi and Pygame. New backends are easy to
write.full support for all 18 messages defined by the MIDI standard.standard port API allows all kinds of input and output ports to be
used interchangeably. New port types can be written by subclassing
and overriding a few methods.includes a reusable MIDI stream parser.full support for MIDI files (read, write, create and play) with
complete access to every message in the file, including all common
meta messages.can read and write SYX files (binary and plain text).implements (somewhat experimental) MIDI over TCP/IP with socket
ports. This allows for example wireless MIDI between two
computers.includes programs for playing MIDI files, listing ports and
serving and forwarding ports over a network.Status1.3 is the fourth stable release.This project usesSemantic Versioning.RequirementsMido requires Python 3.7 or higher.Installingpython3 -m pip install midoOr, alternatively, if you want to use ports with the default backend:python3 -m pip install mido[ports-rtmidi]Seedocs/backends/for other backends.Source Codehttps://github.com/mido/mido/LicenseMido is released under the terms of theMIT license.Questions and suggestionsFor questions and proposals which may not fit into issues or pull requests,
we recommend to ask and discuss in theDiscussionssection.
Package: mido-fix
Mido is a library for working with MIDI messages and ports:>>>importmido>>>msg=mido.Message('note_on',note=60)>>>msg.type'note_on'>>>msg.note60>>>msg.bytes()[144,60,64]>>>msg.copy(channel=2)Message('note_on',channel=2,note=60,velocity=64,time=0)port=mido.open_output('Port Name')port.send(msg)withmido.open_input()asinport:formsgininport:print(msg)mid=mido.MidiFile('song.mid')formsginmid.play():port.send(msg)Full documentation athttps://mido.readthedocs.io/Main Featuresworks in Python 2 and 3.convenient message objects.supports RtMidi, PortMidi and Pygame. New backends are easy to
write.full support for all 18 messages defined by the MIDI standard.standard port API allows all kinds of input and output ports to be
used interchangeably. New port types can be written by subclassing
and overriding a few methods.includes a reusable MIDI stream parser.full support for MIDI files (read, write, create and play) with
complete access to every message in the file, including all common
meta messages.can read and write SYX files (binary and plain text).implements (somewhat experimental) MIDI over TCP/IP with socket
ports. This allows for example wireless MIDI between two
computers.includes programs for playing MIDI files, listing ports and
serving and forwarding ports over a network.Status1.2 is the third stable release.RequirementsMido targets Python 3.6 and 2.7.Installingpip install midoIf you want to use ports:pip install python-rtmidiSeedocs/backends/for other backends.Source Codehttps://github.com/mido/mido/LicenseMido is released under the terms of theMIT license.Questions and suggestionsFor questions and proposals which may not fit into issues or pull requests, we
recommend to ask and discuss onDiscussions.
Package: midonetclient
Midonet API client library for Python applications==================================================Overview and pre-requisitesThis is the client library which can be used by Python applications to interact with MidoNet, network virtualization platform.MidoNet provides scalable distributed network services for OpenStack. In order to use this client you must have MidoNet configured and running.How to Install--------------Run the following command:::$ sudo python ./setup.pyPackage dependencies--------------------Standard libraryloggingjsonurllibbase64threadingExternal packageswebobhttplib2Examples--------# Instantiate a client.  Project ID is required when the API# is integrated with Keystone.client = MidonetClient('http://api_uri'', 'username', 'password',project_id='project_id')# Create a networknet_id = "174a9db3-94e8-416e-8e48-0eabadfdf664"input = {"id": net_id,"name": "tenant","tenant_id": "tenant_id","admin_state_up": True,"router:external": False}output = client.create_network(input)# Create a subnetsubnet_id = "dc313de0-86ef-4aac-9781-5ad25232777a"input = {"id": subnet_id,"name": "tenant","tenant_id": "tenant_id","ip_version": 4,"network_id": net_id,"cidr": "10.0.0.0/24","gateway_ip": "10.0.0.1","enable_dhcp": True,"shared": False}output = client.create_subnet(input)# Delete subnetclient.delete_subnet(subnet_id)# Delete networkclient.delete_network(net_id)
Package: midoTrim
Mido is a library for working with MIDI messages and ports:>>>importmido>>>msg=mido.Message('note_on',note=60)>>>msg.type'note_on'>>>msg.note60>>>msg.bytes()[144,60,64]>>>msg.copy(channel=2)Message('note_on',channel=2,note=60,velocity=64,time=0)port=mido.open_output('Port Name')port.send(msg)withmido.open_input()asinport:formsgininport:print(msg)mid=mido.MidiFile('song.mid')formsginmid.play():port.send(msg)Full documentation athttps://mido.readthedocs.io/Main Featuresworks in Python 3.convenient message objects.supports RtMidi, PortMidi and Pygame. New backends are easy to
write.full support for all 18 messages defined by the MIDI standard.standard port API allows all kinds of input and output ports to be
used interchangeably. New port types can be written by subclassing
and overriding a few methods.includes a reusable MIDI stream parser.full support for MIDI files (read, write, create and play) with
complete access to every message in the file, including all common
meta messages.can read and write SYX files (binary and plain text).implements (somewhat experimental) MIDI over TCP/IP with socket
ports. This allows for example wireless MIDI between two
computers.includes programs for playing MIDI files, listing ports and
serving and forwarding ports over a network.Status1.2 is the third stable release.RequirementsMido requires Python 3.7 or higher.Installingpython3 -m pip install midoIf you want to use ports:python3 -m pip install python-rtmidiSeedocs/backends/for other backends.Source Codehttps://github.com/mido/mido/LicenseMido is released under the terms of theMIT license.Questions and suggestionsFor questions and proposals which may not fit into issues or pull requests, we
recommend to ask and discuss onDiscussions.
Package: midox
-------------------------------------------------------------------------------------Nicolas Boulanger-Lewandowski (Jan 2013)Modified Python MIDI package (GPL)I added capabilities for piano-roll input/output of one-track MIDI files.The original package can be found at: http://www.mxm.dk/products/public/pythonmidi/-------------------------------------------------------------------------------------This is the documentation for the midi package==============================================The modules follows the following naming convention:MidiIn<StreamType>.py---------------------The MidiIn modules reads midi content for a specific type of stream. Ie. a file or a midi port. It then generates events and triggers them on a MidiOutStream.MidiOut<StreamType>.py----------------------The MidiOut modules are event handlers, that reacts to events generated by a a Midi in module.MidiInBase.py---------------The base class for input streams.MidiOutBase.py----------------The base class for the output streams.Internal modules================DataTypeConverters.py---------------------A collection of functions that converts the special data types used in midi files to and from strings.constants.py------------A collection of constants from the midi spec.
Package: mid-to-gcode
.. raw:: htmlmid to gcodeThe project for translate .mid format to 3d printers gcode<p align="center">
    <a href="https://pypi.python.org/pypi/mid-to-gcode"><img alt="Pypi version" src="https://img.shields.io/pypi/v/mid-to-gcode.svg"></a>
    <a href="https://pypi.python.org/pypi/mid-to-gcode"><img alt="Python versions" src="https://img.shields.io/badge/python-3.7+ | PyPy-blue.svg"></a>
    <img alt="Size" src="https://img.shields.io/github/languages/code-size/GigantPro/mid-to-gcode">
    <a href="https://pypi.org/project/mid-to-gcode/"><img alt="Pypi version" src="https://img.shields.io/pypi/l/mid-to-gcode?color=orange"></a>
</p>=========
Package: midtrans-python-rest-sdk
Midtrans Python REST SDKMidtrans Python REST SDKFree software: MIT licenseDocumentation:https://midtrans-python-rest-sdk.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-01-27)First release on PyPI.
Package: midv500
Download and convert MIDV-500 datasets into COCO instance segmentation formatAutomatically download/unzipMIDV-500andMIDV-2019datasets and convert the annotations into COCO instance segmentation format.Then, dataset can be directly used in the training of Yolact, Detectron type of models.MIDV-500 DatasetsMIDV-500 consists of 500 video clips for 50 different identity document types including 17 ID cards, 14 passports, 13 driving licences and 6 other identity documents of different countries with ground truth which allows to perform research in a wide scope of various document analysis problems. Additionally, MIDV-2019 dataset contains distorted and low light images in it.You can find more detail on papers:MIDV-500: A Dataset for Identity Documents Analysis and Recognition on Mobile Devices in Video StreamMIDV-2019: Challenges of the modern mobile-based document OCRGetting startedInstallationpip install midv500UsageImport package:importmidv500Download and unzip desired version of the dataset:# set directory for dataset to be downloadeddataset_dir='midv500_data/'# download and unzip the base midv500 datasetdataset_name="midv500"midv500.download_dataset(dataset_dir,dataset_name)# or download and unzip the midv2019 dataset that includes low light imagesdataset_name="midv2019"midv500.download_dataset(dataset_dir,dataset_name)# or download and unzip both midv500 and midv2019 datasetsdataset_name="all"midv500.download_dataset(dataset_dir,dataset_name)Convert downloaded dataset to coco format:# set directory for coco annotations to be savedexport_dir='midv500_data/'# set the desired name of the coco file, coco file will be exported as "filename + '_coco.json'"filename='midv500'# convert midv500 annotations to coco formatmidv500.convert_to_coco(dataset_dir,export_dir,filename)
Package: midv500models
midv-500-modelsThe repository contains a model for binary semantic segmentation of the documents.Left: input.Center: prediction.Right: overlay of the image and predicted mask.Installationpip install -U midv500modelsFor more details:Example notebookDatasetModel is trained onMIDV-500: A Dataset for Identity Documents Analysis and Recognition on Mobile Devices in Video Stream.PreparationDownload the dataset from the ftp server withwget-rftp://smartengines.com/midv-500/Unpack the datasetcdsmartengines.com/midv-500/dataset/
unzip\*.zipThe resulting folder structure will besmartengines.commidv-500dataset01_alb_idground_truthCACA01_01.tif...imagesCACA01_01.json...............To preprocess the data use the scriptpythonmidv500models/preprocess_data.py-i<input_folder>\-o<output_folder>whereinput_foldercorresponds to the file with the unpacked dataset and output folder will look as:imagesCA01_01.jpg...
masksCA01_01.pngtarget binary masks will have values [0, 255], where 0 is background and 255 is the document.Trainingpythonmidv500models/train.py-cmidv500models/configs/2020-05-19.yaml\-i<pathtotrain>Inferencepythonmidv500models/inference.py-cmidv500models/configs/2020-05-19.yaml\-i<pathtoimages>\-o<pathtosavepreidctions>-w<pathtoweights>Example notebookExample notebookWeightsUnet with Resnet34 backbone:ConfigWeights
Package: midvoxio
MidVoxIOThe python IO to load/write/visualizemagical voxel's.vox format.Installpippip install midvoxiothrough repoclone the repoadd the repo to pathInstall numpy and matplotlib if you haven'tUsagevox_to_arr()usevox_to_arr()to parse .vox file into numpy array.frommidvoxio.voxioimportvox_to_arrprint(vox_to_arr('vox/99/3x3x3.vox').shape)result:(3,3,3,4)# the four axis are (x,y,z,color), color is [r,g,b,a] hereviz_vox()useviz_vox()to visualize your .vox file. It usesmatplotlibto plot the file internally.frommidvoxio.voxioimportviz_voxviz_vox('vox/99/3x3x3.vox')then, the python will give you a 3d plot.get other infouseget_rendering_attributes(),get_cameras(), andget_materials()to get vox info.>>>frommidvoxio.voxioimport*>>>print(get_cameras('vox/99/cars.vox')[0]){'id':(0,),'attributes':{'_mode':'pers','_focus':'0 0 0','_angle':'0 0 0','_radius':'0','_frustum':'0.414214','_fov':'45'}}>>>print(get_rendering_attributes('vox/99/3x3x3.vox')[0]){'_type':'_inf','_i':'0.6','_k':'255 255 255','_angle':'50 50','_area':'0.07'}>>>print(get_materials('vox/99/3x3x3.vox')[0]){'id':(0,),'properties':{'_type':'_diffuse','_weight':'1','_rough':'0.1','_spec':'0.5','_ior':'0.3'}}write_list_to_vox()usewrite_list_to_voxto generate vox file from exist python list. You can use this function to export the python list as vox file, so you will be able to edit vox file in python.frommidvoxio.voxioimportwrite_list_to_vox,plot_3darr=[]# define your python list that represent the 3d model here# define your palette that relate to your model here# palette will be able to be automatically generated in the futurepalette=[]# you can use plotio to viz your arr before you save it to voxplot_3d(arr)# visualize your arrwrite_list_to_vox(arr,'fname.vox',palette_arr=palette)# then, you save the 'fname.vox'# you can also use png palettepalette_path='palette.png'write_list_tov_vox(arr,'fname.vox',palette_path)# then, you save the 'fname.vox'OthersThis project was originally created for me to use it myself, so the API design is casual and the error message is not complete. Will consider make it more formal if there are really people using it.Gromgull'spy-vox-iois good to use, but only for MagicalVoxel 0.98 or older version, and he somehow stop updating. This voxio reuse some of Gromgull's code (mostly in parser), but now it fit MagicalVoxel 0.99. Also, there are also new features likeviz_vox()to visualize the vox array without using magicalvoxel.Lots of functions are still under development.
Package: midware
A simple general-purpose middleware library for Python 3.5 or greater.Often the main task of a program can
be represented as one function with rather
straightforward input and output. But a lot of
unrelated code needs to be added to make this one function
doing one main task into an actual usable utility that,
for example, handles user input correctly.One way to decomplect unrelated concerns in a program is a middleware pattern.Middleware puts functions and composability first. To make it
easier for functions with different signatures to be composable all
arguments are usually packed into one dictionary calledctxfor “context”.
All functions takectxas an argument, modify it and return it.Functions that modify thectxare called handlers. Handlers are already
very composable by design and one can easily pipectxvalues through
a series of handlers, but that’s often not enough. One of the most frequently
used patterns (a lot of languages even have built-in keywords for it, Python has several actually)
is the “setup-teardown” pattern. That is where middleware comes in.Middleware is a higher-order function that takes a handle and return a new handle,
which typically wraps the old one. It does some work, maybe modifies thectx,
passes it to the old handle, gets a newctxback and optionally does
something else before returning.Once again, middleware is composable, because it takes handles and returns handles.
When using middleware as building blocks, composing those returns an outermost handle,
which needs to be called with actxvalue as an argument to kick off the computation.
Package: mieaa
miEAA Command Line Interface and APIThe miRNA Enrichment Analysis and Annotation Tool (miEAA) facilitates the functional analysis of miRNA sets.
This package provides a miEAA REST API wrapper and command line interface.
As such, a stable internet connection is required to utilize these tools.To learn more about miEAA or to utilize our online interface, please visit ourweb server.All miEAA tools are provided and hosted by theChair for Clinical Bioinformatics at Saarland University.Source code is available onGitHub.Documentation is available onRead the Docs.Users can execute miEAA commands directly from the command line:$ mieaa -hA REST API is also provided for scripting purposes:frommieaaimportAPImieaa_api=API()InstallationDependencies:Python >= 3.5Requests >= 2.19Python Package Index$ pip install mieaaConda$ conda install -c ccb-sb mieaa
Package: miejskiapi
There are just 2 classes:Sprawdzacz.py - Checks the definition
MiejskiDefinicja.py - Main class for definitionsMain classes in here:
MiejskiDefinicja.toJson() - Converts the definition to JSON
MiejskiDefinicja.fromJson(JSON : dictionary) - Converts JSON object to definition
Sprawdzacz.sprawdz_raw(definiction : str) - Returns the raw website
Sprawdzacz.sprawdz_link(link : str) - Returns the MiejskiDefinicja from the link to the website
Sprawdzacz.sprawdz(definiction : str) - Returns the MiejskiDefinicja from the definitionSprwadzacz will be from importing the miejskiapi package.
Package: mielib
MieLibPython library with many Mie-related functions for optics and acoustics. In particular:Scattering Mie coefficients for isotropic spheres:Acoustic Mie coefficients based on Phys. Rev. Lett. 123, 183901 (2019) (see SM)Optics Mie coefficients based on Bohren Huffmann book.Scalar spherical harmonicsVector spherical harmonics (complex and real)InstalationFromPYPI/mielib:pip install mielibExamplesSee examples folder with Jupyter Notebooks.ToDoMake testsSetup github actionsSearch for complex poles of Mie scattering coefficientsCreditsIvan Toftultoftul.ivan@gmail.com
Package: miepy
MiePyMiePy is a Python module for the generalized multiparticle Mie theory (GMMT), also known as the aggregate T-matrix method. MiePy solves the electrodynamics of a collection of spherical or non-spherical scatterers with an arbitrary incident source.FeaturesNon-spherical particlesusing the T-matrix formulation via the null-field method with discrete sources (NFM-DS). Includes cylinders, spheroids, ellipsoids, cubes and polygonal prismsArbitrary incident sources(plane waves, Gaussian beams, HG and LG beams, point dipoles)Evaluation of clustercross-sectionsandoptical force and torqueon individual particlesPeriodic boundary conditionswith various lattice types (square, hexagonal, etc.) andmirror and discrete rotational symmetriesfor faster calculationsOptionalplanar interface (substrate)3D scene visualizationusing the the VPython libraryImage clusters using asimulated microscopeOpenMP parallelizationfor systems with larger numbers of particlesUsageFor examples and use cases, see examples folder.For an overview of the theory, see docs folder.InstallationIf NumPy is not already installed, it must be installed prior to MiePy's installationpipinstallnumpyThen install MiePypipinstallmiepyMiePy is also available via Condacondainstall-cjaparkermiepyInstall from sourceTo build MiePy from source, first install the required dependencies:CMake(C++ build system)Eigen(C++ linear algebra library)GNU Scientific Library (GSL)GCC and GFORTRANPython 3 and pipThen, install MiePy using pippipinstallmiepy--no-binaryTo build the latest development version, clone MiePy and its submodules:gitclonehttps://github.com/johnaparker/miepy.gitmiepy--recurse-submodules&&cdmiepyand install MiePy using pippipinstall.Optionally, run the tests to verify correctness:pytesttestsLicenseMiePy is licensed under the terms of the GPLv3 license.
Package: miepython
by Scott Prahlmiepythonis a pure Python module to calculate light scattering for
non-absorbing, partially-absorbing, or perfectly-conducting spheres. Mie
theory is used, followingthe procedure described by Wiscombe. This code has
been validated against his results.This code provides functions for calculating the extinction efficiency, scattering efficiency, backscattering, and scattering asymmetry. Moreover, a set of angles can be given to calculate the scattering for a sphere at each of those
angles.Full documentation at <https://miepython.readthedocs.io>Pay Attention!When comparing different Mie scattering codes, make sure that you’re aware of the conventions used by each code.miepythonmakes the following assumptionsthe imaginary part of the complex index of refraction for absorbing spheres isnegative.the scattering phase function is normalized so it equals thesingle scattering albedowhen integrated over 4π steradians.  As of version 2.3, this can be changed.Using miepythonYou can install locally using pip:pip install miepythonorrun this code in the cloud using Google Collaboratoryby selecting the Jupyter notebook that interests you.An exampleThe following code:import miepython

m = 1.5-1j
x = 1
qext, qsca, qback, g = miepython.mie(m,x)

print("The extinction efficiency  is %.3f" % qext)
print("The scattering efficiency  is %.3f" % qsca)
print("The backscatter efficiency is %.3f" % qback)
print("The scattering anisotropy  is %.3f" % g)should produce:The extinction efficiency  is 2.336
The scattering efficiency  is 0.663
The backscatter efficiency is 0.573
The scattering anisotropy  is 0.192Here are a few short scripts in the github repository.Extinction Efficiency of Absorbing and Non-Absorbing SpheresFour Micron Glass SpheresOne Micron Water DropletsGold NanospheresDetailed documentation is available at <https://miepython.readthedocs.io>Licensemiepythonis licensed under the terms of the MIT license.
Package: mies
MIESMiniature Insurance Economic SimulatorIntroductionThe purpose of MIES is to simulate, with the appropriate balance between detail and abstraction, various economic equilibria that result between the interactions between insurance firms, policyholders, and regulators.The goal is to create an explanatory model that links economic theory with actuarial science.Development BlogAdditional examples can be found in a series of blog posts, here:https://genedan.com/category/mies/DocumentationDocumentation can be found here:https://genedan.com/MIES/docs/Concepts ModeledAvailability of insurancePredatory pricingImpact of insolvency on insuredsProject GoalsShould be consistent with both macro and microeconomic theoryShould be consistent with actuarial theoryExample Simulationimport pandas as pd
import datetime as dt

from entities.god import God
from entities.broker import Broker
from entities.insurer import InsurerSet up the environment and relative entities - A broker, a population of insureds, and two insurers with 4B in capital:ahura = God()
ahura.make_population(1000)

rayon = Broker()
company_1 = Insurer(4000000, 'company_1')
company_2 = Insurer(4000000, 'company_2')Set up the pricing strategy for each company:company_1_formula = 'incurred_loss ~ age_class + profession + health_status + education_level'
company_2_formula = 'incurred_loss ~ age_class'The broker can now be used to place business, given each insurer's pricing strategy:rayon.place_business(
        pricing_date,
        company_1,
        company_2
)

event_date = pricing_date + dt.timedelta(days=1)Generate losses, report claims, and then reprice and renew policies:event_date = pricing_date + dt.timedelta(days=1)
ahura.smite(event_date)
rayon.report_claims(event_date)
company_1.price_book(company_1_formula)
company_2.price_book(company_2_formula)
pricing_date = pricing_date.replace(pricing_date.year + 1)