Skip to content

Instantly share code, notes, and snippets.

View jaidevd's full-sized avatar

Jaidev Deshpande jaidevd

View GitHub Profile
@jaidevd
jaidevd / antonyms.py
Created February 10, 2020 02:42
Wordnet antonyms
#!/usr/bin/env python
# coding: utf-8
# In[1]:
get_ipython().run_line_magic('load_ext', 'autoreload')
get_ipython().run_line_magic('autoreload', '2')
@jaidevd
jaidevd / dl_avdhs.md
Created September 11, 2018 10:31
Deep Learning with the Scientific Method

Deep Learning with the Scientific Method

The Problem

As technology becomes cheaper and more available, we start taking it for granted. Nowhere is this more true than in machine learning. As machines become cheaper and data becomes more and more voluminous, our approach to specific machine learning problems often, and understandably, becomes haphazard. Since GPUs are much cheaper and more widely available than ever before, we implicitly believe that throwing enough artificial neurons at a problem will eventually solve it. While this by itself may be true, it is not uncommon for ML practitioners to realize - unfortunately only in hindsight - that most of the iterations required to build a successful predictive model were unnecessary. Ironically, these 'missteps' are often what lead us to the correct answer. Solving a machine learning problem is like traversing a minefield, where the safest path can only be determined by blowing up a significantly large number of mines. You can only figure out the right a

```
for each epochs:
* divide the training data into minibatches
for each minibatch:
* backpropagate and update weights
```
@jaidevd
jaidevd / test.py
Created May 9, 2018 07:36
inheritance in tests
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# JSM product code
#
# (C) Copyright 2018 Juxt SmartMandate Pvt Ltd
# All right reserved.
#
# This file is confidential and NOT open source. Do not distribute.
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
from __future__ import print_function
for i in range(1, 10):
print(i)
if i % 2 == 0:
exit
@jaidevd
jaidevd / w2v_keras_functional.py
Created March 22, 2018 14:37
Sample W2V script in keras
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
"""
Training Word embeddings on the MTsamples dataset.
"""
from keras.models import Model
from keras.layers import Dense, Embedding, Input, Reshape, Dot
@jaidevd
jaidevd / pycon-india-code-of-conduct-addenda.md
Last active March 18, 2017 07:33
A rant disguised as a code of conduct

Things that the regular code of conduct missed out

  1. Thou shalt not slam the door when thou leaveth the auditorium.
  2. Thou shalt take care not to kick the seat in front of you in the auditorium.
  3. Thou shalt make sure that thy phone is silenced.
  4. Thou shalt not jump the queue for lunch or tea.
  5. Thou shalt speak only in whispers if a session is in progress.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jaidevd
jaidevd / .vimrc
Last active March 23, 2017 15:23
" Powerline stuff
set rtp+=/Users/jaidevd/src/powerline/powerline/bindings/vim
set laststatus=2
execute pathogen#infect()
" Python stuff
syntax enable
filetype on
Title Author Genre Height Publisher
Fundamentals of Wavelets Goswami, Jaideva signal_processing 228 Wiley
Data Smart Foreman, John data_science 235 Wiley
God Created the Integers Hawking, Stephen mathematics 197 Penguin
Superfreakonomics Dubner, Stephen economics 179 HarperCollins
Orientalism Said, Edward history 197 Penguin
Nature of Statistical Learning Theory, The Vapnik, Vladimir data_science 230 Springer
Integration of the Indian States Menon, V P history 217 Orient Blackswan
Drunkard's Walk, The Mlodinow, Leonard science 197 Penguin
Image Processing & Mathematical Morphology Shih, Frank signal_processing 241 CRC