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 | |
extension Character { | |
var isEmoji: Bool { | |
return unicodeScalars.allSatisfy { $0.properties.isEmoji } | |
} | |
} | |
func recentlyUsedEmoji() -> [Character]? { | |
#if os(iOS) |
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 SwiftUI Lab: Advanced SwiftUI Animations | |
// https://swiftui-lab.com/swiftui-animations-part1 (Animating Paths) | |
// https://swiftui-lab.com/swiftui-animations-part2 (GeometryEffect) | |
// https://swiftui-lab.com/swiftui-animations-part3 (AnimatableModifier) | |
//------------------------------------------------------------------------ | |
import SwiftUI | |
struct ContentView: View { | |
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 | |
struct TruthyValue { | |
var value: Bool? | |
init(_ value: Bool?) { | |
self.value = value | |
} | |
init(_ value: Int) { | |
switch value { |
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
#Identifying safe loans with decision trees | |
import math | |
import pandas as pd | |
import numpy as np | |
#the dataset consists data from the LendingClub to predict whether a loan will be paid off in full or | |
#the loan with be charged off and possibly go into default | |
import sframe | |
loans = sframe.SFrame('lending-club-data.gl/') |