Skip to content

Instantly share code, notes, and snippets.

# http://python.web.id/angka-terbilang-pada-python/#.VQpS8s2sXQo
satuan = ['', 'satu', 'dua', 'tiga', 'empat', 'lima', 'enam', 'tujuh',
'delapan', 'sembilan', 'sepuluh', 'sebelas']
def terbilang_(n):
if n >= 0 and n <= 11:
hasil = [satuan[n]]
elif n >= 12 and n <= 19:
hasil = terbilang_(n % 10) + ['belas']
@iesmatauw
iesmatauw / web-servers.md
Created May 4, 2017 01:17 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@echo off
REM "ftype /?" explains all of this assoc and ftype and PATHEXT usage
REM https://docs.python.org/2/using/windows.html for more info around the subject.
REM set PythonDIR to your python 2 or 3 install path; e.g. the folder with python.exe in it.
set PythonDIR=C:\Python27
set PATH=%PythonDIR%;%PythonDIR%\Scripts;%PATH%
set PYTHONPATH=%PythonDIR%\Lib;%PythonDIR%\Lib\site-packages;%PythonDIR%\DLLs;
set PATHEXT=%PATHEXT%;.PY;.PYW