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
// | |
// NSArray+CollectionOperations.h | |
// MSAppKit | |
// | |
// Created by Jarod Luebbert on 1/4/13. | |
// | |
// | |
#import <Foundation/Foundation.h> |
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
""" | |
List all retina assets (@2x) that have odd dimensions. | |
------------------------------------------------------ | |
""" | |
import os | |
from re import search | |
from PIL import Image | |
from argparse import ArgumentParser |
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 read_input(input_filename="input.txt"): | |
with open(input_filename) as f: | |
return (line.rstrip().split(' ') for line in f.readlines()) | |
def scramble_word(word): | |
if len(word) > 3: | |
from random import shuffle | |
middle = list(word[1:-1]) | |
shuffle(middle) | |
new_word = word[0] + str.join('', middle) + word[-1] |
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
""" | |
Detecting cycles | |
---------- | |
Solution for the cycles challenge. | |
""" | |
def read_input(input_filename="input.txt"): | |
with open(input_filename) as f: | |
return (line.rstrip().split() for line in f.readlines()) |
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
The longest length found was: 15 | |
The first longest substring was: rustlingofeachp | |
python substring.py 28.60s user 27.93s system 99% cpu 56.831 total |
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 <Foundation/Foundation.h> | |
@interface NSString (charactersAsArray) | |
- (NSArray *)charactersAsArray; | |
@end |
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
// | |
// GFFParallaxNode.h | |
// | |
// Created by Rolando Abarca on 12/14/09. | |
// | |
#import <Foundation/Foundation.h> | |
#import "cocos2d.h" | |
#define MAX_PARALLAX_CHILDREN 25 |
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 os | |
from subprocess import call | |
SPRITESHEET_SRC_DIR='Resources/Spritesheet Sources' | |
SPRITESHEET_DST_DIR='Generated/Spritesheets' | |
TEXTURE_PACKER='Tools/TexturePacker.app/Contents/MacOS/TexturePacker' | |
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
// | |
// CCDrawingPrimitives+ccDrawFillCircle.h | |
// MindSnacks | |
// | |
// Created by Jarod L on 9/20/11. | |
// Copyright (c) 2011 MindSnacks. All rights reserved. | |
// | |
#import "CCDrawingPrimitives.h" |
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
{ | |
"from_user_id_str": "21640", | |
"profile_image_url": "http://a2.twimg.com/profile_images/1133121379/me-summer2010_normal.jpg", | |
"created_at": "Thu, 02 Jun 2011 19:38:05 +0000", | |
"from_user": "amrox", | |
"id_str": "76372030727004160", | |
"metadata": { | |
"result_type": "recent" | |
}, | |
"to_user_id": null, |
NewerOlder