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 / kyopuro-template.md
Created October 26, 2019 05:40
kyopuro-template

CPP template

#include<bits/stdc++.h>
using namespace std;

#define endl '\n'
#define ALL(g) (g).begin(),(g).end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
@GINK03
GINK03 / kaggle-kernel-scp.md
Created October 15, 2019 05:43
kaggle-kernel-scp

kaggleのカーネルからscpを行う

kaggle docker

  • aptが使える
  • uploadは一定以上のデータはゲロ遅くなる(実質、スモールデータのみ扱える)

example

コピペすれば動く