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 numpy as np | |
def ecdf(data): | |
n = len(data) | |
x = np.sort(data) | |
y = np.true_divide(np.arange(1, n+1), n) | |
return x, y |
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 sys | |
import subprocess | |
from optparse import OptionParser | |
import json | |
parser = OptionParser() | |
parser.add_option("-l", "--language", dest="language", help="The language file to download.") | |
parser.add_option("-t", "--api-token", dest="api_token", help="poeditor api token.") | |
parser.add_option("-i", "--project-id", dest="project_id", help="poeditor project id.") | |
(options, args) = parser.parse_args() |
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
require 'optparse' | |
require 'ostruct' | |
require 'pp' | |
# Default settings | |
options = OpenStruct.new :file => '', :from => nil, :to => nil, :include_referrer => false | |
OptionParser.new do |opts| | |
opts.banner = """ |
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
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
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
<script> | |
var YUI_config = { | |
skin : { | |
overrides : { | |
"widget" : [] | |
} | |
} | |
}; | |
</script> |
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
/* global YUI */ | |
/** | |
* My Module's purpose | |
* @module my-module | |
* @requires base-build, widget | |
*/ | |
YUI.add("my-module", function (Y) { | |
"use strict"; |
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
javascript:(function(){ | |
var images = document.getElementsByTagName("img"); | |
var id_regex = new RegExp(/^thumb-img\d+/i); | |
var image_source_regex = new RegExp(/(.+?)t(.\w{3})$/); | |
var image_sources = []; | |
for (var i = 0; i < images.length; i++) { | |
if (id_regex.test(images[i].id) && image_source_regex.test(images[i].src)) { | |
image_source = RegExp.$1 + RegExp.$2; | |
image_sources.push(image_source); | |
} |
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
// Fixing cascade resources | |
(function($){ | |
// Fixing cascade resources | |
$.fn.absolutizePath = function(prefix, base_path) { | |
this.each(function() { | |
// No need to rewrite src or links if already inside ccp | |
if (/\/ccp\//.test(window.location.href)) { | |
return; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Standalone Carousel</title> | |
</head> | |
<body> | |
<div id="carousel"></div> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script src="http://www.ius.edu/front/javascripts/carousel_cached.js"></script> | |
<link href="http://www.ius.edu/front/stylesheets/carousel_cached.css" rel="stylesheet" type="text/css" media="screen"/> |
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
# Installs on Snow Leopard. | |
# Homebrew | |
ruby -e "$(curl -fsS http://gist.github.com/raw/323731/install_homebrew.rb)" | |
echo 'export PATH=/usr/local/bin:/usr/local/sbin:$PATH' >> ~/.bash_profile | |
# Close Terminal window. | |
# Git | |
brew install git | |
brew update |
NewerOlder