Skip to content

Instantly share code, notes, and snippets.

module Main where
import Test.QuickCheck
-----------------------------------------------------------------------
-- 3.1 - Trivial
-----------------------------------------------------------------------
data Trivial = Trivial deriving (Eq, Show)
@jtmcx
jtmcx / caesar-cipher.sh
Created November 5, 2019 21:59 — forked from IQAndreas/caesar-cipher.sh
A really simple Caesar Cipher in Bash (or Shell) using `tr`, can also easily be adjusted to encrypt/decrypt ROT13 instead.
# Caesar cipher encoding
echo "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" | tr '[A-Z]' '[X-ZA-W]'
# output: QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD
# Caesar cipher decoding
echo "QEB NRFZH YOLTK CLU GRJMP LSBO QEB IXWV ALD" | tr '[X-ZA-W]' '[A-Z]'
# output: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG
# Can also be adjusted to ROT13 instead
// ISC License (ISC) Copyright 2019 John Murphy <[email protected]>
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
#!/usr/bin/env python3
import sys
import argparse
def parse_args():
parser = argparse.ArgumentParser(description="Unprocess some stuff.")
parser.add_argument("input", type=str, help="input csv file")
parser.add_argument("output", type=str, help="output blk file")
return parser.parse_args()
@jtmcx
jtmcx / parse.py
Last active October 23, 2019 18:07
#!/usr/bin/env python3
import sys
import argparse
def parse_args():
parser = argparse.ArgumentParser(description="Process some stuff.")
parser.add_argument("-w", "--width", type=int, help="width of map", required=True)
@jtmcx
jtmcx / tictactoe.py
Last active September 4, 2019 18:31
A simple interactive command-line tic-tac-toe game.
#!/usr/bin/env python3
from enum import Enum
HELP_MESSAGE = """\
To play tic-tac-toe, specify which cell you would like to place your Xs
and Os by using any combination of the words 'top', 'bottom', 'center',
'right', and 'left'. For example, these are valid commands:
> top right
> center