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
module Main where | |
import System( getArgs ) | |
import Data.Char | |
import Control.Exception (bracket_) | |
import qualified UI.HSCurses.Curses as Curses | |
import qualified UI.HSCurses.CursesHelper as CursesH | |
import Data.Time.Clock | |
import Data.Time.Calendar |
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 | |
USERNAME = oliland | |
for REPO in private-repo-1 private-repo-2 private-repo-N | |
do | |
git clone [email protected]:$USERNAME/$REPO.git | |
sed -i '' -e 's/github\.com/bitbucket\.org/g' "$src/$dir/.git/config" | |
cd $REPO | |
git push origin master |
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
@media (min-width: 981px) { | |
body { | |
/* Fix for the hero unit resizing */ | |
padding-top: 60px; | |
} | |
} |
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 array_addition(array): | |
array = sorted(array) | |
largest = array.pop() | |
while (True): | |
result = largest | |
for x in reversed(array): | |
result = result - x | |
if result == 0: | |
return True | |
elif result < 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
def ArrayAddition(arr): | |
arr = sorted(arr) | |
# preprocess array to remove negative numbers | |
difference = 0 | |
for x in arr: | |
if x < 0: | |
x = abs(x) | |
difference = difference + x | |
largest = arr.pop() + difference | |
while (True): |
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
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// Great tutorial: http://www.raywenderlich.com/22167/beginning-core-image-in-ios-6 | |
// Official docs: https://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/CoreImaging/ci_intro/ci_intro.html#//apple_ref/doc/uid/TP30001185-CH1-TPXREF101 | |
// Alt-click on function names for more! | |
// Make any old label, with our frame set to the view so we know it's there. | |
UILabel *label = [[UILabel alloc] initWithFrame:self.view.frame]; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 Sensor: | |
def __init__(self, psf): | |
# helper methods for fourier transforms of a PSF | |
size = psf.shape[-2:] | |
# pad image bounds to double PSF size | |
pad_size = [s * 2 for s in size] | |
# find coordinates of center in padded image | |
ys = (pad_size[0] - size[0]) // 2 |