This file contains hidden or 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
| .,.,.,.,O,.,Y,.,.,.,O,.,.,.,O,.,.,.,.,., | |
| .,.,O,.,.,.,.,O,.,.,O,Y,.,.,.,.,.,.,O,., | |
| O,.,.,.,.,.,.,.,.,.,.,.,.,O,.,.,O,.,.,O, | |
| .,.,O,Y,.,O,.,.,.,.,.,.,Y,.,.,.,.,Y,.,., | |
| .,.,.,.,.,.,.,.,.,.,.,O,.,.,.,.,.,.,.,., | |
| O,O,.,.,.,.,.,O,.,O,.,.,.,.,.,.,O,O,.,O, | |
| .,.,.,.,.,O,.,.,.,.,.,.,O,.,.,.,.,.,.,O, | |
| .,.,O,.,.,.,.,O,.,.,O,.,.,.,.,.,O,.,Y,., | |
| .,.,Y,.,.,.,.,O,Y,.,.,.,O,.,.,.,.,.,O,., | |
| O,.,.,.,.,.,.,.,.,.,.,.,.,.,O,.,.,.,.,., |
This file contains hidden or 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
| // | |
| // LocalImageProvider.swift | |
| // Countdown | |
| // | |
| // Created by Richard Robinson on 2020-08-26. | |
| // | |
| import Foundation | |
| import PhotosUI | |
| import SwiftUI |
This file contains hidden or 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 | |
| import os | |
| import pandas | |
| import regex as regex | |
| from matplotlib import pyplot | |
| colors = ['tab:purple', 'tab:blue'] | |
This file contains hidden or 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 NaturalLanguage | |
| extension String { | |
| /// Extracts the substrings of this string which match any of the specified `partsOfSpeech` | |
| /// | |
| /// For example, | |
| /// | |
| /// let string = "John's anniversary in Greece" | |
| /// let filtered = string.filter(by: [.noun, .placeName]) // ["anniversary", "Greece"] | |
| /// |
This file contains hidden or 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
| // | |
| // EmojiModel.swift | |
| // Countdown | |
| // | |
| // Created by Richard Robinson on 2020-07-31. | |
| // | |
| import Foundation | |
| fileprivate let emojiCategories = [ |
This file contains hidden or 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
| // | |
| // CardView2.swift | |
| // Hourglass | |
| // | |
| // Created by Richard Robinson on 2020-07-21. | |
| // | |
| import Foundation | |
| import SwiftUI |
This file contains hidden or 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
| /// An implementation of `ProgressView` built in SwiftUI | |
| struct ProgressViewSUI<Progress>: View where Progress: BinaryFloatingPoint { | |
| var value: Progress | |
| var body: some View { | |
| GeometryReader { geometry in | |
| ZStack(alignment: .leading) { | |
| Capsule() | |
| .foregroundColor(.gray) | |
| .opacity(0.3) |
This file contains hidden or 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
| /// A view representing a dynamically moving fluid with a quadrilateral | |
| /// - Invariant: The area of the view is exactly equal to the area of the rectangle of the parent view times `percentFilled` | |
| struct FluidView: Shape { | |
| var angle: CGFloat = 0.0 | |
| var percentFilled: CGFloat = 0 | |
| var animatableData: CGFloat { | |
| get { angle } | |
| set { self.angle = newValue } | |
| } |
This file contains hidden or 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
| // | |
| // Playground.swift | |
| // Hourglass | |
| // | |
| // Created by Richard Robinson on 2020-07-06. | |
| // | |
| import Foundation | |
| import SwiftUI | |
| import PlaygroundSupport |
This file contains hidden or 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
| package com.richardrobinson; | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.lang.annotation.*; | |
| import java.util.HashMap; | |
| import java.util.List; | |
| import java.util.Map; | |
| import java.util.function.Function; | |
| import java.util.stream.Stream; |