A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
| #!/bin/sh | |
| ### | |
| # SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
| # For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
| ### | |
| # Alot of these configs have been taken from the various places | |
| # on the web, most from here | |
| # https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
| import os | |
| import sys | |
| import traceback | |
| from functools import wraps | |
| from multiprocessing import Process, Queue | |
| def processify(func): | |
| '''Decorator to run a function as a process. | |
| Be sure that every argument and the return value |
| *.pyc | |
| /bin | |
| /include | |
| /lib |
The goal of this example is to show how an existing C codebase for numerical computing (here c_code.c) can be wrapped in Cython to be exposed in Python.
The meat of the example is that the data is allocated in C, but exposed in Python without a copy using the PyArray_SimpleNewFromData numpy
| # Enable tab completion | |
| import rlcompleter | |
| import pdb | |
| pdb.Pdb.complete = rlcompleter.Completer(locals()).complete | |
| # Sometimes when you do something funky, you may lose your terminal echo. This | |
| # should restore it when spanwning new pdb. | |
| import termios, sys | |
| termios_fd = sys.stdin.fileno() | |
| termios_echo = termios.tcgetattr(termios_fd) |
| /* | |
| --- | |
| name: guilloche | |
| script: guilloche.js | |
| description: guilloche | |
| provides: [Guilloche] | |
| ... | |
| */ |