Skip to content

Instantly share code, notes, and snippets.

View shravankumar147's full-sized avatar
🎯
Focusing

Shravankumar shravankumar147

🎯
Focusing
View GitHub Profile
'''This script goes along the blog post
"Building powerful image classification models using very little data"
from blog.keras.io.
It uses data that can be downloaded at:
https://www.kaggle.com/c/dogs-vs-cats/data
In our setup, we:
- created a data/ folder
- created train/ and validation/ subfolders inside data/
@shravankumar147
shravankumar147 / gist:5433ff6bcb4c98d8902c51840f804597
Created November 6, 2016 06:44 — forked from entaroadun/gist:1653794
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation:

@shravankumar147
shravankumar147 / beautiful_idiomatic_python.md
Created March 17, 2017 08:14 — forked from JeffPaine/beautiful_idiomatic_python.md
Transforming Code into Beautiful, Idiomatic Python: notes from Raymond Hettinger's talk at pycon US 2013. The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Transforming Code into Beautiful, Idiomatic Python

Notes from Raymond Hettinger's talk at pycon US 2013 video, slides.

The code examples and direct quotes are all from Raymond's talk. I've reproduced them here for my own edification and the hopes that others will find them as handy as I have!

Looping over a range of numbers

for i in [0, 1, 2, 3, 4, 5]:
@shravankumar147
shravankumar147 / nback_features_test.m
Created May 8, 2017 03:06
This code will extract nback_features from the data
clear all;
clc;
% loading Preprocessed_2s, which contains data
load('Preprocessed_response_2s.mat')
% loading correct respose indices
load('etc\response_fld0.05_correct.mat');
% load('etc\response_correct_fld0.05.mat');
S=[];
@shravankumar147
shravankumar147 / nback_features_test.m
Last active May 8, 2017 03:10
This code will extract nback-features from the data. line 7,8 loads correct response indices. Modifications are from line 40-42, for MATLAB2016a version compatibility.
clear all;
clc;
% loading Preprocessed_2s, which contains data
load('Preprocessed_response_2s.mat')
% loading correct respose indices
load('etc\response_fld0.05_correct.mat');
% load('etc\response_correct_fld0.05.mat');
S=[];
@shravankumar147
shravankumar147 / psvm_classification.m
Created May 8, 2017 03:16
Used as it is, except some version compatibility changes. lines: 3,4,12-16
clear all;
clc;
stype={'char','pos','bar','pie'}; %modified here
load('S2.mat') %S2.mat is the correct response data w.r.t. response_fld0.05_correct.mat
eegdata=S;
for type=1:4
% load('processed_data\features2_normalized.mat');
% load('processed_data\features_mRMR_400mid.mat');
% load('processed_data\processed_target_2s1.mat');
% load('processed_data\features_target_final.mat');
@shravankumar147
shravankumar147 / data1470.m
Last active May 9, 2017 03:22
response_correct_fld0.05.mat, response_fld0.05_correct.mat both of these .mat files contains the index values for the correct responses of size 1470x1,1837x1 respectively. Using these we extract eegdata from S, and nback,ctype targets, along with processed_metadata. All these values are put together in a single mat file called data147.mat/data18…
load('processed_target_response_2s.mat')
load('S1.mat')
load('etc\response_correct_fld0.05.mat')
nback_target = nback_target(idx);
ctype_target = ctype_target(idx);
processed_meta_2s = processed_meta_2s(idx,:);
eegdata = S;
save data1470.mat eegdata nback_target ctype_target processed_meta_2s
@shravankumar147
shravankumar147 / spam_filter.ipynb
Last active August 4, 2017 06:51
Spam Filtering
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shravankumar147
shravankumar147 / my_vimrc
Last active October 11, 2017 06:46
vimrc_for_python
set nocompatible " be iMproved, required
filetype off " required
set exrc
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" ==== PLUGINS ====
Plugin 'VundleVim/Vundle.vim'
Plugin 'vim-scripts/L9'
@shravankumar147
shravankumar147 / postsname_generator.py
Created October 14, 2017 07:08
jekyll post name generator for github project pages
from datetime import datetime
def post_name(name):
"""
This will generate your github post name.
example: