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
| // ⚠️ As of WWDC21 you can just use a SwiftUI Material | |
| // https://developer.apple.com/documentation/swiftui/material | |
| // | |
| // Frost.swift | |
| // | |
| // Created by Clarko on 7/19/20. | |
| // | |
| // A SwiftUI representation of UIVisualEffectView | |
| // and UIBlurEffect, that handles mostly like a | |
| // SwiftUI Color view. Use it as a .background() |
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
| // MARK: CustomLayoutInvalidationContext | |
| class CustomLayoutInvalidationContext: UICollectionViewLayoutInvalidationContext { | |
| var invalidatedBecauseOfBoundsChange: Bool = false | |
| } | |
| // MARK: CustomCollectionViewLayout | |
| class CustomCollectionViewLayout: UICollectionViewLayout { | |
| private enum ContentUpdateValue{ | |
| case fixed(value: CGFloat) |
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 cv2 | |
| import sys | |
| import os | |
| class FaceCropper(object): | |
| CASCADE_PATH = "data/haarcascades/haarcascade_frontalface_default.xml" | |
| def __init__(self): | |
| self.face_cascade = cv2.CascadeClassifier(self.CASCADE_PATH) |
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
| // Run from the dev tools console of any Youtube video | |
| // Accurate as of July 2, 2020. | |
| // | |
| // Copy and paste this into the dev console in a browser with the desired video loaded. | |
| // | |
| // NOTE: Some Youtube videos do not directly expose the video url in the response. | |
| // This script doesn't currently attempt to handle those. It will work for most other general video types though. | |
| (async () => { | |
| const html = await fetch(window.location.href).then((resp) => resp.text()).then((text) => text); |