I hereby claim:
- I am moser on github.
- I am moser (https://keybase.io/moser) on keybase.
- I have a public key whose fingerprint is B068 15D6 ED68 61B2 285E FA44 561F E468 D14F EFDE
To claim this, I am signing this object:
""" | |
pip install parsimonious | |
""" | |
import dataclasses as _dc | |
from parsimonious.grammar import Grammar | |
from parsimonious.nodes import NodeVisitor | |
TEXT = """ | |
Here are some {variable}s. I don't care about spaces in the { interpolations}. |
""" | |
Reads GPS data from gpsfeed+ (https://sourceforge.net/projects/gpsfeed/), adds | |
some fake FLARM and OpenVario data and sends this on to XCSoar. | |
""" | |
import socket | |
import functools | |
import time | |
import datetime as dt |
I hereby claim:
To claim this, I am signing this object:
public void printCurrentStackTrace() { | |
StackTraceElement[] elements = Thread.currentThread().getStackTrace(); | |
for(int i= 2; i < elements.length; i++) { //2 to remove Thread#getStackTrace and this method | |
System.out.println(elements[i]); | |
} | |
} |
import Data.Maybe | |
import Data.List | |
import qualified Data.Set as Set | |
type Point = (Int, Int, Int) | |
type Shape = Set.Set Point | |
keys = [1..3] | |
allKeys = [(x, y, z) | x <- keys, y <- keys, z <- keys] |
# defined in my spec_helper | |
# requires mocha | |
# needed because | |
# mock() { expects(:foo).with(:bar, anything) } | |
# does not work. (fails with "Mocha::ExpectationError: unexpected invocation: #<Mock:0x1d8>.anything()") | |
# Usage: | |
# mock_block() do |m| | |
# m.expects(:foo).with(:bar, anything) | |
# end | |
def mock_block(&block) |
# Host is a simple two row model: id, name | |
# I think the check whether a host with the given | |
# name exists, should go right there. | |
# Still it accepts normal host objects. | |
# A big advantage over Host.find_or_create is, | |
# that I can use "host" as a normal text field in | |
# my forms and it's all done automatically. | |
class MyModel < ActiveRecord::Base | |
belongs_to :host |
Class Model < ActiveRecord::Base | |
def self.find(*args) | |
order = {:order => "name ASC"} | |
if args.length <= 1 | |
args << order | |
else | |
args[1] = order.merge(args[1]) | |
end | |
super |
while true; do inotifywait -e modify file1 my_test_file1 ... && MY_TEST_COMMAND; done |