Skip to content

Instantly share code, notes, and snippets.

View vermiculus's full-sized avatar
🙃
I may be slow to respond.

Sean Allred vermiculus

🙃
I may be slow to respond.
View GitHub Profile
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{enumerate}
\item \dots
\item \dots
\item \dots
\item \dots
\item \dots
\item \dots
--- !Move
name: mark node
description: mark this node
author: Sean Allred
date: 2014-05-17
tex: '"marked"(n) = 1'
filename: mark.py
--- !Move
name: unmark node
description: unmark this node
bash-3.2$ ./ssa-tool run 'Independent Set' from examples/ind-set.ssax on examples/graph.yaml
Welcome to SSA-Tool, version 1.
Running
Algorithm: "Independent Set"
from: "examples/ind-set.ssax"
on: "examples/graph.yaml"
(format: "yaml")
Read Graph:
[(0, {'marked': False}),
(1, {'marked': True}),

Lispbox

If you just want a Lisp environment, go ahead and grab Lispbox, an Emacs bundle pre-configured to work as a LISP IDE. Download the appropriate version from the official site.

Straight Emacs

If you want to really explore what Lisp is capable of on a regular basis, get yourself a copy of Emacs. It’s a really great environment and, if you put in effort, it will help you out a lot over the course of your career. (Things like AucTeX, Magit, and multiple-cursors are indispensable tools.)

Python 2.7.5 (default, Sep 12 2013, 21:33:34)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> with open('ind-set.ssax/bundle.yaml') as f:
... print("".join(f.readlines()))
...
#%BUNDLE 1.0
- predicate: node should unmark
description: Returns true if the node is marked when a neighbor is also marked.
#%BUNDLE 1.0
- algorithm: Independent Set
author: Sean Allred
date: 2014-05-17
rules:
- rule: marked and neighbors marked
moves:
- unmark
- rule: unmarked and neighbors unmarked
moves:
\documentclass{article}
\usepackage{mathtools}
\DeclareMathOperator{\Barr}{Bar}
\newcommand\Fooo{\mathrm{Foo}}
\newcommand\Bazz{\mathrm{Baz}}
\newcommand\Fobb{\mathrm{Fob}}
\begin{document}
\begin{align*}
#+Title: Solution for In-Class Lab 2014-03-10 (COSC 251 SP14.6PM)
#+Author: Sean Allred and Molly Domino
#+Date: 2014-03-10
#+Objective: Read in a CSV, parse it as an adjacency matrix,
#+ and convert into an adjacency list.
# pretty-printing facilities
from pprint import pprint
print('Method 1: 21 lines of code (nothing fancy)')
% This is a LaTeX template for the paper due 2014-02-20 for D&A.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Producing your Document %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% LaTeX provides sophisticated reference management, which is even
% more automated through the use of BibTeX. However, BibTeX requires
% a separate command to work, making the call order:
%
dof l2_err level
5 8.312e-02 2
17 2.547e-02 3
49 7.407e-03 4
129 2.102e-03 5
321 5.874e-04 6
769 1.623e-04 7
1793 4.442e-05 8
4097 1.207e-05 9
9217 3.261e-06 10