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 mailAddress = "YOUR_EMAIL_ADDRSS"; | |
var slackToken = "SLACK_TOKEN"; | |
var searchMailQuery = 'SEARCH_QUERY'; // example: '[from:[email protected] YOUR_APP_NAME]'; | |
var slackChannelId = "SLACK_CHANNEL_ID"; | |
function getAttachment(message) { | |
var subject = message.getSubject(); | |
var body = message.getPlainBody(); | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 numpy as np | |
def soft_max(a): | |
c = np.max(a) | |
exp_a = np.exp(a-c) | |
sum_exp_a = np.sum(exp_a) | |
y = exp_a / sum_exp_a | |
return y |
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 Extension<Base> { | |
let base: Base | |
init (_ base: Base) { | |
self.base = base | |
} | |
} | |
protocol ExtensionCompatible { | |
associatedtype Compatible | |
static var ex: Extension<Compatible>.Type { get } |
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 someString string // 初期値が必要ないときによく使う | |
var someString2 = "test" // パッケージ変数の宣言に使う | |
someString3 := "test" // 一番よく目にするやつ |
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 (c *client) read() { | |
for { | |
var msg *message | |
if err := c.socket.ReadJSON(&msg); err == nil { | |
msg.When = time.Now() | |
msg.Name = c.userData["name"].(string) | |
if avatarURL, ok := c.userData["avatar_url"]; ok { | |
msg.AvatarURL = avatarURL.(string) | |
} | |
c.room.forward <- msg |
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
package main | |
import "time" | |
type message struct { | |
Name string | |
Message string | |
When time.Time //メッセージ送信時刻 | |
AvatarURL string | |
} |
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
/* Swift version 3.0-dev (LLVM b361b0fc05, Clang 11493b0f62, Swift 24a0c3de75) | |
Target: x86_64-unknown-linux-gnu */ | |
let numbers1 = (1,1,1,1,1) | |
let numbers2 = (2,2,2,2,2) | |
let tuple1 = (numbers1, numbers2) | |
let tuple2 = (numbers1, numbers2) | |
print("bool: \(tuple1 == tuple2)") // error | |
let tuple3 = ((),()) |
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
- (nonnull NSString*)hey { | |
return nil; | |
} |
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
package main | |
import "fmt" | |
type Person struct { | |
*Programmer | |
name string | |
age int | |
} |
NewerOlder