Compdigitec Labs

Code

Python classes, metaclasses, and instances at a glance

Tuesday, February 16th, 2021

For more details: http://www.thedigitalcatonline.com/blog/2014/09/01/python-3-oop-part-5-metaclasses/

git-strip-above

Monday, February 15th, 2021

git format-patch $1..HEAD -o wip && git reset –hard $1

Getting files from sources in Scala

Sunday, February 14th, 2021

// Java-based ways getClass.getResource(“/html/myfile.html”) println(Source.fromInputStream(getClass.getResourceAsStream(“/html/myfile.html”)).mkString) // Scala-native way // Note: NO LEADING SLASH println(Source.fromResource(“html/myfile.html”).getLines.toList)