This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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== | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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; |