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
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 |
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
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.
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
#!/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.
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 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.
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
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 |
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
# 参考書籍: 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 |
NewerOlder