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 cv2 | |
import mediapipe as mp | |
mp_drawing = mp.solutions.drawing_utils | |
mp_drawing_styles = mp.solutions.drawing_styles | |
mp_face_mesh = mp.solutions.face_mesh | |
time_start = 0 | |
drawing_spec = mp_drawing.DrawingSpec(thickness=1, circle_radius=1) | |
cap = cv2.VideoCapture(1) | |
with mp_face_mesh.FaceMesh( | |
max_num_faces=1, |
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 tempfile | |
import json | |
import subprocess | |
import ffmpy | |
import gradio as gr | |
include_audio = False | |
def ffprobe_info(filepath): | |
ff = ffmpy.FFprobe(inputs={filepath: None}, global_options='-v quiet -print_format json -show_format -show_streams') |
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
from nltk.tokenize import TweetTokenizer | |
from emoji import demojize | |
import re | |
tokenizer = TweetTokenizer() | |
def normalizeToken(token): | |
lowercased_token = token.lower() | |
if token.startswith("@"): |
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
#!/bin/bash | |
for name in *.wav; do | |
ffmpeg -i "$name" -ar 16000 "16KHz/${name%.*}.wav" | |
done |
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 time; | |
import scipy as sp; | |
import scipy.linalg as la; | |
import numpy as np; | |
n=10000 | |
A=sp.random.rand(n,n) | |
B=sp.random.rand(n,n) | |
t=time.time() |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 1.
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
1,"['REALLY+POSS:i', 'ROLLER-SKATE', 'MUSIC++GROUP/TOGETHER', 'LOTION', 'THROW-AWAY', 'PULSATE', 'CENT+ONE', 'BEE', 'SECOND-IN-LIST_2', 'ROPE', 'BATH+DRESS/CLOTHES', 'ns-FORT-WORTH-DALLAS', 'GIRL+CORRECT+LAW', 'FLIP-OVER', 'fs-GRAVITY', 'TABLE', '(1h)HAPPY+(1h)MOST', 'SEAT-BELT', 'NOTICE', 'CALCULATOR', 'THREE_2+HOUR', 'SIGN+LANGUAGE', 'SUNSHINE', 'LITTLE', 'FEATHER', 'ns-ECUADOR', 'CAR+TRUNK', 'APPROVE/VETO', 'NINE-MONTHS', 'ALWAYS+FOREVER_2', 'PRESBYTERIAN', 'MORE-THAN', 'BACKSTAB', 'DISAGREE', 'TELESCOPE', 'PERSON', 'ns-fs-COKE', 'PURSE', 'TIME', '(G)THANKSGIVING', 'GLASSES_2', 'AGENT', 'ns-FORT-WORTH', 'TRIM', 'NOON', 'CLIMB', 'NEXT-WEEK_2', 'SLEEP+DRESS/CLOTHES', '(1h)SCREAM', 'fs-JEWELRY', 'SKYSCRAPER', 'ns-fs-BEIJING', 'STRAWBERRY', '(1h)HAMMER+AGENT', 'TURN+SISTER', 'PICKLE', 'SHORT-SLEEVE', 'SIGN', 'TRIM-HEDGE', 'ASTONISHED', 'MAGNET_3', 'MAGNET_2', 'SCOUT', 'FASCINATE', 'fs-HOLY', 'NECK', 'TWENTY-FIVE', 'NOSE+OPPOSITE', 'FOURTH-PLACE', 'PRESS-BUTTONS', 'fs-FEET', 'MAKE-BUBBLES', 'fs-JELLY', 'SIX-DOL |
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
youtube-dl -F http://www.youtube.com/watch?v=3JZ_D3ELwOQ | |
output: | |
[youtube] Setting language | |
[youtube] 3JZ_D3ELwOQ: Downloading webpage | |
[youtube] 3JZ_D3ELwOQ: Downloading video info webpage | |
[youtube] 3JZ_D3ELwOQ: Extracting video information | |
[info] Available formats for 3JZ_D3ELwOQ: | |
format code extension resolution note | |
171 webm audio only DASH webm audio , audio@ 48k (worst) |
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
ffmpeg -i input.mp4 output.mp3 | |
ffmpeg -i input.wav -codec:a libmp3lame -qscale:a 2 output.mp3 |
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
ffmpeg -i filename | |
#Input #0, matroska,webm, from 'somerandom.mkv': | |
# Duration: 01:16:10.90, start: 0.000000, bitrate: N/A | |
# Stream #0.0: Video: h264 (High), yuv420p, 720x344 [PAR 1:1 DAR 90:43], 25 fps, 25 tbr, 1k tbn, 50 tbc (default) | |
# Stream #0.1: Audio: aac, 48000 Hz, stereo, s16 (default) |
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
ffmpeg -i 111.mp3 -acodec pcm_s16le -ac 1 -ar 16000 out.wav |
NewerOlder