- Eliminate Decision Fatigue
- Increase Productivity
- Offload routine decisions onto habits
- Offload non-routine decisions onto if/then rules
- Offload unclear decisions onto a timebox
| ;; Returns a function with retries. | |
| ;; retries: num of retries | |
| ;; delay: delay between retries in milliseconds | |
| ;; f: function to apply | |
| ;; ef: error function, determines if f should be retried | |
| ;; f and ef should not throw Exceptions | |
| (defn with-retry | |
| [retries delay f ef] | |
| (fn [& args] |
| (ns compound.core | |
| (:gen-class)) | |
| ;; items is :label, dividend rate, dividend growth rate | |
| (def items [[:abbv 0.0504 0.209] | |
| [:mo 0.07 0.10] | |
| [:pru 0.0472 0.13] | |
| [:abc 0.0178 0.10] | |
| [:amp 0.0219 0.11] | |
| [:cm 0.0521 0.036] |
| (require '[clojure.edn :as edn]) | |
| ;; props to didibus https://clojuredocs.org/clojure.core/num | |
| (defn numberize | |
| [value] | |
| (edn/read-string value)) |
| (ns davidvhill) | |
| (defn same-length? | |
| [seqs] | |
| (->> seqs (map count) | |
| (into #{}) | |
| count | |
| (= 1))) |
| (ns tmpclj.changedetection | |
| (:require [clojure.spec.alpha :as s]) | |
| (:gen-class)) | |
| (s/def ::dates (s/coll-of int?)) | |
| (s/def ::reds (s/coll-of float?)) | |
| (s/def ::greens (s/coll-of float?)) | |
| (s/def ::blues (s/coll-of float?)) | |
| (s/def ::nirs (s/coll-of float?)) | |
| (s/def ::swir1s (s/coll-of float?)) |
| """ Compute compound interest given a rate, period and periodic rate increase | |
| Args: | |
| start: starting number | |
| periods: compounding period | |
| rate_growth: compounding rate growth rate | |
| rate: starting compounding rate | |
| Returns: | |
| Final compounded value |
| @entrypoint.command() | |
| @click.option('--x', '-x', required=True) | |
| @click.option('--y', '-y', required=True) | |
| @click.option('--acquired', '-a', required=True) | |
| @click.option('--number', '-n', required=False, default=2500) | |
| def changedetection(x, y, acquired, number=2500): | |
| """Run change detection for a tile over a time range and save results to Cassandra. | |
| Args: | |
| x (int): tile x coordinate |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| ; Copyright (c) Rich Hickey. All rights reserved. | |
| ; The use and distribution terms for this software are covered by the | |
| ; Common Public License 1.0 (http://opensource.org/licenses/cpl.php) | |
| ; which can be found in the file CPL.TXT at the root of this distribution. | |
| ; By using this software in any fashion, you are agreeing to be bound by | |
| ; the terms of this license. | |
| ; You must not remove this notice, or any other, from this software. | |
| ;dimensions of square world |
| from datetime import datetime | |
| import d2d.user | |
| import d2d.user.search | |
| import d2d.notifications.send | |
| #################################################################### | |
| # Method 1, detach interface from implementation | |
| # Indirectly reference dependencies from vals | |
| #################################################################### |