Skip to content

Instantly share code, notes, and snippets.

Vincent Esche regexident

  • Berlin, Germany
View GitHub Profile
@regexident
regexident / wifi-field
Created Apr 21, 2020 — forked from fredo-dedup/wifi-field
Calculating WIFI propagation with IJulia
View wifi-field
{
"metadata": {
"language": "Julia",
"name": "WIFI simulation"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
View Good-CONTRIBUTING.md-template.md

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@regexident
regexident / Perceptron.swift
Created May 31, 2018
Perceptron Algorithm
View Perceptron.swift
//: Playground - noun: a place where people can play
import Cocoa
struct Vector {
let x: Float
let y: Float
let z: Float
static func *(lhs: Vector, rhs: Float) -> Vector {
@regexident
regexident / inherit.rs
Created Jan 17, 2018 — forked from kyleheadley/inherit.rs
A model for trait-based inheritance in Rust
View inherit.rs
//! Demo of static "inheritance"
//!
//! Use trait objects to get dynamic inheritance,
//! but casting to a subtype is not explored here
////////////////////////////////////////////////////////
// Define Base type, interface, and what is overloadable
////////////////////////////////////////////////////////
/// The main type that will be extended
@regexident
regexident / analytic_wfm.py
Created Jan 12, 2018 — forked from sixtenbe/analytic_wfm.py
Peak detection in Python
View analytic_wfm.py
#!/usr/bin/python2
# Copyright (C) 2016 Sixten Bergman
# License WTFPL
#
# This program is free software. It comes without any warranty, to the extent
# permitted by applicable law.
# You can redistribute it and/or modify it under the terms of the Do What The
# Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See
@regexident
regexident / GenericsManifesto.md
Created Nov 14, 2017
Draft for extended section on generic protocols in Swift Raw
View GenericsManifesto.md

Generic protocols

One of the most commonly requested features is the ability to parameterize protocols themselves. For example, a protocol that indicates that the Self type can be constructed from some specified type T or converted into T:

// T -> Self:
protocol ConstructibleFrom<T> {
  init(from value: T)
}
@regexident
regexident / swift-format.swift
Created Oct 27, 2017 — forked from harlanhaskins/swift-format.swift
Simple Swift Formatter using SwiftSyntax
View swift-format.swift
import Foundation
import SwiftSyntax
func main() throws {
guard CommandLine.arguments.count > 1 else {
print("usage: swift-format [file]")
exit(-1)
}
let url = URL(fileURLWithPath: CommandLine.arguments[1])
@regexident
regexident / swift-responder-chain.swift
Created Oct 5, 2017 — forked from anandabits/swift-responder-chain.swift
A minimalist responder chain implemented in pure Swift
View swift-responder-chain.swift
// Created by Matthew Johnson on 5/28/16.
// Copyright © 2016 Anandabits LLC. All rights reserved.
//
// This is a minimalist implementation of a responder chain in pure Swift.
//
// It is not intended to demonstrate the best way to
// implement event processing in Swift.
//
// The intent is to show how little code is necessary to acheive behavior
// similar to Cocoa's responder chain in pure Swift.
@regexident
regexident / String+Hyphenation.swift
Created Sep 27, 2017 — forked from frankrausch/String+Hyphenation.swift
Returns a String with soft hyphens (U+00AD)
View String+Hyphenation.swift
import Foundation
extension String {
func hyphenated(languageCode: String) -> String {
let locale = Locale(identifier: languageCode)
return self.hyphenated(locale: locale)
}
func hyphenated(locale: Locale) -> String {
@regexident
regexident / tomono.sh
Created Jun 12, 2017 — forked from eisisig/tomono.sh
convert multiple repos to monorepo
View tomono.sh
#!/bin/bash
# Merge multiple repositories into one big monorepo. Migrates every branch in
# every subrepo to the eponymous branch in the monorepo, with all files
# (including in the history) rewritten to live under a subdirectory.
#
# To use a separate temporary directory while migrating, set the GIT_TMPDIR
# envvar.
#
# To access the individual functions instead of executing main, source this
You can’t perform that action at this time.