(setq org-confirm-babel-evaluate nil)
(setq org-babel-sh-command "ssh default ")
;; customize the following variables:
;;(setq org-babel-load-languages
;;<<< '((emacs-lisp . t) (python . t) (clojure . t) (sh . t ) (perl . t)))
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main1 where | |
data HashSet a = native java.util.HashSet where | |
native new :: () -> STMutable s (HashSet a) | |
native size :: Mutable s (HashSet a) -> ST s Int | |
native add :: Mutable s (HashSet a) -> a -> ST s Bool | |
native remove :: Mutable s (HashSet a) -> a -> ST s Bool | |
main :: IO () | |
main = do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns foo.core | |
(:api dunaj) | |
(:require [dunaj.host.int :refer [i== iDOT]] | |
[dunaj.host.array :as dha] | |
[dunaj.format.base64 :refer [base64-safe]] | |
[dunaj.coll.recipe :refer [concat*]] | |
[dunaj.concurrent.port :refer [reduce! onto-chan!]])) | |
(def+ ByteColl [java.lang.Byte]) ;; type signature |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns todo-server.core | |
(:require | |
[cljs.nodejs :as nodejs] | |
[figwheel.client :as fw])) | |
(nodejs/enable-util-print!) | |
(defonce express (nodejs/require "express")) | |
(defonce serve-static (nodejs/require "serve-static")) | |
(defonce http (nodejs/require "http")) |
Say that one day we decide to write a new templating library for generating HTML.
In this new library, you are passed an array where the first element is the name of an HTML tag, the second element is optionally a hash containing the element's HTML attributes, and the rest of the elements are the HTML elements that are children of it.
For example:
html = [:html,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;### Tested with clojure "1.6.0" and core.async "0.1.346.0-17112a-alpha" ### | |
(use 'clojure.core.async) | |
;### Lib functions ### | |
(defn take-until | |
"Creates a channel that replicates values from the in channel until the | |
control channel either emits a value or closes." | |
[control in] | |
(let [out (chan)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "project", | |
"version": "0.0.0", | |
"authors": [ | |
"Eric Barnes <me@example.org>" | |
], | |
"license": "MIT", | |
"private": true, | |
"ignore": [ | |
"**/.*", |
The purpose of this program is to solve the following problem posed by Jon Bentley:
Given a text file and an integer k, print the k most common words in the file (and the number of their occurrences) in decreasing frequency.