- HTML is just plain text.
- You write it in any text editor. Be careful, though! Programs like Microsoft Word will trick you. They look like plain text, but they are not. I suggest using something like TextWrangler. It saves plain text, but also helpfully color-codes your code.
- You save HTML in a text file, but instead of giving it a
.txt
extension, you give it a.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
class Memoize: | |
""" | |
Memoize a function based on the arguments passed in. Example:: | |
@Memoize | |
def foo(x, y): return x + y | |
""" | |
def __init__(self, f): | |
self.__function = f | |
self.__cache = {} |
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
# Implementation ideas: | |
# run this past sentient to verify vector based approach is better than timeseries | |
# get better nutrient data from gen hydro catalogue | |
# run this past Arielle to see if this is a good default basil recipe | |
# check this against Dan's grow data to verify this is a good default basil recipe | |
# evaluate plausability of auto-generating this recipe format from Dan's grow data | |
# run this past x10 people on the team to see if this is an intuitive way to create recipes | |
# ask people on the forum if they like this method of creating recipes? | |
# Why is this idea interesting? |
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
{ | |
"_id": "long_test_recipe", | |
"format": "simple", | |
"operations": [ | |
[ | |
0, | |
"air_temperature", | |
25 | |
], | |
[ |
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
{ | |
"firmware_module": [ | |
{ | |
"_id": "ds18b20_1", | |
"type": "ds18b20", | |
"environment": "environment_1", | |
"arguments": [4], | |
"outputs": { | |
"temperature": {"variable": "water_temperature"} | |
} |
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
--[[ | |
Lua multimethods. Inspired by Clojure's multimethods. | |
How to use it: | |
local Multi = require('multimethods') | |
-- Create a new multimethod and use isa as dispatch function. | |
-- This will dispatch on first argument by type. | |
local foo = Multi.create(isa) |
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
import multimethod from './multimethod.js' | |
const foo = multimethod(x => typeof x) | |
foo.string = x => 'called string method' | |
foo.number = x => 'called number method' | |
foo('x') | |
// 'called string method' | |
foo(1) |
- Asymco: Hollywood by the numbers. IN-DEPTH
- The Critical Path 20: Below the (belt)line. Explores Hollywood financials.
- The Critical Path 21: Negative Costs. Dan and Horace take on the way income from movies is distributed and why no movies ever make money.
- The Critical Path 71: Bingewatch.
- The Critical Path 80: Functional Structure. What is a functional organization and why is that a thing of beauty? What do Pixar and Apple have in common? EXCELLENT
- Horace hypothesizes that apps will become the new distribution mechanism for entertainment. INSIGHTFUL
In one Critical Path episode (can't remember which), Horace posits that Hollywood is like a distributed functional organization:
- Workers are organized by specialty (acting,
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
// Create a spring object. | |
export const Spring = (curr, prev, dest, stiffness, damping) => ({ | |
curr, // The current position of spring | |
prev, // The position of spring at previous tick | |
dest, // The destination of spring | |
stiffness, // How hard it springs back | |
damping, // Friction. 1.0 means no bounce. | |
}); | |
// Given numbers, calculate the next position for a spring. |
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
export const Spring = (x, y, mass, stiffness, viscosity) => ({ | |
prevX: x, | |
prevY: y, | |
currX: x, | |
currY: y, | |
mass, stiffness, viscosity | |
}); | |
Spring.copy = (spring) => ({ | |
prevX: spring.prevX, |