Skip to content

Instantly share code, notes, and snippets.

Sven A. Schmidt finestructure

Block or report user

Report or block finestructure

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View NetNewsWire-downloads.yml
# Run with Rester:
url: ${BASE_URL}/releases
# If you're getting rate limited by the Github API, run this
# restfile with a Github token.
# Uncomment the line starting with "Authorization:" below and
View gist:8b3e757d528252c59a8047c43cf12a97
! ◰³ james ~/P/E/james ⎇ develop *$- backend pytest tests/
=========================================================================================================================== test session starts ===========================================================================================================================
platform darwin -- Python 3.7.2, pytest-4.6.2, py-1.8.0, pluggy-0.12.0
Django settings: test_settings (from ini file)
rootdir: /Users/sas/Projects/Enervolution/james/backend, inifile: setup.cfg
plugins: django-3.5.0
collected 1 item
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB set_trace (IO
finestructure / OrderedDict.swift
Last active May 21, 2019
Swift ordered dictionary
View OrderedDict.swift
import Foundation
struct OrderedDictionary<K: Hashable, V> {
var keys: [K] = []
var dict: [K: V] = [:]
var count: Int {
assert(keys.count == dict.count, "internal inconsistency")
return keys.count
View LinuxTesting.swift
// Add a marker protocol to allow for new TestCase subclasses to be
// picked up automatically by adopting it.
protocol LinuxTesting {}
// Extend XCTestCase to conform
extension XCTestCase: LinuxTesting {}
finestructure / LinuxMain.stencil
Last active Nov 28, 2018
Stencil file to autogenerate swift package manager linux tests with Sourcery
View LinuxMain.stencil
import XCTest
{{ argument.testimports }}
// swiftlint:disable trailing_comma
{% for type in types.classes|based:"XCTestCase" %}
{% if not type.annotations.disableTests %}extension {{ }} {
static var allTests: [(String, ({{ }}) -> () throws -> Void)] = [
{% for method in type.methods %}
{% if method.parameters.count == 0 and method.shortName|hasPrefix:"test" %}

Keybase proof

I hereby claim:

  • I am finestructure on github.
  • I am finestructure ( on keybase.
  • I have a public key whose fingerprint is 215B 3D32 5FF1 5AA4 4EB9 843E A138 F568 B059 543D

To claim this, I am signing this object:

finestructure / pre-commit
Created Oct 21, 2018
pre-commit hook to generate LinuxMain.swift via Sourcery
View pre-commit
./ &>/dev/null
if [[ -n $(git diff) ]]; then
echo "Linux tests were out of date."
echo "Files have been updated, please review add them to the commit."
exit 1
finestructure / Error.swift
Created Aug 2, 2016
posix_spawn based system call (swift 3.0-p1-ish, WIP)
View Error.swift
This source file is part of the open source project
Copyright 2015 - 2016 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception
See for license information
See for Swift project authors
finestructure / randomized_response.ipynb
Created Jun 20, 2016 — forked from uncommoncode/randomized_response.ipynb
Randomized Response Function for Differential Privacy
View randomized_response.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View SmartPointer.swift
public final class SmartPointer<T> {
public let pointer: UnsafeMutablePointer<T>
private let destructor: (UnsafeMutablePointer<T>) -> Void
public init(pointer: UnsafeMutablePointer<T>, destructor: (UnsafeMutablePointer<T>) -> Void) {
self.pointer = pointer
self.destructor = destructor
deinit {
You can’t perform that action at this time.