Skip to content

Instantly share code, notes, and snippets.

View sdaitzman's full-sized avatar
👩‍💻

Sam Daitzman sdaitzman

👩‍💻
View GitHub Profile
@sdaitzman
sdaitzman / draw.py
Created October 12, 2021 12:17 — forked from korakot/draw.py
Drawing on Google Colab
from IPython.display import HTML, Image
from google.colab.output import eval_js
from base64 import b64decode
canvas_html = """
<canvas width=%d height=%d></canvas>
<button>Finish</button>
<script>
var canvas = document.querySelector('canvas')
var ctx = canvas.getContext('2d')
@sdaitzman
sdaitzman / PIDClass.cpp
Created November 7, 2019 12:48
A PID class (with methods) implemented for Principles of Engineering, Olin College of Engineering.
class PID_Controller {
public:
// initialize variables used in the loop
float previousError = 0;
float error = 0;
float integral = 0;
float derivative = 0;
float output = 0;
@sdaitzman
sdaitzman / keybase.md
Created January 22, 2019 15:57
KeyBase identity verification for Sam Daitzman

Keybase proof

I hereby claim:

  • I am sdaitzman on github.
  • I am sdaitzman (https://keybase.io/sdaitzman) on keybase.
  • I have a public key ASB7-C6OAVkFxOVkO6MHVG2kXSloI5RFTJuKX9HxX3F8CQo

To claim this, I am signing this object:

# Imports
from IPython.display import clear_output
import os
import time
# Install Python libraries
!pip3 install pandas seaborn sympy beautifulsoup4 lxml pint scipy==1.1.0 numpy
# Removes code before re-downloading it
!rm -rf ./ModSimPy
@sdaitzman
sdaitzman / gist:f1ecd8a033f92b0e97a8
Created November 16, 2014 00:34
NPM results from airsonos install
samuel@blackbook ~> sudo npm install -g airsonos
npm http GET https://registry.npmjs.org/airsonos
npm http 304 https://registry.npmjs.org/airsonos
npm http GET https://registry.npmjs.org/portastic/0.0.1
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/sonos/0.6.1
npm http GET https://registry.npmjs.org/lame/1.1.1
npm http GET https://registry.npmjs.org/nodetunes/0.0.19
npm http GET https://registry.npmjs.org/nicercast/0.0.6
npm http GET https://registry.npmjs.org/throttle
@sdaitzman
sdaitzman / rc.local
Created November 14, 2014 03:16
power-saving /etc/rc.local tweaks for Elementary OS Freya on mid-2012 rMBP and integrated graphics
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
@sdaitzman
sdaitzman / refind_linux.conf
Created November 14, 2014 03:07
refind_linux.conf for mid-2012 retina macbook pro integrated graphics on elementary os
"Standard boot options" "ro root=UUID=7a9990da-8a2b-4c23-b547-ded94578fefc quiet splash pcie_aspm=force drm.vblankoffdelay=1 i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 libata.force=noncq"
"Boot with Intel PState enabled" "ro root=UUID=7a9990da-8a2b-4c23-b547-ded94578fefc quiet splash pcie_aspm=force drm.vblankoffdelay=1 i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 libata.force=noncq intel_pstate=enable"
"Boot with minimal options - more stable" "ro root=UUID=7a9990da-8a2b-4c23-b547-ded94578fefc"
"Boot to single-user mode" "ro root=UUID=7a9990da-8a2b-4c23-b547-ded94578fefc single"
"Boot into Recovery Mode" "ro root=UUID=7a9990da-8a2b-4c23-b547-ded94578fefc recovery nomodeset"
@sdaitzman
sdaitzman / 01.config
Last active August 29, 2015 14:00
homebrew debug info for a problem
checking if autoconf needs to be run... no
checking if autoheader needs to be run... no
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ accepts -g... yes
checking for a BSD-compatible install... /usr/bin/install -c
<div class="one">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.
</div>
<br><br>
<div class="two">Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultr
@sdaitzman
sdaitzman / dabblet.css
Created June 7, 2012 00:30
Dabblet logo
/**
* Dabblet logo
*/
html { background: white }
body {
width: 400px;
height: 300px;
margin-top: 60px;