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
# | |
# = Pickr - A Gallery tool for Photographers | |
# These classes represent are an abstration away from the Flickr API. | |
# They provide methods for creating a gallery of photos for selecting | |
# and submitting to the photographer. | |
# | |
require 'rubygems' | |
require 'flickraw-cached' | |
require 'yaml' |
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 | |
require_once(dirname(__FILE__) . "/phpFlickr/phpFlickr.php"); | |
require_once(dirname(__FILE__) . "/config.inc.php"); | |
define("API_KEY", $config['flickr_api_key']); | |
define("USER_ID", $config['user_id']); | |
define("FLICKR_PHOTO_URL", "http://www.flickr.com/photos"); | |
define("FLICKR_STATIC_URL", "http://farm5.static.flickr.com"); | |
define("PRIMARY_PHOTO_CACHE", $config['primary_photo_cache']); |
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
# | |
# = Pickr - A Gallery tool for Photographers | |
# These classes represent are an abstration away from the Flickr API. | |
# They provide methods for creating a gallery of photos for selecting | |
# and submitting to the photographer. | |
# | |
import yaml | |
import json | |
import flickrapi |
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
def is_in(val, list): | |
for item in list: | |
if item == val: | |
return True | |
return False | |
print is_in(1, [1, 2, 3]) # True | |
print is_in(5, [1, 2, 3]) # False | |
if is_in('r', ['r', 'R', 'rand', 'random', 'Rand', 'Random']): |
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 random | |
class Friend: | |
def __init__(self, name, age=False): | |
self.name = name | |
if not age or age == True: | |
self.age = random.randint(1, 100) | |
else: | |
self.age = age |
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
class Point: | |
def __init__(self, x, y): | |
self.x = x | |
self.y = y | |
Point(1, 2) | |
Point(3, 4) |
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
#!/bin/bash | |
DEBUG=-vvv | |
# (0=pal, 1=ntsc, 2=secam, 3=pal nc, 4=pal m, 5= pal n, 6=ntsc jp) | |
NORM=1 | |
WIDTH=320 | |
HEIGHT=240 | |
SCALE=1 | |
FPS=23.976 |
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/perl | |
use strict; | |
use warnings; | |
# Description: Converts given English text into Pig Latin | |
# Delon Newman <[email protected]> Copyright (C) 2007 | |
$/=""; | |
my $text = <>; | |
translate(\$text, create_dictionary($text)); |
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
require 'rubygems' | |
require 'sinatra' | |
require 'sinatra_warden' | |
require 'warden' | |
require 'rack/flash' | |
require 'haml' | |
User = Struct.new(:id, :name, :email) |
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/perl -wT | |
#-*- Mode: perl; -*- | |
######################################################################## | |
# | |
# Description: | |
# This is a front end for Original v0.3 written by Jimmac & Tigert. | |
# It can be used with mod_perl or just drop it in your cgi-bin | |
# directory. | |
# | |
# Type "perldoc image_viewer.pl" at your command line for more info. |