Skip to content

Instantly share code, notes, and snippets.

View jcampbell05's full-sized avatar

James Campbell jcampbell05

View GitHub Profile
{"builtAt":1615402727996,"hash":"f9b99f58d76022c89b6f","assets":[{"name":"pspdfkit-lib/pspdfkit-19c54b038c78d85e.asm.js","size":28632026},{"name":"pspdfkit-lib/pspdfkit-74523b27dc57fc4a.wasm","size":10181138},{"name":"pspdfkit-lib/pspdfkit-dbfa2e3ca653925b.asm.js.mem","size":2570294},{"name":"pspdfkit.js","size":1293902},{"name":"pspdfkit-lib/pspdfkit-467b43e7cdf14d16.wasm.js","size":697577},{"name":"4883.js","size":604324},{"name":"pspdfkit-lib/chunk-standalone-607dcdb35024212d.js","size":226654},{"name":"pspdfkit-lib/pspdfkit.css","size":174102},{"name":"Core.worker.worker.js","size":171311},{"name":"pspdfkit-lib/chunk-6050-3de2ffac98000ec3.js","size":59555},{"name":"pspdfkit-lib/chunk-server-instant-64059c691766b918.js","size":33091},{"name":"pspdfkit-lib/chunk-server-4d8732837cceb7d8.js","size":28211},{"name":"pspdfkit-lib/dark-6d367b09a96cabd0.css","size":23850},{"name":"pspdfkit-lib/chunk-959-c129686ea643b3ac.js","size":22209},{"name":"pspdfkit-lib/chunk-7825-6e8b2c60574af99c.js","size":20077},{"name":"
{"builtAt":1615402727996,"hash":"f9b99f58d76022c89b6f","assets":[{"name":"pspdfkit-lib/pspdfkit-19c54b038c78d85e.asm.js","size":28632026},{"name":"pspdfkit-lib/pspdfkit-74523b27dc57fc4a.wasm","size":10181138},{"name":"pspdfkit-lib/pspdfkit-dbfa2e3ca653925b.asm.js.mem","size":2570294},{"name":"pspdfkit.js","size":1293902},{"name":"pspdfkit-lib/pspdfkit-467b43e7cdf14d16.wasm.js","size":697577},{"name":"4883.js","size":604324},{"name":"pspdfkit-lib/chunk-standalone-607dcdb35024212d.js","size":226654},{"name":"pspdfkit-lib/pspdfkit.css","size":174102},{"name":"Core.worker.worker.js","size":171311},{"name":"pspdfkit-lib/chunk-6050-3de2ffac98000ec3.js","size":59555},{"name":"pspdfkit-lib/chunk-server-instant-64059c691766b918.js","size":33091},{"name":"pspdfkit-lib/chunk-server-4d8732837cceb7d8.js","size":28211},{"name":"pspdfkit-lib/dark-6d367b09a96cabd0.css","size":23850},{"name":"pspdfkit-lib/chunk-959-c129686ea643b3ac.js","size":22209},{"name":"pspdfkit-lib/chunk-7825-6e8b2c60574af99c.js","size":20077},{"name":"
import UIKit
protocol Sortable {}
extension Sequence where Element: Sortable {
func sort(_ groups: [AnyComparableKeypath<Self.Element>]) -> [Self.Element] {
return self.sorted {
lhs, rhs in
import UIKit
protocol Sortable {}
extension Sequence where Element: Sortable {
func sorted<Q>(byKeys keys: [KeyPath<Element, Q>]) -> [Element] where Q: Hashable & Comparable {
guard let key = keys.first else {
return self as! [Self.Element]
import Foundation
import Combine
import OpenCombine
enum CombineIdentifierWrapper {
@available(iOS 13.0, *)
case combine(Combine.CombineIdentifier)
case open(OpenCombine.CombineIdentifier)
//
// main.swift
// StructSize
//
// Created by James Campbell on 20/04/2020.
// Copyright © 2020 James Campbell. All rights reserved.
//
import Foundation
import AppKit
import calendar
import csv
import datetime
import dateutil.parser
import json
from dateutil.relativedelta import *
from dateutil.rrule import rrule, MONTHLY, YEARLY
from urllib import request
from urllib.parse import urlencode
import calendar
import csv
import datetime
import dateutil.parser
import json
from dateutil.rrule import rrule, MONTHLY, YEARLY
from urllib import request
from urllib.parse import urlencode
base_url = "https://www.performance.service.gov.uk/data/register-to-vote/volumetrics"
# Train Score System
This document is to serve as a measurable way of determining the level of service
a train operator has. By creating a tangiable and open way of scruitinising these
companies it is hoped that especially in the UK, service levels will improve.
## Levels
These are the levels that train companies can achieve:
PO_EDITOR_BASE_LANGUAGE = 'en'
PO_EDITOR_LANGUAGES = ['en', 'fr', 'es', 'pt'].freeze
def export_translations
poeditor_export(
api_token: PO_EDITOR_API_TOKEN,
project_id: PO_EDITOR_PROJECT_ID,
export_format: 'apple_strings',
language: PO_EDITOR_BASE_LANGUAGE,
output_path: "Sup/Base.lproj/Localizable.strings"