-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM ubuntu:jammy-20221130 | ||
|
||
COPY .github/texlive / | ||
RUN apt-get update -y; DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y $(cat /requirements.txt) | ||
|
||
COPY .github/python / | ||
RUN apt-get install -y python3 python3-pip python-is-python3; pip install -r /requirements.txt | ||
|
||
COPY Gemfile / | ||
RUN apt-get install -y ruby-full; gem install bundler; bundle check || bundle install --jobs=4 --retry=3; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
research-computing-with-cpp | ||
=========================== | ||
|
||
Deployed at: | ||
|
||
http://github-pages.ucl.ac.uk/research-computing-with-cpp | ||
|
||
|
||
How to build the lessons locally | ||
----------------------------------- | ||
|
||
Clone and build the various output files (that step will need some dependencies) | ||
``` bash | ||
git clone https://github.com/UCL-RITS/research-computing-with-cpp | ||
cd research-computing-with-cpp | ||
./build.sh | ||
``` | ||
|
||
Then you can proceed to build the website locally. The easiest is via docker. | ||
|
||
```bash | ||
mkdir ../bundle # To don't download every single time the ruby dependencies | ||
docker run --rm --volume="$PWD:/srv/jekyll" --volume="$PWD/../bundle:/usr/local/bundle" -it jekyll/jekyll:4 jekyll build | ||
python -m http.server -d _site | ||
``` | ||
|
||
Dependencies | ||
------------- | ||
|
||
All the dependencies are set in the `.github/{texlive,python}/requirements.txt` for an ubuntu machine. | ||
|
||
On a Mac, we use g++ installed via [homebrew](https://brew.sh/). So, for g++ version 7, we would run the build command as: | ||
|
||
``` bash | ||
CC=gcc-7 CXX=g++-7 ./build.sh | ||
``` | ||
|
||
The explicit compiler selection is needed on Mac OS for OpenMP (and possibly MPI) | ||
examples to build. Update the version number as necessary. | ||
|
||
You will need to have a bunch of stuff installed in order for the build to succeed. | ||
For Mac: | ||
* Libraries: | ||
* `brew install boost` | ||
* For building MPI and OpenMP examples: | ||
* `brew install open-mpi` | ||
* `brew install gcc` | ||
* Ruby stuff: | ||
* `brew install ruby` | ||
* `gem install jekyll --version '~> 4'` | ||
* `gem install kramdown --version '~> 2.3.1' | ||
* `gem install jekyll-remote-theme` | ||
` | ||
* Other utilities: | ||
* `brew install wget` | ||
* Python libraries: | ||
* `matplotlib` (plus several other scientific python libraries) | ||
|
||
A full LaTeX distribution needs to be available to generate a PDF version of the course notes by the build script. | ||
|
||
Alternatively, you can build the docker container available and build the site through it: | ||
|
||
``` | ||
$ docker build -t rcpp | ||
$ docker run -it --rm --volume=$PWD:/root rcpp:latest bash | ||
# cd | ||
# ITK_DIR=/usr/lib/InsightToolkit ./build.sh | ||
# make _site | ||
``` | ||
|
||
Then in folder _site, you'll have the `html`'s. | ||
Or, for a shortcut: `make preview` | ||
|
||
|
||
|
||
See https://github.com/UCL-RITS/research-computing-with-cpp/blob/master/01cpp/index.md for an example of how to reference a C file, CMake file, and run an executable | ||
|
||
And https://github.com/UCL-RITS/research-computing-with-cpp/tree/master/01cpp/cpp/hello | ||
for the corresponding code |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
div#slidelink { | ||
float: right; | ||
} | ||
|
||
.hll { background-color: #ffffcc } | ||
.c { color: #999988; font-style: italic } /* Comment */ | ||
.err { color: #a61717; background-color: #e3d2d2 } /* Error */ | ||
.k { color: #000000; font-weight: bold } /* Keyword */ | ||
.o { color: #000000; font-weight: bold } /* Operator */ | ||
.cm { color: #999988; font-style: italic } /* Comment.Multiline */ | ||
.cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */ | ||
.c1 { color: #999988; font-style: italic } /* Comment.Single */ | ||
.cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ | ||
.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ | ||
.ge { color: #000000; font-style: italic } /* Generic.Emph */ | ||
.gr { color: #aa0000 } /* Generic.Error */ | ||
.gh { color: #999999 } /* Generic.Heading */ | ||
.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ | ||
.go { color: #888888 } /* Generic.Output */ | ||
.gp { color: #555555 } /* Generic.Prompt */ | ||
.gs { font-weight: bold } /* Generic.Strong */ | ||
.gu { color: #aaaaaa } /* Generic.Subheading */ | ||
.gt { color: #aa0000 } /* Generic.Traceback */ | ||
.kc { color: #000000; font-weight: bold } /* Keyword.Constant */ | ||
.kd { color: #000000; font-weight: bold } /* Keyword.Declaration */ | ||
.kn { color: #000000; font-weight: bold } /* Keyword.Namespace */ | ||
.kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */ | ||
.kr { color: #000000; font-weight: bold } /* Keyword.Reserved */ | ||
.kt { color: #445588; font-weight: bold } /* Keyword.Type */ | ||
.m { color: #009999 } /* Literal.Number */ | ||
.s { color: #d01040 } /* Literal.String */ | ||
.na { color: #008080 } /* Name.Attribute */ | ||
.nb { color: #0086B3 } /* Name.Builtin */ | ||
.nc { color: #445588; font-weight: bold } /* Name.Class */ | ||
.no { color: #008080 } /* Name.Constant */ | ||
.nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */ | ||
.ni { color: #800080 } /* Name.Entity */ | ||
.ne { color: #990000; font-weight: bold } /* Name.Exception */ | ||
.nf { color: #990000; font-weight: bold } /* Name.Function */ | ||
.nl { color: #990000; font-weight: bold } /* Name.Label */ | ||
.nn { color: #555555 } /* Name.Namespace */ | ||
.nt { color: #000080 } /* Name.Tag */ | ||
.nv { color: #008080 } /* Name.Variable */ | ||
.ow { color: #000000; font-weight: bold } /* Operator.Word */ | ||
.w { color: #bbbbbb } /* Text.Whitespace */ | ||
.mf { color: #009999 } /* Literal.Number.Float */ | ||
.mh { color: #009999 } /* Literal.Number.Hex */ | ||
.mi { color: #009999 } /* Literal.Number.Integer */ | ||
.mo { color: #009999 } /* Literal.Number.Oct */ | ||
.sb { color: #d01040 } /* Literal.String.Backtick */ | ||
.sc { color: #d01040 } /* Literal.String.Char */ | ||
.sd { color: #d01040 } /* Literal.String.Doc */ | ||
.s2 { color: #d01040 } /* Literal.String.Double */ | ||
.se { color: #d01040 } /* Literal.String.Escape */ | ||
.sh { color: #d01040 } /* Literal.String.Heredoc */ | ||
.si { color: #d01040 } /* Literal.String.Interpol */ | ||
.sx { color: #d01040 } /* Literal.String.Other */ | ||
.sr { color: #009926 } /* Literal.String.Regex */ | ||
.s1 { color: #d01040 } /* Literal.String.Single */ | ||
.ss { color: #990073 } /* Literal.String.Symbol */ | ||
.bp { color: #999999 } /* Name.Builtin.Pseudo */ | ||
.vc { color: #008080 } /* Name.Variable.Class */ | ||
.vg { color: #008080 } /* Name.Variable.Global */ | ||
.vi { color: #008080 } /* Name.Variable.Instance */ | ||
.il { color: #009999 } /* Literal.Number.Integer.Long */ | ||
.photograph { | ||
background-color: #007e9e; | ||
} | ||
.header--mobile { | ||
background-color: #007e9e; | ||
border-bottom-color: #007e9e; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|