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 ply.lex, argparse, io | |
#Usage | |
# python stripcomments.py input.tex > output.tex | |
# python stripcomments.py input.tex -e encoding > output.tex | |
#This utility is released under the WTFPL license: http://www.wtfpl.net/about/ | |
def strip_comments(source): | |
tokens = ( |
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
(function(){ | |
//Initialize counts of how many are already monitored, | |
//how many we're newly monitoring, how many we failed to monitor | |
var already = 0; | |
var succeeded = 0; | |
var failed = 0; | |
var interrupt = false; | |
$(document).keyup(function(e){if(e.keyCode==27){interrupt = true;}}); |
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
/* These are bookmarks for making various tasks on Quora easier. | |
* Since GitHub Markdown doesn't allow JavaScript links, you'll have to install the complicated way. | |
* Each of the lines beginning with `javascript:` below is a bookmarklet. | |
* To install, create a new bookmark in your browser and paste that line as the URL. | |
* Leave feedback in Gist comments or contact https://www.quora.com/Adam-Merberg | |
*/ | |
//Get the rank of the answer belonging to the logged-in user (in a JS alert box). | |
//You will have to scroll down far enough that your answer has loaded before you use it. | |
//Perhaps a future version will do that automatically. |
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
library(matrixStats) | |
library(ggplot2) | |
library(animation) | |
#set seed for replicability | |
set.seed(1) | |
#generate 10^3 deviations, 10^6 replicates | |
w = replicate(10^6, rweibull(10^3, 0.9, 1)) | |
#recall Weibull is subexponential when shape parameter is < 1. |