Python Decorator


Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:38:48) [MSC v.1900 32 bit (Intel)] on win32 Type “copyright”, “credits” or “license()” for more information. 1. define function functions are first class objects in python, this is simply the observation that in Python, functions are objects like everything else. 2. calling it 3. assign function to other variable … Continue reading

list of important (atau essential) packages APT dengan web2py


Atas bantuan, dan saran rekan kcin, kita bisa me-list dari essential package linux yang berbasis aptnya debian menggunakan web2py python framework ini controllernya : dan viewnya : Atas masukan di milistnya juga, bisa juga diimplementasikan dengan dan viewnya : atau dengan yang lebih mudah :

apt-get –print-uris update dengan web2py


Di Debian/Ubuntu linux, ada opsi –print-uris dari apt-get, yang outputnya akan menampilkan alamat URI dari file index yang akan didownload apt-get. Misalnya outputnya gini $ apt-get –print-uris update ‘http://ftp.hk.debian.org/debian/dists/stable/main/source/Sources.bz2’ http://ftp.hk.debian.org_debian_dists_stable_main_source_Sources 0 : ‘http://ftp.hk.debian.org/debian/dists/stable/contrib/source/Sources.bz2’ http://ftp.hk.debian.org_debian_dists_stable_contrib_source_Sources 0 : ‘http://ftp.hk.debian.org/debian/dists/stable/non-free/source/Sources.bz2’ http://ftp.hk.debian.org_debian_dists_stable_non-free_source_Sources 0 : ‘http://ftp.hk.debian.org/debian/dists/stable/main/binary-amd64/Packages.bz2’ http://ftp.hk.debian.org_debian_dists_stable_main_binary-amd64_Packages 0 : ‘http://ftp.hk.debian.org/debian/dists/stable/contrib/binary-amd64/Packages.bz2’ http://ftp.hk.debian.org_debian_dists_stable_contrib_binary-amd64_Packages 0 : ‘http://ftp.hk.debian.org/debian/dists/stable/non-free/binary-amd64/Packages.bz2’ http://ftp.hk.debian.org_debian_dists_stable_non-free_binary-amd64_Packages 0 : ‘http://ftp.hk.debian.org/debian/dists/stable/Release’ http://ftp.hk.debian.org_debian_dists_stable_Release 0 … Continue reading