Skip to content

Instantly share code, notes, and snippets.

View GINK03's full-sized avatar
🌴
On vacation

catindog/nardtree GINK03

🌴
On vacation
View GitHub Profile
@GINK03
GINK03 / google_cals.py
Created December 30, 2020 06:41
minimam_google_calendar_cui
#!/usr/bin/env python
"""
Example application for the 'blessed' Terminal library for python.
This isn't a real progress bar, just a sample "animated prompt" of sorts that demonstrates the
separate move_x() and move_yx() capabilities, made mainly to test the `hpa' compatibility for
'screen' terminal type which fails to provide one, but blessed recognizes that it actually does, and
provides a proxy.
"""
from __future__ import print_function
@GINK03
GINK03 / memo.md
Created December 13, 2020 12:04
memo
  • sss
  • ddd
  • ccc
@GINK03
GINK03 / コロナ感染時の寿命の期待損失年数.py
Created August 9, 2020 11:54
コロナ感染時の寿命の期待損失年数
import pandas as pd
import numpy as np
from io import StringIO
"""
厚生労働省のデータによると、年代別の死亡率は以下の通り
ref. https://www.mhlw.go.jp/content/10906000/000649533.pdf
"""
death_rate = {0: 0.0, 10:0.0, 20:0.0, 30:0.1, 40:0.4, 50:1.0, 60:4.7, 70:14.2, 80: 28.3}
@GINK03
GINK03 / コロナ感染時の寿命の期待損失年数.py
Created August 9, 2020 11:54
コロナ感染時の寿命の期待損失年数
import pandas as pd
import numpy as np
from io import StringIO
"""
厚生労働省のデータによると、年代別の死亡率は以下の通り
ref. https://www.mhlw.go.jp/content/10906000/000649533.pdf
"""
death_rate = {0: 0.0, 10:0.0, 20:0.0, 30:0.1, 40:0.4, 50:1.0, 60:4.7, 70:14.2, 80: 28.3}
@GINK03
GINK03 / 2020-04-05-torrent.py
Last active April 5, 2020 05:49
2020-04-05-torrent
from subprocess import PIPE
from subprocess import Popen
import re
import requests
from bs4 import BeautifulSoup
import re
import shlex
from pathlib import Path
from collections import namedtuple
from concurrent.futures import ThreadPoolExecutor
@GINK03
GINK03 / 2020-04-05-torrent.py
Created April 5, 2020 05:45
2020-04-05-torrent
import os
@GINK03
GINK03 / medium_install_vpn.sh
Created January 4, 2020 03:14
medium_install_vpn.sh
$ wget -q https://raw.githubusercontent.com/GINK03/softether_docker_wrapper/master/run_softether_vpn_server_on_docker.py -O /tmp/vpn.py && python3 /tmp/vpn.py
USERNAMEを指定してください:hogehoge
PASSWORDを指定してください:1223334444
PSKのパスワードを指定してください:vpn
3f98a1d924124c5fb1abd119d151bc2c95cb3fb76bdbfd64804e6c5ba42949b9
@GINK03
GINK03 / medium_softether_vpn.py
Created January 4, 2020 03:13
medium_softether_vpn.py
USERNAME = input('USERNAMEを指定してください:')
PASSWORD = input('PASSWORDを指定してください:')
PSK = input('PSKのパスワードを指定してください:')
query = \
['docker',
'run',
'-d',
'--cap-add',
'NET_ADMIN',
@GINK03
GINK03 / kaggle-bio.md
Last active January 4, 2020 03:11
kaggle-bio.md

Thank you for watching this BIO.

My policy, Data Science as a Art.

  • choosing best algorithm for each problems.

  • collecting knowledge for each problems' solutions.

  • making unique model.

  • it's fun and beautiful!

Non-competition outputs.

@GINK03
GINK03 / keras-seq2seq.md
Last active December 27, 2019 01:41
keras-seq2seq.md

KerasでSeq2Seqをやる

KerasでSeq2Seq

Seq2Seqといえば、TensorFlowでの実装が有名で、英語とフランス語の大規模コーパスを使ってやるものが、よくチューニングされており便利です
しかし、この翻訳のタスクに最適化されており、一般的なものと言い難い感じで任意のタスクに変換して利用する際に少々不便を感じていました。 (TensorFlowのものは、自分で改造するにしても人に説明する際も、ちょっと面倒)

今回、Kerasで実装して、ある程度、うまく動作することを確認しました

ネットワークの説明