Skip to content

Instantly share code, notes, and snippets.

View nariaki3551's full-sized avatar

Nariaki Tateiwa nariaki3551

  • NTT Software Innovation Center
  • Tokyo
View GitHub Profile
use std::io::Write;
fn main() {
// setting hardcoding
let pin_num = 2; // number of pins
let color_num = 3; // number of colors
let duplicate = false; // code dose not have same colors
println!(
"Context: pin_num: {}, color_num: {}, duplicate: {}",
pin_num, color_num, duplicate
use std::io::Write;
fn main() {
// temporary setting
let pin_num = 2; // number of pins
let color_num = 3; // number of colors
let duplicate = false; // code dose not have same colors
println!(
"Context: pin_num: {}, color_num: {}, duplicate: {}",
pin_num, color_num, duplicate
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
# coding: utf-8
import enum
import itertools
import collections
import argparse
import numpy as np
import pulp
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import re
import argparse
import pandas as pd
import matplotlib.pyplot as plt
integer = "[0-9]+"
double = "[0-9]+\.*[0-9]*"
_double = "[0-9]+\.[0-9]+([eE][+-]?[0-9]+)"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
FROM ubuntu:20.04
ENV HOME /svp_generator
WORKDIR ${HOME}
RUN apt-get update -y
RUN apt-get install -y sudo
RUN apt-get install -y tzdata
RUN apt-get install -y build-essential
RUN apt-get install -y wget
RUN apt-get install -y libgmp3-dev
# 参考書籍: De Berg, Mark, et al. "コンピュータ・ジオメトリ 計算幾何学: アルゴリズムと応用." (2000) 第5章
from dataclasses import dataclass
from typing import List, Tuple, Generator
class Point:
def __init__(self, name: str, loc: Tuple[float], **kwargs):
assert len(loc) == 2
self.name = name