{{ message }}

Instantly share code, notes, and snippets.

💤
procrastinating

# Nattawut Phetmak neizod

💤
procrastinating
Last active Dec 15, 2015 — forked from lifez/Insomnia cure.py
View insomnia-cure.py
 from itertools import cycle, izip k, l, m, n, d = [int(raw_input()) for _ in range(5)] dragons = [cycle([False] * (i-1) + [True]) for i in {k, l, m, n}] print sum(any(next(izip(*dragons))) for _ in xrange(d))
Last active Dec 14, 2015 — forked from Python1Liners/LICENSE.txt
Happy Valentine's Day
 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2013 Nattawut Phetmak Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Created Sep 17, 2012 — forked from visibletrap/reverse-interleave.clj
View groupIndices.hs
 -- groupIndices 5 [1..20] -> [[1,6,11,16],[2,7,12,17],[3,8,13,18],[4,9,14,19],[5,10,15,20]] groupIndices n = map reverse . foldl (\a x -> [if length h /= length t then x:h else h | (h,t) <- zip a ((42:last a):init a)]) (take n \$ repeat [])
Created Sep 3, 2012 — forked from Python1Liners/LICENSE.txt
 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2012 Nattawut Phetmak Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Created Jul 28, 2012 — forked from Python1Liners/LICENSE.txt
Letter A
 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2012 Nattawut Phetmak Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Last active Apr 27, 2019 — forked from 140bytes/LICENSE.txt
Fibonacci (Recursive Lambda)
 DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2012 Nattawut Phetmak Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Created Feb 27, 2012 — forked from Python1Liners/LICENSE.txt
Stockbroker