Since this is a lot less data to work with, we'll take prizes from 1970 onwards.
| Country | Nobels in Physics | 2016 population (millions) | Nobels per million |
|---|---|---|---|
| Denmark | 2 | 5.7 | 0.350877193 |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
A simple Ghostscript command to merge two PDFs in a single file is shown below:
gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combine.pdf -dBATCH 1.pdf 2.pdfInstall Ghostscript:
Type the command sudo apt-get install ghostscript to download and install the ghostscript package and all of the packages it depends on.
| # These instructions assume you are using a Linux or Mac machine as | |
| # the “local” machine and an Amazon Linux as the “remote” machine. | |
| # Here’s one way to get X11 working between the two. | |
| # on the local machine (Linux or Mac with X11 already installed) | |
| $ ssh -X -i <amazon_key.pem> ec2-user@<remote_ec2_box_name> | |
| # then on the remote Amazon Linux EC2 box | |
| $ sudo yum install xauth | |
| $ sudo yum install xterm |
| # Repeat an operation n times, e.g. | |
| # @dotimes 100 println("hi") | |
| macro dotimes(n, body) | |
| quote | |
| for i = 1:$(esc(n)) | |
| $(esc(body)) | |
| end | |
| end | |
| end |
| import numpy | |
| from cffi import FFI | |
| ffi = FFI() | |
| ffi.cdef(""" | |
| void single_test(double *x, int n); | |
| void multi_test(double **x, int n, int m); | |
| """) | |
| C = ffi.dlopen("./simple.so") |