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 streamlit as st | |
| import requests | |
| from streamlit_lottie import st_lottie | |
| # Define a function that we can use to load lottie files from a link. | |
| @st.cache_data() | |
| def load_lottieurl(url: str): | |
| r = requests.get(url) | |
| if r.status_code != 200: | |
| return None |
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 os | |
| import tensorflow as tf | |
| import librosa | |
| import numpy as np | |
| def _int64_feature(value): | |
| return tf.train.Feature(int64_list=tf.train.Int64List(value=[value])) | |
| def _bytes_feature(value): | |
| return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value])) |
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 os | |
| import sys | |
| import wave | |
| # Get the path to the directory from the command-line argument | |
| if len(sys.argv) < 2: | |
| print("Usage: python script.py <directory>") | |
| sys.exit(1) | |
| root_dir = sys.argv[1] |
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 os | |
| import argparse | |
| import subprocess | |
| import shutil | |
| from pathlib import Path | |
| def convert_mp3_to_wav(mp3_file_path, output_dir, sample_rate): | |
| # extract the file name and extension | |
| mp3_file_name = os.path.basename(mp3_file_path) |
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 sys | |
| sys.path.append('../') | |
| from pycore.tikzeng import * | |
| # defined your arch | |
| arch = [ | |
| to_head( '..' ), | |
| to_cor(), | |
| to_begin(), | |
| to_Conv("conv1", 512, 64, offset="(0,0,0)", to="(0,0,0)", height=64, depth=64, width=2 ), |
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
| \pic[shift={(0,0,0)}] at (0,0,0) | |
| {Box={ | |
| name=conv1, | |
| caption= , | |
| xlabel={{64, }}, | |
| zlabel=512, | |
| fill=\ConvColor, | |
| height=64, | |
| width=2, | |
| depth=64 |
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
| \documentclass[border=15pt, multi, tikz]{standalone} | |
| \usepackage{import} | |
| \subimport{layers/}{init} | |
| \usetikzlibrary{positioning} | |
| \def\ConvColor{rgb:yellow,5;red,2.5;white,5} | |
| \def\ConvReluColor{rgb:yellow,5;red,5;white,5} | |
| \def\PoolColor{rgb:red,1;black,0.3} | |
| \begin{document} |
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
| \documentclass[border=8pt, multi, tikz]{standalone} | |
| \usepackage{import} | |
| \subimport{../layers/}{init} | |
| \usetikzlibrary{positioning} | |
| \usetikzlibrary{3d} %for including external image | |
| \def\ConvColor{rgb:yellow,5;red,2.5;white,5} | |
| \def\ConvReluColor{rgb:yellow,5;red,5;white,5} | |
| \def\PoolColor{rgb:red,1;black,0.3} | |
| \def\UnpoolColor{rgb:blue,2;green,1;black,0.3} |
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 json | |
| import os | |
| import tweepy as tw | |
| CONSUMER_KEY = 'XXXXXXXXXXXXXXXXXXXXXXXXX' | |
| CONSUMER_SECRET = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
| ACCESS_TOKEN = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
| ACCESS_TOKEN_SECRET = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
| BEARER_TOKEN = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \ |