Skip to content

Instantly share code, notes, and snippets.

@aristofor
aristofor / dxl-init.py
Last active August 29, 2015 14:17
pypot dynamixel actuator brute setup
#!/usr/bin/env python
# coding: utf-8
"""
Reset un dynamixel et lui affecte un nouvel id,
Mode d'emploi:
Connecter un actuateur unique est sur le bus dynamixel et lancer:
$ ./dxl-init.py 42
Le moteur porte maintenant le n°42 et répond à la poppy-vitesse de 1000000 bauds,
@aristofor
aristofor / poppy-sim.py
Last active August 29, 2015 14:16
Crée un poppy dans v-rep et lance un shell interactif IPython
#!/usr/bin/env python
# coding: utf-8
"""
V-REP Simulation / iPython launcher
"""
from pip.util import get_installed_distributions
from IPython.config.loader import Config as ipConfig
from IPython.terminal.embed import InteractiveShellEmbed
import re
@aristofor
aristofor / aes_cbc.py
Created July 8, 2012 07:06
Raccourcis AES-CBC +padding
# coding: utf-8
u"""
Raccourcis AES-CBC avec padding
Résumé:
>>> key = 'mon_petit_secret' # longueur 16, 24 ou 32 (v. ci après)
>>> clear = 'texte clair'
>>> crypt = encrypt(key, clear) # crypt : texte crypté, bytearray
@aristofor
aristofor / makefile
Created June 28, 2012 10:22
custom bootstrap makefile
# makefile pour thème bootstrap personnalisé
#
# usage dans un makefile supérieur:
# $(MAKE) ${MAKEFLAGS} BUILD_DIR=${BUILD_DIR}/theme BOOTSTRAP_SOURCE=${BOOTSTRAP_SOURCE}
# ou dans ce makefile:
# BUILD_DIR=./build
# BOOTSTRAP_SOURCE=${HOME}/src/bootstrap
#
# bootstrap 2.1.0-wip utilise normalement `recess`
# `lessc` permet de surcharger localement des .less (option "--include-path")