Put this at the top of your executable Rscript file:
options(error = quote({
dump.frames(to.file=T, dumpto='last.dump')
load('last.dump.rda')
print(last.dump)
q()
liberator.plugins.delicious = (function(){ | |
function getBookmarkFile(){ | |
let file = services.get("directory").get("ProfD",Ci.nsIFile) | |
file.append("ybookmarks.sqlite"); | |
if (!file.exists() || !file.isReadable()){ | |
return null; | |
} | |
manager.file = file; | |
return file; |
#!/bin/sh -e | |
# | |
# Usage: browser | |
# pipe html to a browser | |
# e.g. | |
# $ echo '<h1>hi mom!</h1>' | browser | |
# $ ron -5 man/rip.5.ron | browser | |
if [ -t 0 ]; then | |
if [ -n "$1" ]; then |
# assume the following directory structure where contents of doc/ | |
# and source/ are already checked into repo., with the exception | |
# of the _build directory (i,e. you can check in _themes or _sources | |
# or whatever else). | |
# | |
# proj/ | |
# source/ | |
# doc/ | |
# remove doc/_build/html if present |
for app in $(heroku apps); do heroku apps:destroy --app $app --confirm $app; done |
function mycd() | |
{ | |
#if this directory is writable then write to directory-based history file | |
#otherwise write history in the usual home-based history file | |
tmpDir=$PWD | |
echo "#"`date '+%s'` >> $HISTFILE | |
echo $USER' has exited '$PWD' for '$@ >> $HISTFILE | |
builtin cd "$@" # do actual cd | |
if [ -w $PWD ]; then export HISTFILE="$PWD/.dir_bash_history"; touch $HISTFILE; chmod --silent 777 $HISTFILE; | |
else export HISTFILE="$HOME/.bash_history"; |
license: gpl-3.0 | |
redirect: https://observablehq.com/@d3/selection-join |
# good discussion here: http://stackoverflow.com/questions/4308168/sigmoidal-regression-with-scipy-numpy-python-etc | |
# curve_fit() example from here: http://permalink.gmane.org/gmane.comp.python.scientific.user/26238 | |
# other sigmoid functions here: http://en.wikipedia.org/wiki/Sigmoid_function | |
import numpy as np | |
import pylab | |
from scipy.optimize import curve_fit | |
def sigmoid(x, x0, k): | |
y = 1 / (1 + np.exp(-k*(x-x0))) |
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
MIT License | |
Copyright (c) 2014 Piotr Kuczynski | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWAR |