Compiling, deploying and calling Ethereum smartcontract using Python

We use Python 3.5.3 on Ubuntu 16.04 with setup below: pip3 install web3==4.7.2 py-solc==3.2.0 python3 -m solc.install v0.4.24 export PATH=”$PATH:$HOME/.py-solc/solc-v0.4.24/bin” The core packages are: web3 : official python interface to interact with Ethereum blockchain py-solc: official python wrapper for solc (solidity compiler). Hence solc needs to be installed (covered in setup above) To compile a solidity…

Sign Ripple transaction locally using ripple-lib-java

Since rippled 1.1.0 disables public signing by default, we either need to host our own API server or sign Ripple transaction locally. Fortunately, ripple-lib-java gives clue on how to do this in one of its example. Long story short, we can use this simple method to do the signing: import java.math.BigDecimal; import com.ripple.core.types.known.tx.txns.Payment; import com.ripple.core.types.known.tx.signed.SignedTransaction;…

Existing PHP catches and bugs

I will keep updating this post as part of note whenever I find another catch and bug in PHP. I hope it can help beginner PHP developers (like me) out there to escape hours of confusion and stress .. 😅 PUT multipart/data bug As explained by this open bug (since 2011), when you submit a multipart/data…

SIFT/SURF BoW for big number of clusters

If you spend some time browsing, there are some examples already available for Python SIFT/SURF bag of words (BoW) classifier in the internet. They use clustering (usually K-Means) to build dictionary of visual vocabularies (usually with sklearn or cv2 clustering library) of SIFT/SURF features. However, most of the sample codes that I found can’t properly…