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
| /Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4Lm/JtVdABGIQkeKIzPDdw8z/VWX7afH8OoqQzbKL4Iz7tSFFkMdIy8jA9EeDe5h3J7h69bZuC/n1U2tbP9jEkDkL4mOy6OEu3RFE3hFW32WW+XSengYUt1tNCxkG+E+mTQfShqGGAyfeo7ue1CqBQpB15Us8h38aeQEslIDyDWxH0Ps+uaPCymEWVWqQtYxps/p4mIp9Bbbs1/RBT8yZYVUMDngodZwYYoO7bYmmc8azR46rjc8fbV5QTj+Mm2vaBCadRS8Z9Z1kCHGHbt5mIIbhE7x/fOCRQY/yqrvU1GtykYQiI+FC8E45UEN/Gz2AIdwIPiff8Y5Yrp2LKlHVii5phjW2zghzeHUknCRFclxHAdCfxwygR9SYB7kjCpSMtV/3nQpXNS4HN0e8broV43GXzJKRZHv1UW6RQpkeX/zHzIBM8PqQTbD58PVa+XhFsYYwaxdrIDyyuYA9qo9Csq4RZC3WDJ98isUK5Ip7/lsPnSnZU4KRWBSHHgWtWScB+qp7zAuGlScMwBsLlDJPNpJr9GFbHLEjsj63Lgd7IAsbT1xClHptlPFWebhkhnvClYETuoE/XHgC14me6b98IDZCbxVFjlYO3VyY+H6i+vcQBh9wMjpi+A3f7fNyq9BF8DMzD3uXm8AgmDxHPWPIrqoTkSPB8twvlPoawEnuITdv6ib83c+6UOI0lLTWfbNaMHYonLAJ3o8iXQTVic0TCc4+0Ij4VMl1H0ZoNqPUHUyhFwbCBe1lm0a3KhLQwwRX0eZaiBosyc+eqNOsFHuRbSqSw/GMuUTCXfzln8rdM7325jEdPVJ3OUafp97WudP20RSCjxXQy2XM07JpCgAM06JB16xfY8P7IOSP0Cne9Xpb7dey6Ei+iQie96O+4GModmI7AloNyDfASL5L1em2P2bnw/sy6blUU8RjlYE7a9W/9nN1A/8gpTAojWUziEOJM+0UsNoORq5gqiKmCvlKrElkfz+kaeG |
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 cv2 | |
| import cv2.cv as cv | |
| def detect(img, cascade_fn='haarcascades/haarcascade_frontalface_alt.xml', | |
| scaleFactor=1.3, minNeighbors=4, minSize=(20, 20), | |
| flags=cv.CV_HAAR_SCALE_IMAGE): | |
| cascade = cv2.CascadeClassifier(cascade_fn) | |
| rects = cascade.detectMultiScale(img, scaleFactor=scaleFactor, |
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/bash | |
| # | |
| # script formats bonnie output and calls gnuplot to create a png graph | |
| # of various bonnie parameters. | |
| # | |
| # feed script bonnie++ output - it will attempt to find the last line of bonnie output | |
| # which is all it really cares about anyway | |
| # | |
| # eg: Using uid:65534, gid:65534. | |
| # Writing a byte at a time...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
| package trainableSegmentation.metrics; | |
| /** | |
| * | |
| * License: GPL | |
| * | |
| * This program is free software; you can redistribute it and/or | |
| * modify it under the terms of the GNU General Public License 2 | |
| * as published by the Free Software Foundation. | |
| * |
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/bash | |
| watch -n 10 'curl https://data.mtgox.com/api/2/BTCUSD/money/ticker | tee data/ticker.$(date +"%Y-%m-%d_%R:%S.%N").json | python -mjson.tool; for f in data/*.json; do gzip $f; 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
| UIImageOrientation imageOrientation; | |
| if (UserDefaults.usingFrontCamera) { | |
| switch (curDeviceOrientation) { | |
| case UIDeviceOrientationLandscapeLeft: | |
| imageOrientation = UIImageOrientationDown; | |
| break; | |
| case UIDeviceOrientationLandscapeRight: | |
| imageOrientation = UIImageOrientationUp; | |
| break; | |
| case UIDeviceOrientationPortraitUpsideDown: |
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
| UIDeviceOrientation curDeviceOrientation = [[UIDevice currentDevice] orientation]; | |
| enum { | |
| PHOTOS_EXIF_0ROW_TOP_0COL_LEFT = 1, // 1 = 0th row is at the top, and 0th column is on the left (THE DEFAULT). | |
| PHOTOS_EXIF_0ROW_TOP_0COL_RIGHT = 2, // 2 = 0th row is at the top, and 0th column is on the right. | |
| PHOTOS_EXIF_0ROW_BOTTOM_0COL_RIGHT = 3, // 3 = 0th row is at the bottom, and 0th column is on the right. | |
| PHOTOS_EXIF_0ROW_BOTTOM_0COL_LEFT = 4, // 4 = 0th row is at the bottom, and 0th column is on the left. | |
| PHOTOS_EXIF_0ROW_LEFT_0COL_TOP = 5, // 5 = 0th row is on the left, and 0th column is the top. | |
| PHOTOS_EXIF_0ROW_RIGHT_0COL_TOP = 6, // 6 = 0th row is on the right, and 0th column is the top. | |
| PHOTOS_EXIF_0ROW_RIGHT_0COL_BOTTOM = 7, // 7 = 0th row is on the right, and 0th column is the bottom. |
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
| NSString* jsonPath = [[NSBundle mainBundle] pathForResource:@"arr_fb" ofType:@"json"]; | |
| NSData* jsonData = [NSData dataWithContentsOfFile:jsonPath]; | |
| JSONDecoder* decoder = [[JSONDecoder alloc] initWithParseOptions:JKParseOptionNone]; | |
| NSDictionary* json = [decoder objectWithData:jsonData]; | |
| NSArray* shape = [json objectForKey:@"shape"]; | |
| NSUInteger fbn_ = [[shape objectAtIndex:0] intValue]; |
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 os | |
| from os import path | |
| __location__ = path.realpath(path.join(os.getcwd(), path.dirname(__file__))) |
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 time | |
| import gc | |
| import numpy as np | |
| def theano_memory_hack(func_exp, local_vars, | |
| input_exps=('input',), | |
| msize_best=None, | |
| msize_start=1024, msize_factor=2, | |
| verbose=False): |
NewerOlder