I hereby claim:
- I am erynofwales on github.
- I am erynofwales (https://keybase.io/erynofwales) on keybase.
- I have a public key whose fingerprint is 7BDF 859E 4100 1C15 1A9F 0B11 FF6C 66F5 E56D 0154
To claim this, I am signing this object:
# Description: | |
# Countdown timer. Starts at the specified number and counts down to 0. | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: |
import Foundation | |
public protocol AlmostEquatable { | |
@warn_unused_result | |
func ==~(lhs: Self, rhs: Self) -> Bool | |
} | |
public protocol EquatableWithinEpsilon: Strideable { | |
static var Epsilon: Self.Stride { get } | |
} |
// | |
// Matrices.swift | |
// Game | |
// | |
// Created by Eryn Wells on 2015-10-24. | |
// Copyright © 2015 Eryn Wells. All rights reserved. | |
// | |
/** A square matrix. */ | |
public protocol Matrix { |
protocol Matrix { | |
typealias ElementType | |
static func dimensions() -> (rows: Int, cols: Int) | |
static func size() -> Int | |
init() | |
subscript(row: Int, col: Int) -> ElementType { get set } | |
} |
#include <cstdio> | |
template<unsigned int N, unsigned int M> | |
struct Matrix | |
{ | |
static const unsigned int sRows = N; | |
static const unsigned int sCols = M; | |
template <unsigned int P> | |
Matrix<N, P> |
I hereby claim:
To claim this, I am signing this object:
In [3]: number.Complex('3') | |
> /Users/eryn/Code/sibilant/sibilant/number.py(51)__init__() | |
-> exact = exact is not None | |
(Pdb) c | |
Out[3]: (3+0j) | |
In [4]: number.Complex('3#') | |
--------------------------------------------------------------------------- | |
ValueError Traceback (most recent call last) | |
<ipython-input-4-4dce8b9d03a9> in <module>() |
find -E /System/Library/Frameworks/{Foundation,Cocoa,QuartzCore}.framework \ | |
-iregex '.*/(ns|ca).+\.h$' \ | |
-exec awk '/@interface.+:/ { | |
cls = $2; | |
if (cls ~ /:$/) { | |
cls = substr(cls, 1, length(cls)-1) | |
} | |
print cls; | |
}' {} \; |
from io import StringIO | |
from xml.etree.ElementTree import ElementTree, Element, parse, ParseError | |
class XMLDict(dict): | |
'''A dictionary-like object to represent XML data.''' | |
def __init__(self, xml=None): | |
'''Expects a string containing XML data.''' | |
try: | |
self.populate(parse(StringIO(unicode(xml))).getroot()) |
loghandler = logging.StreamHandler(sys.stdout) | |
loghandler.setFormatter(logging.Formatter( | |
fmt='%(asctime)s:%(name)s:%(levelname)s: %(message)s', | |
datefmt='%Y-%m-%d %H:%M:%S')) | |
rootlog = logging.getLogger() | |
rootlog.addHandler(loghandler) | |
rootlog.setLevel(logging.DEBUG) |