I hereby claim:
- I am goldsborough on github.
- I am goldsborough (https://keybase.io/goldsborough) on keybase.
- I have a public key whose fingerprint is 59DC FC71 710B 6695 B3D5 F5E9 5157 ADCF 0557 F2E4
To claim this, I am signing this object:
template<typename T> | |
class Zip | |
{ | |
public: | |
typedef std::vector<T> container_t; | |
template<typename... Args> | |
Zip(const T& head, const Args&... args) |
#include "pcr.hpp" | |
#include <iostream> | |
int main(int argc, char * argv []) | |
{ | |
DNA dna({DNA::Base::A, DNA::Base::C, DNA::Base::G, DNA::Base::T, DNA::Base::C, DNA::Base::T}); | |
DNA::container_t ret = pcr(dna, 1, 3, 10); | |
class range | |
{ | |
public: | |
typedef std::vector<long>::iterator iterator; | |
typedef std::vector<long>::const_iterator const_iterator; | |
range(long end) |
namespace Weight | |
{ | |
/* | |
// A Unit of weight is defined by a type T to represent the | |
// weight, e.g. std::size_t or double (latter required for | |
// proper conversion between units), as well as a ratio for | |
// conversion between the Unit and our base unit: grams. | |
// The ratio defaults to a ratio of 1/1 for grams. | |
*/ | |
template<typename T, typename R = std::ratio<1>> |
#include <map> | |
#include <stack> | |
#include <string> | |
#include <iostream> | |
#include <functional> | |
double calculate(const std::string& equation) | |
{ | |
static std::string chars("+-*/"); | |
import re | |
from collections import namedtuple | |
def split_equation(equation): | |
match = re.match(r'^\s*\w+\((\w+)\)\s*=\s*(.*)$', equation) | |
return match.groups() | |
def find_terms(equation, var='x'): |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Dutch national flag. | |
Given an array of N buckets, each containing a Color.Red, Color.White, or | |
Color.Blue pebble, sort them by color. The allowed operations are: | |
swap(i,j): swap the pebble in bucket i with the pebble in bucket j. |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import math | |
import random | |
from collections import namedtuple | |
def is_prime(n): | |
"""Primality test""" |
template<typename Key, typename Value> | |
class Tree | |
{ | |
public: | |
struct Pair | |
{ | |
Pair(const Key& k = Key(), const Value& v = Value()) | |
: key(k) | |
, value(v) |
I hereby claim:
To claim this, I am signing this object: