This file contains 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 argparse | |
import subprocess | |
import os | |
from pathlib import Path | |
def compress_video(input_file, output_file, target_size_mb=5, initial_bitrate=500, | |
initial_scale=640, min_bitrate=50, min_scale=100, audio_bitrate=96, | |
max_attempts=5): | |
""" | |
Compress a video file to a target size while adjusting bitrate and scale. |
This file contains 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 os | |
import argparse | |
import librosa | |
import numpy as np | |
import pandas as pd | |
from sklearn.preprocessing import StandardScaler | |
from sklearn.decomposition import PCA | |
from sklearn.manifold import TSNE | |
from sklearn.cluster import KMeans |
This file contains 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
Windows Registry Editor Version 5.00 | |
[-HKEY_CLASSES_ROOT\.wav\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\PreviewHandlers] | |
"{031EE060-67BC-460d-8847-E4A7C5E45A27}"=- |
This file contains 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 collections import Counter | |
# Provided text | |
import os | |
import glob | |
# Define the directory path | |
dir_path = r"E:\Dubstep_diffusion\tracks" | |
# List all .wav and .mp3 files using glob with wildcard matching |
This file contains 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 os | |
import re | |
import matplotlib.pyplot as plt | |
from tqdm import tqdm | |
import pretty_midi | |
from basic_pitch.inference import predict_and_save, predict | |
from basic_pitch import ICASSP_2022_MODEL_PATH | |
from mido import MidiFile, MetaMessage, bpm2tempo | |
import subprocess | |
import librosa |
This file contains 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 os | |
import re | |
import matplotlib.pyplot as plt | |
from tqdm import tqdm | |
import pretty_midi | |
from basic_pitch.inference import predict_and_save, predict | |
from basic_pitch import ICASSP_2022_MODEL_PATH | |
from mido import MidiFile, MetaMessage, bpm2tempo | |
import demucs.separate | |
import shlex |
This file contains 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 os | |
import re | |
import matplotlib.pyplot as plt | |
from tqdm import tqdm | |
import pretty_midi | |
from basic_pitch.inference import predict_and_save | |
from basic_pitch import ICASSP_2022_MODEL_PATH | |
from mido import MidiFile, MetaMessage, bpm2tempo | |
# Set this flag to True if you want to reprocess all files, even if MIDI files already exist |
This file contains 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 librosa | |
import numpy as np | |
from mido import Message, MidiFile, MidiTrack, MetaMessage, bpm2tempo | |
import pretty_midi | |
import matplotlib.pyplot as plt | |
import os | |
import re | |
# Set this flag to True if you want to reprocess all files, even if MIDI files already exist | |
REPROCESS_ALL = False |
This file contains 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
# First, in your terminal. | |
# | |
# $ python3 -m virtualenv env | |
# $ source env/bin/activate | |
# $ pip install torch torchvision transformers sentencepiece protobuf accelerate | |
# $ pip install git+https://github.com/huggingface/diffusers.git | |
# $ pip install [email protected] | |
# $ pip install gradio | |
This file contains 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
const std = @import("std"); | |
const physics = @import("physics"); | |
const Ball = physics.Ball; | |
const Surface = physics.Surface; | |
const Allocator = std.mem.Allocator; | |
const Pos2 = physics.Pos2; | |
const Vec2 = physics.Vec2; | |
const num_flippers = 2; | |
const num_bumpers = 3; |
NewerOlder