Skip to content

Instantly share code, notes, and snippets.

View abutcher's full-sized avatar

abutcher

  • Raleigh, NC
View GitHub Profile
;; Turing Machine Simulator
;; CS 422
;; Andrew Butcher
(defconstant tape-alphabet-size 256)
(defconstant trace-tape-chars 78)
(defstruct transition
control-state
head-symbol
SyntaxHighlighter.brushes.CommonLisp = function()
{
var funcs = 'lambda list progn mapcar car cdr reverse member append format';
var keywords = 'let while unless cond if eq t nil defvar dotimes setf listp numberp not equal';
var macros = 'loop when dolist dotimes defun';
var operators = '> < + - = * / %';
this.regexList = [
{ regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' },
{ regex: new RegExp('&\\w+;', 'g'), css: 'plain' },
data= nasa93
repeats= 10
reOrderEachRepeat= true
a=c=d= 1 b= 0
s= 2
m= 4
eraSize= 10
era0= 30
(defstruct state
name
initial
final
epsilons
transitions)
(defstruct transition
input
next-state)
The control string ~R prints integers alphabetically...
CL-USER> (format t "His power level is over ~R!~%" 9000)
His power level is over nine thousand!
NIL
CL-USER> (format t "His power level is over ~R!~%" 382498239489234892348923849234)
His power level is over three hundred eighty-two octillion four hundred ninety-eight septillion two hundred thirty-nine sextillion four hundred eighty-nine quintillion two hundred thirty-four quadrillion eight hundred ninety-two trillion three hundred forty-eight billion nine hundred twenty-three million eight hundred forty-nine thousand two hundred thirty-four!
NIL
if type == "VARIANCE":
clusters_copy = sorted(clusters_copy, key=lambda clus: entropy(clus.datums()), reverse=True)
elif type == "SCORE":
clusters_copy = sorted(clusters_copy, key=lambda clus: clus.stats.HarmonicMean("TRUE"))
else:
print "You're a towel!"
package home;
import static org.junit.Assert.*;
import java.io.IOException;
import java.util.ArrayList;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
[root@lovecoo ~]# cat derp.yaml
---
- hosts:
- lovecoo
tasks:
- command.Run: {command: echo "lol" || true}
- mod_jk.WaitOnStateOK:
proxies:
- proxyjava02.web.qa.ext.phx1.redhat.com
<abutcher>@(lovecoo)[~/Taboot] 22:29:25 (modjkwait)
$ git rebase tim-dev/0.4.0-test
First, rewinding head to replay your work on top of it...
Applying: Initial commit for rfe #10 modjk wait polling.
Applying: Cleaning state polling function.
<abutcher>@(lovecoo)[~/Taboot] 22:29:53 (modjkwait)
$ sudo su
[root@lovecoo Taboot]# . ./hacking/env-setup
bash: ./hacking/env-setup: No such file or directory
[root@lovecoo Taboot]# . ./hacking/setup-env
[root@lovecoo ~]# taboot derp.yaml
ERROR: Unable to instantiate <function WaitOnStateOK at 0x182ded8> with the following arguments:
{'host': '*',
'proxies': ['proxyjava02.web.qa.ext.phx1.redhat.com',
'proxyjava03.web.qa.ext.phx1.redhat.com']}
ERROR: Full backtrace below
ERROR:
Traceback (most recent call last):
File "/home/abutcher/Taboot/bin/taboot", line 20, in <module>
taboot.cli.main()