Skip to content

Instantly share code, notes, and snippets.

View sksq96's full-sized avatar

Shubham Chandel sksq96

View GitHub Profile
@sksq96
sksq96 / unfollow.js
Created June 4, 2020 07:27 — forked from JamieMason/unfollow.js.md
Unfollow everyone on twitter.com
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//
// 1. Go to https://twitter.com/YOUR_USER_NAME/following
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
//
// Last Updated: 09 April 2020
(() => {
const $followButtons = '[data-testid$="-unfollow"]';
@sksq96
sksq96 / AdamW.py
Created July 4, 2018 12:54 — forked from thomwolf/AdamW.py
Implements Adam algorithm with weight decay fix in PyTorch (paper: https://arxiv.org/abs/1711.05101)
from torch.optim import Optimizer
class AdamW(Optimizer):
"""
Implements Adam algorithm with weight decay fix in PyTorch
Paper: Fixing Weight Decay Regularization in Adam by Ilya Loshchilov, Frank Hutter
https://arxiv.org/abs/1711.05101
"""
def __init__(self, params, lr, b1=0.9, b2=0.999, e=1e-8, l2=0,
vector_l2=False, max_grad_norm=-1, **kwargs):
@sksq96
sksq96 / wordvec_example.py
Created January 13, 2018 00:25 — forked from tylerneylon/wordvec_example.py
Quick reference on how to work with pre-trained word2vec vectors in Python.
# wordvec_example.py
#
# This file shows one way to work with word2vec data in Python.
#
# Setup:
#
# 1. Install gensim:
#
# pip install gensim
#
@sksq96
sksq96 / wordvec_example.py
Created January 13, 2018 00:25 — forked from tylerneylon/wordvec_example.py
Quick reference on how to work with pre-trained word2vec vectors in Python.
# wordvec_example.py
#
# This file shows one way to work with word2vec data in Python.
#
# Setup:
#
# 1. Install gensim:
#
# pip install gensim
#
@sksq96
sksq96 / google_twunter_lol
Created January 11, 2018 11:51 — forked from ryanlewis/google_twunter_lol
Naughty word list, compiled by Google and @jamiew
4r5e
5h1t
5hit
a55
anal
anus
ar5e
arrse
arse
ass
@sksq96
sksq96 / a2dp.py
Created April 27, 2017 20:31 — forked from pylover/a2dp.py
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3.5
"""
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .

How to install dlib HEAD (w/ python bindings) from github

These instructions assume you are on macOS, but basically the same on Linux.

Pre-reqs:

  • Have Python 3 installed. On macOS, this could be installed from homebrew or even via standard Python 3.6 downloaded installer from https://www.python.org/download. On Linux, just use your package manager.
  • On macOS, install XCode from the Mac App Store (or install the XCode command line utils).
  • On Linux, install boost (sudo apt-get install libboost-all-dev)
@sksq96
sksq96 / gist:a1b1c6331e2e60ea773ae725866668ac
Created March 16, 2017 05:54 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@sksq96
sksq96 / tmux-cheatsheet.markdown
Created March 7, 2017 22:29 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@sksq96
sksq96 / preproc.py
Created January 22, 2017 20:23 — forked from kastnerkyle/preproc.py
General preprocessing transforms in scikit-learn compatible format
# (C) Kyle Kastner, June 2014
# License: BSD 3 clause
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.utils import gen_batches
from scipy.linalg import eigh
from scipy.linalg import svd
import numpy as np
# From sklearn master