Skip to content

Instantly share code, notes, and snippets.

David Loscutoff dloscutoff

  • Nazarene Theological Seminary
  • Kansas City
Block or report user

Report or block dloscutoff

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
@dloscutoff
dloscutoff / plumbing.bas
Created Mar 1, 2018
Random plumbing generator in QBasic
View plumbing.bas
' https://codegolf.stackexchange.com/questions/62894/plumbing-random-paths
' Deluxe ungolfed version, using depth-first search
' Does not wrap on the boundaries
' Uses black for background, gray for pipe walls, blue for pipe insides
' scale is how many pixels wide the inside of a pipe is
CONST scale = 5
' tick_amt# is the animation delay in seconds
' If < 0, prompt at each step instead
CONST tick_amt# = 0.1
@dloscutoff
dloscutoff / nameGenerator.py
Last active Aug 14, 2017
A Markov-based country name generator
View nameGenerator.py
#!/usr/bin/python3
import re, random
# A regex that matches a syllable, with three groups for the three
# segments of the syllable: onset (initial consonants), nucleus (vowels),
# and coda (final consonants).
# The regex also matches if there is just an onset (even an empty
# onset); this case corresponds to the final partial syllable of the
# stem, which is usually the consonant before a vowel ending (for
View Titin.pip
O("alan argin asparagin aspart cystein glutam glutamin glyc histid isoleuc leuc lys methion phenylalan prol ser threon tryptoph tyros val"^sA*Y"p1j=t-jr7sLw|atYqidl]kqr\i}u^zjw]tC<k.]qszeIymrd!odfskevsZYfakjYCcnn~ctd fq.e7sptSjajS7S!&rfrw~qvezcmjFUqj]?kgnvsn3cdvO(EvsVYfswkeYCcnn.`ii\IWWm}tdj]isejte_oo_dlqgGsmY
pHzdTjj<lW em x*esrt smdIdjnGjjsrsrAlsrsrSlS=trsrSs}rdG]$rAsSsrnnpeWjNtwYkOw ruo?DwNsRcpM1ytCjAtiieuikevkw?j!]kdTddN}NNvdc2Ykdb~jg8*d2YLd2gpGSirw]d
jtdje112lmjrd?jSbcWd!oLwd8odb?Zsetbm{to?jpl!lijAbtiWq\oL]dIdb?te]ii{oojoj!?dmpbteWw\oHwYro~ijgn}ekMk{toMj.{?opebcWdXtm2YIdb?tmPtMtpYe?jmj!l@wgw@oc2YLd2gjGSirMrkl|isvdjj1|vDbe]dIwc j>dRrlw\od~reHj=Rtl[1gjokpl]sj[Wtgytienwlwgo>etNrl-}o]\WilDiNmdadmY7bXYFdjo{*~=t~rRteScrtr<jqrqdJrJvoRT
~bwk}{EtSiieqi,lkMI!itG\=
mr! tn}kZf!w_`s!|hl]Drsrt!uvMgvj_Fmgqj{qjs&GnpmMdqc(ke-hsdViTt}$hvn2j}iiqib1d!ioq1ii0q
segLptJsyiijTr`rd=vq{xLjon
kaLqkhjwkkfrxlwvuo*k\ytDevo}vfojt`honw]ptq8gd`KmwSfol`$NNn|i8:nnp*j?pnvjtj!dqw?Ow`t=kqwvR:b:bjdnAoopdQtLStv
g?ql]sqiie3b_vem[1|in|iziiop2g]i
@dloscutoff
dloscutoff / Large_island.txt
Last active Mar 24, 2017
A large test case for CodeGolf.SE island golf questions
View Large_island.txt
Island
........................
........................
.............#..........
...........#.#.##...#...
...........#.#.###.##...
..........########.##...
..........############..
.....#....############..
...#.###.##############.
@dloscutoff
dloscutoff / ASCIICanvas.py
Last active Sep 22, 2016
Beginnings of a language for programming ASCII art
View ASCIICanvas.py
class CanvasError(Exception):
pass
class Canvas:
def __init__(self, grid=None, default=" "):
if grid:
self.grid = grid
else:
self.grid = [[]]
@dloscutoff
dloscutoff / tltests.txt
Last active Nov 5, 2015
Test cases for tinylisp
View tltests.txt
In 1:
() 42 (q(1 2 3))
(q Here's;a:valid-name.]even[`though"it~has*special$chars&and#numb3rs!!)
( q (q x) )
Out 1:
()
42
@dloscutoff
dloscutoff / tinylisp.py
Last active Aug 31, 2019
Reference implementation of tinylisp language
View tinylisp.py
whitespace = " \t\n\r"
symbols = "()"
# Shortcut function for print without newline
write = lambda x: print(x, end="")
def scan(code):
i = 0
code += " "
@dloscutoff
dloscutoff / Collatz_30
Created May 28, 2015
List of Collatz numbers whose stopping time is 30.
View Collatz_30
86, 87, 89, 520, 522, 524, 525, 528, 529, 532, 533, 536, 538, 546, 547, 555, 571, 577, 578, 579, 583, 633, 635, 3136, 3152, 3156, 3157, 3168, 3176, 3178, 3185, 3200, 3232, 3240, 3242, 3264, 3280, 3284, 3285, 3298, 3299, 3332, 3333, 3334, 3426, 3427, 3428, 3429, 3430, 3464, 3466, 3468, 3469, 3472, 3476, 3477, 3480, 3482, 3500, 3501, 3502, 3528, 3530, 3532, 3533, 3537, 3570, 3571, 3593, 3800, 3801, 3802, 3804, 3805, 3812, 3813, 3814, 3819, 3820, 3821, 3822, 18432, 18944, 19072, 19104, 19112, 19114, 19456, 19712, 19776, 19792, 19796, 19797, 20000, 20008, 20010, 20016, 20020, 20021, 20544, 20560, 20564, 20565, 20576, 20584, 20586, 20593, 20616, 20618, 20620, 20621, 20630, 20631, 20736, 20800, 20816, 20820, 20821, 20864, 20896, 20904, 20906, 20932, 20933, 20934, 21000, 21002, 21004, 21005, 21008, 21009, 21012, 21013, 21016, 21018, 21026, 21027, 21035, 21184, 21200, 21204, 21205, 21216, 21218, 21219, 21224, 21226, 21233, 21424, 21425, 21426, 21427, 21428, 21429, 21432, 21434, 21560, 21562, 21564, 21565, 21569, 2157
You can’t perform that action at this time.