• Stars
    star
    234
  • Rank 168,129 (Top 4 %)
  • Language
    Python
  • Created about 8 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Lecture notes and example code for teaching C & C++

C & C++ programming notes

License: CC BY 4.0

  • Author: Ben Langmead

These are lecture notes and example code for teaching C & C++. The slides themselves are written in a custom "runnable Markdown" dialect for C/C++. These files have extension .cppmd. The script that "compiles" .cppmd files is units/cppmd_render.py. This script:

  • Generates C/C++ source files based on specially-formatted comments in the Markdown (<!---cppmd-file ... -->)
  • Runs shell commands based on specially-formatted comments in the Markdown (<!---cppmd-shell ... -->), often in order to compile and run the source code
    • Possibly integrates the output from the shell back into the slides, so that output can be included in final rendered doc
  • Uses pandoc & beamer to render a PDF

Outputs consist of (a) a PDF of the slides, (b) source files for all the examples.

All the shell commands are run within a Docker image. We use this image from Docker Hub:

And the corresponding Dockerfile and scripts used to build/pull/push are available in the docker subdirectory. The base image is Fedora 27. The most relevant software versions are:

gcc-7.2.1
g++-7.2.1
gdb: Fedora 8.0.1-33.fc27
valgrind-3.13.0
git v2.14.3

Philosophy

The reality of programming in C and C++ can seem divorced from the conceptual discussions in texts. In these notes, explaining concepts is always intertwined with showing examples. When examples are shown, I give exact code and exact command lines, executed in a predictable environment, so that students can recreate the conditions exactly. I show examples that do work and others that don't. The idea is never to stray too far from a code example.

More Repositories

1

bowtie2

A fast and sensitive gapped read aligner
C++
629
star
2

ads1-notebooks

Copies of notebooks used in the practical sessions for Algorithms for DNA Sequencing
347
star
3

ads1-slides

Slides for Algorithms for DNA Sequencing Coursera class
296
star
4

comp-genomics-class

Code and examples for JHU Computational Genomics class
Jupyter Notebook
284
star
5

bowtie

An ultrafast memory-efficient short read aligner
C++
255
star
6

langmead-lab

Publicly-visible Langmead Lab resources
58
star
7

aws-indexes

Catalog of genomic indexes freely available from public clouds
Python
52
star
8

crossbow

Variant calling from sequence reads using cloud computing
Perl
38
star
9

qtip

Qtip: a tandem simulation approach for accurately predicting read alignment mapping qualities
C++
24
star
10

seq-frontiers-class

Code, examples, reading list for JHU Frontiers of Sequencing Data Analysis class
24
star
11

myrna

Cloud-scale differential expression for RNA-seq
Perl
15
star
12

bowtie-majref

Scripts related to building major-allele references for Bowtie and Bowtie 2
Shell
11
star
13

bowtie-scaling

Experiments for "Scaling read aligners to hundreds of threads on general-purpose processors"
Python
11
star
14

bsmooth-align

Alignment of bisulfite sequence reads and tabulation of read-level methylation measurements
C++
10
star
15

ads1-hw-examples

How some homework solutions should work on some small examples
9
star
16

jhu-compute

Resources to help use JHU's compute resources
3
star
17

sra-example

C++
2
star
18

percy

Scripts for starting permanent, lightweight EC2 instances
Python
2
star
19

public-seq-data

Scripts, manifests, etc for grabbing and lightly analyzing public data
Python
1
star
20

recount-docker

Dockerization of recount and its R/Bioconductor dependencies
R
1
star
21

bowtie-dev

Shell
1
star
22

jupyter-all

Jupyter environment with various language kernels already installed
Dockerfile
1
star
23

cgsi18

Scripts for downloading and querying raw Snaptron data
HTML
1
star
24

docker-oss

Automatic compatibility tests, e.g. to learn which OS versions a binary can be run on
Shell
1
star