See https://github.com/romainl/idiomatic-vimrc for an up-to-date version.
set.seed(1) | |
matches <- replicate(1000000, sample(20, sample(20), TRUE)) | |
fun1 <- function() unlist(lapply(matches, sum)) | |
fun2 <- function() sapply(matches, sum) | |
fun3 <- function() vapply(matches, sum, numeric(1L)) | |
fun4 <- function() rapply(matches, sum) | |
library(microbenchmark) | |
microbenchmark(L = fun1(), S = fun2(), V = fun3(), R = fun4(), times = 10) | |
# Unit: seconds | |
# expr min lq mean median uq max neval |
;;; repl.sh | |
#!/bin/bash | |
if [[ "$#" -ne 1 ]]; then | |
echo "Usage: repl.sh 'script to be run'" | |
exit 1 | |
fi | |
screen -AdmS 'main' "$1" |
module FizzBuzzC | |
%default total | |
-- Dependently typed FizzBuzz, constructively | |
-- A number is fizzy if it is evenly divisible by 3 | |
data Fizzy : Nat -> Type where | |
ZeroFizzy : Fizzy 0 | |
Fizz : Fizzy n -> Fizzy (3 + n) |
Jenny Bryan
18 July, 2014
A group of us at UBC are working through Wickham's Advanced R Programming book together. We just tackled the chapter on Functions, which reminded me of this ...
In the subsection on "Default and missing arguments", we have: "Since arguments in R are evaluated lazily (more on that below), the default value can be defined in terms of other arguments:"
-
Download a Kindle-compatible version of the dictionary here. Unzip the .rar archive.
-
Get the "Send to Kindle" program on your computer. Here's the link for the Mac.
-
Right-click your recently downloaded (unzipped) dictionary file, and click the "Send to Kindle" menu item. It will arrive on your Kindle shortly.
-
Once the dictionary has arrived, go to your settings -- on my newish paperwhite, it's at Home > Settings > Device Options > Language and Dictionaries > Dictionaries > English. Choose the Webster's 1913.
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
/******************************************************************************* | |
* | |
* A minimal Forth compiler in C | |
* By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com | |
* Release 2014-04-04 | |
* | |
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial | |
* | |
* PUBLIC DOMAIN | |
* |
assets | |
business | |
accounts receivable | |
bank | |
personal | |
accounts receivable | |
bank | |
cash | |
gifts | |
online |
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import subprocess | |
__all__ = ["transform"] | |
__version__ = '0.3' | |
__author__ = 'Christoph Burgmer <[email protected]>' | |
__url__ = 'http://github.com/cburgmer/upsidedown' |