Skip to content

Instantly share code, notes, and snippets.

Ricardo Honorato-Zimmer rhz

  • Santiago, Chile
View GitHub Profile
@rhz
rhz / bluetoothd.out
Created May 27, 2019
output of "sudo /usr/lib/bluetooth/bluetoothd -d -n"
View bluetoothd.out
bluetoothd[31844]: Bluetooth daemon 5.50
bluetoothd[31844]: src/main.c:parse_config() parsing /etc/bluetooth/main.conf
bluetoothd[31844]: src/main.c:parse_config() Key file does not have key “DiscoverableTimeout” in group “General”
bluetoothd[31844]: src/main.c:parse_config() Key file does not have key “PairableTimeout” in group “General”
bluetoothd[31844]: src/main.c:parse_config() Key file does not have key “Privacy” in group “General”
bluetoothd[31844]: src/main.c:parse_config() Key file does not have key “Name” in group “General”
bluetoothd[31844]: src/main.c:parse_config() Key file does not have key “Class” in group “General”
bluetoothd[31844]: src/main.c:parse_config() Key file does not have key “DeviceID” in group “General”
bluetoothd[31844]: src/main.c:parse_config() Key file does not have key “ReverseServiceDiscovery” in group “General”
bluetoothd[31844]: src/main.c:parse_config() Key file does not have key “MinEncKeySize” in group “GATT”
@rhz
rhz / pretty-output.xml
Last active May 27, 2019
output of "dbus-send --system --print-reply --dest=org.bluez /org/bluez/hci0/dev_E9_09_EF_A6_24_70 org.freedesktop.DBus.Introspectable.Introspect"
View pretty-output.xml
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg name="xml" type="s" direction="out"/>
</method>
</interface>
<interface name="org.bluez.Device1">
<method name="Disconnect"></method>
View agda-tutorial-exercise-2.2.agda
data Nat : Set where
zero : Nat
suc : Nat -> Nat
data Vec (A : Set) : Nat -> Set where
[] : Vec A zero
_::_ : {n : Nat} -> A -> Vec A n -> Vec A (suc n)
data Fin : Nat -> Set where
fzero : {n : Nat} -> Fin (suc n)
@rhz
rhz / gist:38398cf037aa9eb85cf0
Created Sep 26, 2014
"make all" output of mois-fba
View gist:38398cf037aa9eb85cf0
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
[info] Loading project definition from /home/rhz/src/scala/mois-fba/project
[info] Set current project to mois-fba (in build file:/home/rhz/src/scala/mois-fba/)
[info] Compiling 2 Scala sources to /home/rhz/src/scala/mois-fba/target/scala-2.11/classes...
[error] /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
[error] import uk.ac.ed.inf.mois.reaction.RateLawReactionNetwork
[error]  ^
[error] /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
@rhz
rhz / float-precision.patch
Last active Aug 29, 2015
KaSim: show all digits for float numbers (eg time) in output file
View float-precision.patch
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") ;
View gist:2219713
module Main where
import System.Process
import System.Environment (getArgs)
import Data.List (intercalate)
data Gender = Male
| Female
data Var = FirstValue
@rhz
rhz / gist:2049084
Created Mar 16, 2012
Main.hs profiler result
View gist:2049084
JOB "Main 1.kappa 10000 0 500 +RTS -hc -T"
DATE "Fri Mar 16 08:13 2012"
SAMPLE_UNIT "seconds"
VALUE_UNIT "bytes"
BEGIN_SAMPLE 0.00
END_SAMPLE 0.00
BEGIN_SAMPLE 0.09
(2524)create/findNewInjs.cc... 104
(1740)evalMixture/evalObs.a... 192
(2308)diff.addModifications... 64
@rhz
rhz / gist:2049061
Created Mar 16, 2012
Main.hs profiler result
View gist:2049061
JOB "Main 1.kappa 10000 0 500 +RTS -hc -T"
DATE "Fri Mar 16 08:01 2012"
SAMPLE_UNIT "seconds"
VALUE_UNIT "bytes"
BEGIN_SAMPLE 0.00
END_SAMPLE 0.00
BEGIN_SAMPLE 0.09
(898)CAF:nodeOfId 16
(2523)findNewInjs.ccIdInjs/... 48
(1943)infinity/add.(...)/ad... 16
View gist:1068694
import qualified Data.Map as Map
import qualified Data.Set as Set
type IntMap = Map.Map Int Int
type IntSet = Set.Set Int
extend :: IntMap -> IntSet -> IntMap -> Maybe (IntMap, IntSet)
extend inj codom map = Map.foldrWithKey f (Just (inj, codom)) map
where f :: Int -> Int -> Maybe (IntMap, IntSet) -> Maybe (IntMap, IntSet)
f i j (Just (inj, codom)) = if Set.member j codom
View gillespie.hs
import qualified Data.Map as Map
import qualified Data.Set as Set
import Data.Maybe
import Data.List
import Random (randomRIO)
import qualified Data.Enumerator as E
import qualified Data.Enumerator.List as EL
type Mol = String
type Mixture = Map.Map Mol Integer
You can’t perform that action at this time.