This command now has a wrapper Python project that takes out the tedious parts for you.
See: NigthPro for GoPro
This command turns a series of images into a timelapse video.
type Split<T> = [T[], T[]]; | |
export function split<T>(arr: T[], isMatch: (item: T) => boolean): Split<T> { | |
return arr.reduce<Split<T>>((rv: [T[], T[]], item: T) => { | |
if (isMatch(item)) { | |
rv[0] = [...rv[0], item]; | |
} else { | |
rv[1] = [...rv[1], item]; | |
} | |
return rv; | |
}, [[], []] as Split<T>); |
type PopupConfig = { | |
map: google.maps.Map; | |
content: React.Component; | |
position: google.maps.LatLng; | |
} | |
class Popup extends google.maps.OverlayView { | |
private readonly container: HTMLDivElement; | |
private content: ComponentChild; | |
private position: google.maps.LatLng; |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>HTML5 Canvas</title> | |
</head> | |
<body> | |
<canvas id="my-canvas"></canvas> | |
</body> | |
<script> | |
window.onload = function(){ |
CAL_START = """ | |
BEGIN:VCALENDAR | |
PRODID:-//Google Inc//Google Calendar 70.9054//EN | |
VERSION:2.0 | |
CALSCALE:GREGORIAN | |
METHOD:PUBLISH | |
X-WR-CALNAME:Birthdays | |
X-WR-TIMEZONE:America/New_York | |
X-WR-CALDESC:Imported from Facebook |
This command now has a wrapper Python project that takes out the tedious parts for you.
See: NigthPro for GoPro
This command turns a series of images into a timelapse video.
import tweepy | |
import requests | |
execfile("../TWITTER_CREDENTIALS.py") | |
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) | |
auth.secure = True | |
auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET) |
var script = document.createElement('script'); script.src = "https://code.jquery.com/jquery-3.4.1.min.js"; document.getElementsByTagName('head')[0].appendChild(script); | |
// wait for script to load, then add and run the rest in console | |
function setWinnerAndMakeGame(gameElem) { | |
// get the teams | |
const teams = []; | |
$(gameElem).find('.DenseOutcome-content').each((_i, teamElem) => { | |
teams.push({ | |
name: $(teamElem).find('.DenseOutcome-title').text(), |
import os, time | |
from stat import * | |
from PIL import Image | |
img_ext = ["jpg","jpeg","png"] | |
vid_ext = ["mov","m4a","mp4","3gp"] | |
#IMG_19960811_0001.jpg | |
#VID_19960811_0001.m4a |
const int in = 1, | |
out = 3; | |
boolean on = false, | |
switchable = true; | |
void setup() { | |
pinMode(in, INPUT); | |
pinMode(out,OUTPUT); | |
} | |
void loop(){ |
import time | |
bar = 50 #length of bar in characters | |
loading = '0%'.ljust(bar) + '100%' | |
print(loading) | |
print('[', end="") | |
i = 0 | |
def load(percent): | |
#percent is decimal between 0 and 1 inclusive |