Skip to content
{{ message }}

Instantly share code, notes, and snippets.

💤
procrastinating

# Nattawut Phetmak neizod

💤
procrastinating
Created Nov 6, 2018
View informal-template.cls
 \NeedsTeXFormat{LaTeX2e} \ProvidesClass{independent-study} \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} \ProcessOptions\relax \LoadClass[11pt,a4paper,oneside]{book} % thai book \usepackage[english,thai]{babel}
Created Aug 7, 2018
Kirkpatrick–Seidel algorithm
View ulti-chull.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Last active May 25, 2018
3D drawing script for explaining how to solve Google Code Jam, 2018 Qualification, Cubic UFO.
View draw-cubic-ufo.R
 #!/usr/bin/env Rscript library(rgl) library(sp) calc_radian <- function(i, tick, uplim) { 2 * pi * (i / tick) * (uplim / 360) }
Last active Jul 16, 2017
R Program That Draw Histogram of Coupon's Collector Problem
View coupon.R
 random.int <- function(n) { sample.int(n, 1) } random.coupon <- function(...) { count <- 0 have.coupon <- logical(...) while (!all(have.coupon)) { have.coupon[random.int(...)] <- TRUE count <- count + 1 }
Last active Nov 4, 2016
break the nsa encryptio
View break_nsa.rst

# Break the NSA Encryption

`Challenge on Gist`_ from `this Facebook Post`_ provide an interesting question on cracking the NSA encryption. Doesn't this hook you enough? Let's roll. :D

Note, you can also test the validity of logic in this file with the command:

```\$ python3 -m doctest break_nsa.rst --verbose
```
Created Jan 14, 2016
uva 122 trees on the level
View simple-sol.py
 #!/usr/bin/env python3 from collections import deque class Node(object): def __init__(self): self.value = None self.left = None self.right = None
Last active Mar 31, 2017
View keybase.md

### Keybase proof

I hereby claim:

• I am neizod on github.
• I am neizod (https://keybase.io/neizod) on keybase.
• I have a public key whose fingerprint is 48AB A6A9 A002 DCD8 6E24 DFB0 0E27 2831 8C9B 4947

To claim this, I am signing this object:

Created May 11, 2015
test nbviewer
View it.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Last active Aug 29, 2015
Pachinko -- https://icpc.kattis.com/problems/pachinko
View pachinko.py
 #!/usr/bin/env python3 from numpy import matrix, zeros class RandomWalk(object): limpow = 10**9 offset = [(0,-1), (0,1), (-1,0), (1,0)]
Last active Aug 29, 2015
k-means clustering.
View kmeans.py
 #!/usr/bin/env python3 import sys from itertools import count class Point(object): def __init__(self, pp): self.x, self.y = pp