Skip to content

Instantly share code, notes, and snippets.

This comment has turned out to be rather long. I'd be really interested to hear what other people thought about A City Is Not a Computer. Especially you Mel!

I thought that this was a good article. It's well written and well researched. The middle section that covers the history of cities' evolution is great.

However, and there always has to be a however it seems, there were a few things that grated on me.

The argument part---rather than the history part---hinges on this assertion:

Urban intelligence is more than information processing.

@notionparallax
notionparallax / nyan_cat.py
Created March 20, 2017 02:34
Prints a nyan cat, in colour, and satisfies the flake 8 linter!
# -*- coding: UTF-8 -*-
from colorama import Fore
from colorama import Style
def nyan_cat():
cattern = [
['{BRIGHT_BLUE}', '{x}'*80],
['{BRIGHT_BLUE}', '{x}'*80],
['{RED}', '{x}'*18, '{BRIGHT_BLUE}', '{x}'*16, '{BLACK}',
@notionparallax
notionparallax / dot_ripper.py
Created May 9, 2017 02:32
Describes the topology of a grasshopper file
"""Describe the topology of the current document."""
ghdoc = ghenv.Component.OnPingDocument()
o = ghdoc.Objects
nodes = ""
connections = ""
lookup = {}
EDGE = ' {} -> {};\n'
NODE = ' {name}_{id} [shape=box,label="{name}"];\n'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@notionparallax
notionparallax / basic_techtree.js
Last active June 6, 2018 01:56 — forked from magjac/index.html
d3-graphviz Basic Example
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://unpkg.com/[email protected]/viz.js" type="javascript/worker"></script>
<script src="https://unpkg.com/[email protected]/build/d3-graphviz.min.js"></script>
<div id="graph" style="text-align: center;"></div>
<script>
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('48d31887-5fad-4d73-a9f5-3c356e68a038')/calendarView",
"@odata.nextLink": "https://graph.microsoft.com/v1.0/me/calendarview?startdatetime=2019-05-3T03%3a08%3a19.120Z&enddatetime=2019-05-10T03%3a08%3a19.120Z&$skip=10",
"value": [
{
"@odata.etag": "W/\"IiLKjG2I7E+Xv0+ys6MD0wABbkWMRg==\"",
"id": "AAMkAGVmMDEzMTM4LTZmYWUtNDdkNC1hMDZiLTU1OGY5OTZhYmY4OAFRAAgI1tG1yFgAAEYAAAAAIkPFveuwe0ygY4Mfa1RFEQcAIiLKjG2I7E_Xv0_ys6MD0wAAAAABDQAAIiLKjG2I7E_Xv0_ys6MD0wAAGvlisgAAEA==",
"createdDateTime": "2017-09-08T06:00:28.0922072Z",
"lastModifiedDateTime": "2019-02-05T07:57:17.5023461Z",
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#Collection(microsoft.graph.plannerTask)",
"@odata.count": 23,
"@odata.nextLink": "https://graph.microsoft.com/v1.0/me/planner/tasks?$skiptoken=1%2523J%2b22F531F5699E58EE%2b-b4ULH-doEuXT7-8NB9_fGUAD4LA",
"value": [
{
"@odata.etag": "W/\"JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAWCc=\"",
"planId": "IlGTfsb-PEWl5EYIx97I5WUAB8ni",
"bucketId": "fno1rNw2Vk2x7XwLQib9aWUAC2YS",
@notionparallax
notionparallax / fake_camera.py
Created May 1, 2019 00:29
A nicer way to view the output from a GridEye in the terminal. Useful for headless debugging.
import random
import math
import time
low = 19.0
high = 25.0
def randInRange():
spread = high - low
import io, sys
book_of_counts = [
{
"expect": """let's get ready to rumble 8
let's get ready to rumble 7
let's get ready to rumble 6
let's get ready to rumble 5
let's get ready to rumble 4
let's get ready to rumble 3