Skip to content

Instantly share code, notes, and snippets.

@DeepakLabh
DeepakLabh / keras_interval_evalution.py
Created July 30, 2018 14:25 — forked from smly/keras_interval_evalution.py
An example to check the AUC score on a validation set for each 10 epochs.
"""
An example to check the AUC score on a validation set for each 10 epochs.
I hope it will be helpful for optimizing number of epochs.
"""
# -*- coding: utf-8 -*-
import logging
from sklearn.metrics import roc_auc_score
from keras.callbacks import Callback
@DeepakLabh
DeepakLabh / readme.md
Created May 18, 2018 12:12 — forked from flyyufelix/readme.md
Resnet-152 pre-trained model in Keras

ResNet-152 in Keras

This is an Keras implementation of ResNet-152 with ImageNet pre-trained weights. I converted the weights from Caffe provided by the authors of the paper. The implementation supports both Theano and TensorFlow backends. Just in case you are curious about how the conversion is done, you can visit my blog post for more details.

ResNet Paper:

Deep Residual Learning for Image Recognition.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
arXiv:1512.03385
@DeepakLabh
DeepakLabh / numpy-benchmark.py
Created March 21, 2018 12:51 — forked from markus-beuckelmann/numpy-benchmark.py
A short Python script to benchmark NumPy and show your BLAS setup
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Roughly based on: http://stackoverflow.com/questions/11443302/compiling-numpy-with-openblas-integration
from __future__ import print_function
import numpy as np
from time import time
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/home/arya/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="robbyrussell"
import numpy as np
from sklearn.datasets import make_moons
from sklearn.cross_validation import train_test_split
n_feature = 2
n_class = 2
def make_network(n_hidden=100):
sudo unshare -n <Your-Command> # run command without using ant network
mhonarc -single <input mbox filename> > <output html filename> # COnvert mbox formt to html
@DeepakLabh
DeepakLabh / offlineimap.imaprc
Last active December 5, 2017 11:12
Sample configuration file for offlineimap tool that helps syncing local and remote mailboxes using IMAP protocol of Microsoft outlook exchange
[general]
accounts = Outlook
maxsyncaccounts = 3
[Account Outlook]
localrepository = Local
remoterepository = Remote
maxage = 2
[Repository Local]
@DeepakLabh
DeepakLabh / gist:9a6ec07c06b960e2eaa064129a2b85e3
Created May 17, 2017 12:39 — forked from dabrahams/gist:3030332
My new, simpler offlineimap configuration
# -*- mode: conf; -*-
#
# NOTE: Settings generally support python interpolation. This means
# values can contain python format strings which refer to other values
# in the same section, or values in a special DEFAULT section. This
# allows you for example to use common settings for multiple accounts:
#
# [Repository Gmail1]
# trashfolder: %(gmailtrashfolder)s
#
@DeepakLabh
DeepakLabh / .bashrc
Last active February 15, 2017 12:36
.bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac