Skip to content

Instantly share code, notes, and snippets.

View amniskin's full-sized avatar

Aaron Niskin amniskin

View GitHub Profile
(set-env!
:dependencies '[
[adzerk/boot-cljs "2.0.0-SNAPSHOT"]
;[powerlaces/boot-figreload "0.1.0-SNAPSHOT"]
;[adzerk/boot-cljs "1.7.48-4"]
;[adzerk/boot-cljs-repl "0.1.9"]
[adzerk/boot-reload "0.5.1"]
[hoplon/boot-hoplon "0.3.0"]
[hoplon "6.0.0-alpha10"]
[org.clojure/clojure "1.7.0"]
import numpy as np
from Gary_sConjugateGradientExample import lineSearch, total_err_and_grad, read_data
##############################################################
### Implementing algorithm 6.28 from Numerical Optimization
### BFGS Method
##############################################################
def l_bfgs(startPt, tol, error_and_grad, memory_length, data):
#### H_inv takes s_k, y_k, and returns a function.
{
$schema: {
id: "Int",
firstName: "String",
lastName: "String",
isAlive: "Boolean",
age: "Int",
address: {
streetAddress: "String",
city: "String",
#!/bin/bash
##### to the directory containing the LayoutBFiles directory.
##### This is really just to make transporting on to the server easier.
ENVDIR="."
##### For release.clean ###############
echo "releaseDate,releaseCode,SOID" > release.clean
for i in {1..9}
# This function should get a data file from stdin that has one line of numbers with a comma, then maybe a few lines of charge data (text between commas). That is data on one arrest (so all of those lines will have the same booking number). Each arrest data "group" will be separated by 3 lines of nothing.
import re, sys
from functools import reduce
tmp = [x.replace("\n", "") for x in sys.stdin if x != "\n"]
def listOfLinesPat(pat):
def retVal(accu, nex):
if (pat.match(nex)):
(page "testico.html"
(:require [style.forms :as forms]
#_[style.framework.css :as css]
#_[style.main :as main]))
(def test1
(forms/input-array
(forms/map-input
:key1 (forms/input "testico1" hoplon.core/input)
:key2 (forms/input "testico2" hoplon.core/input)
(ns style.forms
(:refer-hoplon :exclude [input]))
(defn input [init input-elem]
(let [data (cell (or init nil))]
(fn [action]
(cond (= action :put) (input-elem {:value data
:keyup #(reset! data @%)
:change #(reset! data @%)
:testing "Test"
(defn form-array
[array-cell map-keys labels]
(let [new-cell #(let [obj (array->map map-keys)]
(swap! array-cell conj obj))]
(new-cell)
(loop-tpl
:bindings [elem array-cell]
(let [p (get @elem (first map-keys))
q (get @elem (second map-keys))]
(main/row
// Defining the sample application {{{
function generateRandomID() {
var id = 12341;
generateRandomID = function() {
return id++;
}
return generateRandomID();
}
var sampleApp =
[
function checkTasks(challenge) {
return challenge.users.filter(function(a) {
return challenge.taskList.filter(function(b) {
return a.tasksCompleted.indexOf(b) > -1;
})[0] == undefined;
});
}