Skip to content

Instantly share code, notes, and snippets.

@tadeu
tadeu / get_total_heap_bytes.cpp
Created July 13, 2020 20:40
Getting number of bytes allocated in heap in Linux
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <malloc.h>
size_t get_attribute_value(const char *str, const char *substr)
{
const char *pos = strstr(str, substr);
@tadeu
tadeu / eigen_maze.hpp
Last active January 31, 2020 21:13
Eigen Maze
#include <tuple>
namespace Eigen {
template<typename _Scalar>
class Array;
template<typename _Scalar>
class Matrix;
@-moz-document regexp("https?:\\/\\/bitbucket(?!\\.org).*?")
{
:root
{
--text-1: #ddd;
--text-2: #bbb;
--text-3: #555;
--text-blue: #59d;
--text-orange: #b50;
--bg-body: #222;
@tadeu
tadeu / keybase.md
Created August 6, 2019 21:38
keybase.md

Keybase proof

I hereby claim:

  • I am tadeu on github.
  • I am etadeu (https://keybase.io/etadeu) on keybase.
  • I have a public key ASBFD_Qcd57fVvDaLgUs0mnz5t90YlOlURAfcDEw6d46cQo

To claim this, I am signing this object:

active environment : None
user config file : C:\Users\tadeu\.condarc
populated config files : W:\Miniconda3\.condarc
conda version : 4.7.2
conda-build version : 3.18.2
python version : 3.7.3.final.0
virtual packages : __cuda=9.2
base environment : W:\Miniconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/win-64
@tadeu
tadeu / conda_debug_1.70.txt
Last active June 11, 2019 21:23
Conda slowdown due to boost package
# Command:
# conda env update --debug --file environment-boost-1.70.yml --prune >conda_debug_1.70.txt 2>&1
DEBUG conda.gateways.logging:set_verbosity(231): verbosity set to 2
DEBUG conda.core.solve:solve_final_state(212): solving prefix W:\Miniconda3\envs\test_boost_170
specs_to_remove: frozenset()
specs_to_add: frozenset({MatchSpec("sqlalchemy-utils==0.33.6"), MatchSpec("flask-allows==0.4"), MatchSpec("conda-wrappers"), MatchSpec("freetype=2.9.1"), MatchSpec("setuptools==40.5.0"), MatchSpec("sqlalchemy-utc==0.10.0"), MatchSpec("pytest-timeout==1.3.3"), MatchSpec("seaborn==0.9.0"), MatchSpec("hypothesis==3.57.0"), MatchSpec("ipykernel==4.8.2"), MatchSpec("pyqt==5.6.0"), MatchSpec("mkl==2019.3"), MatchSpec("exec-wrappers==1.0.3"), MatchSpec("sphinx==1.7.4"), MatchSpec("itsdangerous==0.24"), MatchSpec("ninja=1.9.0"), MatchSpec("mkl-devel==2019.3"), MatchSpec("execnet==1.5.0"), MatchSpec("pytest-mock==1.10.0"), MatchSpec("icc_rt==2019.0.0"), MatchSpec("six==1.11.0"), MatchSpec("py==1.7.0"), MatchSpec("noteb
@tadeu
tadeu / effective_modern_cmake.md
Created June 29, 2018 20:00 — forked from mbinna/effective_modern_cmake.md
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.