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 python3 | |
# NOTE | |
# LAYERS is a non-empty list of integers. | |
# The n-gon can be determine by calc_ngon(LAYERS), e.g., | |
#LAYERS = [1, 2, 2] # heptagon (not constructible) | |
#LAYERS = [1, 4, 3] # heptadecagon (17 sides) | |
#LAYERS = [2, 2, 3, 2] # tetracontadigon (42) | |
#LAYERS = [4, 1, 4, 3, 2, 2] # 360-gon |
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 python3 | |
import sys | |
from argparse import ArgumentParser | |
from itertools import combinations | |
from random import seed, shuffle, randrange | |
sumsupto = lambda n: n*(n+1)//2 | |
tco = lambda t: f'\033[01;{31+t[1]}m{t[0]:02}\033[00m' |
Loading
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
x | y | aqi | note | |
---|---|---|---|---|
390 | 60 | 82 | Bang Plat | |
520 | 150 | 78 | Phaya Thai | |
750 | 160 | 99 | Wang Thonglang | |
530 | 260 | 74 | Pathum Wan | |
410 | 460 | 151 | Rat Burana | |
520 | 480 | 76 | Phra Pradaeng | |
730 | 460 | 65 | Bang Na | |
1060 | 140 | 255 | ? |
Loading
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
#include <iostream> | |
using namespace std; | |
bool is_int(string number) { | |
bool after_dot = false; | |
for (char c : number) { | |
if (after_dot and c != '0') { | |
return false; | |
} else if (c == '.') { |
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
array[1..3] of int: divisors = [2, 3, 7]; | |
var 1..100: answer; | |
constraint forall(d in divisors)( answer mod d == 0 ); | |
solve satisfy; | |
output [ "The ultimate answer is \(answer).\n" ]; |
Loading
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
\NeedsTeXFormat{LaTeX2e} | |
\ProvidesClass{independent-study} | |
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} | |
\ProcessOptions\relax | |
\LoadClass[11pt,a4paper,oneside]{book} | |
% thai book | |
\usepackage[english,thai]{babel} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.