Skip to content

Instantly share code, notes, and snippets.

View sseg's full-sized avatar
:shipit:
Cutting scope

Steven Seguin sseg

:shipit:
Cutting scope
View GitHub Profile
@sseg
sseg / SketchSystems.spec
Last active August 17, 2020 20:35
Login Form*
Login Form*
Email--Empty*
Email--Value Error
Email--Unknown ID Error
Other Error
Input Email -> Email?
Sign In Social -> Sign In Social
Sign In SSO -> Sign In SSO
@sseg
sseg / SketchSystems.spec
Last active June 22, 2020 18:09
Login Form&
Login Form&
Email Field
typing identifier -> Login--With Input
clear input -> Login--Empty
click sign-up -> Sign-Up
click recover -> Forgot Password
click login options -> Social Logins
Login--Empty*
click next -> Login--Invalid
@sseg
sseg / typed_enum.py
Created March 18, 2019 00:43
Typed enum with case matching on types.
# coding: utf-8
import abc
from types import new_class
from typeguard import check_type
from contextlib import contextmanager
def make_type_class(name, parent, type_declaration):
def init(self, value):
@sseg
sseg / commit.md
Last active May 17, 2017 20:29 — forked from abravalheri/commit.md
RFC: Git Commit Message Guidelines

Commit Message Guidelines

In the last few yers, the number of programmers concerned about writting structured commit messages had dramatically grown. As exposed by Tim Pope in article readable commit messages are easy to follow when looking through the project history. Moreover the AngularJS contributing guides introduced conventions that can be used by automation tools to automatically generate useful documentation, or by developpers during debbuging process.

This document borrow some concepts, conventions and even text mainly from these two sources, extending them in order to provide a sensible guideline for writing commit messages.

Keybase proof

I hereby claim:

  • I am sseg on github.
  • I am sseg (https://keybase.io/sseg) on keybase.
  • I have a public key whose fingerprint is CD9B 9CA3 4B00 4B40 45C9 97B1 549C 2ECC 2F60 1B96

To claim this, I am signing this object:

@sseg
sseg / flattener
Created May 11, 2015 15:49
Flatten nested iterators of (nearly) arbitrary depth in Python 3.3+
def flattener(Xs):
"""flattener takes an object, Xs, which if iterable is recursively flattened
yielding non-iterable objects, subject to any maximum recursion depth limits
"""
if hasattr(Xs, "__iter__"):
for x in Xs:
yield from flattener(x)
else:
yield Xs