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
# Monty Hall Problem Simulation | |
# Author: Ryan Sturmer | |
# | |
import random | |
def play_round(doors, switch): | |
# Choose the location of the car | |
car = random.randint(1, doors) |
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
#!/bin/bash | |
TMPDIR=.tmp | |
DEVICE=/dev/mmcblk1 | |
CURDIR=`pwd` | |
PARTITION=$DEVICE"p1" | |
PACKAGES="\ | |
base-devel git vim \ | |
nodejs npm \ | |
jupyter jupyter-notebook jupyterlab python2-ipykernel python-numpy python-scipy python-pandas python-requests \ |
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
{ | |
"records": [ | |
{ | |
"t": 0, | |
"ch": "C", | |
"dir": "out", | |
"data": "\u0004" | |
}, | |
{ | |
"t": 1, |
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
systemctl stop fabmo fabmo-updater | |
cd /fabmo | |
mount -w -o remount / | |
rm -rf engine updater | |
git clone https://github.com/FabMo/FabMo-Engine.git ./engine | |
git clone https://github.com/FabMo/FabMo-Updater.git ./updater | |
cd /fabmo/updater | |
npm install | |
touch install_token |
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
from math import cos, sin, tan, atan2, atan, pi | |
def gx(n, x=None,y=None,z=None, f=None): | |
retval = ['G%d' % n] | |
for a,b in zip(('X','Y','Z','F'), (x, y, z, f)): | |
if b is not None: | |
if a == 'F': | |
b *= 60.0 # Feedrates in ipm not ips | |
retval.append(' %s%0.4f' % (a,b)) | |
return ''.join(retval) |
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
import xml.etree.ElementTree as ET | |
import sys | |
import math | |
import re | |
import argparse | |
import os | |
def gx(n, x=None,y=None,z=None, f=None): | |
retval = ['G%d' % n] | |
for a,b in zip(('X','Y','Z','F'), (x, y, z, f)): |
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
function getParameterDefinitions() { | |
return [ | |
{ name: 'detents', type: 'int', initial: 12, caption: "Detents" }, | |
{ name: 'holeDiameter', type: 'float', initial: 0.25, caption: "Bolt Diameter" } | |
]; | |
} | |
function main(params) { | |
var holeDiameter = params.holeDiameter; | |
var detents = params.detents; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// Walter's Chair | |
var woodColor = [0.93,0.83,0.67]; | |
function getParameterDefinitions() { | |
return [ | |
{ name: 'seatDepth', type: 'float', initial: 12, caption: "Seat Depth" }, | |
{ name: 'seatWidth', type: 'float', initial: 12, caption: "Seat Width" }, | |
{ name: 'chairHeight', type: 'float', initial: 12, caption: "Chair Height" }, | |
{ name: 'seatHeight', type: 'float', initial: 7, caption: "Seat Height" }, |
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
#!/bin/sh -vex | |
# To run as one-liner: | |
# wget https://goo.gl/JfLl3S -v -O fabmo_install.sh && chmod u+x ./fabmo_install.sh && ./fabmo_install.sh | |
# Stop running instances of the engine and updater | |
systemctl stop fabmo | |
systemctl stop fabmo-updater | |
# Clear out old installations | |
rm -rf /fabmo /opt/fabmo |
NewerOlder