code stringlengths 3 6.57k |
|---|
repr(line) |
LineTooLong(HTTPException) |
__init__(self, line_type) |
RemoteDisconnected(ConnectionResetError, BadStatusLine) |
__init__(self, *pos, **kw) |
BadStatusLine.__init__(self, "") |
ConnectionResetError.__init__(self, *pos, **kw) |
os.path.dirname(__file__) |
rel(*p) |
os.path.normpath(os.path.join(DIR, *p) |
rel('nst-est2019-alldata.csv') |
rel('state_data.json') |
main() |
copy.deepcopy(STATE_DATA) |
enumerate(state_data) |
open(CENSUS_DATA, 'r') |
csv.DictReader(f) |
int(row['POPESTIMATE2019']) |
json.dumps(state_json_data, indent=2) |
open(OUT_JSON, 'w') |
json.dump(state_json_data, f, indent=2) |
main() |
flatten_dir(dir) |
print("Flattening MusicData directory...") |
itertools.islice(os.walk(dir) |
all_files.append(os.path.join(root, filename) |
shutil.move(filename, dir) |
print(f"{dups} duplicate files removed") |
generate_big_music(resolution_scale=RESOLUTION_SCALE) |
print("Generating big_music from MusicData directory...") |
listdir("MusicData/") |
isfile(join("MusicData/", f) |
print("Normalizing big_music...") |
np.empty((1) |
np.empty((len(onlyfiles) |
tqdm(range(len(onlyfiles) |
scipy.io.wavfile.read(f"MusicData/{file}") |
big_music.reshape(-1) |
print(f"Building spectrogram...") |
plt.specgram(x, Fs=44100) |
plt.savefig(f'MusicImageData/{file}.png') |
x.reshape(-1, 1) |
MinMaxScaler() |
min_max_scaler.fit_transform(x) |
list(np.empty((int(x.shape[0] / square_size / square_size) |
np.zeros((square_size, square_size, 1) |
np.zeros((square_size, 1) |
tqdm(range(len(samples) |
range(square_size) |
range(square_size) |
print("Numpyifying x...") |
np.concatenate([big_music, x]) |
print(f"big_music is of shape {big_music.shape}") |
signal.spectrogram(big_music, 44100) |
spectrogram.reshape((spectrogram.shape[1], spectrogram.shape[0]) |
print(spectrogram.shape) |
print(f"Saving {filename}...") |
np.save(f"{filename}", spectrogram) |
print(f"Saving {filename}...") |
np.save(f"{filename}", freqs) |
print(f"Saving {filename}...") |
np.save(f"{filename}", times) |
print("Music Preprocessor v0.1") |
flatten_dir() |
generate_big_music() |
database (Database) |
collection_list (list) |
__init__(self, mongo_uri, database) |
mongo_uri (str) |
database (str) |
pymongo.MongoClient(mongo_uri) |
self.database.collection_names() |
get_collection(self, collection) |
collection (str) |
load_clvm("littlelambocoinlisp_deserialisation.clvm", package_or_requirement="littlelambocoin.wallet.puzzles") |
serialized_atom_overflow(size) |
bytes([0x80 | size]) |
bytes([0xC0 | (size >> 8) |
bytes([0xE0 | (size >> 16) |
size_blob.hex() |
TestClvmNativeDeserialization(TestCase) |
test_deserialization_simple_list(self) |
hexstr_to_bytes("ff8568656c6c6fff86667269656e6480") |
DESERIALIZE_MOD.run_with_cost(INFINITE_COST, [b]) |
print(cost, output) |
Program.to(output) |
Program.from_bytes(b) |
test_deserialization_password_coin(self) |
i (= (sha256 2) |
c (q 51) |
c (q 100) |
q () |
DESERIALIZE_MOD.run_with_cost(INFINITE_COST, [b]) |
print(cost, output) |
Program.to(output) |
Program.from_bytes(b) |
test_deserialization_large_numbers(self) |
DESERIALIZE_MOD.run_with_cost(INFINITE_COST, [b]) |
print(cost, output) |
Program.to(output) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.