This file contains hidden or 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 Screener Charts | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Create Charts for Screener | |
// @author You | |
// @match https://www.screener.in/company/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=screener.in | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or 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
name: training_internal | |
channels: | |
- rapidsai-nightly | |
- conda-forge | |
- defaults | |
dependencies: | |
- _libgcc_mutex=0.1=conda_forge | |
- _openmp_mutex=4.5=1_llvm | |
- abseil-cpp=20210324.2=h9c3ff4c_0 | |
- absl-py=1.0.0=pyhd8ed1ab_0 |
This file contains hidden or 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 Change filename for arxiv downloads | |
// @namespace https://arxiv.org/ | |
// @version 1.0 | |
// @description Changes filename for the PDF link, so that once you open it in pdf js it downloads as "paper_name.pdf" instead of "year_month.identifier.pdf" | |
// @author Nishant Nikhil | |
// @match https://*.arxiv.org/abs/* | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or 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
cat crowds_zara01_train.txt | awk -F ' ' '{print $3}' | sort -n | sed -n '1p;$p' |
This file contains hidden or 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
var val = "3" | |
var radio_buttons = document.querySelectorAll('input[value="' + val +'"]'); | |
var i = 0; | |
for (i=0; i<radio_buttons.length ; i++){ | |
radio_buttons[i].checked = true; | |
} | |
var radio_buttons = document.querySelectorAll('input[value="5' + val +'"]'); | |
var i = 0; | |
for (i=0; i<radio_buttons.length ; i++){ | |
radio_buttons[i].checked = true; |
This file contains hidden or 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
from keras.preprocessing import sequence | |
from keras.models import Sequential | |
from keras.datasets import imdb | |
import torch | |
import torch.autograd as autograd | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torch.optim as optim |
This file contains hidden or 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 | |
y = np.array([[1.0, 7.0, 1.0],[3.0, 4.0, 2], [1, 7, 1]]) | |
x = torch.from_numpy(y) | |
x = Variable(x) | |
x = x.resize(1, 3, 3) | |
stride = 2 | |
new_var = Variable(torch.zeros([x.shape[0], x.shape[1]//stride, x.shape[2]//stride])) | |
new_var2 = Variable(torch.zeros([x.shape[0], x.shape[1]//stride, x.shape[2]//stride])) | |
for dim1 in range(x.shape[0]): | |
tmp = Variable(torch.zeros([x.shape[1]//stride, x.shape[2]//stride, 1])) |
This file contains hidden or 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
stride = 3 | |
new_var = Variable(torch.zeros([x.shape[0], x.shape[1]//stride, x.shape[2]//stride])) | |
for dim1 in range(x.shape[0]): | |
tmp = Variable(torch.zeros([x.shape[1]//stride, x.shape[2]//stride, 1])) | |
for i in range(0, x.shape[1], stride): | |
for j in range(0, x.shape[2], stride): | |
tmp_max = x[dim1][i][j] | |
for k in range(stride): | |
for m in range(stride): | |
tmp_max = torch.max(tmp_max, x[dim1][i+k][j+m]) |
This file contains hidden or 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
from bs4 import BeautifulSoup | |
import requests | |
data_list = [] | |
link = "https://wiki.metakgp.org/w/Special:ContributionScores" | |
response = requests.get(link) | |
html = response.content | |
source = BeautifulSoup(html, "lxml") | |
trs = source.findAll("tr") | |
run = False |
This file contains hidden or 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
# relu activation function | |
def relu(x): | |
return T.switch(x<0, 0, x) | |
class VAE: | |
"""This class implements the Variational Auto Encoder""" | |
def __init__(self, continuous, hu_encoder, hu_decoder, n_latent, x_train, b1=0.95, b2=0.999, batch_size=100, learning_rate=0.001, lam=0): | |
# let us keep the discussion to not continuous |
NewerOlder