Skip to content

Instantly share code, notes, and snippets.

Vivek Amilkanthawar vivek081166

View GitHub Profile
from keras.callbacks import ReduceLROnPlateau
from keras.utils.np_utils import to_categorical
import keras.backend as K
from keras import regularizers
from keras.layers import Lambda
from keras.layers.convolutional import Conv1D, MaxPooling1D
from keras.layers.core import Activation, Dense
from keras.layers.normalization import BatchNormalization
from keras.models import Sequential
import numpy as np
import os
import pickle
from glob import iglob
import numpy as np
import librosa
DATA_AUDIO_DIR = './audio'
TARGET_SR = 8000
OUTPUT_DIR = './output'
OUTPUT_DIR_TRAIN = os.path.join(OUTPUT_DIR, 'train')
import os
import pickle
from glob import iglob
from shutil import rmtree
import numpy as np
from model_data import read_audio_from_filename
DATA_AUDIO_DIR = './audio'
TARGET_SR = 8000
OUTPUT_DIR = './output'
View app.component.ts
import { Component } from '@angular/core';
import { ElectronService } from 'ngx-electron';
import * as mobilenetModule from '@tensorflow-models/mobilenet';
import * as tf from '@tensorflow/tfjs';
import * as knnClassifier from '@tensorflow-models/knn-classifier';
// Number of classes to classify
const NUM_CLASSES = 3;
// Webcam Image size. Must be 227
View main.ts
import {app, BrowserWindow} from 'electron';
import * as path from 'path';
import * as url from 'url';
let win: BrowserWindow;
app.on('ready', createWindow);
app.on('activate', () => {
if (win === null) {
View tsconfig.json
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist",
"sourceMap": true,
"declaration": false,
"module": "commonjs",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
echo '>> START : Audio to Spectrogram creation <<'
for audioFile in ./audio_train/*.wav; do
echo $audioFile
ffmpeg -i $audioFile -lavfi showspectrumpic=s=1024x512:legend=disabled $audioFile.jpg
echo '>> END : Audio to Spectrogram creation <<'
# import the necessary packages
import numpy as np
import cv2
def order_points(pts):
# initialzie a list of coordinates that will be ordered
# such that the first entry in the list is the top-left,
# the second entry is the top-right, the third is the
# bottom-right, and the fourth is the bottom-left
rect = np.zeros((4, 2), dtype = "float32")
View blog2_static_typing.dart
void main() {
// Type Integer
int a = 8;
// Type String
String b = "some text";
View blog2_dynamic_typing.dart
void main() {
var a; // declaring varible // a = null
a = 9; // initializing varible // a = 9
a = "Vivek"; // a = "Vivek"
You can’t perform that action at this time.