This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pretty_midi as pm | |
from itertools import cycle | |
import matplotlib.pyplot as plt | |
import matplotlib.patches as patches | |
def plot_midi(midi: pm.PrettyMIDI): | |
fig, ax = plt.subplots() | |
colors = plt.rcParams['axes.prop_cycle'].by_key()['color'] | |
colors = cycle(colors) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {Animated, StyleSheet, Text} from 'react-native'; | |
function generateData() { | |
return [...Array(100)].map(Math.random); | |
} | |
const data = generateData(); | |
function renderItem({item, index}) { |