Skip to content

Instantly share code, notes, and snippets.

View zmaril's full-sized avatar
🌹
Crawling the web

Zack Maril zmaril

🌹
Crawling the web
View GitHub Profile
@zmaril
zmaril / gist:6039575
Created July 19, 2013 14:39
Clojure games
;; Card 0
(ns the.game)
(def reflect 'clojure.reflect/reflect)
(remove-ns 'clojure.asm)
(remove-ns 'clojure.lang)
(remove-ns 'clojure.main)
(remove-ns 'clojure.pprint)
(remove-ns 'clojure.reflect)
(remove-ns 'clojure.repl)
(remove-ns 'clojure.set)
@zmaril
zmaril / gist:5800074
Created June 17, 2013 20:29
Newer errors
[pleb@ks4001507 riemann-crate]$ ./up.sh
Performing task 'pallet' with profile(s): 'default,base,system,user,provided,dev,vmfest'
Copy doc-src/USAGE.md to target/classes/pallet_crate/riemann_crate/USAGE.md
16:27:03.191 [main] INFO pallet.compute.vmfest - Connecting to VirtualBox via XPCom
16:27:04.735 [main] INFO pallet.compute.vmfest.service - No :default-bridged-interface defined. Will chose from these options: eth0
16:27:06.477 [operate-13] INFO pallet.ssh.execute - 192.168.56.103 os: infer-os:
16:27:06.477 [operate-9] INFO pallet.ssh.execute - 192.168.56.104 os: infer-os:
16:27:06.479 [operate-14] INFO pallet.ssh.execute - 192.168.56.105 os: infer-os:
16:27:06.598 [operate-14] WARN clj-ssh.ssh - Permanently added '192.168.56.105' (RSA) to the list of known hosts.
16:27:06.855 [operate-13] WARN clj-ssh.ssh - Permanently added '192.168.56.103' (RSA) to the list of known hosts.
@zmaril
zmaril / gist:5799087
Last active December 18, 2015 14:39
New errors
lein with-profile +vmfest pallet up --selectors ubuntu-12-04 --phases install,configure,test
Performing task 'pallet' with profile(s): 'default,base,system,user,provided,dev,vmfest'
Copy doc-src/USAGE.md to target/classes/pallet_crate/riemann_crate/USAGE.md
14:35:18.114 [main] INFO pallet.compute.vmfest - Connecting to VirtualBox via XPCom
14:35:19.659 [main] INFO pallet.compute.vmfest.service - No :default-bridged-interface defined. Will chose from these options: eth0
14:35:21.336 [operate-10] INFO pallet.ssh.execute - 192.168.56.117 os: infer-os:
14:35:21.337 [operate-11] INFO pallet.ssh.execute - 192.168.56.118 os: infer-os:
14:35:21.337 [operate-12] INFO pallet.ssh.execute - 192.168.56.114 os: infer-os:
14:35:22.136 [operate-11] INFO pallet.ssh.execute - 192.168.56.118 os: infer-distro:
14:35:22.432 [operate-12] INFO pallet.ssh.execute - 192.168.56.114 os: infer-distro:
@zmaril
zmaril / gist:5798014
Created June 17, 2013 15:57
Riemann-crate errors
lein with-profile +vmfest pallet up --selectors ubuntu-12-04 --phases install,configure,test
Performing task 'pallet' with profile(s): 'default,base,system,user,provided,dev,vmfest'
Retrieving com/palletops/pallet-vmfest/0.3.0-alpha.4/pallet-vmfest-0.3.0-alpha.4.pom from clojars
Retrieving vmfest/vmfest/0.3.0-alpha.4/vmfest-0.3.0-alpha.4.pom from clojars
Retrieving com/palletops/pallet-vmfest/0.3.0-alpha.4/pallet-vmfest-0.3.0-alpha.4.jar from clojars
Retrieving vmfest/vmfest/0.3.0-alpha.4/vmfest-0.3.0-alpha.4.jar from clojars
Copy doc-src/USAGE.md to target/classes/pallet_crate/riemann_crate/USAGE.md
11:55:30.726 [main] INFO pallet.compute.vmfest - Connecting to VirtualBox via XPCom
11:55:32.264 [main] INFO pallet.compute.vmfest.service - No :default-bridged-interface defined. Will chose from these options: eth0
Exception in thread "main" java.lang.IllegalAccessError: service-phases does not exist
@zmaril
zmaril / core.clj
Last active December 16, 2015 14:19
Simple rejection sampling based probabilistic programming library. An approximation of church.
(ns hacklheber.core)
(defn flip
"A function which returns true or false randomly. Can optionally be
supplied a number for a bias."
([] (> 0.5 (rand)))
([p] (> p (rand))))
(defn- memo-bangs
"If a variable is bound with a bang, then it will be memoized."
@zmaril
zmaril / gist:5442736
Created April 23, 2013 11:11
lein all test output
λ ~/Projects/aurelius-stack/titanium > lein all test
Performing task 'test' with profile(s): 'dev,1.4'
lein test clojurewerkz.titanium.conf
lein test clojurewerkz.titanium.edges-test
MemoryMeter uninitialized (jamm not specified as java agent); KeyCache size in JVM Heap will not be calculated accurately. Usually this means cassandra-env.sh disabled jamm because you are using a buggy JRE; upgrade to the Sun JRE instead
No host ID found, created 2b453f84-8f4b-4747-acb7-01ff06293fc1 (Note: This should happen exactly once per node).
Generated random token [-8554636454003544914]. Random tokens will result in an unbalanced ring; see http://wiki.apache.org/cassandra/Operations
@zmaril
zmaril / softwarehelpskill.md
Last active August 3, 2021 04:52
I want to write software that helps kill people.

I want to write software that helps kill people.

Please, before you call the police and get my github account put on lockdown, allow me a moment to explain. What I really want to do is work on projects that advance the human condition and improve people's lives. I've been in a mad dash to learn how to program for the past four or five years exactly because I realized how much good I could do for the world with a computer.

q = 'q = %r\r\ni = %r\n\nimport sys\nif (i%%3 == 0):\n\tsys.stdout.write("\\\"Fizz\\\""),\n\nif (i%%5 == 0):\n\tsys.stdout.write("\\\"Buzz\\\""),\n\n\
if (i%%3 != 0) and (i%%5 != 0):\n\tsys.stdout.write(str(i)),\n\n\nprint\n\nc = (q, ((i+1) %% 100))\nprint (q %% c)'
i = 1
import sys
if (i%3 == 0):
sys.stdout.write("\"Fizz\""),
if (i%5 == 0):
sys.stdout.write("\"Buzz\""),
@zmaril
zmaril / approx.py
Created March 9, 2013 17:10
Approximation function for cosine
def cos(x):
i = 0
coefficents = [1,2,3,4,5]
y = 0;
while(i < coefficents.length){
y = y + (coefficents[i]*x^i)/factorial(i)
}
return y
@zmaril
zmaril / gist:5082102
Created March 4, 2013 13:05
Frame exception
gremlin> g = FaunusFactory.open("bin/titan-cassandra-input.properties")
==>faunusgraph[titancassandrainputformat->graphsonoutputformat]
gremlin> g.E.count()
13/03/04 12:58:29 INFO mapreduce.FaunusCompiler: Compiled to 1 MapReduce job(s)
13/03/04 12:58:29 INFO mapreduce.FaunusCompiler: Executing job 1 out of 1: MapSequence[com.thinkaurelius.faunus.mapreduce.transform.EdgesMap.Map, com.thinkaurelius.faunus.mapreduce.util.CountMapReduce.Map, com.thinkaurelius.faunus.mapreduce.util.CountMapReduce.Reduce]
13/03/04 12:58:29 INFO mapreduce.FaunusCompiler: Job data location: output/job-0
13/03/04 12:58:29 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
13/03/04 12:58:29 INFO impl.ConnectionPoolMBeanManager: Registering mbean: com.netflix.MonitoredResources:type=ASTYANAX,name=TitanConnectionPool,ServiceType=connectionpool
13/03/04 12:58:29 INFO mapred.JobClient: Running job: job_local_0002
13/03/04 12:58:29 INFO mapred.Task: Using