- Install Xcode (Avaliable on the Mac App Store)
- Install Xcode Command Line Tools (Preferences > Downloads)
- Install depot_tools
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ nano ~/.zshrc
- Add
path=('/path/to/depot_tools' $path)
This file contains 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 bash | |
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2019-01-02 | |
# | |
# _______________| noise : ambient Brown noise generator (cf. white noise). | |
# | |
# Usage: noise [minutes=59] [band-pass freq center=1786] [wave] | |
# ^minutes can be any positive integer. | |
# Command "noise 1" will display peak-level meter. | |
# | |
# Dependencies: play (from sox package) |
This file contains 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
$fs=0.2; | |
$fa=0.2; | |
headNum = 2; | |
phillipsDrive(headNum); | |
//phillipsDemo(headNum); | |
module phillipsDemo(num) { | |
difference() { |
To see a bit more about how the internals of CadQuery work, let's mokeypatch some more verbose string represenations and create a simple model.
import cadquery as cq
def _ctx_str(self):
return (
f"CQContext object with id: {id(self)}\n"
+ f" pendingWires: {self.pendingWires}\n"
This file contains 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
// Viterbi algorithm for finding hidden relationships | |
function Viterbi(data) { | |
var V = [{}]; | |
var path = {}; | |
// Initialize base cases (t == 0) | |
for(var i=0;i<data.states.length;i++) { | |
var state = data.states[i]; | |
V[0][state] = data.start_probability[state] * data.emission_probability[state][data.observations[0]]; | |
path[state] = [state]; |
This file contains 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
(* | |
* Tested on Poly/ML. | |
* Usage: | |
* $ polyc getreq.sml | |
* $ ./a.out | |
*) | |
exception E of string | |
fun request domain path = |
This file contains 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
// Propositional logic implemenation | |
const True = a => b => a; | |
const False = a => b => b; | |
const If = x => x; | |
const Not = a => a(False)(True); | |
const And = a => b => a(True)(False)(b(True)(False))(False); | |
const Or = a => b => a(True)(b(True)(False)); | |
const Xor = a => b => And(Or(a)(b))(Not(And(a)(b))); | |
// SKI calculus implementation |