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 requests | |
def segment_image(image_path, api_key): | |
with open(image_path, 'rb') as image_file: | |
response = requests.post( | |
'https://api.deepai.org/api/deepmask', | |
files={'image': image_file}, | |
headers={'api-key': api_key} | |
) | |
if response.status_code == 200: |
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
npx tsc-watch --onsuccess "node lib/index.js server" |
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
my $hashref; | |
method_that_returns_promise | |
->then(sub { | |
$hashref = shift; | |
return 1; | |
}) | |
->then(sub { |
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
### Keybase proof | |
I hereby claim: | |
* I am tempire on github. | |
* I am tempire (https://keybase.io/tempire) on keybase. | |
* I have a public key ASDIRg2rJmI_Ly2SlcDphF4jfba_l3Hw2MbSHaFm0wlQZwo | |
To claim this, I am signing this object: |
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
// | |
// ViewController.swift | |
// CertificateRequest | |
// | |
// Created by Glen Hinkle on 3/4/19. | |
// Copyright © 2019 Zombie Dolphin LLC. All rights reserved. | |
// | |
// Works with iOS 12 | |
// |
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
// In the MTR view controller | |
let vc = storyboard.instantiateViewController(withIdentifier: "WebViewController") | |
self.navigationController?.pushViewController(vc, animated: true) | |
// Web View Controller, assuming a matching view controller in the storyboard | |
class WebViewController: UIViewController { |
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 RealmSwift | |
class ParentThing: Object { | |
dynamic var name: String = "" | |
dynamic var oktaId: String = "" | |
dynamic var employeeId: String = "" | |
dynamic var salesforceId: String = "" | |
dynamic var someOptionalThing: String? |
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 Ray Wenderlich, converted to swift 2 | |
extension Structs: CustomStringConvertible { | |
var description: String { | |
return contents.description | |
} | |
} | |
extension Structs: ArrayLiteralConvertible { | |
init(arrayLiteral elements: Element...) { |
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
// | |
// Check.swift | |
// Points | |
// | |
// Created by Glen Hinkle on 10/2/16. | |
// Copyright © 2016 Zombie Dolphin. All rights reserved. | |
// | |
import Foundation | |
import CoreBluetooth |
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
// Allows | |
// Storyboard.Main.viewController(MainVC) | |
enum Storyboard: String { | |
case Main | |
static let values = [Main] | |
static var boards = [Storyboard:UIStoryboard]() | |
func viewController<A: UIViewController>(type: A.Type) -> A { |
NewerOlder