Skip to content

Instantly share code, notes, and snippets.

View sarchertech's full-sized avatar

Seth Archer Brown sarchertech

  • Stord
  • Chattanooga, TN
View GitHub Profile
@sarchertech
sarchertech / SketchSystems.spec
Last active February 28, 2019 05:42
Paper Manor
Paper Manor
Build State
MouseUpBuild
press -> MouseDown
MouseDownBuild
release -> MouseUp
move -> Dragging
DraggingBuild
release -> MouseUp
Furniture State
<div class="flex-grid">
{% for c in (0..2) %}
<div class="column">
{% for r in (0..(page.categories.blog.length / 3 - 1) ) %}
<div class="post-box">
{{assign post = page.categories.blog[(3*c + r)]}}
<img src="{{ post.image }}""
<p> {{ post.content }} </p>
</div>
{% endfor %}
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.App as Html
import Html.Events exposing (onMouseDown, onMouseUp)
import Mouse exposing (..)
main =
Html.program
{ init = init
def answer(names):
names_with_sums = []
for name in names:
names_with_sums.append([word_to_sum(name), name])
names_with_sums.sort(reverse=True)
sorted_names = []
for item in names_with_sums:
sorted_names.append(item[1])
def answer(meetings):
available_time = 0;
num_meetings = 0;
while meetings:
mdx = meeting_with_earliest_end_time(meetings)
m = meetings[mdx]
if m[0] >= available_time:
available_time = m[1]
def answer(str):
stack = []
out = ""
for c in str:
if c == "*":
stack.append(c)
elif c == "+":
while (peek(stack) == "*"):
out = out + stack.pop()
@sarchertech
sarchertech / video_to_frames.m
Created September 28, 2012 01:45
Matlab function, converts a movie to a folder of jpeg images
function [num_frames, folder_name] = video_to_frames( file_name )
% Author: Seth Brown 9/27/2012
% License: MIT License
% Store each frame of the video as a numbered jpeg image
% Use: [numFrames, folderName] = video_to_frames('sample.mp4');
% TODO Error handling--specifically on grabbing frames and file write
video = VideoReader(file_name);
num_frames = video.NumberOfFrames;
@sarchertech
sarchertech / multi_store_finder.rb
Created April 17, 2011 03:21
Quick script I wrote to find stores with the same name, that may be franchises.
require 'yaml'
class Store
attr_accessor :name, :address, :city, :state, :zip, :phone_number
end
def list_of_stores
files = Dir.glob('*.yml')
stores = []