Skip to content

Instantly share code, notes, and snippets.

View sachinkmohan's full-sized avatar
🎯
Focusing

Sachin Mohan sachinkmohan

🎯
Focusing
View GitHub Profile
@sachinkmohan
sachinkmohan / tfmot.md
Last active April 13, 2022 12:21
Tensorflow model optimization involving pruning and quantization

Pruning on the whole model

import tensorflow_model_optimization as tfmot 
from tensorflow_model_optimization.python.core.sparsity.keras import pruning_schedule as pruning_sched

prune_low_magnitude = tfmot.sparsity.keras.prune_low_magnitude

# Compute end step to finish pruning after 2 epochs.
batch_size = 8
epochs = 2
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
.idea/
# C extensions
*.so
# Distribution / packaging
@sachinkmohan
sachinkmohan / npm_error.md
Created July 19, 2022 16:05
Error on starting the React Application

I am getting the folowing error when I am using npm start

sachin@Sachins-Mac voting_app % npm start

> voting_app@1.1.0 start
> npm run server


> voting_app@1.1.0 server
@sachinkmohan
sachinkmohan / typescript-crash.ts
Created July 6, 2024 16:35 — forked from bradtraversy/typescript-crash.ts
Basic intro to TypeScript (From YouTube Crash Course)
// Basic Types
let id: number = 5
let company: string = 'Traversy Media'
let isPublished: boolean = true
let x: any = 'Hello'
let ids: number[] = [1, 2, 3, 4, 5]
let arr: any[] = [1, true, 'Hello']
// Tuple
@sachinkmohan
sachinkmohan / boilerplate-web.md
Last active February 21, 2026 16:51
Boilerplates Web

React

export const ComponentName = () => {
  return (
    <div>Dummy Text</div>
  )
}

// While importing 
@sachinkmohan
sachinkmohan / jspuzzles.md
Last active June 13, 2026 11:04
JS Puzzles
  1. Difficulty: ⭐⭐⭐ (Hard)
function puzzle(a, b) {
  return a === b ? a : puzzle(b, a % b);
}

console.log(puzzle(48, 18));  // ?
console.log(puzzle(100, 50)); // ?
console.log(puzzle(17, 5)); // ?