graph TD
A[Satellite Data Source] -->|Raw Data| B[Storage Bucket]
B -->|SNS Messages| C[Queue]
C -->|Trigger| D[Lambda Function]
D -->|Process and Manipulate| E[Final Storage Bucket]
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
// Paste this into the inspector in Atom. | |
var element = document.createElement('div') | |
var canvas = document.createElement("canvas") | |
element.appendChild(canvas) | |
element.style.setProperty("width", "100%") | |
element.style.setProperty("height", "150px") | |
canvas.style.setProperty("width", "100%") | |
canvas.style.setProperty("height", "100%") | |
canvas.style.setProperty("background-color", "white") |
This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.
The Atom documentation is excellent. It's highly worth reading the flight manual.
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
# Note (clue): Exact queue size triggering the problem will depend on your available RAM | |
# Clean, compile, run C program: | |
rm a.out; cc -O3 -Wpedantic gc.c; time ./a.out 100000 | |
# Clean, compile, run Java program: | |
rm *.class; javac GC.java; time java GC 100000 | |
# Clean, compile, run Java program with verbose GC: | |
rm *.class; javac GC.java; time java -verbose:gc -XX:+PrintGCDetails GC 100000 |
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
;; Transparent Functions | |
;; I was experimenting with transducers and wanted a way to understand how they worked. Transducer | |
;; code uses many nested functions in various locations with other nested functions defined as local | |
;; variables in scope. Typically after an anonymous Clojure function is defined you have no visibility | |
;; into the locals that were in scope when the function was defined, where the function came from, | |
;; or the code in the function. I defined a macro, tfn, that creates a transparent function. It's | |
;; a normal Clojure function with additional metadata including the function code and local | |
;; variable names and values. |
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
require 'uri' | |
# There's a bug in jboss or torquebox where encoded backslashes in URLs are incorrectly converted into forward slashes. | |
# This is rack middleware that detects when the original request included a backslash and will correct the env variable | |
# before forwarding it to the other middleware | |
# See https://issues.jboss.org/browse/TORQUE-955 | |
class TorqueboxBackslashFixMiddleware | |
ENCODED_BACKSLASH = "%5C" |
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
(defn multiplier [n] | |
(fn [x] (* x n))) | |
(def doubler (multiplier 2)) | |
(doubler 7) | |
14 |
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 clojure_helpers.incanter_helper | |
(:use (incanter core stats charts))) | |
(defn view-histogram [values] | |
(view (histogram values))) |
NewerOlder