I hereby claim:
- I am engelberg on github.
- I am markengelberg (https://keybase.io/markengelberg) on keybase.
- I have a public key whose fingerprint is C3F3 DE10 2B2E DEDA 4613 AC36 530A 864D 3A1B A35E
To claim this, I am signing this object:
For those who cannot afford a hardware wallet, the next best thing is to use Electrum | |
to create a 2-of-2 multisig wallet with one key on your phone and one on your desktop. | |
To use, create the transaction on your desktop client, and then display the QR code | |
for the partially signed transaction. Scan the QR code in your phone's Electrum, | |
sign it, and broadcast with a few taps. | |
Given the added difficulty of a hacker accessing both your desktop and your phone, | |
you get significantly better security and the process of using the wallet remains | |
relatively straightforward. |
I am successfully running a local electrum server, getting its data from dojo. This is useful for private use of hardware wallets. | |
Step 1: As Laurent MT suggested in the Samourai telegram group, you need to edit the docker-compose.yaml file, adding to the bitcoind section the following two lines | |
ports: | |
- "127.0.0.1:28256:28256" | |
Step 2: Follow install directions for electrs, an electrum server written in rust. | |
electrs install directions can be found here: https://github.com/romanz/electrs/blob/master/doc/usage.md |
public class CoreSubsetObjective implements Objective<SubsetSolution, CoreSubsetData>{ | |
/** | |
* Evaluates the given subset solution using the underlying data, by computing the average | |
* distance between all pairs of selected items. If less than two items are selected, | |
* the evaluation is defined to have a value of 0.0. | |
* | |
* @param solution subset solution | |
* @param data core subset data | |
* @return evaluation with a value set to the average distance between all pairs of selected items; |
; The sample to refactor | |
(if-let [x (foo)] | |
(if-let [y (bar x)] | |
(if-let [z (goo x y)] | |
(do | |
(qux x y z) | |
(log "it worked") | |
true) | |
(do | |
(log "goo failed") |
abelo | |
abio | |
abomeno | |
abrikoto | |
absoluta | |
abunda | |
acida | |
adapti | |
adicii | |
adjektivo |
(ns twentyfour.core | |
(:use clojure.math.combinatorics)) | |
(def ops ['+ '- '* '/]) | |
(def commutative #{'+ '*}) | |
;; We can generate all the possible expressions efficiently with combinatorics' partitions | |
;; partitions automatically handles duplicates for us, which keeps the process efficient | |
(defn expressions [nums] |
I hereby claim:
To claim this, I am signing this object:
(ns utils.cond | |
"A collection of variations on Clojure's core macros. Let's see which features | |
end up being useful." | |
{:author "Christophe Grand"} | |
(:refer-clojure :exclude [cond when-let if-let])) | |
(defmacro if-let | |
"A variation on if-let where all the exprs in the bindings vector must be true. | |
Also supports :let." | |
([bindings then] |
(defn- sum [s] (reduce + s)) | |
(defn score | |
([gs] (let [s (clojure.string/replace gs #"\d/" #(str (nth % 0) (char (- 106 (int (nth % 0)))))), | |
g (map #(case % \X 10 \- 0 (- (int %) 48)) s)] | |
(score g 1))) | |
([game frame] | |
(cond | |
(= frame 10) (sum game) | |
(= (first game) 10) (+ (sum (take 3 game)) (score (drop 1 game) (inc frame))), | |
(= (sum (take 2 game)) 10) (+ (sum (take 3 game)) (score (drop 2 game) (inc frame))), |
(ns mark.teamsplit | |
(:require [loco.core :as l] | |
[loco.constraints :refer :all])) | |
; Although this problem was stated in terms of a group of players | |
; with multiple attributes, we can just represent each player by | |
; a single number, so this function just takes the list of numbers. | |
(defn find-teams | |
"Players is a list of player strengths, timeout is in milliseconds" |