This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE NamedFieldPuns #-} | |
import Control.Monad | |
import Data.Functor | |
import qualified Data.Array as Arr | |
import Data.Array ((!)) | |
import qualified Data.Char as C | |
import qualified System.Environment as Env | |
data Length_State = Length_State { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if($IsWindows) { | |
$BEN = 'D:\Users\Camto\Documents\Ben' | |
} else { | |
$BEN = '/home/camto/Ben' | |
} | |
# https://gist.github.com/thomastay/ae9e7245f752a195a5a82032a9060f13 | |
# Modified and hopelessly broken, but works | |
# Still doesn't work for Linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"s": "server", | |
"c": "channel", | |
"st": "stack", | |
"aa": "addalias", | |
"gsl": "genspeaklink", | |
"ping": "mention", | |
"lc": "listchannels", | |
"lcn": "listchannelnames", | |
"gc": "getchannel" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
from enum import Enum | |
DEBUG = 0 | |
def dprint(*s, v=0): | |
if DEBUG > v: | |
print(*s) | |
class State(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
class Player: | |
def __init__(self): | |
self.bullets = 0 | |
self.blocking = False | |
self.being_shot = False | |
def is_alive(self): | |
return self.blocking or not self.being_shot | |
def round_reset(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body style = "background-color: white;"> | |
<button id = "select">select</button> | |
<button id = "start" style = "color: black;">start</button> | |
<script> | |
function Init() { // Initialize the game. | |
screen = document.createElement("canvas"); // The game screen. | |
draw = screen.getContext("2d"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var writeFileSync = require("fs").writeFileSync; | |
var execSync = require("child_process").execSync; | |
var request = require("sync-request"); | |
var regexes = [ | |
/(.|[\r\n])+<div lang="en" dir="ltr" class="mw-content-ltr"><div class="mw-category">/, | |
/(.|[\r\n])+\(next page\)<div lang="en" dir="ltr" class="mw-content-ltr"><h3>.+<\/h3>/, | |
/<\/div><\/div><\/div>(.|[\r\n])+/, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.List | |
import Data.List.Split | |
import Data.Function | |
import Text.Read | |
data Player = White | Black deriving (Eq, Ord) | |
instance Show Player where | |
show White = "w" | |
show Black = "b" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Enter your first name:</title> | |
<style> | |
#name { | |
cursor: text; | |
border: 1px solid black; | |
width: 20em; |
NewerOlder