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
read.qualtrics.csv <- function(filename, stringsAsFactors = FALSE, ...) { | |
n <- read.csv(filename, nrows = 1, stringsAsFactors = FALSE) | |
dat <- read.csv(filename, header = FALSE, skip = 2, stringsAsFactors = stringsAsFactors, ...) | |
names(dat) <- names(n) | |
names(dat)[1:10] <- n[1,1:10] | |
for(i in seq_along(dat)) { | |
attr(dat[,i], "question") <- n[1,i] | |
} | |
dat | |
} |
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 | |
for i in `find . -name "*.png"`; do | |
pngcrush -e .png2 -rem allb -brute -reduce $i | |
mv ${i}2 $i | |
optipng -o7 $i | |
done |
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
import ctypes, sys | |
from ctypes import windll, wintypes | |
from uuid import UUID | |
class GUID(ctypes.Structure): # [1] | |
_fields_ = [ | |
("Data1", wintypes.DWORD), | |
("Data2", wintypes.WORD), | |
("Data3", wintypes.WORD), | |
("Data4", wintypes.BYTE * 8) |