- 🎌 Cross-Platform
- 🐚 Compiler
- 👍 Patterns / anti-patterns 👎
- 🍝 Architecture
- 🍰 MVVM
- 💥 Language
- 🎉 Swift 3.0
- 🎱 General
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
from django.core.files.storage import default_storage | |
from django.core.files.base import ContentFile | |
import os | |
import uuid | |
import urllib | |
def save_image_from_url(url): | |
- Proposal: SE-NNNN
- Author(s): Luis Henrique Borges
- Status: Awaiting review
- Review manager: TBD
This proposal seeks to provide more lenient subscript
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
protocol StringType {} | |
extension String: StringType {} | |
extension Optional where Wrapped: StringType { | |
var something: Int { | |
switch self { | |
case .None: return 10 | |
case .Some(_): return 20 | |
} | |
} |
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 Math { | |
static func standardDeviation(values: [Double]) -> Double { | |
let squaredAvgDiff = values.map { pow($0 - average(values), 2)} | |
let sum = squaredAvgDiff.reduce(0) {$0 + $1} | |
return sqrt(sum / Double(values.count)) | |
} | |
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 Linguistic { | |
typealias LinguisticTag = (token: String, tag: String) | |
static func tags(text: String, range: NSRange? = nil, language: String = "en") -> [LinguisticTag] { | |
let options: NSLinguisticTaggerOptions = [.OmitWhitespace, .OmitPunctuation, .JoinNames] | |
let schemes = NSLinguisticTagger.availableTagSchemesForLanguage(language) |
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
android { | |
aaptOptions { | |
noCompress "tflite" | |
noCompress "lite" | |
} | |
} |