Skip to content

Instantly share code, notes, and snippets.

View taoeffect's full-sized avatar

Greg Slepak taoeffect

View GitHub Profile
@eschulte
eschulte / neural-net.clj
Created November 10, 2010 22:13
Neural Network DSL
(ns neural-net.core) ; Copyright Eric Schulte, GPL V3
(defprotocol Neural
"Protocol implemented by any element of a neural network."
(run [this x] "Evaluates the net")
(train [this x y d] "Trains the net returning the updated net and deltas")
(collect [this key] "Collect key from the network")
(inputs [this] "Number of inputs")
(outputs [this] "Number of outputs")
(check [this] "Ensure that the number of inputs matches the outputs"))
#---------------------------------------------------------------------
# General user
#---------------------------------------------------------------------
myid=`id -u`
myd=`date "+%Y-%m-%d-%H-%M"`
#-------------------------
# Defaults write
#-------------------------
@marcelofernandez
marcelofernandez / ieee-trigraph.csl
Created August 5, 2012 13:37 — forked from fbennett/ieee-trigraph.csl
IEEE CSL Style, with trigraph and uppercase citation label
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only">
<info>
<title>IEEE trigraph</title>
<id>http://www.zotero.org/styles/ieee-trigraph</id>
<link href="http://www.zotero.org/styles/ieee-trigraph" rel="self"/>
<author>
<name>Michael Berkowitz</name>
<email>mberkowi@gmu.edu</email>
</author>
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

lol1: &lol1
"lol"
lol2: &lol2
[*lol1,*lol1,*lol1,*lol1,*lol1,*lol1,*lol1,*lol1,*lol1,*lol1]
lol3: &lol3
[*lol2,*lol2,*lol2,*lol2,*lol2,*lol2,*lol2,*lol2,*lol2,*lol2]
lol4: &lol4
[*lol3,*lol3,*lol3,*lol3,*lol3,*lol3,*lol3,*lol3,*lol3,*lol3]
lol5: &lol5
[*lol4,*lol4,*lol4,*lol4,*lol4,*lol4,*lol4,*lol4,*lol4,*lol4]
@Chouser
Chouser / externs_for_cljs.clj
Created June 17, 2013 13:44
Generate an externs.js file for arbitrary JS libraries for use in advanced Google Closure compilation, based on the ClojureScript code that uses the libraries.
(ns n01se.externs-for-cljs
(:require [clojure.java.io :as io]
[cljs.compiler :as comp]
[cljs.analyzer :as ana]))
(defn read-file [file]
(let [eof (Object.)]
(with-open [stream (clojure.lang.LineNumberingPushbackReader. (io/reader file))]
(vec (take-while #(not= % eof)
(repeatedly #(read stream false eof)))))))
@tinabeans
tinabeans / template.html
Last active February 13, 2024 09:18
A super-barebones single-column responsive email template, assuming a max-width of 540px. Read about it on the Fog Creek blog.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {
@Rich-Harris
Rich-Harris / grunt.md
Last active May 6, 2016 03:35
The one-size-fits-all key to Grunt.js happiness

This page: http://bit.ly/grunt-happy

One of the complaints people sometimes have about Grunt.js is that the configuration files can grow unwieldy when you have more than a couple of tasks. And you have to explicitly load each of those tasks.

Except that you don't. Here is the one-size-fits-all key to Grunt.js happiness.

1. Set up your project folder

@iAladdin
iAladdin / wwdc-2014-extractor
Last active April 26, 2019 01:27
WWDC 2014 Sessions Video URL Extractor
//please execute this script on https://developer.apple.com/videos/wwdc/2014/
//inspect this page and run it on console
jQuery(".download a:contains('HD')").each(function(n){ console.log(jQuery(this).attr("href"))})
jQuery(".download a:contains('SD')").each(function(n){ console.log(jQuery(this).attr("href"))})
jQuery(".download a:contains('PDF')").each(function(n){ console.log(jQuery(this).attr("href"))})

A pseudonymous trust system for a decentralized anonymous marketplace

Dionysis Zindros, National Technical University of Athens dionyziz@gmail.com

Keywords

pseudonymous anonymous web-of-trust identity trust bitcoin namecoin proof-of-burn timelock decentralized anonymous marketplace openbazaar

Abstract