function noteToFreq(note) {
let a = 440; //frequency of A (coomon value is 440Hz)
return (a / 32) * (2 ** ((note - 9) / 12));
}
function noteToFreq($note) {
import React, { Component } from 'react' | |
import { Animated, StyleProp, ViewStyle } from 'react-native' | |
export type FadeDirection = 'up' | 'down' | |
interface FadeProps { | |
visible?: boolean | |
style?: StyleProp<ViewStyle> | |
children: React.ReactNode | |
direction?: FadeDirection |
import OAuth from 'oauth-1.0a'; | |
import CryptoJS from 'crypto-js'; | |
/** | |
* oAuthHeader - Get Authentication header with OAuth. | |
* | |
* @param {string} url Request URL | |
* @param {string} method HTTP method. | |
* @return {object} Authentication header object | |
*/ |
#/bin/bash | |
# ffmpeg convert wav audio to opus audio | |
ffmpeg -i uploads/audio.wav -c:a opus -strict -2 -y uploads/output.opus | |
# ffmpeg combine webm and wav into a new webm with opus audio | |
ffmpeg -i uploads/video.webm -i uploads/audio.wav -c:a opus -strict -2 -y uploads/output.webm |
<a href="https://drive.google.com/uc?export=view&id=XXX"><img src="https://drive.google.com/uc?export=view&id=XXX" style="width: 500px; max-width: 100%; height: auto" title="Click for the larger version." /></a> |
import numpy as np | |
from matplotlib import pyplot as plt | |
def plotdf(f, xran=[-5, 5], yran=[-5, 5], grid=[21, 21], color='k'): | |
""" | |
Plot the direction field for an ODE written in the form | |
x' = F(x,y) | |
y' = G(x,y) | |
The functions F,G are defined in the list of strings f. |
import json | |
import requests | |
def get_twitter_favorites(): | |
# SET UP VARIABLES | |
SCREEN_NAME = 'yurivictor' # Please change this | |
BASE_URL = "https://api.twitter.com/1/favorites.json?screen_name=" | |
URL = BASE_URL + SCREEN_NAME | |