Skip to content

Instantly share code, notes, and snippets.

View jniimi's full-sized avatar

Junichiro Niimi jniimi

View GitHub Profile
@jniimi
jniimi / download_yelp_dataset_with_colab.ipynb
Created November 26, 2023 06:46
download_yelp_dataset_with_colab.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jniimi
jniimi / stable-diffusion-videos-on-colab.ipynb
Last active August 12, 2023 02:38
Generate videos using Stable Diffusion Videos on Google Colaboratory. Since Google Drive is very slow compared to Dropbox and other services, it is inefficient to synchronize with it to add files locally every time a large number of images are generated on Google Colaboratory (Colab). Thus, this script describes the codes that only video files a…
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import wave
import numpy as np
import pandas as pd
from IPython.display import Audio
from scipy import signal
class AudioDataFrame:
def __init__(self, bpm = 120, bars = 1, sampling_freq=44100, sub=False, subsub=False):
self.bpm = bpm
self.bars = bars
import wave
import numpy as np
import pandas as pd
from IPython.display import Audio
class AudioDataFrame:
def __init__(self, bpm = 120, bars = 1, sampling_freq=44100, sub=False, subsub=False):
self.bpm = bpm
self.bars = bars
self.beats = 4 * bars
import wave
import numpy as np
import pandas as pd
from IPython.display import Audio
class AudioDataFrame:
def __init__(self, bpm = 120, bars = 1, sampling_freq=44100, sub=False, subsub=False):
self.bpm = bpm
self.bars = bars
self.beats = 4 * bars
import numpy as np
import pandas as pd
from IPython.display import Audio
class AudioDataFrame:
def __init__(self, bpm = 120, bars = 1, sampling_freq=44100):
self.bpm = bpm
self.bars = bars
self.beats = 4 * bars
self.seconds = 60 / bpm * self.beats