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
# Take r, g and b channels from separate images. Python randomises the list for extra fun. | |
from PIL import Image | |
import os, math, sys, random | |
os.chdir(sys.argv[1]) | |
fileList = os.listdir(".") | |
random.shuffle(fileList) | |
(width, height) = Image.open(fileList[0]).size | |
nPhotos = len(fileList) | |
dst = Image.new("RGB", (width, height)) | |
fileNum = 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
<html> | |
<head> | |
<title>Templatefile</title> | |
<style type="text/css"> | |
body {margin-left: 4%; margin-right: 4%; background-color: #000;} | |
p {text-indent: 1.5em} | |
p.c1 {text-align: center} | |
p.c2 {color: #0D0; font-family: fixedsys, monopoint, terminal} | |
h1.c1 {color: #0D0; font-family: fixedsys, monopoint, terminal} | |
h2.mid {margin-top: 3em; margin-bottom:.4em; text-align:center} |
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
import os, sys, re, shutil | |
from os.path import join | |
os.chdir(sys.argv[1]) | |
# Walk the directory structure looking for folders/files with a ":" in the name | |
for root, subfolders, files in os.walk('.'): | |
for foldername in subfolders: | |
if re.search(":",foldername,re.IGNORECASE): | |
print "Renaming ", foldername , " -> ", foldername.replace(":","-") |
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
<?php | |
function checkName($fname) | |
{ | |
if ($fname == "20031128ab.jpg") | |
return "20031128.jpg"; | |
return $fname; | |
} | |
function checkPath($pathToImages, $fname) | |
{ |
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
<?php | |
print dirname(__FILE__).'\n'; | |
function mk($path){ | |
print 'tpath = ' .$path . '\n'; | |
if (!file_exists($path)) | |
if (mkdir($path, 0777)) | |
print 'Success!\n'; | |
else | |
print 'Fail!\n'; | |
} |
NewerOlder