I hereby claim:
- I am steverichey on github.
- I am steverichey (https://keybase.io/steverichey) on keybase.
- I have a public key whose fingerprint is 516B 6908 5CE8 D147 B985 5E42 9011 2DDB F6AB F744
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| cat << EOF | |
| ########################################################### | |
| # Workaround adb disconnecting issue on macOS Sierra | |
| # | |
| # More info: | |
| # https://code.google.com/p/android/issues/detail?id=219085 | |
| # credits to: [email protected], [email protected] | |
| ########################################################### |
| # Save as `egg.py` | |
| # Run with `monkeyrunner egg.py` | |
| # Must have Android SDK `tools` directory in your PATH | |
| from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice, MonkeyView | |
| device = MonkeyRunner.waitForConnection() | |
| # These will vary depending on your device! | |
| x = 720 |
| // swiftlint:disable line_length | |
| // swiftlint:disable variable_name | |
| import Foundation | |
| import Cocoa | |
| struct PixelData { | |
| var a: UInt8 = 255 | |
| var r: UInt8 | |
| var g: UInt8 |
| # install CUDA | |
| sudo apt-get update | |
| wget "http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.5-18_amd64.deb" | |
| sudo dpkg -i cuda-repo-ubuntu1404_7.5-18_amd64.deb | |
| sudo apt-get update | |
| sudo apt-get install cuda -y | |
| export PATH=/usr/local/cuda-7.5/bin:$PATH | |
| export LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH | |
| # install MPI (optional, for some samples) |
| extension SequenceType { | |
| /** | |
| Filter a single sequence into two "buckets", each an array containing objects of this collection's element type. | |
| - parameter includeElementInFirstCollection: A method that returns true for elements to include in the first collection. | |
| - parameter includeElementInSecondCollection: A method that returns true for elements to include in the second collection. | |
| - returns: A tuple of two arrays containing the elements in their respective buckets. | |
| */ | |
| @warn_unused_result | |
| public func multifilter(@noescape includeInFirst includeElementInFirstCollection: (Self.Generator.Element) throws -> Bool, @noescape includeInSecond includeElementInSecondCollection: (Self.Generator.Element) throws -> Bool) rethrows -> ([Self.Generator.Element], [Self.Generator.Element]) { | |
| var firstCollection: [Self.Generator.Element] = [] |
| // see http://lumiverse.io/series/neural-networks-demystified | |
| import Foundation | |
| let startTime = NSDate() | |
| defer { | |
| let endTime = NSDate() | |
| print("Total time \(endTime.timeIntervalSinceDate(startTime))") | |
| } |
| #!/bin/bash | |
| # Install script for application setup on Wercker boxes | |
| # Exit script on error | |
| set -e | |
| echo "Updating apt-get" | |
| # Without updating, apt-get won't find curl | |
| apt-get update |
| #!/bin/sh | |
| # exit on error | |
| set -e | |
| if [ "$#" -ne 1 ]; then | |
| echo "Usage: icns myicon.png" | |
| exit 0 | |
| fi |
| #!/bin/sh | |
| # Fixes "*.app can't be opened" errors | |
| # Run `chmod +x` on this file and then | |
| # move it to /usr/bin/ to make it GLOBAL | |
| if [ $# -eq 0 ] | |
| then | |
| echo "No arguments supplied! Expected a path to a .app file" | |
| elif [ -z "$1" ] |