Skip to content

Instantly share code, notes, and snippets.

View rakete's full-sized avatar
🐢
Turtle

Andreas Raster rakete

🐢
Turtle
View GitHub Profile
@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
@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