Skip to content

Instantly share code, notes, and snippets.


Christophe Benz cbenz

  • Paris, France
View GitHub Profile
cbenz / machine.js
Last active Jan 27, 2021
Generated by XState Viz:
View machine.js
// interface Player {
// name: string
// stack: number
// cards: Array<Card>
// bet: number
// }
const FLOP = "FLOP"
const TURN = "TURN"
cbenz / machine.js
Last active Jan 22, 2021
Generated by XState Viz:
View machine.js
id: 'game1',
initial: 'betting',
context: {
betAmount: 0,
counterValue: 0
states: {
betting: {
on: {
cbenz /
Last active Feb 22, 2017
Music Chords Charts in Elm - abstract of the talk

This talk is about music but is not restricted to musicians!

When playing an instrument in a jam session, musicians sometimes need to see the chords of the tune they are playing. A chords chart is a convenient way to represent a music tune as a table, containing chord names in "Jazz notation", but not music notes. Chords charts are scattered on forums, are static images most of the time, and there are many versions of which some are wrong.

These drawbacks led me to start the Open Chords Charts project. The backend is a centralized and collaborative database of chords charts. The frontend, written in Elm, allows to browse charts, add/edit them, fork other users charts, fix errors and make links between charts. I'll show some features such as changing the key in which the song is displayed – a killer feature for musicians who dislike to do the transformation in their head. The frontend is responsive and offline-first, so that musicians can build a set-list and follow the songs on their mobile phone while play

cbenz /
Last active May 11, 2016
Add cedillas to each char of a string
import unicodedata
def add_cedillas(text, cedilla = '̧'):
return unicodedata.normalize('NFC', ''.join(map(lambda char: char + cedilla, text)))
# => 'ţşşş'
# => 'f̧a̧çi̧ļȩ'
cbenz /
Last active Jan 12, 2016
Cantine Mirabeau

README is empty

# -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <>
# Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team
# This file is part of OpenFisca.