Skip to content

Instantly share code, notes, and snippets.

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

Andreas Raster rakete

🏠
Working from home
View GitHub Profile
@rakete
rakete / xxd.py
Created November 22, 2016 17:52
xxd -i like c include generator written in python
# -*- coding: utf-8 -*-
import os.path
import string
import sys
def xxd(file_path):
with open(file_path, 'r') as f:
array_name = file_path.replace('/','_').replace('.','_')
output = "unsigned char %s[] = {" % array_name
length = 0
@rakete
rakete / hylint.py
Created November 25, 2014 01:20
hack to make pylint work with hy-lang
#!/usr/bin/python2.7
import ast
from hy.lex import LexException, PrematureEndOfInput, tokenize
from hy.compiler import hy_compile, HyTypeError
import astroid.builder