Skip to content

Instantly share code, notes, and snippets.

View tariqul-islam's full-sized avatar
💭
I may be slow to respond.

Mohammad Tariqul Islam tariqul-islam

💭
I may be slow to respond.
View GitHub Profile
@tariqul-islam
tariqul-islam / trustworthiness.py
Last active October 8, 2020 01:52
Numba implementation of Trustworthiness Score
import numpy as np
import numba
from numba import prange
#Usage: (X,Y) data
#sort_idx,_ = get_first_order_graph(X,n_neighbors=15)
#tt = trustworthiness(Y,sort_idx)
@numba.jit(nopython=True, parallel=True)
def get_first_order_graph(X,n_neighbors):
import numpy as np
def compute_di_score(features,Y):
'''
Computes DI Score of a Neural Network Output
For convolution layer, the DI score of each channel is computed
For fully connected layer, the DI score of each node is computed
Input:
features: shape: convolution: Ne,H,W,Nf
@tariqul-islam
tariqul-islam / caffe_time_for_caffenet.py
Last active April 20, 2019 09:03
How much did you speed up using caffe? Let's check it in reference caffenet.
#This is a basic benchmark code to see how fast
#your GPU is compared to your CPU
#
#Before you begin:
#go to caffe root, copy this code there
#get the bvlc_reference_caffenet using these two commands in caffe root:
#./scripts/download_model_binary.py models/bvlc_reference_caffenet
#./data/ilsvrc12/get_ilsvrc_aux.sh
#
// ==UserScript==
// @name Twitter Home Page Image Hider
// @namespace HH_Twitter_HPIH_HH
// @description Hides the images which are by default open, adds a RE-HIDE button in the navbar, and Show/Hide toggle button in the tweets
// @include http://twitter.com/*
// @include https://twitter.com/*
// @version 1
// ==/UserScript==
@tariqul-islam
tariqul-islam / gist:6414698
Last active May 18, 2022 16:00
A Hack for the popular cookie clicker game found in this website: http://orteil.dashnet.org/cookieclicker/ [Hacking takes all the fun away. Do not use it unless you want to boast to your friends about your score. And never claim directly that your score was original, don't be dishonest.... Now, go out there and use the code my friend... ;) ]
//run this in the console of web browser once the site is loaded
Game.cookies = 999999999999;
Game.cookiesPs = 10000;
Game.clickFrenzy = 2;
Game.goldenCookie.delay = 1;