Ben Chuanlong Du's Blog

It is never too late to learn.

Use Scala With Picocli

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

It is easy to make mistakes due to type of parameters when use picocli in Scala. It is suggested that you

  1. Have all parameters prepared before using them.

  2. manually specify types …

Tips on Spark MLlib

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Spark MLlib RDD-based API supports stratified sampling but the DataFrame-based API hasn't implemented it yet as of Spark 2.4.3.

sample keys (not rows) with equal probability

References

https://spark …

Deep Learning Tools and Apps

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

https://www.imageidentify.com/

Neural Style Transfer Applications

DeepArt

Prisma

Use Qt in Python

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

PyQt5 vs PySide2

https://www.reddit.com/r/Qt5/comments/a3zt3j/eli5_pyqt5_pyside2_which_one_to_use/

Both PyQt5 (developed by Riverbank) and PySide2 (official Python bindings from Qt) are great. They have very similar APIs …

Check Whether a File Exists in Spark

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

org.apache.hadoop.fs.FileSystem

val conf = sc.hadoopConfiguration
val fs = org.apache.hadoop.fs.FileSystem.get(conf)
val exists = fs.exists(new org.apache.hadoop.fs.Path("/path/on/hdfs …