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, |
View audio-to-spectrogram.sh
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 | |
done | |
echo '>> END : Audio to Spectrogram creation <<' |
View transform.py
# 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; | |
print(a); | |
// Type String | |
String b = "some text"; | |
print(b); | |
View blog2_dynamic_typing.dart
void main() { | |
var a; // declaring varible // a = null | |
print(a); | |
a = 9; // initializing varible // a = 9 | |
print(a); | |
a = "Vivek"; // a = "Vivek" |
View blog2_program_structure.dart
main(){ | |
print("something"); | |
} |
View blog2.dart
void main() { | |
print("こんにちは、ゴーリストのビベックです。"); | |
print("Hello World! Vivek here again :)"); | |
print("Let's learn Dart together!"); | |
} |
View main.dart
void main() { | |
print("こんにちは、ゴーリストのビベックです。"); | |
print("Hello World! Vivek here "); | |
} |