Skip to content

Instantly share code, notes, and snippets.

View amaotone's full-sized avatar
🍺

Amane Suzuki amaotone

🍺
View GitHub Profile
@amaotone
amaotone / icnr_example.ipynb
Created July 29, 2019 04:30
Sub-Pixel Conv with ICNR
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@amaotone
amaotone / pdp_plotly.py
Created November 18, 2018 06:46
PDPBoxのプロットをplotlyで表示する
from pdpbox import pdp
import plotly.offline as py
from plotly.tools import mpl_to_plotly
py.init_notebook_mode(connected=False)
for f in feats:
pdp_dist = pdp.pdp_isolate(model=model, dataset=X, model_features=X.columns, feature=f)
fig, axes = pdp.pdp_plot(pdp_dist, f, figsize=(8, 6), plot_params={
# plot title and subtitle
'title': f,
@amaotone
amaotone / LINE_notification.py
Last active September 23, 2018 10:50
LINEに通知を送るやつ。API tokenの発行は https://notify-bot.line.me/my/ から。
def notify(message):
assert type(message) is str
token = YOUR_ACCESS_TOKEN # deactivate when the competition is over
api = 'https://notify-api.line.me/api/notify'
message = "\n" + message
payload = {'message': message}
headers = {'Authorization': 'Bearer {}'.format(token)}
requests.post(api, data=payload, headers=headers)
@amaotone
amaotone / delete_rayban.py
Last active April 6, 2018 10:50
レイバンスパムを消します。
import tweepy
TWITTER_ID = 'YOUR TWITTER ID'
API_KEY = 'YOUR API KEY'
API_SECRET = 'YOUR API SECRET'
TOKEN = 'YOUR ACCESS TOKEN'
TOKEN_SECRET = 'YOUR ACCESS TOKEN SECRET'
auth = tweepy.OAuthHandler(API_KEY, API_SECRET)
auth.set_access_token(TOKEN, TOKEN_SECRET)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@amaotone
amaotone / gitbucket_helper.sh
Last active March 15, 2017 12:16
GitBucketを立ち上げたり止めたりアップデートしたりします。
#!/bin/bash
#
# GitBucket helper (start, stop, and update)
# Amane Suzuki
name=$(basename $0)
usage() {
cat <<EOT
Usage:
\term{ポリビニルアルコール}
\term{ポリビニルアルコール}[polyvinyl alcohol]
\term{ポリビニルアルコール}[polyvinyl alcohol][PVA]
@amaotone
amaotone / destiny_draw.py
Last active October 1, 2016 08:38
絶対に龍巫女引く
import numpy as np
INIT_HAND = 3
INIT_DECK = 40
def probability(deck):
return np.array([(deck-i)/deck for i in range(1, INIT_HAND+1)])
def main():
p = np.array([1., 1., 1.])
@amaotone
amaotone / hello.py
Created September 24, 2016 14:06
sample python program
def main():
print("hello world")
if __name__ == '__main__':
main()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.