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
diff --git main/main.ml main/main.ml | |
index fa98968..86c90ff 100644 | |
--- main/main.ml | |
+++ main/main.ml | |
@@ -37,6 +37,7 @@ let main = | |
("-load-sim", Arg.String (fun file -> Parameter.marshalizedInFile := file) , "load simulation package instead of kappa files") ; | |
("-make-sim", Arg.String (fun file -> Parameter.marshalizedOutFile := file) , "save kappa files as a simulation package") ; | |
("--implicit-signature", Arg.Unit (fun () -> Parameter.implicitSignature := true), "Program will guess agent signatures automatically") ; | |
+ ("--float-precision", Arg.Int (fun p -> Parameter.floatPrecision := Some p), "Use given precision to print floating point numbers (e.g. time)") ; | |
("-seed", Arg.Int (fun i -> Parameter.seedValue := Some i), "Seed for the random number generator") ; |
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
mkdir -p lib | |
cp /home/rhz/src/scala/mois-fba/tmp/lib/libglpk.so /home/rhz/src/scala/mois-fba/tmp/lib/jni/libglpk_java.so /home/rhz/src/scala/mois-fba/tmp/share/java/glpk-java.jar lib | |
sbt -batch -no-colors compile | |
[0m[[0minfo[0m] [0mLoading project definition from /home/rhz/src/scala/mois-fba/project[0m | |
[0m[[0minfo[0m] [0mSet current project to mois-fba (in build file:/home/rhz/src/scala/mois-fba/)[0m | |
[0m[[0minfo[0m] [0mCompiling 2 Scala sources to /home/rhz/src/scala/mois-fba/target/scala-2.11/classes...[0m | |
[0m[[31merror[0m] [0m/home/rhz/src/scala/mois-fba/src/main/scala/uk/ac/ed/inf/mois/fba/Linear.scala:36: object RateLawReactionNetwork is not a member of package uk.ac.ed.inf.mois.reaction[0m | |
[0m[[31merror[0m] [0mimport uk.ac.ed.inf.mois.reaction.RateLawReactionNetwork[0m | |
[0m[[31merror[0m] [0m ^[0m | |
[0m[[31merror[0m] [0m/home/rhz/src/scala/mois-fba/src/main/scala/uk/ac/ed/inf/mois/fba/Linear.scala:38: object Bounds is not a member of package uk.ac.ed.inf.mois[0m |
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
(defmacro multi-pred [& preds] | |
`(fn [& args] | |
(and ~@(for [pred preds] | |
`(apply ~pred args))))) |
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
(defrecord Agent [id name states bindings]) | |
(defn a1 [bs ba] | |
(Agent. 1 :a1 {"x" ""} {"x" [bs (delay (ba "x" a1))]})) | |
(defn a2 [bs ba] | |
(Agent. 2 :a2 {"z" ""} {"z" [bs (delay (ba "z" a2))]})) | |
;; user> (a1 "z" a2) ; why stack overflow? |
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
(add-to-list 'load-path (expand-file-name "~/emacs/lisp/auto-complete-1.2/")) | |
(require 'auto-complete-config) | |
(add-to-list 'ac-dictionary-directories "~/emacs/lisp/auto-complete-1.2/dict/") | |
(ac-config-default) |
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 get-complexes | |
"Returns a seq with the ids of the complexes in expr (which is a | |
map from id (Integer) to Kappa agent)." | |
[expr] | |
(if (:complexes (meta expr)) (:complexes (meta expr)) | |
(let [get-complex (partial complex expr)] | |
(loop [remaining expr | |
last-complex #{} | |
groups (transient [])] | |
(let [remaining (remove (comp last-complex key) remaining)] |
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
No message. | |
[Thrown class java.lang.IndexOutOfBoundsException] | |
Restarts: | |
0: [QUIT] Quit to the SLIME top level | |
1: [ABORT] ABORT to SLIME level 0 | |
Backtrace: | |
0: clojure.lang.PersistentVector.arrayFor(PersistentVector.java:106) | |
1: clojure.lang.PersistentVector.nth(PersistentVector.java:110) |
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
diff --git a/main.lisp b/main.lisp | |
index 0dfaf15..ec5730e 100644 | |
--- a/main.lisp | |
+++ b/main.lisp | |
@@ -270,6 +270,17 @@ Returns T upon successful installation, NIL otherwise." | |
(get-pkgbuild pkg-name) | |
(quit))))))))) | |
+(defun search-packages (query) | |
+ (maybe-refresh-cache) |
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
diff --git a/src/main/clojure/clojure/data/finger_tree.clj b/src/main/clojure/clojure/data/finger_tree.clj | |
index bc00343..557aaaf 100644 | |
--- a/src/main/clojure/clojure/data/finger_tree.clj | |
+++ b/src/main/clojure/clojure/data/finger_tree.clj | |
@@ -537,13 +537,17 @@ | |
(count [_] (:len (measured tree))) | |
IPersistentSet | |
(disjoin [this k] | |
- (let [[l x r] (split-tree tree #(>= 0 (cmpr k (:right %))))] | |
- (if (= x k) |
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 prob-n [pred tol in n] ;; in is a csv's filename | |
(let [as (for [[_ _ p m] (map #(.split % ";") (rest (.split (slurp in) "\n"))) :when p] | |
(if (empty? m) [p] [p m])) ;; take the third and fourth (if possible) column of each row | |
conteo (for [as (c/combinations as n)] | |
(if (apply pred tol as) 1 0))] | |
(/ (reduce + conteo) (count conteo)))) | |
(defn ningun-apellido-en-comun [tol & as] | |
(let [distinct-as (distinct (apply concat as)) | |
conteo (for [a distinct-as] |
OlderNewer