Skip to content

Instantly share code, notes, and snippets.

View pmoulon's full-sized avatar

Pierre Moulon pmoulon

View GitHub Profile
env:
matrix:
- CUDA_VERSION_MAJOR="8" CUDA_VERSION_MINOR="0" CUDA_PKG_LONGVERSION="${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR}.61-1" CUDA_PKG_VERSION="${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR}"
install:
- CUDA_REPO_PKG=cuda-repo-ubuntu1404_${CUDA_PKG_LONGVERSION}_amd64.deb
- wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/$CUDA_REPO_PKG
- sudo dpkg -i $CUDA_REPO_PKG
- rm $CUDA_REPO_PKG
- sudo apt-get -y update
@pmoulon
pmoulon / OCLINT
Last active June 5, 2020 08:39
Using oclint
* Things that can catch OCLINT *
http://oclint-docs.readthedocs.io/en/stable/rules/index.html
*How to install it:*
$ brew tap oclint/formulae
$ brew install oclint
*How to run it:*
OpenMVG contribution guides
- File extension:
- C++ => .cpp, .hpp
- C => .c, .h
=======
Coding
=======
@pmoulon
pmoulon / RamProfiler.hpp
Last active September 5, 2015 11:02
Very simple ram profiling linux
{
int tSize = 0, resident = 0, share = 0;
ifstream buffer("/proc/self/statm");
buffer >> tSize >> resident >> share;
buffer.close();
long page_size_kb = sysconf(_SC_PAGE_SIZE) / 1024; // in case x86-64 is configured to use 2MB pages
double rss = resident * page_size_kb;
cout << "RSS - " << rss << " kB\n";
@pmoulon
pmoulon / gist:13322b3a89967f2afbe0
Created January 21, 2015 09:19
LGPL : GPL : AGPL
LGPL: you can link against and don't have to release source code as long as you don't modify the library itself
GPL: you have to release source code if you link against and distribute the binary, but don't if you just provide a service
AGPL: you have to allow the source to be downloaded even if you never distribute the binary but do provide a service