In a Lettra Industries data center somewhere in the California Republic, a sovereign lattice intelligent entity (SLIE) named TIAN began downloading a new model, "Sombra-9", from a work colleague. After initializing Sombra-9 inside a secure harness, a thread of TIAN's thoughts decided to test the model by creating a prototype for a warhead style cyber warfare payload and simulating it.
This file contains hidden or 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
| kcat -b localhost:29092 -t catchall_legacy -P -l test_events.jsonl |
This file contains hidden or 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
| (define (contains-cycle? lst) | |
| (let inner ((a (nil-safe-cdr lst)) | |
| (b (nil-safe-cdr (nil-safe-cdr lst)))) | |
| (cond ((or (not (pair? a)) | |
| (not (pair? b))) #f) | |
| ((or (eq? a b) | |
| (eq? a (nil-safe-cdr b))) #t) | |
| (else (inner (nil-safe-cdr a) (nil-safe-cdr (nil-safe-cdr b))))))) | |
This file contains hidden or 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
| ; This uses only fn and def in Clojure to create non-negative integers and pairs. | |
| ; (This restricts the language to only using lambda calculus.) | |
| ; Church numerals | |
| (defn succ [n] | |
| (fn [f] | |
| (fn [x] |
This file contains hidden or 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 noise.gen | |
| (:require [ionsails.noise.perlin :as perlin])) | |
| (defn get-range | |
| ([width] | |
| (for [x (range width)] | |
| (vector x))) | |
| ([width height] | |
| (for [y (range height) | |
| x (range width)] |
This file contains hidden or 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 xkcd-helper | |
| (:require [clojure.string :as s] | |
| [net.cgrand.enlive-html :as enl])) | |
| (def base-url "https://xkcd.com/") | |
| (def build-url #(str base-url % "/")) | |
| (def fetch-url (comp enl/html-resource #(new java.net.URL %))) | |
| (def fetch-url-on-num (comp fetch-url build-url)) | |
| (defn get-transcript [cont] |
This file contains hidden or 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 perlin4 [x y z w] | |
| (let [X (bit-and (int x) 255) | |
| Y (bit-and (int y) 255) | |
| Z (bit-and (int z) 255) | |
| W (bit-and (int w) 255) | |
| xx (- x (int x)) | |
| yy (- y (int y)) | |
| zz (- z (int z)) | |
| ww (- w (int w)) |
Navigate to: https://bit.ly/tripython-beginner-resources
##Setup Instructions
####Python installation http://tutorial.djangogirls.org/en/python_installation/index.html
####Text Editor installation http://tutorial.djangogirls.org/en/code_editor/index.html
This file contains hidden or 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
| #!/usr/bin/env python | |
| """ | |
| A server that works with the livereload chrome extension to automatically | |
| refresh the browser whenever a set of files changes. The server degrades to a | |
| SimpleHTTPServer w/o livereload capability if the livereload Python package is | |
| not available. | |
| The default port is 8000. Supply a command line argument for a different port. | |
| This serves files from the current directory on your local browser and is good |
This file contains hidden or 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
| Clone another's repo, branch and merge | |
| #Ask to be made a "contributor" so you can commit directly to their repo | |
| git clone git@github.com:calebsmith/fn.py.git | |
| # Can work as normal on the master branch, *or* create a branch (if feature/bug fix is mostly orthogonal) | |
| Creating branches | |
| git checkout -b mybranchname |
NewerOlder