Added By: Feedage Forager Feedage Grade B rated
Language: English
cad usd  container  debugging  directory  dlr etf  docker  ipython  java  method set  method  notebook  python  references  results  run 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics

the home of peter chng

Last Build Date: Sun, 11 Mar 2018 01:34:40 +0000


Java PhantomReferences: A better choice than finalize()

Sun, 11 Mar 2018 01:34:40 +0000

We’ve talked about soft and weak references, and how they differ from strong references. But what about phantom references? What are they useful for? Starting with Java 9, the intended usage of PhantomReference objects is to replace any usage of Object.finalize() (which was deprecated in Java 9), in order to allow for this sort of […]

Java and Soft References

Sun, 31 Dec 2017 22:50:44 +0000

In a previous post, I described what weak references were and how the JVM interacted with them and how they contrasted with strong references. In summary, a strong reference is what we typically think of as a reference in Java; that is, when we instantiate an object and assign its reference to a variable, that […]

Analysis of the 2011-2015 Boston Marathon results

Thu, 07 Apr 2016 23:12:20 +0000

I recently analyzed the 2011-2015 Boston Marathon results. You can see the results in this GitHub Repo, or go straight to the IPython/Jupyter Notebook for the details. Boston’s getting competitive One of the more interesting observations is that with the tighter qualifying standards the race is much more competitive. Runners have apparently responded by stepping […]

Converting an IPython Notebook to PDF

Wed, 10 Feb 2016 23:57:50 +0000

If you have an IPython Notebook (*.ipynb file), you may want to convert to PDF for distribution. If you read the documentation for ipython nbconvert, it seems fairly straightforward: $ ipython nbconvert --to PDF .ipynb However, if you run that, you’re likely to run into an error asking to you install Pandoc; this is […]

Remote Python debugging using PyDev/LiClipse for OpenStack Swift

Thu, 21 Jan 2016 01:42:39 +0000

We all know what debugging is – stepping through running code, line by line, inspecting variables and trying to figure out what’s wrong with your program while simultaneously tearing your hair out. However, usually when debugging Python code, the Python process is running locally on your system. What happens if you want to debug through […]

Accessing the host file system from a Docker container on OS X or Windows

Tue, 22 Dec 2015 04:00:16 +0000

Mounting (or sharing) a directory from the Docker daemon host into a container is simple enough. Example: $ docker run -v [host directory path]:[container directory path] -it [image name] However, on OS X and Windows, the Docker daemon (currently) runs inside of a Linux VM, that by default is run using VirtualBox. (Since Docker only […]

Golang: Promoted methods, method sets and embedded types

Thu, 17 Sep 2015 04:00:16 +0000

In Go, interfaces are implemented implicitly by ensuring that the implementing type’s method set contains all the methods of the interface. That is, if a type A contains a method set that is a superset of interface I’s method set, then type A implements interface I. This seems pretty straightforward, but can get a little […]

Converting CAD to USD using the DLR ETF

Tue, 31 Mar 2015 00:25:52 +0000

If you’re converting a large amount of CAD to USD (to buy US-listed/denominated securities, or to purchase US goods, or whatever) the spreads your bank offers you may not be the best way. Instead, if you have a brokerage account (one for both CAD and USD), you can use the Horizons DLR ETF to do […]

Python script to search CBC Radio 2 broadcast/play log history

Mon, 09 Mar 2015 03:02:05 +0000

I’m a fan of CBC Radio 2. Okay, that’s not exactly true, but I do have my $10 radio alarm clock tuned to 94.1 FM to wake me on weekdays. I often find myself in a stupor or only semi-awake when the tunes start blasting away before dawn, and as such, I often have trouble […]

React animations for a single component

Wed, 04 Mar 2015 00:21:58 +0000

React is a great framework for building web UIs. (And perhaps other UIs as well) I’ve recently started using it in some side projects, and love its ability to easily manage view state and efficiently update the DOM, reducing a lot of the “grunt work” of building dynamic web UIs. On the other hand, it […]