Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

003bb1cf-143d-42d4-b760-b98b96d0db5c.mkv
0043001d-0c08-40eb-8543-21010804eb0b.mkv
0048f2de-d154-46d8-a46d-0bf4ea021e1a.mkv
0051fc71-751c-4a3f-90fe-7d677792a759.mkv
0053d44a-f63a-44e8-9c3b-a23033d67557.mkv
0064e7ea-804e-4167-951c-70454ee20515.mkv
0065f790-264f-4d05-9a37-de27c24946cf.mkv
0069cf46-da33-46b7-a205-6716ab92a327.mkv
00796e0b-ed18-4cf2-bbc6-0e6c5394273f.mkv
007d6d94-682f-4ff6-b1fd-a1809d79a927.mkv
import UIKit
import AVFoundation
import SwiftUI
// Image Extraction
protocol FrameExtractorDelegate: class {
X
<figure>
<figcaption>Listen to the T-Rex:</figcaption>
<audio
controls
src="https://s3.ap-northeast-2.amazonaws.com/audio-streaming-test/2018-11-30+ %E1%84%86%E1%85%A6%E1%86%AB%E1%84%90%E1%85%A1%E1%86%AF%E1%84%80%E1%85%AE%E1%84%8C%E1%85%A9%E1%84%83%E1%85%A2+ 1%E1%84%87%E1%85%AE(%E1%84%90%E1%85%A9%E1%86%BC%E1%84%92%E1%85%A1%E1%86%B8).mp3">
Your browser does not support the
<code>audio</code> element.
</audio>
figure>
{
"audio": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]
}
# python for loop
for d in Dataset:
d = preprocessing(d)
write_tfrecord(d)
# python map function
itr = map(preprocessing, Dataset)
for i in itr:
write_tfrecord(i)
import tensorflow as tf
def input_fn():
dataset = tf.data.TFRecordDataset('dataset_path')
dataset = dataset.batch(10)
dataset = dataset.shuffle(6666)
dataset = dataset.repeat(10)
import csv
import os
hand_path = '/Users/chanwoo/Documents/sources/IEMOCAP_full_release/Session1/dialog/MOCAP_hand/'
label_path = '/Users/chanwoo/Documents/sources/IEMOCAP_full_release/Session1/dialog/EmoEvaluation/'
filename = 'Ses01F_impro01.txt'
with open(os.path.join(hand_path, filename), 'r') as f:
raw_text = f.read()
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
tf.reset_default_graph()
data = [[i for i in range(10)] for _ in range(1000)]
noise = np.random.randn(1000, 10)
real_data = tf.placeholder(tf.float32, shape=[None, 10])
import tensorflow as tf
import numpy as np
tf.reset_default_graph()
x = [[i for i in range(10)] for _ in range(1000)]
z = np.random.randn(1000, 10)
real_data = tf.placeholder(tf.float32, shape=[None, 10])
noise = tf.placeholder(tf.float32, shape=[None, 10])