Skip to content

Instantly share code, notes, and snippets.

Noriyuki Hosaka bgnori

Block or report user

Report or block bgnori

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mining-mammonth-version.json
"Total DeltaV": 7751.744428756014,
"Total Weight": 341697,
"name": "Minmus Miner, launch from Kerbin to LKO",
"stages": [
"fuel": 0,
"Wet": 0,
"name": "Ore",
"mt": 0,
import math
import json
from itertools import starmap
def tonne(x):
return x*1000.0
def deltaV(Isp, m0, mt, gravitational_acc=9.80665):
import collections
m = [[-1,1,1,-1,-1,1,1,-1,-1,1],[1,"S",1,"L",-1,-1,-1,-1,-1,-1],[-1,-1,-1,1,1,-1,1,-1,1,1],[1,"L",-1,-1,1,-1,1,-1,1,-1],[-1,1,1,-1,-1,-1,-1,"L",1,-1],[1,-1,1,-1,-1,1,-1,1,-1,1],[-1,"L",-1,-1,-1,1,-1,-1,-1,1],[-1,1,-1,1,1,-1,1,-1,-1,-1],[-1,1,-1,-1,-1,1,1,-1,"G",1],[-1,-1,1,1,-1,-1,-1,1,-1,-1]]
class Position(collections.namedtuple("Position", ['x', 'y'])):
__slots__ = ()
View gist:9d1306030bb03ae66c5df35460fc9a67
ws = ["イアラ","ウェイト","オメガロ","ガルヒ","ガングリオンズ","クリオ","ジェノバ","スノウガ","ズビズバ","スペシウム","タグアズ","ドドンパ","トルネ","ネメシス","バイナリル","ハザード","パリピファイア","バルース","ヒラケゴマ","フェイク","プリズマ","ホルーガ","マッハ","マホマホ","ムート","ラリホフ","ランス","ループ","ロールウェイブ","ワロス"]
conn = {}
for w in ws:
for v in ws:
if w[-1] == v[0]:
conn[(w, v)] = True
# coding: utf-8
import itertools
def baz(xs, n):
ys = list(itertools.zip_longest(xs[n::4], xs[n+1::4], fillvalue=' '))
zs = itertools.zip_longest(ys[0::4], ys[1::4], ys[2::4], ys[3::4], fillvalue=(' ', ' '))
return [[p for ps in z for p in ps] for z in zs]
xs = [chr(i) for i in range(ord('a'), ord('z')+1)]
bgnori /
Created Jul 3, 2017
ヒューマンリソースマシーン Year 10までなんとなく検証(入力がわからないので)
import io
from enum import Enum, auto
class Inst(Enum):
inbox = auto()
outbox = auto()
View .sh
python3 --verbose --resolve --tournament ryuuou30th-2.json --out expected-r1750.json --override 307:1750
View gist:0e2893146e6bcc220109283151ad6335
"村山慈明(id=249, r=1721)",
"渡辺明(id=235, r=1849)",
def isprime(n):
for i in range(2, n):
if n % i == 0:
return False
return True
class Counter:
def __init__(self, n):
import math
def smartsub(N, k):
if k == 0:
return 1
""" k > 1 """
d, m = divmod(N, 10**k)
You can’t perform that action at this time.