View String+BusStopExpansion.swift
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
extension String { | |
func expandName() -> String { | |
return self | |
.replacingOccurrences(of: "\\bA'space\\b", with: "Aerospace", options: [.regularExpression, .caseInsensitive]) | |
.replacingOccurrences(of: "\\bAbly\\b", with: "Assembly", options: [.regularExpression, .caseInsensitive]) | |
.replacingOccurrences(of: "\\bAc\\b", with: "Academy", options: [.regularExpression, .caseInsensitive]) | |
.replacingOccurrences(of: "\\bAcad\\b", with: "Academy", options: [.regularExpression, .caseInsensitive]) | |
.replacingOccurrences(of: "\\bAdm\\b", with: "Administration", options: [.regularExpression, .caseInsensitive]) | |
.replacingOccurrences(of: "\\bAdvent\\b", with: "Adventist", options: [.regularExpression, .caseInsensitive]) | |
.replacingOccurrences(of: "\\bAft\\b", with: "After", options: [.regularExpression, .caseInsensitive]) |
View gist:3c4d18f1daa78d998033a941b8b63ea6
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
BEGIN MESSAGE. | |
JxWsewwrF3WILTu CYwMPLwepNZO1ys z5jO2kz4xtBPw7b bBHcUeZeDOzv1ht | |
pQRgp1LK5NRFbHJ mTz1u0r8zhMTCKq 6Xr2MZHgg6vrbB1 ux5fNfAEFaPXX3r | |
n48ThImoIRqor5B W5M9WQFw4BRqX1b GrXY7JAxcxwjAGe zJ9krJCSmfOCGOZ | |
IR3JBrzTyUFobCl x2AEcoMOuoCz6ud YSDIo35rUfoivKf lUmQA7jh. | |
END MESSAGE. |
View TflStopPoint.swift
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
public typealias TfLStopPoint = [TfLStopPointElement] | |
public class TfLStopPointElement: Codable { | |
public let naptanId: String? | |
public let platformName: String? | |
public let indicator: String? | |
public let stopLetter: String? | |
public let modes: [String]? | |
public let icsCode: String? |
View BusStops.json
This file has been truncated, but you can view the full file.
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
{ | |
"value" : [ | |
{ | |
"Latitude" : 1.3837640285491943, | |
"Description" : "BT PANJANG TEMP BUS PK", | |
"Longitude" : 103.75830078125, | |
"RoadName" : "Woodlands Rd", | |
"BusStopCode" : "00481" | |
}, |
View feed.json
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
--- | |
sitemap: false | |
--- | |
{ | |
"version": "https://jsonfeed.org/version/1", | |
"title": "{{ site.title }}", | |
"home_page_url": "{{ site.url }}/", | |
"feed_url": "{{ site.url }}/feed.json", |
View ia.xml
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
--- | |
layout: null | |
--- | |
<?xml version="1.0" encoding="UTF-8"?> | |
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"> | |
<channel> | |
<title>{{ site.name | xml_escape }}</title> | |
<link>{{ site.url }}</link> | |
<description> |
View Collatz.playground
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 UIKit | |
//: # The Collatz Conjecture | |
//: *This process will eventually reach the number 1, regardless of which positive integer is chosen initially. (See [Wikipedia](https://en.wikipedia.org/wiki/Collatz_conjecture).)* | |
//: \ | |
//: Create an array to capture the sequence of numbers returned by the `collatz` function. | |
var sequence = [Int]() | |
//: The `collatz(start:Int, initial:Bool) -> [Int]` function takes an integer and will perform the following: | |
//:- if the integer (`n`) is 1, it will return an `[Int]` array. |
View keybase.md
Keybase proof
I hereby claim:
- I am stuartbreckenridge on github.
- I am sgb (https://keybase.io/sgb) on keybase.
- I have a public key ASBRWJ1N53LHzhy1uzkmVvvq-ZuK-UJoiZ4ktkWZOe6xcwo
To claim this, I am signing this object:
View INRConversions.swift
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
class UnitIndianCurrency:Dimension { | |
static let rupees = UnitIndianCurrency(symbol: "rupees", converter: UnitConverterLinear(coefficient: 1.0)) | |
static let hazar = UnitIndianCurrency(symbol: "hazar", converter: UnitConverterLinear(coefficient: 1000.0)) | |
static let lahk = UnitIndianCurrency(symbol: "lahk", converter: UnitConverterLinear(coefficient: 100000.0)) | |
static let crore = UnitIndianCurrency(symbol: "crore", converter: UnitConverterLinear(coefficient: 10000000.0)) | |
static let arab = UnitIndianCurrency(symbol: "arab", converter: UnitConverterLinear(coefficient: 1000000000.0)) |
NewerOlder