This file contains hidden or 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
javascript: (async function () { | |
function validateSticonIdFormat(id) { | |
return /^[a-f0-9]{8,}$/.test(id); | |
} | |
function buildSticonZipUri(id, animation = false, platform = "iphone") { | |
const suffix = animation ? "_animation" : ""; | |
/* No content difference between iPhone and Android for now */ | |
return `https://stickershop.line-scdn.net/sticonshop/v1/${id}/sticon/${platform}/package${suffix}.zip`; | |
} | |
function downloadSticonZip(id, animation = false, blank = false) { |
This file contains hidden or 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
async function newRecorder( | |
target = "stream", | |
querySelector = "video", | |
frameRate = 60, | |
systemAudio = false, | |
flushMinutes = 10, | |
) { | |
let stream = null; | |
let beforeUnloadListener = null; | |
switch (target) { |
This file contains hidden or 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
# ~/.ipython/profile_default/startup/startup.py | |
import sys | |
import os | |
import os.path | |
import pathlib | |
import glob | |
import shutil | |
import subprocess as sp | |
import io |
This file contains hidden or 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
javascript: (async function() { | |
async function stringifyRule(rule, contextStyleSheet) { | |
return rule instanceof CSSImportRule ? (rule.stylesheet ? await stringifyStyleSheet(rule.stylesheet) : "") : await inlinizeStyleImages(rule.cssText || "", (contextStyleSheet.href ?? contextStyleSheet.ownerNode?.baseURI ?? document.baseURI)); | |
} | |
async function stringifyStyleSheet(style) { | |
try { | |
return style.cssRules ? (await Promise.all([...style.cssRules].map(r => stringifyRule(r, style)))).join("\n") : ""; | |
} catch (e) { | |
console.warn(e); | |
return ""; |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import os | |
import os.path | |
import pathlib | |
import sys | |
import glob | |
def map(char): | |
a = ord(char) |
This file contains hidden or 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
javascript: [...document.styleSheets].forEach(x => x.disabled = true) |
This file contains hidden or 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
javascript: (async function () { | |
function validateThemeIdFormat(id) { | |
return /^[-a-z0-9]{6,}$/.test(id); | |
} | |
function buildThemeZipUri(id, version, platform) { | |
const subdir1 = id.substring(0, 2); | |
const subdir2 = id.substring(2, 4); | |
const subdir3 = id.substring(4, 6); | |
const baseuri = "https://stickershop.line-scdn.net/themeshop/v1/products"; | |
return `${baseuri}/${subdir1}/${subdir2}/${subdir3}/${id}/${version}/${platform}/theme.zip`; |
This file contains hidden or 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 itertools | |
from collections import deque | |
from rich.progress import track | |
import cv2 | |
n = 5 | |
process_frames = 60 * 3 | |
cap = cv2.VideoCapture("SSX.avi") | |
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) |
This file contains hidden or 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 itertools | |
import os | |
import shutil | |
import soundfile as sf | |
import librosa | |
import librosa.beat | |
import librosa.effects | |
beat = 4 |
NewerOlder