Skip to content

Instantly share code, notes, and snippets.

@DadgadCafe
DadgadCafe / np.py
Created June 30, 2017 03:44
notes of numpy and pandas.
import numpy as np
# linspace:创建线段
arr = np.array([[1, 2, 3]
[4, 5, 6]], dtype=int32) # list to matrix
arr.ndim # 2 dimensions
arr.shape # 2 * 3
arr.size # number of elements
@DadgadCafe
DadgadCafe / coroutine.js
Created August 18, 2017 04:26
naive prototype of coroutine
function _go(g, step) {
while(!step.done) {
//run the closure function
const [state, value] = step.value()
switch (state) {
case "park":
// just wait, add to eventloop
// setImmediate(function() { _go(g, step) })
setTimeout(function() { _go(g, step) })
const arr = Array(5).fill([true]))
arr[0][0] = false
console.log(arr) //guess what!
1. C - Dm => C - C#dim7(A7) - Dm; F - G => F - F#dim - G
2. minor, half note down... michelle the beatles
3. 4736251 + leading bass 1765.., secondary domiant
4. passing chord
5. V7 half note down... C - Bb7 - A7 - Ab7 - G7 - any major
reason: multiple dominant fuzz the tonality
6. mode - color
minor dorian
major lydian
dominant phrygian-dominant