$ git branch -vv
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 zmq | |
def main(): | |
ctx = zmq.Context() | |
socket = ctx.socket(zmq.REP) | |
socket.bind('tcp://*:5560') #: https://stackoverflow.com/questions/6024003/why-doesnt-zeromq-work-on-localhost | |
while True: | |
m = socket.recv() |
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
""" | |
日付解析ライブラリ:ciso8601のサンプル | |
最速らしいので試してみた。 | |
""" | |
import argparse | |
import time | |
from datetime import datetime, timedelta | |
import ciso8601 |
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 argparse | |
import pathlib | |
import subprocess | |
def main(args): | |
for p in pathlib.Path(args.target_dir).rglob('*.blg'): | |
csv_path = p.with_suffix('.csv') | |
subprocess.call(f'relog "{p}" -o "{csv_path}" -f CSV') |
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 sympy | |
# 指数部分を定義 (マイナス2分の1乗) | |
n = -sympy.Rational(1, 2) | |
print(n) | |
# 8のマイナス2分の1乗を求める | |
r = 8**n |
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 sympy | |
# x を定義 | |
x = sympy.Symbol('x') | |
# 式定義 | |
# x^3 - 2x^2 - 5x + 6 | |
expr = x**3 - 2*(x**2) - 5*x + 6 | |
print(expr) |