if needed
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 moviepy.editor import VideoFileClip | |
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip | |
import os.path | |
import sys | |
import time | |
import math | |
def main(args): | |
clipCount = 0 | |
# # clip = VideoFileClip("/Users/johannmg/localdev/LiveVidSnipets/recordin/2019-11-04_18-56-06.flv") |
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
//: Playground - noun: a place where people can play | |
import Cocoa | |
/* | |
Problem: There are three dice. | |
It counts as a point if any die hits a 5 or 6 | |
Any die that gets a 5 ot 6 is rolled again. If the second roll is 5 ot 6 that die has produced two points. | |
*/ |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
extension Character | |
{ | |
func unicodeScalarCodePoint() -> String | |
{ | |
let characterString = String(self) |
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 Foundation | |
extension Collection { | |
func onlyType<T>(_ type: T.Type) -> [T] { | |
return self.filter{ $0 is T }.map{ $0 as! T } | |
} | |
} |
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
table#hnmain {max-width: 800px !important;background-color: #fff !important;}a.storylink {color: #000 !important;}tr.spacer {height: 10px !important;}span.rank {color: #9c9c9c !important;display: none !important;}.votearrow {display: none !important;}span.sitestr {color: #409021 !important;}span.score {display: none !important;}textarea {display: none !important;}input[type="submit"] {display: none !important;}form {display: none !important;} |
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/sh | |
#HOW TO USE | |
# Get architectures with | |
# $ lipo -info SnapsheetSDK | |
# Run the script in the same dir as the binary (binary name in this case is SnapsheetSDK) | |
# Run script with archs are parameters | |
# $ ./strip_symbols.sh SnapsheetSDK armv7 armv7s i386 x86_64 arm64 |
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
/* | |
Response object representing the response from the server. | |
Core: Data (NSData), Response (NSURLResponse), Error (NSError) | |
Convienece: | |
HTTP | |
JSON (Meant for an individual object) | |
JSON Array (Meant for parsing an entire list of objects) | |
*/ | |
struct Response { |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
class ReminderView : UIView { | |
let popupColor = UIColor(white: 0.0, alpha: 0.16) | |
let drawingCornerRadius: CGFloat = 6.0 | |
let bubbleHeightRatio: CGFloat = 0.83 | |
let label = UILabel() |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
func getMeANewView() -> UIView { | |
let randomHue = (Double( arc4random_uniform(101) ) - 1.0) / 100.0 | |
let newView = UIView(frame: CGRect(x: 0, y: 0, width: 250, height: 50)) | |
newView.backgroundColor = UIColor(hue: CGFloat(randomHue), saturation: 0.5, brightness: 0.5, alpha: 1.0) | |
// newView.widthAnchor.constraint(equalToConstant: 250).isActive = true |