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
alias mdev='GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) && git checkout develop && git pull && git checkout $GIT_BRANCH && git merge develop' |
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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
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
platform :ios do | |
desc "Distribute iOS App to Firebase App Distribution" | |
lane :firebase_distribute do | |
enable_automatic_code_signing | |
build_ios_app( | |
scheme: "firebaseDistribution", | |
workspace: "firebaseDistribution.xcworkspace") | |
firebase_app_distribution( | |
app: "1:453826819908:ios:cda659fb15ab9128", | |
groups: "QA", |
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
default_platform(:ios) | |
platform :ios do | |
desc "Distribute iOS App to Firebase App Distribution" | |
lane :firebase_distribute do | |
enable_automatic_code_signing | |
build_ios_app( | |
scheme: "firebaseDistribution", | |
workspace: "firebaseDistribution.xcworkspace", | |
export_xcargs: "-allowProvisioningUpdates") |
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
func insertMessage(sender: Sender, text: String) { | |
let date = Date.init() | |
let message = Message(sender: sender, messageId: "1", sentDate: date, kind: .text(text)) | |
messages.append(message) | |
conversation.append(TextMessage(text: text, timestamp: date.timeIntervalSince1970, userID: sender.id, isLocalUser: isJohn)) | |
messagesCollectionView.reloadData() | |
handleSmartReply() | |
} | |
func handleSmartReply() { |
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
var conversation: [TextMessage] = [] | |
// Then, for each message sent and received: | |
let message = TextMessage( | |
text: "How are you?", | |
timestamp: Date().timeIntervalSince1970, | |
userID: "userId", | |
isLocalUser: false) | |
conversation.append(message) |
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
// ข้างใน Podfile | |
pod 'Firebase/Core' | |
pod 'Firebase/MLCommon' | |
pod 'Firebase/MLNLSmartReply' | |
// จากนั้นก็ทำการ pod install ซะะ |
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
naturalLanguage.smartReply().suggestReplies(for: conversation) { result, error in | |
guard error == nil, let result = result else { | |
return | |
} | |
if (result.status == .notSupportedLanguage) { | |
// The conversation's language isn't supported, so the | |
// the result doesn't contain any suggestions. | |
} else if (result.status == .success) { | |
// Successfully suggested smart replies. | |
// ... |
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
/** | |
* A single chat message, to be used as an array element for input to Smart Reply. | |
*/ | |
NS_SWIFT_NAME(TextMessage) | |
@interface FIRTextMessage : NSObject | |
/** | |
* Text of the chat message. | |
*/ | |
@property(nonatomic, readonly) NSString *text; | |
/** |
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
val options = FirebaseLanguageIdentificationOptions.Builder().setConfidenceThreshold(0.5f).build() | |
val languageIdentification = FirebaseNaturalLanguage.getInstance().getLanguageIdentification(options) | |
//languageIdentification.identifyLanguage(...) |
NewerOlder