Skip to content

Instantly share code, notes, and snippets.

Sean McIntyre boxysean

Block or report user

Report or block boxysean

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@boxysean
boxysean / outside-corner.js
Created Jun 19, 2019
Outside corner for fixing da cubes
View outside-corner.js
// All units inches
var extrude_ = 0.1;
var nutSize = 0.375;
var threadDiameter = 0.22;
var screwPosition = [0.5, 0.5];
function makeHalf() {
var half = polygon([
[0,0.7],
View dbt_utils_dbt_project.yml
# dbt_utils/dbt_project.yml
name: 'dbt_utils'
version: '0.1.0'
@boxysean
boxysean / datadog-postgres-example.yaml
Created Dec 28, 2018
datadog-postgres-example.yaml
View datadog-postgres-example.yaml
init_config: null
instances:
- collect_activity_metrics: true
collect_default_database: true
collect_function_metrics: true
dbname: mydb
host: main-database.example.com
password: mypassword
port: 5432
relations: null
View dish.js
// All units inches
function form(length, width, height, thickness) {
return union([
cube({size: [length, thickness, height]}),
cube({size: [length, thickness, height]})
.translate([0, width - thickness, 0]),
cube({size: [thickness, width, height]}),
cube({size: [thickness, width, height]})
.translate([length - thickness, 0, 0])
@boxysean
boxysean / a-adam.py
Last active Dec 22, 2016
Solutions to Warby Parker Programming Contest (SWE Guild, 12/22/2016)
View a-adam.py
# Problem A - The 3n + 1 problem
# https://vjudge.net/contest/145712#problem/A
# Author: Adam
import sys
import functools
@functools.lru_cache(maxsize=1000000)
def cycle_len(k):
if k == 1:
@boxysean
boxysean / 787.py
Created Dec 22, 2016
To get you started with B...
View 787.py
import fileinput
def solve(sequence):
pass
def main():
sequence = []
for line in fileinput.input():
for word in line.split():
@boxysean
boxysean / 100.py
Created Dec 22, 2016
To get you started with problem A...
View 100.py
import fileinput
def main():
for line in fileinput.input():
i, j = [int(x) for x in line.split()]
# beware the min and max!
low = min(i, j)
high = max(i, j)
print('%d %d %d' % (i, j, solve(low, high)))
@boxysean
boxysean / slack.py
Last active Oct 30, 2018
PythonSlackOperator -- how I've integrated notifications into my PythonOperators
View slack.py
# airflow/plugins/slack.py
import logging
from airflow.operators.python_operator import PythonOperator
from airflow.plugins_manager import AirflowPlugin
from slackclient import SlackClient
from titan.utils import config
@boxysean
boxysean / airflow.cfg
Created Dec 17, 2015
DAG that crashes Airflow scheduler quickly
View airflow.cfg
# airflow.cfg
[core]
airflow_home = /opt/titan/airflow
dags_folder = /opt/titan/airflow/dags
s3_log_folder = None
executor = CeleryExecutor
sql_alchemy_conn = mysql://airflow:airflow@mysql/airflow
parallelism = 32
dag_concurrency = 16
@boxysean
boxysean / photo2.sh
Created Aug 19, 2014
Raspberry Pi cannot see the Canon 5D Mark II (firmware v 2.1.2) it is connected to
View photo2.sh
pi@gifbooth ~/GIFBooth $ gphoto2 --list-ports
Devices found: 2
Path Description
--------------------------------------------------------------
ptpip: PTP/IP Connection
usb:001,003 Universal Serial Bus
pi@gifbooth ~/GIFBooth $ gphoto2 --auto-detect
Model Port
----------------------------------------------------------
pi@gifbooth ~/GIFBooth $ gphoto2 --capture-image-and-download
You can’t perform that action at this time.