This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (require 'whitespace) | |
| (defun python-tabs-transition () | |
| "Helpers to transition from tabbed Python files to non-tabbed" | |
| (interactive) | |
| (setq tab-width 4) | |
| (setq python-indent-offset 4) | |
| (make-local-variable 'whitespace-style) | |
| (setq whitespace-style '(tabs tab-mark face)) | |
| (whitespace-mode) | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # from http://stackoverflow.com/questions/1259873/how-can-i-use-emacs-flymake-mode-for-python-with-pyflakes-and-pylint-checking-cod | |
| # Put this in your $PATH! | |
| # Run pyflakes to find potential errors, treat results as errors | |
| pyflakes "$1" | |
| # Run pep8 for formatting, treat results as warnings | |
| pep8 --ignore=E101,E127,E128,E221,E701,E202,E501,E225,E261,W191,W293 --repeat "$1" | sed "s/[0-9]*: \([EW]\)/ Warning: \1/" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (* | |
| This script finds all pdf, tex, and ps files in your paper directory or subdirectories of that | |
| *) | |
| set start_time to current date | |
| set pubs_with_link to 0 | |
| set num_of_links to 0 | |
| set matchingFiles to {} | |
| set matchingKeys to {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """Randomize the text in one of Disan's tests""" | |
| import sys | |
| import random | |
| import re | |
| import argparse | |
| import ast |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """Code to fetch Gmail messages matching a particular pattern.""" | |
| """ | |
| Run: | |
| python -m imapclient.interact -H imap.gmail.com --ssl -P 993 | |
| Then in the interactive session, run: | |
| %run <this file> |