This file contains hidden or 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
| version: '3.7' | |
| services: | |
| postgres: | |
| image: postgres:latest | |
| volumes: | |
| - pg_data:/var/lib/postgres/data | |
| networks: | |
| - pg_net | |
| environment: | |
| - "POSTGRES_PASSWORD=postgres" |
This file contains hidden or 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 os | |
| import subprocess | |
| import re | |
| import glob | |
| import requests | |
| from bs4 import BeautifulSoup | |
| # カレントディレクトリ | |
| BASE_DIR = os.path.dirname(os.path.abspath(__file__)) |
This file contains hidden or 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
| from pyzabbix import ZabbixAPI | |
| import requests | |
| import argparse | |
| from datetime import datetime | |
| parser = argparse.ArgumentParser(description="Retrieve graphs on Zabbix.") | |
| parser.add_argument('-s', '--start', help='Set start time graph') | |
| parser.add_argument('-e', '--end', help='Set end time graph') | |
| args = parser.parse_args() |
This file contains hidden or 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 sys | |
| root = float(sys.argv[1]) | |
| left = 0.0 | |
| right = root | |
| count = 0 | |
| while right - left > pow(10, -10) : | |
| # 中央値 | |
| mid = (right + left) / 2 |
This file contains hidden or 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 os | |
| import sys | |
| import argparse | |
| import requests | |
| from bs4 import BeautifulSoup | |
| from datetime import datetime | |
| from logging import getLogger, StreamHandler, DEBUG, Formatter | |
| # Onsen source site | |
| url = "http://www.onsen.ag/app/programs.xml" |