Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
Researched by Robert Quattlebaum darco@deepdarc.com.
Last updated 2020-02-03.
Feedback is welcome and appreciated.
The following documents the steps I took to compile the latest version of Resynthesizer on macOS Sierra (10.12.6) for GIMP 2.10.10.
Homebrew was used to fulfill as many dependencies as possible.
''' | |
Freezing a stable-baselines to a frozen protocol buffer file to be served. | |
https://github.com/hill-a/stable-baselines | |
Some code taken from this lovely blog series | |
https://blog.metaflow.fr/tensorflow-how-to-freeze-a-model-and-serve-it-with-a-python-api-d4f3596b3adc | |
''' | |
import tensorflow as tf | |
import os |
///bin/true;COMPILER_OPTIONS="-g -Wall -Wextra --std=c99 -O1 -fsanitize=address,undefined";THIS_FILE="$(cd "$(dirname "$0")"; pwd -P)/$(basename "$0")";OUT_FILE="/tmp/build-cache/$THIS_FILE";mkdir -p "$(dirname "$OUT_FILE")";test "$THIS_FILE" -ot "$OUT_FILE" || $(which clang || which gcc) $COMPILER_OPTIONS -xc "$THIS_FILE" -o "$OUT_FILE" || exit;exec "$OUT_FILE" "$@" | |
#include <stdio.h> | |
int main() { | |
printf("Hello world!\n"); | |
return 0; | |
} |
""" | |
Simple example of manually performing "automatic" differentiation | |
""" | |
import numpy as np | |
from numpy import exp, sin, cos | |
def f(x, with_grad=False): | |
# Need to cache intermediates from forward pass (might not use all of them). | |
a = exp(x) |
#!/bin/bash | |
# usage: set_icon.sh <some.icns or image_file> <folder or file path> | |
# Based on: http://www.amnoid.de/icns/makeicns.html | |
icon="$1" | |
target="$2" | |
if [[ -d "${target}" ]]; then | |
target_icon="${target}"/$'Icon\r' | |
else | |
target_icon="${target}" |
// http://blog.human-friendly.com/drawing-images-from-pixel-data-in-swift | |
// https://github.com/FlexMonkey/MetalReactionDiffusion/blob/1ea9aa4a841d20e0b247505fdf716cd5fe1a01fd/MetalReactionDiffusion/ViewController.swift | |
public struct PixelData { | |
var a:UInt8 = 255 | |
var r:UInt8 | |
var g:UInt8 | |
var b:UInt8 | |
} |
#!/bin/sh | |
# this script does absolutely ZERO error checking. however, it worked | |
# for me on a RHEL 6.3 machine on 2012-08-08. clearly, the version numbers | |
# and/or URLs should be made variables. cheers, zmil...@cs.wisc.edu | |
mkdir mosh | |
cd mosh |