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
| extension XCTestCase { | |
| func assertDeallocation<T: AnyObject>(of object: () -> T, file: StaticString = #file, line: UInt = #line) { | |
| weak var weakReferenceToObject: T? | |
| let autoreleasepoolExpectation = expectation(description: "Autoreleasepool drain") | |
| autoreleasepool { | |
| let object = object() | |
| weakReferenceToObject = object | |
| XCTAssertNotNil(weakReferenceToObject) | |
| autoreleasepoolExpectation.fulfill() |
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
| ### SIGN IN | |
| POST https://example.com/auth/signin | |
| content-type: application/json | |
| { | |
| "email": "miff@iomc.rs", | |
| "password": "xxxxxx" | |
| } | |
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
| // Don't forget to add to the project: | |
| // 1. DeepLabV3 - https://developer.apple.com/machine-learning/models/ | |
| // 2. CoreMLHelpers - https://github.com/hollance/CoreMLHelpers | |
| enum RemoveBackroundResult { | |
| case background | |
| case finalImage | |
| } | |
| extension UIImage { |
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 | |
| RED="\033[31m" | |
| BLUE="\033[34m" | |
| GREEN="\033[32m" | |
| YELLOW="\033[33m" | |
| ENDCOLOR="\033[0m" | |
| ANGULARJSON=$1/angular.json | |
| if test -f "$ANGULARJSON"; then |
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 AVFoundation | |
| import Foundation | |
| import UIKit | |
| class CustomComposition: NSObject, AVVideoCompositing { | |
| var sourcePixelBufferAttributes: [String : Any]? { | |
| get { | |
| return ["\(kCVPixelBufferPixelFormatTypeKey)": kCVPixelFormatType_32BGRA] | |
| } |
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
| // In Targets -> Build Phases -> Add Run Script | |
| TAGS="TODO:|FIXME:" | |
| ERRORTAG="ERROR:" | |
| find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$|($ERRORTAG).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/" | perl -p -e "s/($ERRORTAG)/ error: \$1/" |
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
| from flask import Flask | |
| from flask_restful import Api, Resource, reqparse | |
| app = Flask(__name__) | |
| api = Api(app) | |
| users = [ | |
| { | |
| "name": "Nicholas", | |
| "age": 42, |
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
| Luqman Donald (Ostriches FC) steals the ball | |
| Arman Sharples (Caring Spiders) scores | |
| Raphael Mullen (Ostriches FC) scores | |
| Connagh Daniels (Ostriches FC) steals the ball | |
| Stan Hines (Ostriches FC) scores | |
| Kamal Lutz (Caring Spiders) score a beatufull goal from 40 m | |
| Jorge Oneil (Ostriches FC) stops the ball! | |
| Kamal Lutz (Caring Spiders) passes a ball! | |
| Hamza Burton (Caring Spiders) steals the ball | |
| Raphael Mullen (Ostriches FC) passes a ball! |
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 UIKit | |
| import AVKit | |
| import AVFoundation | |
| protocol VideViewDelegate { | |
| func didEndVideo() | |
| } | |
| class VideoView: UIView { | |
NewerOlder