I hereby claim:
- I am trdarr on github.
- I am trdarr (https://keybase.io/trdarr) on keybase.
- I have a public key whose fingerprint is 01A3 54BE E59D 3990 D144 DA65 D33C 80CB C321 CE26
To claim this, I am signing this object:
- This page is a collection of some of the Advanced queries from the [[Datalog]] channel on the [[Logseq/Discord]] server. #datalog | |
id:: 61db13f4-75e8-4f87-ad60-3ac3479c5fc8 | |
- ### Resources | |
- [link: The first message on the datalog channel](https://discord.com/channels/725182569297215569/743139225746145311/743139795865174119) | |
- [link: Logseq docs - Advanced queries](https://docs.logseq.com/#/page/advanced%20queries) | |
- [link: Logseq datascript schema](https://gist.github.com/tiensonqin/9a40575827f8f63eec54432443ecb929) | |
- [link: Logseq frontend db model](https://github.com/logseq/logseq/blob/master/src/main/frontend/db/model.cljs) | |
- [link: How to Graph Your Data - talk by Paula Gearon](https://youtu.be/tbVwmFBnfo4) | |
- [link: Domain modelling with datalog - talk by Norbert Wojtowicz](https://youtu.be/oo-7mN9WXTw) | |
- [link: Athens Research ClojureFam](https://github.com/athensresearch/ClojureFam) |
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"path/filepath" | |
"strings" | |
) |
/* | |
* Play notes like it's a piano (see below). | |
* Switch instruments with [1] to [8]. | |
* | |
* [s] [d] [g] [h] [j] [l] [;] | |
* [z] [x] [c] [v] [b] [n] [m] [,] [.] [/] | |
*/ | |
const noteMap = | |
'zsxdcvgbhnjm,l.;/'.split('') |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
import flask | |
import operator | |
import random | |
import re | |
import requests | |
def get_terms(json, n=3): | |
'''Get a list of n acceptable random terms from the JSON array.''' |
By Thomas Darr (@trdarr), with love.
“How has no one yet written a tutorial for deploying Hubot on @digitalocean? cc @beyroutey”
— Miles Grimshaw (@milesgrimshaw), 10 Dec 2013
#!/usr/bin/env sh | |
# vim: set ft=sh | |
mkdir -p ios | |
mkdir -p res/drawable-{mdpi,hdpi,xhdpi,xxhdpi,xxxhdpi} | |
scale () { | |
infile=$1 | |
outfile=${infile%.svg} |
# If you haven't already, clone the new repo and `cd` into its directory. | |
git clone [email protected]:username/new-repo.git | |
cd new-repo | |
# Add the old repo as a remote and fetch from it. | |
# If you're trying to do this from an unpushed branch, | |
# git remote add old-repo ~/dev/old-repo.git | |
git remote add old-repo [email protected]:username/old-repo.git | |
git fetch old-repo |
#!/usr/bin/env python | |
# This prints a useless representation of a _sre.SRE_Pattern object. | |
import re | |
uuid_pattern = r'[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{8}' | |
print re.compile(uuid_pattern, re.I) | |
# _sre.SRE_Pattern has pattern and __repr__ methods. | |
if not hasattr(re, '_pattern_type'): | |
re._pattern_type = type(re.compile('')) |
/* "Thunks, Trampolines, and Continuation Passing" | |
* Python implementation from http://jtauber.com/blog/2008/03/30/ | |
* JavaScript implementation by Thomas Darr <[email protected]>. | |
*/ | |
// thunk = lambda name: lambda *args: lambda: name(*args) | |
var thunk = function thunk(fn) { | |
return function _thunk() { | |
var splat = Array.prototype.slice.apply(arguments); | |
return function __thunk() { return fn.apply(this, splat); }; |