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
https://www.kaggle.com/code/alexbaramilis/predicting-gender-from-human-hand-x-rays-part-1 |
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
void refresh() { | |
futureMostRecentTrade = | |
loopringService.getMostRecentTrade(tradingPair: selectedTradingPair); | |
futureCandlestickSeries = | |
loopringService.getCandlestickData(tradingPair: selectedTradingPair); | |
} |
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
struct PropellerForecastResponse: Decodable { | |
let properties: PropellerForecastProperties | |
} | |
struct PropellerForecastProperties: Decodable { | |
let risk: String // risk of adverse respiratory conditions: "high", "medium" or "low" | |
let probability: Double // probability of adverse respiratory conditions: ex. 0.4938... | |
} | |
// MARK: - CodingKeys |
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
// MARK: - CodingKeys | |
extension AirVisualNearestCityData { | |
enum CodingKeys: String, CodingKey { | |
case city = "city" | |
case currentConditions = "current" | |
} | |
} | |
extension AirVisualWeather { |
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
struct AirVisualNearestCityResponse: Decodable { | |
let status: String | |
let data: AirVisualNearestCityData | |
} | |
struct AirVisualNearestCityData: Decodable { | |
let city: String | |
let currentConditions: AirVisualCurrentConditions | |
} |
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 Moya | |
enum PropellerAPI { | |
case forecast(lat: Double, lon: Double) | |
} | |
extension PropellerAPI: TargetType { | |
var baseURL: URL { | |
return URL(string: "https://open.propellerhealth.com/prod")! |
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 Moya | |
enum AirVisualAPI { | |
static private let key = "A5xEAXuhEFJZyZA4o" | |
case nearestCity(lat: Double, lon: Double) | |
} | |
extension AirVisualAPI: TargetType { |
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 UIKit.UIImage | |
import UIKit.UIColor | |
import RxSwift | |
import RxCocoa | |
class MainViewModel: ViewModel { | |
// MARK: - Inputs |
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
// MARK: - Private Properties | |
private let refreshSubject = PublishSubject<Void>() | |
private let disposeBag = DisposeBag() | |
// MARK: - Methods | |
private func bindViewModel() { | |
// Inputs | |
refreshSubject |
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
let text = "Main pollutant: \(Text.forMainPollutant(data.pollution.mainPollutantUS))" | |
mainPollutantLabel.setAttributedTextWithSubscripts(text: text, | |
indicesOfSubscripts: text.indicesOfNumbers) |
NewerOlder