View Mastermind.hs
module Mastermind | |
where | |
import System.Random | |
import Text.Read | |
import Data.Maybe | |
import Data.Char | |
data Color = Red | Green | Blue | Yellow | Brown | Orange | Black | White deriving (Show, Read, Eq, Ord, Bounded, Enum) |
View remove_sim_dups.py
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
from subprocess import Popen, PIPE | |
from subprocess import call | |
p = Popen(["xcrun","simctl","list","devices"], stdin=PIPE, stdout=PIPE, stderr=PIPE) | |
output, err = p.communicate(b"input data that is passed to subprocess' stdin") |