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 tensorflow as tf | |
gpu_fraction = 0.1 | |
vector_size = 100 | |
n = 1 | |
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=gpu_fraction) | |
config = tf.ConfigProto(gpu_options=gpu_options) | |
for i in range(n): | |
with tf.Session(config=config) as sess: | |
a = tf.random.normal([vector_size]) |
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 pyperclip as clipboard | |
# path of file to open | |
openFile = "stats.txt" | |
# row will be populated in this order | |
L2Size = 2 | |
L3Size = 4 | |
TestSet = "gcc" | |
keysToLookFor = ['sim_seconds', |
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
# path of file to open | |
openFile = "stats.txt" | |
saveFile = openFile + ".json" | |
# returns string representations of items in array as a single string joined with joiner | |
# inserted between each item | |
def strJoin (sarr, joiner): |
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 numpy as np | |
import wave | |
import struct | |
waveFile = "No open file" | |
path = "" | |
# 0 is the least verbose | |
printLevel = 0 | |
def open(input, verbose=0): |
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 wave | |
import struct | |
import sys | |
# the only non-default library | |
import numpy as np | |
input = "file_path_here.wav" | |
waveFile = wave.open(input, 'r') |