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 TipKit | |
/// Small helper protocol for a tip that is available below iOS 17 | |
/// so that we can pass tips around and have members storing tips | |
/// (as stored properties can't be marked with `@available`). | |
@available(iOS, obsoleted: 17, message: "Can be removed once we only support iOS 17+") | |
public protocol TipShim { | |
@available(iOS 17, *) |
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
// The MIT License (MIT) | |
// | |
// Copyright (c) 2021 Alexander Grebenyuk (github.com/kean). | |
import SwiftUI | |
public protocol ScrollViewPrefetcherDelegate: AnyObject { | |
/// Returns all valid indices for the collection. | |
func getAllIndicesForPrefetcher(_ prefetcher: ScrollViewPrefetcher) -> Range<Int> | |
func prefetcher(_ prefetcher: ScrollViewPrefetcher, prefetchItemsAt indices: [Int]) |
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 ComposableArchitecture | |
import SwiftUI | |
public enum ControlledStore {} | |
extension ControlledStore { | |
public enum Command: Equatable { | |
case run | |
case pause | |
} |
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 ComposableArchitecture | |
import Difference | |
import Foundation | |
/// A container for storing action filters. | |
/// | |
/// The logic behind having this rather than a normal closure is that it allows us to namespace and gather action filters together in a consistent manner. | |
/// - Note: You should be adding extensions in your modules and exposing common filters you might want to use to focus your debugging work, e.g. | |
/// ```swift | |
/// extension ActionFilter where Action == AppAction { |
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
static const CGFloat kFontWeightEpsilon = FLT_EPSILON; | |
@implementation UIFont (CustomizedDynamicType) | |
+ (nonnull UIFont *)preferredFontWithDefaultSize:(CGFloat)size | |
textStyle:(nonnull UIFontTextStyle)textStyle { | |
return [self preferredFontWithDefaultSize:size | |
textStyle:textStyle | |
fontWeight:UIFontWeightRegular | |
italic:NO]; |
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
// | |
// CustomPicker.swift | |
// | |
// Created by T Brennan on 27/3/21. | |
// | |
import SwiftUI | |
struct ContentView: View { | |
@State private var selection: Int? = 0 |
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
Apache License | |
Version 2.0, January 2004 | |
http://www.apache.org/licenses/ | |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
1. Definitions. | |
"License" shall mean the terms and conditions for use, reproduction, | |
and distribution as defined by Sections 1 through 9 of this document. |
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
#!/bin/bash | |
## This gist contains instructions about cuda v11.2 and cudnn 8.1 installation in Ubuntu 18.04 for PyTorch | |
############################################################################################# | |
##### forked by : https://gist.github.com/Mahedi-61/2a2f1579d4271717d421065168ce6a73 ######## | |
############################################################################################# | |
### steps #### | |
# verify the system has a cuda-capable gpu |
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 Foundation | |
import SwiftUI | |
#if canImport(UIKit) | |
import UIKit | |
#elseif canImport(AppKit) | |
import AppKit | |
#endif | |
extension Image { | |
/// Initializes a SwiftUI `Image` from data. |
NewerOlder