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
(when-let [x <value>] | |
(when (not= x ::poison-pill) | |
<body using x>)) |
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
(def conn (start-datomic! (str "datomic:mem://" (java.util.UUID/randomUUID)) (schema))) | |
(def data | |
[{:db/id (d/tempid :com.mdrogalis/people) | |
:user/name "Mike"} | |
{:db/id (d/tempid :com.mdrogalis/people) | |
:user/name "Dorrene"} | |
{:db/id (d/tempid :com.mdrogalis/people) | |
:user/name "Benti"} | |
{:db/id (d/tempid :com.mdrogalis/people) |
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 run-query [q] | |
(info "Executing query: " q) | |
(try | |
(if-not (nil? q) | |
(let [result (database/query *db* q)] | |
(metrics/record-db-hit) | |
{:error :nil-query}) | |
(catch Exception e | |
(warn "Error issuing query" q) | |
{:error :database-error}))) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<deployment xmlns="urn:jboss:bean-deployer:2.0"> | |
<!-- MBean server --> | |
<bean name="MBeanServer" class="javax.management.MBeanServer"> | |
<constructor factoryClass="java.lang.management.ManagementFactory" | |
factoryMethod="getPlatformMBeanServer"/> | |
</bean> |
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
user=> (def a 4984967348648376483967984674386738947648397848673468943796984937) | |
#'user/a | |
user=> (type a) | |
clojure.lang.BigInt | |
user=> (def b 9347683768743769834764843787348967496747698) | |
#'user/b | |
user=> (type b) | |
clojure.lang.BigInt | |
user=> (- a b) | |
4984967348648376483958636990617995177813633004886119976300237239N |
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
[{:onyx/name :partition-datoms | |
:onyx/ident :datomic/partition-datoms | |
:onyx/type :input | |
:onyx/medium :datomic | |
:onyx/consumption :sequential | |
:onyx/bootstrap? true | |
:datomic/uri db-uri | |
:datomic/t t | |
:datomic/datoms-per-segment batch-size | |
:datomic/partition :com.mdrogalis/people |
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 ^:no-doc onyx.logging-configuration | |
(:require [com.stuartsierra.component :as component] | |
[taoensso.timbre :refer [info] :as timbre])) | |
(defrecord LoggingConfiguration [file config] | |
component/Lifecycle | |
(start [component] | |
(if config | |
(timbre/set-config! [] config) |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7eL3odqmRYCJmIDqGuSs9mArMhfTlY+0tjaTk7taP6eOFh40YmvIQi3j1zYoQeTEbsrU/JmkxOe42u8Gpp+GA2kOCWdyKTqJOpzlTkkK3FDK5V9B1m3EaNDA8Gu8Bld/4qg4VNauRUilZHktOjKJqtsEI3CmoSvTbkJG3znUAKy7xg07934iSU36HVR3vGS3HR+lMdVhfYmhHv0HR7+TbOihWlfVXQhkKWliCUivibAh/73sgA5ayTLlxnkCThV/jyx7uTL+uVV1wWXeRsUFGaGNkQ7Fl11H69KOB0RNx+L/zgGr1QtfDwmFt6JtpxvmbHBN1BYVROLnA9hpSH373 mjd3089@rit.edu |
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
(def xform | |
(comp (map inc) | |
(filter even?) | |
(dedupe))) | |
(def data (vec (interleave (range 18) (range 18)))) | |
;; lazily transform the data | |
(sequence xform data) |
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 graph-to-onyx-tree [graph] | |
(reduce | |
(fn [workflow root] | |
(if (set? root) | |
(reduce (fn [result input] (assoc result input (get graph root))) workflow root) | |
(assoc workflow root (get graph root)))) | |
{} | |
(keys graph))) | |
(graph-to-onyx-tree {#{:A :B :C} {:D :E} :F {:G :H}}) |
OlderNewer