Skip to content

Instantly share code, notes, and snippets.

View dyno's full-sized avatar
🏠
Working from home

Dyno Fu dyno

🏠
Working from home
View GitHub Profile
@dyno
dyno / README.md
Created November 4, 2021 18:03 — forked from davideicardi/README.md
Write and read Avro records from bytes array

Avro serialization

There are 4 possible serialization format when using avro:

@dyno
dyno / pyconindia_dsl.py
Created October 20, 2020 23:26 — forked from siddhi/pyconindia_dsl.py
Domain Specific Languages in Python - Pycon India - 17 Sep 2011
from pyparsing import *
# By default, PyParsing treats \n as whitespace and ignores it
# In our grammer, \n is significant, so tell PyParsing not to ignore it
ParserElement.setDefaultWhitespaceChars(" \t")
def parse(input_string):
def convert_prop_to_dict(tokens):
"""Convert a list of field property tokens to a dict"""
prop_dict = {}
# Uncrustify 0.59
#
# General options
#
# The type of line endings
newlines = auto # auto/lf/crlf/cr
# The original size of tabs in the input