This file contains 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 python2.7 | |
import argparse | |
import pyPdf | |
import os | |
import os.path | |
def _main(): | |
parser = argparse.ArgumentParser(description='rename PDF files') | |
parser.add_argument('pdf', nargs='+', type=argparse.FileType('rb')) |
This file contains 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
-- Put at "~/Library/Scripts/iChat" | |
on showgrowl(theNotify, theImage, theTitle, theMessage) | |
tell application "Growl" | |
-- Make a list of all the notification types | |
-- that this script will ever send: | |
set the allNotificationsList to ¬ | |
{"Login", "Logout", "Present", "Text Message", "Invitation"} | |
-- Make a list of the notifications |
This file contains 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
=== modified file 'lisp/term/ns-win.el' | |
--- lisp/term/ns-win.el 2012-02-25 10:04:30 +0000 | |
+++ lisp/term/ns-win.el 2012-05-17 06:21:33 +0000 | |
@@ -533,6 +533,12 @@ | |
(interactive) | |
(ns-hide-others)) | |
+(declare-function ns-fullscreen-toggle-cocoa "nsfns.m" ()) | |
+ | |
+(defun ns-fullscreen-toggle () |
This file contains 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 | |
import argparse | |
import os | |
import subprocess | |
import shlex | |
import sys | |
def _main(): | |
""" |
This file contains 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
library(lattice) | |
gridensityplot <- function(...) { | |
densityplot(..., panel=function(...) { | |
panel.grid(h=-1, v=-1) | |
panel.densityplot(...) | |
}) | |
} |
This file contains 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
library(lattice) | |
library(gregmisc) | |
myxyplot <- function(x, y, | |
xlab=deparse(substitute(x)), | |
ylab=deparse(substitute(y)), | |
xlim, | |
ylim, | |
nbins=c(50, 50), alpha=0.05, func=function(x){x}, sub="", heat.map=T) { | |
c <- cor.test(x, y) |
This file contains 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 | |
import argparse | |
import sys | |
import itertools | |
def _main(): | |
parser = argparse.ArgumentParser(description='Transpose text array') | |
parser.add_argument('input', default=sys.stdin, nargs='?', type=argparse.FileType('r')) | |
parser.add_argument('output', default=sys.stdout, nargs='?', type=argparse.FileType('r')) |
This file contains 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
library(lattice) | |
mybwplot <- function(x, y, interval=0.2, ylab=deparse(substitute(y)), xlab=deparse(substitute(x)), main="", sub="") { | |
bwplot(y ~ factor(trunc(x/interval)*interval), xlab=xlab, ylab=ylab, main=main, sub=sub, | |
panel=function(...){ | |
panel.grid(h=-1, v=0) | |
panel.bwplot(...) | |
}, scales=list(rot=c(45,0))) | |
} |
This file contains 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
on showgrowl(theNotify, theImage, theTitle, theMessage) | |
tell application "Growl" | |
-- Make a list of all the notification types | |
-- that this script will ever send: | |
set the allNotificationsList to ¬ | |
{"Login", "Logout", "Present", "Text Message", "Invitation"} | |
-- Make a list of the notifications | |
-- that will be enabled by default. | |
-- Those not enabled by default can be enabled later |
This file contains 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 | |
import argparse | |
import os | |
import os.path | |
import stat | |
def _main(): | |
parser = argparse.ArgumentParser(description='fix permission by suffix of filename and prefix of file') | |
parser.add_argument('dir', default='.', nargs='?', help='fix directory (default:%(default)s)') |