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 Foundation | |
import SwiftUI | |
public protocol CGSizePreferenceKey: PreferenceKey where Value == CGSize {} | |
public extension CGSizePreferenceKey { | |
static func reduce(value _: inout CGSize, nextValue: () -> CGSize) { | |
_ = nextValue() | |
} | |
} |
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
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) |
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
#!/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") |