Skip to content

Instantly share code, notes, and snippets.

https://emergencemagazine.org/essay/the-serviceberry/ | The Serviceberry – Robin Wall Kimmerer
https://datatracker.ietf.org/meeting/123/materials/slides-123-sustain-unlocking-flexibility-potentials-of-data-centers-and-multi-use-battery-storages-01 | Functional Safety Tutorial - slides-123-sustain-unlocking-flexibility-potentials-of-data-centers-and-multi-use-battery-storages-01.pdf
https://www.youtube.com/watch?v=zZW_g0xr-fs | High Level Perspectives on Artificial Intelligence Data Centers | Nokia at NetUK2 - YouTube
https://cosmonautmag.com/2021/10/why-machines-dont-create-value/ | Why Machines Don't Create Value
https://www.drewlyton.com/story/the-future-is-not-self-hosted/?utm_source=changelog-news | The Future is NOT Self-Hosted
https://elpais.com/diario/1984/11/22/cultura/469926005_850215.html | El director de la Biblioteca Pública de Nueva York se enfrenta a la difícil conservación de la cultura universal | Cultura | EL PAÍS
https://united4efficiency.org/wp-content/uploads/2025/02/2025-U4E-Sustainable-P
# We're going to make an adventure game!
# In the game, you navigate through a maze of rooms, by typing in "north", "south", "east", or "west".
# In each room you enter, the computer will describe your surroundings, and then ask you what direction
# you want to go in next.
# If you haven't already done so, run this program in the PYTHON INTERPRETER to see how the gameplay works.
# So, how to put all this together?
# First, we need some descriptions for our rooms.
# Generated by Django 5.0.9 on 2025-05-09 15:55
import django.db.models.deletion
import taggit.managers
from django.db import migrations, models
from django.utils.text import slugify
class Migration(migrations.Migration):
@timcowlishaw
timcowlishaw / ARViewController.swift
Created March 1, 2022 17:32
Cenatus PHASE blog post snippet 15
import CoreMotion
// [ Elided other imports ]
class ViewController: UIViewController, ARSession { // [ Elided other protocols ]
let hmm = CMHeadphoneMotionManager()
var deviceTransform: simd_float4x4 = matrix_identity_float4x4;
var headphoneTransform: simd_float4x4 = matrix_identity_float4x4;
override func viewDidLoad() {
hmm.startDeviceMotionUpdates(to: OperationQueue.current!, withHandler: {[weak self] motion, error in
@timcowlishaw
timcowlishaw / ARViewController.swift
Created March 1, 2022 17:32
Cenatus PHASE blog post snippet 14
func session(_ session: ARSession, didUpdate frame: ARFrame) {
let transform = frame.camera.transform
phaseListener.transform = transform
}
@timcowlishaw
timcowlishaw / ARViewController.swift
Created March 1, 2022 17:30
Cenatus PHASE blog post snippet 12
let distanceModelParameters = PHASEGeometricSpreadingDistanceModelParameters()
distanceModelParameters.fadeOutParameters =
PHASEDistanceModelFadeOutParameters(cullDistance: cull_distance_for_this_source) // For you to specify...
distanceModelParameters.rolloffFactor = rolloff_factor_for_this_source // ... as is this.
@timcowlishaw
timcowlishaw / ARViewController.swift
Created March 1, 2022 17:29
Cenatus PHASE blog post snippet 11
let spatialPipelineFlags : PHASESpatialPipeline.Flags = [.directPathTransmission, .lateReverb]
let spatialPipeline = PHASESpatialPipeline(flags: spatialPipelineFlags)!
spatialPipeline.entries[PHASESpatialCategory.lateReverb]!.sendLevel = send_level_for_this_source; // Likewise, this is for you to decide on :-)
@timcowlishaw
timcowlishaw / ARViewController.swift
Last active March 1, 2022 17:44
Cenatus PHASE blog post snippet 10
let spatialMixerDefinition = PHASESpatialMixerDefinition(spatialPipeline: spatialPipeline) //spatial Pipeline not yet defined
spatialMixerDefinition.distanceModelParameters = distanceModelParameters // distanceModelParameters not yet defined
@timcowlishaw
timcowlishaw / ARViewController.swift
Last active March 1, 2022 17:26
Cenatus PHASE blog post snippet 9
let mesh = MDLMesh.newIcosahedron(withRadius: 2.0, inwardNormals: false, allocator: nil)
let shape = PHASEShape(engine: phaseEngine, mesh: mesh)
let source = PHASESource(engine: phaseEngine, shapes: [shape])
source.transform = the_position_of_the_object_in_our_world // you'll need to provide this :-)
try! phaseEngine.rootObject.addChild(source)
@timcowlishaw
timcowlishaw / ARViewController.swift
Last active March 1, 2022 17:42
Cenatus PHASE blog post snippet 8
let mixerParameters = PHASEMixerParameters()
mixerParameters.addSpatialMixerParameters(
identifier: phaseSpatialMixerDefinition.identifier, //phaseSpatialMixerDefinition not yet defined
source: source, listener: phaseListener // source not yet defined
)