Showing posts from January, 2010

ctypes : Loading simple C library in Python 2.5+

Just discovered this when I was glancing through the pystream (a CUDA library for Python) source codes. In Python2.5+, it is possible to directly load simple C shared libraries from Python without the need for writing C wrappers for it. ( SWIG or manually writing one ). This can be achieved using the Python ctypes module. Lets take a simple example: /* test.c */ int multiply(int a,int b){ return a * b; } Compile it as a SO library (ref: Writing and using shared libraries ): gcc -c -fPIC test.c gcc -shared -fPIC -o test.o Now we got an SO file with a test function, lets load it in Python In [1]: import ctypes In [2]: libtest = ctypes.cdll.LoadLibrary('/path/to/') In [3]: libtest.multiply(30,99) Out[3]: 2970 Hope this would be useful to someone. More details : Happy Hacking :D

The Deen Show : Proper Name for GOD

Video which describes etymology of Allah & Eloh, and the proper word to use to describe GOD - from the Deen Show. Guest - Yusuf Estes (former National Muslim Chaplain for the United States Bureau of Prisons and Delegate to the United Nations World Peace Conference for Religious Leaders.) "Allah - The best word to describe the GOD of the Jew, Christian and the Muslims, because this is the GOD of Adam, Abraham, Moses , David , Solomon, Jesus and Muhammad (Peace Be Upon Them All)" - Yusuf Estes

Allah , Eloh , Elohim

Recent news in Malaysia : local Muslims are in rage on the court ruling to allow the Herald newspaper to use the word Allah to refer to Eloh/Elohim/YHWH. IMO, they seem to lost touch with the rest of the earth. A youtube video of a Yemeni Jew explaining the etymology of Eloh / Allah Etymology of the world Allah: El Eloh/Elohim (Hebrew/Aramaic) Allah (Arabic) Both Eloh and Allah shares the same root: Eloh (Alef Lameh Heh) , Allah (Alif Lam Ha). Where do you think the name of several of our prophets and angels derived from? .. its 'El' !! Elias (Ilyas) – Whose God is the Lord Elisha (Ilyasa') – Salvation of God Gabriel (Jibril) – Strong one of God Ishmael (Ismail) – Heard by God Michael (Mikail) – Who is like God? So on what basis that the word Allah is reserved fo