Skip to content

Instantly share code, notes, and snippets.

View hollingberry's full-sized avatar

Casper Hollingberry hollingberry

View GitHub Profile
@hollingberry
hollingberry / PrimeProductProblem.hs
Last active August 29, 2015 14:04
How many integers from 1 to 10000 can be written as the product of two (not necessarily distinct) primes?
import Data.List
import Data.Numbers.Primes
maxValue :: Int
maxValue = 10^5
uniqOrdered :: [Int] -> [Int]
uniqOrdered = map head . group . sort
possiblePrimes :: [Int]
package main
import (
"encoding/xml"
"fmt"
"io"
"strings"
)
type Student struct {
package main
import (
"fmt"
)
type Banana struct {
msg string
}
@hollingberry
hollingberry / .vimrc
Created August 13, 2015 00:40
Don't deselect when indenting in vim
vnoremap > ><CR>gvll
vnoremap < <<CR>gvhh
#!/bin/sh
for line in `cat /dev/stdin | head -n -18 | tail -n +3`
do
# Create URL
url=http://users.humboldt.edu/$line/
# Get HTTP status
status=`curl -sIL $url | head -1 | awk '{print $2}'`
\header {
title = "The Old Creamery Building"
tagline = ""
}
upper = \relative c' {
\clef treble
\key c \minor
\time 2/4
\tempo 4 = 96-112
#!/bin/sh
# field - print numbered fields
if test [ -z stripnumeric $0 ]
then
delim=$0
shift
else
delim=[ \t]+
fi
function capitalize(s) {
if (s == "id") {
return "ID"
} else {
return toupper(substr(s, 1, 1)) substr(s, 2, length(s) - 1)
}
}
function ruby2go(s) {
if (s == "String") { return "string" }
#!/bin/sh
# shakespeare - print a list of Shakespeare's plays sorted by word count
curl -s http://shakespeare.mit.edu/index.html |
grep "<a" |
grep -v em |
egrep -o 'href="[a-z_]+' |
sed 's/href="//' |
while read play
do
Animal Systems Unit Objectives
Chapter 40: Animal Form and Function
1. Animal exchange of nutrients and gases occurs as substances dissolved in an
aqueous medium move across the plasma membrane of each cell. Rate of exchange
is proportional to surface area; the amount of material that must be
exchanged is proportional to volume. For this reason, animals try to maximize
the surface area to volume ratio of their exchange surfaces. Once absorbed,
circulatory fluids can carry the materials around the body.