├── .gitignore ├── tag_cloud.mdb ├── DimSome ├── Icon.png ├── Icon-72.png ├── Icon@2x.png ├── DimSome │ ├── en.lproj │ │ └── InfoPlist.strings │ ├── AppDelegate.h │ ├── DimSome-Prefix.pch │ ├── main.m │ ├── AppDelegate.m │ └── DimSome-Info.plist ├── dimsome_114px_100.png ├── dimsome_57px_100.png ├── dimsome_72px_100.png ├── DimSome.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── kunal.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ ├── xcuserdata │ │ └── kunal.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── DimSome.xcscheme │ └── project.pbxproj └── Entitlements.plist ├── README ├── torrent.rb ├── wiki.rb ├── tube.rb ├── pixel_detection.py ├── stack_calculator.py ├── bash_profile.txt ├── primitive_memcached_locking.py ├── bdd.py ├── queue_using_stack.py ├── raj_catalog_page_slicer.jsx ├── quicksilver_scorer.py ├── anagram.py ├── itunes_script.py ├── amazon_api_test.cfm ├── ticketmaster_scraper.py └── tag_cloud.cfm /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /tag_cloud.mdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anandkunal/vakuum/master/tag_cloud.mdb -------------------------------------------------------------------------------- /DimSome/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anandkunal/vakuum/master/DimSome/Icon.png -------------------------------------------------------------------------------- /DimSome/Icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anandkunal/vakuum/master/DimSome/Icon-72.png -------------------------------------------------------------------------------- /DimSome/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anandkunal/vakuum/master/DimSome/Icon@2x.png -------------------------------------------------------------------------------- /DimSome/DimSome/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /DimSome/dimsome_114px_100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anandkunal/vakuum/master/DimSome/dimsome_114px_100.png -------------------------------------------------------------------------------- /DimSome/dimsome_57px_100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anandkunal/vakuum/master/DimSome/dimsome_57px_100.png -------------------------------------------------------------------------------- /DimSome/dimsome_72px_100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anandkunal/vakuum/master/DimSome/dimsome_72px_100.png -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | INFO: 2 | vakuum is just a collection of one off scripts or loose ideas. 3 | I figured I might as well throw these artifacts online. -------------------------------------------------------------------------------- /torrent.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | #Super slim QS action (chmod 777) 4 | 5 | require 'cgi' 6 | 7 | `open http://thepiratebay.org/search/#{CGI::escape(ARGV[0])}/0/99/0` -------------------------------------------------------------------------------- /wiki.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | #Super slim QS action (chmod 777) 4 | 5 | require 'cgi' 6 | 7 | `open http://en.wikipedia.org/wiki/Special:Search?search=#{CGI::escape(ARGV[0])}&go=Go` 8 | -------------------------------------------------------------------------------- /tube.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | #Super slim QS action (chmod 777) 4 | 5 | require 'cgi' 6 | 7 | `open http://www.youtube.com/results?search_query=#{CGI::escape(ARGV[0])}&search_type=&aq=f` 8 | -------------------------------------------------------------------------------- /DimSome/DimSome.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /DimSome/DimSome.xcodeproj/project.xcworkspace/xcuserdata/kunal.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anandkunal/vakuum/master/DimSome/DimSome.xcodeproj/project.xcworkspace/xcuserdata/kunal.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /DimSome/Entitlements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | get-task-allow 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DimSome/DimSome/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // DimSome 4 | // 5 | // Created by Kunal Anand on 11/29/11. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /DimSome/DimSome/DimSome-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'DimSome' target in the 'DimSome' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iOS SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /DimSome/DimSome/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // DimSome 4 | // 5 | // Created by Kunal Anand on 11/29/11. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /pixel_detection.py: -------------------------------------------------------------------------------- 1 | # Poor man's duplicate image checker 2 | 3 | import Image 4 | 5 | def is_the_same(base, test_image): 6 | for i in range(len(base)): 7 | if (base[i] - test_image[i]) != 0: 8 | return False 9 | return True 10 | 11 | base = Image.open('base.png').getdata() 12 | bad = Image.open('bad.png').getdata() 13 | good = Image.open('good.png').getdata() 14 | 15 | print is_the_same(base, bad) # should return True 16 | print is_the_same(base, good) # should return False (good!) 17 | -------------------------------------------------------------------------------- /DimSome/DimSome.xcodeproj/xcuserdata/kunal.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | DimSome.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 0CEEE45414859B7F00232E1E 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /stack_calculator.py: -------------------------------------------------------------------------------- 1 | # A minimal stack calculator that only supports addition/multipliction 2 | 3 | class Stacker(object): 4 | def __init__(self): 5 | self.s = [] 6 | self.ops = { 7 | '+' : lambda: self.s.append(self.s.pop() + self.s.pop()), 8 | '*' : lambda: self.s.append(self.s.pop() * self.s.pop()) 9 | } 10 | 11 | def parse(self, source): 12 | tokens = source.split() 13 | for token in tokens: 14 | try: 15 | self.s.append(int(token)) 16 | except ValueError: 17 | # Most likely an operator, check existence 18 | if token in self.ops: 19 | self.ops[token]() 20 | 21 | def __str__(self): 22 | return str(self.s) 23 | 24 | s = Stacker() 25 | s.parse("18 3 + 2 * 1 +") 26 | print s -------------------------------------------------------------------------------- /DimSome/DimSome/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // DimSome 4 | // 5 | // Created by Kunal Anand on 11/29/11. 6 | // Copyright (c) 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | @synthesize window = _window; 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | { 17 | if ([[UIScreen mainScreen] brightness] == 0.0) { 18 | [[UIScreen mainScreen] setBrightness:1.0]; 19 | } 20 | else { 21 | [[UIScreen mainScreen] setBrightness:0.0]; 22 | } 23 | exit(0); 24 | 25 | // self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 26 | // // Override point for customization after application launch. 27 | // self.window.backgroundColor = [UIColor whiteColor]; 28 | // [self.window makeKeyAndVisible]; 29 | // return YES; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /bash_profile.txt: -------------------------------------------------------------------------------- 1 | # Beloved PATH 2 | export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin" 3 | export MANPATH=/opt/local/share/man:$MANPATH 4 | 5 | # Use TextMate for editing things (mostly commit messages) 6 | export EDITOR='mate -w' 7 | export SVN_EDITOR='mate -w' 8 | export VISUAL='mate -w' 9 | 10 | # PS1 awesomeness 11 | export PS1="\w\[\033[31m\]\$(parse_git_branch) \[\033[00m\]>: " 12 | 13 | parse_git_branch() { 14 | git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (git::\1)/' 15 | } 16 | 17 | git config --global alias.who "!echo ; echo ; echo \"\tworking as \`git config user.name\`...\" ; echo ; echo" 18 | git config --global alias.st "!git who ; git status" 19 | git config --global alias.ci "!git who ; git commit" 20 | git config --global alias.co "!git who ; git checkout" 21 | git config --global alias.get "!git who ; git pull" 22 | git config --global alias.put "!git who ; git push" 23 | 24 | alias desk='cd ~/Desktop/' 25 | alias docs='cd ~/Documents/' 26 | alias gitpp='git pull && git push' 27 | alias h=history 28 | alias l='ls -al' 29 | alias repo='cd ~/Documents/Repositories/' 30 | alias sshsnap='ssh snapp.me -lkanand' -------------------------------------------------------------------------------- /primitive_memcached_locking.py: -------------------------------------------------------------------------------- 1 | # Primitive memcached locking 2 | # Using memcache itself to store semaphores 3 | 4 | import cPickle 5 | from eventlet import api, httpd, coros, util 6 | import memcache 7 | from mulib import mu, stacked, resources 8 | 9 | class MemcacheWrapper: 10 | def __init__(self): 11 | pass 12 | 13 | def begin_update(self, key): 14 | if not mc.get("conch-%s" % (key)): 15 | # Storing epoch or a guid (verification) may be better 16 | mc.set("conch-%s" % (key), 1) 17 | print "Yay! You can update!" 18 | return True 19 | else: 20 | print "Nay...you need to wait, or do something creative." 21 | return False 22 | 23 | class Person: 24 | def __init__(self, name): 25 | self.name = name 26 | 27 | mc = memcache.Client(['127.0.0.1:11211'], debug=0) 28 | mc.flush_all() 29 | 30 | # Set the initial cache key/value 31 | kunal = Person("Kunal Anand") 32 | mc.set("kunal", cPickle.dumps(kunal)) 33 | 34 | # Try retrieving one for an update 35 | mw = MemcacheWrapper() 36 | mw.begin_update("kunal") 37 | mw.begin_update("kunal") 38 | mw.begin_update("non_existent_cache_item") -------------------------------------------------------------------------------- /bdd.py: -------------------------------------------------------------------------------- 1 | from __future__ import with_statement 2 | import inspect 3 | 4 | # This is such a hackish attempt at doing BDD in Python 5 | # Check: http://www.whatspop.com/blog/2009/02/rspec-syntax-hack-in-python.cfm 6 | 7 | class Test(object): 8 | def __init__(self, name): 9 | self.name = name 10 | 11 | def __enter__(self): 12 | return self 13 | 14 | def __exit__(self, type, value, traceback): 15 | locals = inspect.getouterframes(inspect.currentframe())[1][0].f_locals 16 | 17 | print "BEFORE: %s" % (self.name) 18 | if locals.has_key('before') and inspect.isfunction(locals['before']): 19 | locals['before']() 20 | locals['before'] = None 21 | 22 | for l in locals: 23 | if inspect.isfunction(locals[l]) and l.startswith("it_"): 24 | locals[l]() 25 | locals[l] = None 26 | 27 | print "AFTER: %s" % (self.name) 28 | if locals.has_key('after') and inspect.isfunction(locals['after']): 29 | locals['after']() 30 | locals['after'] = None 31 | 32 | with Test("Proof of concept") as t: 33 | def before(): 34 | global create_me 35 | create_me = "- set in the before, and globally available" 36 | 37 | def it_sets_the_variable(): 38 | global create_me 39 | print create_me 40 | 41 | with Test("Adding a custom before and after") as t: 42 | def before(): 43 | print "CUSTOM BEFORE" 44 | 45 | def after(): 46 | print "CUSTOM AFTER" 47 | 48 | def it_prints_anything(): 49 | print "- i am a lonely print statement" -------------------------------------------------------------------------------- /queue_using_stack.py: -------------------------------------------------------------------------------- 1 | # An implementation of a queue using the methods of a stack and a list 2 | 3 | class S: 4 | """ A very basic and intuitive stack that really only 5 | boasts pushing, popping, and some basic utility methods. 6 | Note, I did not want to leverage the list's pop/push methods. """ 7 | 8 | def __init__(self): 9 | self.stack = [] 10 | 11 | def push(self, value): 12 | self.stack.insert(0, value) 13 | 14 | def pop(self): 15 | if len(self.stack) > 0: 16 | top = self.stack[0] 17 | self.stack.__delitem__(0) 18 | return top 19 | return None 20 | 21 | def __len__(self): 22 | return len(self.stack) 23 | 24 | def __str__(self): 25 | return str(self.stack) 26 | 27 | 28 | class Q: 29 | """ A really simple queue - there are no explicit deletions. 30 | All augmentations to the underlying data structure use stack methods. 31 | We only need to adjust either the enqueue or the dequeue - I 32 | picked the former.""" 33 | 34 | def __init__(self): 35 | self.stack = S() 36 | 37 | def enqueue(self, value): 38 | temp = [] 39 | while len(self.stack) > 0: temp.append(self.stack.pop()) 40 | self.stack.push(value) 41 | for i in temp[::-1]: self.stack.push(i) 42 | 43 | def dequeue(self): 44 | return self.stack.pop() 45 | 46 | def __str__(self): 47 | return str(self.stack) 48 | 49 | q = Q() 50 | 51 | print q.dequeue() 52 | 53 | q.enqueue(1) 54 | q.enqueue(2) 55 | 56 | print q.dequeue() 57 | 58 | q.enqueue(3) 59 | q.enqueue(4) 60 | q.enqueue(5) 61 | 62 | print q.dequeue() 63 | print q.dequeue() 64 | 65 | q.enqueue(6) 66 | 67 | print q -------------------------------------------------------------------------------- /raj_catalog_page_slicer.jsx: -------------------------------------------------------------------------------- 1 | // A quick proof of concept to automate site thumbnails 2 | 3 | total_pages = 44; 4 | catalog_season = "fall_2008"; 5 | 6 | full_document_path = "~/Documents/Repositories/decorbyraj.com/Assets/" + catalog_season + "/catalog_with_prices.pdf"; 7 | full_output_path = "~/Documents/Repositories/decorbyraj.com/Assets/" + catalog_season + "/jpg/with_prices/full/"; 8 | thumbs_output_path = "~/Documents/Repositories/decorbyraj.com/Assets/" + catalog_season + "/jpg/with_prices/thumbs/"; 9 | 10 | function open_document(page, type) 11 | { 12 | FileReference = new File(full_document_path); 13 | PDFOpenOptions = new PDFOpenOptions(); 14 | PDFOpenOptions.page = page; 15 | PDFOpenOptions.resolution = 72; 16 | //if (type == "thumb") 17 | //{ 18 | // PDFOpenOptions.width = 116; 19 | // PDFOpenOptions.height = 150; 20 | //} 21 | app.open(FileReference, PDFOpenOptions); 22 | } 23 | 24 | function save_document(page, type) 25 | { 26 | if (type == "full") 27 | { 28 | jpgFile = new File(full_output_path + page + ".jpeg"); 29 | } 30 | else 31 | { 32 | // CS3 has an adjusted resize process 33 | width = new UnitValue(116, "px"); 34 | height = new UnitValue(150, "px"); 35 | 36 | app.activeDocument.resizeImage(width, height, 72, ResampleMethod.BICUBIC); 37 | 38 | jpgFile = new File(thumbs_output_path + page + ".jpeg"); 39 | } 40 | jpgSaveOptions = new JPEGSaveOptions(); 41 | jpgSaveOptions.embedColorProfile = true; 42 | jpgSaveOptions.quality = 12; 43 | app.activeDocument.saveAs(jpgFile, jpgSaveOptions, true, Extension.LOWERCASE); 44 | } 45 | 46 | function close_document() 47 | { 48 | app.activeDocument.close(SaveOptions.DONOTSAVECHANGES); 49 | } 50 | 51 | for (i=1; i<=total_pages; i++) 52 | { 53 | open_document(i, "thumb"); 54 | save_document(i, "thumb"); 55 | close_document(); 56 | } -------------------------------------------------------------------------------- /quicksilver_scorer.py: -------------------------------------------------------------------------------- 1 | # An implementation of the Quicksilver Scorer in Python 2 | # Ported from: http://code.google.com/p/rails-oceania/source/browse/lachiecox/qs_score/trunk/qs_score.js 3 | 4 | import sets 5 | import string 6 | 7 | whitespace = sets.ImmutableSet(string.whitespace) 8 | 9 | def qs(test_string, abbreviation, offset=None): 10 | offset = offset or 0 11 | 12 | if len(abbreviation) == 0: return 0.9 13 | if len(abbreviation) > len(test_string): return 0.0 14 | 15 | for i in xrange(len(abbreviation), 0, -1): 16 | sub_abbreviation = abbreviation[0:i] 17 | index = test_string.find(sub_abbreviation) 18 | 19 | if index < 0: continue 20 | if index+len(abbreviation) > len(test_string)+offset: continue 21 | 22 | next_string = test_string[index+len(sub_abbreviation)::] 23 | next_abbreviation = None 24 | 25 | if (i >= len(abbreviation)): next_abbreviation = '' 26 | else: next_abbreviation = abbreviation[i::] 27 | 28 | remaining_score = qs(next_string, next_abbreviation, offset+index) 29 | 30 | if remaining_score > 0: 31 | score = len(test_string)-len(next_string) 32 | 33 | if index != -1: 34 | j, c = 0, test_string[index-1] 35 | 36 | if c in whitespace: 37 | for j in xrange(index-2, -1, -1): 38 | c = test_string[j] 39 | if c in whitespace: score = 1 40 | else: score = 0.15 41 | else: 42 | score -= index 43 | 44 | score += remaining_score*len(next_string) 45 | score /= len(test_string) 46 | 47 | return score 48 | 49 | return 0.0 50 | 51 | print qs("hello world", "nothing is here") 52 | print qs("hello world", "ow") 53 | print qs("hello world", "helo") 54 | print qs("hello world", "hello world") -------------------------------------------------------------------------------- /anagram.py: -------------------------------------------------------------------------------- 1 | # A poor man's anagram implementation 2 | 3 | import collections 4 | import sets 5 | import string 6 | 7 | # Static set will be used to avoid whitespace, digits, and punctuation 8 | english_letters = sets.ImmutableSet(string.ascii_letters) 9 | 10 | def is_anagram(str1=None, str2=None): 11 | # Using a defaultdict of type 'int' is useful for counters 12 | discovered_letters = collections.defaultdict(int) 13 | 14 | if (str1 and str2 and (type(str1) is str) and (type(str2) is str)): 15 | # Lowercase everything once - don't do it in the for loops N times 16 | str1, str2 = str1.lower(), str2.lower() 17 | # Load the discovered letters 18 | for char in str1: 19 | if (char in english_letters): 20 | discovered_letters[char] += 1 21 | # Go through the second string 22 | for char in str2: 23 | if (char in english_letters): 24 | if char in discovered_letters: 25 | discovered_letters[char] -= 1 26 | if (discovered_letters[char] == 0): 27 | del discovered_letters[char] 28 | else: 29 | return False 30 | # Check the length 31 | if (len(discovered_letters)): 32 | return False 33 | return True 34 | else: 35 | # Raise an argument exception here 36 | raise ValueError, "Badness - input arguments must be strings" 37 | 38 | # I found these test cases online at: http://www.entisoft.com/ESTools/StringWords_IsAnagram.HTML 39 | print is_anagram("abba", "baba") 40 | print is_anagram("Tim Taylor", "Mortality") 41 | print is_anagram("Jill Taylor", "Jolly Trail") 42 | print is_anagram("Hello World", "This is a test.") 43 | 44 | # I found these test cases at Wikipedia: http://en.wikipedia.org/wiki/Anagram 45 | # Some of them are out of control! 46 | print is_anagram("Gregory House", "Huge ego, sorry") 47 | print is_anagram("Hillary Diane Rodham Clinton", "Tally ho! Iron-handed criminal") 48 | print is_anagram("Clint Eastwood", "Old West action") 49 | 50 | # These should be obvious failures 51 | print is_anagram("fjdsklfdsf", "fjadsfljsadklfas") 52 | print is_anagram("as", "a") 53 | -------------------------------------------------------------------------------- /DimSome/DimSome/DimSome-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFiles 12 | 13 | Icon@2x.png 14 | Icon.png 15 | Icon-72.png 16 | 17 | CFBundleIcons 18 | 19 | CFBundlePrimaryIcon 20 | 21 | CFBundleIconFiles 22 | 23 | Icon@2x.png 24 | Icon.png 25 | Icon-72.png 26 | 27 | UIPrerenderedIcon 28 | 29 | 30 | 31 | CFBundleIdentifier 32 | com.kunalanand.dimsome 33 | CFBundleInfoDictionaryVersion 34 | 6.0 35 | CFBundleName 36 | ${PRODUCT_NAME} 37 | CFBundlePackageType 38 | APPL 39 | CFBundleShortVersionString 40 | 1.0 41 | CFBundleSignature 42 | ???? 43 | CFBundleVersion 44 | 1.0 45 | LSRequiresIPhoneOS 46 | 47 | UIApplicationExitsOnSuspend 48 | 49 | UIPrerenderedIcon 50 | 51 | UIRequiredDeviceCapabilities 52 | 53 | armv7 54 | 55 | UIStatusBarHidden 56 | 57 | UISupportedInterfaceOrientations 58 | 59 | UIInterfaceOrientationPortrait 60 | UIInterfaceOrientationLandscapeLeft 61 | UIInterfaceOrientationLandscapeRight 62 | UIInterfaceOrientationPortraitUpsideDown 63 | 64 | UISupportedInterfaceOrientations~ipad 65 | 66 | UIInterfaceOrientationPortrait 67 | UIInterfaceOrientationPortraitUpsideDown 68 | UIInterfaceOrientationLandscapeLeft 69 | UIInterfaceOrientationLandscapeRight 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /itunes_script.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2.5 2 | 3 | # Some iTunes spelunking I was doing a while back. 4 | # Maybe there's something exciting in here... 5 | 6 | from Foundation import * 7 | from ScriptingBridge import * 8 | from pprint import pprint 9 | from struct import unpack 10 | from time import sleep 11 | from urllib import urlopen 12 | 13 | # Configuration and stoof 14 | urlWhitespaceReplacement = '+' # This worked with the Last.FM service last time I checked 15 | skipUnplayedTracks = True # If set to False, the score on the bottom is going to be janky 16 | minimumSimilarityChunkPercentage = 0 # 0 should presumably get everything 17 | 18 | aliasesToSkip = {} 19 | 20 | # The following lines are from: http://discussions.apple.com/thread.jspa?messageID=6305279 21 | # I should really take a look at appscript for this: http://www.math.columbia.edu/~bayer/Python/iTunes/ 22 | 23 | iTunes = SBApplication.applicationWithBundleIdentifier_('com.apple.iTunes') 24 | lib = iTunes.sources()[0].playlists()[10] # print len(iTunes.sources()[0].playlists()) 25 | tracks = lib.elementArrayWithCode_(unpack('>L', 'cFlT')[0]) 26 | 27 | # The key is the artist name, the value is the playcount (useful for future weightings) 28 | artists = {} 29 | totalCount = 0 30 | 31 | # Build a list of the unique artists 32 | for track in tracks: 33 | artist = track.artist().strip().lower() 34 | if len(artist) > 0: 35 | playCount = track.playedCount() 36 | if skipUnplayedTracks and playCount == 0: 37 | continue 38 | else: 39 | totalCount += playCount 40 | if artists.has_key(artist): 41 | artists[artist] += playCount 42 | else: 43 | artists[artist] = playCount 44 | 45 | recs = {} 46 | 47 | # Now, for every artist, go ahead and find all the "similar" artists (sleep in between) 48 | for artist in artists.keys(): 49 | print 'Getting the artist: ', artist 50 | cleansedArtist = artist.replace(' ', urlWhitespaceReplacement) 51 | try: 52 | pagina = urlopen('http://ws.audioscrobbler.com/1.0/artist/' + cleansedArtist + '/similar.txt') 53 | for line in pagina: 54 | # To calculate the reliability of the artist: sigma(play count X similarity percentage) 55 | chunks = line.strip().split(',') 56 | # Treat the chunk like a percentage 57 | score = (float(chunks[0])/100) * float(artists[artist]) 58 | recArtist = chunks[2].lower() 59 | # Ignore if if the similar artist already exists in the dict or aliases 60 | if artists.has_key(recArtist) or aliasesToSkip.has_key(recArtist): 61 | continue 62 | else: 63 | if recs.has_key(recArtist): 64 | recs[recArtist] += score 65 | else: 66 | recs[recArtist] = score 67 | sleep(2) 68 | print pprint(recs) 69 | except UnicodeError: 70 | # Go back and handle this, use telepopmusik as a case 71 | pass 72 | except ValueError: 73 | # No artist exists with the name: angels - WTF is going on here? 74 | pass 75 | 76 | print '--------------------------' 77 | print pprint(recs) 78 | 79 | #print iTunes.currentTrack().name() 80 | #pprint(dir(tracks[0])) 81 | #print tracks[0].artist(), tracks[0].album() 82 | #print pprint(artists) 83 | #print len(artists) 84 | #print totalCount 85 | -------------------------------------------------------------------------------- /DimSome/DimSome.xcodeproj/xcuserdata/kunal.xcuserdatad/xcschemes/DimSome.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 14 | 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 38 | 39 | 40 | 41 | 49 | 50 | 56 | 57 | 58 | 59 | 60 | 61 | 67 | 68 | 74 | 75 | 76 | 77 | 79 | 80 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /amazon_api_test.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | artist
12 |

13 | album
14 |

15 | perceived rating
16 |

23 | tags (separated by spaces)
24 |

25 | 26 |
27 |
28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 |

#amazonartist#

52 |

#amazonalbum# (#left(amazonreleasedate,4)#)

53 | 54 |
55 | 56 | could not find cover art for you. don't worry - you can try updating this any time in the future. 57 |
58 |
59 | 60 | 61 | 62 | could not find cover art for you. don't worry - you can try updating this any time in the future. 63 | 64 |
65 | 66 | 67 | 68 | 69 |
70 | artist
71 |

72 | album
73 |

74 | perceived rating
75 |

82 | tags (separated by spaces)
83 |

84 | 85 |
86 |
87 | 88 |
-------------------------------------------------------------------------------- /ticketmaster_scraper.py: -------------------------------------------------------------------------------- 1 | # Junk code to scrape TicketMaster. 2 | # It uses BeautifulSoup so inefficiently, it hurts. 3 | 4 | from __future__ import division 5 | from BeautifulSoup import BeautifulSoup 6 | import math 7 | import re 8 | import time 9 | import urllib2 10 | 11 | possible_concerts = 0 12 | concerts_per_page = 30 13 | 14 | concerts = [] 15 | 16 | # Just realized that this doesn't bother checking for duplicates 17 | # We can build a better data structure that keys in off of composite keys - or use awk :-D. 18 | 19 | class Concert: 20 | def __init__(self, artist, tickets, venue, city, date): 21 | self.artist = to_unicode(artist) 22 | self.tickets = tickets 23 | self.venue = to_unicode(venue) 24 | self.city = to_unicode(city) 25 | self.date = to_unicode(date) 26 | 27 | def to_unicode(obj, encoding='utf-8'): 28 | if isinstance(obj, basestring): 29 | if not isinstance(obj, unicode): 30 | obj = unicode(obj, encoding) 31 | return obj 32 | 33 | def GrabPossibleCount(): 34 | # Go to the base page and seed the amount of possible concerts 35 | # I am just hard coding this for now (3607 at the current time) 36 | globals()['possible_concerts'] = 300 37 | 38 | def ScrapeTicketMasterPage(ticketmaster_url): 39 | url = urllib2.urlopen(ticketmaster_url) 40 | soup = BeautifulSoup(url) 41 | 42 | table_listing = soup.findAll("table", attrs={"class" : "tableListing"}) 43 | rows = table_listing[0].contents[1].contents 44 | 45 | for row in rows: 46 | r = str(row).strip() 47 | s = BeautifulSoup(r) 48 | tds = s.findAll("td") 49 | 50 | if len(tds) > 0: 51 | artist, tickets = s.findAll("a", attrs={"class" : "findTickets"}) 52 | artist = artist.contents[0] 53 | tickets = tickets.contents[0] == u'Find Tickets »' 54 | 55 | # So hackish, it hurts 56 | venue = s.findAll("span", attrs={"class" : "tableListing-venue"}) 57 | 58 | m = re.compile("<\/a>,(.*)<\/span>") 59 | city = re.findall(m, str(venue[0])) 60 | 61 | if (len(city) > 0): 62 | city = city[0].strip() 63 | else: 64 | city = '' 65 | 66 | venue = BeautifulSoup(str(venue[0])) 67 | venue = venue.findAll("a") 68 | venue = venue[0].contents[0] 69 | 70 | date = s.findAll("span", attrs={"class" : "tableListing-date"}) 71 | 72 | if (len(date[0]) == 3): 73 | date = date[0].contents[0] + " " + date[0].contents[2] 74 | else: 75 | # If I can't parse the date, set the availability to False 76 | tickets = False 77 | 78 | concerts.append(Concert(artist, tickets, venue, city, date)) 79 | 80 | def RunScraper(): 81 | # Calculate the max pages (remember to use the future division module) 82 | total_pages = int(math.ceil(possible_concerts / concerts_per_page)) 83 | 84 | print "There are %d pages to scrape!" % (total_pages) 85 | 86 | for current_page in range(0, total_pages+1): 87 | page = "http://www.ticketmaster.co.uk/browse?category=10001&root=&rdc_select=n1095&rdc_syear=&rdc_smonth=&rdc_sday=&rdc_eyear=&rdc_emonth=&rdc_eday=&dma=&start=%d&rpp=%d&type=selected" 88 | start = current_page * (concerts_per_page) + 1 89 | page = page % (start, concerts_per_page) 90 | ScrapeTicketMasterPage(page) 91 | 92 | # Wait 2 seconds and print a bit of a status 93 | print "This tool has currently collected: %d concerts" % (len(concerts)) 94 | time.sleep(2) 95 | 96 | def CSVPrint(): 97 | # Print the output (simple CSV format) 98 | for c in concerts: 99 | if (c.tickets): 100 | print "%s,%s,%s,%s,%s" % (c.artist.encode('utf-8'), c.tickets, c.venue.encode('utf-8'), c.city.encode('utf-8'), c.date.encode('utf-8')) 101 | else: 102 | print "%s,%s,%s,%s" % (c.artist.encode('utf-8'), c.tickets, c.venue.encode('utf-8'), c.city.encode('utf-8')) 103 | 104 | GrabPossibleCount() 105 | RunScraper() 106 | CSVPrint() 107 | -------------------------------------------------------------------------------- /tag_cloud.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | products to popular tags 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | select productName, productCount 27 | from product1 28 | order by productCount desc; 29 | 30 | 31 | 32 | 33 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | processing tier: #currentTier#
43 | 44 | #productName# 45 | 46 | 47 | 48 |

49 | 50 | 51 |
52 | 53 | 54 | ---> 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | select * 74 | from getProducts_count 75 | order by productName asc; 76 | 77 | 78 | 79 |

my favorite things

80 |

here are the top #total_rows# products. the bigger the link, the more popular they are.

81 |

82 | 83 | 84 | #lcase(productname)# 85 | #lcase(productname)# 86 | #lcase(productname)# 87 | #lcase(productname)# 88 | #lcase(productname)# 89 | 90 |    91 | 92 |

93 | 94 | 95 | select * 96 | from product1 97 | 98 | 99 |

note, this is just a sample. there are #total_records.recordcount# in the database.

100 | 101 | 102 | -------------------------------------------------------------------------------- /DimSome/DimSome.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 0CEEE45A14859B7F00232E1E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CEEE45914859B7F00232E1E /* UIKit.framework */; }; 11 | 0CEEE45C14859B7F00232E1E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CEEE45B14859B7F00232E1E /* Foundation.framework */; }; 12 | 0CEEE45E14859B7F00232E1E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CEEE45D14859B7F00232E1E /* CoreGraphics.framework */; }; 13 | 0CEEE46414859B7F00232E1E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0CEEE46214859B7F00232E1E /* InfoPlist.strings */; }; 14 | 0CEEE46614859B7F00232E1E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CEEE46514859B7F00232E1E /* main.m */; }; 15 | 0CEEE46A14859B8000232E1E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0CEEE46914859B8000232E1E /* AppDelegate.m */; }; 16 | 0CEEE47114859D7000232E1E /* dimsome_114px_100.png in Resources */ = {isa = PBXBuildFile; fileRef = 0CEEE47014859D7000232E1E /* dimsome_114px_100.png */; }; 17 | 0CEEE47314859D7700232E1E /* dimsome_57px_100.png in Resources */ = {isa = PBXBuildFile; fileRef = 0CEEE47214859D7700232E1E /* dimsome_57px_100.png */; }; 18 | 0CEEE47514859D7D00232E1E /* dimsome_72px_100.png in Resources */ = {isa = PBXBuildFile; fileRef = 0CEEE47414859D7D00232E1E /* dimsome_72px_100.png */; }; 19 | 0CEEE47B1485AC3D00232E1E /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 0CEEE47A1485AC3D00232E1E /* Icon.png */; }; 20 | 0CEEE47D1485AC4100232E1E /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0CEEE47C1485AC4100232E1E /* Icon@2x.png */; }; 21 | 0CEEE47F1485AC4500232E1E /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 0CEEE47E1485AC4500232E1E /* Icon-72.png */; }; 22 | 0CEEE4811485ADCE00232E1E /* Entitlements.plist in Resources */ = {isa = PBXBuildFile; fileRef = 0CEEE4801485ADCE00232E1E /* Entitlements.plist */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXFileReference section */ 26 | 0CEEE45514859B7F00232E1E /* DimSome.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DimSome.app; sourceTree = BUILT_PRODUCTS_DIR; }; 27 | 0CEEE45914859B7F00232E1E /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 28 | 0CEEE45B14859B7F00232E1E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 29 | 0CEEE45D14859B7F00232E1E /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 30 | 0CEEE46114859B7F00232E1E /* DimSome-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "DimSome-Info.plist"; sourceTree = ""; }; 31 | 0CEEE46314859B7F00232E1E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 32 | 0CEEE46514859B7F00232E1E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 33 | 0CEEE46714859B7F00232E1E /* DimSome-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DimSome-Prefix.pch"; sourceTree = ""; }; 34 | 0CEEE46814859B7F00232E1E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 35 | 0CEEE46914859B8000232E1E /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 36 | 0CEEE47014859D7000232E1E /* dimsome_114px_100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dimsome_114px_100.png; sourceTree = ""; }; 37 | 0CEEE47214859D7700232E1E /* dimsome_57px_100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dimsome_57px_100.png; sourceTree = ""; }; 38 | 0CEEE47414859D7D00232E1E /* dimsome_72px_100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dimsome_72px_100.png; sourceTree = ""; }; 39 | 0CEEE47A1485AC3D00232E1E /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Icon.png; sourceTree = ""; }; 40 | 0CEEE47C1485AC4100232E1E /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon@2x.png"; sourceTree = ""; }; 41 | 0CEEE47E1485AC4500232E1E /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; 42 | 0CEEE4801485ADCE00232E1E /* Entitlements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Entitlements.plist; sourceTree = ""; }; 43 | /* End PBXFileReference section */ 44 | 45 | /* Begin PBXFrameworksBuildPhase section */ 46 | 0CEEE45214859B7F00232E1E /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | 0CEEE45A14859B7F00232E1E /* UIKit.framework in Frameworks */, 51 | 0CEEE45C14859B7F00232E1E /* Foundation.framework in Frameworks */, 52 | 0CEEE45E14859B7F00232E1E /* CoreGraphics.framework in Frameworks */, 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXFrameworksBuildPhase section */ 57 | 58 | /* Begin PBXGroup section */ 59 | 0CEEE44A14859B7F00232E1E = { 60 | isa = PBXGroup; 61 | children = ( 62 | 0CEEE4801485ADCE00232E1E /* Entitlements.plist */, 63 | 0CEEE47E1485AC4500232E1E /* Icon-72.png */, 64 | 0CEEE47C1485AC4100232E1E /* Icon@2x.png */, 65 | 0CEEE47A1485AC3D00232E1E /* Icon.png */, 66 | 0CEEE47414859D7D00232E1E /* dimsome_72px_100.png */, 67 | 0CEEE47214859D7700232E1E /* dimsome_57px_100.png */, 68 | 0CEEE47014859D7000232E1E /* dimsome_114px_100.png */, 69 | 0CEEE45F14859B7F00232E1E /* DimSome */, 70 | 0CEEE45814859B7F00232E1E /* Frameworks */, 71 | 0CEEE45614859B7F00232E1E /* Products */, 72 | ); 73 | sourceTree = ""; 74 | }; 75 | 0CEEE45614859B7F00232E1E /* Products */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 0CEEE45514859B7F00232E1E /* DimSome.app */, 79 | ); 80 | name = Products; 81 | sourceTree = ""; 82 | }; 83 | 0CEEE45814859B7F00232E1E /* Frameworks */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 0CEEE45914859B7F00232E1E /* UIKit.framework */, 87 | 0CEEE45B14859B7F00232E1E /* Foundation.framework */, 88 | 0CEEE45D14859B7F00232E1E /* CoreGraphics.framework */, 89 | ); 90 | name = Frameworks; 91 | sourceTree = ""; 92 | }; 93 | 0CEEE45F14859B7F00232E1E /* DimSome */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 0CEEE46814859B7F00232E1E /* AppDelegate.h */, 97 | 0CEEE46914859B8000232E1E /* AppDelegate.m */, 98 | 0CEEE46014859B7F00232E1E /* Supporting Files */, 99 | ); 100 | path = DimSome; 101 | sourceTree = ""; 102 | }; 103 | 0CEEE46014859B7F00232E1E /* Supporting Files */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 0CEEE46114859B7F00232E1E /* DimSome-Info.plist */, 107 | 0CEEE46214859B7F00232E1E /* InfoPlist.strings */, 108 | 0CEEE46514859B7F00232E1E /* main.m */, 109 | 0CEEE46714859B7F00232E1E /* DimSome-Prefix.pch */, 110 | ); 111 | name = "Supporting Files"; 112 | sourceTree = ""; 113 | }; 114 | /* End PBXGroup section */ 115 | 116 | /* Begin PBXNativeTarget section */ 117 | 0CEEE45414859B7F00232E1E /* DimSome */ = { 118 | isa = PBXNativeTarget; 119 | buildConfigurationList = 0CEEE46D14859B8000232E1E /* Build configuration list for PBXNativeTarget "DimSome" */; 120 | buildPhases = ( 121 | 0CEEE45114859B7F00232E1E /* Sources */, 122 | 0CEEE45214859B7F00232E1E /* Frameworks */, 123 | 0CEEE45314859B7F00232E1E /* Resources */, 124 | ); 125 | buildRules = ( 126 | ); 127 | dependencies = ( 128 | ); 129 | name = DimSome; 130 | productName = DimSome; 131 | productReference = 0CEEE45514859B7F00232E1E /* DimSome.app */; 132 | productType = "com.apple.product-type.application"; 133 | }; 134 | /* End PBXNativeTarget section */ 135 | 136 | /* Begin PBXProject section */ 137 | 0CEEE44C14859B7F00232E1E /* Project object */ = { 138 | isa = PBXProject; 139 | attributes = { 140 | LastUpgradeCheck = 0420; 141 | }; 142 | buildConfigurationList = 0CEEE44F14859B7F00232E1E /* Build configuration list for PBXProject "DimSome" */; 143 | compatibilityVersion = "Xcode 3.2"; 144 | developmentRegion = English; 145 | hasScannedForEncodings = 0; 146 | knownRegions = ( 147 | en, 148 | ); 149 | mainGroup = 0CEEE44A14859B7F00232E1E; 150 | productRefGroup = 0CEEE45614859B7F00232E1E /* Products */; 151 | projectDirPath = ""; 152 | projectRoot = ""; 153 | targets = ( 154 | 0CEEE45414859B7F00232E1E /* DimSome */, 155 | ); 156 | }; 157 | /* End PBXProject section */ 158 | 159 | /* Begin PBXResourcesBuildPhase section */ 160 | 0CEEE45314859B7F00232E1E /* Resources */ = { 161 | isa = PBXResourcesBuildPhase; 162 | buildActionMask = 2147483647; 163 | files = ( 164 | 0CEEE46414859B7F00232E1E /* InfoPlist.strings in Resources */, 165 | 0CEEE47114859D7000232E1E /* dimsome_114px_100.png in Resources */, 166 | 0CEEE47314859D7700232E1E /* dimsome_57px_100.png in Resources */, 167 | 0CEEE47514859D7D00232E1E /* dimsome_72px_100.png in Resources */, 168 | 0CEEE47B1485AC3D00232E1E /* Icon.png in Resources */, 169 | 0CEEE47D1485AC4100232E1E /* Icon@2x.png in Resources */, 170 | 0CEEE47F1485AC4500232E1E /* Icon-72.png in Resources */, 171 | 0CEEE4811485ADCE00232E1E /* Entitlements.plist in Resources */, 172 | ); 173 | runOnlyForDeploymentPostprocessing = 0; 174 | }; 175 | /* End PBXResourcesBuildPhase section */ 176 | 177 | /* Begin PBXSourcesBuildPhase section */ 178 | 0CEEE45114859B7F00232E1E /* Sources */ = { 179 | isa = PBXSourcesBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | 0CEEE46614859B7F00232E1E /* main.m in Sources */, 183 | 0CEEE46A14859B8000232E1E /* AppDelegate.m in Sources */, 184 | ); 185 | runOnlyForDeploymentPostprocessing = 0; 186 | }; 187 | /* End PBXSourcesBuildPhase section */ 188 | 189 | /* Begin PBXVariantGroup section */ 190 | 0CEEE46214859B7F00232E1E /* InfoPlist.strings */ = { 191 | isa = PBXVariantGroup; 192 | children = ( 193 | 0CEEE46314859B7F00232E1E /* en */, 194 | ); 195 | name = InfoPlist.strings; 196 | sourceTree = ""; 197 | }; 198 | /* End PBXVariantGroup section */ 199 | 200 | /* Begin XCBuildConfiguration section */ 201 | 0CEEE46B14859B8000232E1E /* Debug */ = { 202 | isa = XCBuildConfiguration; 203 | buildSettings = { 204 | ALWAYS_SEARCH_USER_PATHS = NO; 205 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 206 | CLANG_ENABLE_OBJC_ARC = YES; 207 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 208 | COPY_PHASE_STRIP = NO; 209 | GCC_C_LANGUAGE_STANDARD = gnu99; 210 | GCC_DYNAMIC_NO_PIC = NO; 211 | GCC_OPTIMIZATION_LEVEL = 0; 212 | GCC_PREPROCESSOR_DEFINITIONS = ( 213 | "DEBUG=1", 214 | "$(inherited)", 215 | ); 216 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 217 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 218 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 219 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 220 | GCC_WARN_UNUSED_VARIABLE = YES; 221 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 222 | SDKROOT = iphoneos; 223 | TARGETED_DEVICE_FAMILY = "1,2"; 224 | }; 225 | name = Debug; 226 | }; 227 | 0CEEE46C14859B8000232E1E /* Release */ = { 228 | isa = XCBuildConfiguration; 229 | buildSettings = { 230 | ALWAYS_SEARCH_USER_PATHS = NO; 231 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 232 | CLANG_ENABLE_OBJC_ARC = YES; 233 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 234 | COPY_PHASE_STRIP = YES; 235 | GCC_C_LANGUAGE_STANDARD = gnu99; 236 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 237 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 238 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 239 | GCC_WARN_UNUSED_VARIABLE = YES; 240 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 241 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 242 | SDKROOT = iphoneos; 243 | TARGETED_DEVICE_FAMILY = "1,2"; 244 | VALIDATE_PRODUCT = YES; 245 | }; 246 | name = Release; 247 | }; 248 | 0CEEE46E14859B8000232E1E /* Debug */ = { 249 | isa = XCBuildConfiguration; 250 | buildSettings = { 251 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 252 | GCC_PREFIX_HEADER = "DimSome/DimSome-Prefix.pch"; 253 | INFOPLIST_FILE = "DimSome/DimSome-Info.plist"; 254 | PRODUCT_NAME = "$(TARGET_NAME)"; 255 | WRAPPER_EXTENSION = app; 256 | }; 257 | name = Debug; 258 | }; 259 | 0CEEE46F14859B8000232E1E /* Release */ = { 260 | isa = XCBuildConfiguration; 261 | buildSettings = { 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Kunal Anand"; 263 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 264 | GCC_PREFIX_HEADER = "DimSome/DimSome-Prefix.pch"; 265 | INFOPLIST_FILE = "DimSome/DimSome-Info.plist"; 266 | PRODUCT_NAME = "$(TARGET_NAME)"; 267 | "PROVISIONING_PROFILE[sdk=iphoneos*]" = "B5F40766-3CD3-4E5F-8D2F-6B0C1207AF96"; 268 | WRAPPER_EXTENSION = app; 269 | }; 270 | name = Release; 271 | }; 272 | 0CEEE4821485AF4C00232E1E /* Ad Hoc */ = { 273 | isa = XCBuildConfiguration; 274 | buildSettings = { 275 | ALWAYS_SEARCH_USER_PATHS = NO; 276 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 277 | CLANG_ENABLE_OBJC_ARC = YES; 278 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 279 | COPY_PHASE_STRIP = YES; 280 | GCC_C_LANGUAGE_STANDARD = gnu99; 281 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 282 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; 283 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 284 | GCC_WARN_UNUSED_VARIABLE = YES; 285 | IPHONEOS_DEPLOYMENT_TARGET = 5.0; 286 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 287 | SDKROOT = iphoneos; 288 | TARGETED_DEVICE_FAMILY = "1,2"; 289 | VALIDATE_PRODUCT = YES; 290 | }; 291 | name = "Ad Hoc"; 292 | }; 293 | 0CEEE4831485AF4C00232E1E /* Ad Hoc */ = { 294 | isa = XCBuildConfiguration; 295 | buildSettings = { 296 | CODE_SIGN_ENTITLEMENTS = Entitlements.plist; 297 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Kunal Anand"; 298 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 299 | GCC_PREFIX_HEADER = "DimSome/DimSome-Prefix.pch"; 300 | INFOPLIST_FILE = "DimSome/DimSome-Info.plist"; 301 | PRODUCT_NAME = "$(TARGET_NAME)"; 302 | "PROVISIONING_PROFILE[sdk=iphoneos*]" = "B5F40766-3CD3-4E5F-8D2F-6B0C1207AF96"; 303 | WRAPPER_EXTENSION = app; 304 | }; 305 | name = "Ad Hoc"; 306 | }; 307 | /* End XCBuildConfiguration section */ 308 | 309 | /* Begin XCConfigurationList section */ 310 | 0CEEE44F14859B7F00232E1E /* Build configuration list for PBXProject "DimSome" */ = { 311 | isa = XCConfigurationList; 312 | buildConfigurations = ( 313 | 0CEEE46B14859B8000232E1E /* Debug */, 314 | 0CEEE46C14859B8000232E1E /* Release */, 315 | 0CEEE4821485AF4C00232E1E /* Ad Hoc */, 316 | ); 317 | defaultConfigurationIsVisible = 0; 318 | defaultConfigurationName = Release; 319 | }; 320 | 0CEEE46D14859B8000232E1E /* Build configuration list for PBXNativeTarget "DimSome" */ = { 321 | isa = XCConfigurationList; 322 | buildConfigurations = ( 323 | 0CEEE46E14859B8000232E1E /* Debug */, 324 | 0CEEE46F14859B8000232E1E /* Release */, 325 | 0CEEE4831485AF4C00232E1E /* Ad Hoc */, 326 | ); 327 | defaultConfigurationIsVisible = 0; 328 | defaultConfigurationName = Release; 329 | }; 330 | /* End XCConfigurationList section */ 331 | }; 332 | rootObject = 0CEEE44C14859B7F00232E1E /* Project object */; 333 | } 334 | --------------------------------------------------------------------------------