Skip to content

Instantly share code, notes, and snippets.

View abhshkdz's full-sized avatar

Abhishek Das abhshkdz

View GitHub Profile
@abhshkdz
abhshkdz / gist:855f6160e6fa272316de6e7a9cdeb69a
Last active November 29, 2021 04:29
tzprofile_verification
I am attesting that this GitHub handle abhshkdz is linked to the Tezos account tz1eUCsDj4jJc5xErZvsDPjxo442Va3g93ru for tzprofiles
sig:edsigti29g8cDZXDc9ToSojVFo5FqrVJQNmkaXHth21ZeXdPKEaTfdmg8SakWqjVz9rFp9oc8hsfE9fv9gFWf3r9ZWk9U1SF2JZ
import math
import numpy as np
import torch
import torch.nn as nn
class URLSTMCell(nn.Module):
"""Implementation of the UR-LSTM cell from the paper: Improving the Gating
Mechanism of Recurrent Neural Networks (https://arxiv.org/abs/1910.09890) by
Gu et al., 2019.
@abhshkdz
abhshkdz / keybase.md
Last active March 30, 2017 08:05
Keybase proof

Keybase proof

I hereby claim:

  • I am abhshkdz on github.
  • I am abhshkdz (https://keybase.io/abhshkdz) on keybase.
  • I have a public key whose fingerprint is D157 90AC C1DE B429 0F42 F832 DBF8 E58C F038 7DEF

To claim this, I am signing this object:

@abhshkdz
abhshkdz / Place.pde
Last active April 23, 2016 20:09
Processing code to draw a scatter plot of zip codes https://twitter.com/abhshkdz/status/528725432011882496
// From chapter 6, Visualizing Data: Exploring and Explaining Data with the Processing Environment by Ben Fry
// https://books.google.com/books?id=6jsVAiULQBgC
class Place
{
int code;
String name;
float x;
float y;
int partial[];
@abhshkdz
abhshkdz / plot_log.gnuplot
Last active September 8, 2015 22:25
Plotting caffe train/test log in the terminal using gnuplot
# Make sure train/test log files exist
# `./parse_log.sh result.log` creates result.log.train and result.log.test
# `gnuplot -e "train='result.log.train'" plot_log.gnuplot` plots loss function
# `gnuplot -e "test='result.log.test'" plot_log.gnuplot` plots accuracy
reset
if (!exists("xdim")) xdim = 100
if (!exists("ydim")) ydim = 30
set terminal dumb size xdim,ydim
set style data lines
@abhshkdz
abhshkdz / oneplue-two-invite-script.py
Last active September 8, 2015 22:41
OnePlus Two invite queue script
# Used to work before OnePlus added Captcha
import requests
import string
import random
import time
import json
import re
mailinator_api_token = ''
#Install PiAUISuite - https://github.com/StevenHickson/PiAUISuite
git clone git://github.com/StevenHickson/PiAUISuite.git
cd PiAUISuite/Install/
./InstallAUISuite.sh
#http://blog.oscarliang.net/raspberry-pi-voice-recognition-works-like-siri/
sudo apt-get install ffmpeg
#!/bin/bash
echo "Recording... Press Ctrl+C to Stop."
module.exports = function(grunt){
"use strict";
/* Load grunt modules */
require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks);
/* Configuration file */
var config = grunt.file.readJSON('config/config.json');
@abhshkdz
abhshkdz / slug.php
Created November 2, 2013 08:45
Generating a Url slug in PHP
<?php
function generateUrlSlug($string, $maxlen=0)
{
$string = trim(preg_replace('/[^a-z0-9]+/', '-', strtolower($string)), '-');
if ($maxlen && strlen($string) > $maxlen) {
$string = substr($string, 0, $maxlen);
$pos = strrpos($string, '-');
if ($pos > 0) {
$string = substr($string, 0, $pos);
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Cards">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Muzi Widget</title>
<link rel="stylesheet" href="css/style.css">
<link rel="author" href="humans.txt">
</head>