Skip to content

Instantly share code, notes, and snippets.

View musically-ut's full-sized avatar
🐙
🐢 🎣 🐠

Utkarsh Upadhyay musically-ut

🐙
🐢 🎣 🐠
View GitHub Profile
@hezhao
hezhao / twitter_pin_auth.py
Created February 12, 2013 18:45
Twitter PIN-based authorization using tweepy
### See PIN-based authorization for details at
### https://dev.twitter.com/docs/auth/pin-based-authorization
import tweepy
consumer_key=<your_app_consumer_key>
consumer_secret=<your_app_consumer_secret>
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
@musically-ut
musically-ut / README.md
Last active December 15, 2015 14:59
The circle-text plugin.

A demo for the circle-text plugin, which can place text aligned along the bottom of circles.

@musically-ut
musically-ut / README.md
Last active July 7, 2016 18:56
Bubble treemap with better labels

This is an example of how one might place the intermediate labels on circle-packing graphs using the circle-text plugin.

Transitions on position and radius of the path are now possible. Click on the circles to see them in action.

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 30, 2024 08:12
A badass list of frontend development resources I collected over time.
@eendeego
eendeego / Gruntfile.js
Created July 5, 2013 16:57
How to delay responses on connect middleware, eg, to test timeouts, on a yeoman's generated gruntfile.
'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// ...
@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active April 30, 2024 19:21
5 entertaining things you can find with the GitHub Search API
@ajself
ajself / pySecureServer.py
Created August 15, 2013 21:30
Secure python SimpleHTTPServer
# http://www.piware.de/2011/01/creating-an-https-server-in-python/
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
import BaseHTTPServer, SimpleHTTPServer
import ssl
httpd = BaseHTTPServer.HTTPServer(('localhost', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler)
httpd.socket = ssl.wrap_socket (httpd.socket, certfile='path/to/localhost.pem', server_side=True)
httpd.serve_forever()
@rtlong
rtlong / get-keys-for-github-user.sh
Last active February 13, 2017 15:50
Put public keys for a github user in ~/.ssh/authorized keys with mucho ease
IFS="$(printf '\n\t')"
mkdir -p ~/.ssh
if ! [[ -f ~/.ssh/authorized_keys ]]; then
echo "Creating new ~/.ssh/authorized_keys"
touch ~/.ssh/authorized_keys
fi
user=$1
@dan-blanchard
dan-blanchard / .1.miniconda.md
Last active December 11, 2019 22:38
Quicker Travis builds that rely on numpy and scipy using Miniconda

For ETS's SKLL project, we found out the hard way that Travis-CI's support for numpy and scipy is pretty abysmal. There are pre-installed versions of numpy for some versions of Python, but those are seriously out of date, and scipy is not there are at all. The two most popular approaches for working around this are to (1) build everything from scratch, or (2) use apt-get to install more recent (but still out of date) versions of numpy and scipy. Both of these approaches lead to longer build times, and with the second approach, you still don't have the most recent versions of anything. To circumvent these issues, we've switched to using Miniconda (Anaconda's lightweight cousin) to install everything.

A template for installing a simple Python package that relies on numpy and scipy using Miniconda is provided below. Since it's a common s

@jiahao
jiahao / bicgstabell.jl
Last active October 12, 2017 19:51
A transcription of the BiCGSTAB(ell) algorithm (Sleijpen and Fokkema, 1993, http://igitur-archive.library.uu.nl/math/2006-1214-210728/sleijpen_93_bicgstab.pdf)
function bicgstabell(K::KrylovSubspace; tol::Real, l::Int=1)
k=-l
initrand!(K)
#XXX Choose r̃[0]
r[0]=b-nextvec(K)
u[-1]=0
x[0]=K.v0
ρ₀=1
α=0
ω=1